@appwrite.io/console 9.0.0 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/sdk.js CHANGED
@@ -578,7 +578,7 @@ class Client {
578
578
  'x-sdk-name': 'Console',
579
579
  'x-sdk-platform': 'console',
580
580
  'x-sdk-language': 'web',
581
- 'x-sdk-version': '9.0.0',
581
+ 'x-sdk-version': '9.1.0',
582
582
  'X-Appwrite-Response-Format': '1.9.1',
583
583
  };
584
584
  this.realtime = {
@@ -27040,7 +27040,8 @@ class Webhooks {
27040
27040
  enabled: rest[3],
27041
27041
  tls: rest[4],
27042
27042
  authUsername: rest[5],
27043
- authPassword: rest[6]
27043
+ authPassword: rest[6],
27044
+ secret: rest[7]
27044
27045
  };
27045
27046
  }
27046
27047
  const webhookId = params.webhookId;
@@ -27051,6 +27052,7 @@ class Webhooks {
27051
27052
  const tls = params.tls;
27052
27053
  const authUsername = params.authUsername;
27053
27054
  const authPassword = params.authPassword;
27055
+ const secret = params.secret;
27054
27056
  if (typeof webhookId === 'undefined') {
27055
27057
  throw new AppwriteException('Missing required parameter: "webhookId"');
27056
27058
  }
@@ -27089,6 +27091,9 @@ class Webhooks {
27089
27091
  if (typeof authPassword !== 'undefined') {
27090
27092
  payload['authPassword'] = authPassword;
27091
27093
  }
27094
+ if (typeof secret !== 'undefined') {
27095
+ payload['secret'] = secret;
27096
+ }
27092
27097
  const uri = new URL(this.client.config.endpoint + apiPath);
27093
27098
  const apiHeaders = {
27094
27099
  'content-type': 'application/json',
@@ -27203,22 +27208,27 @@ class Webhooks {
27203
27208
  };
27204
27209
  return this.client.call('delete', uri, apiHeaders, payload);
27205
27210
  }
27206
- updateSecret(paramsOrFirst) {
27211
+ updateSecret(paramsOrFirst, ...rest) {
27207
27212
  let params;
27208
27213
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
27209
27214
  params = (paramsOrFirst || {});
27210
27215
  }
27211
27216
  else {
27212
27217
  params = {
27213
- webhookId: paramsOrFirst
27218
+ webhookId: paramsOrFirst,
27219
+ secret: rest[0]
27214
27220
  };
27215
27221
  }
27216
27222
  const webhookId = params.webhookId;
27223
+ const secret = params.secret;
27217
27224
  if (typeof webhookId === 'undefined') {
27218
27225
  throw new AppwriteException('Missing required parameter: "webhookId"');
27219
27226
  }
27220
27227
  const apiPath = '/webhooks/{webhookId}/secret'.replace('{webhookId}', webhookId);
27221
27228
  const payload = {};
27229
+ if (typeof secret !== 'undefined') {
27230
+ payload['secret'] = secret;
27231
+ }
27222
27232
  const uri = new URL(this.client.config.endpoint + apiPath);
27223
27233
  const apiHeaders = {
27224
27234
  'content-type': 'application/json',