@appwrite.io/console 1.4.6 → 1.5.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 (51) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/sdk.js +218 -18
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +219 -19
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +218 -18
  7. package/docs/examples/health/get-queue-usage-count.md +13 -0
  8. package/docs/examples/messaging/create-push.md +8 -5
  9. package/docs/examples/messaging/update-push.md +5 -2
  10. package/package.json +1 -1
  11. package/src/client.ts +1 -1
  12. package/src/enums/image-format.ts +1 -0
  13. package/src/enums/message-priority.ts +4 -0
  14. package/src/index.ts +1 -0
  15. package/src/models.ts +16 -0
  16. package/src/services/account.ts +19 -2
  17. package/src/services/assistant.ts +1 -0
  18. package/src/services/backups.ts +14 -2
  19. package/src/services/console.ts +8 -2
  20. package/src/services/databases.ts +3 -0
  21. package/src/services/functions.ts +4 -0
  22. package/src/services/health.ts +31 -0
  23. package/src/services/messaging.ts +29 -10
  24. package/src/services/migrations.ts +12 -0
  25. package/src/services/organizations.ts +30 -2
  26. package/src/services/project.ts +1 -0
  27. package/src/services/projects.ts +48 -2
  28. package/src/services/proxy.ts +1 -0
  29. package/src/services/storage.ts +4 -0
  30. package/src/services/users.ts +4 -2
  31. package/src/services/vcs.ts +13 -0
  32. package/types/enums/image-format.d.ts +1 -0
  33. package/types/enums/message-priority.d.ts +4 -0
  34. package/types/index.d.ts +1 -0
  35. package/types/models.d.ts +16 -0
  36. package/types/services/account.d.ts +19 -2
  37. package/types/services/assistant.d.ts +1 -0
  38. package/types/services/backups.d.ts +14 -2
  39. package/types/services/console.d.ts +8 -2
  40. package/types/services/databases.d.ts +3 -0
  41. package/types/services/functions.d.ts +4 -0
  42. package/types/services/health.d.ts +12 -0
  43. package/types/services/messaging.d.ts +11 -4
  44. package/types/services/migrations.d.ts +12 -0
  45. package/types/services/organizations.d.ts +30 -2
  46. package/types/services/project.d.ts +1 -0
  47. package/types/services/projects.d.ts +48 -2
  48. package/types/services/proxy.d.ts +1 -0
  49. package/types/services/storage.d.ts +4 -0
  50. package/types/services/users.d.ts +4 -2
  51. package/types/services/vcs.d.ts +13 -0
@@ -569,6 +569,8 @@ export class Users {
569
569
  /**
570
570
  * Get users usage stats
571
571
  *
572
+ * Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
573
+
572
574
  *
573
575
  * @param {UserUsageRange} range
574
576
  * @throws {AppwriteException}
@@ -869,9 +871,9 @@ Labels can be used to grant access to resources. While teams are a way for user&
869
871
  * @param {string} userId
870
872
  * @param {AuthenticatorType} type
871
873
  * @throws {AppwriteException}
872
- * @returns {Promise<Models.User<Preferences>>}
874
+ * @returns {Promise<{}>}
873
875
  */
874
- async deleteMfaAuthenticator<Preferences extends Models.Preferences>(userId: string, type: AuthenticatorType): Promise<Models.User<Preferences>> {
876
+ async deleteMfaAuthenticator(userId: string, type: AuthenticatorType): Promise<{}> {
875
877
  if (typeof userId === 'undefined') {
876
878
  throw new AppwriteException('Missing required parameter: "userId"');
877
879
  }
@@ -12,6 +12,7 @@ export class Vcs {
12
12
  /**
13
13
  * List repositories
14
14
  *
15
+ * Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository&#039;s runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.
15
16
  *
16
17
  * @param {string} installationId
17
18
  * @param {string} search
@@ -44,6 +45,7 @@ export class Vcs {
44
45
  /**
45
46
  * Create repository
46
47
  *
48
+ * Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.
47
49
  *
48
50
  * @param {string} installationId
49
51
  * @param {string} name
@@ -86,6 +88,7 @@ export class Vcs {
86
88
  /**
87
89
  * Get repository
88
90
  *
91
+ * Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.
89
92
  *
90
93
  * @param {string} installationId
91
94
  * @param {string} providerRepositoryId
@@ -118,6 +121,8 @@ export class Vcs {
118
121
  /**
119
122
  * List repository branches
120
123
  *
124
+ * Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.
125
+
121
126
  *
122
127
  * @param {string} installationId
123
128
  * @param {string} providerRepositoryId
@@ -150,6 +155,8 @@ export class Vcs {
150
155
  /**
151
156
  * Get files and directories of a VCS repository
152
157
  *
158
+ * Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.
159
+
153
160
  *
154
161
  * @param {string} installationId
155
162
  * @param {string} providerRepositoryId
@@ -186,6 +193,7 @@ export class Vcs {
186
193
  /**
187
194
  * Detect runtime settings from source code
188
195
  *
196
+ * Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository&#039;s files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.
189
197
  *
190
198
  * @param {string} installationId
191
199
  * @param {string} providerRepositoryId
@@ -222,6 +230,7 @@ export class Vcs {
222
230
  /**
223
231
  * Authorize external deployment
224
232
  *
233
+ * Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.
225
234
  *
226
235
  * @param {string} installationId
227
236
  * @param {string} repositoryId
@@ -261,6 +270,8 @@ export class Vcs {
261
270
  /**
262
271
  * List installations
263
272
  *
273
+ * List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.
274
+
264
275
  *
265
276
  * @param {string[]} queries
266
277
  * @param {string} search
@@ -293,6 +304,7 @@ export class Vcs {
293
304
  /**
294
305
  * Get installation
295
306
  *
307
+ * Get a VCS installation by its unique ID. This endpoint returns the installation&#039;s details including its provider, organization, and configuration.
296
308
  *
297
309
  * @param {string} installationId
298
310
  * @throws {AppwriteException}
@@ -321,6 +333,7 @@ export class Vcs {
321
333
  /**
322
334
  * Delete installation
323
335
  *
336
+ * Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.
324
337
  *
325
338
  * @param {string} installationId
326
339
  * @throws {AppwriteException}
@@ -4,5 +4,6 @@ export declare enum ImageFormat {
4
4
  Gif = "gif",
5
5
  Png = "png",
6
6
  Webp = "webp",
7
+ Heic = "heic",
7
8
  Avif = "avif"
8
9
  }
@@ -0,0 +1,4 @@
1
+ export declare enum MessagePriority {
2
+ Normal = "normal",
3
+ High = "high"
4
+ }
package/types/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export { Runtime } from './enums/runtime';
45
45
  export { FunctionUsageRange } from './enums/function-usage-range';
46
46
  export { ExecutionMethod } from './enums/execution-method';
47
47
  export { Name } from './enums/name';
48
+ export { MessagePriority } from './enums/message-priority';
48
49
  export { SmtpEncryption } from './enums/smtp-encryption';
49
50
  export { BillingPlan } from './enums/billing-plan';
50
51
  export { ProjectUsageRange } from './enums/project-usage-range';
package/types/models.d.ts CHANGED
@@ -5042,6 +5042,14 @@ export declare namespace Models {
5042
5042
  * Aggregated stats for function executions.
5043
5043
  */
5044
5044
  executions: Metric[];
5045
+ /**
5046
+ * Aggregated stats for database reads.
5047
+ */
5048
+ databasesReads: Metric[];
5049
+ /**
5050
+ * Aggregated stats for database writes.
5051
+ */
5052
+ databasesWrites: Metric[];
5045
5053
  /**
5046
5054
  * Aggregated stats for total users.
5047
5055
  */
@@ -5074,6 +5082,14 @@ export declare namespace Models {
5074
5082
  * Aggregated stats for total databases storage.
5075
5083
  */
5076
5084
  databasesStorageTotal: number;
5085
+ /**
5086
+ * Aggregated stats for total databases storage reads.
5087
+ */
5088
+ databasesReadsTotal: number;
5089
+ /**
5090
+ * Aggregated stats for total databases storage writes.
5091
+ */
5092
+ databasesWritesTotal: number;
5077
5093
  /**
5078
5094
  * Aggregated stats for total backups storage.
5079
5095
  */
@@ -40,6 +40,7 @@ export declare class Account {
40
40
  /**
41
41
  * List billing addresses
42
42
  *
43
+ * List all billing addresses for a user.
43
44
  *
44
45
  * @param {string[]} queries
45
46
  * @throws {AppwriteException}
@@ -49,6 +50,7 @@ export declare class Account {
49
50
  /**
50
51
  * Create new billing address
51
52
  *
53
+ * Add a new billing address to a user&#039;s account.
52
54
  *
53
55
  * @param {string} country
54
56
  * @param {string} streetAddress
@@ -63,6 +65,7 @@ export declare class Account {
63
65
  /**
64
66
  * Get billing address
65
67
  *
68
+ * Get a specific billing address for a user using it&#039;s ID.
66
69
  *
67
70
  * @param {string} billingAddressId
68
71
  * @throws {AppwriteException}
@@ -72,6 +75,7 @@ export declare class Account {
72
75
  /**
73
76
  * Update billing address
74
77
  *
78
+ * Update a specific billing address using it&#039;s ID.
75
79
  *
76
80
  * @param {string} billingAddressId
77
81
  * @param {string} country
@@ -87,6 +91,7 @@ export declare class Account {
87
91
  /**
88
92
  * Delete billing address
89
93
  *
94
+ * Delete a specific billing address using it&#039;s ID.
90
95
  *
91
96
  * @param {string} billingAddressId
92
97
  * @throws {AppwriteException}
@@ -96,6 +101,7 @@ export declare class Account {
96
101
  /**
97
102
  * Get coupon details
98
103
  *
104
+ * Get coupon details for an account.
99
105
  *
100
106
  * @param {string} couponId
101
107
  * @throws {AppwriteException}
@@ -138,6 +144,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
138
144
  /**
139
145
  * List invoices
140
146
  *
147
+ * List all invoices tied to an account.
141
148
  *
142
149
  * @param {string[]} queries
143
150
  * @throws {AppwriteException}
@@ -222,9 +229,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
222
229
  * @param {string} challengeId
223
230
  * @param {string} otp
224
231
  * @throws {AppwriteException}
225
- * @returns {Promise<{}>}
232
+ * @returns {Promise<Models.Session>}
226
233
  */
227
- updateMfaChallenge(challengeId: string, otp: string): Promise<{}>;
234
+ updateMfaChallenge(challengeId: string, otp: string): Promise<Models.Session>;
228
235
  /**
229
236
  * List factors
230
237
  *
@@ -285,6 +292,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
285
292
  /**
286
293
  * List payment methods
287
294
  *
295
+ * List payment methods for this account.
288
296
  *
289
297
  * @param {string[]} queries
290
298
  * @throws {AppwriteException}
@@ -294,6 +302,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
294
302
  /**
295
303
  * Create new payment method
296
304
  *
305
+ * Create a new payment method for the current user account.
297
306
  *
298
307
  * @throws {AppwriteException}
299
308
  * @returns {Promise<Models.PaymentMethod>}
@@ -302,6 +311,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
302
311
  /**
303
312
  * Get payment method
304
313
  *
314
+ * Get a specific payment method for the user.
305
315
  *
306
316
  * @param {string} paymentMethodId
307
317
  * @throws {AppwriteException}
@@ -311,6 +321,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
311
321
  /**
312
322
  * Update payment method
313
323
  *
324
+ * Update a new payment method for the current user account.
314
325
  *
315
326
  * @param {string} paymentMethodId
316
327
  * @param {number} expiryMonth
@@ -322,6 +333,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
322
333
  /**
323
334
  * Delete payment method
324
335
  *
336
+ * Delete a specific payment method from a user&#039;s account.
325
337
  *
326
338
  * @param {string} paymentMethodId
327
339
  * @throws {AppwriteException}
@@ -331,6 +343,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
331
343
  /**
332
344
  * Update payment method provider id
333
345
  *
346
+ * Update payment method provider.
334
347
  *
335
348
  * @param {string} paymentMethodId
336
349
  * @param {string} providerMethodId
@@ -342,6 +355,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
342
355
  /**
343
356
  * Update payment method with new setup with mandates for indian cards
344
357
  *
358
+ * Update payment method mandate options.
345
359
  *
346
360
  * @param {string} paymentMethodId
347
361
  * @throws {AppwriteException}
@@ -536,6 +550,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
536
550
  /**
537
551
  * Create push target
538
552
  *
553
+ * Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.
539
554
  *
540
555
  * @param {string} targetId
541
556
  * @param {string} identifier
@@ -547,6 +562,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
547
562
  /**
548
563
  * Update push target
549
564
  *
565
+ * Update the currently logged in user&#039;s push notification target. You can modify the target&#039;s identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.
550
566
  *
551
567
  * @param {string} targetId
552
568
  * @param {string} identifier
@@ -557,6 +573,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
557
573
  /**
558
574
  * Delete push target
559
575
  *
576
+ * Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.
560
577
  *
561
578
  * @param {string} targetId
562
579
  * @throws {AppwriteException}
@@ -5,6 +5,7 @@ export declare class Assistant {
5
5
  /**
6
6
  * Ask query
7
7
  *
8
+ * Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite&#039;s AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream.
8
9
  *
9
10
  * @param {string} prompt
10
11
  * @throws {AppwriteException}
@@ -6,6 +6,7 @@ export declare class Backups {
6
6
  /**
7
7
  * List archives
8
8
  *
9
+ * List all archives for a project.
9
10
  *
10
11
  * @param {string[]} queries
11
12
  * @throws {AppwriteException}
@@ -15,6 +16,7 @@ export declare class Backups {
15
16
  /**
16
17
  * Create archive
17
18
  *
19
+ * Create a new archive asynchronously for a project.
18
20
  *
19
21
  * @param {string[]} services
20
22
  * @param {string} resourceId
@@ -25,6 +27,7 @@ export declare class Backups {
25
27
  /**
26
28
  * Get backup archive
27
29
  *
30
+ * Get a backup archive using it&#039;s ID.
28
31
  *
29
32
  * @param {string} archiveId
30
33
  * @throws {AppwriteException}
@@ -34,6 +37,7 @@ export declare class Backups {
34
37
  /**
35
38
  * Delete archive
36
39
  *
40
+ * Delete an existing archive for a project.
37
41
  *
38
42
  * @param {string} archiveId
39
43
  * @throws {AppwriteException}
@@ -43,6 +47,7 @@ export declare class Backups {
43
47
  /**
44
48
  * List backup policies
45
49
  *
50
+ * List all policies for a project.
46
51
  *
47
52
  * @param {string[]} queries
48
53
  * @throws {AppwriteException}
@@ -52,6 +57,7 @@ export declare class Backups {
52
57
  /**
53
58
  * Create backup policy
54
59
  *
60
+ * Create a new backup policy.
55
61
  *
56
62
  * @param {string} policyId
57
63
  * @param {string[]} services
@@ -67,6 +73,7 @@ export declare class Backups {
67
73
  /**
68
74
  * Get backup policy
69
75
  *
76
+ * Get a backup policy using it&#039;s ID.
70
77
  *
71
78
  * @param {string} policyId
72
79
  * @throws {AppwriteException}
@@ -76,6 +83,7 @@ export declare class Backups {
76
83
  /**
77
84
  * Update backup policy
78
85
  *
86
+ * Update an existing policy using it&#039;s ID.
79
87
  *
80
88
  * @param {string} policyId
81
89
  * @param {string} name
@@ -89,6 +97,7 @@ export declare class Backups {
89
97
  /**
90
98
  * Delete backup policy
91
99
  *
100
+ * Delete a policy using it&#039;s ID.
92
101
  *
93
102
  * @param {string} policyId
94
103
  * @throws {AppwriteException}
@@ -98,6 +107,7 @@ export declare class Backups {
98
107
  /**
99
108
  * Create restoration
100
109
  *
110
+ * Create and trigger a new restoration for a backup on a project.
101
111
  *
102
112
  * @param {string} archiveId
103
113
  * @param {string[]} services
@@ -110,6 +120,7 @@ export declare class Backups {
110
120
  /**
111
121
  * List restorations
112
122
  *
123
+ * List all backup restorations for a project.
113
124
  *
114
125
  * @param {string[]} queries
115
126
  * @throws {AppwriteException}
@@ -119,10 +130,11 @@ export declare class Backups {
119
130
  /**
120
131
  * Get backup restoration
121
132
  *
133
+ * Get the current status of a backup restoration.
122
134
  *
123
135
  * @param {string} restorationId
124
136
  * @throws {AppwriteException}
125
- * @returns {Promise<Models.BackupArchive>}
137
+ * @returns {Promise<Models.BackupRestoration>}
126
138
  */
127
- getRestoration(restorationId: string): Promise<Models.BackupArchive>;
139
+ getRestoration(restorationId: string): Promise<Models.BackupRestoration>;
128
140
  }
@@ -6,6 +6,7 @@ export declare class Console {
6
6
  /**
7
7
  * Get campaign details
8
8
  *
9
+ * Recieve the details of a compaign using it&#039;s ID.
9
10
  *
10
11
  * @param {string} campaignId
11
12
  * @throws {AppwriteException}
@@ -15,6 +16,7 @@ export declare class Console {
15
16
  /**
16
17
  * Get coupon details
17
18
  *
19
+ * Get the details of a coupon using it&#039;s coupon ID.
18
20
  *
19
21
  * @param {string} couponId
20
22
  * @throws {AppwriteException}
@@ -24,6 +26,7 @@ export declare class Console {
24
26
  /**
25
27
  * Get plans
26
28
  *
29
+ * Return a list of all available plans.
27
30
  *
28
31
  * @throws {AppwriteException}
29
32
  * @returns {Promise<Models.BillingPlanList>}
@@ -32,15 +35,17 @@ export declare class Console {
32
35
  /**
33
36
  * Create program membership
34
37
  *
38
+ * Create a new membership for an account to a program.
35
39
  *
36
40
  * @param {string} programId
37
41
  * @throws {AppwriteException}
38
- * @returns {Promise<{}>}
42
+ * @returns {Promise<Models.Organization<Preferences>>}
39
43
  */
40
- createProgramMembership(programId: string): Promise<{}>;
44
+ createProgramMembership<Preferences extends Models.Preferences>(programId: string): Promise<Models.Organization<Preferences>>;
41
45
  /**
42
46
  * Get Regions
43
47
  *
48
+ * Get all available regions for the console.
44
49
  *
45
50
  * @throws {AppwriteException}
46
51
  * @returns {Promise<Models.ConsoleRegionList>}
@@ -49,6 +54,7 @@ export declare class Console {
49
54
  /**
50
55
  * Create source
51
56
  *
57
+ * Create a new source.
52
58
  *
53
59
  * @param {string} ref
54
60
  * @param {string} referrer
@@ -34,6 +34,7 @@ export declare class Databases {
34
34
  /**
35
35
  * Get databases usage stats
36
36
  *
37
+ * Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
37
38
  *
38
39
  * @param {DatabaseUsageRange} range
39
40
  * @throws {AppwriteException}
@@ -648,6 +649,7 @@ Attributes can be `key`, `fulltext`, and `unique`.
648
649
  /**
649
650
  * Get collection usage stats
650
651
  *
652
+ * Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
651
653
  *
652
654
  * @param {string} databaseId
653
655
  * @param {string} collectionId
@@ -670,6 +672,7 @@ Attributes can be `key`, `fulltext`, and `unique`.
670
672
  /**
671
673
  * Get database usage stats
672
674
  *
675
+ * Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
673
676
  *
674
677
  * @param {string} databaseId
675
678
  * @param {DatabaseUsageRange} range
@@ -93,6 +93,7 @@ export declare class Functions {
93
93
  /**
94
94
  * Get functions usage
95
95
  *
96
+ * Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
96
97
  *
97
98
  * @param {FunctionUsageRange} range
98
99
  * @throws {AppwriteException}
@@ -212,6 +213,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
212
213
  /**
213
214
  * Rebuild deployment
214
215
  *
216
+ * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment&#039;s code will be preserved and used for the new build.
215
217
  *
216
218
  * @param {string} functionId
217
219
  * @param {string} deploymentId
@@ -223,6 +225,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
223
225
  /**
224
226
  * Cancel deployment
225
227
  *
228
+ * Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn&#039;t started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status &#039;ready&#039;) or failed. The response includes the final build status and details.
226
229
  *
227
230
  * @param {string} functionId
228
231
  * @param {string} deploymentId
@@ -295,6 +298,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
295
298
  /**
296
299
  * Get function usage
297
300
  *
301
+ * Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
298
302
  *
299
303
  * @param {string} functionId
300
304
  * @param {FunctionUsageRange} range
@@ -71,6 +71,7 @@ export declare class Health {
71
71
  /**
72
72
  * Get billing aggregation queue
73
73
  *
74
+ * Get billing aggregation queue
74
75
  *
75
76
  * @param {number} threshold
76
77
  * @throws {AppwriteException}
@@ -90,6 +91,7 @@ export declare class Health {
90
91
  /**
91
92
  * Get billing aggregation queue
92
93
  *
94
+ * Get the priority builds queue size.
93
95
  *
94
96
  * @param {number} threshold
95
97
  * @throws {AppwriteException}
@@ -199,6 +201,16 @@ export declare class Health {
199
201
  * @returns {Promise<Models.HealthQueue>}
200
202
  */
201
203
  getQueueUsage(threshold?: number): Promise<Models.HealthQueue>;
204
+ /**
205
+ * Get usage count aggregation queue
206
+ *
207
+ * Get the usage count aggregation queue.
208
+ *
209
+ * @param {number} threshold
210
+ * @throws {AppwriteException}
211
+ * @returns {Promise<Models.HealthQueue>}
212
+ */
213
+ getQueueUsageCount(threshold?: number): Promise<Models.HealthQueue>;
202
214
  /**
203
215
  * Get usage dump queue
204
216
  *
@@ -1,5 +1,6 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
+ import { MessagePriority } from '../enums/message-priority';
3
4
  import { SmtpEncryption } from '../enums/smtp-encryption';
4
5
  export declare class Messaging {
5
6
  client: Client;
@@ -76,13 +77,16 @@ export declare class Messaging {
76
77
  * @param {string} sound
77
78
  * @param {string} color
78
79
  * @param {string} tag
79
- * @param {string} badge
80
+ * @param {number} badge
80
81
  * @param {boolean} draft
81
82
  * @param {string} scheduledAt
83
+ * @param {boolean} contentAvailable
84
+ * @param {boolean} critical
85
+ * @param {MessagePriority} priority
82
86
  * @throws {AppwriteException}
83
87
  * @returns {Promise<Models.Message>}
84
88
  */
85
- createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
89
+ createPush(messageId: string, title?: string, body?: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
86
90
  /**
87
91
  * Update push notification
88
92
  *
@@ -105,10 +109,13 @@ export declare class Messaging {
105
109
  * @param {number} badge
106
110
  * @param {boolean} draft
107
111
  * @param {string} scheduledAt
112
+ * @param {boolean} contentAvailable
113
+ * @param {boolean} critical
114
+ * @param {MessagePriority} priority
108
115
  * @throws {AppwriteException}
109
116
  * @returns {Promise<Models.Message>}
110
117
  */
111
- updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
118
+ updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
112
119
  /**
113
120
  * Create SMS
114
121
  *
@@ -128,7 +135,7 @@ export declare class Messaging {
128
135
  /**
129
136
  * Update SMS
130
137
  *
131
- * Update an email message by its unique ID.
138
+ * Update an SMS message by its unique ID.
132
139
 
133
140
  *
134
141
  * @param {string} messageId