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