@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/iife/sdk.js CHANGED
@@ -4378,7 +4378,7 @@
4378
4378
  'x-sdk-name': 'Console',
4379
4379
  'x-sdk-platform': 'console',
4380
4380
  'x-sdk-language': 'web',
4381
- 'x-sdk-version': '9.0.0',
4381
+ 'x-sdk-version': '9.1.0',
4382
4382
  'X-Appwrite-Response-Format': '1.9.1',
4383
4383
  };
4384
4384
  this.realtime = {
@@ -30840,7 +30840,8 @@
30840
30840
  enabled: rest[3],
30841
30841
  tls: rest[4],
30842
30842
  authUsername: rest[5],
30843
- authPassword: rest[6]
30843
+ authPassword: rest[6],
30844
+ secret: rest[7]
30844
30845
  };
30845
30846
  }
30846
30847
  const webhookId = params.webhookId;
@@ -30851,6 +30852,7 @@
30851
30852
  const tls = params.tls;
30852
30853
  const authUsername = params.authUsername;
30853
30854
  const authPassword = params.authPassword;
30855
+ const secret = params.secret;
30854
30856
  if (typeof webhookId === 'undefined') {
30855
30857
  throw new AppwriteException('Missing required parameter: "webhookId"');
30856
30858
  }
@@ -30889,6 +30891,9 @@
30889
30891
  if (typeof authPassword !== 'undefined') {
30890
30892
  payload['authPassword'] = authPassword;
30891
30893
  }
30894
+ if (typeof secret !== 'undefined') {
30895
+ payload['secret'] = secret;
30896
+ }
30892
30897
  const uri = new URL(this.client.config.endpoint + apiPath);
30893
30898
  const apiHeaders = {
30894
30899
  'content-type': 'application/json',
@@ -31003,22 +31008,27 @@
31003
31008
  };
31004
31009
  return this.client.call('delete', uri, apiHeaders, payload);
31005
31010
  }
31006
- updateSecret(paramsOrFirst) {
31011
+ updateSecret(paramsOrFirst, ...rest) {
31007
31012
  let params;
31008
31013
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
31009
31014
  params = (paramsOrFirst || {});
31010
31015
  }
31011
31016
  else {
31012
31017
  params = {
31013
- webhookId: paramsOrFirst
31018
+ webhookId: paramsOrFirst,
31019
+ secret: rest[0]
31014
31020
  };
31015
31021
  }
31016
31022
  const webhookId = params.webhookId;
31023
+ const secret = params.secret;
31017
31024
  if (typeof webhookId === 'undefined') {
31018
31025
  throw new AppwriteException('Missing required parameter: "webhookId"');
31019
31026
  }
31020
31027
  const apiPath = '/webhooks/{webhookId}/secret'.replace('{webhookId}', webhookId);
31021
31028
  const payload = {};
31029
+ if (typeof secret !== 'undefined') {
31030
+ payload['secret'] = secret;
31031
+ }
31022
31032
  const uri = new URL(this.client.config.endpoint + apiPath);
31023
31033
  const apiHeaders = {
31024
31034
  'content-type': 'application/json',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@appwrite.io/console",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
5
- "version": "9.0.0",
5
+ "version": "9.1.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/types/models.d.ts CHANGED
@@ -4740,7 +4740,7 @@ export declare namespace Models {
4740
4740
  */
4741
4741
  authPassword: string;
4742
4742
  /**
4743
- * Signature key which can be used to validate incoming webhook payloads.
4743
+ * Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.
4744
4744
  */
4745
4745
  secret: string;
4746
4746
  /**
@@ -1086,7 +1086,7 @@ export declare class Organizations {
1086
1086
  */
1087
1087
  setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
1088
1088
  organizationId: string;
1089
- taxId: string;
1089
+ taxId?: string;
1090
1090
  }): Promise<Models.Organization<Preferences>>;
1091
1091
  /**
1092
1092
  * Set an organization's billing tax ID.
@@ -1097,7 +1097,7 @@ export declare class Organizations {
1097
1097
  * @returns {Promise<Models.Organization<Preferences>>}
1098
1098
  * @deprecated Use the object parameter style method for a better developer experience.
1099
1099
  */
1100
- setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, taxId: string): Promise<Models.Organization<Preferences>>;
1100
+ setBillingTaxId<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, taxId?: string): Promise<Models.Organization<Preferences>>;
1101
1101
  /**
1102
1102
  * Get the usage data for an organization.
1103
1103
  *
@@ -36,6 +36,7 @@ export declare class Webhooks {
36
36
  * @param {boolean} params.tls - Certificate verification, false for disabled or true for enabled.
37
37
  * @param {string} params.authUsername - Webhook HTTP user. Max length: 256 chars.
38
38
  * @param {string} params.authPassword - Webhook HTTP password. Max length: 256 chars.
39
+ * @param {string} params.secret - Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.
39
40
  * @throws {AppwriteException}
40
41
  * @returns {Promise<Models.Webhook>}
41
42
  */
@@ -48,6 +49,7 @@ export declare class Webhooks {
48
49
  tls?: boolean;
49
50
  authUsername?: string;
50
51
  authPassword?: string;
52
+ secret?: string;
51
53
  }): Promise<Models.Webhook>;
52
54
  /**
53
55
  * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
@@ -60,11 +62,12 @@ export declare class Webhooks {
60
62
  * @param {boolean} tls - Certificate verification, false for disabled or true for enabled.
61
63
  * @param {string} authUsername - Webhook HTTP user. Max length: 256 chars.
62
64
  * @param {string} authPassword - Webhook HTTP password. Max length: 256 chars.
65
+ * @param {string} secret - Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.
63
66
  * @throws {AppwriteException}
64
67
  * @returns {Promise<Models.Webhook>}
65
68
  * @deprecated Use the object parameter style method for a better developer experience.
66
69
  */
67
- create(webhookId: string, url: string, name: string, events: string[], enabled?: boolean, tls?: boolean, authUsername?: string, authPassword?: string): Promise<Models.Webhook>;
70
+ create(webhookId: string, url: string, name: string, events: string[], enabled?: boolean, tls?: boolean, authUsername?: string, authPassword?: string, secret?: string): Promise<Models.Webhook>;
68
71
  /**
69
72
  * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
70
73
  *
@@ -147,19 +150,22 @@ export declare class Webhooks {
147
150
  * Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.
148
151
  *
149
152
  * @param {string} params.webhookId - Webhook ID.
153
+ * @param {string} params.secret - Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.
150
154
  * @throws {AppwriteException}
151
155
  * @returns {Promise<Models.Webhook>}
152
156
  */
153
157
  updateSecret(params: {
154
158
  webhookId: string;
159
+ secret?: string;
155
160
  }): Promise<Models.Webhook>;
156
161
  /**
157
162
  * Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.
158
163
  *
159
164
  * @param {string} webhookId - Webhook ID.
165
+ * @param {string} secret - Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.
160
166
  * @throws {AppwriteException}
161
167
  * @returns {Promise<Models.Webhook>}
162
168
  * @deprecated Use the object parameter style method for a better developer experience.
163
169
  */
164
- updateSecret(webhookId: string): Promise<Models.Webhook>;
170
+ updateSecret(webhookId: string, secret?: string): Promise<Models.Webhook>;
165
171
  }