@appwrite.io/console 15.4.0 → 15.5.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.
- package/README.md +1 -1
- package/dist/cjs/sdk.js +502 -48
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +502 -48
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +502 -48
- package/package.json +1 -1
- package/types/enums/organization-key-scopes.d.ts +2 -0
- package/types/enums/query-suggestion-resource.d.ts +2 -1
- package/types/models.d.ts +124 -0
- package/types/services/apps.d.ts +102 -1
- package/types/services/organization.d.ts +104 -0
- package/types/services/project.d.ts +4 -1
- package/types/services/projects.d.ts +0 -25
- package/types/services/teams.d.ts +119 -0
- package/types/services/vectors-db.d.ts +36 -0
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
|
|
|
33
33
|
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@15.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@15.5.0"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
|
package/dist/cjs/sdk.js
CHANGED
|
@@ -647,7 +647,7 @@ class Client {
|
|
|
647
647
|
'x-sdk-name': 'Console',
|
|
648
648
|
'x-sdk-platform': 'console',
|
|
649
649
|
'x-sdk-language': 'web',
|
|
650
|
-
'x-sdk-version': '15.
|
|
650
|
+
'x-sdk-version': '15.5.0',
|
|
651
651
|
'X-Appwrite-Response-Format': '1.9.5',
|
|
652
652
|
};
|
|
653
653
|
this.realtime = {
|
|
@@ -4063,6 +4063,22 @@ class Apps {
|
|
|
4063
4063
|
};
|
|
4064
4064
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
4065
4065
|
}
|
|
4066
|
+
/**
|
|
4067
|
+
* List scopes an application can request when installed on a team.
|
|
4068
|
+
*
|
|
4069
|
+
* @throws {AppwriteException}
|
|
4070
|
+
* @returns {Promise<Models.AppScopeList>}
|
|
4071
|
+
*/
|
|
4072
|
+
listInstallationScopes() {
|
|
4073
|
+
const apiPath = '/apps/scopes/installations';
|
|
4074
|
+
const payload = {};
|
|
4075
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4076
|
+
const apiHeaders = {
|
|
4077
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4078
|
+
'accept': 'application/json',
|
|
4079
|
+
};
|
|
4080
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
4081
|
+
}
|
|
4066
4082
|
/**
|
|
4067
4083
|
* List scopes an application can request during the OAuth2 flow.
|
|
4068
4084
|
*
|
|
@@ -4126,7 +4142,9 @@ class Apps {
|
|
|
4126
4142
|
redirectUris: rest[13],
|
|
4127
4143
|
postLogoutRedirectUris: rest[14],
|
|
4128
4144
|
type: rest[15],
|
|
4129
|
-
deviceFlow: rest[16]
|
|
4145
|
+
deviceFlow: rest[16],
|
|
4146
|
+
installationScopes: rest[17],
|
|
4147
|
+
installationRedirectUrl: rest[18]
|
|
4130
4148
|
};
|
|
4131
4149
|
}
|
|
4132
4150
|
const appId = params.appId;
|
|
@@ -4147,6 +4165,8 @@ class Apps {
|
|
|
4147
4165
|
const postLogoutRedirectUris = params.postLogoutRedirectUris;
|
|
4148
4166
|
const type = params.type;
|
|
4149
4167
|
const deviceFlow = params.deviceFlow;
|
|
4168
|
+
const installationScopes = params.installationScopes;
|
|
4169
|
+
const installationRedirectUrl = params.installationRedirectUrl;
|
|
4150
4170
|
if (typeof appId === 'undefined') {
|
|
4151
4171
|
throw new AppwriteException('Missing required parameter: "appId"');
|
|
4152
4172
|
}
|
|
@@ -4206,6 +4226,12 @@ class Apps {
|
|
|
4206
4226
|
if (typeof deviceFlow !== 'undefined') {
|
|
4207
4227
|
payload['deviceFlow'] = deviceFlow;
|
|
4208
4228
|
}
|
|
4229
|
+
if (typeof installationScopes !== 'undefined') {
|
|
4230
|
+
payload['installationScopes'] = installationScopes;
|
|
4231
|
+
}
|
|
4232
|
+
if (typeof installationRedirectUrl !== 'undefined') {
|
|
4233
|
+
payload['installationRedirectUrl'] = installationRedirectUrl;
|
|
4234
|
+
}
|
|
4209
4235
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4210
4236
|
const apiHeaders = {
|
|
4211
4237
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -4238,6 +4264,120 @@ class Apps {
|
|
|
4238
4264
|
};
|
|
4239
4265
|
return this.client.call('delete', uri, apiHeaders, payload);
|
|
4240
4266
|
}
|
|
4267
|
+
listKeys(paramsOrFirst, ...rest) {
|
|
4268
|
+
let params;
|
|
4269
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4270
|
+
params = (paramsOrFirst || {});
|
|
4271
|
+
}
|
|
4272
|
+
else {
|
|
4273
|
+
params = {
|
|
4274
|
+
appId: paramsOrFirst,
|
|
4275
|
+
queries: rest[0],
|
|
4276
|
+
total: rest[1]
|
|
4277
|
+
};
|
|
4278
|
+
}
|
|
4279
|
+
const appId = params.appId;
|
|
4280
|
+
const queries = params.queries;
|
|
4281
|
+
const total = params.total;
|
|
4282
|
+
if (typeof appId === 'undefined') {
|
|
4283
|
+
throw new AppwriteException('Missing required parameter: "appId"');
|
|
4284
|
+
}
|
|
4285
|
+
const apiPath = '/apps/{appId}/keys'.replace('{appId}', encodeURIComponent(String(appId)));
|
|
4286
|
+
const payload = {};
|
|
4287
|
+
if (typeof queries !== 'undefined') {
|
|
4288
|
+
payload['queries'] = queries;
|
|
4289
|
+
}
|
|
4290
|
+
if (typeof total !== 'undefined') {
|
|
4291
|
+
payload['total'] = total;
|
|
4292
|
+
}
|
|
4293
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4294
|
+
const apiHeaders = {
|
|
4295
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4296
|
+
'accept': 'application/json',
|
|
4297
|
+
};
|
|
4298
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
4299
|
+
}
|
|
4300
|
+
createKey(paramsOrFirst) {
|
|
4301
|
+
let params;
|
|
4302
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4303
|
+
params = (paramsOrFirst || {});
|
|
4304
|
+
}
|
|
4305
|
+
else {
|
|
4306
|
+
params = {
|
|
4307
|
+
appId: paramsOrFirst
|
|
4308
|
+
};
|
|
4309
|
+
}
|
|
4310
|
+
const appId = params.appId;
|
|
4311
|
+
if (typeof appId === 'undefined') {
|
|
4312
|
+
throw new AppwriteException('Missing required parameter: "appId"');
|
|
4313
|
+
}
|
|
4314
|
+
const apiPath = '/apps/{appId}/keys'.replace('{appId}', encodeURIComponent(String(appId)));
|
|
4315
|
+
const payload = {};
|
|
4316
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4317
|
+
const apiHeaders = {
|
|
4318
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4319
|
+
'content-type': 'application/json',
|
|
4320
|
+
'accept': 'application/json',
|
|
4321
|
+
};
|
|
4322
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
4323
|
+
}
|
|
4324
|
+
getKey(paramsOrFirst, ...rest) {
|
|
4325
|
+
let params;
|
|
4326
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4327
|
+
params = (paramsOrFirst || {});
|
|
4328
|
+
}
|
|
4329
|
+
else {
|
|
4330
|
+
params = {
|
|
4331
|
+
appId: paramsOrFirst,
|
|
4332
|
+
keyId: rest[0]
|
|
4333
|
+
};
|
|
4334
|
+
}
|
|
4335
|
+
const appId = params.appId;
|
|
4336
|
+
const keyId = params.keyId;
|
|
4337
|
+
if (typeof appId === 'undefined') {
|
|
4338
|
+
throw new AppwriteException('Missing required parameter: "appId"');
|
|
4339
|
+
}
|
|
4340
|
+
if (typeof keyId === 'undefined') {
|
|
4341
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
4342
|
+
}
|
|
4343
|
+
const apiPath = '/apps/{appId}/keys/{keyId}'.replace('{appId}', encodeURIComponent(String(appId))).replace('{keyId}', encodeURIComponent(String(keyId)));
|
|
4344
|
+
const payload = {};
|
|
4345
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4346
|
+
const apiHeaders = {
|
|
4347
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4348
|
+
'accept': 'application/json',
|
|
4349
|
+
};
|
|
4350
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
4351
|
+
}
|
|
4352
|
+
deleteKey(paramsOrFirst, ...rest) {
|
|
4353
|
+
let params;
|
|
4354
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4355
|
+
params = (paramsOrFirst || {});
|
|
4356
|
+
}
|
|
4357
|
+
else {
|
|
4358
|
+
params = {
|
|
4359
|
+
appId: paramsOrFirst,
|
|
4360
|
+
keyId: rest[0]
|
|
4361
|
+
};
|
|
4362
|
+
}
|
|
4363
|
+
const appId = params.appId;
|
|
4364
|
+
const keyId = params.keyId;
|
|
4365
|
+
if (typeof appId === 'undefined') {
|
|
4366
|
+
throw new AppwriteException('Missing required parameter: "appId"');
|
|
4367
|
+
}
|
|
4368
|
+
if (typeof keyId === 'undefined') {
|
|
4369
|
+
throw new AppwriteException('Missing required parameter: "keyId"');
|
|
4370
|
+
}
|
|
4371
|
+
const apiPath = '/apps/{appId}/keys/{keyId}'.replace('{appId}', encodeURIComponent(String(appId))).replace('{keyId}', encodeURIComponent(String(keyId)));
|
|
4372
|
+
const payload = {};
|
|
4373
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4374
|
+
const apiHeaders = {
|
|
4375
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4376
|
+
'content-type': 'application/json',
|
|
4377
|
+
'accept': 'application/json',
|
|
4378
|
+
};
|
|
4379
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
4380
|
+
}
|
|
4241
4381
|
updateLabels(paramsOrFirst, ...rest) {
|
|
4242
4382
|
let params;
|
|
4243
4383
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -21367,6 +21507,142 @@ class Organization {
|
|
|
21367
21507
|
};
|
|
21368
21508
|
return this.client.call('delete', uri, apiHeaders, payload);
|
|
21369
21509
|
}
|
|
21510
|
+
listInstallations(paramsOrFirst, ...rest) {
|
|
21511
|
+
let params;
|
|
21512
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21513
|
+
params = (paramsOrFirst || {});
|
|
21514
|
+
}
|
|
21515
|
+
else {
|
|
21516
|
+
params = {
|
|
21517
|
+
queries: paramsOrFirst,
|
|
21518
|
+
total: rest[0]
|
|
21519
|
+
};
|
|
21520
|
+
}
|
|
21521
|
+
const queries = params.queries;
|
|
21522
|
+
const total = params.total;
|
|
21523
|
+
const apiPath = '/organization/installations';
|
|
21524
|
+
const payload = {};
|
|
21525
|
+
if (typeof queries !== 'undefined') {
|
|
21526
|
+
payload['queries'] = queries;
|
|
21527
|
+
}
|
|
21528
|
+
if (typeof total !== 'undefined') {
|
|
21529
|
+
payload['total'] = total;
|
|
21530
|
+
}
|
|
21531
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21532
|
+
const apiHeaders = {
|
|
21533
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
21534
|
+
'accept': 'application/json',
|
|
21535
|
+
};
|
|
21536
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
21537
|
+
}
|
|
21538
|
+
createInstallation(paramsOrFirst, ...rest) {
|
|
21539
|
+
let params;
|
|
21540
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21541
|
+
params = (paramsOrFirst || {});
|
|
21542
|
+
}
|
|
21543
|
+
else {
|
|
21544
|
+
params = {
|
|
21545
|
+
appId: paramsOrFirst,
|
|
21546
|
+
authorizationDetails: rest[0]
|
|
21547
|
+
};
|
|
21548
|
+
}
|
|
21549
|
+
const appId = params.appId;
|
|
21550
|
+
const authorizationDetails = params.authorizationDetails;
|
|
21551
|
+
if (typeof appId === 'undefined') {
|
|
21552
|
+
throw new AppwriteException('Missing required parameter: "appId"');
|
|
21553
|
+
}
|
|
21554
|
+
const apiPath = '/organization/installations';
|
|
21555
|
+
const payload = {};
|
|
21556
|
+
if (typeof appId !== 'undefined') {
|
|
21557
|
+
payload['appId'] = appId;
|
|
21558
|
+
}
|
|
21559
|
+
if (typeof authorizationDetails !== 'undefined') {
|
|
21560
|
+
payload['authorizationDetails'] = authorizationDetails;
|
|
21561
|
+
}
|
|
21562
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21563
|
+
const apiHeaders = {
|
|
21564
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
21565
|
+
'content-type': 'application/json',
|
|
21566
|
+
'accept': 'application/json',
|
|
21567
|
+
};
|
|
21568
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
21569
|
+
}
|
|
21570
|
+
getInstallation(paramsOrFirst) {
|
|
21571
|
+
let params;
|
|
21572
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21573
|
+
params = (paramsOrFirst || {});
|
|
21574
|
+
}
|
|
21575
|
+
else {
|
|
21576
|
+
params = {
|
|
21577
|
+
installationId: paramsOrFirst
|
|
21578
|
+
};
|
|
21579
|
+
}
|
|
21580
|
+
const installationId = params.installationId;
|
|
21581
|
+
if (typeof installationId === 'undefined') {
|
|
21582
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
21583
|
+
}
|
|
21584
|
+
const apiPath = '/organization/installations/{installationId}'.replace('{installationId}', encodeURIComponent(String(installationId)));
|
|
21585
|
+
const payload = {};
|
|
21586
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21587
|
+
const apiHeaders = {
|
|
21588
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
21589
|
+
'accept': 'application/json',
|
|
21590
|
+
};
|
|
21591
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
21592
|
+
}
|
|
21593
|
+
updateInstallation(paramsOrFirst, ...rest) {
|
|
21594
|
+
let params;
|
|
21595
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21596
|
+
params = (paramsOrFirst || {});
|
|
21597
|
+
}
|
|
21598
|
+
else {
|
|
21599
|
+
params = {
|
|
21600
|
+
installationId: paramsOrFirst,
|
|
21601
|
+
authorizationDetails: rest[0]
|
|
21602
|
+
};
|
|
21603
|
+
}
|
|
21604
|
+
const installationId = params.installationId;
|
|
21605
|
+
const authorizationDetails = params.authorizationDetails;
|
|
21606
|
+
if (typeof installationId === 'undefined') {
|
|
21607
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
21608
|
+
}
|
|
21609
|
+
const apiPath = '/organization/installations/{installationId}'.replace('{installationId}', encodeURIComponent(String(installationId)));
|
|
21610
|
+
const payload = {};
|
|
21611
|
+
if (typeof authorizationDetails !== 'undefined') {
|
|
21612
|
+
payload['authorizationDetails'] = authorizationDetails;
|
|
21613
|
+
}
|
|
21614
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21615
|
+
const apiHeaders = {
|
|
21616
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
21617
|
+
'content-type': 'application/json',
|
|
21618
|
+
'accept': 'application/json',
|
|
21619
|
+
};
|
|
21620
|
+
return this.client.call('put', uri, apiHeaders, payload);
|
|
21621
|
+
}
|
|
21622
|
+
deleteInstallation(paramsOrFirst) {
|
|
21623
|
+
let params;
|
|
21624
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
21625
|
+
params = (paramsOrFirst || {});
|
|
21626
|
+
}
|
|
21627
|
+
else {
|
|
21628
|
+
params = {
|
|
21629
|
+
installationId: paramsOrFirst
|
|
21630
|
+
};
|
|
21631
|
+
}
|
|
21632
|
+
const installationId = params.installationId;
|
|
21633
|
+
if (typeof installationId === 'undefined') {
|
|
21634
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
21635
|
+
}
|
|
21636
|
+
const apiPath = '/organization/installations/{installationId}'.replace('{installationId}', encodeURIComponent(String(installationId)));
|
|
21637
|
+
const payload = {};
|
|
21638
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21639
|
+
const apiHeaders = {
|
|
21640
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
21641
|
+
'content-type': 'application/json',
|
|
21642
|
+
'accept': 'application/json',
|
|
21643
|
+
};
|
|
21644
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
21645
|
+
}
|
|
21370
21646
|
listKeys(paramsOrFirst, ...rest) {
|
|
21371
21647
|
let params;
|
|
21372
21648
|
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -25329,12 +25605,13 @@ class Project {
|
|
|
25329
25605
|
refreshTokenDuration: rest[4],
|
|
25330
25606
|
publicAccessTokenDuration: rest[5],
|
|
25331
25607
|
publicRefreshTokenDuration: rest[6],
|
|
25332
|
-
|
|
25333
|
-
|
|
25334
|
-
|
|
25335
|
-
|
|
25336
|
-
|
|
25337
|
-
|
|
25608
|
+
installationAccessTokenDuration: rest[7],
|
|
25609
|
+
confidentialPkce: rest[8],
|
|
25610
|
+
verificationUrl: rest[9],
|
|
25611
|
+
userCodeLength: rest[10],
|
|
25612
|
+
userCodeFormat: rest[11],
|
|
25613
|
+
deviceCodeDuration: rest[12],
|
|
25614
|
+
defaultScopes: rest[13]
|
|
25338
25615
|
};
|
|
25339
25616
|
}
|
|
25340
25617
|
const enabled = params.enabled;
|
|
@@ -25345,6 +25622,7 @@ class Project {
|
|
|
25345
25622
|
const refreshTokenDuration = params.refreshTokenDuration;
|
|
25346
25623
|
const publicAccessTokenDuration = params.publicAccessTokenDuration;
|
|
25347
25624
|
const publicRefreshTokenDuration = params.publicRefreshTokenDuration;
|
|
25625
|
+
const installationAccessTokenDuration = params.installationAccessTokenDuration;
|
|
25348
25626
|
const confidentialPkce = params.confidentialPkce;
|
|
25349
25627
|
const verificationUrl = params.verificationUrl;
|
|
25350
25628
|
const userCodeLength = params.userCodeLength;
|
|
@@ -25383,6 +25661,9 @@ class Project {
|
|
|
25383
25661
|
if (typeof publicRefreshTokenDuration !== 'undefined') {
|
|
25384
25662
|
payload['publicRefreshTokenDuration'] = publicRefreshTokenDuration;
|
|
25385
25663
|
}
|
|
25664
|
+
if (typeof installationAccessTokenDuration !== 'undefined') {
|
|
25665
|
+
payload['installationAccessTokenDuration'] = installationAccessTokenDuration;
|
|
25666
|
+
}
|
|
25386
25667
|
if (typeof confidentialPkce !== 'undefined') {
|
|
25387
25668
|
payload['confidentialPkce'] = confidentialPkce;
|
|
25388
25669
|
}
|
|
@@ -28637,46 +28918,6 @@ class Projects {
|
|
|
28637
28918
|
};
|
|
28638
28919
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
28639
28920
|
}
|
|
28640
|
-
createDevKey(paramsOrFirst, ...rest) {
|
|
28641
|
-
let params;
|
|
28642
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
28643
|
-
params = (paramsOrFirst || {});
|
|
28644
|
-
}
|
|
28645
|
-
else {
|
|
28646
|
-
params = {
|
|
28647
|
-
projectId: paramsOrFirst,
|
|
28648
|
-
name: rest[0],
|
|
28649
|
-
expire: rest[1]
|
|
28650
|
-
};
|
|
28651
|
-
}
|
|
28652
|
-
const projectId = params.projectId;
|
|
28653
|
-
const name = params.name;
|
|
28654
|
-
const expire = params.expire;
|
|
28655
|
-
if (typeof projectId === 'undefined') {
|
|
28656
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
28657
|
-
}
|
|
28658
|
-
if (typeof name === 'undefined') {
|
|
28659
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
28660
|
-
}
|
|
28661
|
-
if (typeof expire === 'undefined') {
|
|
28662
|
-
throw new AppwriteException('Missing required parameter: "expire"');
|
|
28663
|
-
}
|
|
28664
|
-
const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', encodeURIComponent(String(projectId)));
|
|
28665
|
-
const payload = {};
|
|
28666
|
-
if (typeof name !== 'undefined') {
|
|
28667
|
-
payload['name'] = name;
|
|
28668
|
-
}
|
|
28669
|
-
if (typeof expire !== 'undefined') {
|
|
28670
|
-
payload['expire'] = expire;
|
|
28671
|
-
}
|
|
28672
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
28673
|
-
const apiHeaders = {
|
|
28674
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
28675
|
-
'content-type': 'application/json',
|
|
28676
|
-
'accept': 'application/json',
|
|
28677
|
-
};
|
|
28678
|
-
return this.client.call('post', uri, apiHeaders, payload);
|
|
28679
|
-
}
|
|
28680
28921
|
getDevKey(paramsOrFirst, ...rest) {
|
|
28681
28922
|
let params;
|
|
28682
28923
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -34972,6 +35213,167 @@ class Teams {
|
|
|
34972
35213
|
};
|
|
34973
35214
|
return this.client.call('delete', uri, apiHeaders, payload);
|
|
34974
35215
|
}
|
|
35216
|
+
listInstallations(paramsOrFirst, ...rest) {
|
|
35217
|
+
let params;
|
|
35218
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
35219
|
+
params = (paramsOrFirst || {});
|
|
35220
|
+
}
|
|
35221
|
+
else {
|
|
35222
|
+
params = {
|
|
35223
|
+
teamId: paramsOrFirst,
|
|
35224
|
+
queries: rest[0],
|
|
35225
|
+
total: rest[1]
|
|
35226
|
+
};
|
|
35227
|
+
}
|
|
35228
|
+
const teamId = params.teamId;
|
|
35229
|
+
const queries = params.queries;
|
|
35230
|
+
const total = params.total;
|
|
35231
|
+
if (typeof teamId === 'undefined') {
|
|
35232
|
+
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
35233
|
+
}
|
|
35234
|
+
const apiPath = '/teams/{teamId}/installations'.replace('{teamId}', encodeURIComponent(String(teamId)));
|
|
35235
|
+
const payload = {};
|
|
35236
|
+
if (typeof queries !== 'undefined') {
|
|
35237
|
+
payload['queries'] = queries;
|
|
35238
|
+
}
|
|
35239
|
+
if (typeof total !== 'undefined') {
|
|
35240
|
+
payload['total'] = total;
|
|
35241
|
+
}
|
|
35242
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35243
|
+
const apiHeaders = {
|
|
35244
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
35245
|
+
'accept': 'application/json',
|
|
35246
|
+
};
|
|
35247
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
35248
|
+
}
|
|
35249
|
+
createInstallation(paramsOrFirst, ...rest) {
|
|
35250
|
+
let params;
|
|
35251
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
35252
|
+
params = (paramsOrFirst || {});
|
|
35253
|
+
}
|
|
35254
|
+
else {
|
|
35255
|
+
params = {
|
|
35256
|
+
teamId: paramsOrFirst,
|
|
35257
|
+
appId: rest[0],
|
|
35258
|
+
authorizationDetails: rest[1]
|
|
35259
|
+
};
|
|
35260
|
+
}
|
|
35261
|
+
const teamId = params.teamId;
|
|
35262
|
+
const appId = params.appId;
|
|
35263
|
+
const authorizationDetails = params.authorizationDetails;
|
|
35264
|
+
if (typeof teamId === 'undefined') {
|
|
35265
|
+
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
35266
|
+
}
|
|
35267
|
+
if (typeof appId === 'undefined') {
|
|
35268
|
+
throw new AppwriteException('Missing required parameter: "appId"');
|
|
35269
|
+
}
|
|
35270
|
+
const apiPath = '/teams/{teamId}/installations'.replace('{teamId}', encodeURIComponent(String(teamId)));
|
|
35271
|
+
const payload = {};
|
|
35272
|
+
if (typeof appId !== 'undefined') {
|
|
35273
|
+
payload['appId'] = appId;
|
|
35274
|
+
}
|
|
35275
|
+
if (typeof authorizationDetails !== 'undefined') {
|
|
35276
|
+
payload['authorizationDetails'] = authorizationDetails;
|
|
35277
|
+
}
|
|
35278
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35279
|
+
const apiHeaders = {
|
|
35280
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
35281
|
+
'content-type': 'application/json',
|
|
35282
|
+
'accept': 'application/json',
|
|
35283
|
+
};
|
|
35284
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
35285
|
+
}
|
|
35286
|
+
getInstallation(paramsOrFirst, ...rest) {
|
|
35287
|
+
let params;
|
|
35288
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
35289
|
+
params = (paramsOrFirst || {});
|
|
35290
|
+
}
|
|
35291
|
+
else {
|
|
35292
|
+
params = {
|
|
35293
|
+
teamId: paramsOrFirst,
|
|
35294
|
+
installationId: rest[0]
|
|
35295
|
+
};
|
|
35296
|
+
}
|
|
35297
|
+
const teamId = params.teamId;
|
|
35298
|
+
const installationId = params.installationId;
|
|
35299
|
+
if (typeof teamId === 'undefined') {
|
|
35300
|
+
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
35301
|
+
}
|
|
35302
|
+
if (typeof installationId === 'undefined') {
|
|
35303
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
35304
|
+
}
|
|
35305
|
+
const apiPath = '/teams/{teamId}/installations/{installationId}'.replace('{teamId}', encodeURIComponent(String(teamId))).replace('{installationId}', encodeURIComponent(String(installationId)));
|
|
35306
|
+
const payload = {};
|
|
35307
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35308
|
+
const apiHeaders = {
|
|
35309
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
35310
|
+
'accept': 'application/json',
|
|
35311
|
+
};
|
|
35312
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
35313
|
+
}
|
|
35314
|
+
updateInstallation(paramsOrFirst, ...rest) {
|
|
35315
|
+
let params;
|
|
35316
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
35317
|
+
params = (paramsOrFirst || {});
|
|
35318
|
+
}
|
|
35319
|
+
else {
|
|
35320
|
+
params = {
|
|
35321
|
+
teamId: paramsOrFirst,
|
|
35322
|
+
installationId: rest[0],
|
|
35323
|
+
authorizationDetails: rest[1]
|
|
35324
|
+
};
|
|
35325
|
+
}
|
|
35326
|
+
const teamId = params.teamId;
|
|
35327
|
+
const installationId = params.installationId;
|
|
35328
|
+
const authorizationDetails = params.authorizationDetails;
|
|
35329
|
+
if (typeof teamId === 'undefined') {
|
|
35330
|
+
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
35331
|
+
}
|
|
35332
|
+
if (typeof installationId === 'undefined') {
|
|
35333
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
35334
|
+
}
|
|
35335
|
+
const apiPath = '/teams/{teamId}/installations/{installationId}'.replace('{teamId}', encodeURIComponent(String(teamId))).replace('{installationId}', encodeURIComponent(String(installationId)));
|
|
35336
|
+
const payload = {};
|
|
35337
|
+
if (typeof authorizationDetails !== 'undefined') {
|
|
35338
|
+
payload['authorizationDetails'] = authorizationDetails;
|
|
35339
|
+
}
|
|
35340
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35341
|
+
const apiHeaders = {
|
|
35342
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
35343
|
+
'content-type': 'application/json',
|
|
35344
|
+
'accept': 'application/json',
|
|
35345
|
+
};
|
|
35346
|
+
return this.client.call('put', uri, apiHeaders, payload);
|
|
35347
|
+
}
|
|
35348
|
+
deleteInstallation(paramsOrFirst, ...rest) {
|
|
35349
|
+
let params;
|
|
35350
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
35351
|
+
params = (paramsOrFirst || {});
|
|
35352
|
+
}
|
|
35353
|
+
else {
|
|
35354
|
+
params = {
|
|
35355
|
+
teamId: paramsOrFirst,
|
|
35356
|
+
installationId: rest[0]
|
|
35357
|
+
};
|
|
35358
|
+
}
|
|
35359
|
+
const teamId = params.teamId;
|
|
35360
|
+
const installationId = params.installationId;
|
|
35361
|
+
if (typeof teamId === 'undefined') {
|
|
35362
|
+
throw new AppwriteException('Missing required parameter: "teamId"');
|
|
35363
|
+
}
|
|
35364
|
+
if (typeof installationId === 'undefined') {
|
|
35365
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
35366
|
+
}
|
|
35367
|
+
const apiPath = '/teams/{teamId}/installations/{installationId}'.replace('{teamId}', encodeURIComponent(String(teamId))).replace('{installationId}', encodeURIComponent(String(installationId)));
|
|
35368
|
+
const payload = {};
|
|
35369
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
35370
|
+
const apiHeaders = {
|
|
35371
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
35372
|
+
'content-type': 'application/json',
|
|
35373
|
+
'accept': 'application/json',
|
|
35374
|
+
};
|
|
35375
|
+
return this.client.call('delete', uri, apiHeaders, payload);
|
|
35376
|
+
}
|
|
34975
35377
|
listLogs(paramsOrFirst, ...rest) {
|
|
34976
35378
|
let params;
|
|
34977
35379
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -38496,6 +38898,55 @@ class VectorsDB {
|
|
|
38496
38898
|
};
|
|
38497
38899
|
return this.client.call('delete', uri, apiHeaders, payload);
|
|
38498
38900
|
}
|
|
38901
|
+
createQuery(paramsOrFirst, ...rest) {
|
|
38902
|
+
let params;
|
|
38903
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
38904
|
+
params = (paramsOrFirst || {});
|
|
38905
|
+
}
|
|
38906
|
+
else {
|
|
38907
|
+
params = {
|
|
38908
|
+
databaseId: paramsOrFirst,
|
|
38909
|
+
collectionId: rest[0],
|
|
38910
|
+
queries: rest[1],
|
|
38911
|
+
transactionId: rest[2],
|
|
38912
|
+
total: rest[3],
|
|
38913
|
+
ttl: rest[4]
|
|
38914
|
+
};
|
|
38915
|
+
}
|
|
38916
|
+
const databaseId = params.databaseId;
|
|
38917
|
+
const collectionId = params.collectionId;
|
|
38918
|
+
const queries = params.queries;
|
|
38919
|
+
const transactionId = params.transactionId;
|
|
38920
|
+
const total = params.total;
|
|
38921
|
+
const ttl = params.ttl;
|
|
38922
|
+
if (typeof databaseId === 'undefined') {
|
|
38923
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
38924
|
+
}
|
|
38925
|
+
if (typeof collectionId === 'undefined') {
|
|
38926
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
38927
|
+
}
|
|
38928
|
+
const apiPath = '/vectorsdb/{databaseId}/collections/{collectionId}/documents/query'.replace('{databaseId}', encodeURIComponent(String(databaseId))).replace('{collectionId}', encodeURIComponent(String(collectionId)));
|
|
38929
|
+
const payload = {};
|
|
38930
|
+
if (typeof queries !== 'undefined') {
|
|
38931
|
+
payload['queries'] = queries;
|
|
38932
|
+
}
|
|
38933
|
+
if (typeof transactionId !== 'undefined') {
|
|
38934
|
+
payload['transactionId'] = transactionId;
|
|
38935
|
+
}
|
|
38936
|
+
if (typeof total !== 'undefined') {
|
|
38937
|
+
payload['total'] = total;
|
|
38938
|
+
}
|
|
38939
|
+
if (typeof ttl !== 'undefined') {
|
|
38940
|
+
payload['ttl'] = ttl;
|
|
38941
|
+
}
|
|
38942
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
38943
|
+
const apiHeaders = {
|
|
38944
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
38945
|
+
'content-type': 'application/json',
|
|
38946
|
+
'accept': 'application/json',
|
|
38947
|
+
};
|
|
38948
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
38949
|
+
}
|
|
38499
38950
|
getDocument(paramsOrFirst, ...rest) {
|
|
38500
38951
|
let params;
|
|
38501
38952
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -41817,6 +42268,7 @@ exports.QuerySuggestionResource = void 0;
|
|
|
41817
42268
|
QuerySuggestionResource["DedicatedDatabaseOperations"] = "dedicateddatabaseoperations";
|
|
41818
42269
|
QuerySuggestionResource["DedicatedDatabaseBackups"] = "dedicateddatabasebackups";
|
|
41819
42270
|
QuerySuggestionResource["DedicatedDatabaseRestorations"] = "dedicateddatabaserestorations";
|
|
42271
|
+
QuerySuggestionResource["DedicatedDatabaseBranches"] = "dedicateddatabasebranches";
|
|
41820
42272
|
})(exports.QuerySuggestionResource || (exports.QuerySuggestionResource = {}));
|
|
41821
42273
|
|
|
41822
42274
|
exports.ProjectEmailTemplateId = void 0;
|
|
@@ -42421,6 +42873,8 @@ exports.OrganizationKeyScopes = void 0;
|
|
|
42421
42873
|
OrganizationKeyScopes["DevKeysWrite"] = "devKeys.write";
|
|
42422
42874
|
OrganizationKeyScopes["OrganizationKeysRead"] = "organization.keys.read";
|
|
42423
42875
|
OrganizationKeyScopes["OrganizationKeysWrite"] = "organization.keys.write";
|
|
42876
|
+
OrganizationKeyScopes["OrganizationInstallationsRead"] = "organization.installations.read";
|
|
42877
|
+
OrganizationKeyScopes["OrganizationInstallationsWrite"] = "organization.installations.write";
|
|
42424
42878
|
OrganizationKeyScopes["OrganizationMembershipsRead"] = "organization.memberships.read";
|
|
42425
42879
|
OrganizationKeyScopes["OrganizationMembershipsWrite"] = "organization.memberships.write";
|
|
42426
42880
|
OrganizationKeyScopes["OrganizationRead"] = "organization.read";
|