@appwrite.io/console 1.5.1 → 1.6.0

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 (66) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/sdk.js +7714 -9758
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +7714 -9758
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +7714 -9758
  7. package/docs/examples/databases/update-float-attribute.md +2 -2
  8. package/docs/examples/databases/update-integer-attribute.md +2 -2
  9. package/docs/examples/health/{get-queue-usage-count.md → get-queue-stats-resources.md} +1 -1
  10. package/docs/examples/health/{get-queue-usage-dump.md → get-queue-stats-usage-dump.md} +1 -1
  11. package/docs/examples/organizations/create.md +5 -1
  12. package/docs/examples/organizations/update-plan.md +5 -1
  13. package/docs/examples/organizations/validate-invoice.md +14 -0
  14. package/package.json +1 -1
  15. package/src/client.ts +21 -4
  16. package/src/enums/credit-card.ts +1 -0
  17. package/src/enums/name.ts +3 -2
  18. package/src/enums/o-auth-provider.ts +1 -0
  19. package/src/enums/runtime.ts +3 -0
  20. package/src/models.ts +202 -5
  21. package/src/services/account.ts +126 -430
  22. package/src/services/assistant.ts +2 -7
  23. package/src/services/avatars.ts +7 -21
  24. package/src/services/backups.ts +24 -84
  25. package/src/services/console.ts +14 -49
  26. package/src/services/databases.ts +99 -350
  27. package/src/services/functions.ts +55 -192
  28. package/src/services/graphql.ts +4 -14
  29. package/src/services/health.ts +55 -207
  30. package/src/services/locale.ts +16 -56
  31. package/src/services/messaging.ts +92 -322
  32. package/src/services/migrations.ts +24 -84
  33. package/src/services/organizations.ts +118 -196
  34. package/src/services/project.ts +12 -42
  35. package/src/services/projects.ts +92 -322
  36. package/src/services/proxy.ts +10 -35
  37. package/src/services/storage.ts +27 -93
  38. package/src/services/teams.ts +28 -98
  39. package/src/services/users.ts +86 -301
  40. package/src/services/vcs.ts +20 -70
  41. package/types/enums/credit-card.d.ts +2 -1
  42. package/types/enums/name.d.ts +3 -2
  43. package/types/enums/o-auth-provider.d.ts +1 -0
  44. package/types/enums/runtime.d.ts +3 -0
  45. package/types/models.d.ts +202 -5
  46. package/types/services/account.d.ts +4 -128
  47. package/types/services/assistant.d.ts +0 -2
  48. package/types/services/avatars.d.ts +0 -14
  49. package/types/services/backups.d.ts +0 -24
  50. package/types/services/console.d.ts +0 -14
  51. package/types/services/databases.d.ts +5 -100
  52. package/types/services/functions.d.ts +0 -56
  53. package/types/services/graphql.d.ts +0 -4
  54. package/types/services/health.d.ts +5 -64
  55. package/types/services/locale.d.ts +0 -16
  56. package/types/services/messaging.d.ts +0 -92
  57. package/types/services/migrations.d.ts +0 -24
  58. package/types/services/organizations.d.ts +21 -60
  59. package/types/services/project.d.ts +0 -12
  60. package/types/services/projects.d.ts +0 -92
  61. package/types/services/proxy.d.ts +0 -10
  62. package/types/services/storage.d.ts +0 -30
  63. package/types/services/teams.d.ts +0 -28
  64. package/types/services/users.d.ts +0 -86
  65. package/types/services/vcs.d.ts +0 -20
  66. package/docs/examples/health/get-queue.md +0 -11
@@ -5,8 +5,6 @@ export declare class Organizations {
5
5
  client: Client;
6
6
  constructor(client: Client);
7
7
  /**
8
- * List Orgnizations
9
- *
10
8
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
11
9
  *
12
10
  * @param {string[]} queries
@@ -16,8 +14,6 @@ export declare class Organizations {
16
14
  */
17
15
  list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.OrganizationList<Preferences>>;
18
16
  /**
19
- * Create Organization
20
- *
21
17
  * Create a new organization.
22
18
 
23
19
  *
@@ -26,13 +22,15 @@ export declare class Organizations {
26
22
  * @param {BillingPlan} billingPlan
27
23
  * @param {string} paymentMethodId
28
24
  * @param {string} billingAddressId
25
+ * @param {string[]} invites
26
+ * @param {string} couponId
27
+ * @param {string} taxId
28
+ * @param {number} budget
29
29
  * @throws {AppwriteException}
30
30
  * @returns {Promise<Models.Organization<Preferences>>}
31
31
  */
32
- create<Preferences extends Models.Preferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string): Promise<Models.Organization<Preferences>>;
32
+ create<Preferences extends Models.Preferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
33
33
  /**
34
- * Delete team
35
- *
36
34
  * Delete an organization.
37
35
  *
38
36
  * @param {string} organizationId
@@ -41,8 +39,6 @@ export declare class Organizations {
41
39
  */
42
40
  delete(organizationId: string): Promise<{}>;
43
41
  /**
44
- * List aggregations
45
- *
46
42
  * Get a list of all aggregations for an organization.
47
43
  *
48
44
  * @param {string} organizationId
@@ -52,19 +48,15 @@ export declare class Organizations {
52
48
  */
53
49
  listAggregations(organizationId: string, queries?: string[]): Promise<Models.AggregationTeamList>;
54
50
  /**
55
- * Get invoice
56
- *
57
51
  * Get a specific aggregation using it&#039;s aggregation ID.
58
52
  *
59
53
  * @param {string} organizationId
60
54
  * @param {string} aggregationId
61
55
  * @throws {AppwriteException}
62
- * @returns {Promise<Models.Invoice>}
56
+ * @returns {Promise<Models.AggregationTeam>}
63
57
  */
64
- getAggregation(organizationId: string, aggregationId: string): Promise<Models.Invoice>;
58
+ getAggregation(organizationId: string, aggregationId: string): Promise<Models.AggregationTeam>;
65
59
  /**
66
- * Set team&#039;s billing address
67
- *
68
60
  * Set a billing address for an organization.
69
61
  *
70
62
  * @param {string} organizationId
@@ -74,8 +66,6 @@ export declare class Organizations {
74
66
  */
75
67
  setBillingAddress<Preferences extends Models.Preferences>(organizationId: string, billingAddressId: string): Promise<Models.Organization<Preferences>>;
76
68
  /**
77
- * Delete team&#039;s billing address
78
- *
79
69
  * Delete a team&#039;s billing address.
80
70
  *
81
71
  * @param {string} organizationId
@@ -84,8 +74,6 @@ export declare class Organizations {
84
74
  */
85
75
  deleteBillingAddress(organizationId: string): Promise<{}>;
86
76
  /**
87
- * Get billing address
88
- *
89
77
  * Get a billing address using it&#039;s ID.
90
78
  *
91
79
  * @param {string} organizationId
@@ -95,8 +83,6 @@ export declare class Organizations {
95
83
  */
96
84
  getBillingAddress(organizationId: string, billingAddressId: string): Promise<Models.BillingAddress>;
97
85
  /**
98
- * Set team&#039;s billing email
99
- *
100
86
  * Set the current billing email for the organization.
101
87
  *
102
88
  * @param {string} organizationId
@@ -106,8 +92,6 @@ export declare class Organizations {
106
92
  */
107
93
  setBillingEmail<Preferences extends Models.Preferences>(organizationId: string, billingEmail: string): Promise<Models.Organization<Preferences>>;
108
94
  /**
109
- * Update organization budget
110
- *
111
95
  * Update the budget limit for an organization.
112
96
  *
113
97
  * @param {string} organizationId
@@ -116,10 +100,8 @@ export declare class Organizations {
116
100
  * @throws {AppwriteException}
117
101
  * @returns {Promise<Models.Organization<Preferences>>}
118
102
  */
119
- updateBudget<Preferences extends Models.Preferences>(organizationId: string, budget: number, alerts?: number[]): Promise<Models.Organization<Preferences>>;
103
+ updateBudget<Preferences extends Models.Preferences>(organizationId: string, budget?: number, alerts?: number[]): Promise<Models.Organization<Preferences>>;
120
104
  /**
121
- * List credits
122
- *
123
105
  * List all credits for an organization.
124
106
 
125
107
  *
@@ -130,8 +112,6 @@ export declare class Organizations {
130
112
  */
131
113
  listCredits(organizationId: string, queries?: string[]): Promise<Models.CreditList>;
132
114
  /**
133
- * Add credits from coupon
134
- *
135
115
  * Add credit to an organization using a coupon.
136
116
  *
137
117
  * @param {string} organizationId
@@ -141,8 +121,6 @@ export declare class Organizations {
141
121
  */
142
122
  addCredit(organizationId: string, couponId: string): Promise<Models.Credit>;
143
123
  /**
144
- * Get credit details
145
- *
146
124
  * Get credit details.
147
125
  *
148
126
  * @param {string} organizationId
@@ -152,8 +130,6 @@ export declare class Organizations {
152
130
  */
153
131
  getCredit(organizationId: string, creditId: string): Promise<Models.Credit>;
154
132
  /**
155
- * List invoices
156
- *
157
133
  * List all invoices for an organization.
158
134
  *
159
135
  * @param {string} organizationId
@@ -163,8 +139,6 @@ export declare class Organizations {
163
139
  */
164
140
  listInvoices(organizationId: string, queries?: string[]): Promise<Models.InvoiceList>;
165
141
  /**
166
- * Get invoice
167
- *
168
142
  * Get an invoice by its unique ID.
169
143
  *
170
144
  * @param {string} organizationId
@@ -174,8 +148,6 @@ export declare class Organizations {
174
148
  */
175
149
  getInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice>;
176
150
  /**
177
- * Download invoice in PDF
178
- *
179
151
  * Download invoice in PDF
180
152
  *
181
153
  * @param {string} organizationId
@@ -185,8 +157,6 @@ export declare class Organizations {
185
157
  */
186
158
  getInvoiceDownload(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
187
159
  /**
188
- * Initiate payment for failed invoice to pay live from console
189
- *
190
160
  * Initiate payment for failed invoice to pay live from console
191
161
  *
192
162
  * @param {string} organizationId
@@ -197,8 +167,15 @@ export declare class Organizations {
197
167
  */
198
168
  createInvoicePayment(organizationId: string, invoiceId: string, paymentMethodId: string): Promise<Models.Invoice>;
199
169
  /**
200
- * View invoice in PDF
170
+ * Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
201
171
  *
172
+ * @param {string} organizationId
173
+ * @param {string} invoiceId
174
+ * @throws {AppwriteException}
175
+ * @returns {Promise<Models.Invoice>}
176
+ */
177
+ validateInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice>;
178
+ /**
202
179
  * View invoice in PDF
203
180
  *
204
181
  * @param {string} organizationId
@@ -208,8 +185,6 @@ export declare class Organizations {
208
185
  */
209
186
  getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
210
187
  /**
211
- * Set team&#039;s payment method
212
- *
213
188
  * Set a organization&#039;s default payment method.
214
189
  *
215
190
  * @param {string} organizationId
@@ -219,8 +194,6 @@ export declare class Organizations {
219
194
  */
220
195
  setDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
221
196
  /**
222
- * Delete team&#039;s default payment method
223
- *
224
197
  * Delete the default payment method for an organization.
225
198
  *
226
199
  * @param {string} organizationId
@@ -229,8 +202,6 @@ export declare class Organizations {
229
202
  */
230
203
  deleteDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
231
204
  /**
232
- * Set team&#039;s backup payment method
233
- *
234
205
  * Set an organization&#039;s backup payment method.
235
206
 
236
207
  *
@@ -241,8 +212,6 @@ export declare class Organizations {
241
212
  */
242
213
  setBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
243
214
  /**
244
- * Delete team&#039;s backup payment method
245
- *
246
215
  * Delete a backup payment method for an organization.
247
216
  *
248
217
  * @param {string} organizationId
@@ -251,8 +220,6 @@ export declare class Organizations {
251
220
  */
252
221
  deleteBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
253
222
  /**
254
- * Get payment method
255
- *
256
223
  * Get an organization&#039;s payment method using it&#039;s payment method ID.
257
224
  *
258
225
  * @param {string} organizationId
@@ -262,8 +229,6 @@ export declare class Organizations {
262
229
  */
263
230
  getPaymentMethod(organizationId: string, paymentMethodId: string): Promise<Models.PaymentMethod>;
264
231
  /**
265
- * Get organization billing plan details
266
- *
267
232
  * Get the details of the current billing plan for an organization.
268
233
  *
269
234
  * @param {string} organizationId
@@ -272,21 +237,21 @@ export declare class Organizations {
272
237
  */
273
238
  getPlan(organizationId: string): Promise<Models.BillingPlan>;
274
239
  /**
275
- * Update organization billing plan
276
- *
277
240
  * Update the billing plan for an organization.
278
241
  *
279
242
  * @param {string} organizationId
280
243
  * @param {BillingPlan} billingPlan
281
244
  * @param {string} paymentMethodId
282
245
  * @param {string} billingAddressId
246
+ * @param {string[]} invites
247
+ * @param {string} couponId
248
+ * @param {string} taxId
249
+ * @param {number} budget
283
250
  * @throws {AppwriteException}
284
251
  * @returns {Promise<Models.Organization<Preferences>>}
285
252
  */
286
- updatePlan<Preferences extends Models.Preferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string): Promise<Models.Organization<Preferences>>;
253
+ updatePlan<Preferences extends Models.Preferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
287
254
  /**
288
- * Get Scopes
289
- *
290
255
  * Get Scopes
291
256
  *
292
257
  * @param {string} organizationId
@@ -295,8 +260,6 @@ export declare class Organizations {
295
260
  */
296
261
  getScopes(organizationId: string): Promise<Models.Roles>;
297
262
  /**
298
- * Set team&#039;s tax Id
299
- *
300
263
  * Set an organization&#039;s billing tax ID.
301
264
  *
302
265
  * @param {string} organizationId
@@ -306,8 +269,6 @@ export declare class Organizations {
306
269
  */
307
270
  setBillingTaxId<Preferences extends Models.Preferences>(organizationId: string, taxId: string): Promise<Models.Organization<Preferences>>;
308
271
  /**
309
- * Get team&#039;s usage data
310
- *
311
272
  * Get the usage data for an organization.
312
273
  *
313
274
  * @param {string} organizationId
@@ -5,8 +5,6 @@ export declare class Project {
5
5
  client: Client;
6
6
  constructor(client: Client);
7
7
  /**
8
- * Get project usage stats
9
- *
10
8
  * Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.
11
9
  *
12
10
  * @param {string} startDate
@@ -17,8 +15,6 @@ export declare class Project {
17
15
  */
18
16
  getUsage(startDate: string, endDate: string, period?: ProjectUsageRange): Promise<Models.UsageProject>;
19
17
  /**
20
- * List variables
21
- *
22
18
  * Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime.
23
19
  *
24
20
  * @throws {AppwriteException}
@@ -26,8 +22,6 @@ export declare class Project {
26
22
  */
27
23
  listVariables(): Promise<Models.VariableList>;
28
24
  /**
29
- * Create variable
30
- *
31
25
  * Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime.
32
26
  *
33
27
  * @param {string} key
@@ -37,8 +31,6 @@ export declare class Project {
37
31
  */
38
32
  createVariable(key: string, value: string): Promise<Models.Variable>;
39
33
  /**
40
- * Get variable
41
- *
42
34
  * Get a project variable by its unique ID.
43
35
  *
44
36
  * @param {string} variableId
@@ -47,8 +39,6 @@ export declare class Project {
47
39
  */
48
40
  getVariable(variableId: string): Promise<Models.Variable>;
49
41
  /**
50
- * Update variable
51
- *
52
42
  * Update project variable by its unique ID. This variable will be accessible in all Appwrite Functions at runtime.
53
43
  *
54
44
  * @param {string} variableId
@@ -59,8 +49,6 @@ export declare class Project {
59
49
  */
60
50
  updateVariable(variableId: string, key: string, value?: string): Promise<Models.Variable>;
61
51
  /**
62
- * Delete variable
63
- *
64
52
  * Delete a project variable by its unique ID.
65
53
  *
66
54
  * @param {string} variableId