@appwrite.io/console 4.0.0 → 6.0.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +752 -383
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +752 -384
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +752 -383
  8. package/docs/examples/domains/update-purchase.md +16 -0
  9. package/docs/examples/domains/update-transfer-in.md +16 -0
  10. package/docs/examples/functions/create.md +3 -1
  11. package/docs/examples/functions/update.md +3 -1
  12. package/docs/examples/sites/create.md +4 -1
  13. package/docs/examples/sites/update.md +4 -1
  14. package/docs/examples/{projects/update-webhook.md → webhooks/create.md} +5 -6
  15. package/docs/examples/{projects/get-webhook.md → webhooks/delete.md} +3 -4
  16. package/docs/examples/{projects/delete-webhook.md → webhooks/get.md} +3 -4
  17. package/docs/examples/{projects/list-webhooks.md → webhooks/list.md} +4 -4
  18. package/docs/examples/{projects/update-webhook-signature.md → webhooks/update-signature.md} +3 -4
  19. package/docs/examples/{projects/create-webhook.md → webhooks/update.md} +6 -6
  20. package/package.json +1 -1
  21. package/src/client.ts +5 -1
  22. package/src/enums/appwrite-migration-resource.ts +4 -0
  23. package/src/enums/build-runtime.ts +86 -0
  24. package/src/enums/domain-purchase-status.ts +6 -0
  25. package/src/enums/{domain-transfer-status-status.ts → domain-transfer-status-enum.ts} +1 -1
  26. package/src/enums/runtime.ts +86 -0
  27. package/src/enums/runtimes.ts +86 -0
  28. package/src/enums/scopes.ts +2 -0
  29. package/src/index.ts +3 -1
  30. package/src/models.ts +140 -13
  31. package/src/services/account.ts +2 -2
  32. package/src/services/domains.ts +136 -10
  33. package/src/services/functions.ts +52 -24
  34. package/src/services/organizations.ts +2 -2
  35. package/src/services/projects.ts +0 -473
  36. package/src/services/sites.ts +83 -41
  37. package/src/services/webhooks.ts +451 -0
  38. package/types/enums/appwrite-migration-resource.d.ts +4 -0
  39. package/types/enums/build-runtime.d.ts +87 -1
  40. package/types/enums/domain-purchase-status.d.ts +6 -0
  41. package/types/enums/{domain-transfer-status-status.d.ts → domain-transfer-status-enum.d.ts} +1 -1
  42. package/types/enums/runtime.d.ts +87 -1
  43. package/types/enums/runtimes.d.ts +87 -1
  44. package/types/enums/scopes.d.ts +2 -0
  45. package/types/index.d.ts +3 -1
  46. package/types/models.d.ts +139 -13
  47. package/types/services/account.d.ts +2 -2
  48. package/types/services/domains.d.ts +52 -8
  49. package/types/services/functions.d.ts +20 -8
  50. package/types/services/organizations.d.ts +2 -2
  51. package/types/services/projects.d.ts +0 -171
  52. package/types/services/sites.d.ts +26 -8
  53. package/types/services/webhooks.d.ts +165 -0
@@ -1623,175 +1623,4 @@ export declare class Projects {
1623
1623
  * @deprecated Use the object parameter style method for a better developer experience.
1624
1624
  */
1625
1625
  deleteSMSTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate>;
1626
- /**
1627
- * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
1628
- *
1629
- * @param {string} params.projectId - Project unique ID.
1630
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1631
- * @throws {AppwriteException}
1632
- * @returns {Promise<Models.WebhookList>}
1633
- */
1634
- listWebhooks(params: {
1635
- projectId: string;
1636
- total?: boolean;
1637
- }): Promise<Models.WebhookList>;
1638
- /**
1639
- * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
1640
- *
1641
- * @param {string} projectId - Project unique ID.
1642
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1643
- * @throws {AppwriteException}
1644
- * @returns {Promise<Models.WebhookList>}
1645
- * @deprecated Use the object parameter style method for a better developer experience.
1646
- */
1647
- listWebhooks(projectId: string, total?: boolean): Promise<Models.WebhookList>;
1648
- /**
1649
- * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
1650
- *
1651
- * @param {string} params.projectId - Project unique ID.
1652
- * @param {string} params.name - Webhook name. Max length: 128 chars.
1653
- * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
1654
- * @param {string} params.url - Webhook URL.
1655
- * @param {boolean} params.security - Certificate verification, false for disabled or true for enabled.
1656
- * @param {boolean} params.enabled - Enable or disable a webhook.
1657
- * @param {string} params.httpUser - Webhook HTTP user. Max length: 256 chars.
1658
- * @param {string} params.httpPass - Webhook HTTP password. Max length: 256 chars.
1659
- * @throws {AppwriteException}
1660
- * @returns {Promise<Models.Webhook>}
1661
- */
1662
- createWebhook(params: {
1663
- projectId: string;
1664
- name: string;
1665
- events: string[];
1666
- url: string;
1667
- security: boolean;
1668
- enabled?: boolean;
1669
- httpUser?: string;
1670
- httpPass?: string;
1671
- }): Promise<Models.Webhook>;
1672
- /**
1673
- * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
1674
- *
1675
- * @param {string} projectId - Project unique ID.
1676
- * @param {string} name - Webhook name. Max length: 128 chars.
1677
- * @param {string[]} events - Events list. Maximum of 100 events are allowed.
1678
- * @param {string} url - Webhook URL.
1679
- * @param {boolean} security - Certificate verification, false for disabled or true for enabled.
1680
- * @param {boolean} enabled - Enable or disable a webhook.
1681
- * @param {string} httpUser - Webhook HTTP user. Max length: 256 chars.
1682
- * @param {string} httpPass - Webhook HTTP password. Max length: 256 chars.
1683
- * @throws {AppwriteException}
1684
- * @returns {Promise<Models.Webhook>}
1685
- * @deprecated Use the object parameter style method for a better developer experience.
1686
- */
1687
- createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook>;
1688
- /**
1689
- * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
1690
- *
1691
- * @param {string} params.projectId - Project unique ID.
1692
- * @param {string} params.webhookId - Webhook unique ID.
1693
- * @throws {AppwriteException}
1694
- * @returns {Promise<Models.Webhook>}
1695
- */
1696
- getWebhook(params: {
1697
- projectId: string;
1698
- webhookId: string;
1699
- }): Promise<Models.Webhook>;
1700
- /**
1701
- * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
1702
- *
1703
- * @param {string} projectId - Project unique ID.
1704
- * @param {string} webhookId - Webhook unique ID.
1705
- * @throws {AppwriteException}
1706
- * @returns {Promise<Models.Webhook>}
1707
- * @deprecated Use the object parameter style method for a better developer experience.
1708
- */
1709
- getWebhook(projectId: string, webhookId: string): Promise<Models.Webhook>;
1710
- /**
1711
- * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
1712
- *
1713
- * @param {string} params.projectId - Project unique ID.
1714
- * @param {string} params.webhookId - Webhook unique ID.
1715
- * @param {string} params.name - Webhook name. Max length: 128 chars.
1716
- * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
1717
- * @param {string} params.url - Webhook URL.
1718
- * @param {boolean} params.security - Certificate verification, false for disabled or true for enabled.
1719
- * @param {boolean} params.enabled - Enable or disable a webhook.
1720
- * @param {string} params.httpUser - Webhook HTTP user. Max length: 256 chars.
1721
- * @param {string} params.httpPass - Webhook HTTP password. Max length: 256 chars.
1722
- * @throws {AppwriteException}
1723
- * @returns {Promise<Models.Webhook>}
1724
- */
1725
- updateWebhook(params: {
1726
- projectId: string;
1727
- webhookId: string;
1728
- name: string;
1729
- events: string[];
1730
- url: string;
1731
- security: boolean;
1732
- enabled?: boolean;
1733
- httpUser?: string;
1734
- httpPass?: string;
1735
- }): Promise<Models.Webhook>;
1736
- /**
1737
- * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
1738
- *
1739
- * @param {string} projectId - Project unique ID.
1740
- * @param {string} webhookId - Webhook unique ID.
1741
- * @param {string} name - Webhook name. Max length: 128 chars.
1742
- * @param {string[]} events - Events list. Maximum of 100 events are allowed.
1743
- * @param {string} url - Webhook URL.
1744
- * @param {boolean} security - Certificate verification, false for disabled or true for enabled.
1745
- * @param {boolean} enabled - Enable or disable a webhook.
1746
- * @param {string} httpUser - Webhook HTTP user. Max length: 256 chars.
1747
- * @param {string} httpPass - Webhook HTTP password. Max length: 256 chars.
1748
- * @throws {AppwriteException}
1749
- * @returns {Promise<Models.Webhook>}
1750
- * @deprecated Use the object parameter style method for a better developer experience.
1751
- */
1752
- updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook>;
1753
- /**
1754
- * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
1755
- *
1756
- * @param {string} params.projectId - Project unique ID.
1757
- * @param {string} params.webhookId - Webhook unique ID.
1758
- * @throws {AppwriteException}
1759
- * @returns {Promise<{}>}
1760
- */
1761
- deleteWebhook(params: {
1762
- projectId: string;
1763
- webhookId: string;
1764
- }): Promise<{}>;
1765
- /**
1766
- * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
1767
- *
1768
- * @param {string} projectId - Project unique ID.
1769
- * @param {string} webhookId - Webhook unique ID.
1770
- * @throws {AppwriteException}
1771
- * @returns {Promise<{}>}
1772
- * @deprecated Use the object parameter style method for a better developer experience.
1773
- */
1774
- deleteWebhook(projectId: string, webhookId: string): Promise<{}>;
1775
- /**
1776
- * Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
1777
- *
1778
- * @param {string} params.projectId - Project unique ID.
1779
- * @param {string} params.webhookId - Webhook unique ID.
1780
- * @throws {AppwriteException}
1781
- * @returns {Promise<Models.Webhook>}
1782
- */
1783
- updateWebhookSignature(params: {
1784
- projectId: string;
1785
- webhookId: string;
1786
- }): Promise<Models.Webhook>;
1787
- /**
1788
- * Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
1789
- *
1790
- * @param {string} projectId - Project unique ID.
1791
- * @param {string} webhookId - Webhook unique ID.
1792
- * @throws {AppwriteException}
1793
- * @returns {Promise<Models.Webhook>}
1794
- * @deprecated Use the object parameter style method for a better developer experience.
1795
- */
1796
- updateWebhookSignature(projectId: string, webhookId: string): Promise<Models.Webhook>;
1797
1626
  }
@@ -49,6 +49,7 @@ export declare class Sites {
49
49
  * @param {number} params.timeout - Maximum request time in seconds.
50
50
  * @param {string} params.installCommand - Install Command.
51
51
  * @param {string} params.buildCommand - Build Command.
52
+ * @param {string} params.startCommand - Custom start command. Leave empty to use default.
52
53
  * @param {string} params.outputDirectory - Output Directory for site.
53
54
  * @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
54
55
  * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
@@ -57,7 +58,9 @@ export declare class Sites {
57
58
  * @param {string} params.providerBranch - Production branch for the repo linked to the site.
58
59
  * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
59
60
  * @param {string} params.providerRootDirectory - Path to site code in the linked repo.
60
- * @param {string} params.specification - Framework specification for the site and builds.
61
+ * @param {string} params.buildSpecification - Build specification for the site deployments.
62
+ * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
63
+ * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
61
64
  * @throws {AppwriteException}
62
65
  * @returns {Promise<Models.Site>}
63
66
  */
@@ -71,6 +74,7 @@ export declare class Sites {
71
74
  timeout?: number;
72
75
  installCommand?: string;
73
76
  buildCommand?: string;
77
+ startCommand?: string;
74
78
  outputDirectory?: string;
75
79
  adapter?: Adapter;
76
80
  installationId?: string;
@@ -79,7 +83,9 @@ export declare class Sites {
79
83
  providerBranch?: string;
80
84
  providerSilentMode?: boolean;
81
85
  providerRootDirectory?: string;
82
- specification?: string;
86
+ buildSpecification?: string;
87
+ runtimeSpecification?: string;
88
+ deploymentRetention?: number;
83
89
  }): Promise<Models.Site>;
84
90
  /**
85
91
  * Create a new site.
@@ -93,6 +99,7 @@ export declare class Sites {
93
99
  * @param {number} timeout - Maximum request time in seconds.
94
100
  * @param {string} installCommand - Install Command.
95
101
  * @param {string} buildCommand - Build Command.
102
+ * @param {string} startCommand - Custom start command. Leave empty to use default.
96
103
  * @param {string} outputDirectory - Output Directory for site.
97
104
  * @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
98
105
  * @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
@@ -101,12 +108,14 @@ export declare class Sites {
101
108
  * @param {string} providerBranch - Production branch for the repo linked to the site.
102
109
  * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
103
110
  * @param {string} providerRootDirectory - Path to site code in the linked repo.
104
- * @param {string} specification - Framework specification for the site and builds.
111
+ * @param {string} buildSpecification - Build specification for the site deployments.
112
+ * @param {string} runtimeSpecification - Runtime specification for the SSR executions.
113
+ * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
105
114
  * @throws {AppwriteException}
106
115
  * @returns {Promise<Models.Site>}
107
116
  * @deprecated Use the object parameter style method for a better developer experience.
108
117
  */
109
- create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
118
+ create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
110
119
  /**
111
120
  * Get a list of all frameworks that are currently available on the server instance.
112
121
  *
@@ -217,6 +226,7 @@ export declare class Sites {
217
226
  * @param {number} params.timeout - Maximum request time in seconds.
218
227
  * @param {string} params.installCommand - Install Command.
219
228
  * @param {string} params.buildCommand - Build Command.
229
+ * @param {string} params.startCommand - Custom start command. Leave empty to use default.
220
230
  * @param {string} params.outputDirectory - Output Directory for site.
221
231
  * @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
222
232
  * @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
@@ -226,7 +236,9 @@ export declare class Sites {
226
236
  * @param {string} params.providerBranch - Production branch for the repo linked to the site.
227
237
  * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
228
238
  * @param {string} params.providerRootDirectory - Path to site code in the linked repo.
229
- * @param {string} params.specification - Framework specification for the site and builds.
239
+ * @param {string} params.buildSpecification - Build specification for the site deployments.
240
+ * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
241
+ * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
230
242
  * @throws {AppwriteException}
231
243
  * @returns {Promise<Models.Site>}
232
244
  */
@@ -239,6 +251,7 @@ export declare class Sites {
239
251
  timeout?: number;
240
252
  installCommand?: string;
241
253
  buildCommand?: string;
254
+ startCommand?: string;
242
255
  outputDirectory?: string;
243
256
  buildRuntime?: BuildRuntime;
244
257
  adapter?: Adapter;
@@ -248,7 +261,9 @@ export declare class Sites {
248
261
  providerBranch?: string;
249
262
  providerSilentMode?: boolean;
250
263
  providerRootDirectory?: string;
251
- specification?: string;
264
+ buildSpecification?: string;
265
+ runtimeSpecification?: string;
266
+ deploymentRetention?: number;
252
267
  }): Promise<Models.Site>;
253
268
  /**
254
269
  * Update site by its unique ID.
@@ -261,6 +276,7 @@ export declare class Sites {
261
276
  * @param {number} timeout - Maximum request time in seconds.
262
277
  * @param {string} installCommand - Install Command.
263
278
  * @param {string} buildCommand - Build Command.
279
+ * @param {string} startCommand - Custom start command. Leave empty to use default.
264
280
  * @param {string} outputDirectory - Output Directory for site.
265
281
  * @param {BuildRuntime} buildRuntime - Runtime to use during build step.
266
282
  * @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
@@ -270,12 +286,14 @@ export declare class Sites {
270
286
  * @param {string} providerBranch - Production branch for the repo linked to the site.
271
287
  * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
272
288
  * @param {string} providerRootDirectory - Path to site code in the linked repo.
273
- * @param {string} specification - Framework specification for the site and builds.
289
+ * @param {string} buildSpecification - Build specification for the site deployments.
290
+ * @param {string} runtimeSpecification - Runtime specification for the SSR executions.
291
+ * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
274
292
  * @throws {AppwriteException}
275
293
  * @returns {Promise<Models.Site>}
276
294
  * @deprecated Use the object parameter style method for a better developer experience.
277
295
  */
278
- update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
296
+ update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
279
297
  /**
280
298
  * Delete a site by its unique ID.
281
299
  *
@@ -0,0 +1,165 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ export declare class Webhooks {
4
+ client: Client;
5
+ constructor(client: Client);
6
+ /**
7
+ * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
8
+ *
9
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, httpUser, security, events, enabled, logs, attempts
10
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
11
+ * @throws {AppwriteException}
12
+ * @returns {Promise<Models.WebhookList>}
13
+ */
14
+ list(params?: {
15
+ queries?: string[];
16
+ total?: boolean;
17
+ }): Promise<Models.WebhookList>;
18
+ /**
19
+ * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
20
+ *
21
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, httpUser, security, events, enabled, logs, attempts
22
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
23
+ * @throws {AppwriteException}
24
+ * @returns {Promise<Models.WebhookList>}
25
+ * @deprecated Use the object parameter style method for a better developer experience.
26
+ */
27
+ list(queries?: string[], total?: boolean): Promise<Models.WebhookList>;
28
+ /**
29
+ * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
30
+ *
31
+ * @param {string} params.webhookId - Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
32
+ * @param {string} params.url - Webhook URL.
33
+ * @param {string} params.name - Webhook name. Max length: 128 chars.
34
+ * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
35
+ * @param {boolean} params.enabled - Enable or disable a webhook.
36
+ * @param {boolean} params.security - Certificate verification, false for disabled or true for enabled.
37
+ * @param {string} params.httpUser - Webhook HTTP user. Max length: 256 chars.
38
+ * @param {string} params.httpPass - Webhook HTTP password. Max length: 256 chars.
39
+ * @throws {AppwriteException}
40
+ * @returns {Promise<Models.Webhook>}
41
+ */
42
+ create(params: {
43
+ webhookId: string;
44
+ url: string;
45
+ name: string;
46
+ events: string[];
47
+ enabled?: boolean;
48
+ security?: boolean;
49
+ httpUser?: string;
50
+ httpPass?: string;
51
+ }): Promise<Models.Webhook>;
52
+ /**
53
+ * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
54
+ *
55
+ * @param {string} webhookId - Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
56
+ * @param {string} url - Webhook URL.
57
+ * @param {string} name - Webhook name. Max length: 128 chars.
58
+ * @param {string[]} events - Events list. Maximum of 100 events are allowed.
59
+ * @param {boolean} enabled - Enable or disable a webhook.
60
+ * @param {boolean} security - Certificate verification, false for disabled or true for enabled.
61
+ * @param {string} httpUser - Webhook HTTP user. Max length: 256 chars.
62
+ * @param {string} httpPass - Webhook HTTP password. Max length: 256 chars.
63
+ * @throws {AppwriteException}
64
+ * @returns {Promise<Models.Webhook>}
65
+ * @deprecated Use the object parameter style method for a better developer experience.
66
+ */
67
+ create(webhookId: string, url: string, name: string, events: string[], enabled?: boolean, security?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook>;
68
+ /**
69
+ * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
70
+ *
71
+ * @param {string} params.webhookId - Webhook ID.
72
+ * @throws {AppwriteException}
73
+ * @returns {Promise<Models.Webhook>}
74
+ */
75
+ get(params: {
76
+ webhookId: string;
77
+ }): Promise<Models.Webhook>;
78
+ /**
79
+ * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
80
+ *
81
+ * @param {string} webhookId - Webhook ID.
82
+ * @throws {AppwriteException}
83
+ * @returns {Promise<Models.Webhook>}
84
+ * @deprecated Use the object parameter style method for a better developer experience.
85
+ */
86
+ get(webhookId: string): Promise<Models.Webhook>;
87
+ /**
88
+ * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
89
+ *
90
+ * @param {string} params.webhookId - Webhook ID.
91
+ * @param {string} params.name - Webhook name. Max length: 128 chars.
92
+ * @param {string} params.url - Webhook URL.
93
+ * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
94
+ * @param {boolean} params.enabled - Enable or disable a webhook.
95
+ * @param {boolean} params.security - Certificate verification, false for disabled or true for enabled.
96
+ * @param {string} params.httpUser - Webhook HTTP user. Max length: 256 chars.
97
+ * @param {string} params.httpPass - Webhook HTTP password. Max length: 256 chars.
98
+ * @throws {AppwriteException}
99
+ * @returns {Promise<Models.Webhook>}
100
+ */
101
+ update(params: {
102
+ webhookId: string;
103
+ name: string;
104
+ url: string;
105
+ events: string[];
106
+ enabled?: boolean;
107
+ security?: boolean;
108
+ httpUser?: string;
109
+ httpPass?: string;
110
+ }): Promise<Models.Webhook>;
111
+ /**
112
+ * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
113
+ *
114
+ * @param {string} webhookId - Webhook ID.
115
+ * @param {string} name - Webhook name. Max length: 128 chars.
116
+ * @param {string} url - Webhook URL.
117
+ * @param {string[]} events - Events list. Maximum of 100 events are allowed.
118
+ * @param {boolean} enabled - Enable or disable a webhook.
119
+ * @param {boolean} security - Certificate verification, false for disabled or true for enabled.
120
+ * @param {string} httpUser - Webhook HTTP user. Max length: 256 chars.
121
+ * @param {string} httpPass - Webhook HTTP password. Max length: 256 chars.
122
+ * @throws {AppwriteException}
123
+ * @returns {Promise<Models.Webhook>}
124
+ * @deprecated Use the object parameter style method for a better developer experience.
125
+ */
126
+ update(webhookId: string, name: string, url: string, events: string[], enabled?: boolean, security?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook>;
127
+ /**
128
+ * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
129
+ *
130
+ * @param {string} params.webhookId - Webhook ID.
131
+ * @throws {AppwriteException}
132
+ * @returns {Promise<{}>}
133
+ */
134
+ delete(params: {
135
+ webhookId: string;
136
+ }): Promise<{}>;
137
+ /**
138
+ * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
139
+ *
140
+ * @param {string} webhookId - Webhook ID.
141
+ * @throws {AppwriteException}
142
+ * @returns {Promise<{}>}
143
+ * @deprecated Use the object parameter style method for a better developer experience.
144
+ */
145
+ delete(webhookId: string): Promise<{}>;
146
+ /**
147
+ * Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
148
+ *
149
+ * @param {string} params.webhookId - Webhook ID.
150
+ * @throws {AppwriteException}
151
+ * @returns {Promise<Models.Webhook>}
152
+ */
153
+ updateSignature(params: {
154
+ webhookId: string;
155
+ }): Promise<Models.Webhook>;
156
+ /**
157
+ * Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
158
+ *
159
+ * @param {string} webhookId - Webhook ID.
160
+ * @throws {AppwriteException}
161
+ * @returns {Promise<Models.Webhook>}
162
+ * @deprecated Use the object parameter style method for a better developer experience.
163
+ */
164
+ updateSignature(webhookId: string): Promise<Models.Webhook>;
165
+ }