@appwrite.io/console 5.0.0 → 7.0.0-rc.1

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 (137) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +13663 -10879
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +13661 -10880
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +13268 -10484
  8. package/docs/examples/databases/create-index.md +2 -2
  9. package/docs/examples/documentsdb/create-collection.md +22 -0
  10. package/docs/examples/documentsdb/create-document.md +25 -0
  11. package/docs/examples/documentsdb/create-documents.md +17 -0
  12. package/docs/examples/documentsdb/create-index.md +21 -0
  13. package/docs/examples/documentsdb/create-transaction.md +15 -0
  14. package/docs/examples/documentsdb/create.md +17 -0
  15. package/docs/examples/documentsdb/decrement-document-attribute.md +21 -0
  16. package/docs/examples/documentsdb/delete-collection.md +16 -0
  17. package/docs/examples/documentsdb/delete-document.md +18 -0
  18. package/docs/examples/documentsdb/delete-documents.md +18 -0
  19. package/docs/examples/documentsdb/delete-index.md +17 -0
  20. package/docs/examples/documentsdb/delete-transaction.md +15 -0
  21. package/docs/examples/documentsdb/delete.md +15 -0
  22. package/docs/examples/documentsdb/get-collection-usage.md +17 -0
  23. package/docs/examples/documentsdb/get-collection.md +16 -0
  24. package/docs/examples/documentsdb/get-document.md +19 -0
  25. package/docs/examples/documentsdb/get-index.md +17 -0
  26. package/docs/examples/documentsdb/get-transaction.md +15 -0
  27. package/docs/examples/documentsdb/get-usage.md +16 -0
  28. package/docs/examples/documentsdb/get.md +15 -0
  29. package/docs/examples/documentsdb/increment-document-attribute.md +21 -0
  30. package/docs/examples/documentsdb/list-collection-logs.md +17 -0
  31. package/docs/examples/documentsdb/list-collections.md +18 -0
  32. package/docs/examples/documentsdb/list-document-logs.md +18 -0
  33. package/docs/examples/documentsdb/list-documents.md +20 -0
  34. package/docs/examples/documentsdb/list-indexes.md +18 -0
  35. package/docs/examples/documentsdb/list-transactions.md +15 -0
  36. package/docs/examples/documentsdb/list-usage.md +15 -0
  37. package/docs/examples/documentsdb/list.md +17 -0
  38. package/docs/examples/documentsdb/update-collection.md +20 -0
  39. package/docs/examples/documentsdb/update-document.md +20 -0
  40. package/docs/examples/documentsdb/update-documents.md +19 -0
  41. package/docs/examples/documentsdb/update-transaction.md +17 -0
  42. package/docs/examples/documentsdb/update.md +17 -0
  43. package/docs/examples/documentsdb/upsert-document.md +20 -0
  44. package/docs/examples/documentsdb/upsert-documents.md +18 -0
  45. package/docs/examples/domains/update-purchase.md +16 -0
  46. package/docs/examples/domains/update-transfer-in.md +16 -0
  47. package/docs/examples/tablesdb/create-index.md +2 -2
  48. package/docs/examples/vectorsdb/create-collection.md +21 -0
  49. package/docs/examples/vectorsdb/create-document.md +29 -0
  50. package/docs/examples/vectorsdb/create-documents.md +17 -0
  51. package/docs/examples/vectorsdb/create-index.md +21 -0
  52. package/docs/examples/vectorsdb/create-operations.md +26 -0
  53. package/docs/examples/vectorsdb/create-text-embeddings.md +16 -0
  54. package/docs/examples/vectorsdb/create-transaction.md +15 -0
  55. package/docs/examples/vectorsdb/create.md +17 -0
  56. package/docs/examples/vectorsdb/delete-collection.md +16 -0
  57. package/docs/examples/vectorsdb/delete-document.md +18 -0
  58. package/docs/examples/vectorsdb/delete-documents.md +18 -0
  59. package/docs/examples/vectorsdb/delete-index.md +17 -0
  60. package/docs/examples/vectorsdb/delete-transaction.md +15 -0
  61. package/docs/examples/vectorsdb/delete.md +15 -0
  62. package/docs/examples/vectorsdb/get-collection-usage.md +17 -0
  63. package/docs/examples/vectorsdb/get-collection.md +16 -0
  64. package/docs/examples/vectorsdb/get-document.md +19 -0
  65. package/docs/examples/vectorsdb/get-index.md +17 -0
  66. package/docs/examples/vectorsdb/get-transaction.md +15 -0
  67. package/docs/examples/vectorsdb/get-usage.md +16 -0
  68. package/docs/examples/vectorsdb/get.md +15 -0
  69. package/docs/examples/vectorsdb/list-collection-logs.md +17 -0
  70. package/docs/examples/vectorsdb/list-collections.md +18 -0
  71. package/docs/examples/vectorsdb/list-documents.md +20 -0
  72. package/docs/examples/vectorsdb/list-indexes.md +18 -0
  73. package/docs/examples/vectorsdb/list-transactions.md +15 -0
  74. package/docs/examples/vectorsdb/list-usage.md +15 -0
  75. package/docs/examples/vectorsdb/list.md +17 -0
  76. package/docs/examples/vectorsdb/update-collection.md +21 -0
  77. package/docs/examples/vectorsdb/update-document.md +20 -0
  78. package/docs/examples/vectorsdb/update-documents.md +19 -0
  79. package/docs/examples/vectorsdb/update-transaction.md +17 -0
  80. package/docs/examples/vectorsdb/update.md +17 -0
  81. package/docs/examples/vectorsdb/upsert-document.md +20 -0
  82. package/docs/examples/vectorsdb/upsert-documents.md +18 -0
  83. package/docs/examples/webhooks/create.md +22 -0
  84. package/docs/examples/webhooks/delete.md +15 -0
  85. package/docs/examples/webhooks/get.md +15 -0
  86. package/docs/examples/webhooks/list.md +16 -0
  87. package/docs/examples/webhooks/update-signature.md +15 -0
  88. package/docs/examples/webhooks/update.md +22 -0
  89. package/package.json +1 -1
  90. package/src/client.ts +1 -1
  91. package/src/enums/appwrite-migration-resource.ts +2 -0
  92. package/src/enums/backup-services.ts +3 -0
  93. package/src/enums/build-runtime.ts +89 -0
  94. package/src/enums/database-type.ts +2 -0
  95. package/src/enums/databases-index-type.ts +6 -0
  96. package/src/enums/documents-db-index-type.ts +6 -0
  97. package/src/enums/domain-purchase-status.ts +6 -0
  98. package/src/enums/domain-transfer-status-enum.ts +10 -0
  99. package/src/enums/model.ts +3 -0
  100. package/src/enums/runtime.ts +89 -0
  101. package/src/enums/runtimes.ts +89 -0
  102. package/src/enums/scopes.ts +2 -0
  103. package/src/enums/{index-type.ts → tables-db-index-type.ts} +1 -1
  104. package/src/enums/vectors-db-index-type.ts +8 -0
  105. package/src/index.ts +11 -4
  106. package/src/models.ts +519 -19
  107. package/src/services/databases.ts +10 -10
  108. package/src/services/documents-db.ts +2608 -0
  109. package/src/services/domains.ts +30 -30
  110. package/src/services/projects.ts +0 -473
  111. package/src/services/tables-db.ts +10 -10
  112. package/src/services/vectors-db.ts +2406 -0
  113. package/src/services/webhooks.ts +451 -0
  114. package/types/enums/appwrite-migration-resource.d.ts +2 -0
  115. package/types/enums/backup-services.d.ts +3 -0
  116. package/types/enums/build-runtime.d.ts +90 -1
  117. package/types/enums/database-type.d.ts +3 -1
  118. package/types/enums/databases-index-type.d.ts +6 -0
  119. package/types/enums/documents-db-index-type.d.ts +6 -0
  120. package/types/enums/domain-purchase-status.d.ts +6 -0
  121. package/types/enums/domain-transfer-status-enum.d.ts +10 -0
  122. package/types/enums/model.d.ts +3 -0
  123. package/types/enums/runtime.d.ts +90 -1
  124. package/types/enums/runtimes.d.ts +90 -1
  125. package/types/enums/scopes.d.ts +2 -0
  126. package/types/enums/{index-type.d.ts → tables-db-index-type.d.ts} +1 -1
  127. package/types/enums/vectors-db-index-type.d.ts +8 -0
  128. package/types/index.d.ts +11 -4
  129. package/types/models.d.ts +509 -19
  130. package/types/services/databases.d.ts +5 -5
  131. package/types/services/documents-db.d.ts +977 -0
  132. package/types/services/domains.d.ts +22 -22
  133. package/types/services/projects.d.ts +0 -171
  134. package/types/services/tables-db.d.ts +5 -5
  135. package/types/services/vectors-db.d.ts +854 -0
  136. package/types/services/webhooks.d.ts +165 -0
  137. package/.github/workflows/autoclose.yml +0 -11
@@ -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
+ }
@@ -1,11 +0,0 @@
1
- name: Auto-close External Pull Requests
2
-
3
- on:
4
- pull_request_target:
5
- types: [opened, reopened]
6
-
7
- jobs:
8
- auto_close:
9
- uses: appwrite/.github/.github/workflows/autoclose.yml@main
10
- secrets:
11
- GH_AUTO_CLOSE_PR_TOKEN: ${{ secrets.GH_AUTO_CLOSE_PR_TOKEN }}