@appwrite.io/console 1.0.1 → 1.1.0-rc.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 (103) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +3565 -2411
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +3564 -2412
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +3565 -2411
  7. package/docs/examples/{functions/list-specifications.md → account/create-payment-method.md} +3 -3
  8. package/docs/examples/account/delete-mfa-authenticator.md +2 -1
  9. package/docs/examples/account/delete-payment-method.md +13 -0
  10. package/docs/examples/account/get-billing-address.md +13 -0
  11. package/docs/examples/account/get-payment-method.md +13 -0
  12. package/docs/examples/{functions/get-template.md → account/list-billing-addresses.md} +4 -4
  13. package/docs/examples/account/list-credits.md +14 -0
  14. package/docs/examples/account/list-invoices.md +13 -0
  15. package/docs/examples/account/list-payment-methods.md +13 -0
  16. package/docs/examples/account/update-payment-method-mandate-options.md +13 -0
  17. package/docs/examples/account/update-payment-method-provider.md +15 -0
  18. package/docs/examples/account/update-payment-method.md +15 -0
  19. package/docs/examples/backups/create-archive.md +14 -0
  20. package/docs/examples/backups/create-policy.md +19 -0
  21. package/docs/examples/backups/create-restoration.md +16 -0
  22. package/docs/examples/backups/delete-archive.md +13 -0
  23. package/docs/examples/backups/delete-policy.md +13 -0
  24. package/docs/examples/backups/get-archive.md +13 -0
  25. package/docs/examples/backups/get-policy.md +13 -0
  26. package/docs/examples/backups/get-restoration.md +13 -0
  27. package/docs/examples/backups/list-archives.md +13 -0
  28. package/docs/examples/backups/list-policies.md +13 -0
  29. package/docs/examples/backups/list-restorations.md +13 -0
  30. package/docs/examples/backups/update-policy.md +17 -0
  31. package/docs/examples/console/create-source.md +17 -0
  32. package/docs/examples/console/get-copon.md +13 -0
  33. package/docs/examples/console/plans.md +11 -0
  34. package/docs/examples/console/regions.md +11 -0
  35. package/docs/examples/functions/create-build.md +1 -1
  36. package/docs/examples/functions/create-execution.md +1 -2
  37. package/docs/examples/functions/create.md +1 -3
  38. package/docs/examples/functions/{get-deployment-download.md → download-deployment.md} +1 -1
  39. package/docs/examples/functions/update.md +1 -3
  40. package/docs/examples/organizations/add-credit.md +14 -0
  41. package/docs/examples/organizations/create-invoice-payment.md +15 -0
  42. package/docs/examples/organizations/create.md +17 -0
  43. package/docs/examples/organizations/delete-backup-payment-method.md +13 -0
  44. package/docs/examples/organizations/delete-billing-address.md +13 -0
  45. package/docs/examples/organizations/delete-default-payment-method.md +13 -0
  46. package/docs/examples/organizations/delete.md +13 -0
  47. package/docs/examples/organizations/get-aggregation.md +14 -0
  48. package/docs/examples/organizations/get-billing-address.md +14 -0
  49. package/docs/examples/organizations/get-credit.md +14 -0
  50. package/docs/examples/organizations/get-invoice-download.md +14 -0
  51. package/docs/examples/organizations/get-invoice-view.md +14 -0
  52. package/docs/examples/organizations/get-invoice.md +14 -0
  53. package/docs/examples/organizations/get-payment-method.md +14 -0
  54. package/docs/examples/organizations/get-plan.md +13 -0
  55. package/docs/examples/organizations/get-usage.md +15 -0
  56. package/docs/examples/organizations/list-aggregations.md +14 -0
  57. package/docs/examples/organizations/list-invoices.md +14 -0
  58. package/docs/examples/organizations/list.md +14 -0
  59. package/docs/examples/organizations/set-backup-payment-method.md +14 -0
  60. package/docs/examples/organizations/set-billing-address.md +14 -0
  61. package/docs/examples/organizations/set-billing-email.md +14 -0
  62. package/docs/examples/organizations/set-billing-tax-id.md +14 -0
  63. package/docs/examples/organizations/set-default-payment-method.md +14 -0
  64. package/docs/examples/organizations/update-budget.md +15 -0
  65. package/docs/examples/organizations/update-plan.md +16 -0
  66. package/package.json +1 -1
  67. package/src/client.ts +2 -2
  68. package/src/enums/billing-plan.ts +5 -0
  69. package/src/enums/email-template-type.ts +0 -2
  70. package/src/enums/platform-type.ts +0 -2
  71. package/src/enums/runtime.ts +0 -1
  72. package/src/index.ts +4 -1
  73. package/src/models.ts +956 -282
  74. package/src/services/account.ts +345 -2
  75. package/src/services/backups.ts +425 -0
  76. package/src/services/console.ts +120 -0
  77. package/src/services/functions.ts +14 -195
  78. package/src/services/organizations.ts +896 -0
  79. package/src/services/projects.ts +1 -110
  80. package/src/services/users.ts +0 -37
  81. package/src/services/vcs.ts +0 -36
  82. package/types/enums/billing-plan.d.ts +5 -0
  83. package/types/enums/email-template-type.d.ts +1 -3
  84. package/types/enums/platform-type.d.ts +1 -3
  85. package/types/enums/runtime.d.ts +1 -2
  86. package/types/index.d.ts +4 -1
  87. package/types/models.d.ts +956 -282
  88. package/types/services/account.d.ts +105 -1
  89. package/types/services/backups.d.ts +128 -0
  90. package/types/services/console.d.ts +38 -0
  91. package/types/services/functions.d.ts +8 -67
  92. package/types/services/organizations.d.ts +273 -0
  93. package/types/services/projects.d.ts +1 -32
  94. package/types/services/users.d.ts +0 -12
  95. package/types/services/vcs.d.ts +0 -11
  96. package/docs/examples/functions/delete-execution.md +0 -14
  97. package/docs/examples/functions/list-templates.md +0 -16
  98. package/docs/examples/functions/update-deployment-build.md +0 -14
  99. package/docs/examples/projects/create-j-w-t.md +0 -15
  100. package/docs/examples/projects/update-mock-numbers.md +0 -14
  101. package/docs/examples/projects/update-session-alerts.md +0 -14
  102. package/docs/examples/users/create-j-w-t.md +0 -15
  103. package/docs/examples/vcs/get-repository-contents.md +0 -15
@@ -0,0 +1,273 @@
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
+ }
@@ -133,16 +133,6 @@ 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>;
146
136
  /**
147
137
  * Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password
148
138
  *
@@ -173,16 +163,6 @@ export declare class Projects {
173
163
  * @returns {Promise<Models.Project>}
174
164
  */
175
165
  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>;
186
166
  /**
187
167
  * Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.
188
168
  *
@@ -194,17 +174,6 @@ export declare class Projects {
194
174
  * @returns {Promise<Models.Project>}
195
175
  */
196
176
  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>;
208
177
  /**
209
178
  * List keys
210
179
  *
@@ -387,7 +356,7 @@ export declare class Projects {
387
356
  */
388
357
  createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
389
358
  /**
390
- * Update project team
359
+ * Update Project Team
391
360
  *
392
361
  *
393
362
  * @param {string} projectId
@@ -193,18 +193,6 @@ 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>;
208
196
  /**
209
197
  * Update user labels
210
198
  *
@@ -44,17 +44,6 @@ 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>;
58
47
  /**
59
48
  * Detect runtime settings from source code
60
49
  *
@@ -1,14 +0,0 @@
1
- import { Client, Functions } 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 functions = new Functions(client);
8
-
9
- const result = await functions.deleteExecution(
10
- '<FUNCTION_ID>', // functionId
11
- '<EXECUTION_ID>' // executionId
12
- );
13
-
14
- console.log(result);
@@ -1,16 +0,0 @@
1
- import { Client, Functions } 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 functions = new Functions(client);
8
-
9
- const result = await functions.listTemplates(
10
- [], // runtimes (optional)
11
- [], // useCases (optional)
12
- 1, // limit (optional)
13
- 0 // offset (optional)
14
- );
15
-
16
- console.log(result);
@@ -1,14 +0,0 @@
1
- import { Client, Functions } 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 functions = new Functions(client);
8
-
9
- const result = await functions.updateDeploymentBuild(
10
- '<FUNCTION_ID>', // functionId
11
- '<DEPLOYMENT_ID>' // deploymentId
12
- );
13
-
14
- console.log(result);
@@ -1,15 +0,0 @@
1
- import { Client, Projects } 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 projects = new Projects(client);
8
-
9
- const result = await projects.createJWT(
10
- '<PROJECT_ID>', // projectId
11
- [], // scopes
12
- 0 // duration (optional)
13
- );
14
-
15
- console.log(result);
@@ -1,14 +0,0 @@
1
- import { Client, Projects } 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 projects = new Projects(client);
8
-
9
- const result = await projects.updateMockNumbers(
10
- '<PROJECT_ID>', // projectId
11
- [] // numbers
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
1
- import { Client, Projects } 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 projects = new Projects(client);
8
-
9
- const result = await projects.updateSessionAlerts(
10
- '<PROJECT_ID>', // projectId
11
- false // alerts
12
- );
13
-
14
- console.log(result);
@@ -1,15 +0,0 @@
1
- import { Client, Users } 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 users = new Users(client);
8
-
9
- const result = await users.createJWT(
10
- '<USER_ID>', // userId
11
- '<SESSION_ID>', // sessionId (optional)
12
- 0 // duration (optional)
13
- );
14
-
15
- console.log(result);
@@ -1,15 +0,0 @@
1
- import { Client, Vcs } 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 vcs = new Vcs(client);
8
-
9
- const result = await vcs.getRepositoryContents(
10
- '<INSTALLATION_ID>', // installationId
11
- '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId
12
- '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional)
13
- );
14
-
15
- console.log(result);