@appwrite.io/console 0.3.0 → 0.4.1
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.
- package/.github/workflows/publish.yml +2 -2
- package/README.md +3 -3
- package/dist/cjs/sdk.js +1354 -1197
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1354 -1197
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1354 -1197
- package/docs/examples/functions/create.md +1 -1
- package/docs/examples/functions/update.md +1 -1
- package/docs/examples/{projects/get-usage.md → health/get-queue-builds.md} +3 -3
- package/docs/examples/{account/create-with-invite-code.md → health/get-queue-databases.md} +3 -3
- package/docs/examples/health/get-queue-deletes.md +18 -0
- package/docs/examples/health/get-queue-mails.md +18 -0
- package/docs/examples/health/get-queue-messaging.md +18 -0
- package/docs/examples/health/get-queue-migrations.md +18 -0
- package/docs/examples/project/get-usage.md +1 -1
- package/docs/examples/teams/create-membership.md +1 -1
- package/package.json +3 -2
- package/src/client.ts +1 -1
- package/src/models.ts +147 -279
- package/src/query.ts +1 -1
- package/src/role.ts +72 -6
- package/src/services/account.ts +154 -204
- package/src/services/assistant.ts +3 -3
- package/src/services/avatars.ts +32 -31
- package/src/services/console.ts +4 -4
- package/src/services/databases.ts +195 -195
- package/src/services/functions.ts +117 -126
- package/src/services/graphql.ts +8 -8
- package/src/services/health.ts +219 -50
- package/src/services/locale.ts +31 -31
- package/src/services/migrations.ts +48 -48
- package/src/services/project.ts +40 -22
- package/src/services/projects.ts +143 -170
- package/src/services/proxy.ts +15 -15
- package/src/services/storage.ts +74 -84
- package/src/services/teams.ts +62 -66
- package/src/services/users.ts +132 -135
- package/src/services/vcs.ts +27 -27
- package/types/models.d.ts +147 -279
- package/types/role.d.ts +62 -0
- package/types/services/account.d.ts +61 -70
- package/types/services/avatars.d.ts +11 -10
- package/types/services/console.d.ts +1 -1
- package/types/services/databases.d.ts +51 -51
- package/types/services/functions.d.ts +32 -27
- package/types/services/graphql.d.ts +2 -2
- package/types/services/health.d.ts +85 -14
- package/types/services/locale.d.ts +7 -7
- package/types/services/project.d.ts +4 -2
- package/types/services/projects.d.ts +26 -36
- package/types/services/storage.d.ts +13 -13
- package/types/services/teams.d.ts +20 -20
- package/types/services/users.d.ts +45 -44
package/src/services/projects.ts
CHANGED
|
@@ -11,7 +11,7 @@ export class Projects extends Service {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* List
|
|
14
|
+
* List projects
|
|
15
15
|
*
|
|
16
16
|
*
|
|
17
17
|
* @param {string[]} queries
|
|
@@ -20,8 +20,8 @@ export class Projects extends Service {
|
|
|
20
20
|
* @returns {Promise}
|
|
21
21
|
*/
|
|
22
22
|
async list(queries?: string[], search?: string): Promise<Models.ProjectList> {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const apiPath = '/projects';
|
|
24
|
+
const payload: Payload = {};
|
|
25
25
|
|
|
26
26
|
if (typeof queries !== 'undefined') {
|
|
27
27
|
payload['queries'] = queries;
|
|
@@ -31,14 +31,14 @@ export class Projects extends Service {
|
|
|
31
31
|
payload['search'] = search;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
const uri = new URL(this.client.config.endpoint +
|
|
34
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35
35
|
return await this.client.call('get', uri, {
|
|
36
36
|
'content-type': 'application/json',
|
|
37
37
|
}, payload);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* Create
|
|
41
|
+
* Create project
|
|
42
42
|
*
|
|
43
43
|
*
|
|
44
44
|
* @param {string} projectId
|
|
@@ -70,8 +70,8 @@ export class Projects extends Service {
|
|
|
70
70
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
const apiPath = '/projects';
|
|
74
|
+
const payload: Payload = {};
|
|
75
75
|
|
|
76
76
|
if (typeof projectId !== 'undefined') {
|
|
77
77
|
payload['projectId'] = projectId;
|
|
@@ -125,14 +125,14 @@ export class Projects extends Service {
|
|
|
125
125
|
payload['legalTaxId'] = legalTaxId;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
const uri = new URL(this.client.config.endpoint +
|
|
128
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
129
129
|
return await this.client.call('post', uri, {
|
|
130
130
|
'content-type': 'application/json',
|
|
131
131
|
}, payload);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
* Get
|
|
135
|
+
* Get project
|
|
136
136
|
*
|
|
137
137
|
*
|
|
138
138
|
* @param {string} projectId
|
|
@@ -144,17 +144,17 @@ export class Projects extends Service {
|
|
|
144
144
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
148
|
+
const payload: Payload = {};
|
|
149
149
|
|
|
150
|
-
const uri = new URL(this.client.config.endpoint +
|
|
150
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
151
151
|
return await this.client.call('get', uri, {
|
|
152
152
|
'content-type': 'application/json',
|
|
153
153
|
}, payload);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* Update
|
|
157
|
+
* Update project
|
|
158
158
|
*
|
|
159
159
|
*
|
|
160
160
|
* @param {string} projectId
|
|
@@ -180,8 +180,8 @@ export class Projects extends Service {
|
|
|
180
180
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
184
|
+
const payload: Payload = {};
|
|
185
185
|
|
|
186
186
|
if (typeof name !== 'undefined') {
|
|
187
187
|
payload['name'] = name;
|
|
@@ -223,14 +223,14 @@ export class Projects extends Service {
|
|
|
223
223
|
payload['legalTaxId'] = legalTaxId;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
const uri = new URL(this.client.config.endpoint +
|
|
226
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
227
227
|
return await this.client.call('patch', uri, {
|
|
228
228
|
'content-type': 'application/json',
|
|
229
229
|
}, payload);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
|
-
* Delete
|
|
233
|
+
* Delete project
|
|
234
234
|
*
|
|
235
235
|
*
|
|
236
236
|
* @param {string} projectId
|
|
@@ -242,17 +242,17 @@ export class Projects extends Service {
|
|
|
242
242
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
246
|
+
const payload: Payload = {};
|
|
247
247
|
|
|
248
|
-
const uri = new URL(this.client.config.endpoint +
|
|
248
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
249
249
|
return await this.client.call('delete', uri, {
|
|
250
250
|
'content-type': 'application/json',
|
|
251
251
|
}, payload);
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
/**
|
|
255
|
-
* Update
|
|
255
|
+
* Update project authentication duration
|
|
256
256
|
*
|
|
257
257
|
*
|
|
258
258
|
* @param {string} projectId
|
|
@@ -269,21 +269,21 @@ export class Projects extends Service {
|
|
|
269
269
|
throw new AppwriteException('Missing required parameter: "duration"');
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
|
|
273
|
+
const payload: Payload = {};
|
|
274
274
|
|
|
275
275
|
if (typeof duration !== 'undefined') {
|
|
276
276
|
payload['duration'] = duration;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
const uri = new URL(this.client.config.endpoint +
|
|
279
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
280
280
|
return await this.client.call('patch', uri, {
|
|
281
281
|
'content-type': 'application/json',
|
|
282
282
|
}, payload);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
/**
|
|
286
|
-
* Update
|
|
286
|
+
* Update project users limit
|
|
287
287
|
*
|
|
288
288
|
*
|
|
289
289
|
* @param {string} projectId
|
|
@@ -300,21 +300,21 @@ export class Projects extends Service {
|
|
|
300
300
|
throw new AppwriteException('Missing required parameter: "limit"');
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
|
|
304
|
+
const payload: Payload = {};
|
|
305
305
|
|
|
306
306
|
if (typeof limit !== 'undefined') {
|
|
307
307
|
payload['limit'] = limit;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
const uri = new URL(this.client.config.endpoint +
|
|
310
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
311
311
|
return await this.client.call('patch', uri, {
|
|
312
312
|
'content-type': 'application/json',
|
|
313
313
|
}, payload);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
|
-
* Update
|
|
317
|
+
* Update project user sessions limit
|
|
318
318
|
*
|
|
319
319
|
*
|
|
320
320
|
* @param {string} projectId
|
|
@@ -331,14 +331,14 @@ export class Projects extends Service {
|
|
|
331
331
|
throw new AppwriteException('Missing required parameter: "limit"');
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
|
|
335
|
+
const payload: Payload = {};
|
|
336
336
|
|
|
337
337
|
if (typeof limit !== 'undefined') {
|
|
338
338
|
payload['limit'] = limit;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
const uri = new URL(this.client.config.endpoint +
|
|
341
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
342
342
|
return await this.client.call('patch', uri, {
|
|
343
343
|
'content-type': 'application/json',
|
|
344
344
|
}, payload);
|
|
@@ -362,14 +362,14 @@ export class Projects extends Service {
|
|
|
362
362
|
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
|
|
366
|
+
const payload: Payload = {};
|
|
367
367
|
|
|
368
368
|
if (typeof enabled !== 'undefined') {
|
|
369
369
|
payload['enabled'] = enabled;
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
-
const uri = new URL(this.client.config.endpoint +
|
|
372
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
373
373
|
return await this.client.call('patch', uri, {
|
|
374
374
|
'content-type': 'application/json',
|
|
375
375
|
}, payload);
|
|
@@ -393,14 +393,14 @@ export class Projects extends Service {
|
|
|
393
393
|
throw new AppwriteException('Missing required parameter: "limit"');
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
|
|
397
|
-
|
|
396
|
+
const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
|
|
397
|
+
const payload: Payload = {};
|
|
398
398
|
|
|
399
399
|
if (typeof limit !== 'undefined') {
|
|
400
400
|
payload['limit'] = limit;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
const uri = new URL(this.client.config.endpoint +
|
|
403
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
404
404
|
return await this.client.call('patch', uri, {
|
|
405
405
|
'content-type': 'application/json',
|
|
406
406
|
}, payload);
|
|
@@ -424,21 +424,21 @@ export class Projects extends Service {
|
|
|
424
424
|
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
425
425
|
}
|
|
426
426
|
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
|
|
428
|
+
const payload: Payload = {};
|
|
429
429
|
|
|
430
430
|
if (typeof enabled !== 'undefined') {
|
|
431
431
|
payload['enabled'] = enabled;
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
-
const uri = new URL(this.client.config.endpoint +
|
|
434
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
435
435
|
return await this.client.call('patch', uri, {
|
|
436
436
|
'content-type': 'application/json',
|
|
437
437
|
}, payload);
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
/**
|
|
441
|
-
* Update
|
|
441
|
+
* Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.
|
|
442
442
|
*
|
|
443
443
|
*
|
|
444
444
|
* @param {string} projectId
|
|
@@ -460,21 +460,21 @@ export class Projects extends Service {
|
|
|
460
460
|
throw new AppwriteException('Missing required parameter: "status"');
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
|
|
464
|
-
|
|
463
|
+
const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
|
|
464
|
+
const payload: Payload = {};
|
|
465
465
|
|
|
466
466
|
if (typeof status !== 'undefined') {
|
|
467
467
|
payload['status'] = status;
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
const uri = new URL(this.client.config.endpoint +
|
|
470
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
471
471
|
return await this.client.call('patch', uri, {
|
|
472
472
|
'content-type': 'application/json',
|
|
473
473
|
}, payload);
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
/**
|
|
477
|
-
* List
|
|
477
|
+
* List keys
|
|
478
478
|
*
|
|
479
479
|
*
|
|
480
480
|
* @param {string} projectId
|
|
@@ -486,17 +486,17 @@ export class Projects extends Service {
|
|
|
486
486
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
|
|
490
|
-
|
|
489
|
+
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
490
|
+
const payload: Payload = {};
|
|
491
491
|
|
|
492
|
-
const uri = new URL(this.client.config.endpoint +
|
|
492
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
493
493
|
return await this.client.call('get', uri, {
|
|
494
494
|
'content-type': 'application/json',
|
|
495
495
|
}, payload);
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
/**
|
|
499
|
-
* Create
|
|
499
|
+
* Create key
|
|
500
500
|
*
|
|
501
501
|
*
|
|
502
502
|
* @param {string} projectId
|
|
@@ -519,8 +519,8 @@ export class Projects extends Service {
|
|
|
519
519
|
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
523
|
+
const payload: Payload = {};
|
|
524
524
|
|
|
525
525
|
if (typeof name !== 'undefined') {
|
|
526
526
|
payload['name'] = name;
|
|
@@ -534,14 +534,14 @@ export class Projects extends Service {
|
|
|
534
534
|
payload['expire'] = expire;
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
-
const uri = new URL(this.client.config.endpoint +
|
|
537
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
538
538
|
return await this.client.call('post', uri, {
|
|
539
539
|
'content-type': 'application/json',
|
|
540
540
|
}, payload);
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
/**
|
|
544
|
-
* Get
|
|
544
|
+
* Get key
|
|
545
545
|
*
|
|
546
546
|
*
|
|
547
547
|
* @param {string} projectId
|
|
@@ -558,17 +558,17 @@ export class Projects extends Service {
|
|
|
558
558
|
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
559
559
|
}
|
|
560
560
|
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
562
|
+
const payload: Payload = {};
|
|
563
563
|
|
|
564
|
-
const uri = new URL(this.client.config.endpoint +
|
|
564
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
565
565
|
return await this.client.call('get', uri, {
|
|
566
566
|
'content-type': 'application/json',
|
|
567
567
|
}, payload);
|
|
568
568
|
}
|
|
569
569
|
|
|
570
570
|
/**
|
|
571
|
-
* Update
|
|
571
|
+
* Update key
|
|
572
572
|
*
|
|
573
573
|
*
|
|
574
574
|
* @param {string} projectId
|
|
@@ -596,8 +596,8 @@ export class Projects extends Service {
|
|
|
596
596
|
throw new AppwriteException('Missing required parameter: "scopes"');
|
|
597
597
|
}
|
|
598
598
|
|
|
599
|
-
|
|
600
|
-
|
|
599
|
+
const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
600
|
+
const payload: Payload = {};
|
|
601
601
|
|
|
602
602
|
if (typeof name !== 'undefined') {
|
|
603
603
|
payload['name'] = name;
|
|
@@ -611,14 +611,14 @@ export class Projects extends Service {
|
|
|
611
611
|
payload['expire'] = expire;
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
const uri = new URL(this.client.config.endpoint +
|
|
614
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
615
615
|
return await this.client.call('put', uri, {
|
|
616
616
|
'content-type': 'application/json',
|
|
617
617
|
}, payload);
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
/**
|
|
621
|
-
* Delete
|
|
621
|
+
* Delete key
|
|
622
622
|
*
|
|
623
623
|
*
|
|
624
624
|
* @param {string} projectId
|
|
@@ -635,17 +635,17 @@ export class Projects extends Service {
|
|
|
635
635
|
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
|
|
639
|
-
|
|
638
|
+
const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
639
|
+
const payload: Payload = {};
|
|
640
640
|
|
|
641
|
-
const uri = new URL(this.client.config.endpoint +
|
|
641
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
642
642
|
return await this.client.call('delete', uri, {
|
|
643
643
|
'content-type': 'application/json',
|
|
644
644
|
}, payload);
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
/**
|
|
648
|
-
* Update
|
|
648
|
+
* Update project OAuth2
|
|
649
649
|
*
|
|
650
650
|
*
|
|
651
651
|
* @param {string} projectId
|
|
@@ -665,8 +665,8 @@ export class Projects extends Service {
|
|
|
665
665
|
throw new AppwriteException('Missing required parameter: "provider"');
|
|
666
666
|
}
|
|
667
667
|
|
|
668
|
-
|
|
669
|
-
|
|
668
|
+
const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
|
|
669
|
+
const payload: Payload = {};
|
|
670
670
|
|
|
671
671
|
if (typeof provider !== 'undefined') {
|
|
672
672
|
payload['provider'] = provider;
|
|
@@ -684,14 +684,14 @@ export class Projects extends Service {
|
|
|
684
684
|
payload['enabled'] = enabled;
|
|
685
685
|
}
|
|
686
686
|
|
|
687
|
-
const uri = new URL(this.client.config.endpoint +
|
|
687
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
688
688
|
return await this.client.call('patch', uri, {
|
|
689
689
|
'content-type': 'application/json',
|
|
690
690
|
}, payload);
|
|
691
691
|
}
|
|
692
692
|
|
|
693
693
|
/**
|
|
694
|
-
* List
|
|
694
|
+
* List platforms
|
|
695
695
|
*
|
|
696
696
|
*
|
|
697
697
|
* @param {string} projectId
|
|
@@ -703,17 +703,17 @@ export class Projects extends Service {
|
|
|
703
703
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
|
|
707
|
-
|
|
706
|
+
const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
|
|
707
|
+
const payload: Payload = {};
|
|
708
708
|
|
|
709
|
-
const uri = new URL(this.client.config.endpoint +
|
|
709
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
710
710
|
return await this.client.call('get', uri, {
|
|
711
711
|
'content-type': 'application/json',
|
|
712
712
|
}, payload);
|
|
713
713
|
}
|
|
714
714
|
|
|
715
715
|
/**
|
|
716
|
-
* Create
|
|
716
|
+
* Create platform
|
|
717
717
|
*
|
|
718
718
|
*
|
|
719
719
|
* @param {string} projectId
|
|
@@ -738,8 +738,8 @@ export class Projects extends Service {
|
|
|
738
738
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
739
739
|
}
|
|
740
740
|
|
|
741
|
-
|
|
742
|
-
|
|
741
|
+
const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
|
|
742
|
+
const payload: Payload = {};
|
|
743
743
|
|
|
744
744
|
if (typeof type !== 'undefined') {
|
|
745
745
|
payload['type'] = type;
|
|
@@ -761,14 +761,14 @@ export class Projects extends Service {
|
|
|
761
761
|
payload['hostname'] = hostname;
|
|
762
762
|
}
|
|
763
763
|
|
|
764
|
-
const uri = new URL(this.client.config.endpoint +
|
|
764
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
765
765
|
return await this.client.call('post', uri, {
|
|
766
766
|
'content-type': 'application/json',
|
|
767
767
|
}, payload);
|
|
768
768
|
}
|
|
769
769
|
|
|
770
770
|
/**
|
|
771
|
-
* Get
|
|
771
|
+
* Get platform
|
|
772
772
|
*
|
|
773
773
|
*
|
|
774
774
|
* @param {string} projectId
|
|
@@ -785,17 +785,17 @@ export class Projects extends Service {
|
|
|
785
785
|
throw new AppwriteException('Missing required parameter: "platformId"');
|
|
786
786
|
}
|
|
787
787
|
|
|
788
|
-
|
|
789
|
-
|
|
788
|
+
const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
789
|
+
const payload: Payload = {};
|
|
790
790
|
|
|
791
|
-
const uri = new URL(this.client.config.endpoint +
|
|
791
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
792
792
|
return await this.client.call('get', uri, {
|
|
793
793
|
'content-type': 'application/json',
|
|
794
794
|
}, payload);
|
|
795
795
|
}
|
|
796
796
|
|
|
797
797
|
/**
|
|
798
|
-
* Update
|
|
798
|
+
* Update platform
|
|
799
799
|
*
|
|
800
800
|
*
|
|
801
801
|
* @param {string} projectId
|
|
@@ -820,8 +820,8 @@ export class Projects extends Service {
|
|
|
820
820
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
821
821
|
}
|
|
822
822
|
|
|
823
|
-
|
|
824
|
-
|
|
823
|
+
const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
824
|
+
const payload: Payload = {};
|
|
825
825
|
|
|
826
826
|
if (typeof name !== 'undefined') {
|
|
827
827
|
payload['name'] = name;
|
|
@@ -839,14 +839,14 @@ export class Projects extends Service {
|
|
|
839
839
|
payload['hostname'] = hostname;
|
|
840
840
|
}
|
|
841
841
|
|
|
842
|
-
const uri = new URL(this.client.config.endpoint +
|
|
842
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
843
843
|
return await this.client.call('put', uri, {
|
|
844
844
|
'content-type': 'application/json',
|
|
845
845
|
}, payload);
|
|
846
846
|
}
|
|
847
847
|
|
|
848
848
|
/**
|
|
849
|
-
* Delete
|
|
849
|
+
* Delete platform
|
|
850
850
|
*
|
|
851
851
|
*
|
|
852
852
|
* @param {string} projectId
|
|
@@ -863,10 +863,10 @@ export class Projects extends Service {
|
|
|
863
863
|
throw new AppwriteException('Missing required parameter: "platformId"');
|
|
864
864
|
}
|
|
865
865
|
|
|
866
|
-
|
|
867
|
-
|
|
866
|
+
const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
867
|
+
const payload: Payload = {};
|
|
868
868
|
|
|
869
|
-
const uri = new URL(this.client.config.endpoint +
|
|
869
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
870
870
|
return await this.client.call('delete', uri, {
|
|
871
871
|
'content-type': 'application/json',
|
|
872
872
|
}, payload);
|
|
@@ -895,8 +895,8 @@ export class Projects extends Service {
|
|
|
895
895
|
throw new AppwriteException('Missing required parameter: "status"');
|
|
896
896
|
}
|
|
897
897
|
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
const apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
|
|
899
|
+
const payload: Payload = {};
|
|
900
900
|
|
|
901
901
|
if (typeof service !== 'undefined') {
|
|
902
902
|
payload['service'] = service;
|
|
@@ -906,7 +906,7 @@ export class Projects extends Service {
|
|
|
906
906
|
payload['status'] = status;
|
|
907
907
|
}
|
|
908
908
|
|
|
909
|
-
const uri = new URL(this.client.config.endpoint +
|
|
909
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
910
910
|
return await this.client.call('patch', uri, {
|
|
911
911
|
'content-type': 'application/json',
|
|
912
912
|
}, payload);
|
|
@@ -930,14 +930,14 @@ export class Projects extends Service {
|
|
|
930
930
|
throw new AppwriteException('Missing required parameter: "status"');
|
|
931
931
|
}
|
|
932
932
|
|
|
933
|
-
|
|
934
|
-
|
|
933
|
+
const apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
|
|
934
|
+
const payload: Payload = {};
|
|
935
935
|
|
|
936
936
|
if (typeof status !== 'undefined') {
|
|
937
937
|
payload['status'] = status;
|
|
938
938
|
}
|
|
939
939
|
|
|
940
|
-
const uri = new URL(this.client.config.endpoint +
|
|
940
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
941
941
|
return await this.client.call('patch', uri, {
|
|
942
942
|
'content-type': 'application/json',
|
|
943
943
|
}, payload);
|
|
@@ -969,8 +969,8 @@ export class Projects extends Service {
|
|
|
969
969
|
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
|
|
973
|
-
|
|
972
|
+
const apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
|
|
973
|
+
const payload: Payload = {};
|
|
974
974
|
|
|
975
975
|
if (typeof enabled !== 'undefined') {
|
|
976
976
|
payload['enabled'] = enabled;
|
|
@@ -1008,7 +1008,7 @@ export class Projects extends Service {
|
|
|
1008
1008
|
payload['secure'] = secure;
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1011
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1012
1012
|
return await this.client.call('patch', uri, {
|
|
1013
1013
|
'content-type': 'application/json',
|
|
1014
1014
|
}, payload);
|
|
@@ -1032,14 +1032,14 @@ export class Projects extends Service {
|
|
|
1032
1032
|
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
1033
1033
|
}
|
|
1034
1034
|
|
|
1035
|
-
|
|
1036
|
-
|
|
1035
|
+
const apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
|
|
1036
|
+
const payload: Payload = {};
|
|
1037
1037
|
|
|
1038
1038
|
if (typeof teamId !== 'undefined') {
|
|
1039
1039
|
payload['teamId'] = teamId;
|
|
1040
1040
|
}
|
|
1041
1041
|
|
|
1042
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1042
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1043
1043
|
return await this.client.call('patch', uri, {
|
|
1044
1044
|
'content-type': 'application/json',
|
|
1045
1045
|
}, payload);
|
|
@@ -1068,10 +1068,10 @@ export class Projects extends Service {
|
|
|
1068
1068
|
throw new AppwriteException('Missing required parameter: "locale"');
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
1071
|
-
|
|
1072
|
-
|
|
1071
|
+
const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1072
|
+
const payload: Payload = {};
|
|
1073
1073
|
|
|
1074
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1074
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1075
1075
|
return await this.client.call('get', uri, {
|
|
1076
1076
|
'content-type': 'application/json',
|
|
1077
1077
|
}, payload);
|
|
@@ -1113,8 +1113,8 @@ export class Projects extends Service {
|
|
|
1113
1113
|
throw new AppwriteException('Missing required parameter: "message"');
|
|
1114
1114
|
}
|
|
1115
1115
|
|
|
1116
|
-
|
|
1117
|
-
|
|
1116
|
+
const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1117
|
+
const payload: Payload = {};
|
|
1118
1118
|
|
|
1119
1119
|
if (typeof subject !== 'undefined') {
|
|
1120
1120
|
payload['subject'] = subject;
|
|
@@ -1136,7 +1136,7 @@ export class Projects extends Service {
|
|
|
1136
1136
|
payload['replyTo'] = replyTo;
|
|
1137
1137
|
}
|
|
1138
1138
|
|
|
1139
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1139
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1140
1140
|
return await this.client.call('patch', uri, {
|
|
1141
1141
|
'content-type': 'application/json',
|
|
1142
1142
|
}, payload);
|
|
@@ -1165,10 +1165,10 @@ export class Projects extends Service {
|
|
|
1165
1165
|
throw new AppwriteException('Missing required parameter: "locale"');
|
|
1166
1166
|
}
|
|
1167
1167
|
|
|
1168
|
-
|
|
1169
|
-
|
|
1168
|
+
const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1169
|
+
const payload: Payload = {};
|
|
1170
1170
|
|
|
1171
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1171
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1172
1172
|
return await this.client.call('delete', uri, {
|
|
1173
1173
|
'content-type': 'application/json',
|
|
1174
1174
|
}, payload);
|
|
@@ -1197,10 +1197,10 @@ export class Projects extends Service {
|
|
|
1197
1197
|
throw new AppwriteException('Missing required parameter: "locale"');
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
|
-
|
|
1201
|
-
|
|
1200
|
+
const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1201
|
+
const payload: Payload = {};
|
|
1202
1202
|
|
|
1203
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1203
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1204
1204
|
return await this.client.call('get', uri, {
|
|
1205
1205
|
'content-type': 'application/json',
|
|
1206
1206
|
}, payload);
|
|
@@ -1234,14 +1234,14 @@ export class Projects extends Service {
|
|
|
1234
1234
|
throw new AppwriteException('Missing required parameter: "message"');
|
|
1235
1235
|
}
|
|
1236
1236
|
|
|
1237
|
-
|
|
1238
|
-
|
|
1237
|
+
const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1238
|
+
const payload: Payload = {};
|
|
1239
1239
|
|
|
1240
1240
|
if (typeof message !== 'undefined') {
|
|
1241
1241
|
payload['message'] = message;
|
|
1242
1242
|
}
|
|
1243
1243
|
|
|
1244
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1244
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1245
1245
|
return await this.client.call('patch', uri, {
|
|
1246
1246
|
'content-type': 'application/json',
|
|
1247
1247
|
}, payload);
|
|
@@ -1270,44 +1270,17 @@ export class Projects extends Service {
|
|
|
1270
1270
|
throw new AppwriteException('Missing required parameter: "locale"');
|
|
1271
1271
|
}
|
|
1272
1272
|
|
|
1273
|
-
|
|
1274
|
-
|
|
1273
|
+
const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1274
|
+
const payload: Payload = {};
|
|
1275
1275
|
|
|
1276
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1276
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1277
1277
|
return await this.client.call('delete', uri, {
|
|
1278
1278
|
'content-type': 'application/json',
|
|
1279
1279
|
}, payload);
|
|
1280
1280
|
}
|
|
1281
1281
|
|
|
1282
1282
|
/**
|
|
1283
|
-
*
|
|
1284
|
-
*
|
|
1285
|
-
*
|
|
1286
|
-
* @param {string} projectId
|
|
1287
|
-
* @param {string} range
|
|
1288
|
-
* @throws {AppwriteException}
|
|
1289
|
-
* @returns {Promise}
|
|
1290
|
-
*/
|
|
1291
|
-
async getUsage(projectId: string, range?: string): Promise<Models.UsageProject> {
|
|
1292
|
-
if (typeof projectId === 'undefined') {
|
|
1293
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
let path = '/projects/{projectId}/usage'.replace('{projectId}', projectId);
|
|
1297
|
-
let payload: Payload = {};
|
|
1298
|
-
|
|
1299
|
-
if (typeof range !== 'undefined') {
|
|
1300
|
-
payload['range'] = range;
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
const uri = new URL(this.client.config.endpoint + path);
|
|
1304
|
-
return await this.client.call('get', uri, {
|
|
1305
|
-
'content-type': 'application/json',
|
|
1306
|
-
}, payload);
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
/**
|
|
1310
|
-
* List Webhooks
|
|
1283
|
+
* List webhooks
|
|
1311
1284
|
*
|
|
1312
1285
|
*
|
|
1313
1286
|
* @param {string} projectId
|
|
@@ -1319,17 +1292,17 @@ export class Projects extends Service {
|
|
|
1319
1292
|
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
1320
1293
|
}
|
|
1321
1294
|
|
|
1322
|
-
|
|
1323
|
-
|
|
1295
|
+
const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
|
|
1296
|
+
const payload: Payload = {};
|
|
1324
1297
|
|
|
1325
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1298
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1326
1299
|
return await this.client.call('get', uri, {
|
|
1327
1300
|
'content-type': 'application/json',
|
|
1328
1301
|
}, payload);
|
|
1329
1302
|
}
|
|
1330
1303
|
|
|
1331
1304
|
/**
|
|
1332
|
-
* Create
|
|
1305
|
+
* Create webhook
|
|
1333
1306
|
*
|
|
1334
1307
|
*
|
|
1335
1308
|
* @param {string} projectId
|
|
@@ -1363,8 +1336,8 @@ export class Projects extends Service {
|
|
|
1363
1336
|
throw new AppwriteException('Missing required parameter: "security"');
|
|
1364
1337
|
}
|
|
1365
1338
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1339
|
+
const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
|
|
1340
|
+
const payload: Payload = {};
|
|
1368
1341
|
|
|
1369
1342
|
if (typeof name !== 'undefined') {
|
|
1370
1343
|
payload['name'] = name;
|
|
@@ -1390,14 +1363,14 @@ export class Projects extends Service {
|
|
|
1390
1363
|
payload['httpPass'] = httpPass;
|
|
1391
1364
|
}
|
|
1392
1365
|
|
|
1393
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1366
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1394
1367
|
return await this.client.call('post', uri, {
|
|
1395
1368
|
'content-type': 'application/json',
|
|
1396
1369
|
}, payload);
|
|
1397
1370
|
}
|
|
1398
1371
|
|
|
1399
1372
|
/**
|
|
1400
|
-
* Get
|
|
1373
|
+
* Get webhook
|
|
1401
1374
|
*
|
|
1402
1375
|
*
|
|
1403
1376
|
* @param {string} projectId
|
|
@@ -1414,17 +1387,17 @@ export class Projects extends Service {
|
|
|
1414
1387
|
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
1415
1388
|
}
|
|
1416
1389
|
|
|
1417
|
-
|
|
1418
|
-
|
|
1390
|
+
const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1391
|
+
const payload: Payload = {};
|
|
1419
1392
|
|
|
1420
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1393
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1421
1394
|
return await this.client.call('get', uri, {
|
|
1422
1395
|
'content-type': 'application/json',
|
|
1423
1396
|
}, payload);
|
|
1424
1397
|
}
|
|
1425
1398
|
|
|
1426
1399
|
/**
|
|
1427
|
-
* Update
|
|
1400
|
+
* Update webhook
|
|
1428
1401
|
*
|
|
1429
1402
|
*
|
|
1430
1403
|
* @param {string} projectId
|
|
@@ -1463,8 +1436,8 @@ export class Projects extends Service {
|
|
|
1463
1436
|
throw new AppwriteException('Missing required parameter: "security"');
|
|
1464
1437
|
}
|
|
1465
1438
|
|
|
1466
|
-
|
|
1467
|
-
|
|
1439
|
+
const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1440
|
+
const payload: Payload = {};
|
|
1468
1441
|
|
|
1469
1442
|
if (typeof name !== 'undefined') {
|
|
1470
1443
|
payload['name'] = name;
|
|
@@ -1490,14 +1463,14 @@ export class Projects extends Service {
|
|
|
1490
1463
|
payload['httpPass'] = httpPass;
|
|
1491
1464
|
}
|
|
1492
1465
|
|
|
1493
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1466
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1494
1467
|
return await this.client.call('put', uri, {
|
|
1495
1468
|
'content-type': 'application/json',
|
|
1496
1469
|
}, payload);
|
|
1497
1470
|
}
|
|
1498
1471
|
|
|
1499
1472
|
/**
|
|
1500
|
-
* Delete
|
|
1473
|
+
* Delete webhook
|
|
1501
1474
|
*
|
|
1502
1475
|
*
|
|
1503
1476
|
* @param {string} projectId
|
|
@@ -1514,17 +1487,17 @@ export class Projects extends Service {
|
|
|
1514
1487
|
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
1515
1488
|
}
|
|
1516
1489
|
|
|
1517
|
-
|
|
1518
|
-
|
|
1490
|
+
const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1491
|
+
const payload: Payload = {};
|
|
1519
1492
|
|
|
1520
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1493
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1521
1494
|
return await this.client.call('delete', uri, {
|
|
1522
1495
|
'content-type': 'application/json',
|
|
1523
1496
|
}, payload);
|
|
1524
1497
|
}
|
|
1525
1498
|
|
|
1526
1499
|
/**
|
|
1527
|
-
* Update
|
|
1500
|
+
* Update webhook signature key
|
|
1528
1501
|
*
|
|
1529
1502
|
*
|
|
1530
1503
|
* @param {string} projectId
|
|
@@ -1541,10 +1514,10 @@ export class Projects extends Service {
|
|
|
1541
1514
|
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
1542
1515
|
}
|
|
1543
1516
|
|
|
1544
|
-
|
|
1545
|
-
|
|
1517
|
+
const apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1518
|
+
const payload: Payload = {};
|
|
1546
1519
|
|
|
1547
|
-
const uri = new URL(this.client.config.endpoint +
|
|
1520
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1548
1521
|
return await this.client.call('patch', uri, {
|
|
1549
1522
|
'content-type': 'application/json',
|
|
1550
1523
|
}, payload);
|