appbuild-oceanbase-console 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/LICENSE +12 -0
  2. package/README.md +191 -0
  3. package/dist/cjs/package.json +3 -0
  4. package/dist/cjs/sdk.js +27712 -0
  5. package/dist/cjs/sdk.js.map +1 -0
  6. package/dist/esm/package.json +3 -0
  7. package/dist/esm/sdk.js +27675 -0
  8. package/dist/esm/sdk.js.map +1 -0
  9. package/dist/iife/sdk.js +27716 -0
  10. package/package.json +47 -0
  11. package/types/client.d.ts +211 -0
  12. package/types/enums/adapter.d.ts +4 -0
  13. package/types/enums/api-service.d.ts +15 -0
  14. package/types/enums/api.d.ts +5 -0
  15. package/types/enums/attribute-status.d.ts +7 -0
  16. package/types/enums/auth-method.d.ts +9 -0
  17. package/types/enums/authentication-factor.d.ts +6 -0
  18. package/types/enums/authenticator-type.d.ts +3 -0
  19. package/types/enums/billing-plan.d.ts +10 -0
  20. package/types/enums/browser.d.ts +16 -0
  21. package/types/enums/build-runtime.d.ts +66 -0
  22. package/types/enums/column-status.d.ts +7 -0
  23. package/types/enums/compression.d.ts +5 -0
  24. package/types/enums/console-resource-type.d.ts +3 -0
  25. package/types/enums/credit-card.d.ts +19 -0
  26. package/types/enums/database-type.d.ts +4 -0
  27. package/types/enums/deployment-download-type.d.ts +4 -0
  28. package/types/enums/deployment-status.d.ts +7 -0
  29. package/types/enums/email-template-locale.d.ts +133 -0
  30. package/types/enums/email-template-type.d.ts +9 -0
  31. package/types/enums/execution-method.d.ts +9 -0
  32. package/types/enums/execution-status.d.ts +7 -0
  33. package/types/enums/execution-trigger.d.ts +5 -0
  34. package/types/enums/flag.d.ts +197 -0
  35. package/types/enums/framework.d.ts +17 -0
  36. package/types/enums/health-antivirus-status.d.ts +5 -0
  37. package/types/enums/health-check-status.d.ts +4 -0
  38. package/types/enums/image-format.d.ts +9 -0
  39. package/types/enums/image-gravity.d.ts +11 -0
  40. package/types/enums/index-status.d.ts +7 -0
  41. package/types/enums/index-type.d.ts +6 -0
  42. package/types/enums/message-priority.d.ts +4 -0
  43. package/types/enums/message-status.d.ts +7 -0
  44. package/types/enums/messaging-provider-type.d.ts +5 -0
  45. package/types/enums/name.d.ts +14 -0
  46. package/types/enums/o-auth-provider.d.ts +43 -0
  47. package/types/enums/output.d.ts +9 -0
  48. package/types/enums/password-hash.d.ts +13 -0
  49. package/types/enums/platform-type.d.ts +17 -0
  50. package/types/enums/platform.d.ts +4 -0
  51. package/types/enums/project-usage-range.d.ts +4 -0
  52. package/types/enums/proxy-resource-type.d.ts +4 -0
  53. package/types/enums/proxy-rule-deployment-resource-type.d.ts +4 -0
  54. package/types/enums/proxy-rule-status.d.ts +6 -0
  55. package/types/enums/region.d.ts +8 -0
  56. package/types/enums/relation-mutate.d.ts +5 -0
  57. package/types/enums/relationship-type.d.ts +6 -0
  58. package/types/enums/runtime.d.ts +66 -0
  59. package/types/enums/sms-template-locale.d.ts +133 -0
  60. package/types/enums/sms-template-type.d.ts +6 -0
  61. package/types/enums/smtp-encryption.d.ts +5 -0
  62. package/types/enums/smtp-secure.d.ts +4 -0
  63. package/types/enums/status-code.d.ts +6 -0
  64. package/types/enums/status.d.ts +4 -0
  65. package/types/enums/theme.d.ts +4 -0
  66. package/types/enums/timezone.d.ts +421 -0
  67. package/types/enums/type.d.ts +5 -0
  68. package/types/enums/usage-range.d.ts +5 -0
  69. package/types/enums/vcs-deployment-type.d.ts +5 -0
  70. package/types/enums/vcs-detection-type.d.ts +4 -0
  71. package/types/id.d.ts +20 -0
  72. package/types/index.d.ts +102 -0
  73. package/types/migrations.d.ts +240 -0
  74. package/types/models.d.ts +7945 -0
  75. package/types/operator.d.ts +180 -0
  76. package/types/permission.d.ts +43 -0
  77. package/types/query.d.ts +390 -0
  78. package/types/role.d.ts +70 -0
  79. package/types/sdk.d.ts +108 -0
  80. package/types/service.d.ts +11 -0
  81. package/types/services/account.d.ts +1413 -0
  82. package/types/services/assistant.d.ts +24 -0
  83. package/types/services/avatars.d.ts +319 -0
  84. package/types/services/backups.d.ts +276 -0
  85. package/types/services/console.d.ts +210 -0
  86. package/types/services/databases.d.ts +2119 -0
  87. package/types/services/domains.d.ts +1276 -0
  88. package/types/services/functions.d.ts +827 -0
  89. package/types/services/graphql.d.ts +43 -0
  90. package/types/services/health.d.ts +432 -0
  91. package/types/services/locale.d.ts +64 -0
  92. package/types/services/messaging.d.ts +1989 -0
  93. package/types/services/migrations.d.ts +413 -0
  94. package/types/services/organizations.d.ts +842 -0
  95. package/types/services/project.d.ts +130 -0
  96. package/types/services/projects.d.ts +1663 -0
  97. package/types/services/proxy.d.ts +190 -0
  98. package/types/services/realtime.d.ts +118 -0
  99. package/types/services/sites.d.ts +780 -0
  100. package/types/services/storage.d.ts +467 -0
  101. package/types/services/tables-db.d.ts +2034 -0
  102. package/types/services/teams.d.ts +366 -0
  103. package/types/services/tokens.d.ts +119 -0
  104. package/types/services/users.d.ts +1184 -0
  105. package/types/services/vcs.d.ts +249 -0
@@ -0,0 +1,842 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ import { BillingPlan } from '../enums/billing-plan';
4
+ import { Platform } from '../enums/platform';
5
+ export declare class Organizations {
6
+ client: Client;
7
+ constructor(client: Client);
8
+ /**
9
+ * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
10
+ *
11
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform
12
+ * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
13
+ * @throws {AppwriteException}
14
+ * @returns {Promise<Models.OrganizationList<Preferences>>}
15
+ */
16
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: {
17
+ queries?: string[];
18
+ search?: string;
19
+ }): Promise<Models.OrganizationList<Preferences>>;
20
+ /**
21
+ * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
22
+ *
23
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform
24
+ * @param {string} search - Search term to filter your list results. Max length: 256 chars.
25
+ * @throws {AppwriteException}
26
+ * @returns {Promise<Models.OrganizationList<Preferences>>}
27
+ * @deprecated Use the object parameter style method for a better developer experience.
28
+ */
29
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.OrganizationList<Preferences>>;
30
+ /**
31
+ * Create a new organization.
32
+ *
33
+ *
34
+ * @param {string} params.organizationId - Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
35
+ * @param {string} params.name - Organization name. Max length: 128 chars.
36
+ * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
37
+ * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
38
+ * @param {string} params.billingAddressId - Unique ID of billing address
39
+ * @param {string[]} params.invites - Additional member invites
40
+ * @param {string} params.couponId - Coupon id
41
+ * @param {string} params.taxId - Tax Id associated to billing.
42
+ * @param {number} params.budget - Budget limit for additional usage set for the organization
43
+ * @param {Platform} params.platform - Platform type
44
+ * @throws {AppwriteException}
45
+ * @returns {Promise<Models.Organization<Preferences>>}
46
+ */
47
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
48
+ organizationId: string;
49
+ name: string;
50
+ billingPlan: BillingPlan;
51
+ paymentMethodId?: string;
52
+ billingAddressId?: string;
53
+ invites?: string[];
54
+ couponId?: string;
55
+ taxId?: string;
56
+ budget?: number;
57
+ platform?: Platform;
58
+ }): Promise<Models.Organization<Preferences>>;
59
+ /**
60
+ * Create a new organization.
61
+ *
62
+ *
63
+ * @param {string} organizationId - Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
64
+ * @param {string} name - Organization name. Max length: 128 chars.
65
+ * @param {BillingPlan} billingPlan - Organization billing plan chosen
66
+ * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
67
+ * @param {string} billingAddressId - Unique ID of billing address
68
+ * @param {string[]} invites - Additional member invites
69
+ * @param {string} couponId - Coupon id
70
+ * @param {string} taxId - Tax Id associated to billing.
71
+ * @param {number} budget - Budget limit for additional usage set for the organization
72
+ * @param {Platform} platform - Platform type
73
+ * @throws {AppwriteException}
74
+ * @returns {Promise<Models.Organization<Preferences>>}
75
+ * @deprecated Use the object parameter style method for a better developer experience.
76
+ */
77
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform): Promise<Models.Organization<Preferences>>;
78
+ /**
79
+ * Get estimation for creating an organization.
80
+ *
81
+ * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
82
+ * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
83
+ * @param {string[]} params.invites - Additional member invites
84
+ * @param {string} params.couponId - Coupon id
85
+ * @throws {AppwriteException}
86
+ * @returns {Promise<Models.Estimation>}
87
+ */
88
+ estimationCreateOrganization(params: {
89
+ billingPlan: BillingPlan;
90
+ paymentMethodId?: string;
91
+ invites?: string[];
92
+ couponId?: string;
93
+ }): Promise<Models.Estimation>;
94
+ /**
95
+ * Get estimation for creating an organization.
96
+ *
97
+ * @param {BillingPlan} billingPlan - Organization billing plan chosen
98
+ * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
99
+ * @param {string[]} invites - Additional member invites
100
+ * @param {string} couponId - Coupon id
101
+ * @throws {AppwriteException}
102
+ * @returns {Promise<Models.Estimation>}
103
+ * @deprecated Use the object parameter style method for a better developer experience.
104
+ */
105
+ estimationCreateOrganization(billingPlan: BillingPlan, paymentMethodId?: string, invites?: string[], couponId?: string): Promise<Models.Estimation>;
106
+ /**
107
+ * Delete an organization.
108
+ *
109
+ * @param {string} params.organizationId - Team ID.
110
+ * @throws {AppwriteException}
111
+ * @returns {Promise<{}>}
112
+ */
113
+ delete(params: {
114
+ organizationId: string;
115
+ }): Promise<{}>;
116
+ /**
117
+ * Delete an organization.
118
+ *
119
+ * @param {string} organizationId - Team ID.
120
+ * @throws {AppwriteException}
121
+ * @returns {Promise<{}>}
122
+ * @deprecated Use the object parameter style method for a better developer experience.
123
+ */
124
+ delete(organizationId: string): Promise<{}>;
125
+ /**
126
+ * Get a list of all aggregations for an organization.
127
+ *
128
+ * @param {string} params.organizationId - Organization ID
129
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to
130
+ * @throws {AppwriteException}
131
+ * @returns {Promise<Models.AggregationTeamList>}
132
+ */
133
+ listAggregations(params: {
134
+ organizationId: string;
135
+ queries?: string[];
136
+ }): Promise<Models.AggregationTeamList>;
137
+ /**
138
+ * Get a list of all aggregations for an organization.
139
+ *
140
+ * @param {string} organizationId - Organization ID
141
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to
142
+ * @throws {AppwriteException}
143
+ * @returns {Promise<Models.AggregationTeamList>}
144
+ * @deprecated Use the object parameter style method for a better developer experience.
145
+ */
146
+ listAggregations(organizationId: string, queries?: string[]): Promise<Models.AggregationTeamList>;
147
+ /**
148
+ * Get a specific aggregation using it's aggregation ID.
149
+ *
150
+ * @param {string} params.organizationId - Organization ID
151
+ * @param {string} params.aggregationId - Invoice unique ID
152
+ * @throws {AppwriteException}
153
+ * @returns {Promise<Models.AggregationTeam>}
154
+ */
155
+ getAggregation(params: {
156
+ organizationId: string;
157
+ aggregationId: string;
158
+ }): Promise<Models.AggregationTeam>;
159
+ /**
160
+ * Get a specific aggregation using it's aggregation ID.
161
+ *
162
+ * @param {string} organizationId - Organization ID
163
+ * @param {string} aggregationId - Invoice unique ID
164
+ * @throws {AppwriteException}
165
+ * @returns {Promise<Models.AggregationTeam>}
166
+ * @deprecated Use the object parameter style method for a better developer experience.
167
+ */
168
+ getAggregation(organizationId: string, aggregationId: string): Promise<Models.AggregationTeam>;
169
+ /**
170
+ * Set a billing address for an organization.
171
+ *
172
+ * @param {string} params.organizationId - Organization ID
173
+ * @param {string} params.billingAddressId - Unique ID of billing address
174
+ * @throws {AppwriteException}
175
+ * @returns {Promise<Models.Organization<Preferences>>}
176
+ */
177
+ setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
178
+ organizationId: string;
179
+ billingAddressId: string;
180
+ }): Promise<Models.Organization<Preferences>>;
181
+ /**
182
+ * Set a billing address for an organization.
183
+ *
184
+ * @param {string} organizationId - Organization ID
185
+ * @param {string} billingAddressId - Unique ID of billing address
186
+ * @throws {AppwriteException}
187
+ * @returns {Promise<Models.Organization<Preferences>>}
188
+ * @deprecated Use the object parameter style method for a better developer experience.
189
+ */
190
+ setBillingAddress<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingAddressId: string): Promise<Models.Organization<Preferences>>;
191
+ /**
192
+ * Delete a team's billing address.
193
+ *
194
+ * @param {string} params.organizationId - Organization ID
195
+ * @throws {AppwriteException}
196
+ * @returns {Promise<{}>}
197
+ */
198
+ deleteBillingAddress(params: {
199
+ organizationId: string;
200
+ }): Promise<{}>;
201
+ /**
202
+ * Delete a team's billing address.
203
+ *
204
+ * @param {string} organizationId - Organization ID
205
+ * @throws {AppwriteException}
206
+ * @returns {Promise<{}>}
207
+ * @deprecated Use the object parameter style method for a better developer experience.
208
+ */
209
+ deleteBillingAddress(organizationId: string): Promise<{}>;
210
+ /**
211
+ * Get a billing address using it's ID.
212
+ *
213
+ * @param {string} params.organizationId - Organization ID
214
+ * @param {string} params.billingAddressId - Unique ID of billing address
215
+ * @throws {AppwriteException}
216
+ * @returns {Promise<Models.BillingAddress>}
217
+ */
218
+ getBillingAddress(params: {
219
+ organizationId: string;
220
+ billingAddressId: string;
221
+ }): Promise<Models.BillingAddress>;
222
+ /**
223
+ * Get a billing address using it's ID.
224
+ *
225
+ * @param {string} organizationId - Organization ID
226
+ * @param {string} billingAddressId - Unique ID of billing address
227
+ * @throws {AppwriteException}
228
+ * @returns {Promise<Models.BillingAddress>}
229
+ * @deprecated Use the object parameter style method for a better developer experience.
230
+ */
231
+ getBillingAddress(organizationId: string, billingAddressId: string): Promise<Models.BillingAddress>;
232
+ /**
233
+ * Set the current billing email for the organization.
234
+ *
235
+ * @param {string} params.organizationId - Organization ID
236
+ * @param {string} params.billingEmail - Billing email for the organization.
237
+ * @throws {AppwriteException}
238
+ * @returns {Promise<Models.Organization<Preferences>>}
239
+ */
240
+ setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
241
+ organizationId: string;
242
+ billingEmail: string;
243
+ }): Promise<Models.Organization<Preferences>>;
244
+ /**
245
+ * Set the current billing email for the organization.
246
+ *
247
+ * @param {string} organizationId - Organization ID
248
+ * @param {string} billingEmail - Billing email for the organization.
249
+ * @throws {AppwriteException}
250
+ * @returns {Promise<Models.Organization<Preferences>>}
251
+ * @deprecated Use the object parameter style method for a better developer experience.
252
+ */
253
+ setBillingEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingEmail: string): Promise<Models.Organization<Preferences>>;
254
+ /**
255
+ * Update the budget limit for an organization.
256
+ *
257
+ * @param {string} params.organizationId - Organization Unique ID
258
+ * @param {number} params.budget - Budget limit for additional usage set for the organization
259
+ * @param {number[]} params.alerts - Budget alert limit percentage
260
+ * @throws {AppwriteException}
261
+ * @returns {Promise<Models.Organization<Preferences>>}
262
+ */
263
+ updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
264
+ organizationId: string;
265
+ budget?: number;
266
+ alerts?: number[];
267
+ }): Promise<Models.Organization<Preferences>>;
268
+ /**
269
+ * Update the budget limit for an organization.
270
+ *
271
+ * @param {string} organizationId - Organization Unique ID
272
+ * @param {number} budget - Budget limit for additional usage set for the organization
273
+ * @param {number[]} alerts - Budget alert limit percentage
274
+ * @throws {AppwriteException}
275
+ * @returns {Promise<Models.Organization<Preferences>>}
276
+ * @deprecated Use the object parameter style method for a better developer experience.
277
+ */
278
+ updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, budget?: number, alerts?: number[]): Promise<Models.Organization<Preferences>>;
279
+ /**
280
+ * List all credits for an organization.
281
+ *
282
+ *
283
+ * @param {string} params.organizationId - Organization ID
284
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status
285
+ * @throws {AppwriteException}
286
+ * @returns {Promise<Models.CreditList>}
287
+ */
288
+ listCredits(params: {
289
+ organizationId: string;
290
+ queries?: string[];
291
+ }): Promise<Models.CreditList>;
292
+ /**
293
+ * List all credits for an organization.
294
+ *
295
+ *
296
+ * @param {string} organizationId - Organization ID
297
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status
298
+ * @throws {AppwriteException}
299
+ * @returns {Promise<Models.CreditList>}
300
+ * @deprecated Use the object parameter style method for a better developer experience.
301
+ */
302
+ listCredits(organizationId: string, queries?: string[]): Promise<Models.CreditList>;
303
+ /**
304
+ * Add credit to an organization using a coupon.
305
+ *
306
+ * @param {string} params.organizationId - Organization ID
307
+ * @param {string} params.couponId - ID of the coupon
308
+ * @throws {AppwriteException}
309
+ * @returns {Promise<Models.Credit>}
310
+ */
311
+ addCredit(params: {
312
+ organizationId: string;
313
+ couponId: string;
314
+ }): Promise<Models.Credit>;
315
+ /**
316
+ * Add credit to an organization using a coupon.
317
+ *
318
+ * @param {string} organizationId - Organization ID
319
+ * @param {string} couponId - ID of the coupon
320
+ * @throws {AppwriteException}
321
+ * @returns {Promise<Models.Credit>}
322
+ * @deprecated Use the object parameter style method for a better developer experience.
323
+ */
324
+ addCredit(organizationId: string, couponId: string): Promise<Models.Credit>;
325
+ /**
326
+ * Get total available valid credits for an organization.
327
+ *
328
+ * @param {string} params.organizationId - Organization ID
329
+ * @throws {AppwriteException}
330
+ * @returns {Promise<Models.CreditAvailable>}
331
+ */
332
+ getAvailableCredits(params: {
333
+ organizationId: string;
334
+ }): Promise<Models.CreditAvailable>;
335
+ /**
336
+ * Get total available valid credits for an organization.
337
+ *
338
+ * @param {string} organizationId - Organization ID
339
+ * @throws {AppwriteException}
340
+ * @returns {Promise<Models.CreditAvailable>}
341
+ * @deprecated Use the object parameter style method for a better developer experience.
342
+ */
343
+ getAvailableCredits(organizationId: string): Promise<Models.CreditAvailable>;
344
+ /**
345
+ * Get credit details.
346
+ *
347
+ * @param {string} params.organizationId - Organization ID
348
+ * @param {string} params.creditId - Credit Unique ID
349
+ * @throws {AppwriteException}
350
+ * @returns {Promise<Models.Credit>}
351
+ */
352
+ getCredit(params: {
353
+ organizationId: string;
354
+ creditId: string;
355
+ }): Promise<Models.Credit>;
356
+ /**
357
+ * Get credit details.
358
+ *
359
+ * @param {string} organizationId - Organization ID
360
+ * @param {string} creditId - Credit Unique ID
361
+ * @throws {AppwriteException}
362
+ * @returns {Promise<Models.Credit>}
363
+ * @deprecated Use the object parameter style method for a better developer experience.
364
+ */
365
+ getCredit(organizationId: string, creditId: string): Promise<Models.Credit>;
366
+ /**
367
+ * Get estimation for deleting an organization.
368
+ *
369
+ * @param {string} params.organizationId - Team ID.
370
+ * @throws {AppwriteException}
371
+ * @returns {Promise<Models.EstimationDeleteOrganization>}
372
+ */
373
+ estimationDeleteOrganization(params: {
374
+ organizationId: string;
375
+ }): Promise<Models.EstimationDeleteOrganization>;
376
+ /**
377
+ * Get estimation for deleting an organization.
378
+ *
379
+ * @param {string} organizationId - Team ID.
380
+ * @throws {AppwriteException}
381
+ * @returns {Promise<Models.EstimationDeleteOrganization>}
382
+ * @deprecated Use the object parameter style method for a better developer experience.
383
+ */
384
+ estimationDeleteOrganization(organizationId: string): Promise<Models.EstimationDeleteOrganization>;
385
+ /**
386
+ * Get estimation for updating the organization plan.
387
+ *
388
+ * @param {string} params.organizationId - Organization ID
389
+ * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
390
+ * @param {string[]} params.invites - Additional member invites
391
+ * @param {string} params.couponId - Coupon id
392
+ * @throws {AppwriteException}
393
+ * @returns {Promise<Models.EstimationUpdatePlan>}
394
+ */
395
+ estimationUpdatePlan(params: {
396
+ organizationId: string;
397
+ billingPlan: BillingPlan;
398
+ invites?: string[];
399
+ couponId?: string;
400
+ }): Promise<Models.EstimationUpdatePlan>;
401
+ /**
402
+ * Get estimation for updating the organization plan.
403
+ *
404
+ * @param {string} organizationId - Organization ID
405
+ * @param {BillingPlan} billingPlan - Organization billing plan chosen
406
+ * @param {string[]} invites - Additional member invites
407
+ * @param {string} couponId - Coupon id
408
+ * @throws {AppwriteException}
409
+ * @returns {Promise<Models.EstimationUpdatePlan>}
410
+ * @deprecated Use the object parameter style method for a better developer experience.
411
+ */
412
+ estimationUpdatePlan(organizationId: string, billingPlan: BillingPlan, invites?: string[], couponId?: string): Promise<Models.EstimationUpdatePlan>;
413
+ /**
414
+ * List all invoices for an organization.
415
+ *
416
+ * @param {string} params.organizationId - Organization ID
417
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
418
+ * @throws {AppwriteException}
419
+ * @returns {Promise<Models.InvoiceList>}
420
+ */
421
+ listInvoices(params: {
422
+ organizationId: string;
423
+ queries?: string[];
424
+ }): Promise<Models.InvoiceList>;
425
+ /**
426
+ * List all invoices for an organization.
427
+ *
428
+ * @param {string} organizationId - Organization ID
429
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
430
+ * @throws {AppwriteException}
431
+ * @returns {Promise<Models.InvoiceList>}
432
+ * @deprecated Use the object parameter style method for a better developer experience.
433
+ */
434
+ listInvoices(organizationId: string, queries?: string[]): Promise<Models.InvoiceList>;
435
+ /**
436
+ * Get an invoice by its unique ID.
437
+ *
438
+ * @param {string} params.organizationId - Organization ID
439
+ * @param {string} params.invoiceId - Invoice unique ID
440
+ * @throws {AppwriteException}
441
+ * @returns {Promise<Models.Invoice>}
442
+ */
443
+ getInvoice(params: {
444
+ organizationId: string;
445
+ invoiceId: string;
446
+ }): Promise<Models.Invoice>;
447
+ /**
448
+ * Get an invoice by its unique ID.
449
+ *
450
+ * @param {string} organizationId - Organization ID
451
+ * @param {string} invoiceId - Invoice unique ID
452
+ * @throws {AppwriteException}
453
+ * @returns {Promise<Models.Invoice>}
454
+ * @deprecated Use the object parameter style method for a better developer experience.
455
+ */
456
+ getInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice>;
457
+ /**
458
+ * Download invoice in PDF
459
+ *
460
+ * @param {string} params.organizationId - Organization ID
461
+ * @param {string} params.invoiceId - Invoice unique ID
462
+ * @throws {AppwriteException}
463
+ * @returns {Promise<Models.PaymentMethod>}
464
+ */
465
+ getInvoiceDownload(params: {
466
+ organizationId: string;
467
+ invoiceId: string;
468
+ }): Promise<Models.PaymentMethod>;
469
+ /**
470
+ * Download invoice in PDF
471
+ *
472
+ * @param {string} organizationId - Organization ID
473
+ * @param {string} invoiceId - Invoice unique ID
474
+ * @throws {AppwriteException}
475
+ * @returns {Promise<Models.PaymentMethod>}
476
+ * @deprecated Use the object parameter style method for a better developer experience.
477
+ */
478
+ getInvoiceDownload(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
479
+ /**
480
+ * Initiate payment for failed invoice to pay live from console
481
+ *
482
+ * @param {string} params.organizationId - Organization ID
483
+ * @param {string} params.invoiceId - Invoice unique ID
484
+ * @param {string} params.paymentMethodId - Payment method ID
485
+ * @throws {AppwriteException}
486
+ * @returns {Promise<Models.Invoice>}
487
+ */
488
+ createInvoicePayment(params: {
489
+ organizationId: string;
490
+ invoiceId: string;
491
+ paymentMethodId: string;
492
+ }): Promise<Models.Invoice>;
493
+ /**
494
+ * Initiate payment for failed invoice to pay live from console
495
+ *
496
+ * @param {string} organizationId - Organization ID
497
+ * @param {string} invoiceId - Invoice unique ID
498
+ * @param {string} paymentMethodId - Payment method ID
499
+ * @throws {AppwriteException}
500
+ * @returns {Promise<Models.Invoice>}
501
+ * @deprecated Use the object parameter style method for a better developer experience.
502
+ */
503
+ createInvoicePayment(organizationId: string, invoiceId: string, paymentMethodId: string): Promise<Models.Invoice>;
504
+ /**
505
+ * Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
506
+ *
507
+ * @param {string} params.organizationId - Organization ID
508
+ * @param {string} params.invoiceId - Invoice unique ID
509
+ * @throws {AppwriteException}
510
+ * @returns {Promise<Models.Invoice>}
511
+ */
512
+ validateInvoice(params: {
513
+ organizationId: string;
514
+ invoiceId: string;
515
+ }): Promise<Models.Invoice>;
516
+ /**
517
+ * Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
518
+ *
519
+ * @param {string} organizationId - Organization ID
520
+ * @param {string} invoiceId - Invoice unique ID
521
+ * @throws {AppwriteException}
522
+ * @returns {Promise<Models.Invoice>}
523
+ * @deprecated Use the object parameter style method for a better developer experience.
524
+ */
525
+ validateInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice>;
526
+ /**
527
+ * View invoice in PDF
528
+ *
529
+ * @param {string} params.organizationId - Organization ID
530
+ * @param {string} params.invoiceId - Invoice unique ID
531
+ * @throws {AppwriteException}
532
+ * @returns {Promise<Models.PaymentMethod>}
533
+ */
534
+ getInvoiceView(params: {
535
+ organizationId: string;
536
+ invoiceId: string;
537
+ }): Promise<Models.PaymentMethod>;
538
+ /**
539
+ * View invoice in PDF
540
+ *
541
+ * @param {string} organizationId - Organization ID
542
+ * @param {string} invoiceId - Invoice unique ID
543
+ * @throws {AppwriteException}
544
+ * @returns {Promise<Models.PaymentMethod>}
545
+ * @deprecated Use the object parameter style method for a better developer experience.
546
+ */
547
+ getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
548
+ /**
549
+ * Set a organization's default payment method.
550
+ *
551
+ * @param {string} params.organizationId - Organization ID
552
+ * @param {string} params.paymentMethodId - Unique ID of payment method
553
+ * @throws {AppwriteException}
554
+ * @returns {Promise<Models.Organization<Preferences>>}
555
+ */
556
+ setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
557
+ organizationId: string;
558
+ paymentMethodId: string;
559
+ }): Promise<Models.Organization<Preferences>>;
560
+ /**
561
+ * Set a organization's default payment method.
562
+ *
563
+ * @param {string} organizationId - Organization ID
564
+ * @param {string} paymentMethodId - Unique ID of payment method
565
+ * @throws {AppwriteException}
566
+ * @returns {Promise<Models.Organization<Preferences>>}
567
+ * @deprecated Use the object parameter style method for a better developer experience.
568
+ */
569
+ setDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
570
+ /**
571
+ * Delete the default payment method for an organization.
572
+ *
573
+ * @param {string} params.organizationId - Organization ID
574
+ * @throws {AppwriteException}
575
+ * @returns {Promise<Models.Organization<Preferences>>}
576
+ */
577
+ deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
578
+ organizationId: string;
579
+ }): Promise<Models.Organization<Preferences>>;
580
+ /**
581
+ * Delete the default payment method for an organization.
582
+ *
583
+ * @param {string} organizationId - Organization ID
584
+ * @throws {AppwriteException}
585
+ * @returns {Promise<Models.Organization<Preferences>>}
586
+ * @deprecated Use the object parameter style method for a better developer experience.
587
+ */
588
+ deleteDefaultPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
589
+ /**
590
+ * Set an organization's backup payment method.
591
+ *
592
+ *
593
+ * @param {string} params.organizationId - Organization ID
594
+ * @param {string} params.paymentMethodId - Unique ID of payment method
595
+ * @throws {AppwriteException}
596
+ * @returns {Promise<Models.Organization<Preferences>>}
597
+ */
598
+ setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
599
+ organizationId: string;
600
+ paymentMethodId: string;
601
+ }): Promise<Models.Organization<Preferences>>;
602
+ /**
603
+ * Set an organization's backup payment method.
604
+ *
605
+ *
606
+ * @param {string} organizationId - Organization ID
607
+ * @param {string} paymentMethodId - Unique ID of payment method
608
+ * @throws {AppwriteException}
609
+ * @returns {Promise<Models.Organization<Preferences>>}
610
+ * @deprecated Use the object parameter style method for a better developer experience.
611
+ */
612
+ setBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
613
+ /**
614
+ * Delete a backup payment method for an organization.
615
+ *
616
+ * @param {string} params.organizationId - Organization ID
617
+ * @throws {AppwriteException}
618
+ * @returns {Promise<Models.Organization<Preferences>>}
619
+ */
620
+ deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
621
+ organizationId: string;
622
+ }): Promise<Models.Organization<Preferences>>;
623
+ /**
624
+ * Delete a backup payment method for an organization.
625
+ *
626
+ * @param {string} organizationId - Organization ID
627
+ * @throws {AppwriteException}
628
+ * @returns {Promise<Models.Organization<Preferences>>}
629
+ * @deprecated Use the object parameter style method for a better developer experience.
630
+ */
631
+ deleteBackupPaymentMethod<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
632
+ /**
633
+ * Get an organization's payment method using it's payment method ID.
634
+ *
635
+ * @param {string} params.organizationId - Organization ID
636
+ * @param {string} params.paymentMethodId - Unique ID of payment method
637
+ * @throws {AppwriteException}
638
+ * @returns {Promise<Models.PaymentMethod>}
639
+ */
640
+ getPaymentMethod(params: {
641
+ organizationId: string;
642
+ paymentMethodId: string;
643
+ }): Promise<Models.PaymentMethod>;
644
+ /**
645
+ * Get an organization's payment method using it's payment method ID.
646
+ *
647
+ * @param {string} organizationId - Organization ID
648
+ * @param {string} paymentMethodId - Unique ID of payment method
649
+ * @throws {AppwriteException}
650
+ * @returns {Promise<Models.PaymentMethod>}
651
+ * @deprecated Use the object parameter style method for a better developer experience.
652
+ */
653
+ getPaymentMethod(organizationId: string, paymentMethodId: string): Promise<Models.PaymentMethod>;
654
+ /**
655
+ * Get the details of the current billing plan for an organization.
656
+ *
657
+ * @param {string} params.organizationId - Organization Unique ID
658
+ * @throws {AppwriteException}
659
+ * @returns {Promise<Models.BillingPlan>}
660
+ */
661
+ getPlan(params: {
662
+ organizationId: string;
663
+ }): Promise<Models.BillingPlan>;
664
+ /**
665
+ * Get the details of the current billing plan for an organization.
666
+ *
667
+ * @param {string} organizationId - Organization Unique ID
668
+ * @throws {AppwriteException}
669
+ * @returns {Promise<Models.BillingPlan>}
670
+ * @deprecated Use the object parameter style method for a better developer experience.
671
+ */
672
+ getPlan(organizationId: string): Promise<Models.BillingPlan>;
673
+ /**
674
+ * Update the billing plan for an organization.
675
+ *
676
+ * @param {string} params.organizationId - Organization Unique ID
677
+ * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
678
+ * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
679
+ * @param {string} params.billingAddressId - Unique ID of billing address
680
+ * @param {string[]} params.invites - Additional member invites
681
+ * @param {string} params.couponId - Coupon id
682
+ * @param {string} params.taxId - Tax Id associated to billing.
683
+ * @param {number} params.budget - Budget limit for additional usage set for the organization
684
+ * @throws {AppwriteException}
685
+ * @returns {Promise<Models.Organization<Preferences>>}
686
+ */
687
+ updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
688
+ organizationId: string;
689
+ billingPlan: BillingPlan;
690
+ paymentMethodId?: string;
691
+ billingAddressId?: string;
692
+ invites?: string[];
693
+ couponId?: string;
694
+ taxId?: string;
695
+ budget?: number;
696
+ }): Promise<Models.Organization<Preferences>>;
697
+ /**
698
+ * Update the billing plan for an organization.
699
+ *
700
+ * @param {string} organizationId - Organization Unique ID
701
+ * @param {BillingPlan} billingPlan - Organization billing plan chosen
702
+ * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
703
+ * @param {string} billingAddressId - Unique ID of billing address
704
+ * @param {string[]} invites - Additional member invites
705
+ * @param {string} couponId - Coupon id
706
+ * @param {string} taxId - Tax Id associated to billing.
707
+ * @param {number} budget - Budget limit for additional usage set for the organization
708
+ * @throws {AppwriteException}
709
+ * @returns {Promise<Models.Organization<Preferences>>}
710
+ * @deprecated Use the object parameter style method for a better developer experience.
711
+ */
712
+ updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
713
+ /**
714
+ * Cancel the downgrade initiated for an organization.
715
+ *
716
+ * @param {string} params.organizationId - Organization Unique ID
717
+ * @throws {AppwriteException}
718
+ * @returns {Promise<Models.Organization<Preferences>>}
719
+ */
720
+ cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
721
+ organizationId: string;
722
+ }): Promise<Models.Organization<Preferences>>;
723
+ /**
724
+ * Cancel the downgrade initiated for an organization.
725
+ *
726
+ * @param {string} organizationId - Organization Unique ID
727
+ * @throws {AppwriteException}
728
+ * @returns {Promise<Models.Organization<Preferences>>}
729
+ * @deprecated Use the object parameter style method for a better developer experience.
730
+ */
731
+ cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
732
+ /**
733
+ * Update selected projects to keep in the organization.
734
+ *
735
+ * @param {string} params.organizationId - Organization Unique ID
736
+ * @param {string[]} params.projects - List of project IDs to be selected for the organization
737
+ * @throws {AppwriteException}
738
+ * @returns {Promise<Models.Organization<Preferences>>}
739
+ */
740
+ updateProjects<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
741
+ organizationId: string;
742
+ projects?: string[];
743
+ }): Promise<Models.Organization<Preferences>>;
744
+ /**
745
+ * Update selected projects to keep in the organization.
746
+ *
747
+ * @param {string} organizationId - Organization Unique ID
748
+ * @param {string[]} projects - List of project IDs to be selected for the organization
749
+ * @throws {AppwriteException}
750
+ * @returns {Promise<Models.Organization<Preferences>>}
751
+ * @deprecated Use the object parameter style method for a better developer experience.
752
+ */
753
+ updateProjects<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, projects?: string[]): Promise<Models.Organization<Preferences>>;
754
+ /**
755
+ * Get Scopes
756
+ *
757
+ * @param {string} params.organizationId - Organization id
758
+ * @throws {AppwriteException}
759
+ * @returns {Promise<Models.Roles>}
760
+ */
761
+ getScopes(params: {
762
+ organizationId: string;
763
+ }): Promise<Models.Roles>;
764
+ /**
765
+ * Get Scopes
766
+ *
767
+ * @param {string} organizationId - Organization id
768
+ * @throws {AppwriteException}
769
+ * @returns {Promise<Models.Roles>}
770
+ * @deprecated Use the object parameter style method for a better developer experience.
771
+ */
772
+ getScopes(organizationId: string): Promise<Models.Roles>;
773
+ /**
774
+ * Set an organization's billing tax ID.
775
+ *
776
+ * @param {string} params.organizationId - Organization ID
777
+ * @param {string} params.taxId - Tax Id associated to billing.
778
+ * @throws {AppwriteException}
779
+ * @returns {Promise<Models.Organization<Preferences>>}
780
+ */
781
+ setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
782
+ organizationId: string;
783
+ taxId: string;
784
+ }): Promise<Models.Organization<Preferences>>;
785
+ /**
786
+ * Set an organization's billing tax ID.
787
+ *
788
+ * @param {string} organizationId - Organization ID
789
+ * @param {string} taxId - Tax Id associated to billing.
790
+ * @throws {AppwriteException}
791
+ * @returns {Promise<Models.Organization<Preferences>>}
792
+ * @deprecated Use the object parameter style method for a better developer experience.
793
+ */
794
+ setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, taxId: string): Promise<Models.Organization<Preferences>>;
795
+ /**
796
+ * Get the usage data for an organization.
797
+ *
798
+ * @param {string} params.organizationId - Organization ID
799
+ * @param {string} params.startDate - Starting date for the usage
800
+ * @param {string} params.endDate - End date for the usage
801
+ * @throws {AppwriteException}
802
+ * @returns {Promise<Models.UsageOrganization>}
803
+ */
804
+ getUsage(params: {
805
+ organizationId: string;
806
+ startDate?: string;
807
+ endDate?: string;
808
+ }): Promise<Models.UsageOrganization>;
809
+ /**
810
+ * Get the usage data for an organization.
811
+ *
812
+ * @param {string} organizationId - Organization ID
813
+ * @param {string} startDate - Starting date for the usage
814
+ * @param {string} endDate - End date for the usage
815
+ * @throws {AppwriteException}
816
+ * @returns {Promise<Models.UsageOrganization>}
817
+ * @deprecated Use the object parameter style method for a better developer experience.
818
+ */
819
+ getUsage(organizationId: string, startDate?: string, endDate?: string): Promise<Models.UsageOrganization>;
820
+ /**
821
+ * Validate payment for team after creation or upgrade.
822
+ *
823
+ * @param {string} params.organizationId - Organization ID
824
+ * @param {string[]} params.invites - Additional member invites
825
+ * @throws {AppwriteException}
826
+ * @returns {Promise<Models.Organization<Preferences>>}
827
+ */
828
+ validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
829
+ organizationId: string;
830
+ invites?: string[];
831
+ }): Promise<Models.Organization<Preferences>>;
832
+ /**
833
+ * Validate payment for team after creation or upgrade.
834
+ *
835
+ * @param {string} organizationId - Organization ID
836
+ * @param {string[]} invites - Additional member invites
837
+ * @throws {AppwriteException}
838
+ * @returns {Promise<Models.Organization<Preferences>>}
839
+ * @deprecated Use the object parameter style method for a better developer experience.
840
+ */
841
+ validatePayment<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, invites?: string[]): Promise<Models.Organization<Preferences>>;
842
+ }