Path: blob/main/src/publish/netlify/api/services/AccountMembershipService.ts
6464 views
/* istanbul ignore file */1/* tslint:disable */2/* eslint-disable */3import type { CancelablePromise } from "../core/CancelablePromise.ts";4import type { BaseHttpRequest } from "../core/BaseHttpRequest.ts";56export class AccountMembershipService {7constructor(public readonly httpRequest: BaseHttpRequest) {}89/**10* @returns any OK11* @throws ApiError12*/13public listAccountsForUser(): CancelablePromise<14Array<{15id?: string;16name?: string;17slug?: string;18type?: string;19capabilities?: {20sites?: {21included?: number;22used?: number;23};24collaborators?: {25included?: number;26used?: number;27};28};29billing_name?: string;30billing_email?: string;31billing_details?: string;32billing_period?: string;33payment_method_id?: string;34type_name?: string;35type_id?: string;36owner_ids?: Array<string>;37roles_allowed?: Array<string>;38created_at?: string;39updated_at?: string;40}>41> {42return this.httpRequest.request({43method: "GET",44url: "/accounts",45});46}4748/**49* @returns any error50* @throws ApiError51*/52public createAccount({53accountSetup,54}: {55accountSetup: {56name: string;57type_id: string;58payment_method_id?: string;59period?: "monthly" | "yearly";60extra_seats_block?: number;61};62}): CancelablePromise<{63code?: number;64message: string;65}> {66return this.httpRequest.request({67method: "POST",68url: "/accounts",69body: accountSetup,70});71}7273/**74* @returns any OK75* @throws ApiError76*/77public getAccount({78accountId,79}: {80accountId: string;81}): CancelablePromise<82Array<{83id?: string;84name?: string;85slug?: string;86type?: string;87capabilities?: {88sites?: {89included?: number;90used?: number;91};92collaborators?: {93included?: number;94used?: number;95};96};97billing_name?: string;98billing_email?: string;99billing_details?: string;100billing_period?: string;101payment_method_id?: string;102type_name?: string;103type_id?: string;104owner_ids?: Array<string>;105roles_allowed?: Array<string>;106created_at?: string;107updated_at?: string;108}>109> {110return this.httpRequest.request({111method: "GET",112url: "/accounts/{account_id}",113path: {114"account_id": accountId,115},116});117}118119/**120* @returns any OK121* @throws ApiError122*/123public updateAccount({124accountId,125accountUpdateSetup,126}: {127accountId: string;128accountUpdateSetup?: {129name?: string;130slug?: string;131type_id?: string;132extra_seats_block?: number;133billing_name?: string;134billing_email?: string;135billing_details?: string;136};137}): CancelablePromise<{138id?: string;139name?: string;140slug?: string;141type?: string;142capabilities?: {143sites?: {144included?: number;145used?: number;146};147collaborators?: {148included?: number;149used?: number;150};151};152billing_name?: string;153billing_email?: string;154billing_details?: string;155billing_period?: string;156payment_method_id?: string;157type_name?: string;158type_id?: string;159owner_ids?: Array<string>;160roles_allowed?: Array<string>;161created_at?: string;162updated_at?: string;163}> {164return this.httpRequest.request({165method: "PUT",166url: "/accounts/{account_id}",167path: {168"account_id": accountId,169},170body: accountUpdateSetup,171});172}173174/**175* @returns any error176* @throws ApiError177*/178public cancelAccount({179accountId,180}: {181accountId: string;182}): CancelablePromise<{183code?: number;184message: string;185}> {186return this.httpRequest.request({187method: "DELETE",188url: "/accounts/{account_id}",189path: {190"account_id": accountId,191},192});193}194}195196197