@appwrite.io/console 5.0.0 → 7.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 (41) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +517 -286
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +517 -287
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +518 -287
  8. package/docs/examples/domains/{confirm-purchase.md → update-purchase.md} +1 -1
  9. package/docs/examples/domains/{confirm-transfer-in.md → update-transfer-in.md} +1 -1
  10. package/docs/examples/{projects/update-webhook.md → webhooks/create.md} +5 -6
  11. package/docs/examples/{projects/get-webhook.md → webhooks/delete.md} +3 -4
  12. package/docs/examples/{projects/delete-webhook.md → webhooks/get.md} +3 -4
  13. package/docs/examples/{projects/list-webhooks.md → webhooks/list.md} +4 -4
  14. package/docs/examples/{projects/update-webhook-signature.md → webhooks/update-signature.md} +3 -4
  15. package/docs/examples/{projects/create-webhook.md → webhooks/update.md} +6 -6
  16. package/package.json +1 -1
  17. package/src/client.ts +2 -2
  18. package/src/enums/build-runtime.ts +86 -3
  19. package/src/enums/domain-purchase-status.ts +6 -0
  20. package/src/enums/{domain-transfer-status-status.ts → domain-transfer-status-enum.ts} +1 -1
  21. package/src/enums/runtime.ts +86 -3
  22. package/src/enums/runtimes.ts +86 -3
  23. package/src/enums/scopes.ts +2 -0
  24. package/src/index.ts +4 -3
  25. package/src/models.ts +60 -18
  26. package/src/services/domains.ts +30 -30
  27. package/src/services/projects.ts +0 -473
  28. package/src/services/webhooks.ts +451 -0
  29. package/types/enums/build-runtime.d.ts +87 -4
  30. package/types/enums/domain-purchase-status.d.ts +6 -0
  31. package/types/enums/{domain-transfer-status-status.d.ts → domain-transfer-status-enum.d.ts} +1 -1
  32. package/types/enums/runtime.d.ts +87 -4
  33. package/types/enums/runtimes.d.ts +87 -4
  34. package/types/enums/scopes.d.ts +2 -0
  35. package/types/index.d.ts +4 -3
  36. package/types/models.d.ts +59 -18
  37. package/types/services/domains.d.ts +22 -22
  38. package/types/services/projects.d.ts +0 -171
  39. package/types/services/webhooks.d.ts +165 -0
  40. package/src/enums/domain-purchase-payment-status.ts +0 -10
  41. package/types/enums/domain-purchase-payment-status.d.ts +0 -10
@@ -30,9 +30,6 @@ export declare enum Runtimes {
30
30
  Pythonml311 = "python-ml-3.11",
31
31
  Pythonml312 = "python-ml-3.12",
32
32
  Pythonml313 = "python-ml-3.13",
33
- Deno121 = "deno-1.21",
34
- Deno124 = "deno-1.24",
35
- Deno135 = "deno-1.35",
36
33
  Deno140 = "deno-1.40",
37
34
  Deno146 = "deno-1.46",
38
35
  Deno20 = "deno-2.0",
@@ -87,5 +84,91 @@ export declare enum Runtimes {
87
84
  Flutter329 = "flutter-3.29",
88
85
  Flutter332 = "flutter-3.32",
89
86
  Flutter335 = "flutter-3.35",
90
- Flutter338 = "flutter-3.38"
87
+ Flutter338 = "flutter-3.38",
88
+ Node145rc = "node-14.5-rc",
89
+ Node160rc = "node-16.0-rc",
90
+ Node180rc = "node-18.0-rc",
91
+ Node190rc = "node-19.0-rc",
92
+ Node200rc = "node-20.0-rc",
93
+ Node210rc = "node-21.0-rc",
94
+ Node22rc = "node-22-rc",
95
+ Node23rc = "node-23-rc",
96
+ Node24rc = "node-24-rc",
97
+ Node25rc = "node-25-rc",
98
+ Php80rc = "php-8.0-rc",
99
+ Php81rc = "php-8.1-rc",
100
+ Php82rc = "php-8.2-rc",
101
+ Php83rc = "php-8.3-rc",
102
+ Php84rc = "php-8.4-rc",
103
+ Ruby30rc = "ruby-3.0-rc",
104
+ Ruby31rc = "ruby-3.1-rc",
105
+ Ruby32rc = "ruby-3.2-rc",
106
+ Ruby33rc = "ruby-3.3-rc",
107
+ Ruby34rc = "ruby-3.4-rc",
108
+ Ruby40rc = "ruby-4.0-rc",
109
+ Python38rc = "python-3.8-rc",
110
+ Python39rc = "python-3.9-rc",
111
+ Python310rc = "python-3.10-rc",
112
+ Python311rc = "python-3.11-rc",
113
+ Python312rc = "python-3.12-rc",
114
+ Python313rc = "python-3.13-rc",
115
+ Python314rc = "python-3.14-rc",
116
+ Pythonml311rc = "python-ml-3.11-rc",
117
+ Pythonml312rc = "python-ml-3.12-rc",
118
+ Pythonml313rc = "python-ml-3.13-rc",
119
+ Deno140rc = "deno-1.40-rc",
120
+ Deno146rc = "deno-1.46-rc",
121
+ Deno20rc = "deno-2.0-rc",
122
+ Deno25rc = "deno-2.5-rc",
123
+ Deno26rc = "deno-2.6-rc",
124
+ Dart215rc = "dart-2.15-rc",
125
+ Dart216rc = "dart-2.16-rc",
126
+ Dart217rc = "dart-2.17-rc",
127
+ Dart218rc = "dart-2.18-rc",
128
+ Dart219rc = "dart-2.19-rc",
129
+ Dart30rc = "dart-3.0-rc",
130
+ Dart31rc = "dart-3.1-rc",
131
+ Dart33rc = "dart-3.3-rc",
132
+ Dart35rc = "dart-3.5-rc",
133
+ Dart38rc = "dart-3.8-rc",
134
+ Dart39rc = "dart-3.9-rc",
135
+ Dart310rc = "dart-3.10-rc",
136
+ Dotnet60rc = "dotnet-6.0-rc",
137
+ Dotnet70rc = "dotnet-7.0-rc",
138
+ Dotnet80rc = "dotnet-8.0-rc",
139
+ Dotnet10rc = "dotnet-10-rc",
140
+ Java80rc = "java-8.0-rc",
141
+ Java110rc = "java-11.0-rc",
142
+ Java170rc = "java-17.0-rc",
143
+ Java180rc = "java-18.0-rc",
144
+ Java210rc = "java-21.0-rc",
145
+ Java22rc = "java-22-rc",
146
+ Java25rc = "java-25-rc",
147
+ Swift55rc = "swift-5.5-rc",
148
+ Swift58rc = "swift-5.8-rc",
149
+ Swift59rc = "swift-5.9-rc",
150
+ Swift510rc = "swift-5.10-rc",
151
+ Swift62rc = "swift-6.2-rc",
152
+ Kotlin16rc = "kotlin-1.6-rc",
153
+ Kotlin18rc = "kotlin-1.8-rc",
154
+ Kotlin19rc = "kotlin-1.9-rc",
155
+ Kotlin20rc = "kotlin-2.0-rc",
156
+ Kotlin23rc = "kotlin-2.3-rc",
157
+ Cpp17rc = "cpp-17-rc",
158
+ Cpp20rc = "cpp-20-rc",
159
+ Bun10rc = "bun-1.0-rc",
160
+ Bun11rc = "bun-1.1-rc",
161
+ Bun12rc = "bun-1.2-rc",
162
+ Bun13rc = "bun-1.3-rc",
163
+ Go123rc = "go-1.23-rc",
164
+ Go124rc = "go-1.24-rc",
165
+ Go125rc = "go-1.25-rc",
166
+ Go126rc = "go-1.26-rc",
167
+ Static1rc = "static-1-rc",
168
+ Flutter324rc = "flutter-3.24-rc",
169
+ Flutter327rc = "flutter-3.27-rc",
170
+ Flutter329rc = "flutter-3.29-rc",
171
+ Flutter332rc = "flutter-3.32-rc",
172
+ Flutter335rc = "flutter-3.35-rc",
173
+ Flutter338rc = "flutter-3.38-rc"
91
174
  }
@@ -56,6 +56,8 @@ export declare enum Scopes {
56
56
  AssistantRead = "assistant.read",
57
57
  TokensRead = "tokens.read",
58
58
  TokensWrite = "tokens.write",
59
+ WebhooksRead = "webhooks.read",
60
+ WebhooksWrite = "webhooks.write",
59
61
  PoliciesWrite = "policies.write",
60
62
  PoliciesRead = "policies.read",
61
63
  ArchivesRead = "archives.read",
package/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Appwrite Console SDK
3
3
  *
4
- * This SDK is compatible with Appwrite server version 1.8.x.
4
+ * This SDK is compatible with Appwrite server version 1.9.x.
5
5
  * For older versions, please check
6
6
  * [previous releases](https://github.com/appwrite/sdk-for-console/releases).
7
7
  */
@@ -31,6 +31,7 @@ export { Teams } from './services/teams';
31
31
  export { Tokens } from './services/tokens';
32
32
  export { Users } from './services/users';
33
33
  export { Vcs } from './services/vcs';
34
+ export { Webhooks } from './services/webhooks';
34
35
  export { Realtime } from './services/realtime';
35
36
  export type { Models, Payload, RealtimeResponseEvent, UploadProgress } from './client';
36
37
  export type { RealtimeSubscription } from './services/realtime';
@@ -112,5 +113,5 @@ export { ProxyRuleDeploymentResourceType } from './enums/proxy-rule-deployment-r
112
113
  export { ProxyRuleStatus } from './enums/proxy-rule-status';
113
114
  export { MessageStatus } from './enums/message-status';
114
115
  export { BillingPlanGroup } from './enums/billing-plan-group';
115
- export { DomainPurchasePaymentStatus } from './enums/domain-purchase-payment-status';
116
- export { DomainTransferStatusStatus } from './enums/domain-transfer-status-status';
116
+ export { DomainTransferStatusEnum } from './enums/domain-transfer-status-enum';
117
+ export { DomainPurchaseStatus } from './enums/domain-purchase-status';
package/types/models.d.ts CHANGED
@@ -12,8 +12,8 @@ import { ProxyRuleDeploymentResourceType } from "./enums/proxy-rule-deployment-r
12
12
  import { ProxyRuleStatus } from "./enums/proxy-rule-status";
13
13
  import { MessageStatus } from "./enums/message-status";
14
14
  import { BillingPlanGroup } from "./enums/billing-plan-group";
15
- import { DomainPurchasePaymentStatus } from "./enums/domain-purchase-payment-status";
16
- import { DomainTransferStatusStatus } from "./enums/domain-transfer-status-status";
15
+ import { DomainTransferStatusEnum } from "./enums/domain-transfer-status-enum";
16
+ import { DomainPurchaseStatus } from "./enums/domain-purchase-status";
17
17
  /**
18
18
  * Appwrite Models
19
19
  */
@@ -2535,7 +2535,7 @@ export declare namespace Models {
2535
2535
  /**
2536
2536
  * Row sequence ID.
2537
2537
  */
2538
- $sequence: number;
2538
+ $sequence: string;
2539
2539
  /**
2540
2540
  * Table ID.
2541
2541
  */
@@ -2572,7 +2572,7 @@ export declare namespace Models {
2572
2572
  /**
2573
2573
  * Document sequence ID.
2574
2574
  */
2575
- $sequence: number;
2575
+ $sequence: string;
2576
2576
  /**
2577
2577
  * Collection ID.
2578
2578
  */
@@ -7009,9 +7009,17 @@ export declare namespace Models {
7009
7009
  */
7010
7010
  usageBandwidth: number;
7011
7011
  /**
7012
- * Total realtime usage for the billing period
7012
+ * Peak concurrent realtime connections for the billing period
7013
7013
  */
7014
7014
  usageRealtime: number;
7015
+ /**
7016
+ * Total realtime messages sent for the billing period
7017
+ */
7018
+ usageRealtimeMessages: number;
7019
+ /**
7020
+ * Total realtime bandwidth usage for the billing period
7021
+ */
7022
+ usageRealtimeBandwidth: number;
7015
7023
  /**
7016
7024
  * Additional members
7017
7025
  */
@@ -8500,14 +8508,6 @@ export declare namespace Models {
8500
8508
  * Domain registrar (e.g. "appwrite" or "third_party").
8501
8509
  */
8502
8510
  registrar: string;
8503
- /**
8504
- * Payment status for domain purchase.
8505
- */
8506
- paymentStatus: DomainPurchasePaymentStatus;
8507
- /**
8508
- * Client secret for payment confirmation. Present only when paymentStatus is pending_confirmation.
8509
- */
8510
- clientSecret: string;
8511
8511
  /**
8512
8512
  * Nameservers setting. "Appwrite" or empty string.
8513
8513
  */
@@ -8528,6 +8528,10 @@ export declare namespace Models {
8528
8528
  * Renewal price (in cents).
8529
8529
  */
8530
8530
  renewalPrice: number;
8531
+ /**
8532
+ * Transfer status for domains being transferred in.
8533
+ */
8534
+ transferStatus: DomainTransferStatusEnum;
8531
8535
  /**
8532
8536
  * Team ID.
8533
8537
  */
@@ -8536,14 +8540,51 @@ export declare namespace Models {
8536
8540
  * Dns records
8537
8541
  */
8538
8542
  dnsRecords: DnsRecord[];
8543
+ };
8544
+ /**
8545
+ * DomainPurchase
8546
+ */
8547
+ export type DomainPurchase = {
8548
+ /**
8549
+ * Purchase/invoice ID.
8550
+ */
8551
+ $id: string;
8539
8552
  /**
8540
- * Domain transfer status (e.g., "pending", "completed", "failed").
8553
+ * Purchase creation time in ISO 8601 format.
8541
8554
  */
8542
- transferStatus: string;
8555
+ $createdAt: string;
8543
8556
  /**
8544
- * Retry attempts for the current domain payment flow. Development only.
8557
+ * Purchase update date in ISO 8601 format.
8545
8558
  */
8546
- attempts: number;
8559
+ $updatedAt: string;
8560
+ /**
8561
+ * Domain document ID.
8562
+ */
8563
+ domainId: string;
8564
+ /**
8565
+ * Domain name.
8566
+ */
8567
+ domain: string;
8568
+ /**
8569
+ * Team ID that owns the domain.
8570
+ */
8571
+ organizationId: string;
8572
+ /**
8573
+ * Domain purchase status.
8574
+ */
8575
+ status: DomainPurchaseStatus;
8576
+ /**
8577
+ * Stripe client secret for 3DS; empty when not applicable.
8578
+ */
8579
+ clientSecret: string;
8580
+ /**
8581
+ * Purchase amount.
8582
+ */
8583
+ amount: number;
8584
+ /**
8585
+ * Currency code.
8586
+ */
8587
+ currency: string;
8547
8588
  };
8548
8589
  /**
8549
8590
  * DNSRecord
@@ -8834,7 +8875,7 @@ export declare namespace Models {
8834
8875
  /**
8835
8876
  * Transfer status.
8836
8877
  */
8837
- status: DomainTransferStatusStatus;
8878
+ status: DomainTransferStatusEnum;
8838
8879
  /**
8839
8880
  * Additional transfer status information.
8840
8881
  */
@@ -89,7 +89,7 @@ export declare class Domains {
89
89
  * @param {string} params.companyName - Company or organization name for the registrant.
90
90
  * @param {number} params.periodYears - Registration term in years (1-10).
91
91
  * @throws {AppwriteException}
92
- * @returns {Promise<Models.Domain>}
92
+ * @returns {Promise<Models.DomainPurchase>}
93
93
  */
94
94
  createPurchase(params: {
95
95
  domain: string;
@@ -103,7 +103,7 @@ export declare class Domains {
103
103
  addressLine3?: string;
104
104
  companyName?: string;
105
105
  periodYears?: number;
106
- }): Promise<Models.Domain>;
106
+ }): Promise<Models.DomainPurchase>;
107
107
  /**
108
108
  * Create a domain purchase with registrant information.
109
109
  *
@@ -119,32 +119,32 @@ export declare class Domains {
119
119
  * @param {string} companyName - Company or organization name for the registrant.
120
120
  * @param {number} periodYears - Registration term in years (1-10).
121
121
  * @throws {AppwriteException}
122
- * @returns {Promise<Models.Domain>}
122
+ * @returns {Promise<Models.DomainPurchase>}
123
123
  * @deprecated Use the object parameter style method for a better developer experience.
124
124
  */
125
- createPurchase(domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number): Promise<Models.Domain>;
125
+ createPurchase(domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number): Promise<Models.DomainPurchase>;
126
126
  /**
127
- * Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
127
+ * Confirm and complete a domain purchase after payment authentication.
128
128
  *
129
129
  * @param {string} params.domainId - Domain ID to confirm purchase for.
130
130
  * @param {string} params.organizationId - Team ID that owns the domain.
131
131
  * @throws {AppwriteException}
132
- * @returns {Promise<Models.Domain>}
132
+ * @returns {Promise<Models.DomainPurchase>}
133
133
  */
134
- confirmPurchase(params: {
134
+ updatePurchase(params: {
135
135
  domainId: string;
136
136
  organizationId: string;
137
- }): Promise<Models.Domain>;
137
+ }): Promise<Models.DomainPurchase>;
138
138
  /**
139
- * Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
139
+ * Confirm and complete a domain purchase after payment authentication.
140
140
  *
141
141
  * @param {string} domainId - Domain ID to confirm purchase for.
142
142
  * @param {string} organizationId - Team ID that owns the domain.
143
143
  * @throws {AppwriteException}
144
- * @returns {Promise<Models.Domain>}
144
+ * @returns {Promise<Models.DomainPurchase>}
145
145
  * @deprecated Use the object parameter style method for a better developer experience.
146
146
  */
147
- confirmPurchase(domainId: string, organizationId: string): Promise<Models.Domain>;
147
+ updatePurchase(domainId: string, organizationId: string): Promise<Models.DomainPurchase>;
148
148
  /**
149
149
  * List domain suggestions.
150
150
  *
@@ -187,14 +187,14 @@ export declare class Domains {
187
187
  * @param {string} params.authCode - Authorization code for the domain transfer.
188
188
  * @param {string} params.paymentMethodId - Payment method ID to authorize and capture the transfer.
189
189
  * @throws {AppwriteException}
190
- * @returns {Promise<Models.Domain>}
190
+ * @returns {Promise<Models.DomainPurchase>}
191
191
  */
192
192
  createTransferIn(params: {
193
193
  domain: string;
194
194
  organizationId: string;
195
195
  authCode: string;
196
196
  paymentMethodId: string;
197
- }): Promise<Models.Domain>;
197
+ }): Promise<Models.DomainPurchase>;
198
198
  /**
199
199
  * Create a domain transfer in with authorization code and registrant information.
200
200
  *
@@ -203,32 +203,32 @@ export declare class Domains {
203
203
  * @param {string} authCode - Authorization code for the domain transfer.
204
204
  * @param {string} paymentMethodId - Payment method ID to authorize and capture the transfer.
205
205
  * @throws {AppwriteException}
206
- * @returns {Promise<Models.Domain>}
206
+ * @returns {Promise<Models.DomainPurchase>}
207
207
  * @deprecated Use the object parameter style method for a better developer experience.
208
208
  */
209
- createTransferIn(domain: string, organizationId: string, authCode: string, paymentMethodId: string): Promise<Models.Domain>;
209
+ createTransferIn(domain: string, organizationId: string, authCode: string, paymentMethodId: string): Promise<Models.DomainPurchase>;
210
210
  /**
211
- * Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
211
+ * Confirm and complete a domain transfer in after payment authentication.
212
212
  *
213
213
  * @param {string} params.domainId - Domain ID to confirm transfer for.
214
214
  * @param {string} params.organizationId - Team ID that owns the domain.
215
215
  * @throws {AppwriteException}
216
- * @returns {Promise<Models.Domain>}
216
+ * @returns {Promise<Models.DomainPurchase>}
217
217
  */
218
- confirmTransferIn(params: {
218
+ updateTransferIn(params: {
219
219
  domainId: string;
220
220
  organizationId: string;
221
- }): Promise<Models.Domain>;
221
+ }): Promise<Models.DomainPurchase>;
222
222
  /**
223
- * Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
223
+ * Confirm and complete a domain transfer in after payment authentication.
224
224
  *
225
225
  * @param {string} domainId - Domain ID to confirm transfer for.
226
226
  * @param {string} organizationId - Team ID that owns the domain.
227
227
  * @throws {AppwriteException}
228
- * @returns {Promise<Models.Domain>}
228
+ * @returns {Promise<Models.DomainPurchase>}
229
229
  * @deprecated Use the object parameter style method for a better developer experience.
230
230
  */
231
- confirmTransferIn(domainId: string, organizationId: string): Promise<Models.Domain>;
231
+ updateTransferIn(domainId: string, organizationId: string): Promise<Models.DomainPurchase>;
232
232
  /**
233
233
  * Create a domain transfer out and return the authorization code.
234
234
  *
@@ -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
  }