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