@appwrite.io/console 11.0.0 → 12.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/sdk.js CHANGED
@@ -604,12 +604,13 @@ class Client {
604
604
  locale: '',
605
605
  mode: '',
606
606
  cookie: '',
607
+ session: '',
608
+ devkey: '',
607
609
  impersonateuserid: '',
608
610
  impersonateuseremail: '',
609
611
  impersonateuserphone: '',
610
612
  platform: '',
611
613
  selfSigned: false,
612
- session: undefined,
613
614
  };
614
615
  /**
615
616
  * Custom headers for API requests.
@@ -618,8 +619,8 @@ class Client {
618
619
  'x-sdk-name': 'Console',
619
620
  'x-sdk-platform': 'console',
620
621
  'x-sdk-language': 'web',
621
- 'x-sdk-version': '11.0.0',
622
- 'X-Appwrite-Response-Format': '1.9.2',
622
+ 'x-sdk-version': '12.1.0',
623
+ 'X-Appwrite-Response-Format': '1.9.3',
623
624
  };
624
625
  this.realtime = {
625
626
  socket: undefined,
@@ -928,7 +929,7 @@ class Client {
928
929
  /**
929
930
  * Set Cookie
930
931
  *
931
- * The user cookie to authenticate with
932
+ * The user cookie to authenticate with. Used by SDKs that forward an incoming Cookie header in server-side runtimes.
932
933
  *
933
934
  * @param value string
934
935
  *
@@ -939,6 +940,34 @@ class Client {
939
940
  this.config.cookie = value;
940
941
  return this;
941
942
  }
943
+ /**
944
+ * Set Session
945
+ *
946
+ * The user session to authenticate with
947
+ *
948
+ * @param value string
949
+ *
950
+ * @return {this}
951
+ */
952
+ setSession(value) {
953
+ this.headers['X-Appwrite-Session'] = value;
954
+ this.config.session = value;
955
+ return this;
956
+ }
957
+ /**
958
+ * Set DevKey
959
+ *
960
+ * Your secret dev API key
961
+ *
962
+ * @param value string
963
+ *
964
+ * @return {this}
965
+ */
966
+ setDevKey(value) {
967
+ this.headers['X-Appwrite-Dev-Key'] = value;
968
+ this.config.devkey = value;
969
+ return this;
970
+ }
942
971
  /**
943
972
  * Set ImpersonateUserId
944
973
  *
@@ -4182,6 +4211,19 @@ class Console {
4182
4211
  const apiHeaders = {};
4183
4212
  return this.client.call('get', uri, apiHeaders, payload);
4184
4213
  }
4214
+ /**
4215
+ * List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.
4216
+ *
4217
+ * @throws {AppwriteException}
4218
+ * @returns {Promise<Models.ConsoleOAuth2ProviderList>}
4219
+ */
4220
+ listOAuth2Providers() {
4221
+ const apiPath = '/console/oauth2-providers';
4222
+ const payload = {};
4223
+ const uri = new URL(this.client.config.endpoint + apiPath);
4224
+ const apiHeaders = {};
4225
+ return this.client.call('get', uri, apiHeaders, payload);
4226
+ }
4185
4227
  getPlans(paramsOrFirst) {
4186
4228
  let params;
4187
4229
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('platform' in paramsOrFirst))) {
@@ -4308,6 +4350,19 @@ class Console {
4308
4350
  const apiHeaders = {};
4309
4351
  return this.client.call('get', uri, apiHeaders, payload);
4310
4352
  }
4353
+ /**
4354
+ * List all scopes available for project API keys, along with a description for each scope.
4355
+ *
4356
+ * @throws {AppwriteException}
4357
+ * @returns {Promise<Models.ConsoleKeyScopeList>}
4358
+ */
4359
+ listProjectScopes() {
4360
+ const apiPath = '/console/scopes/project';
4361
+ const payload = {};
4362
+ const uri = new URL(this.client.config.endpoint + apiPath);
4363
+ const apiHeaders = {};
4364
+ return this.client.call('get', uri, apiHeaders, payload);
4365
+ }
4311
4366
  createSource(paramsOrFirst, ...rest) {
4312
4367
  let params;
4313
4368
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -4437,6 +4492,47 @@ class Console {
4437
4492
  const apiHeaders = {};
4438
4493
  return this.client.call('get', uri, apiHeaders, payload);
4439
4494
  }
4495
+ suggestQueries(paramsOrFirst, ...rest) {
4496
+ let params;
4497
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resource' in paramsOrFirst || 'input' in paramsOrFirst || 'databaseId' in paramsOrFirst || 'tableId' in paramsOrFirst))) {
4498
+ params = (paramsOrFirst || {});
4499
+ }
4500
+ else {
4501
+ params = {
4502
+ resource: paramsOrFirst,
4503
+ input: rest[0],
4504
+ databaseId: rest[1],
4505
+ tableId: rest[2]
4506
+ };
4507
+ }
4508
+ const resource = params.resource;
4509
+ const input = params.input;
4510
+ const databaseId = params.databaseId;
4511
+ const tableId = params.tableId;
4512
+ if (typeof resource === 'undefined') {
4513
+ throw new AppwriteException('Missing required parameter: "resource"');
4514
+ }
4515
+ if (typeof input === 'undefined') {
4516
+ throw new AppwriteException('Missing required parameter: "input"');
4517
+ }
4518
+ const apiPath = '/console/suggestions/queries';
4519
+ const payload = {};
4520
+ if (typeof resource !== 'undefined') {
4521
+ payload['resource'] = resource;
4522
+ }
4523
+ if (typeof input !== 'undefined') {
4524
+ payload['input'] = input;
4525
+ }
4526
+ if (typeof databaseId !== 'undefined') {
4527
+ payload['databaseId'] = databaseId;
4528
+ }
4529
+ if (typeof tableId !== 'undefined') {
4530
+ payload['tableId'] = tableId;
4531
+ }
4532
+ const uri = new URL(this.client.config.endpoint + apiPath);
4533
+ const apiHeaders = {};
4534
+ return this.client.call('get', uri, apiHeaders, payload);
4535
+ }
4440
4536
  /**
4441
4537
  * Get all Environment Variables that are relevant for the console.
4442
4538
  *
@@ -9211,19 +9307,19 @@ class Domains {
9211
9307
  }
9212
9308
  else {
9213
9309
  params = {
9214
- domainId: paramsOrFirst,
9310
+ invoiceId: paramsOrFirst,
9215
9311
  organizationId: rest[0]
9216
9312
  };
9217
9313
  }
9218
- const domainId = params.domainId;
9314
+ const invoiceId = params.invoiceId;
9219
9315
  const organizationId = params.organizationId;
9220
- if (typeof domainId === 'undefined') {
9221
- throw new AppwriteException('Missing required parameter: "domainId"');
9316
+ if (typeof invoiceId === 'undefined') {
9317
+ throw new AppwriteException('Missing required parameter: "invoiceId"');
9222
9318
  }
9223
9319
  if (typeof organizationId === 'undefined') {
9224
9320
  throw new AppwriteException('Missing required parameter: "organizationId"');
9225
9321
  }
9226
- const apiPath = '/domains/purchases/{domainId}'.replace('{domainId}', domainId);
9322
+ const apiPath = '/domains/purchases/{invoiceId}'.replace('{invoiceId}', invoiceId);
9227
9323
  const payload = {};
9228
9324
  if (typeof organizationId !== 'undefined') {
9229
9325
  payload['organizationId'] = organizationId;
@@ -9343,19 +9439,19 @@ class Domains {
9343
9439
  }
9344
9440
  else {
9345
9441
  params = {
9346
- domainId: paramsOrFirst,
9442
+ invoiceId: paramsOrFirst,
9347
9443
  organizationId: rest[0]
9348
9444
  };
9349
9445
  }
9350
- const domainId = params.domainId;
9446
+ const invoiceId = params.invoiceId;
9351
9447
  const organizationId = params.organizationId;
9352
- if (typeof domainId === 'undefined') {
9353
- throw new AppwriteException('Missing required parameter: "domainId"');
9448
+ if (typeof invoiceId === 'undefined') {
9449
+ throw new AppwriteException('Missing required parameter: "invoiceId"');
9354
9450
  }
9355
9451
  if (typeof organizationId === 'undefined') {
9356
9452
  throw new AppwriteException('Missing required parameter: "organizationId"');
9357
9453
  }
9358
- const apiPath = '/domains/transfers/in/{domainId}'.replace('{domainId}', domainId);
9454
+ const apiPath = '/domains/transfers/in/{invoiceId}'.replace('{invoiceId}', invoiceId);
9359
9455
  const payload = {};
9360
9456
  if (typeof organizationId !== 'undefined') {
9361
9457
  payload['organizationId'] = organizationId;
@@ -12892,6 +12988,158 @@ class Locale {
12892
12988
  }
12893
12989
  }
12894
12990
 
12991
+ class Manager {
12992
+ constructor(client) {
12993
+ this.client = client;
12994
+ }
12995
+ createBlock(paramsOrFirst, ...rest) {
12996
+ let params;
12997
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
12998
+ params = (paramsOrFirst || {});
12999
+ }
13000
+ else {
13001
+ params = {
13002
+ projectId: paramsOrFirst,
13003
+ resourceType: rest[0],
13004
+ resourceId: rest[1],
13005
+ reason: rest[2],
13006
+ expiredAt: rest[3]
13007
+ };
13008
+ }
13009
+ const projectId = params.projectId;
13010
+ const resourceType = params.resourceType;
13011
+ const resourceId = params.resourceId;
13012
+ const reason = params.reason;
13013
+ const expiredAt = params.expiredAt;
13014
+ if (typeof projectId === 'undefined') {
13015
+ throw new AppwriteException('Missing required parameter: "projectId"');
13016
+ }
13017
+ if (typeof resourceType === 'undefined') {
13018
+ throw new AppwriteException('Missing required parameter: "resourceType"');
13019
+ }
13020
+ const apiPath = '/manager/blocks';
13021
+ const payload = {};
13022
+ if (typeof projectId !== 'undefined') {
13023
+ payload['projectId'] = projectId;
13024
+ }
13025
+ if (typeof resourceType !== 'undefined') {
13026
+ payload['resourceType'] = resourceType;
13027
+ }
13028
+ if (typeof resourceId !== 'undefined') {
13029
+ payload['resourceId'] = resourceId;
13030
+ }
13031
+ if (typeof reason !== 'undefined') {
13032
+ payload['reason'] = reason;
13033
+ }
13034
+ if (typeof expiredAt !== 'undefined') {
13035
+ payload['expiredAt'] = expiredAt;
13036
+ }
13037
+ const uri = new URL(this.client.config.endpoint + apiPath);
13038
+ const apiHeaders = {
13039
+ 'content-type': 'application/json',
13040
+ };
13041
+ return this.client.call('post', uri, apiHeaders, payload);
13042
+ }
13043
+ deleteBlock(paramsOrFirst, ...rest) {
13044
+ let params;
13045
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13046
+ params = (paramsOrFirst || {});
13047
+ }
13048
+ else {
13049
+ params = {
13050
+ projectId: paramsOrFirst,
13051
+ resourceType: rest[0],
13052
+ resourceId: rest[1]
13053
+ };
13054
+ }
13055
+ const projectId = params.projectId;
13056
+ const resourceType = params.resourceType;
13057
+ const resourceId = params.resourceId;
13058
+ if (typeof projectId === 'undefined') {
13059
+ throw new AppwriteException('Missing required parameter: "projectId"');
13060
+ }
13061
+ if (typeof resourceType === 'undefined') {
13062
+ throw new AppwriteException('Missing required parameter: "resourceType"');
13063
+ }
13064
+ const apiPath = '/manager/blocks';
13065
+ const payload = {};
13066
+ if (typeof projectId !== 'undefined') {
13067
+ payload['projectId'] = projectId;
13068
+ }
13069
+ if (typeof resourceType !== 'undefined') {
13070
+ payload['resourceType'] = resourceType;
13071
+ }
13072
+ if (typeof resourceId !== 'undefined') {
13073
+ payload['resourceId'] = resourceId;
13074
+ }
13075
+ const uri = new URL(this.client.config.endpoint + apiPath);
13076
+ const apiHeaders = {
13077
+ 'content-type': 'application/json',
13078
+ };
13079
+ return this.client.call('delete', uri, apiHeaders, payload);
13080
+ }
13081
+ listBlocks(paramsOrFirst) {
13082
+ let params;
13083
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13084
+ params = (paramsOrFirst || {});
13085
+ }
13086
+ else {
13087
+ params = {
13088
+ projectId: paramsOrFirst
13089
+ };
13090
+ }
13091
+ const projectId = params.projectId;
13092
+ if (typeof projectId === 'undefined') {
13093
+ throw new AppwriteException('Missing required parameter: "projectId"');
13094
+ }
13095
+ const apiPath = '/manager/blocks/{projectId}'.replace('{projectId}', projectId);
13096
+ const payload = {};
13097
+ const uri = new URL(this.client.config.endpoint + apiPath);
13098
+ const apiHeaders = {};
13099
+ return this.client.call('get', uri, apiHeaders, payload);
13100
+ }
13101
+ updateUserStatus(paramsOrFirst, ...rest) {
13102
+ let params;
13103
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13104
+ params = (paramsOrFirst || {});
13105
+ }
13106
+ else {
13107
+ params = {
13108
+ status: paramsOrFirst,
13109
+ userId: rest[0],
13110
+ email: rest[1],
13111
+ reason: rest[2]
13112
+ };
13113
+ }
13114
+ const status = params.status;
13115
+ const userId = params.userId;
13116
+ const email = params.email;
13117
+ const reason = params.reason;
13118
+ if (typeof status === 'undefined') {
13119
+ throw new AppwriteException('Missing required parameter: "status"');
13120
+ }
13121
+ const apiPath = '/manager/users/status';
13122
+ const payload = {};
13123
+ if (typeof userId !== 'undefined') {
13124
+ payload['userId'] = userId;
13125
+ }
13126
+ if (typeof email !== 'undefined') {
13127
+ payload['email'] = email;
13128
+ }
13129
+ if (typeof status !== 'undefined') {
13130
+ payload['status'] = status;
13131
+ }
13132
+ if (typeof reason !== 'undefined') {
13133
+ payload['reason'] = reason;
13134
+ }
13135
+ const uri = new URL(this.client.config.endpoint + apiPath);
13136
+ const apiHeaders = {
13137
+ 'content-type': 'application/json',
13138
+ };
13139
+ return this.client.call('patch', uri, apiHeaders, payload);
13140
+ }
13141
+ }
13142
+
12895
13143
  class Messaging {
12896
13144
  constructor(client) {
12897
13145
  this.client = client;
@@ -17772,6 +18020,46 @@ class Organizations {
17772
18020
  };
17773
18021
  return this.client.call('patch', uri, apiHeaders, payload);
17774
18022
  }
18023
+ createPlanEstimation(paramsOrFirst, ...rest) {
18024
+ let params;
18025
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18026
+ params = (paramsOrFirst || {});
18027
+ }
18028
+ else {
18029
+ params = {
18030
+ organizationId: paramsOrFirst,
18031
+ billingPlan: rest[0],
18032
+ invites: rest[1],
18033
+ couponId: rest[2]
18034
+ };
18035
+ }
18036
+ const organizationId = params.organizationId;
18037
+ const billingPlan = params.billingPlan;
18038
+ const invites = params.invites;
18039
+ const couponId = params.couponId;
18040
+ if (typeof organizationId === 'undefined') {
18041
+ throw new AppwriteException('Missing required parameter: "organizationId"');
18042
+ }
18043
+ if (typeof billingPlan === 'undefined') {
18044
+ throw new AppwriteException('Missing required parameter: "billingPlan"');
18045
+ }
18046
+ const apiPath = '/organizations/{organizationId}/plan/estimations'.replace('{organizationId}', organizationId);
18047
+ const payload = {};
18048
+ if (typeof billingPlan !== 'undefined') {
18049
+ payload['billingPlan'] = billingPlan;
18050
+ }
18051
+ if (typeof invites !== 'undefined') {
18052
+ payload['invites'] = invites;
18053
+ }
18054
+ if (typeof couponId !== 'undefined') {
18055
+ payload['couponId'] = couponId;
18056
+ }
18057
+ const uri = new URL(this.client.config.endpoint + apiPath);
18058
+ const apiHeaders = {
18059
+ 'content-type': 'application/json',
18060
+ };
18061
+ return this.client.call('post', uri, apiHeaders, payload);
18062
+ }
17775
18063
  listRegions(paramsOrFirst) {
17776
18064
  let params;
17777
18065
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -17910,22 +18198,1637 @@ class Project {
17910
18198
  constructor(client) {
17911
18199
  this.client = client;
17912
18200
  }
17913
- updateCanonicalEmails(paramsOrFirst) {
17914
- let params;
17915
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17916
- params = (paramsOrFirst || {});
17917
- }
17918
- else {
17919
- params = {
17920
- enabled: paramsOrFirst
17921
- };
17922
- }
18201
+ /**
18202
+ * Delete a project.
18203
+ *
18204
+ * @throws {AppwriteException}
18205
+ * @returns {Promise<{}>}
18206
+ */
18207
+ delete() {
18208
+ const apiPath = '/project';
18209
+ const payload = {};
18210
+ const uri = new URL(this.client.config.endpoint + apiPath);
18211
+ const apiHeaders = {
18212
+ 'content-type': 'application/json',
18213
+ };
18214
+ return this.client.call('delete', uri, apiHeaders, payload);
18215
+ }
18216
+ updateAuthMethod(paramsOrFirst, ...rest) {
18217
+ let params;
18218
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('methodId' in paramsOrFirst || 'enabled' in paramsOrFirst))) {
18219
+ params = (paramsOrFirst || {});
18220
+ }
18221
+ else {
18222
+ params = {
18223
+ methodId: paramsOrFirst,
18224
+ enabled: rest[0]
18225
+ };
18226
+ }
18227
+ const methodId = params.methodId;
18228
+ const enabled = params.enabled;
18229
+ if (typeof methodId === 'undefined') {
18230
+ throw new AppwriteException('Missing required parameter: "methodId"');
18231
+ }
18232
+ if (typeof enabled === 'undefined') {
18233
+ throw new AppwriteException('Missing required parameter: "enabled"');
18234
+ }
18235
+ const apiPath = '/project/auth-methods/{methodId}'.replace('{methodId}', methodId);
18236
+ const payload = {};
18237
+ if (typeof enabled !== 'undefined') {
18238
+ payload['enabled'] = enabled;
18239
+ }
18240
+ const uri = new URL(this.client.config.endpoint + apiPath);
18241
+ const apiHeaders = {
18242
+ 'content-type': 'application/json',
18243
+ };
18244
+ return this.client.call('patch', uri, apiHeaders, payload);
18245
+ }
18246
+ updateCanonicalEmails(paramsOrFirst) {
18247
+ let params;
18248
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18249
+ params = (paramsOrFirst || {});
18250
+ }
18251
+ else {
18252
+ params = {
18253
+ enabled: paramsOrFirst
18254
+ };
18255
+ }
18256
+ const enabled = params.enabled;
18257
+ if (typeof enabled === 'undefined') {
18258
+ throw new AppwriteException('Missing required parameter: "enabled"');
18259
+ }
18260
+ const apiPath = '/project/auth/canonical-emails';
18261
+ const payload = {};
18262
+ if (typeof enabled !== 'undefined') {
18263
+ payload['enabled'] = enabled;
18264
+ }
18265
+ const uri = new URL(this.client.config.endpoint + apiPath);
18266
+ const apiHeaders = {
18267
+ 'content-type': 'application/json',
18268
+ };
18269
+ return this.client.call('patch', uri, apiHeaders, payload);
18270
+ }
18271
+ updateDisposableEmails(paramsOrFirst) {
18272
+ let params;
18273
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18274
+ params = (paramsOrFirst || {});
18275
+ }
18276
+ else {
18277
+ params = {
18278
+ enabled: paramsOrFirst
18279
+ };
18280
+ }
18281
+ const enabled = params.enabled;
18282
+ if (typeof enabled === 'undefined') {
18283
+ throw new AppwriteException('Missing required parameter: "enabled"');
18284
+ }
18285
+ const apiPath = '/project/auth/disposable-emails';
18286
+ const payload = {};
18287
+ if (typeof enabled !== 'undefined') {
18288
+ payload['enabled'] = enabled;
18289
+ }
18290
+ const uri = new URL(this.client.config.endpoint + apiPath);
18291
+ const apiHeaders = {
18292
+ 'content-type': 'application/json',
18293
+ };
18294
+ return this.client.call('patch', uri, apiHeaders, payload);
18295
+ }
18296
+ updateFreeEmails(paramsOrFirst) {
18297
+ let params;
18298
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18299
+ params = (paramsOrFirst || {});
18300
+ }
18301
+ else {
18302
+ params = {
18303
+ enabled: paramsOrFirst
18304
+ };
18305
+ }
17923
18306
  const enabled = params.enabled;
17924
18307
  if (typeof enabled === 'undefined') {
17925
18308
  throw new AppwriteException('Missing required parameter: "enabled"');
17926
18309
  }
17927
- const apiPath = '/project/auth/canonical-emails';
18310
+ const apiPath = '/project/auth/free-emails';
18311
+ const payload = {};
18312
+ if (typeof enabled !== 'undefined') {
18313
+ payload['enabled'] = enabled;
18314
+ }
18315
+ const uri = new URL(this.client.config.endpoint + apiPath);
18316
+ const apiHeaders = {
18317
+ 'content-type': 'application/json',
18318
+ };
18319
+ return this.client.call('patch', uri, apiHeaders, payload);
18320
+ }
18321
+ listKeys(paramsOrFirst, ...rest) {
18322
+ let params;
18323
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18324
+ params = (paramsOrFirst || {});
18325
+ }
18326
+ else {
18327
+ params = {
18328
+ queries: paramsOrFirst,
18329
+ total: rest[0]
18330
+ };
18331
+ }
18332
+ const queries = params.queries;
18333
+ const total = params.total;
18334
+ const apiPath = '/project/keys';
18335
+ const payload = {};
18336
+ if (typeof queries !== 'undefined') {
18337
+ payload['queries'] = queries;
18338
+ }
18339
+ if (typeof total !== 'undefined') {
18340
+ payload['total'] = total;
18341
+ }
18342
+ const uri = new URL(this.client.config.endpoint + apiPath);
18343
+ const apiHeaders = {};
18344
+ return this.client.call('get', uri, apiHeaders, payload);
18345
+ }
18346
+ createKey(paramsOrFirst, ...rest) {
18347
+ let params;
18348
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18349
+ params = (paramsOrFirst || {});
18350
+ }
18351
+ else {
18352
+ params = {
18353
+ keyId: paramsOrFirst,
18354
+ name: rest[0],
18355
+ scopes: rest[1],
18356
+ expire: rest[2]
18357
+ };
18358
+ }
18359
+ const keyId = params.keyId;
18360
+ const name = params.name;
18361
+ const scopes = params.scopes;
18362
+ const expire = params.expire;
18363
+ if (typeof keyId === 'undefined') {
18364
+ throw new AppwriteException('Missing required parameter: "keyId"');
18365
+ }
18366
+ if (typeof name === 'undefined') {
18367
+ throw new AppwriteException('Missing required parameter: "name"');
18368
+ }
18369
+ if (typeof scopes === 'undefined') {
18370
+ throw new AppwriteException('Missing required parameter: "scopes"');
18371
+ }
18372
+ const apiPath = '/project/keys';
18373
+ const payload = {};
18374
+ if (typeof keyId !== 'undefined') {
18375
+ payload['keyId'] = keyId;
18376
+ }
18377
+ if (typeof name !== 'undefined') {
18378
+ payload['name'] = name;
18379
+ }
18380
+ if (typeof scopes !== 'undefined') {
18381
+ payload['scopes'] = scopes;
18382
+ }
18383
+ if (typeof expire !== 'undefined') {
18384
+ payload['expire'] = expire;
18385
+ }
18386
+ const uri = new URL(this.client.config.endpoint + apiPath);
18387
+ const apiHeaders = {
18388
+ 'content-type': 'application/json',
18389
+ };
18390
+ return this.client.call('post', uri, apiHeaders, payload);
18391
+ }
18392
+ createEphemeralKey(paramsOrFirst, ...rest) {
18393
+ let params;
18394
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('scopes' in paramsOrFirst || 'duration' in paramsOrFirst))) {
18395
+ params = (paramsOrFirst || {});
18396
+ }
18397
+ else {
18398
+ params = {
18399
+ scopes: paramsOrFirst,
18400
+ duration: rest[0]
18401
+ };
18402
+ }
18403
+ const scopes = params.scopes;
18404
+ const duration = params.duration;
18405
+ if (typeof scopes === 'undefined') {
18406
+ throw new AppwriteException('Missing required parameter: "scopes"');
18407
+ }
18408
+ if (typeof duration === 'undefined') {
18409
+ throw new AppwriteException('Missing required parameter: "duration"');
18410
+ }
18411
+ const apiPath = '/project/keys/ephemeral';
18412
+ const payload = {};
18413
+ if (typeof scopes !== 'undefined') {
18414
+ payload['scopes'] = scopes;
18415
+ }
18416
+ if (typeof duration !== 'undefined') {
18417
+ payload['duration'] = duration;
18418
+ }
18419
+ const uri = new URL(this.client.config.endpoint + apiPath);
18420
+ const apiHeaders = {
18421
+ 'content-type': 'application/json',
18422
+ };
18423
+ return this.client.call('post', uri, apiHeaders, payload);
18424
+ }
18425
+ getKey(paramsOrFirst) {
18426
+ let params;
18427
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18428
+ params = (paramsOrFirst || {});
18429
+ }
18430
+ else {
18431
+ params = {
18432
+ keyId: paramsOrFirst
18433
+ };
18434
+ }
18435
+ const keyId = params.keyId;
18436
+ if (typeof keyId === 'undefined') {
18437
+ throw new AppwriteException('Missing required parameter: "keyId"');
18438
+ }
18439
+ const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
18440
+ const payload = {};
18441
+ const uri = new URL(this.client.config.endpoint + apiPath);
18442
+ const apiHeaders = {};
18443
+ return this.client.call('get', uri, apiHeaders, payload);
18444
+ }
18445
+ updateKey(paramsOrFirst, ...rest) {
18446
+ let params;
18447
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18448
+ params = (paramsOrFirst || {});
18449
+ }
18450
+ else {
18451
+ params = {
18452
+ keyId: paramsOrFirst,
18453
+ name: rest[0],
18454
+ scopes: rest[1],
18455
+ expire: rest[2]
18456
+ };
18457
+ }
18458
+ const keyId = params.keyId;
18459
+ const name = params.name;
18460
+ const scopes = params.scopes;
18461
+ const expire = params.expire;
18462
+ if (typeof keyId === 'undefined') {
18463
+ throw new AppwriteException('Missing required parameter: "keyId"');
18464
+ }
18465
+ if (typeof name === 'undefined') {
18466
+ throw new AppwriteException('Missing required parameter: "name"');
18467
+ }
18468
+ if (typeof scopes === 'undefined') {
18469
+ throw new AppwriteException('Missing required parameter: "scopes"');
18470
+ }
18471
+ const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
18472
+ const payload = {};
18473
+ if (typeof name !== 'undefined') {
18474
+ payload['name'] = name;
18475
+ }
18476
+ if (typeof scopes !== 'undefined') {
18477
+ payload['scopes'] = scopes;
18478
+ }
18479
+ if (typeof expire !== 'undefined') {
18480
+ payload['expire'] = expire;
18481
+ }
18482
+ const uri = new URL(this.client.config.endpoint + apiPath);
18483
+ const apiHeaders = {
18484
+ 'content-type': 'application/json',
18485
+ };
18486
+ return this.client.call('put', uri, apiHeaders, payload);
18487
+ }
18488
+ deleteKey(paramsOrFirst) {
18489
+ let params;
18490
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18491
+ params = (paramsOrFirst || {});
18492
+ }
18493
+ else {
18494
+ params = {
18495
+ keyId: paramsOrFirst
18496
+ };
18497
+ }
18498
+ const keyId = params.keyId;
18499
+ if (typeof keyId === 'undefined') {
18500
+ throw new AppwriteException('Missing required parameter: "keyId"');
18501
+ }
18502
+ const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
18503
+ const payload = {};
18504
+ const uri = new URL(this.client.config.endpoint + apiPath);
18505
+ const apiHeaders = {
18506
+ 'content-type': 'application/json',
18507
+ };
18508
+ return this.client.call('delete', uri, apiHeaders, payload);
18509
+ }
18510
+ updateLabels(paramsOrFirst) {
18511
+ let params;
18512
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18513
+ params = (paramsOrFirst || {});
18514
+ }
18515
+ else {
18516
+ params = {
18517
+ labels: paramsOrFirst
18518
+ };
18519
+ }
18520
+ const labels = params.labels;
18521
+ if (typeof labels === 'undefined') {
18522
+ throw new AppwriteException('Missing required parameter: "labels"');
18523
+ }
18524
+ const apiPath = '/project/labels';
18525
+ const payload = {};
18526
+ if (typeof labels !== 'undefined') {
18527
+ payload['labels'] = labels;
18528
+ }
18529
+ const uri = new URL(this.client.config.endpoint + apiPath);
18530
+ const apiHeaders = {
18531
+ 'content-type': 'application/json',
18532
+ };
18533
+ return this.client.call('put', uri, apiHeaders, payload);
18534
+ }
18535
+ listMockPhones(paramsOrFirst, ...rest) {
18536
+ let params;
18537
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18538
+ params = (paramsOrFirst || {});
18539
+ }
18540
+ else {
18541
+ params = {
18542
+ queries: paramsOrFirst,
18543
+ total: rest[0]
18544
+ };
18545
+ }
18546
+ const queries = params.queries;
18547
+ const total = params.total;
18548
+ const apiPath = '/project/mock-phones';
18549
+ const payload = {};
18550
+ if (typeof queries !== 'undefined') {
18551
+ payload['queries'] = queries;
18552
+ }
18553
+ if (typeof total !== 'undefined') {
18554
+ payload['total'] = total;
18555
+ }
18556
+ const uri = new URL(this.client.config.endpoint + apiPath);
18557
+ const apiHeaders = {};
18558
+ return this.client.call('get', uri, apiHeaders, payload);
18559
+ }
18560
+ createMockPhone(paramsOrFirst, ...rest) {
18561
+ let params;
18562
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18563
+ params = (paramsOrFirst || {});
18564
+ }
18565
+ else {
18566
+ params = {
18567
+ number: paramsOrFirst,
18568
+ otp: rest[0]
18569
+ };
18570
+ }
18571
+ const number = params.number;
18572
+ const otp = params.otp;
18573
+ if (typeof number === 'undefined') {
18574
+ throw new AppwriteException('Missing required parameter: "number"');
18575
+ }
18576
+ if (typeof otp === 'undefined') {
18577
+ throw new AppwriteException('Missing required parameter: "otp"');
18578
+ }
18579
+ const apiPath = '/project/mock-phones';
18580
+ const payload = {};
18581
+ if (typeof number !== 'undefined') {
18582
+ payload['number'] = number;
18583
+ }
18584
+ if (typeof otp !== 'undefined') {
18585
+ payload['otp'] = otp;
18586
+ }
18587
+ const uri = new URL(this.client.config.endpoint + apiPath);
18588
+ const apiHeaders = {
18589
+ 'content-type': 'application/json',
18590
+ };
18591
+ return this.client.call('post', uri, apiHeaders, payload);
18592
+ }
18593
+ getMockPhone(paramsOrFirst) {
18594
+ let params;
18595
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18596
+ params = (paramsOrFirst || {});
18597
+ }
18598
+ else {
18599
+ params = {
18600
+ number: paramsOrFirst
18601
+ };
18602
+ }
18603
+ const number = params.number;
18604
+ if (typeof number === 'undefined') {
18605
+ throw new AppwriteException('Missing required parameter: "number"');
18606
+ }
18607
+ const apiPath = '/project/mock-phones/{number}'.replace('{number}', number);
18608
+ const payload = {};
18609
+ const uri = new URL(this.client.config.endpoint + apiPath);
18610
+ const apiHeaders = {};
18611
+ return this.client.call('get', uri, apiHeaders, payload);
18612
+ }
18613
+ updateMockPhone(paramsOrFirst, ...rest) {
18614
+ let params;
18615
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18616
+ params = (paramsOrFirst || {});
18617
+ }
18618
+ else {
18619
+ params = {
18620
+ number: paramsOrFirst,
18621
+ otp: rest[0]
18622
+ };
18623
+ }
18624
+ const number = params.number;
18625
+ const otp = params.otp;
18626
+ if (typeof number === 'undefined') {
18627
+ throw new AppwriteException('Missing required parameter: "number"');
18628
+ }
18629
+ if (typeof otp === 'undefined') {
18630
+ throw new AppwriteException('Missing required parameter: "otp"');
18631
+ }
18632
+ const apiPath = '/project/mock-phones/{number}'.replace('{number}', number);
18633
+ const payload = {};
18634
+ if (typeof otp !== 'undefined') {
18635
+ payload['otp'] = otp;
18636
+ }
18637
+ const uri = new URL(this.client.config.endpoint + apiPath);
18638
+ const apiHeaders = {
18639
+ 'content-type': 'application/json',
18640
+ };
18641
+ return this.client.call('put', uri, apiHeaders, payload);
18642
+ }
18643
+ deleteMockPhone(paramsOrFirst) {
18644
+ let params;
18645
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18646
+ params = (paramsOrFirst || {});
18647
+ }
18648
+ else {
18649
+ params = {
18650
+ number: paramsOrFirst
18651
+ };
18652
+ }
18653
+ const number = params.number;
18654
+ if (typeof number === 'undefined') {
18655
+ throw new AppwriteException('Missing required parameter: "number"');
18656
+ }
18657
+ const apiPath = '/project/mock-phones/{number}'.replace('{number}', number);
18658
+ const payload = {};
18659
+ const uri = new URL(this.client.config.endpoint + apiPath);
18660
+ const apiHeaders = {
18661
+ 'content-type': 'application/json',
18662
+ };
18663
+ return this.client.call('delete', uri, apiHeaders, payload);
18664
+ }
18665
+ /**
18666
+ * Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.
18667
+ *
18668
+ * @throws {AppwriteException}
18669
+ * @returns {Promise<Models.OAuth2ProviderList>}
18670
+ */
18671
+ listOAuth2Providers() {
18672
+ const apiPath = '/project/oauth2';
18673
+ const payload = {};
18674
+ const uri = new URL(this.client.config.endpoint + apiPath);
18675
+ const apiHeaders = {};
18676
+ return this.client.call('get', uri, apiHeaders, payload);
18677
+ }
18678
+ updateOAuth2Amazon(paramsOrFirst, ...rest) {
18679
+ let params;
18680
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18681
+ params = (paramsOrFirst || {});
18682
+ }
18683
+ else {
18684
+ params = {
18685
+ clientId: paramsOrFirst,
18686
+ clientSecret: rest[0],
18687
+ enabled: rest[1]
18688
+ };
18689
+ }
18690
+ const clientId = params.clientId;
18691
+ const clientSecret = params.clientSecret;
18692
+ const enabled = params.enabled;
18693
+ const apiPath = '/project/oauth2/amazon';
18694
+ const payload = {};
18695
+ if (typeof clientId !== 'undefined') {
18696
+ payload['clientId'] = clientId;
18697
+ }
18698
+ if (typeof clientSecret !== 'undefined') {
18699
+ payload['clientSecret'] = clientSecret;
18700
+ }
18701
+ if (typeof enabled !== 'undefined') {
18702
+ payload['enabled'] = enabled;
18703
+ }
18704
+ const uri = new URL(this.client.config.endpoint + apiPath);
18705
+ const apiHeaders = {
18706
+ 'content-type': 'application/json',
18707
+ };
18708
+ return this.client.call('patch', uri, apiHeaders, payload);
18709
+ }
18710
+ updateOAuth2Apple(paramsOrFirst, ...rest) {
18711
+ let params;
18712
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18713
+ params = (paramsOrFirst || {});
18714
+ }
18715
+ else {
18716
+ params = {
18717
+ serviceId: paramsOrFirst,
18718
+ keyId: rest[0],
18719
+ teamId: rest[1],
18720
+ p8File: rest[2],
18721
+ enabled: rest[3]
18722
+ };
18723
+ }
18724
+ const serviceId = params.serviceId;
18725
+ const keyId = params.keyId;
18726
+ const teamId = params.teamId;
18727
+ const p8File = params.p8File;
18728
+ const enabled = params.enabled;
18729
+ const apiPath = '/project/oauth2/apple';
18730
+ const payload = {};
18731
+ if (typeof serviceId !== 'undefined') {
18732
+ payload['serviceId'] = serviceId;
18733
+ }
18734
+ if (typeof keyId !== 'undefined') {
18735
+ payload['keyId'] = keyId;
18736
+ }
18737
+ if (typeof teamId !== 'undefined') {
18738
+ payload['teamId'] = teamId;
18739
+ }
18740
+ if (typeof p8File !== 'undefined') {
18741
+ payload['p8File'] = p8File;
18742
+ }
18743
+ if (typeof enabled !== 'undefined') {
18744
+ payload['enabled'] = enabled;
18745
+ }
18746
+ const uri = new URL(this.client.config.endpoint + apiPath);
18747
+ const apiHeaders = {
18748
+ 'content-type': 'application/json',
18749
+ };
18750
+ return this.client.call('patch', uri, apiHeaders, payload);
18751
+ }
18752
+ updateOAuth2Auth0(paramsOrFirst, ...rest) {
18753
+ let params;
18754
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18755
+ params = (paramsOrFirst || {});
18756
+ }
18757
+ else {
18758
+ params = {
18759
+ clientId: paramsOrFirst,
18760
+ clientSecret: rest[0],
18761
+ endpoint: rest[1],
18762
+ enabled: rest[2]
18763
+ };
18764
+ }
18765
+ const clientId = params.clientId;
18766
+ const clientSecret = params.clientSecret;
18767
+ const endpoint = params.endpoint;
18768
+ const enabled = params.enabled;
18769
+ const apiPath = '/project/oauth2/auth0';
18770
+ const payload = {};
18771
+ if (typeof clientId !== 'undefined') {
18772
+ payload['clientId'] = clientId;
18773
+ }
18774
+ if (typeof clientSecret !== 'undefined') {
18775
+ payload['clientSecret'] = clientSecret;
18776
+ }
18777
+ if (typeof endpoint !== 'undefined') {
18778
+ payload['endpoint'] = endpoint;
18779
+ }
18780
+ if (typeof enabled !== 'undefined') {
18781
+ payload['enabled'] = enabled;
18782
+ }
18783
+ const uri = new URL(this.client.config.endpoint + apiPath);
18784
+ const apiHeaders = {
18785
+ 'content-type': 'application/json',
18786
+ };
18787
+ return this.client.call('patch', uri, apiHeaders, payload);
18788
+ }
18789
+ updateOAuth2Authentik(paramsOrFirst, ...rest) {
18790
+ let params;
18791
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18792
+ params = (paramsOrFirst || {});
18793
+ }
18794
+ else {
18795
+ params = {
18796
+ clientId: paramsOrFirst,
18797
+ clientSecret: rest[0],
18798
+ endpoint: rest[1],
18799
+ enabled: rest[2]
18800
+ };
18801
+ }
18802
+ const clientId = params.clientId;
18803
+ const clientSecret = params.clientSecret;
18804
+ const endpoint = params.endpoint;
18805
+ const enabled = params.enabled;
18806
+ const apiPath = '/project/oauth2/authentik';
18807
+ const payload = {};
18808
+ if (typeof clientId !== 'undefined') {
18809
+ payload['clientId'] = clientId;
18810
+ }
18811
+ if (typeof clientSecret !== 'undefined') {
18812
+ payload['clientSecret'] = clientSecret;
18813
+ }
18814
+ if (typeof endpoint !== 'undefined') {
18815
+ payload['endpoint'] = endpoint;
18816
+ }
18817
+ if (typeof enabled !== 'undefined') {
18818
+ payload['enabled'] = enabled;
18819
+ }
18820
+ const uri = new URL(this.client.config.endpoint + apiPath);
18821
+ const apiHeaders = {
18822
+ 'content-type': 'application/json',
18823
+ };
18824
+ return this.client.call('patch', uri, apiHeaders, payload);
18825
+ }
18826
+ updateOAuth2Autodesk(paramsOrFirst, ...rest) {
18827
+ let params;
18828
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18829
+ params = (paramsOrFirst || {});
18830
+ }
18831
+ else {
18832
+ params = {
18833
+ clientId: paramsOrFirst,
18834
+ clientSecret: rest[0],
18835
+ enabled: rest[1]
18836
+ };
18837
+ }
18838
+ const clientId = params.clientId;
18839
+ const clientSecret = params.clientSecret;
18840
+ const enabled = params.enabled;
18841
+ const apiPath = '/project/oauth2/autodesk';
18842
+ const payload = {};
18843
+ if (typeof clientId !== 'undefined') {
18844
+ payload['clientId'] = clientId;
18845
+ }
18846
+ if (typeof clientSecret !== 'undefined') {
18847
+ payload['clientSecret'] = clientSecret;
18848
+ }
18849
+ if (typeof enabled !== 'undefined') {
18850
+ payload['enabled'] = enabled;
18851
+ }
18852
+ const uri = new URL(this.client.config.endpoint + apiPath);
18853
+ const apiHeaders = {
18854
+ 'content-type': 'application/json',
18855
+ };
18856
+ return this.client.call('patch', uri, apiHeaders, payload);
18857
+ }
18858
+ updateOAuth2Bitbucket(paramsOrFirst, ...rest) {
18859
+ let params;
18860
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18861
+ params = (paramsOrFirst || {});
18862
+ }
18863
+ else {
18864
+ params = {
18865
+ key: paramsOrFirst,
18866
+ secret: rest[0],
18867
+ enabled: rest[1]
18868
+ };
18869
+ }
18870
+ const key = params.key;
18871
+ const secret = params.secret;
18872
+ const enabled = params.enabled;
18873
+ const apiPath = '/project/oauth2/bitbucket';
18874
+ const payload = {};
18875
+ if (typeof key !== 'undefined') {
18876
+ payload['key'] = key;
18877
+ }
18878
+ if (typeof secret !== 'undefined') {
18879
+ payload['secret'] = secret;
18880
+ }
18881
+ if (typeof enabled !== 'undefined') {
18882
+ payload['enabled'] = enabled;
18883
+ }
18884
+ const uri = new URL(this.client.config.endpoint + apiPath);
18885
+ const apiHeaders = {
18886
+ 'content-type': 'application/json',
18887
+ };
18888
+ return this.client.call('patch', uri, apiHeaders, payload);
18889
+ }
18890
+ updateOAuth2Bitly(paramsOrFirst, ...rest) {
18891
+ let params;
18892
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18893
+ params = (paramsOrFirst || {});
18894
+ }
18895
+ else {
18896
+ params = {
18897
+ clientId: paramsOrFirst,
18898
+ clientSecret: rest[0],
18899
+ enabled: rest[1]
18900
+ };
18901
+ }
18902
+ const clientId = params.clientId;
18903
+ const clientSecret = params.clientSecret;
18904
+ const enabled = params.enabled;
18905
+ const apiPath = '/project/oauth2/bitly';
18906
+ const payload = {};
18907
+ if (typeof clientId !== 'undefined') {
18908
+ payload['clientId'] = clientId;
18909
+ }
18910
+ if (typeof clientSecret !== 'undefined') {
18911
+ payload['clientSecret'] = clientSecret;
18912
+ }
18913
+ if (typeof enabled !== 'undefined') {
18914
+ payload['enabled'] = enabled;
18915
+ }
18916
+ const uri = new URL(this.client.config.endpoint + apiPath);
18917
+ const apiHeaders = {
18918
+ 'content-type': 'application/json',
18919
+ };
18920
+ return this.client.call('patch', uri, apiHeaders, payload);
18921
+ }
18922
+ updateOAuth2Box(paramsOrFirst, ...rest) {
18923
+ let params;
18924
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18925
+ params = (paramsOrFirst || {});
18926
+ }
18927
+ else {
18928
+ params = {
18929
+ clientId: paramsOrFirst,
18930
+ clientSecret: rest[0],
18931
+ enabled: rest[1]
18932
+ };
18933
+ }
18934
+ const clientId = params.clientId;
18935
+ const clientSecret = params.clientSecret;
18936
+ const enabled = params.enabled;
18937
+ const apiPath = '/project/oauth2/box';
18938
+ const payload = {};
18939
+ if (typeof clientId !== 'undefined') {
18940
+ payload['clientId'] = clientId;
18941
+ }
18942
+ if (typeof clientSecret !== 'undefined') {
18943
+ payload['clientSecret'] = clientSecret;
18944
+ }
18945
+ if (typeof enabled !== 'undefined') {
18946
+ payload['enabled'] = enabled;
18947
+ }
18948
+ const uri = new URL(this.client.config.endpoint + apiPath);
18949
+ const apiHeaders = {
18950
+ 'content-type': 'application/json',
18951
+ };
18952
+ return this.client.call('patch', uri, apiHeaders, payload);
18953
+ }
18954
+ updateOAuth2Dailymotion(paramsOrFirst, ...rest) {
18955
+ let params;
18956
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18957
+ params = (paramsOrFirst || {});
18958
+ }
18959
+ else {
18960
+ params = {
18961
+ apiKey: paramsOrFirst,
18962
+ apiSecret: rest[0],
18963
+ enabled: rest[1]
18964
+ };
18965
+ }
18966
+ const apiKey = params.apiKey;
18967
+ const apiSecret = params.apiSecret;
18968
+ const enabled = params.enabled;
18969
+ const apiPath = '/project/oauth2/dailymotion';
18970
+ const payload = {};
18971
+ if (typeof apiKey !== 'undefined') {
18972
+ payload['apiKey'] = apiKey;
18973
+ }
18974
+ if (typeof apiSecret !== 'undefined') {
18975
+ payload['apiSecret'] = apiSecret;
18976
+ }
18977
+ if (typeof enabled !== 'undefined') {
18978
+ payload['enabled'] = enabled;
18979
+ }
18980
+ const uri = new URL(this.client.config.endpoint + apiPath);
18981
+ const apiHeaders = {
18982
+ 'content-type': 'application/json',
18983
+ };
18984
+ return this.client.call('patch', uri, apiHeaders, payload);
18985
+ }
18986
+ updateOAuth2Discord(paramsOrFirst, ...rest) {
18987
+ let params;
18988
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18989
+ params = (paramsOrFirst || {});
18990
+ }
18991
+ else {
18992
+ params = {
18993
+ clientId: paramsOrFirst,
18994
+ clientSecret: rest[0],
18995
+ enabled: rest[1]
18996
+ };
18997
+ }
18998
+ const clientId = params.clientId;
18999
+ const clientSecret = params.clientSecret;
19000
+ const enabled = params.enabled;
19001
+ const apiPath = '/project/oauth2/discord';
19002
+ const payload = {};
19003
+ if (typeof clientId !== 'undefined') {
19004
+ payload['clientId'] = clientId;
19005
+ }
19006
+ if (typeof clientSecret !== 'undefined') {
19007
+ payload['clientSecret'] = clientSecret;
19008
+ }
19009
+ if (typeof enabled !== 'undefined') {
19010
+ payload['enabled'] = enabled;
19011
+ }
19012
+ const uri = new URL(this.client.config.endpoint + apiPath);
19013
+ const apiHeaders = {
19014
+ 'content-type': 'application/json',
19015
+ };
19016
+ return this.client.call('patch', uri, apiHeaders, payload);
19017
+ }
19018
+ updateOAuth2Disqus(paramsOrFirst, ...rest) {
19019
+ let params;
19020
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19021
+ params = (paramsOrFirst || {});
19022
+ }
19023
+ else {
19024
+ params = {
19025
+ publicKey: paramsOrFirst,
19026
+ secretKey: rest[0],
19027
+ enabled: rest[1]
19028
+ };
19029
+ }
19030
+ const publicKey = params.publicKey;
19031
+ const secretKey = params.secretKey;
19032
+ const enabled = params.enabled;
19033
+ const apiPath = '/project/oauth2/disqus';
19034
+ const payload = {};
19035
+ if (typeof publicKey !== 'undefined') {
19036
+ payload['publicKey'] = publicKey;
19037
+ }
19038
+ if (typeof secretKey !== 'undefined') {
19039
+ payload['secretKey'] = secretKey;
19040
+ }
19041
+ if (typeof enabled !== 'undefined') {
19042
+ payload['enabled'] = enabled;
19043
+ }
19044
+ const uri = new URL(this.client.config.endpoint + apiPath);
19045
+ const apiHeaders = {
19046
+ 'content-type': 'application/json',
19047
+ };
19048
+ return this.client.call('patch', uri, apiHeaders, payload);
19049
+ }
19050
+ updateOAuth2Dropbox(paramsOrFirst, ...rest) {
19051
+ let params;
19052
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19053
+ params = (paramsOrFirst || {});
19054
+ }
19055
+ else {
19056
+ params = {
19057
+ appKey: paramsOrFirst,
19058
+ appSecret: rest[0],
19059
+ enabled: rest[1]
19060
+ };
19061
+ }
19062
+ const appKey = params.appKey;
19063
+ const appSecret = params.appSecret;
19064
+ const enabled = params.enabled;
19065
+ const apiPath = '/project/oauth2/dropbox';
19066
+ const payload = {};
19067
+ if (typeof appKey !== 'undefined') {
19068
+ payload['appKey'] = appKey;
19069
+ }
19070
+ if (typeof appSecret !== 'undefined') {
19071
+ payload['appSecret'] = appSecret;
19072
+ }
19073
+ if (typeof enabled !== 'undefined') {
19074
+ payload['enabled'] = enabled;
19075
+ }
19076
+ const uri = new URL(this.client.config.endpoint + apiPath);
19077
+ const apiHeaders = {
19078
+ 'content-type': 'application/json',
19079
+ };
19080
+ return this.client.call('patch', uri, apiHeaders, payload);
19081
+ }
19082
+ updateOAuth2Etsy(paramsOrFirst, ...rest) {
19083
+ let params;
19084
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19085
+ params = (paramsOrFirst || {});
19086
+ }
19087
+ else {
19088
+ params = {
19089
+ keyString: paramsOrFirst,
19090
+ sharedSecret: rest[0],
19091
+ enabled: rest[1]
19092
+ };
19093
+ }
19094
+ const keyString = params.keyString;
19095
+ const sharedSecret = params.sharedSecret;
19096
+ const enabled = params.enabled;
19097
+ const apiPath = '/project/oauth2/etsy';
19098
+ const payload = {};
19099
+ if (typeof keyString !== 'undefined') {
19100
+ payload['keyString'] = keyString;
19101
+ }
19102
+ if (typeof sharedSecret !== 'undefined') {
19103
+ payload['sharedSecret'] = sharedSecret;
19104
+ }
19105
+ if (typeof enabled !== 'undefined') {
19106
+ payload['enabled'] = enabled;
19107
+ }
19108
+ const uri = new URL(this.client.config.endpoint + apiPath);
19109
+ const apiHeaders = {
19110
+ 'content-type': 'application/json',
19111
+ };
19112
+ return this.client.call('patch', uri, apiHeaders, payload);
19113
+ }
19114
+ updateOAuth2Facebook(paramsOrFirst, ...rest) {
19115
+ let params;
19116
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19117
+ params = (paramsOrFirst || {});
19118
+ }
19119
+ else {
19120
+ params = {
19121
+ appId: paramsOrFirst,
19122
+ appSecret: rest[0],
19123
+ enabled: rest[1]
19124
+ };
19125
+ }
19126
+ const appId = params.appId;
19127
+ const appSecret = params.appSecret;
19128
+ const enabled = params.enabled;
19129
+ const apiPath = '/project/oauth2/facebook';
19130
+ const payload = {};
19131
+ if (typeof appId !== 'undefined') {
19132
+ payload['appId'] = appId;
19133
+ }
19134
+ if (typeof appSecret !== 'undefined') {
19135
+ payload['appSecret'] = appSecret;
19136
+ }
19137
+ if (typeof enabled !== 'undefined') {
19138
+ payload['enabled'] = enabled;
19139
+ }
19140
+ const uri = new URL(this.client.config.endpoint + apiPath);
19141
+ const apiHeaders = {
19142
+ 'content-type': 'application/json',
19143
+ };
19144
+ return this.client.call('patch', uri, apiHeaders, payload);
19145
+ }
19146
+ updateOAuth2Figma(paramsOrFirst, ...rest) {
19147
+ let params;
19148
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19149
+ params = (paramsOrFirst || {});
19150
+ }
19151
+ else {
19152
+ params = {
19153
+ clientId: paramsOrFirst,
19154
+ clientSecret: rest[0],
19155
+ enabled: rest[1]
19156
+ };
19157
+ }
19158
+ const clientId = params.clientId;
19159
+ const clientSecret = params.clientSecret;
19160
+ const enabled = params.enabled;
19161
+ const apiPath = '/project/oauth2/figma';
19162
+ const payload = {};
19163
+ if (typeof clientId !== 'undefined') {
19164
+ payload['clientId'] = clientId;
19165
+ }
19166
+ if (typeof clientSecret !== 'undefined') {
19167
+ payload['clientSecret'] = clientSecret;
19168
+ }
19169
+ if (typeof enabled !== 'undefined') {
19170
+ payload['enabled'] = enabled;
19171
+ }
19172
+ const uri = new URL(this.client.config.endpoint + apiPath);
19173
+ const apiHeaders = {
19174
+ 'content-type': 'application/json',
19175
+ };
19176
+ return this.client.call('patch', uri, apiHeaders, payload);
19177
+ }
19178
+ updateOAuth2FusionAuth(paramsOrFirst, ...rest) {
19179
+ let params;
19180
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19181
+ params = (paramsOrFirst || {});
19182
+ }
19183
+ else {
19184
+ params = {
19185
+ clientId: paramsOrFirst,
19186
+ clientSecret: rest[0],
19187
+ endpoint: rest[1],
19188
+ enabled: rest[2]
19189
+ };
19190
+ }
19191
+ const clientId = params.clientId;
19192
+ const clientSecret = params.clientSecret;
19193
+ const endpoint = params.endpoint;
19194
+ const enabled = params.enabled;
19195
+ const apiPath = '/project/oauth2/fusionauth';
19196
+ const payload = {};
19197
+ if (typeof clientId !== 'undefined') {
19198
+ payload['clientId'] = clientId;
19199
+ }
19200
+ if (typeof clientSecret !== 'undefined') {
19201
+ payload['clientSecret'] = clientSecret;
19202
+ }
19203
+ if (typeof endpoint !== 'undefined') {
19204
+ payload['endpoint'] = endpoint;
19205
+ }
19206
+ if (typeof enabled !== 'undefined') {
19207
+ payload['enabled'] = enabled;
19208
+ }
19209
+ const uri = new URL(this.client.config.endpoint + apiPath);
19210
+ const apiHeaders = {
19211
+ 'content-type': 'application/json',
19212
+ };
19213
+ return this.client.call('patch', uri, apiHeaders, payload);
19214
+ }
19215
+ updateOAuth2GitHub(paramsOrFirst, ...rest) {
19216
+ let params;
19217
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19218
+ params = (paramsOrFirst || {});
19219
+ }
19220
+ else {
19221
+ params = {
19222
+ clientId: paramsOrFirst,
19223
+ clientSecret: rest[0],
19224
+ enabled: rest[1]
19225
+ };
19226
+ }
19227
+ const clientId = params.clientId;
19228
+ const clientSecret = params.clientSecret;
19229
+ const enabled = params.enabled;
19230
+ const apiPath = '/project/oauth2/github';
19231
+ const payload = {};
19232
+ if (typeof clientId !== 'undefined') {
19233
+ payload['clientId'] = clientId;
19234
+ }
19235
+ if (typeof clientSecret !== 'undefined') {
19236
+ payload['clientSecret'] = clientSecret;
19237
+ }
19238
+ if (typeof enabled !== 'undefined') {
19239
+ payload['enabled'] = enabled;
19240
+ }
19241
+ const uri = new URL(this.client.config.endpoint + apiPath);
19242
+ const apiHeaders = {
19243
+ 'content-type': 'application/json',
19244
+ };
19245
+ return this.client.call('patch', uri, apiHeaders, payload);
19246
+ }
19247
+ updateOAuth2Gitlab(paramsOrFirst, ...rest) {
19248
+ let params;
19249
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19250
+ params = (paramsOrFirst || {});
19251
+ }
19252
+ else {
19253
+ params = {
19254
+ applicationId: paramsOrFirst,
19255
+ secret: rest[0],
19256
+ endpoint: rest[1],
19257
+ enabled: rest[2]
19258
+ };
19259
+ }
19260
+ const applicationId = params.applicationId;
19261
+ const secret = params.secret;
19262
+ const endpoint = params.endpoint;
19263
+ const enabled = params.enabled;
19264
+ const apiPath = '/project/oauth2/gitlab';
19265
+ const payload = {};
19266
+ if (typeof applicationId !== 'undefined') {
19267
+ payload['applicationId'] = applicationId;
19268
+ }
19269
+ if (typeof secret !== 'undefined') {
19270
+ payload['secret'] = secret;
19271
+ }
19272
+ if (typeof endpoint !== 'undefined') {
19273
+ payload['endpoint'] = endpoint;
19274
+ }
19275
+ if (typeof enabled !== 'undefined') {
19276
+ payload['enabled'] = enabled;
19277
+ }
19278
+ const uri = new URL(this.client.config.endpoint + apiPath);
19279
+ const apiHeaders = {
19280
+ 'content-type': 'application/json',
19281
+ };
19282
+ return this.client.call('patch', uri, apiHeaders, payload);
19283
+ }
19284
+ updateOAuth2Google(paramsOrFirst, ...rest) {
19285
+ let params;
19286
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19287
+ params = (paramsOrFirst || {});
19288
+ }
19289
+ else {
19290
+ params = {
19291
+ clientId: paramsOrFirst,
19292
+ clientSecret: rest[0],
19293
+ enabled: rest[1]
19294
+ };
19295
+ }
19296
+ const clientId = params.clientId;
19297
+ const clientSecret = params.clientSecret;
19298
+ const enabled = params.enabled;
19299
+ const apiPath = '/project/oauth2/google';
19300
+ const payload = {};
19301
+ if (typeof clientId !== 'undefined') {
19302
+ payload['clientId'] = clientId;
19303
+ }
19304
+ if (typeof clientSecret !== 'undefined') {
19305
+ payload['clientSecret'] = clientSecret;
19306
+ }
19307
+ if (typeof enabled !== 'undefined') {
19308
+ payload['enabled'] = enabled;
19309
+ }
19310
+ const uri = new URL(this.client.config.endpoint + apiPath);
19311
+ const apiHeaders = {
19312
+ 'content-type': 'application/json',
19313
+ };
19314
+ return this.client.call('patch', uri, apiHeaders, payload);
19315
+ }
19316
+ updateOAuth2Keycloak(paramsOrFirst, ...rest) {
19317
+ let params;
19318
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19319
+ params = (paramsOrFirst || {});
19320
+ }
19321
+ else {
19322
+ params = {
19323
+ clientId: paramsOrFirst,
19324
+ clientSecret: rest[0],
19325
+ endpoint: rest[1],
19326
+ realmName: rest[2],
19327
+ enabled: rest[3]
19328
+ };
19329
+ }
19330
+ const clientId = params.clientId;
19331
+ const clientSecret = params.clientSecret;
19332
+ const endpoint = params.endpoint;
19333
+ const realmName = params.realmName;
19334
+ const enabled = params.enabled;
19335
+ const apiPath = '/project/oauth2/keycloak';
19336
+ const payload = {};
19337
+ if (typeof clientId !== 'undefined') {
19338
+ payload['clientId'] = clientId;
19339
+ }
19340
+ if (typeof clientSecret !== 'undefined') {
19341
+ payload['clientSecret'] = clientSecret;
19342
+ }
19343
+ if (typeof endpoint !== 'undefined') {
19344
+ payload['endpoint'] = endpoint;
19345
+ }
19346
+ if (typeof realmName !== 'undefined') {
19347
+ payload['realmName'] = realmName;
19348
+ }
19349
+ if (typeof enabled !== 'undefined') {
19350
+ payload['enabled'] = enabled;
19351
+ }
19352
+ const uri = new URL(this.client.config.endpoint + apiPath);
19353
+ const apiHeaders = {
19354
+ 'content-type': 'application/json',
19355
+ };
19356
+ return this.client.call('patch', uri, apiHeaders, payload);
19357
+ }
19358
+ updateOAuth2Kick(paramsOrFirst, ...rest) {
19359
+ let params;
19360
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19361
+ params = (paramsOrFirst || {});
19362
+ }
19363
+ else {
19364
+ params = {
19365
+ clientId: paramsOrFirst,
19366
+ clientSecret: rest[0],
19367
+ enabled: rest[1]
19368
+ };
19369
+ }
19370
+ const clientId = params.clientId;
19371
+ const clientSecret = params.clientSecret;
19372
+ const enabled = params.enabled;
19373
+ const apiPath = '/project/oauth2/kick';
19374
+ const payload = {};
19375
+ if (typeof clientId !== 'undefined') {
19376
+ payload['clientId'] = clientId;
19377
+ }
19378
+ if (typeof clientSecret !== 'undefined') {
19379
+ payload['clientSecret'] = clientSecret;
19380
+ }
19381
+ if (typeof enabled !== 'undefined') {
19382
+ payload['enabled'] = enabled;
19383
+ }
19384
+ const uri = new URL(this.client.config.endpoint + apiPath);
19385
+ const apiHeaders = {
19386
+ 'content-type': 'application/json',
19387
+ };
19388
+ return this.client.call('patch', uri, apiHeaders, payload);
19389
+ }
19390
+ updateOAuth2Linkedin(paramsOrFirst, ...rest) {
19391
+ let params;
19392
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19393
+ params = (paramsOrFirst || {});
19394
+ }
19395
+ else {
19396
+ params = {
19397
+ clientId: paramsOrFirst,
19398
+ primaryClientSecret: rest[0],
19399
+ enabled: rest[1]
19400
+ };
19401
+ }
19402
+ const clientId = params.clientId;
19403
+ const primaryClientSecret = params.primaryClientSecret;
19404
+ const enabled = params.enabled;
19405
+ const apiPath = '/project/oauth2/linkedin';
19406
+ const payload = {};
19407
+ if (typeof clientId !== 'undefined') {
19408
+ payload['clientId'] = clientId;
19409
+ }
19410
+ if (typeof primaryClientSecret !== 'undefined') {
19411
+ payload['primaryClientSecret'] = primaryClientSecret;
19412
+ }
19413
+ if (typeof enabled !== 'undefined') {
19414
+ payload['enabled'] = enabled;
19415
+ }
19416
+ const uri = new URL(this.client.config.endpoint + apiPath);
19417
+ const apiHeaders = {
19418
+ 'content-type': 'application/json',
19419
+ };
19420
+ return this.client.call('patch', uri, apiHeaders, payload);
19421
+ }
19422
+ updateOAuth2Microsoft(paramsOrFirst, ...rest) {
19423
+ let params;
19424
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19425
+ params = (paramsOrFirst || {});
19426
+ }
19427
+ else {
19428
+ params = {
19429
+ applicationId: paramsOrFirst,
19430
+ applicationSecret: rest[0],
19431
+ tenant: rest[1],
19432
+ enabled: rest[2]
19433
+ };
19434
+ }
19435
+ const applicationId = params.applicationId;
19436
+ const applicationSecret = params.applicationSecret;
19437
+ const tenant = params.tenant;
19438
+ const enabled = params.enabled;
19439
+ const apiPath = '/project/oauth2/microsoft';
19440
+ const payload = {};
19441
+ if (typeof applicationId !== 'undefined') {
19442
+ payload['applicationId'] = applicationId;
19443
+ }
19444
+ if (typeof applicationSecret !== 'undefined') {
19445
+ payload['applicationSecret'] = applicationSecret;
19446
+ }
19447
+ if (typeof tenant !== 'undefined') {
19448
+ payload['tenant'] = tenant;
19449
+ }
19450
+ if (typeof enabled !== 'undefined') {
19451
+ payload['enabled'] = enabled;
19452
+ }
19453
+ const uri = new URL(this.client.config.endpoint + apiPath);
19454
+ const apiHeaders = {
19455
+ 'content-type': 'application/json',
19456
+ };
19457
+ return this.client.call('patch', uri, apiHeaders, payload);
19458
+ }
19459
+ updateOAuth2Notion(paramsOrFirst, ...rest) {
19460
+ let params;
19461
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19462
+ params = (paramsOrFirst || {});
19463
+ }
19464
+ else {
19465
+ params = {
19466
+ oauthClientId: paramsOrFirst,
19467
+ oauthClientSecret: rest[0],
19468
+ enabled: rest[1]
19469
+ };
19470
+ }
19471
+ const oauthClientId = params.oauthClientId;
19472
+ const oauthClientSecret = params.oauthClientSecret;
19473
+ const enabled = params.enabled;
19474
+ const apiPath = '/project/oauth2/notion';
19475
+ const payload = {};
19476
+ if (typeof oauthClientId !== 'undefined') {
19477
+ payload['oauthClientId'] = oauthClientId;
19478
+ }
19479
+ if (typeof oauthClientSecret !== 'undefined') {
19480
+ payload['oauthClientSecret'] = oauthClientSecret;
19481
+ }
19482
+ if (typeof enabled !== 'undefined') {
19483
+ payload['enabled'] = enabled;
19484
+ }
19485
+ const uri = new URL(this.client.config.endpoint + apiPath);
19486
+ const apiHeaders = {
19487
+ 'content-type': 'application/json',
19488
+ };
19489
+ return this.client.call('patch', uri, apiHeaders, payload);
19490
+ }
19491
+ updateOAuth2Oidc(paramsOrFirst, ...rest) {
19492
+ let params;
19493
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19494
+ params = (paramsOrFirst || {});
19495
+ }
19496
+ else {
19497
+ params = {
19498
+ clientId: paramsOrFirst,
19499
+ clientSecret: rest[0],
19500
+ wellKnownURL: rest[1],
19501
+ authorizationURL: rest[2],
19502
+ tokenUrl: rest[3],
19503
+ userInfoUrl: rest[4],
19504
+ enabled: rest[5]
19505
+ };
19506
+ }
19507
+ const clientId = params.clientId;
19508
+ const clientSecret = params.clientSecret;
19509
+ const wellKnownURL = params.wellKnownURL;
19510
+ const authorizationURL = params.authorizationURL;
19511
+ const tokenUrl = params.tokenUrl;
19512
+ const userInfoUrl = params.userInfoUrl;
19513
+ const enabled = params.enabled;
19514
+ const apiPath = '/project/oauth2/oidc';
19515
+ const payload = {};
19516
+ if (typeof clientId !== 'undefined') {
19517
+ payload['clientId'] = clientId;
19518
+ }
19519
+ if (typeof clientSecret !== 'undefined') {
19520
+ payload['clientSecret'] = clientSecret;
19521
+ }
19522
+ if (typeof wellKnownURL !== 'undefined') {
19523
+ payload['wellKnownURL'] = wellKnownURL;
19524
+ }
19525
+ if (typeof authorizationURL !== 'undefined') {
19526
+ payload['authorizationURL'] = authorizationURL;
19527
+ }
19528
+ if (typeof tokenUrl !== 'undefined') {
19529
+ payload['tokenUrl'] = tokenUrl;
19530
+ }
19531
+ if (typeof userInfoUrl !== 'undefined') {
19532
+ payload['userInfoUrl'] = userInfoUrl;
19533
+ }
19534
+ if (typeof enabled !== 'undefined') {
19535
+ payload['enabled'] = enabled;
19536
+ }
19537
+ const uri = new URL(this.client.config.endpoint + apiPath);
19538
+ const apiHeaders = {
19539
+ 'content-type': 'application/json',
19540
+ };
19541
+ return this.client.call('patch', uri, apiHeaders, payload);
19542
+ }
19543
+ updateOAuth2Okta(paramsOrFirst, ...rest) {
19544
+ let params;
19545
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19546
+ params = (paramsOrFirst || {});
19547
+ }
19548
+ else {
19549
+ params = {
19550
+ clientId: paramsOrFirst,
19551
+ clientSecret: rest[0],
19552
+ domain: rest[1],
19553
+ authorizationServerId: rest[2],
19554
+ enabled: rest[3]
19555
+ };
19556
+ }
19557
+ const clientId = params.clientId;
19558
+ const clientSecret = params.clientSecret;
19559
+ const domain = params.domain;
19560
+ const authorizationServerId = params.authorizationServerId;
19561
+ const enabled = params.enabled;
19562
+ const apiPath = '/project/oauth2/okta';
19563
+ const payload = {};
19564
+ if (typeof clientId !== 'undefined') {
19565
+ payload['clientId'] = clientId;
19566
+ }
19567
+ if (typeof clientSecret !== 'undefined') {
19568
+ payload['clientSecret'] = clientSecret;
19569
+ }
19570
+ if (typeof domain !== 'undefined') {
19571
+ payload['domain'] = domain;
19572
+ }
19573
+ if (typeof authorizationServerId !== 'undefined') {
19574
+ payload['authorizationServerId'] = authorizationServerId;
19575
+ }
19576
+ if (typeof enabled !== 'undefined') {
19577
+ payload['enabled'] = enabled;
19578
+ }
19579
+ const uri = new URL(this.client.config.endpoint + apiPath);
19580
+ const apiHeaders = {
19581
+ 'content-type': 'application/json',
19582
+ };
19583
+ return this.client.call('patch', uri, apiHeaders, payload);
19584
+ }
19585
+ updateOAuth2Paypal(paramsOrFirst, ...rest) {
19586
+ let params;
19587
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19588
+ params = (paramsOrFirst || {});
19589
+ }
19590
+ else {
19591
+ params = {
19592
+ clientId: paramsOrFirst,
19593
+ secretKey: rest[0],
19594
+ enabled: rest[1]
19595
+ };
19596
+ }
19597
+ const clientId = params.clientId;
19598
+ const secretKey = params.secretKey;
19599
+ const enabled = params.enabled;
19600
+ const apiPath = '/project/oauth2/paypal';
19601
+ const payload = {};
19602
+ if (typeof clientId !== 'undefined') {
19603
+ payload['clientId'] = clientId;
19604
+ }
19605
+ if (typeof secretKey !== 'undefined') {
19606
+ payload['secretKey'] = secretKey;
19607
+ }
19608
+ if (typeof enabled !== 'undefined') {
19609
+ payload['enabled'] = enabled;
19610
+ }
19611
+ const uri = new URL(this.client.config.endpoint + apiPath);
19612
+ const apiHeaders = {
19613
+ 'content-type': 'application/json',
19614
+ };
19615
+ return this.client.call('patch', uri, apiHeaders, payload);
19616
+ }
19617
+ updateOAuth2PaypalSandbox(paramsOrFirst, ...rest) {
19618
+ let params;
19619
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19620
+ params = (paramsOrFirst || {});
19621
+ }
19622
+ else {
19623
+ params = {
19624
+ clientId: paramsOrFirst,
19625
+ secretKey: rest[0],
19626
+ enabled: rest[1]
19627
+ };
19628
+ }
19629
+ const clientId = params.clientId;
19630
+ const secretKey = params.secretKey;
19631
+ const enabled = params.enabled;
19632
+ const apiPath = '/project/oauth2/paypalSandbox';
19633
+ const payload = {};
19634
+ if (typeof clientId !== 'undefined') {
19635
+ payload['clientId'] = clientId;
19636
+ }
19637
+ if (typeof secretKey !== 'undefined') {
19638
+ payload['secretKey'] = secretKey;
19639
+ }
19640
+ if (typeof enabled !== 'undefined') {
19641
+ payload['enabled'] = enabled;
19642
+ }
19643
+ const uri = new URL(this.client.config.endpoint + apiPath);
19644
+ const apiHeaders = {
19645
+ 'content-type': 'application/json',
19646
+ };
19647
+ return this.client.call('patch', uri, apiHeaders, payload);
19648
+ }
19649
+ updateOAuth2Podio(paramsOrFirst, ...rest) {
19650
+ let params;
19651
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19652
+ params = (paramsOrFirst || {});
19653
+ }
19654
+ else {
19655
+ params = {
19656
+ clientId: paramsOrFirst,
19657
+ clientSecret: rest[0],
19658
+ enabled: rest[1]
19659
+ };
19660
+ }
19661
+ const clientId = params.clientId;
19662
+ const clientSecret = params.clientSecret;
19663
+ const enabled = params.enabled;
19664
+ const apiPath = '/project/oauth2/podio';
19665
+ const payload = {};
19666
+ if (typeof clientId !== 'undefined') {
19667
+ payload['clientId'] = clientId;
19668
+ }
19669
+ if (typeof clientSecret !== 'undefined') {
19670
+ payload['clientSecret'] = clientSecret;
19671
+ }
19672
+ if (typeof enabled !== 'undefined') {
19673
+ payload['enabled'] = enabled;
19674
+ }
19675
+ const uri = new URL(this.client.config.endpoint + apiPath);
19676
+ const apiHeaders = {
19677
+ 'content-type': 'application/json',
19678
+ };
19679
+ return this.client.call('patch', uri, apiHeaders, payload);
19680
+ }
19681
+ updateOAuth2Salesforce(paramsOrFirst, ...rest) {
19682
+ let params;
19683
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19684
+ params = (paramsOrFirst || {});
19685
+ }
19686
+ else {
19687
+ params = {
19688
+ customerKey: paramsOrFirst,
19689
+ customerSecret: rest[0],
19690
+ enabled: rest[1]
19691
+ };
19692
+ }
19693
+ const customerKey = params.customerKey;
19694
+ const customerSecret = params.customerSecret;
19695
+ const enabled = params.enabled;
19696
+ const apiPath = '/project/oauth2/salesforce';
19697
+ const payload = {};
19698
+ if (typeof customerKey !== 'undefined') {
19699
+ payload['customerKey'] = customerKey;
19700
+ }
19701
+ if (typeof customerSecret !== 'undefined') {
19702
+ payload['customerSecret'] = customerSecret;
19703
+ }
19704
+ if (typeof enabled !== 'undefined') {
19705
+ payload['enabled'] = enabled;
19706
+ }
19707
+ const uri = new URL(this.client.config.endpoint + apiPath);
19708
+ const apiHeaders = {
19709
+ 'content-type': 'application/json',
19710
+ };
19711
+ return this.client.call('patch', uri, apiHeaders, payload);
19712
+ }
19713
+ updateOAuth2Slack(paramsOrFirst, ...rest) {
19714
+ let params;
19715
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19716
+ params = (paramsOrFirst || {});
19717
+ }
19718
+ else {
19719
+ params = {
19720
+ clientId: paramsOrFirst,
19721
+ clientSecret: rest[0],
19722
+ enabled: rest[1]
19723
+ };
19724
+ }
19725
+ const clientId = params.clientId;
19726
+ const clientSecret = params.clientSecret;
19727
+ const enabled = params.enabled;
19728
+ const apiPath = '/project/oauth2/slack';
19729
+ const payload = {};
19730
+ if (typeof clientId !== 'undefined') {
19731
+ payload['clientId'] = clientId;
19732
+ }
19733
+ if (typeof clientSecret !== 'undefined') {
19734
+ payload['clientSecret'] = clientSecret;
19735
+ }
19736
+ if (typeof enabled !== 'undefined') {
19737
+ payload['enabled'] = enabled;
19738
+ }
19739
+ const uri = new URL(this.client.config.endpoint + apiPath);
19740
+ const apiHeaders = {
19741
+ 'content-type': 'application/json',
19742
+ };
19743
+ return this.client.call('patch', uri, apiHeaders, payload);
19744
+ }
19745
+ updateOAuth2Spotify(paramsOrFirst, ...rest) {
19746
+ let params;
19747
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19748
+ params = (paramsOrFirst || {});
19749
+ }
19750
+ else {
19751
+ params = {
19752
+ clientId: paramsOrFirst,
19753
+ clientSecret: rest[0],
19754
+ enabled: rest[1]
19755
+ };
19756
+ }
19757
+ const clientId = params.clientId;
19758
+ const clientSecret = params.clientSecret;
19759
+ const enabled = params.enabled;
19760
+ const apiPath = '/project/oauth2/spotify';
19761
+ const payload = {};
19762
+ if (typeof clientId !== 'undefined') {
19763
+ payload['clientId'] = clientId;
19764
+ }
19765
+ if (typeof clientSecret !== 'undefined') {
19766
+ payload['clientSecret'] = clientSecret;
19767
+ }
19768
+ if (typeof enabled !== 'undefined') {
19769
+ payload['enabled'] = enabled;
19770
+ }
19771
+ const uri = new URL(this.client.config.endpoint + apiPath);
19772
+ const apiHeaders = {
19773
+ 'content-type': 'application/json',
19774
+ };
19775
+ return this.client.call('patch', uri, apiHeaders, payload);
19776
+ }
19777
+ updateOAuth2Stripe(paramsOrFirst, ...rest) {
19778
+ let params;
19779
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19780
+ params = (paramsOrFirst || {});
19781
+ }
19782
+ else {
19783
+ params = {
19784
+ clientId: paramsOrFirst,
19785
+ apiSecretKey: rest[0],
19786
+ enabled: rest[1]
19787
+ };
19788
+ }
19789
+ const clientId = params.clientId;
19790
+ const apiSecretKey = params.apiSecretKey;
19791
+ const enabled = params.enabled;
19792
+ const apiPath = '/project/oauth2/stripe';
19793
+ const payload = {};
19794
+ if (typeof clientId !== 'undefined') {
19795
+ payload['clientId'] = clientId;
19796
+ }
19797
+ if (typeof apiSecretKey !== 'undefined') {
19798
+ payload['apiSecretKey'] = apiSecretKey;
19799
+ }
19800
+ if (typeof enabled !== 'undefined') {
19801
+ payload['enabled'] = enabled;
19802
+ }
19803
+ const uri = new URL(this.client.config.endpoint + apiPath);
19804
+ const apiHeaders = {
19805
+ 'content-type': 'application/json',
19806
+ };
19807
+ return this.client.call('patch', uri, apiHeaders, payload);
19808
+ }
19809
+ updateOAuth2Tradeshift(paramsOrFirst, ...rest) {
19810
+ let params;
19811
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19812
+ params = (paramsOrFirst || {});
19813
+ }
19814
+ else {
19815
+ params = {
19816
+ oauth2ClientId: paramsOrFirst,
19817
+ oauth2ClientSecret: rest[0],
19818
+ enabled: rest[1]
19819
+ };
19820
+ }
19821
+ const oauth2ClientId = params.oauth2ClientId;
19822
+ const oauth2ClientSecret = params.oauth2ClientSecret;
19823
+ const enabled = params.enabled;
19824
+ const apiPath = '/project/oauth2/tradeshift';
17928
19825
  const payload = {};
19826
+ if (typeof oauth2ClientId !== 'undefined') {
19827
+ payload['oauth2ClientId'] = oauth2ClientId;
19828
+ }
19829
+ if (typeof oauth2ClientSecret !== 'undefined') {
19830
+ payload['oauth2ClientSecret'] = oauth2ClientSecret;
19831
+ }
17929
19832
  if (typeof enabled !== 'undefined') {
17930
19833
  payload['enabled'] = enabled;
17931
19834
  }
@@ -17935,22 +19838,29 @@ class Project {
17935
19838
  };
17936
19839
  return this.client.call('patch', uri, apiHeaders, payload);
17937
19840
  }
17938
- updateDisposableEmails(paramsOrFirst) {
19841
+ updateOAuth2TradeshiftSandbox(paramsOrFirst, ...rest) {
17939
19842
  let params;
17940
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19843
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17941
19844
  params = (paramsOrFirst || {});
17942
19845
  }
17943
19846
  else {
17944
19847
  params = {
17945
- enabled: paramsOrFirst
19848
+ oauth2ClientId: paramsOrFirst,
19849
+ oauth2ClientSecret: rest[0],
19850
+ enabled: rest[1]
17946
19851
  };
17947
19852
  }
19853
+ const oauth2ClientId = params.oauth2ClientId;
19854
+ const oauth2ClientSecret = params.oauth2ClientSecret;
17948
19855
  const enabled = params.enabled;
17949
- if (typeof enabled === 'undefined') {
17950
- throw new AppwriteException('Missing required parameter: "enabled"');
17951
- }
17952
- const apiPath = '/project/auth/disposable-emails';
19856
+ const apiPath = '/project/oauth2/tradeshiftBox';
17953
19857
  const payload = {};
19858
+ if (typeof oauth2ClientId !== 'undefined') {
19859
+ payload['oauth2ClientId'] = oauth2ClientId;
19860
+ }
19861
+ if (typeof oauth2ClientSecret !== 'undefined') {
19862
+ payload['oauth2ClientSecret'] = oauth2ClientSecret;
19863
+ }
17954
19864
  if (typeof enabled !== 'undefined') {
17955
19865
  payload['enabled'] = enabled;
17956
19866
  }
@@ -17960,22 +19870,29 @@ class Project {
17960
19870
  };
17961
19871
  return this.client.call('patch', uri, apiHeaders, payload);
17962
19872
  }
17963
- updateFreeEmails(paramsOrFirst) {
19873
+ updateOAuth2Twitch(paramsOrFirst, ...rest) {
17964
19874
  let params;
17965
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19875
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17966
19876
  params = (paramsOrFirst || {});
17967
19877
  }
17968
19878
  else {
17969
19879
  params = {
17970
- enabled: paramsOrFirst
19880
+ clientId: paramsOrFirst,
19881
+ clientSecret: rest[0],
19882
+ enabled: rest[1]
17971
19883
  };
17972
19884
  }
19885
+ const clientId = params.clientId;
19886
+ const clientSecret = params.clientSecret;
17973
19887
  const enabled = params.enabled;
17974
- if (typeof enabled === 'undefined') {
17975
- throw new AppwriteException('Missing required parameter: "enabled"');
17976
- }
17977
- const apiPath = '/project/auth/free-emails';
19888
+ const apiPath = '/project/oauth2/twitch';
17978
19889
  const payload = {};
19890
+ if (typeof clientId !== 'undefined') {
19891
+ payload['clientId'] = clientId;
19892
+ }
19893
+ if (typeof clientSecret !== 'undefined') {
19894
+ payload['clientSecret'] = clientSecret;
19895
+ }
17979
19896
  if (typeof enabled !== 'undefined') {
17980
19897
  payload['enabled'] = enabled;
17981
19898
  }
@@ -17985,186 +19902,217 @@ class Project {
17985
19902
  };
17986
19903
  return this.client.call('patch', uri, apiHeaders, payload);
17987
19904
  }
17988
- listKeys(paramsOrFirst, ...rest) {
19905
+ updateOAuth2WordPress(paramsOrFirst, ...rest) {
17989
19906
  let params;
17990
19907
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17991
19908
  params = (paramsOrFirst || {});
17992
19909
  }
17993
19910
  else {
17994
19911
  params = {
17995
- queries: paramsOrFirst,
17996
- total: rest[0]
19912
+ clientId: paramsOrFirst,
19913
+ clientSecret: rest[0],
19914
+ enabled: rest[1]
17997
19915
  };
17998
19916
  }
17999
- const queries = params.queries;
18000
- const total = params.total;
18001
- const apiPath = '/project/keys';
19917
+ const clientId = params.clientId;
19918
+ const clientSecret = params.clientSecret;
19919
+ const enabled = params.enabled;
19920
+ const apiPath = '/project/oauth2/wordpress';
18002
19921
  const payload = {};
18003
- if (typeof queries !== 'undefined') {
18004
- payload['queries'] = queries;
19922
+ if (typeof clientId !== 'undefined') {
19923
+ payload['clientId'] = clientId;
18005
19924
  }
18006
- if (typeof total !== 'undefined') {
18007
- payload['total'] = total;
19925
+ if (typeof clientSecret !== 'undefined') {
19926
+ payload['clientSecret'] = clientSecret;
19927
+ }
19928
+ if (typeof enabled !== 'undefined') {
19929
+ payload['enabled'] = enabled;
18008
19930
  }
18009
19931
  const uri = new URL(this.client.config.endpoint + apiPath);
18010
- const apiHeaders = {};
18011
- return this.client.call('get', uri, apiHeaders, payload);
19932
+ const apiHeaders = {
19933
+ 'content-type': 'application/json',
19934
+ };
19935
+ return this.client.call('patch', uri, apiHeaders, payload);
18012
19936
  }
18013
- createKey(paramsOrFirst, ...rest) {
19937
+ updateOAuth2X(paramsOrFirst, ...rest) {
18014
19938
  let params;
18015
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19939
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18016
19940
  params = (paramsOrFirst || {});
18017
19941
  }
18018
19942
  else {
18019
19943
  params = {
18020
- keyId: paramsOrFirst,
18021
- name: rest[0],
18022
- scopes: rest[1],
18023
- expire: rest[2]
19944
+ customerKey: paramsOrFirst,
19945
+ secretKey: rest[0],
19946
+ enabled: rest[1]
18024
19947
  };
18025
19948
  }
18026
- const keyId = params.keyId;
18027
- const name = params.name;
18028
- const scopes = params.scopes;
18029
- const expire = params.expire;
18030
- if (typeof keyId === 'undefined') {
18031
- throw new AppwriteException('Missing required parameter: "keyId"');
18032
- }
18033
- if (typeof name === 'undefined') {
18034
- throw new AppwriteException('Missing required parameter: "name"');
18035
- }
18036
- if (typeof scopes === 'undefined') {
18037
- throw new AppwriteException('Missing required parameter: "scopes"');
18038
- }
18039
- const apiPath = '/project/keys';
19949
+ const customerKey = params.customerKey;
19950
+ const secretKey = params.secretKey;
19951
+ const enabled = params.enabled;
19952
+ const apiPath = '/project/oauth2/x';
18040
19953
  const payload = {};
18041
- if (typeof keyId !== 'undefined') {
18042
- payload['keyId'] = keyId;
19954
+ if (typeof customerKey !== 'undefined') {
19955
+ payload['customerKey'] = customerKey;
18043
19956
  }
18044
- if (typeof name !== 'undefined') {
18045
- payload['name'] = name;
18046
- }
18047
- if (typeof scopes !== 'undefined') {
18048
- payload['scopes'] = scopes;
19957
+ if (typeof secretKey !== 'undefined') {
19958
+ payload['secretKey'] = secretKey;
18049
19959
  }
18050
- if (typeof expire !== 'undefined') {
18051
- payload['expire'] = expire;
19960
+ if (typeof enabled !== 'undefined') {
19961
+ payload['enabled'] = enabled;
18052
19962
  }
18053
19963
  const uri = new URL(this.client.config.endpoint + apiPath);
18054
19964
  const apiHeaders = {
18055
19965
  'content-type': 'application/json',
18056
19966
  };
18057
- return this.client.call('post', uri, apiHeaders, payload);
19967
+ return this.client.call('patch', uri, apiHeaders, payload);
18058
19968
  }
18059
- getKey(paramsOrFirst) {
19969
+ updateOAuth2Yahoo(paramsOrFirst, ...rest) {
18060
19970
  let params;
18061
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19971
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18062
19972
  params = (paramsOrFirst || {});
18063
19973
  }
18064
19974
  else {
18065
19975
  params = {
18066
- keyId: paramsOrFirst
19976
+ clientId: paramsOrFirst,
19977
+ clientSecret: rest[0],
19978
+ enabled: rest[1]
18067
19979
  };
18068
19980
  }
18069
- const keyId = params.keyId;
18070
- if (typeof keyId === 'undefined') {
18071
- throw new AppwriteException('Missing required parameter: "keyId"');
18072
- }
18073
- const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
19981
+ const clientId = params.clientId;
19982
+ const clientSecret = params.clientSecret;
19983
+ const enabled = params.enabled;
19984
+ const apiPath = '/project/oauth2/yahoo';
18074
19985
  const payload = {};
19986
+ if (typeof clientId !== 'undefined') {
19987
+ payload['clientId'] = clientId;
19988
+ }
19989
+ if (typeof clientSecret !== 'undefined') {
19990
+ payload['clientSecret'] = clientSecret;
19991
+ }
19992
+ if (typeof enabled !== 'undefined') {
19993
+ payload['enabled'] = enabled;
19994
+ }
18075
19995
  const uri = new URL(this.client.config.endpoint + apiPath);
18076
- const apiHeaders = {};
18077
- return this.client.call('get', uri, apiHeaders, payload);
19996
+ const apiHeaders = {
19997
+ 'content-type': 'application/json',
19998
+ };
19999
+ return this.client.call('patch', uri, apiHeaders, payload);
18078
20000
  }
18079
- updateKey(paramsOrFirst, ...rest) {
20001
+ updateOAuth2Yandex(paramsOrFirst, ...rest) {
18080
20002
  let params;
18081
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20003
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18082
20004
  params = (paramsOrFirst || {});
18083
20005
  }
18084
20006
  else {
18085
20007
  params = {
18086
- keyId: paramsOrFirst,
18087
- name: rest[0],
18088
- scopes: rest[1],
18089
- expire: rest[2]
20008
+ clientId: paramsOrFirst,
20009
+ clientSecret: rest[0],
20010
+ enabled: rest[1]
18090
20011
  };
18091
20012
  }
18092
- const keyId = params.keyId;
18093
- const name = params.name;
18094
- const scopes = params.scopes;
18095
- const expire = params.expire;
18096
- if (typeof keyId === 'undefined') {
18097
- throw new AppwriteException('Missing required parameter: "keyId"');
20013
+ const clientId = params.clientId;
20014
+ const clientSecret = params.clientSecret;
20015
+ const enabled = params.enabled;
20016
+ const apiPath = '/project/oauth2/yandex';
20017
+ const payload = {};
20018
+ if (typeof clientId !== 'undefined') {
20019
+ payload['clientId'] = clientId;
18098
20020
  }
18099
- if (typeof name === 'undefined') {
18100
- throw new AppwriteException('Missing required parameter: "name"');
20021
+ if (typeof clientSecret !== 'undefined') {
20022
+ payload['clientSecret'] = clientSecret;
18101
20023
  }
18102
- if (typeof scopes === 'undefined') {
18103
- throw new AppwriteException('Missing required parameter: "scopes"');
20024
+ if (typeof enabled !== 'undefined') {
20025
+ payload['enabled'] = enabled;
18104
20026
  }
18105
- const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
20027
+ const uri = new URL(this.client.config.endpoint + apiPath);
20028
+ const apiHeaders = {
20029
+ 'content-type': 'application/json',
20030
+ };
20031
+ return this.client.call('patch', uri, apiHeaders, payload);
20032
+ }
20033
+ updateOAuth2Zoho(paramsOrFirst, ...rest) {
20034
+ let params;
20035
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20036
+ params = (paramsOrFirst || {});
20037
+ }
20038
+ else {
20039
+ params = {
20040
+ clientId: paramsOrFirst,
20041
+ clientSecret: rest[0],
20042
+ enabled: rest[1]
20043
+ };
20044
+ }
20045
+ const clientId = params.clientId;
20046
+ const clientSecret = params.clientSecret;
20047
+ const enabled = params.enabled;
20048
+ const apiPath = '/project/oauth2/zoho';
18106
20049
  const payload = {};
18107
- if (typeof name !== 'undefined') {
18108
- payload['name'] = name;
20050
+ if (typeof clientId !== 'undefined') {
20051
+ payload['clientId'] = clientId;
18109
20052
  }
18110
- if (typeof scopes !== 'undefined') {
18111
- payload['scopes'] = scopes;
20053
+ if (typeof clientSecret !== 'undefined') {
20054
+ payload['clientSecret'] = clientSecret;
18112
20055
  }
18113
- if (typeof expire !== 'undefined') {
18114
- payload['expire'] = expire;
20056
+ if (typeof enabled !== 'undefined') {
20057
+ payload['enabled'] = enabled;
18115
20058
  }
18116
20059
  const uri = new URL(this.client.config.endpoint + apiPath);
18117
20060
  const apiHeaders = {
18118
20061
  'content-type': 'application/json',
18119
20062
  };
18120
- return this.client.call('put', uri, apiHeaders, payload);
20063
+ return this.client.call('patch', uri, apiHeaders, payload);
18121
20064
  }
18122
- deleteKey(paramsOrFirst) {
20065
+ updateOAuth2Zoom(paramsOrFirst, ...rest) {
18123
20066
  let params;
18124
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20067
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18125
20068
  params = (paramsOrFirst || {});
18126
20069
  }
18127
20070
  else {
18128
20071
  params = {
18129
- keyId: paramsOrFirst
20072
+ clientId: paramsOrFirst,
20073
+ clientSecret: rest[0],
20074
+ enabled: rest[1]
18130
20075
  };
18131
20076
  }
18132
- const keyId = params.keyId;
18133
- if (typeof keyId === 'undefined') {
18134
- throw new AppwriteException('Missing required parameter: "keyId"');
18135
- }
18136
- const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
20077
+ const clientId = params.clientId;
20078
+ const clientSecret = params.clientSecret;
20079
+ const enabled = params.enabled;
20080
+ const apiPath = '/project/oauth2/zoom';
18137
20081
  const payload = {};
20082
+ if (typeof clientId !== 'undefined') {
20083
+ payload['clientId'] = clientId;
20084
+ }
20085
+ if (typeof clientSecret !== 'undefined') {
20086
+ payload['clientSecret'] = clientSecret;
20087
+ }
20088
+ if (typeof enabled !== 'undefined') {
20089
+ payload['enabled'] = enabled;
20090
+ }
18138
20091
  const uri = new URL(this.client.config.endpoint + apiPath);
18139
20092
  const apiHeaders = {
18140
20093
  'content-type': 'application/json',
18141
20094
  };
18142
- return this.client.call('delete', uri, apiHeaders, payload);
20095
+ return this.client.call('patch', uri, apiHeaders, payload);
18143
20096
  }
18144
- updateLabels(paramsOrFirst) {
20097
+ getOAuth2Provider(paramsOrFirst) {
18145
20098
  let params;
18146
20099
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18147
20100
  params = (paramsOrFirst || {});
18148
20101
  }
18149
20102
  else {
18150
20103
  params = {
18151
- labels: paramsOrFirst
20104
+ provider: paramsOrFirst
18152
20105
  };
18153
20106
  }
18154
- const labels = params.labels;
18155
- if (typeof labels === 'undefined') {
18156
- throw new AppwriteException('Missing required parameter: "labels"');
20107
+ const provider = params.provider;
20108
+ if (typeof provider === 'undefined') {
20109
+ throw new AppwriteException('Missing required parameter: "provider"');
18157
20110
  }
18158
- const apiPath = '/project/labels';
20111
+ const apiPath = '/project/oauth2/{provider}'.replace('{provider}', provider);
18159
20112
  const payload = {};
18160
- if (typeof labels !== 'undefined') {
18161
- payload['labels'] = labels;
18162
- }
18163
20113
  const uri = new URL(this.client.config.endpoint + apiPath);
18164
- const apiHeaders = {
18165
- 'content-type': 'application/json',
18166
- };
18167
- return this.client.call('put', uri, apiHeaders, payload);
20114
+ const apiHeaders = {};
20115
+ return this.client.call('get', uri, apiHeaders, payload);
18168
20116
  }
18169
20117
  listPlatforms(paramsOrFirst, ...rest) {
18170
20118
  let params;
@@ -18628,6 +20576,31 @@ class Project {
18628
20576
  };
18629
20577
  return this.client.call('delete', uri, apiHeaders, payload);
18630
20578
  }
20579
+ listPolicies(paramsOrFirst, ...rest) {
20580
+ let params;
20581
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
20582
+ params = (paramsOrFirst || {});
20583
+ }
20584
+ else {
20585
+ params = {
20586
+ queries: paramsOrFirst,
20587
+ total: rest[0]
20588
+ };
20589
+ }
20590
+ const queries = params.queries;
20591
+ const total = params.total;
20592
+ const apiPath = '/project/policies';
20593
+ const payload = {};
20594
+ if (typeof queries !== 'undefined') {
20595
+ payload['queries'] = queries;
20596
+ }
20597
+ if (typeof total !== 'undefined') {
20598
+ payload['total'] = total;
20599
+ }
20600
+ const uri = new URL(this.client.config.endpoint + apiPath);
20601
+ const apiHeaders = {};
20602
+ return this.client.call('get', uri, apiHeaders, payload);
20603
+ }
18631
20604
  updateMembershipPrivacyPolicy(paramsOrFirst, ...rest) {
18632
20605
  let params;
18633
20606
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -18870,6 +20843,26 @@ class Project {
18870
20843
  };
18871
20844
  return this.client.call('patch', uri, apiHeaders, payload);
18872
20845
  }
20846
+ getPolicy(paramsOrFirst) {
20847
+ let params;
20848
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('policyId' in paramsOrFirst))) {
20849
+ params = (paramsOrFirst || {});
20850
+ }
20851
+ else {
20852
+ params = {
20853
+ policyId: paramsOrFirst
20854
+ };
20855
+ }
20856
+ const policyId = params.policyId;
20857
+ if (typeof policyId === 'undefined') {
20858
+ throw new AppwriteException('Missing required parameter: "policyId"');
20859
+ }
20860
+ const apiPath = '/project/policies/{policyId}'.replace('{policyId}', policyId);
20861
+ const payload = {};
20862
+ const uri = new URL(this.client.config.endpoint + apiPath);
20863
+ const apiHeaders = {};
20864
+ return this.client.call('get', uri, apiHeaders, payload);
20865
+ }
18873
20866
  updateProtocol(paramsOrFirst, ...rest) {
18874
20867
  let params;
18875
20868
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('protocolId' in paramsOrFirst || 'enabled' in paramsOrFirst))) {
@@ -19007,20 +21000,45 @@ class Project {
19007
21000
  emails: paramsOrFirst
19008
21001
  };
19009
21002
  }
19010
- const emails = params.emails;
19011
- if (typeof emails === 'undefined') {
19012
- throw new AppwriteException('Missing required parameter: "emails"');
19013
- }
19014
- const apiPath = '/project/smtp/tests';
21003
+ const emails = params.emails;
21004
+ if (typeof emails === 'undefined') {
21005
+ throw new AppwriteException('Missing required parameter: "emails"');
21006
+ }
21007
+ const apiPath = '/project/smtp/tests';
21008
+ const payload = {};
21009
+ if (typeof emails !== 'undefined') {
21010
+ payload['emails'] = emails;
21011
+ }
21012
+ const uri = new URL(this.client.config.endpoint + apiPath);
21013
+ const apiHeaders = {
21014
+ 'content-type': 'application/json',
21015
+ };
21016
+ return this.client.call('post', uri, apiHeaders, payload);
21017
+ }
21018
+ listEmailTemplates(paramsOrFirst, ...rest) {
21019
+ let params;
21020
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
21021
+ params = (paramsOrFirst || {});
21022
+ }
21023
+ else {
21024
+ params = {
21025
+ queries: paramsOrFirst,
21026
+ total: rest[0]
21027
+ };
21028
+ }
21029
+ const queries = params.queries;
21030
+ const total = params.total;
21031
+ const apiPath = '/project/templates/email';
19015
21032
  const payload = {};
19016
- if (typeof emails !== 'undefined') {
19017
- payload['emails'] = emails;
21033
+ if (typeof queries !== 'undefined') {
21034
+ payload['queries'] = queries;
21035
+ }
21036
+ if (typeof total !== 'undefined') {
21037
+ payload['total'] = total;
19018
21038
  }
19019
21039
  const uri = new URL(this.client.config.endpoint + apiPath);
19020
- const apiHeaders = {
19021
- 'content-type': 'application/json',
19022
- };
19023
- return this.client.call('post', uri, apiHeaders, payload);
21040
+ const apiHeaders = {};
21041
+ return this.client.call('get', uri, apiHeaders, payload);
19024
21042
  }
19025
21043
  updateEmailTemplate(paramsOrFirst, ...rest) {
19026
21044
  let params;
@@ -19515,93 +21533,6 @@ class Projects {
19515
21533
  };
19516
21534
  return this.client.call('patch', uri, apiHeaders, payload);
19517
21535
  }
19518
- delete(paramsOrFirst) {
19519
- let params;
19520
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19521
- params = (paramsOrFirst || {});
19522
- }
19523
- else {
19524
- params = {
19525
- projectId: paramsOrFirst
19526
- };
19527
- }
19528
- const projectId = params.projectId;
19529
- if (typeof projectId === 'undefined') {
19530
- throw new AppwriteException('Missing required parameter: "projectId"');
19531
- }
19532
- const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
19533
- const payload = {};
19534
- const uri = new URL(this.client.config.endpoint + apiPath);
19535
- const apiHeaders = {
19536
- 'content-type': 'application/json',
19537
- };
19538
- return this.client.call('delete', uri, apiHeaders, payload);
19539
- }
19540
- updateMockNumbers(paramsOrFirst, ...rest) {
19541
- let params;
19542
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19543
- params = (paramsOrFirst || {});
19544
- }
19545
- else {
19546
- params = {
19547
- projectId: paramsOrFirst,
19548
- numbers: rest[0]
19549
- };
19550
- }
19551
- const projectId = params.projectId;
19552
- const numbers = params.numbers;
19553
- if (typeof projectId === 'undefined') {
19554
- throw new AppwriteException('Missing required parameter: "projectId"');
19555
- }
19556
- if (typeof numbers === 'undefined') {
19557
- throw new AppwriteException('Missing required parameter: "numbers"');
19558
- }
19559
- const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
19560
- const payload = {};
19561
- if (typeof numbers !== 'undefined') {
19562
- payload['numbers'] = numbers;
19563
- }
19564
- const uri = new URL(this.client.config.endpoint + apiPath);
19565
- const apiHeaders = {
19566
- 'content-type': 'application/json',
19567
- };
19568
- return this.client.call('patch', uri, apiHeaders, payload);
19569
- }
19570
- updateAuthStatus(paramsOrFirst, ...rest) {
19571
- let params;
19572
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19573
- params = (paramsOrFirst || {});
19574
- }
19575
- else {
19576
- params = {
19577
- projectId: paramsOrFirst,
19578
- method: rest[0],
19579
- status: rest[1]
19580
- };
19581
- }
19582
- const projectId = params.projectId;
19583
- const method = params.method;
19584
- const status = params.status;
19585
- if (typeof projectId === 'undefined') {
19586
- throw new AppwriteException('Missing required parameter: "projectId"');
19587
- }
19588
- if (typeof method === 'undefined') {
19589
- throw new AppwriteException('Missing required parameter: "method"');
19590
- }
19591
- if (typeof status === 'undefined') {
19592
- throw new AppwriteException('Missing required parameter: "status"');
19593
- }
19594
- const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
19595
- const payload = {};
19596
- if (typeof status !== 'undefined') {
19597
- payload['status'] = status;
19598
- }
19599
- const uri = new URL(this.client.config.endpoint + apiPath);
19600
- const apiHeaders = {
19601
- 'content-type': 'application/json',
19602
- };
19603
- return this.client.call('patch', uri, apiHeaders, payload);
19604
- }
19605
21536
  updateConsoleAccess(paramsOrFirst) {
19606
21537
  let params;
19607
21538
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -19782,86 +21713,6 @@ class Projects {
19782
21713
  };
19783
21714
  return this.client.call('delete', uri, apiHeaders, payload);
19784
21715
  }
19785
- createJWT(paramsOrFirst, ...rest) {
19786
- let params;
19787
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19788
- params = (paramsOrFirst || {});
19789
- }
19790
- else {
19791
- params = {
19792
- projectId: paramsOrFirst,
19793
- scopes: rest[0],
19794
- duration: rest[1]
19795
- };
19796
- }
19797
- const projectId = params.projectId;
19798
- const scopes = params.scopes;
19799
- const duration = params.duration;
19800
- if (typeof projectId === 'undefined') {
19801
- throw new AppwriteException('Missing required parameter: "projectId"');
19802
- }
19803
- if (typeof scopes === 'undefined') {
19804
- throw new AppwriteException('Missing required parameter: "scopes"');
19805
- }
19806
- const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
19807
- const payload = {};
19808
- if (typeof scopes !== 'undefined') {
19809
- payload['scopes'] = scopes;
19810
- }
19811
- if (typeof duration !== 'undefined') {
19812
- payload['duration'] = duration;
19813
- }
19814
- const uri = new URL(this.client.config.endpoint + apiPath);
19815
- const apiHeaders = {
19816
- 'content-type': 'application/json',
19817
- };
19818
- return this.client.call('post', uri, apiHeaders, payload);
19819
- }
19820
- updateOAuth2(paramsOrFirst, ...rest) {
19821
- let params;
19822
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
19823
- params = (paramsOrFirst || {});
19824
- }
19825
- else {
19826
- params = {
19827
- projectId: paramsOrFirst,
19828
- provider: rest[0],
19829
- appId: rest[1],
19830
- secret: rest[2],
19831
- enabled: rest[3]
19832
- };
19833
- }
19834
- const projectId = params.projectId;
19835
- const provider = params.provider;
19836
- const appId = params.appId;
19837
- const secret = params.secret;
19838
- const enabled = params.enabled;
19839
- if (typeof projectId === 'undefined') {
19840
- throw new AppwriteException('Missing required parameter: "projectId"');
19841
- }
19842
- if (typeof provider === 'undefined') {
19843
- throw new AppwriteException('Missing required parameter: "provider"');
19844
- }
19845
- const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
19846
- const payload = {};
19847
- if (typeof provider !== 'undefined') {
19848
- payload['provider'] = provider;
19849
- }
19850
- if (typeof appId !== 'undefined') {
19851
- payload['appId'] = appId;
19852
- }
19853
- if (typeof secret !== 'undefined') {
19854
- payload['secret'] = secret;
19855
- }
19856
- if (typeof enabled !== 'undefined') {
19857
- payload['enabled'] = enabled;
19858
- }
19859
- const uri = new URL(this.client.config.endpoint + apiPath);
19860
- const apiHeaders = {
19861
- 'content-type': 'application/json',
19862
- };
19863
- return this.client.call('patch', uri, apiHeaders, payload);
19864
- }
19865
21716
  listSchedules(paramsOrFirst, ...rest) {
19866
21717
  let params;
19867
21718
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -30187,73 +32038,84 @@ var Scopes;
30187
32038
  Scopes["Account"] = "account";
30188
32039
  Scopes["TeamsRead"] = "teams.read";
30189
32040
  Scopes["TeamsWrite"] = "teams.write";
30190
- Scopes["SessionsWrite"] = "sessions.write";
32041
+ Scopes["ProjectRead"] = "project.read";
32042
+ Scopes["ProjectWrite"] = "project.write";
32043
+ Scopes["KeysRead"] = "keys.read";
32044
+ Scopes["KeysWrite"] = "keys.write";
32045
+ Scopes["PlatformsRead"] = "platforms.read";
32046
+ Scopes["PlatformsWrite"] = "platforms.write";
32047
+ Scopes["MocksRead"] = "mocks.read";
32048
+ Scopes["MocksWrite"] = "mocks.write";
32049
+ Scopes["PoliciesRead"] = "policies.read";
32050
+ Scopes["PoliciesWrite"] = "policies.write";
32051
+ Scopes["ProjectPoliciesRead"] = "project.policies.read";
32052
+ Scopes["ProjectPoliciesWrite"] = "project.policies.write";
32053
+ Scopes["TemplatesRead"] = "templates.read";
32054
+ Scopes["TemplatesWrite"] = "templates.write";
32055
+ Scopes["Oauth2Read"] = "oauth2.read";
32056
+ Scopes["Oauth2Write"] = "oauth2.write";
30191
32057
  Scopes["UsersRead"] = "users.read";
30192
32058
  Scopes["UsersWrite"] = "users.write";
32059
+ Scopes["SessionsRead"] = "sessions.read";
32060
+ Scopes["SessionsWrite"] = "sessions.write";
30193
32061
  Scopes["DatabasesRead"] = "databases.read";
30194
32062
  Scopes["DatabasesWrite"] = "databases.write";
30195
- Scopes["CollectionsRead"] = "collections.read";
30196
- Scopes["CollectionsWrite"] = "collections.write";
30197
32063
  Scopes["TablesRead"] = "tables.read";
30198
32064
  Scopes["TablesWrite"] = "tables.write";
30199
- Scopes["AttributesRead"] = "attributes.read";
30200
- Scopes["AttributesWrite"] = "attributes.write";
30201
32065
  Scopes["ColumnsRead"] = "columns.read";
30202
32066
  Scopes["ColumnsWrite"] = "columns.write";
30203
32067
  Scopes["IndexesRead"] = "indexes.read";
30204
32068
  Scopes["IndexesWrite"] = "indexes.write";
30205
- Scopes["DocumentsRead"] = "documents.read";
30206
- Scopes["DocumentsWrite"] = "documents.write";
30207
32069
  Scopes["RowsRead"] = "rows.read";
30208
32070
  Scopes["RowsWrite"] = "rows.write";
30209
- Scopes["FilesRead"] = "files.read";
30210
- Scopes["FilesWrite"] = "files.write";
32071
+ Scopes["CollectionsRead"] = "collections.read";
32072
+ Scopes["CollectionsWrite"] = "collections.write";
32073
+ Scopes["AttributesRead"] = "attributes.read";
32074
+ Scopes["AttributesWrite"] = "attributes.write";
32075
+ Scopes["DocumentsRead"] = "documents.read";
32076
+ Scopes["DocumentsWrite"] = "documents.write";
30211
32077
  Scopes["BucketsRead"] = "buckets.read";
30212
32078
  Scopes["BucketsWrite"] = "buckets.write";
32079
+ Scopes["FilesRead"] = "files.read";
32080
+ Scopes["FilesWrite"] = "files.write";
32081
+ Scopes["TokensRead"] = "tokens.read";
32082
+ Scopes["TokensWrite"] = "tokens.write";
30213
32083
  Scopes["FunctionsRead"] = "functions.read";
30214
32084
  Scopes["FunctionsWrite"] = "functions.write";
32085
+ Scopes["ExecutionsRead"] = "executions.read";
32086
+ Scopes["ExecutionsWrite"] = "executions.write";
32087
+ Scopes["ExecutionRead"] = "execution.read";
32088
+ Scopes["ExecutionWrite"] = "execution.write";
30215
32089
  Scopes["SitesRead"] = "sites.read";
30216
32090
  Scopes["SitesWrite"] = "sites.write";
30217
32091
  Scopes["LogRead"] = "log.read";
30218
32092
  Scopes["LogWrite"] = "log.write";
30219
- Scopes["ExecutionRead"] = "execution.read";
30220
- Scopes["ExecutionWrite"] = "execution.write";
30221
- Scopes["LocaleRead"] = "locale.read";
30222
- Scopes["AvatarsRead"] = "avatars.read";
30223
- Scopes["HealthRead"] = "health.read";
30224
32093
  Scopes["ProvidersRead"] = "providers.read";
30225
32094
  Scopes["ProvidersWrite"] = "providers.write";
30226
- Scopes["MessagesRead"] = "messages.read";
30227
- Scopes["MessagesWrite"] = "messages.write";
30228
32095
  Scopes["TopicsRead"] = "topics.read";
30229
32096
  Scopes["TopicsWrite"] = "topics.write";
30230
32097
  Scopes["SubscribersRead"] = "subscribers.read";
30231
32098
  Scopes["SubscribersWrite"] = "subscribers.write";
30232
32099
  Scopes["TargetsRead"] = "targets.read";
30233
32100
  Scopes["TargetsWrite"] = "targets.write";
30234
- Scopes["RulesRead"] = "rules.read";
30235
- Scopes["RulesWrite"] = "rules.write";
30236
- Scopes["SchedulesRead"] = "schedules.read";
30237
- Scopes["SchedulesWrite"] = "schedules.write";
32101
+ Scopes["MessagesRead"] = "messages.read";
32102
+ Scopes["MessagesWrite"] = "messages.write";
32103
+ Scopes["WebhooksRead"] = "webhooks.read";
32104
+ Scopes["WebhooksWrite"] = "webhooks.write";
32105
+ Scopes["LocaleRead"] = "locale.read";
32106
+ Scopes["AvatarsRead"] = "avatars.read";
32107
+ Scopes["HealthRead"] = "health.read";
32108
+ Scopes["AssistantRead"] = "assistant.read";
30238
32109
  Scopes["MigrationsRead"] = "migrations.read";
30239
32110
  Scopes["MigrationsWrite"] = "migrations.write";
32111
+ Scopes["SchedulesRead"] = "schedules.read";
32112
+ Scopes["SchedulesWrite"] = "schedules.write";
30240
32113
  Scopes["VcsRead"] = "vcs.read";
30241
32114
  Scopes["VcsWrite"] = "vcs.write";
30242
- Scopes["AssistantRead"] = "assistant.read";
30243
- Scopes["TokensRead"] = "tokens.read";
30244
- Scopes["TokensWrite"] = "tokens.write";
30245
- Scopes["WebhooksRead"] = "webhooks.read";
30246
- Scopes["WebhooksWrite"] = "webhooks.write";
30247
- Scopes["ProjectRead"] = "project.read";
30248
- Scopes["ProjectWrite"] = "project.write";
30249
- Scopes["KeysRead"] = "keys.read";
30250
- Scopes["KeysWrite"] = "keys.write";
30251
- Scopes["PlatformsRead"] = "platforms.read";
30252
- Scopes["PlatformsWrite"] = "platforms.write";
30253
- Scopes["PoliciesWrite"] = "policies.write";
30254
- Scopes["TemplatesRead"] = "templates.read";
30255
- Scopes["TemplatesWrite"] = "templates.write";
30256
- Scopes["PoliciesRead"] = "policies.read";
32115
+ Scopes["RulesRead"] = "rules.read";
32116
+ Scopes["RulesWrite"] = "rules.write";
32117
+ Scopes["BackupsPoliciesRead"] = "backups.policies.read";
32118
+ Scopes["BackupsPoliciesWrite"] = "backups.policies.write";
30257
32119
  Scopes["ArchivesRead"] = "archives.read";
30258
32120
  Scopes["ArchivesWrite"] = "archives.write";
30259
32121
  Scopes["RestorationsRead"] = "restorations.read";
@@ -30297,9 +32159,12 @@ var OAuthProvider;
30297
32159
  OAuthProvider["Etsy"] = "etsy";
30298
32160
  OAuthProvider["Facebook"] = "facebook";
30299
32161
  OAuthProvider["Figma"] = "figma";
32162
+ OAuthProvider["Fusionauth"] = "fusionauth";
30300
32163
  OAuthProvider["Github"] = "github";
30301
32164
  OAuthProvider["Gitlab"] = "gitlab";
30302
32165
  OAuthProvider["Google"] = "google";
32166
+ OAuthProvider["Keycloak"] = "keycloak";
32167
+ OAuthProvider["Kick"] = "kick";
30303
32168
  OAuthProvider["Linkedin"] = "linkedin";
30304
32169
  OAuthProvider["Microsoft"] = "microsoft";
30305
32170
  OAuthProvider["Notion"] = "notion";
@@ -31047,6 +32912,82 @@ var ConsoleResourceType;
31047
32912
  ConsoleResourceType["Rules"] = "rules";
31048
32913
  })(ConsoleResourceType || (ConsoleResourceType = {}));
31049
32914
 
32915
+ var QuerySuggestionResource;
32916
+ (function (QuerySuggestionResource) {
32917
+ QuerySuggestionResource["Activities"] = "activities";
32918
+ QuerySuggestionResource["ActivityEvents"] = "activityevents";
32919
+ QuerySuggestionResource["Archives"] = "archives";
32920
+ QuerySuggestionResource["Credits"] = "credits";
32921
+ QuerySuggestionResource["DnsRecords"] = "dnsrecords";
32922
+ QuerySuggestionResource["Domains"] = "domains";
32923
+ QuerySuggestionResource["Invoices"] = "invoices";
32924
+ QuerySuggestionResource["PaymentMethods"] = "paymentmethods";
32925
+ QuerySuggestionResource["Policies"] = "policies";
32926
+ QuerySuggestionResource["Projects"] = "projects";
32927
+ QuerySuggestionResource["Restorations"] = "restorations";
32928
+ QuerySuggestionResource["TeamAggregations"] = "teamaggregations";
32929
+ QuerySuggestionResource["Teams"] = "teams";
32930
+ QuerySuggestionResource["Databases"] = "databases";
32931
+ QuerySuggestionResource["Tables"] = "tables";
32932
+ QuerySuggestionResource["Rows"] = "rows";
32933
+ QuerySuggestionResource["Schedules"] = "schedules";
32934
+ QuerySuggestionResource["Platforms"] = "platforms";
32935
+ QuerySuggestionResource["Keys"] = "keys";
32936
+ QuerySuggestionResource["DevKeys"] = "devkeys";
32937
+ QuerySuggestionResource["Webhooks"] = "webhooks";
32938
+ QuerySuggestionResource["Certificates"] = "certificates";
32939
+ QuerySuggestionResource["Realtime"] = "realtime";
32940
+ QuerySuggestionResource["Rules"] = "rules";
32941
+ QuerySuggestionResource["Installations"] = "installations";
32942
+ QuerySuggestionResource["Repositories"] = "repositories";
32943
+ QuerySuggestionResource["VcsComments"] = "vcscomments";
32944
+ QuerySuggestionResource["VcsCommentLocks"] = "vcscommentlocks";
32945
+ QuerySuggestionResource["Users"] = "users";
32946
+ QuerySuggestionResource["Cache"] = "cache";
32947
+ QuerySuggestionResource["Tokens"] = "tokens";
32948
+ QuerySuggestionResource["Authenticators"] = "authenticators";
32949
+ QuerySuggestionResource["Challenges"] = "challenges";
32950
+ QuerySuggestionResource["Sessions"] = "sessions";
32951
+ QuerySuggestionResource["Identities"] = "identities";
32952
+ QuerySuggestionResource["Memberships"] = "memberships";
32953
+ QuerySuggestionResource["Buckets"] = "buckets";
32954
+ QuerySuggestionResource["Providers"] = "providers";
32955
+ QuerySuggestionResource["Messages"] = "messages";
32956
+ QuerySuggestionResource["Topics"] = "topics";
32957
+ QuerySuggestionResource["Subscribers"] = "subscribers";
32958
+ QuerySuggestionResource["Targets"] = "targets";
32959
+ QuerySuggestionResource["Companies"] = "companies";
32960
+ QuerySuggestionResource["BillingAddresses"] = "billingaddresses";
32961
+ QuerySuggestionResource["BillingAggregations"] = "billingaggregations";
32962
+ QuerySuggestionResource["BillingAggregationResources"] = "billingaggregationresources";
32963
+ QuerySuggestionResource["BillingTeamProjectAggregations"] = "billingteamprojectaggregations";
32964
+ QuerySuggestionResource["BillingTeamAggregationsV2"] = "billingteamaggregations_v2";
32965
+ QuerySuggestionResource["BillingTeamAggregationResources"] = "billingteamaggregationresources";
32966
+ QuerySuggestionResource["BillingInvoicesV2"] = "billinginvoices_v2";
32967
+ QuerySuggestionResource["BillingAddons"] = "billingaddons";
32968
+ QuerySuggestionResource["Alerts"] = "alerts";
32969
+ QuerySuggestionResource["Payments"] = "payments";
32970
+ QuerySuggestionResource["BillingDiscounts"] = "billingdiscounts";
32971
+ QuerySuggestionResource["Sources"] = "sources";
32972
+ QuerySuggestionResource["Deals"] = "deals";
32973
+ QuerySuggestionResource["Blocks"] = "blocks";
32974
+ QuerySuggestionResource["Threats"] = "threats";
32975
+ QuerySuggestionResource["Feedbacks"] = "feedbacks";
32976
+ QuerySuggestionResource["ShInstallations"] = "sh_installations";
32977
+ QuerySuggestionResource["Attributes"] = "attributes";
32978
+ QuerySuggestionResource["Indexes"] = "indexes";
32979
+ QuerySuggestionResource["Functions"] = "functions";
32980
+ QuerySuggestionResource["Sites"] = "sites";
32981
+ QuerySuggestionResource["Deployments"] = "deployments";
32982
+ QuerySuggestionResource["Executions"] = "executions";
32983
+ QuerySuggestionResource["Variables"] = "variables";
32984
+ QuerySuggestionResource["Migrations"] = "migrations";
32985
+ QuerySuggestionResource["ResourceTokens"] = "resourcetokens";
32986
+ QuerySuggestionResource["Transactions"] = "transactions";
32987
+ QuerySuggestionResource["TransactionLogs"] = "transactionlogs";
32988
+ QuerySuggestionResource["Stats"] = "stats";
32989
+ })(QuerySuggestionResource || (QuerySuggestionResource = {}));
32990
+
31050
32991
  var UsageRange;
31051
32992
  (function (UsageRange) {
31052
32993
  UsageRange["TwentyFourHours"] = "24h";
@@ -31186,6 +33127,7 @@ var Runtime;
31186
33127
  Runtime["Go124"] = "go-1.24";
31187
33128
  Runtime["Go125"] = "go-1.25";
31188
33129
  Runtime["Go126"] = "go-1.26";
33130
+ Runtime["Rust183"] = "rust-1.83";
31189
33131
  Runtime["Static1"] = "static-1";
31190
33132
  Runtime["Flutter324"] = "flutter-3.24";
31191
33133
  Runtime["Flutter327"] = "flutter-3.27";
@@ -31278,6 +33220,7 @@ var Runtimes;
31278
33220
  Runtimes["Go124"] = "go-1.24";
31279
33221
  Runtimes["Go125"] = "go-1.25";
31280
33222
  Runtimes["Go126"] = "go-1.26";
33223
+ Runtimes["Rust183"] = "rust-1.83";
31281
33224
  Runtimes["Static1"] = "static-1";
31282
33225
  Runtimes["Flutter324"] = "flutter-3.24";
31283
33226
  Runtimes["Flutter327"] = "flutter-3.27";
@@ -31354,6 +33297,23 @@ var Name;
31354
33297
  Name["V1migrations"] = "v1-migrations";
31355
33298
  })(Name || (Name = {}));
31356
33299
 
33300
+ var ResourceType;
33301
+ (function (ResourceType) {
33302
+ ResourceType["Projects"] = "projects";
33303
+ ResourceType["Functions"] = "functions";
33304
+ ResourceType["Sites"] = "sites";
33305
+ ResourceType["Databases"] = "databases";
33306
+ ResourceType["Buckets"] = "buckets";
33307
+ ResourceType["Providers"] = "providers";
33308
+ ResourceType["Topics"] = "topics";
33309
+ ResourceType["Subscribers"] = "subscribers";
33310
+ ResourceType["Messages"] = "messages";
33311
+ ResourceType["Function"] = "function";
33312
+ ResourceType["Execution"] = "execution";
33313
+ ResourceType["Message"] = "message";
33314
+ ResourceType["Backup"] = "backup";
33315
+ })(ResourceType || (ResourceType = {}));
33316
+
31357
33317
  var MessagePriority;
31358
33318
  (function (MessagePriority) {
31359
33319
  MessagePriority["Normal"] = "normal";
@@ -31394,6 +33354,7 @@ var AppwriteMigrationResource;
31394
33354
  AppwriteMigrationResource["Site"] = "site";
31395
33355
  AppwriteMigrationResource["Sitedeployment"] = "site-deployment";
31396
33356
  AppwriteMigrationResource["Sitevariable"] = "site-variable";
33357
+ AppwriteMigrationResource["Backuppolicy"] = "backup-policy";
31397
33358
  })(AppwriteMigrationResource || (AppwriteMigrationResource = {}));
31398
33359
 
31399
33360
  var FirebaseMigrationResource;
@@ -31445,6 +33406,30 @@ var Addon;
31445
33406
  Addon["Baa"] = "baa";
31446
33407
  })(Addon || (Addon = {}));
31447
33408
 
33409
+ var MethodId;
33410
+ (function (MethodId) {
33411
+ MethodId["Emailpassword"] = "email-password";
33412
+ MethodId["Magicurl"] = "magic-url";
33413
+ MethodId["Emailotp"] = "email-otp";
33414
+ MethodId["Anonymous"] = "anonymous";
33415
+ MethodId["Invites"] = "invites";
33416
+ MethodId["Jwt"] = "jwt";
33417
+ MethodId["Phone"] = "phone";
33418
+ })(MethodId || (MethodId = {}));
33419
+
33420
+ var PolicyId;
33421
+ (function (PolicyId) {
33422
+ PolicyId["Passworddictionary"] = "password-dictionary";
33423
+ PolicyId["Passwordhistory"] = "password-history";
33424
+ PolicyId["Passwordpersonaldata"] = "password-personal-data";
33425
+ PolicyId["Sessionalert"] = "session-alert";
33426
+ PolicyId["Sessionduration"] = "session-duration";
33427
+ PolicyId["Sessioninvalidation"] = "session-invalidation";
33428
+ PolicyId["Sessionlimit"] = "session-limit";
33429
+ PolicyId["Userlimit"] = "user-limit";
33430
+ PolicyId["Membershipprivacy"] = "membership-privacy";
33431
+ })(PolicyId || (PolicyId = {}));
33432
+
31448
33433
  var ProtocolId;
31449
33434
  (function (ProtocolId) {
31450
33435
  ProtocolId["Rest"] = "rest";
@@ -31641,25 +33626,6 @@ var Region;
31641
33626
  Region["Tor"] = "tor";
31642
33627
  })(Region || (Region = {}));
31643
33628
 
31644
- var AuthMethod;
31645
- (function (AuthMethod) {
31646
- AuthMethod["Emailpassword"] = "email-password";
31647
- AuthMethod["Magicurl"] = "magic-url";
31648
- AuthMethod["Emailotp"] = "email-otp";
31649
- AuthMethod["Anonymous"] = "anonymous";
31650
- AuthMethod["Invites"] = "invites";
31651
- AuthMethod["Jwt"] = "jwt";
31652
- AuthMethod["Phone"] = "phone";
31653
- })(AuthMethod || (AuthMethod = {}));
31654
-
31655
- var ResourceType;
31656
- (function (ResourceType) {
31657
- ResourceType["Function"] = "function";
31658
- ResourceType["Execution"] = "execution";
31659
- ResourceType["Message"] = "message";
31660
- ResourceType["Backup"] = "backup";
31661
- })(ResourceType || (ResourceType = {}));
31662
-
31663
33629
  var Status;
31664
33630
  (function (Status) {
31665
33631
  Status["Active"] = "active";
@@ -31780,6 +33746,7 @@ var BuildRuntime;
31780
33746
  BuildRuntime["Go124"] = "go-1.24";
31781
33747
  BuildRuntime["Go125"] = "go-1.25";
31782
33748
  BuildRuntime["Go126"] = "go-1.26";
33749
+ BuildRuntime["Rust183"] = "rust-1.83";
31783
33750
  BuildRuntime["Static1"] = "static-1";
31784
33751
  BuildRuntime["Flutter324"] = "flutter-3.24";
31785
33752
  BuildRuntime["Flutter327"] = "flutter-3.27";
@@ -32029,5 +33996,5 @@ var DomainPurchaseStatus;
32029
33996
  DomainPurchaseStatus["Cancelled"] = "cancelled";
32030
33997
  })(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
32031
33998
 
32032
- export { Account, Activities, Adapter, Addon, AppwriteException, AppwriteMigrationResource, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, BackupServices, Backups, BillingPlanGroup, Browser, BrowserPermission, BuildRuntime, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DatabasesIndexType, DeploymentDownloadType, DeploymentStatus, DetectionFrameworkType, DetectionRuntimeType, DocumentsDB, DocumentsDBIndexType, DomainPurchaseStatus, DomainTransferStatusEnum, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, FirebaseMigrationResource, Flag, Framework, Frameworks, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Model, NHostMigrationResource, Name, OAuthProvider, Operator, OrderBy, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, ProtocolId, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RegistrationType, RelationMutate, RelationshipType, ResourceType, Role, Runtime, Runtimes, Scopes, Secure, ServiceId, Sites, SmtpEncryption, Status, StatusCode, Storage, SupabaseMigrationResource, TablesDB, TablesDBIndexType, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, UseCases, Users, VCSDetectionType, VCSReferenceType, Vcs, VectorsDB, VectorsDBIndexType, Webhooks };
33999
+ export { Account, Activities, Adapter, Addon, AppwriteException, AppwriteMigrationResource, Assistant, AttributeStatus, AuthenticationFactor, AuthenticatorType, Avatars, BackupServices, Backups, BillingPlanGroup, Browser, BrowserPermission, BuildRuntime, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DatabasesIndexType, DeploymentDownloadType, DeploymentStatus, DetectionFrameworkType, DetectionRuntimeType, DocumentsDB, DocumentsDBIndexType, DomainPurchaseStatus, DomainTransferStatusEnum, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, FirebaseMigrationResource, Flag, Framework, Frameworks, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, Locale, Manager, MessagePriority, MessageStatus, Messaging, MessagingProviderType, MethodId, Migrations, Model, NHostMigrationResource, Name, OAuthProvider, Operator, OrderBy, Organizations, PasswordHash, Permission, Platform, PlatformType, PolicyId, Project, ProjectUsageRange, Projects, ProtocolId, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, QuerySuggestionResource, Realtime, Region, RegistrationType, RelationMutate, RelationshipType, ResourceType, Role, Runtime, Runtimes, Scopes, Secure, ServiceId, Sites, SmtpEncryption, Status, StatusCode, Storage, SupabaseMigrationResource, TablesDB, TablesDBIndexType, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, UseCases, Users, VCSDetectionType, VCSReferenceType, Vcs, VectorsDB, VectorsDBIndexType, Webhooks };
32033
34000
  //# sourceMappingURL=sdk.js.map