@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
@@ -1,5 +0,0 @@
1
- export declare enum BillingPlan {
2
- Tier0 = "tier-0",
3
- Tier1 = "tier-1",
4
- Tier2 = "tier-2"
5
- }
@@ -1,128 +0,0 @@
1
- import { Client } from '../client';
2
- import type { Models } from '../models';
3
- export declare class Backups {
4
- client: Client;
5
- constructor(client: Client);
6
- /**
7
- * Create archive
8
- *
9
- *
10
- * @param {string[]} services
11
- * @param {string} resourceId
12
- * @throws {AppwriteException}
13
- * @returns {Promise<Models.BackupArchive>}
14
- */
15
- createArchive(services: string[], resourceId?: string): Promise<Models.BackupArchive>;
16
- /**
17
- * Delete archive
18
- *
19
- *
20
- * @param {string} archiveId
21
- * @throws {AppwriteException}
22
- * @returns {Promise<{}>}
23
- */
24
- deleteArchive(archiveId: string): Promise<{}>;
25
- /**
26
- * List archives
27
- *
28
- *
29
- * @param {string[]} queries
30
- * @throws {AppwriteException}
31
- * @returns {Promise<Models.BackupArchiveList>}
32
- */
33
- listArchives(queries?: string[]): Promise<Models.BackupArchiveList>;
34
- /**
35
- * Get backup archive
36
- *
37
- *
38
- * @param {string} archiveId
39
- * @throws {AppwriteException}
40
- * @returns {Promise<Models.BackupArchive>}
41
- */
42
- getArchive(archiveId: string): Promise<Models.BackupArchive>;
43
- /**
44
- * List backup policies
45
- *
46
- *
47
- * @param {string[]} queries
48
- * @throws {AppwriteException}
49
- * @returns {Promise<Models.BackupPolicyList>}
50
- */
51
- listPolicies(queries?: string[]): Promise<Models.BackupPolicyList>;
52
- /**
53
- * Create backup policy
54
- *
55
- *
56
- * @param {string} policyId
57
- * @param {string[]} services
58
- * @param {number} retention
59
- * @param {string} schedule
60
- * @param {string} name
61
- * @param {string} resourceId
62
- * @param {boolean} enabled
63
- * @throws {AppwriteException}
64
- * @returns {Promise<Models.BackupPolicy>}
65
- */
66
- createPolicy(policyId: string, services: string[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
67
- /**
68
- * Get backup policy
69
- *
70
- *
71
- * @param {string} policyId
72
- * @throws {AppwriteException}
73
- * @returns {Promise<Models.BackupPolicy>}
74
- */
75
- getPolicy(policyId: string): Promise<Models.BackupPolicy>;
76
- /**
77
- * Update backup policy
78
- *
79
- *
80
- * @param {string} policyId
81
- * @param {string} name
82
- * @param {number} retention
83
- * @param {string} schedule
84
- * @param {boolean} enabled
85
- * @throws {AppwriteException}
86
- * @returns {Promise<Models.BackupPolicy>}
87
- */
88
- updatePolicy(policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
89
- /**
90
- * Delete backup policy
91
- *
92
- *
93
- * @param {string} policyId
94
- * @throws {AppwriteException}
95
- * @returns {Promise<{}>}
96
- */
97
- deletePolicy(policyId: string): Promise<{}>;
98
- /**
99
- * Create restoration
100
- *
101
- *
102
- * @param {string} archiveId
103
- * @param {string[]} services
104
- * @param {string} newResourceId
105
- * @param {string} newResourceName
106
- * @throws {AppwriteException}
107
- * @returns {Promise<Models.BackupRestoration>}
108
- */
109
- createRestoration(archiveId: string, services: string[], newResourceId?: string, newResourceName?: string): Promise<Models.BackupRestoration>;
110
- /**
111
- * List restorations
112
- *
113
- *
114
- * @param {string[]} queries
115
- * @throws {AppwriteException}
116
- * @returns {Promise<Models.BackupRestorationList>}
117
- */
118
- listRestorations(queries?: string[]): Promise<Models.BackupRestorationList>;
119
- /**
120
- * Get backup restoration
121
- *
122
- *
123
- * @param {string} restorationId
124
- * @throws {AppwriteException}
125
- * @returns {Promise<Models.BackupArchive>}
126
- */
127
- getRestoration(restorationId: string): Promise<Models.BackupArchive>;
128
- }
@@ -1,273 +0,0 @@
1
- import { Client } from '../client';
2
- import type { Models } from '../models';
3
- import { BillingPlan } from '../enums/billing-plan';
4
- export declare class Organizations {
5
- client: Client;
6
- constructor(client: Client);
7
- /**
8
- * List Orgnizations
9
- *
10
- * 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
- *
12
- * @param {string[]} queries
13
- * @param {string} search
14
- * @throws {AppwriteException}
15
- * @returns {Promise<Models.TeamList<Preferences>>}
16
- */
17
- list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
18
- /**
19
- * Create Organization
20
- *
21
- * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
22
- *
23
- * @param {string} organizationId
24
- * @param {string} name
25
- * @param {BillingPlan} billingPlan
26
- * @param {string} paymentMethodId
27
- * @param {string} billingAddressId
28
- * @throws {AppwriteException}
29
- * @returns {Promise<Models.Organization<Preferences>>}
30
- */
31
- create<Preferences extends Models.Preferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string): Promise<Models.Organization<Preferences>>;
32
- /**
33
- * Delete team
34
- *
35
- * Delete a team using its ID. Only team members with the owner role can delete the team.
36
- *
37
- * @param {string} organizationId
38
- * @throws {AppwriteException}
39
- * @returns {Promise<{}>}
40
- */
41
- delete(organizationId: string): Promise<{}>;
42
- /**
43
- * List aggregations
44
- *
45
- *
46
- * @param {string} organizationId
47
- * @param {string[]} queries
48
- * @throws {AppwriteException}
49
- * @returns {Promise<Models.AggregationTeamList>}
50
- */
51
- listAggregations(organizationId: string, queries?: string[]): Promise<Models.AggregationTeamList>;
52
- /**
53
- * Get invoice
54
- *
55
- *
56
- * @param {string} organizationId
57
- * @param {string} aggregationId
58
- * @throws {AppwriteException}
59
- * @returns {Promise<Models.Invoice>}
60
- */
61
- getAggregation(organizationId: string, aggregationId: string): Promise<Models.Invoice>;
62
- /**
63
- * Set team&#039;s billing address
64
- *
65
- *
66
- * @param {string} organizationId
67
- * @param {string} billingAddressId
68
- * @throws {AppwriteException}
69
- * @returns {Promise<Models.Organization<Preferences>>}
70
- */
71
- setBillingAddress<Preferences extends Models.Preferences>(organizationId: string, billingAddressId: string): Promise<Models.Organization<Preferences>>;
72
- /**
73
- * Delete team&#039;s billing address
74
- *
75
- *
76
- * @param {string} organizationId
77
- * @throws {AppwriteException}
78
- * @returns {Promise<{}>}
79
- */
80
- deleteBillingAddress(organizationId: string): Promise<{}>;
81
- /**
82
- * Get billing address
83
- *
84
- *
85
- * @param {string} organizationId
86
- * @param {string} billingAddressId
87
- * @throws {AppwriteException}
88
- * @returns {Promise<Models.BillingAddress>}
89
- */
90
- getBillingAddress(organizationId: string, billingAddressId: string): Promise<Models.BillingAddress>;
91
- /**
92
- * Set team&#039;s billing email
93
- *
94
- *
95
- * @param {string} organizationId
96
- * @param {string} billingEmail
97
- * @throws {AppwriteException}
98
- * @returns {Promise<Models.Organization<Preferences>>}
99
- */
100
- setBillingEmail<Preferences extends Models.Preferences>(organizationId: string, billingEmail: string): Promise<Models.Organization<Preferences>>;
101
- /**
102
- * Update organization budget
103
- *
104
- *
105
- * @param {string} organizationId
106
- * @param {number} budget
107
- * @param {number[]} alerts
108
- * @throws {AppwriteException}
109
- * @returns {Promise<Models.Organization<Preferences>>}
110
- */
111
- updateBudget<Preferences extends Models.Preferences>(organizationId: string, budget: number, alerts?: number[]): Promise<Models.Organization<Preferences>>;
112
- /**
113
- * Add credits from coupon
114
- *
115
- *
116
- * @param {string} organizationId
117
- * @param {string} couponId
118
- * @throws {AppwriteException}
119
- * @returns {Promise<Models.Credit>}
120
- */
121
- addCredit(organizationId: string, couponId: string): Promise<Models.Credit>;
122
- /**
123
- * Get credit details
124
- *
125
- *
126
- * @param {string} organizationId
127
- * @param {string} creditId
128
- * @throws {AppwriteException}
129
- * @returns {Promise<Models.Credit>}
130
- */
131
- getCredit(organizationId: string, creditId: string): Promise<Models.Credit>;
132
- /**
133
- * List invoices
134
- *
135
- *
136
- * @param {string} organizationId
137
- * @param {string[]} queries
138
- * @throws {AppwriteException}
139
- * @returns {Promise<Models.InvoiceList>}
140
- */
141
- listInvoices(organizationId: string, queries?: string[]): Promise<Models.InvoiceList>;
142
- /**
143
- * Get invoice
144
- *
145
- *
146
- * @param {string} organizationId
147
- * @param {string} invoiceId
148
- * @throws {AppwriteException}
149
- * @returns {Promise<Models.Invoice>}
150
- */
151
- getInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice>;
152
- /**
153
- * View invoice in PDF
154
- *
155
- *
156
- * @param {string} organizationId
157
- * @param {string} invoiceId
158
- * @throws {AppwriteException}
159
- * @returns {Promise<Models.PaymentMethod>}
160
- */
161
- getInvoiceDownload(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
162
- /**
163
- * Initiate payment for failed invoice to pay live from console
164
- *
165
- *
166
- * @param {string} organizationId
167
- * @param {string} invoiceId
168
- * @param {string} paymentMethodId
169
- * @throws {AppwriteException}
170
- * @returns {Promise<Models.Invoice>}
171
- */
172
- createInvoicePayment(organizationId: string, invoiceId: string, paymentMethodId: string): Promise<Models.Invoice>;
173
- /**
174
- * View invoice in PDF
175
- *
176
- *
177
- * @param {string} organizationId
178
- * @param {string} invoiceId
179
- * @throws {AppwriteException}
180
- * @returns {Promise<Models.PaymentMethod>}
181
- */
182
- getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
183
- /**
184
- * Set team&#039;s payment method
185
- *
186
- *
187
- * @param {string} organizationId
188
- * @param {string} paymentMethodId
189
- * @throws {AppwriteException}
190
- * @returns {Promise<Models.Organization<Preferences>>}
191
- */
192
- setDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
193
- /**
194
- * Delete team&#039;s default payment method
195
- *
196
- *
197
- * @param {string} organizationId
198
- * @throws {AppwriteException}
199
- * @returns {Promise<Models.Organization<Preferences>>}
200
- */
201
- deleteDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
202
- /**
203
- * Set team&#039;s backup payment method
204
- *
205
- *
206
- * @param {string} organizationId
207
- * @param {string} paymentMethodId
208
- * @throws {AppwriteException}
209
- * @returns {Promise<Models.Organization<Preferences>>}
210
- */
211
- setBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>>;
212
- /**
213
- * Delete team&#039;s backup payment method
214
- *
215
- *
216
- * @param {string} organizationId
217
- * @throws {AppwriteException}
218
- * @returns {Promise<Models.Organization<Preferences>>}
219
- */
220
- deleteBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
221
- /**
222
- * Get payment method
223
- *
224
- *
225
- * @param {string} organizationId
226
- * @param {string} paymentMethodId
227
- * @throws {AppwriteException}
228
- * @returns {Promise<Models.PaymentMethod>}
229
- */
230
- getPaymentMethod(organizationId: string, paymentMethodId: string): Promise<Models.PaymentMethod>;
231
- /**
232
- * Get organization billing plan details
233
- *
234
- *
235
- * @param {string} organizationId
236
- * @throws {AppwriteException}
237
- * @returns {Promise<Models.BillingPlan>}
238
- */
239
- getPlan(organizationId: string): Promise<Models.BillingPlan>;
240
- /**
241
- * Update organization billing plan
242
- *
243
- *
244
- * @param {string} organizationId
245
- * @param {BillingPlan} billingPlan
246
- * @param {string} paymentMethodId
247
- * @param {string} billingAddressId
248
- * @throws {AppwriteException}
249
- * @returns {Promise<Models.Organization<Preferences>>}
250
- */
251
- updatePlan<Preferences extends Models.Preferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string): Promise<Models.Organization<Preferences>>;
252
- /**
253
- * Set team&#039;s tax Id
254
- *
255
- *
256
- * @param {string} organizationId
257
- * @param {string} taxId
258
- * @throws {AppwriteException}
259
- * @returns {Promise<Models.Organization<Preferences>>}
260
- */
261
- setBillingTaxId<Preferences extends Models.Preferences>(organizationId: string, taxId: string): Promise<Models.Organization<Preferences>>;
262
- /**
263
- * Get team&#039;s usage data
264
- *
265
- *
266
- * @param {string} organizationId
267
- * @param {string} startDate
268
- * @param {string} endDate
269
- * @throws {AppwriteException}
270
- * @returns {Promise<Models.UsageOrganization>}
271
- */
272
- getUsage(organizationId: string, startDate?: string, endDate?: string): Promise<Models.UsageOrganization>;
273
- }