@appwrite.io/console 1.1.0-rc.2 → 1.1.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 (115) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +2196 -3306
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +2197 -3305
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +2196 -3306
  7. package/docs/examples/account/delete-mfa-authenticator.md +1 -2
  8. package/docs/examples/databases/update-boolean-attribute.md +2 -1
  9. package/docs/examples/databases/update-datetime-attribute.md +2 -1
  10. package/docs/examples/databases/update-email-attribute.md +2 -1
  11. package/docs/examples/databases/update-enum-attribute.md +2 -1
  12. package/docs/examples/databases/update-float-attribute.md +2 -1
  13. package/docs/examples/databases/update-integer-attribute.md +2 -1
  14. package/docs/examples/databases/update-ip-attribute.md +2 -1
  15. package/docs/examples/databases/update-relationship-attribute.md +2 -1
  16. package/docs/examples/databases/update-string-attribute.md +3 -1
  17. package/docs/examples/databases/update-url-attribute.md +2 -1
  18. package/docs/examples/functions/create-build.md +1 -1
  19. package/docs/examples/functions/create-execution.md +2 -1
  20. package/docs/examples/functions/create.md +3 -1
  21. package/docs/examples/functions/delete-execution.md +14 -0
  22. package/docs/examples/functions/{download-deployment.md → get-deployment-download.md} +1 -1
  23. package/docs/examples/{account/list-billing-addresses.md → functions/get-template.md} +4 -4
  24. package/docs/examples/{account/create-payment-method.md → functions/list-specifications.md} +3 -3
  25. package/docs/examples/functions/list-templates.md +16 -0
  26. package/docs/examples/functions/update-deployment-build.md +14 -0
  27. package/docs/examples/functions/update.md +3 -1
  28. package/docs/examples/projects/create-j-w-t.md +15 -0
  29. package/docs/examples/projects/update-mock-numbers.md +14 -0
  30. package/docs/examples/projects/update-session-alerts.md +14 -0
  31. package/docs/examples/users/create-j-w-t.md +15 -0
  32. package/docs/examples/vcs/get-repository-contents.md +15 -0
  33. package/package.json +1 -1
  34. package/src/client.ts +2 -2
  35. package/src/enums/email-template-type.ts +2 -0
  36. package/src/enums/platform-type.ts +2 -0
  37. package/src/enums/runtime.ts +1 -0
  38. package/src/index.ts +1 -4
  39. package/src/models.ts +286 -960
  40. package/src/services/account.ts +2 -345
  41. package/src/services/console.ts +0 -120
  42. package/src/services/databases.ts +54 -10
  43. package/src/services/functions.ts +195 -14
  44. package/src/services/projects.ts +110 -1
  45. package/src/services/users.ts +37 -0
  46. package/src/services/vcs.ts +36 -0
  47. package/types/enums/email-template-type.d.ts +3 -1
  48. package/types/enums/platform-type.d.ts +3 -1
  49. package/types/enums/runtime.d.ts +2 -1
  50. package/types/index.d.ts +1 -4
  51. package/types/models.d.ts +286 -960
  52. package/types/services/account.d.ts +1 -105
  53. package/types/services/console.d.ts +0 -38
  54. package/types/services/databases.d.ts +21 -10
  55. package/types/services/functions.d.ts +67 -8
  56. package/types/services/projects.d.ts +32 -1
  57. package/types/services/users.d.ts +12 -0
  58. package/types/services/vcs.d.ts +11 -0
  59. package/docs/examples/account/delete-payment-method.md +0 -13
  60. package/docs/examples/account/get-billing-address.md +0 -13
  61. package/docs/examples/account/get-payment-method.md +0 -13
  62. package/docs/examples/account/list-credits.md +0 -14
  63. package/docs/examples/account/list-invoices.md +0 -13
  64. package/docs/examples/account/list-payment-methods.md +0 -13
  65. package/docs/examples/account/update-payment-method-mandate-options.md +0 -13
  66. package/docs/examples/account/update-payment-method-provider.md +0 -15
  67. package/docs/examples/account/update-payment-method.md +0 -15
  68. package/docs/examples/backups/create-archive.md +0 -14
  69. package/docs/examples/backups/create-policy.md +0 -19
  70. package/docs/examples/backups/create-restoration.md +0 -16
  71. package/docs/examples/backups/delete-archive.md +0 -13
  72. package/docs/examples/backups/delete-policy.md +0 -13
  73. package/docs/examples/backups/get-archive.md +0 -13
  74. package/docs/examples/backups/get-policy.md +0 -13
  75. package/docs/examples/backups/get-restoration.md +0 -13
  76. package/docs/examples/backups/list-archives.md +0 -13
  77. package/docs/examples/backups/list-policies.md +0 -13
  78. package/docs/examples/backups/list-restorations.md +0 -13
  79. package/docs/examples/backups/update-policy.md +0 -17
  80. package/docs/examples/console/create-source.md +0 -17
  81. package/docs/examples/console/get-copon.md +0 -13
  82. package/docs/examples/console/plans.md +0 -11
  83. package/docs/examples/console/regions.md +0 -11
  84. package/docs/examples/organizations/add-credit.md +0 -14
  85. package/docs/examples/organizations/create-invoice-payment.md +0 -15
  86. package/docs/examples/organizations/create.md +0 -17
  87. package/docs/examples/organizations/delete-backup-payment-method.md +0 -13
  88. package/docs/examples/organizations/delete-billing-address.md +0 -13
  89. package/docs/examples/organizations/delete-default-payment-method.md +0 -13
  90. package/docs/examples/organizations/delete.md +0 -13
  91. package/docs/examples/organizations/get-aggregation.md +0 -14
  92. package/docs/examples/organizations/get-billing-address.md +0 -14
  93. package/docs/examples/organizations/get-credit.md +0 -14
  94. package/docs/examples/organizations/get-invoice-download.md +0 -14
  95. package/docs/examples/organizations/get-invoice-view.md +0 -14
  96. package/docs/examples/organizations/get-invoice.md +0 -14
  97. package/docs/examples/organizations/get-payment-method.md +0 -14
  98. package/docs/examples/organizations/get-plan.md +0 -13
  99. package/docs/examples/organizations/get-usage.md +0 -15
  100. package/docs/examples/organizations/list-aggregations.md +0 -14
  101. package/docs/examples/organizations/list-invoices.md +0 -14
  102. package/docs/examples/organizations/list.md +0 -14
  103. package/docs/examples/organizations/set-backup-payment-method.md +0 -14
  104. package/docs/examples/organizations/set-billing-address.md +0 -14
  105. package/docs/examples/organizations/set-billing-email.md +0 -14
  106. package/docs/examples/organizations/set-billing-tax-id.md +0 -14
  107. package/docs/examples/organizations/set-default-payment-method.md +0 -14
  108. package/docs/examples/organizations/update-budget.md +0 -15
  109. package/docs/examples/organizations/update-plan.md +0 -16
  110. package/src/enums/billing-plan.ts +0 -5
  111. package/src/services/backups.ts +0 -425
  112. package/src/services/organizations.ts +0 -896
  113. package/types/enums/billing-plan.d.ts +0 -5
  114. package/types/services/backups.d.ts +0 -128
  115. package/types/services/organizations.d.ts +0 -273
@@ -37,24 +37,6 @@ export declare class Account {
37
37
  * @returns {Promise<{}>}
38
38
  */
39
39
  delete(): Promise<{}>;
40
- /**
41
- * List billing addresses
42
- *
43
- *
44
- * @param {string[]} queries
45
- * @throws {AppwriteException}
46
- * @returns {Promise<Models.BillingAddress>}
47
- */
48
- listBillingAddresses(queries?: string[]): Promise<Models.BillingAddress>;
49
- /**
50
- * Get billing address
51
- *
52
- *
53
- * @param {string} billingAddressId
54
- * @throws {AppwriteException}
55
- * @returns {Promise<Models.BillingAddress>}
56
- */
57
- getBillingAddress(billingAddressId: string): Promise<Models.BillingAddress>;
58
40
  /**
59
41
  * Update email
60
42
  *
@@ -88,15 +70,6 @@ This endpoint can also be used to convert an anonymous account to a normal one,
88
70
  * @returns {Promise<{}>}
89
71
  */
90
72
  deleteIdentity(identityId: string): Promise<{}>;
91
- /**
92
- * List invoices
93
- *
94
- *
95
- * @param {string[]} queries
96
- * @throws {AppwriteException}
97
- * @returns {Promise<Models.InvoiceList>}
98
- */
99
- listInvoices(queries?: string[]): Promise<Models.InvoiceList>;
100
73
  /**
101
74
  * Create JWT
102
75
  *
@@ -153,11 +126,10 @@ This endpoint can also be used to convert an anonymous account to a normal one,
153
126
  * Delete an authenticator for a user by ID.
154
127
  *
155
128
  * @param {AuthenticatorType} type
156
- * @param {string} otp
157
129
  * @throws {AppwriteException}
158
130
  * @returns {Promise<{}>}
159
131
  */
160
- deleteMfaAuthenticator(type: AuthenticatorType, otp: string): Promise<{}>;
132
+ deleteMfaAuthenticator(type: AuthenticatorType): Promise<{}>;
161
133
  /**
162
134
  * Create MFA Challenge
163
135
  *
@@ -236,72 +208,6 @@ This endpoint can also be used to convert an anonymous account to a normal one,
236
208
  * @returns {Promise<Models.User<Preferences>>}
237
209
  */
238
210
  updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
239
- /**
240
- * List payment methods
241
- *
242
- *
243
- * @param {string[]} queries
244
- * @throws {AppwriteException}
245
- * @returns {Promise<Models.PaymentMethodList>}
246
- */
247
- listPaymentMethods(queries?: string[]): Promise<Models.PaymentMethodList>;
248
- /**
249
- * Create new payment method
250
- *
251
- *
252
- * @throws {AppwriteException}
253
- * @returns {Promise<Models.PaymentMethod>}
254
- */
255
- createPaymentMethod(): Promise<Models.PaymentMethod>;
256
- /**
257
- * Get payment method
258
- *
259
- *
260
- * @param {string} paymentMethodId
261
- * @throws {AppwriteException}
262
- * @returns {Promise<Models.PaymentMethod>}
263
- */
264
- getPaymentMethod(paymentMethodId: string): Promise<Models.PaymentMethod>;
265
- /**
266
- * Update payment method
267
- *
268
- *
269
- * @param {string} paymentMethodId
270
- * @param {number} expiryMonth
271
- * @param {number} expiryYear
272
- * @throws {AppwriteException}
273
- * @returns {Promise<Models.PaymentMethod>}
274
- */
275
- updatePaymentMethod(paymentMethodId: string, expiryMonth: number, expiryYear: number): Promise<Models.PaymentMethod>;
276
- /**
277
- * Delete payment method
278
- *
279
- *
280
- * @param {string} paymentMethodId
281
- * @throws {AppwriteException}
282
- * @returns {Promise<{}>}
283
- */
284
- deletePaymentMethod(paymentMethodId: string): Promise<{}>;
285
- /**
286
- * Update payment method provider id
287
- *
288
- *
289
- * @param {string} paymentMethodId
290
- * @param {string} providerMethodId
291
- * @param {string} name
292
- * @throws {AppwriteException}
293
- * @returns {Promise<Models.PaymentMethod>}
294
- */
295
- updatePaymentMethodProvider(paymentMethodId: string, providerMethodId: string, name: string): Promise<Models.PaymentMethod>;
296
- /**
297
- * Update payment method with new setup with mandates for indian cards
298
- *
299
- *
300
- * @param {string} paymentMethodId
301
- * @throws {AppwriteException}
302
- * @returns {Promise<Models.PaymentMethod>}
303
- */
304
- updatePaymentMethodMandateOptions(paymentMethodId: string): Promise<Models.PaymentMethod>;
305
211
  /**
306
212
  * Update phone
307
213
  *
@@ -621,14 +527,4 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
621
527
  * @returns {Promise<Models.Token>}
622
528
  */
623
529
  updatePhoneVerification(userId: string, secret: string): Promise<Models.Token>;
624
- /**
625
- * List credits
626
- *
627
- *
628
- * @param {string} organizationId
629
- * @param {string[]} queries
630
- * @throws {AppwriteException}
631
- * @returns {Promise<Models.CreditList>}
632
- */
633
- listCredits(organizationId: string, queries?: string[]): Promise<Models.CreditList>;
634
530
  }
@@ -3,44 +3,6 @@ import type { Models } from '../models';
3
3
  export declare class Console {
4
4
  client: Client;
5
5
  constructor(client: Client);
6
- /**
7
- * Get coupon details
8
- *
9
- *
10
- * @param {string} couponId
11
- * @throws {AppwriteException}
12
- * @returns {Promise<Models.Coupon>}
13
- */
14
- getCopon(couponId: string): Promise<Models.Coupon>;
15
- /**
16
- * Get plans
17
- *
18
- *
19
- * @throws {AppwriteException}
20
- * @returns {Promise<Models.BillingPlanList>}
21
- */
22
- plans(): Promise<Models.BillingPlanList>;
23
- /**
24
- * Get Regions
25
- *
26
- *
27
- * @throws {AppwriteException}
28
- * @returns {Promise<Models.ConsoleRegionList>}
29
- */
30
- regions(): Promise<Models.ConsoleRegionList>;
31
- /**
32
- * Create source
33
- *
34
- *
35
- * @param {string} ref
36
- * @param {string} referrer
37
- * @param {string} utmSource
38
- * @param {string} utmCampaign
39
- * @param {string} utmMedium
40
- * @throws {AppwriteException}
41
- * @returns {Promise<{}>}
42
- */
43
- createSource(ref?: string, referrer?: string, utmSource?: string, utmCampaign?: string, utmMedium?: string): Promise<{}>;
44
6
  /**
45
7
  * Get variables
46
8
  *
@@ -174,10 +174,11 @@ export declare class Databases {
174
174
  * @param {string} key
175
175
  * @param {boolean} required
176
176
  * @param {boolean} xdefault
177
+ * @param {string} newKey
177
178
  * @throws {AppwriteException}
178
179
  * @returns {Promise<Models.AttributeBoolean>}
179
180
  */
180
- updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean): Promise<Models.AttributeBoolean>;
181
+ updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string): Promise<Models.AttributeBoolean>;
181
182
  /**
182
183
  * Create datetime attribute
183
184
  *
@@ -203,10 +204,11 @@ export declare class Databases {
203
204
  * @param {string} key
204
205
  * @param {boolean} required
205
206
  * @param {string} xdefault
207
+ * @param {string} newKey
206
208
  * @throws {AppwriteException}
207
209
  * @returns {Promise<Models.AttributeDatetime>}
208
210
  */
209
- updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeDatetime>;
211
+ updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeDatetime>;
210
212
  /**
211
213
  * Create email attribute
212
214
  *
@@ -234,10 +236,11 @@ export declare class Databases {
234
236
  * @param {string} key
235
237
  * @param {boolean} required
236
238
  * @param {string} xdefault
239
+ * @param {string} newKey
237
240
  * @throws {AppwriteException}
238
241
  * @returns {Promise<Models.AttributeEmail>}
239
242
  */
240
- updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeEmail>;
243
+ updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEmail>;
241
244
  /**
242
245
  * Create enum attribute
243
246
  *
@@ -267,10 +270,11 @@ export declare class Databases {
267
270
  * @param {string[]} elements
268
271
  * @param {boolean} required
269
272
  * @param {string} xdefault
273
+ * @param {string} newKey
270
274
  * @throws {AppwriteException}
271
275
  * @returns {Promise<Models.AttributeEnum>}
272
276
  */
273
- updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string): Promise<Models.AttributeEnum>;
277
+ updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEnum>;
274
278
  /**
275
279
  * Create float attribute
276
280
  *
@@ -302,10 +306,11 @@ export declare class Databases {
302
306
  * @param {number} min
303
307
  * @param {number} max
304
308
  * @param {number} xdefault
309
+ * @param {string} newKey
305
310
  * @throws {AppwriteException}
306
311
  * @returns {Promise<Models.AttributeFloat>}
307
312
  */
308
- updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeFloat>;
313
+ updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeFloat>;
309
314
  /**
310
315
  * Create integer attribute
311
316
  *
@@ -337,10 +342,11 @@ export declare class Databases {
337
342
  * @param {number} min
338
343
  * @param {number} max
339
344
  * @param {number} xdefault
345
+ * @param {string} newKey
340
346
  * @throws {AppwriteException}
341
347
  * @returns {Promise<Models.AttributeInteger>}
342
348
  */
343
- updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number): Promise<Models.AttributeInteger>;
349
+ updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeInteger>;
344
350
  /**
345
351
  * Create IP address attribute
346
352
  *
@@ -368,10 +374,11 @@ export declare class Databases {
368
374
  * @param {string} key
369
375
  * @param {boolean} required
370
376
  * @param {string} xdefault
377
+ * @param {string} newKey
371
378
  * @throws {AppwriteException}
372
379
  * @returns {Promise<Models.AttributeIp>}
373
380
  */
374
- updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeIp>;
381
+ updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeIp>;
375
382
  /**
376
383
  * Create relationship attribute
377
384
  *
@@ -419,10 +426,12 @@ export declare class Databases {
419
426
  * @param {string} key
420
427
  * @param {boolean} required
421
428
  * @param {string} xdefault
429
+ * @param {number} size
430
+ * @param {string} newKey
422
431
  * @throws {AppwriteException}
423
432
  * @returns {Promise<Models.AttributeString>}
424
433
  */
425
- updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeString>;
434
+ updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
426
435
  /**
427
436
  * Create URL attribute
428
437
  *
@@ -450,10 +459,11 @@ export declare class Databases {
450
459
  * @param {string} key
451
460
  * @param {boolean} required
452
461
  * @param {string} xdefault
462
+ * @param {string} newKey
453
463
  * @throws {AppwriteException}
454
464
  * @returns {Promise<Models.AttributeUrl>}
455
465
  */
456
- updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string): Promise<Models.AttributeUrl>;
466
+ updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeUrl>;
457
467
  /**
458
468
  * Get attribute
459
469
  *
@@ -488,10 +498,11 @@ export declare class Databases {
488
498
  * @param {string} collectionId
489
499
  * @param {string} key
490
500
  * @param {RelationMutate} onDelete
501
+ * @param {string} newKey
491
502
  * @throws {AppwriteException}
492
503
  * @returns {Promise<Models.AttributeRelationship>}
493
504
  */
494
- updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
505
+ updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
495
506
  /**
496
507
  * List documents
497
508
  *
@@ -33,6 +33,7 @@ export declare class Functions {
33
33
  * @param {boolean} logging
34
34
  * @param {string} entrypoint
35
35
  * @param {string} commands
36
+ * @param {string[]} scopes
36
37
  * @param {string} installationId
37
38
  * @param {string} providerRepositoryId
38
39
  * @param {string} providerBranch
@@ -41,11 +42,12 @@ export declare class Functions {
41
42
  * @param {string} templateRepository
42
43
  * @param {string} templateOwner
43
44
  * @param {string} templateRootDirectory
44
- * @param {string} templateBranch
45
+ * @param {string} templateVersion
46
+ * @param {string} specification
45
47
  * @throws {AppwriteException}
46
48
  * @returns {Promise<Models.Function>}
47
49
  */
48
- create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateBranch?: string): Promise<Models.Function>;
50
+ create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateVersion?: string, specification?: string): Promise<Models.Function>;
49
51
  /**
50
52
  * List runtimes
51
53
  *
@@ -55,6 +57,39 @@ export declare class Functions {
55
57
  * @returns {Promise<Models.RuntimeList>}
56
58
  */
57
59
  listRuntimes(): Promise<Models.RuntimeList>;
60
+ /**
61
+ * List available function runtime specifications
62
+ *
63
+ * List allowed function specifications for this instance.
64
+
65
+ *
66
+ * @throws {AppwriteException}
67
+ * @returns {Promise<Models.SpecificationList>}
68
+ */
69
+ listSpecifications(): Promise<Models.SpecificationList>;
70
+ /**
71
+ * List function templates
72
+ *
73
+ * List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
74
+ *
75
+ * @param {string[]} runtimes
76
+ * @param {string[]} useCases
77
+ * @param {number} limit
78
+ * @param {number} offset
79
+ * @throws {AppwriteException}
80
+ * @returns {Promise<Models.TemplateFunctionList>}
81
+ */
82
+ listTemplates(runtimes?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateFunctionList>;
83
+ /**
84
+ * Get function template
85
+ *
86
+ * Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
87
+ *
88
+ * @param {string} templateId
89
+ * @throws {AppwriteException}
90
+ * @returns {Promise<Models.TemplateFunction>}
91
+ */
92
+ getTemplate(templateId: string): Promise<Models.TemplateFunction>;
58
93
  /**
59
94
  * Get functions usage
60
95
  *
@@ -90,15 +125,17 @@ export declare class Functions {
90
125
  * @param {boolean} logging
91
126
  * @param {string} entrypoint
92
127
  * @param {string} commands
128
+ * @param {string[]} scopes
93
129
  * @param {string} installationId
94
130
  * @param {string} providerRepositoryId
95
131
  * @param {string} providerBranch
96
132
  * @param {boolean} providerSilentMode
97
133
  * @param {string} providerRootDirectory
134
+ * @param {string} specification
98
135
  * @throws {AppwriteException}
99
136
  * @returns {Promise<Models.Function>}
100
137
  */
101
- update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string): Promise<Models.Function>;
138
+ update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
102
139
  /**
103
140
  * Delete function
104
141
  *
@@ -173,9 +210,8 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
173
210
  */
174
211
  deleteDeployment(functionId: string, deploymentId: string): Promise<{}>;
175
212
  /**
176
- * Create build
213
+ * Rebuild deployment
177
214
  *
178
- * Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.
179
215
  *
180
216
  * @param {string} functionId
181
217
  * @param {string} deploymentId
@@ -183,7 +219,17 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
183
219
  * @throws {AppwriteException}
184
220
  * @returns {Promise<{}>}
185
221
  */
186
- createBuild(functionId: string, deploymentId: string, buildId: string): Promise<{}>;
222
+ createBuild(functionId: string, deploymentId: string, buildId?: string): Promise<{}>;
223
+ /**
224
+ * Cancel deployment
225
+ *
226
+ *
227
+ * @param {string} functionId
228
+ * @param {string} deploymentId
229
+ * @throws {AppwriteException}
230
+ * @returns {Promise<Models.Build>}
231
+ */
232
+ updateDeploymentBuild(functionId: string, deploymentId: string): Promise<Models.Build>;
187
233
  /**
188
234
  * Download deployment
189
235
  *
@@ -194,7 +240,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
194
240
  * @throws {AppwriteException}
195
241
  * @returns {string}
196
242
  */
197
- downloadDeployment(functionId: string, deploymentId: string): string;
243
+ getDeploymentDownload(functionId: string, deploymentId: string): string;
198
244
  /**
199
245
  * List executions
200
246
  *
@@ -218,10 +264,11 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
218
264
  * @param {string} xpath
219
265
  * @param {ExecutionMethod} method
220
266
  * @param {object} headers
267
+ * @param {string} scheduledAt
221
268
  * @throws {AppwriteException}
222
269
  * @returns {Promise<Models.Execution>}
223
270
  */
224
- createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object): Promise<Models.Execution>;
271
+ createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise<Models.Execution>;
225
272
  /**
226
273
  * Get execution
227
274
  *
@@ -233,6 +280,18 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
233
280
  * @returns {Promise<Models.Execution>}
234
281
  */
235
282
  getExecution(functionId: string, executionId: string): Promise<Models.Execution>;
283
+ /**
284
+ * Delete execution
285
+ *
286
+ * Delete a function execution by its unique ID.
287
+
288
+ *
289
+ * @param {string} functionId
290
+ * @param {string} executionId
291
+ * @throws {AppwriteException}
292
+ * @returns {Promise<{}>}
293
+ */
294
+ deleteExecution(functionId: string, executionId: string): Promise<{}>;
236
295
  /**
237
296
  * Get function usage
238
297
  *
@@ -133,6 +133,16 @@ export declare class Projects {
133
133
  * @returns {Promise<Models.Project>}
134
134
  */
135
135
  updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project>;
136
+ /**
137
+ * Update the mock numbers for the project
138
+ *
139
+ *
140
+ * @param {string} projectId
141
+ * @param {object[]} numbers
142
+ * @throws {AppwriteException}
143
+ * @returns {Promise<Models.Project>}
144
+ */
145
+ updateMockNumbers(projectId: string, numbers: object[]): Promise<Models.Project>;
136
146
  /**
137
147
  * Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password
138
148
  *
@@ -163,6 +173,16 @@ export declare class Projects {
163
173
  * @returns {Promise<Models.Project>}
164
174
  */
165
175
  updatePersonalDataCheck(projectId: string, enabled: boolean): Promise<Models.Project>;
176
+ /**
177
+ * Update project sessions emails
178
+ *
179
+ *
180
+ * @param {string} projectId
181
+ * @param {boolean} alerts
182
+ * @throws {AppwriteException}
183
+ * @returns {Promise<Models.Project>}
184
+ */
185
+ updateSessionAlerts(projectId: string, alerts: boolean): Promise<Models.Project>;
166
186
  /**
167
187
  * Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.
168
188
  *
@@ -174,6 +194,17 @@ export declare class Projects {
174
194
  * @returns {Promise<Models.Project>}
175
195
  */
176
196
  updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project>;
197
+ /**
198
+ * Create JWT
199
+ *
200
+ *
201
+ * @param {string} projectId
202
+ * @param {string[]} scopes
203
+ * @param {number} duration
204
+ * @throws {AppwriteException}
205
+ * @returns {Promise<Models.Jwt>}
206
+ */
207
+ createJWT(projectId: string, scopes: string[], duration?: number): Promise<Models.Jwt>;
177
208
  /**
178
209
  * List keys
179
210
  *
@@ -356,7 +387,7 @@ export declare class Projects {
356
387
  */
357
388
  createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
358
389
  /**
359
- * Update Project Team
390
+ * Update project team
360
391
  *
361
392
  *
362
393
  * @param {string} projectId
@@ -193,6 +193,18 @@ export declare class Users {
193
193
  * @returns {Promise<Models.User<Preferences>>}
194
194
  */
195
195
  updateEmail<Preferences extends Models.Preferences>(userId: string, email: string): Promise<Models.User<Preferences>>;
196
+ /**
197
+ * Create user JWT
198
+ *
199
+ * Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.
200
+ *
201
+ * @param {string} userId
202
+ * @param {string} sessionId
203
+ * @param {number} duration
204
+ * @throws {AppwriteException}
205
+ * @returns {Promise<Models.Jwt>}
206
+ */
207
+ createJWT(userId: string, sessionId?: string, duration?: number): Promise<Models.Jwt>;
196
208
  /**
197
209
  * Update user labels
198
210
  *
@@ -44,6 +44,17 @@ export declare class Vcs {
44
44
  * @returns {Promise<Models.BranchList>}
45
45
  */
46
46
  listRepositoryBranches(installationId: string, providerRepositoryId: string): Promise<Models.BranchList>;
47
+ /**
48
+ * Get files and directories of a VCS repository
49
+ *
50
+ *
51
+ * @param {string} installationId
52
+ * @param {string} providerRepositoryId
53
+ * @param {string} providerRootDirectory
54
+ * @throws {AppwriteException}
55
+ * @returns {Promise<Models.VcsContentList>}
56
+ */
57
+ getRepositoryContents(installationId: string, providerRepositoryId: string, providerRootDirectory?: string): Promise<Models.VcsContentList>;
47
58
  /**
48
59
  * Detect runtime settings from source code
49
60
  *
@@ -1,13 +0,0 @@
1
- import { Client, Account } from "@appwrite.io/console";
2
-
3
- const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
- .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
-
7
- const account = new Account(client);
8
-
9
- const result = await account.deletePaymentMethod(
10
- '<PAYMENT_METHOD_ID>' // paymentMethodId
11
- );
12
-
13
- console.log(result);
@@ -1,13 +0,0 @@
1
- import { Client, Account } from "@appwrite.io/console";
2
-
3
- const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
- .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
-
7
- const account = new Account(client);
8
-
9
- const result = await account.getBillingAddress(
10
- '<BILLING_ADDRESS_ID>' // billingAddressId
11
- );
12
-
13
- console.log(result);
@@ -1,13 +0,0 @@
1
- import { Client, Account } from "@appwrite.io/console";
2
-
3
- const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
- .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
-
7
- const account = new Account(client);
8
-
9
- const result = await account.getPaymentMethod(
10
- '<PAYMENT_METHOD_ID>' // paymentMethodId
11
- );
12
-
13
- console.log(result);
@@ -1,14 +0,0 @@
1
- import { Client, Account } from "@appwrite.io/console";
2
-
3
- const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
- .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
-
7
- const account = new Account(client);
8
-
9
- const result = await account.listCredits(
10
- '<ORGANIZATION_ID>', // organizationId
11
- [] // queries (optional)
12
- );
13
-
14
- console.log(result);
@@ -1,13 +0,0 @@
1
- import { Client, Account } from "@appwrite.io/console";
2
-
3
- const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
- .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
-
7
- const account = new Account(client);
8
-
9
- const result = await account.listInvoices(
10
- [] // queries (optional)
11
- );
12
-
13
- console.log(result);
@@ -1,13 +0,0 @@
1
- import { Client, Account } from "@appwrite.io/console";
2
-
3
- const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
- .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
-
7
- const account = new Account(client);
8
-
9
- const result = await account.listPaymentMethods(
10
- [] // queries (optional)
11
- );
12
-
13
- console.log(result);
@@ -1,13 +0,0 @@
1
- import { Client, Account } from "@appwrite.io/console";
2
-
3
- const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
- .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
-
7
- const account = new Account(client);
8
-
9
- const result = await account.updatePaymentMethodMandateOptions(
10
- '<PAYMENT_METHOD_ID>' // paymentMethodId
11
- );
12
-
13
- console.log(result);