@appwrite.io/console 2.1.0 → 2.1.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.
- package/CHANGELOG.md +4 -0
- package/README.md +2 -2
- package/dist/cjs/sdk.js +55 -16
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +51 -16
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +3812 -16
- package/docs/examples/projects/update-labels.md +14 -0
- package/package.json +7 -1
- package/rollup.config.js +40 -24
- package/src/client.ts +20 -10
- package/src/models.ts +432 -424
- package/src/query.ts +14 -11
- package/src/services/account.ts +20 -20
- package/src/services/avatars.ts +117 -117
- package/src/services/backups.ts +18 -18
- package/src/services/console.ts +24 -24
- package/src/services/databases.ts +119 -119
- package/src/services/domains.ts +204 -204
- package/src/services/functions.ts +30 -30
- package/src/services/health.ts +146 -146
- package/src/services/messaging.ts +54 -54
- package/src/services/migrations.ts +36 -36
- package/src/services/organizations.ts +42 -42
- package/src/services/projects.ts +146 -83
- package/src/services/sites.ts +30 -30
- package/src/services/storage.ts +49 -49
- package/src/services/tables-db.ts +119 -119
- package/src/services/users.ts +39 -39
- package/types/client.d.ts +8 -1
- package/types/models.d.ts +432 -424
- package/types/query.d.ts +8 -8
- package/types/services/account.d.ts +11 -11
- package/types/services/avatars.d.ts +82 -82
- package/types/services/backups.d.ts +8 -8
- package/types/services/console.d.ts +14 -14
- package/types/services/databases.d.ts +70 -70
- package/types/services/domains.d.ts +104 -104
- package/types/services/functions.d.ts +15 -15
- package/types/services/health.d.ts +72 -72
- package/types/services/messaging.d.ts +24 -24
- package/types/services/migrations.d.ts +16 -16
- package/types/services/organizations.d.ts +22 -22
- package/types/services/projects.d.ts +60 -38
- package/types/services/sites.d.ts +15 -15
- package/types/services/storage.d.ts +34 -34
- package/types/services/tables-db.d.ts +70 -70
- package/types/services/users.d.ts +24 -24
package/src/services/backups.ts
CHANGED
|
@@ -283,7 +283,7 @@ export class Backups {
|
|
|
283
283
|
*
|
|
284
284
|
* @param {string} params.policyId - Policy 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.
|
|
285
285
|
* @param {string[]} params.services - Array of services to backup
|
|
286
|
-
* @param {number} params.retention - Days to keep backups before deletion
|
|
286
|
+
* @param {number | bigint} params.retention - Days to keep backups before deletion
|
|
287
287
|
* @param {string} params.schedule - Schedule CRON syntax.
|
|
288
288
|
* @param {string} params.name - Policy name. Max length: 128 chars.
|
|
289
289
|
* @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
@@ -291,13 +291,13 @@ export class Backups {
|
|
|
291
291
|
* @throws {AppwriteException}
|
|
292
292
|
* @returns {Promise<Models.BackupPolicy>}
|
|
293
293
|
*/
|
|
294
|
-
createPolicy(params: { policyId: string, services: string[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean }): Promise<Models.BackupPolicy>;
|
|
294
|
+
createPolicy(params: { policyId: string, services: string[], retention: number | bigint, schedule: string, name?: string, resourceId?: string, enabled?: boolean }): Promise<Models.BackupPolicy>;
|
|
295
295
|
/**
|
|
296
296
|
* Create a new backup policy.
|
|
297
297
|
*
|
|
298
298
|
* @param {string} policyId - Policy 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.
|
|
299
299
|
* @param {string[]} services - Array of services to backup
|
|
300
|
-
* @param {number} retention - Days to keep backups before deletion
|
|
300
|
+
* @param {number | bigint} retention - Days to keep backups before deletion
|
|
301
301
|
* @param {string} schedule - Schedule CRON syntax.
|
|
302
302
|
* @param {string} name - Policy name. Max length: 128 chars.
|
|
303
303
|
* @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
@@ -306,20 +306,20 @@ export class Backups {
|
|
|
306
306
|
* @returns {Promise<Models.BackupPolicy>}
|
|
307
307
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
308
308
|
*/
|
|
309
|
-
createPolicy(policyId: string, services: string[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
309
|
+
createPolicy(policyId: string, services: string[], retention: number | bigint, schedule: string, name?: string, resourceId?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
310
310
|
createPolicy(
|
|
311
|
-
paramsOrFirst: { policyId: string, services: string[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean } | string,
|
|
312
|
-
...rest: [(string[])?, (number)?, (string)?, (string)?, (string)?, (boolean)?]
|
|
311
|
+
paramsOrFirst: { policyId: string, services: string[], retention: number | bigint, schedule: string, name?: string, resourceId?: string, enabled?: boolean } | string,
|
|
312
|
+
...rest: [(string[])?, (number | bigint)?, (string)?, (string)?, (string)?, (boolean)?]
|
|
313
313
|
): Promise<Models.BackupPolicy> {
|
|
314
|
-
let params: { policyId: string, services: string[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean };
|
|
314
|
+
let params: { policyId: string, services: string[], retention: number | bigint, schedule: string, name?: string, resourceId?: string, enabled?: boolean };
|
|
315
315
|
|
|
316
316
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
317
|
-
params = (paramsOrFirst || {}) as { policyId: string, services: string[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean };
|
|
317
|
+
params = (paramsOrFirst || {}) as { policyId: string, services: string[], retention: number | bigint, schedule: string, name?: string, resourceId?: string, enabled?: boolean };
|
|
318
318
|
} else {
|
|
319
319
|
params = {
|
|
320
320
|
policyId: paramsOrFirst as string,
|
|
321
321
|
services: rest[0] as string[],
|
|
322
|
-
retention: rest[1] as number,
|
|
322
|
+
retention: rest[1] as number | bigint,
|
|
323
323
|
schedule: rest[2] as string,
|
|
324
324
|
name: rest[3] as string,
|
|
325
325
|
resourceId: rest[4] as string,
|
|
@@ -441,39 +441,39 @@ export class Backups {
|
|
|
441
441
|
*
|
|
442
442
|
* @param {string} params.policyId - Policy ID. Choose a custom ID`. 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.
|
|
443
443
|
* @param {string} params.name - Policy name. Max length: 128 chars.
|
|
444
|
-
* @param {number} params.retention - Days to keep backups before deletion
|
|
444
|
+
* @param {number | bigint} params.retention - Days to keep backups before deletion
|
|
445
445
|
* @param {string} params.schedule - Cron expression
|
|
446
446
|
* @param {boolean} params.enabled - Is Backup enabled? When set to 'disabled', No backup will be taken
|
|
447
447
|
* @throws {AppwriteException}
|
|
448
448
|
* @returns {Promise<Models.BackupPolicy>}
|
|
449
449
|
*/
|
|
450
|
-
updatePolicy(params: { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean }): Promise<Models.BackupPolicy>;
|
|
450
|
+
updatePolicy(params: { policyId: string, name?: string, retention?: number | bigint, schedule?: string, enabled?: boolean }): Promise<Models.BackupPolicy>;
|
|
451
451
|
/**
|
|
452
452
|
* Update an existing policy using it's ID.
|
|
453
453
|
*
|
|
454
454
|
* @param {string} policyId - Policy ID. Choose a custom ID`. 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.
|
|
455
455
|
* @param {string} name - Policy name. Max length: 128 chars.
|
|
456
|
-
* @param {number} retention - Days to keep backups before deletion
|
|
456
|
+
* @param {number | bigint} retention - Days to keep backups before deletion
|
|
457
457
|
* @param {string} schedule - Cron expression
|
|
458
458
|
* @param {boolean} enabled - Is Backup enabled? When set to 'disabled', No backup will be taken
|
|
459
459
|
* @throws {AppwriteException}
|
|
460
460
|
* @returns {Promise<Models.BackupPolicy>}
|
|
461
461
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
462
462
|
*/
|
|
463
|
-
updatePolicy(policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
463
|
+
updatePolicy(policyId: string, name?: string, retention?: number | bigint, schedule?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
464
464
|
updatePolicy(
|
|
465
|
-
paramsOrFirst: { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean } | string,
|
|
466
|
-
...rest: [(string)?, (number)?, (string)?, (boolean)?]
|
|
465
|
+
paramsOrFirst: { policyId: string, name?: string, retention?: number | bigint, schedule?: string, enabled?: boolean } | string,
|
|
466
|
+
...rest: [(string)?, (number | bigint)?, (string)?, (boolean)?]
|
|
467
467
|
): Promise<Models.BackupPolicy> {
|
|
468
|
-
let params: { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean };
|
|
468
|
+
let params: { policyId: string, name?: string, retention?: number | bigint, schedule?: string, enabled?: boolean };
|
|
469
469
|
|
|
470
470
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
471
|
-
params = (paramsOrFirst || {}) as { policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean };
|
|
471
|
+
params = (paramsOrFirst || {}) as { policyId: string, name?: string, retention?: number | bigint, schedule?: string, enabled?: boolean };
|
|
472
472
|
} else {
|
|
473
473
|
params = {
|
|
474
474
|
policyId: paramsOrFirst as string,
|
|
475
475
|
name: rest[0] as string,
|
|
476
|
-
retention: rest[1] as number,
|
|
476
|
+
retention: rest[1] as number | bigint,
|
|
477
477
|
schedule: rest[2] as string,
|
|
478
478
|
enabled: rest[3] as boolean
|
|
479
479
|
};
|
package/src/services/console.ts
CHANGED
|
@@ -525,40 +525,40 @@ export class Console {
|
|
|
525
525
|
* @param {string} params.databaseId - Database ID.
|
|
526
526
|
* @param {string} params.tableId - Table ID.
|
|
527
527
|
* @param {string} params.context - Optional user provided context to refine suggestions.
|
|
528
|
-
* @param {number} params.min - Minimum number of suggestions to generate.
|
|
529
|
-
* @param {number} params.max - Maximum number of suggestions to generate.
|
|
528
|
+
* @param {number | bigint} params.min - Minimum number of suggestions to generate.
|
|
529
|
+
* @param {number | bigint} params.max - Maximum number of suggestions to generate.
|
|
530
530
|
* @throws {AppwriteException}
|
|
531
531
|
* @returns {Promise<Models.ColumnList>}
|
|
532
532
|
*/
|
|
533
|
-
suggestColumns(params: { databaseId: string, tableId: string, context?: string, min?: number, max?: number }): Promise<Models.ColumnList>;
|
|
533
|
+
suggestColumns(params: { databaseId: string, tableId: string, context?: string, min?: number | bigint, max?: number | bigint }): Promise<Models.ColumnList>;
|
|
534
534
|
/**
|
|
535
535
|
* Suggests column names and their size limits based on the provided table name. The API will also analyze other tables in the same database to provide context-aware suggestions, ensuring consistency across schema design. Users may optionally provide custom context to further refine the suggestions.
|
|
536
536
|
*
|
|
537
537
|
* @param {string} databaseId - Database ID.
|
|
538
538
|
* @param {string} tableId - Table ID.
|
|
539
539
|
* @param {string} context - Optional user provided context to refine suggestions.
|
|
540
|
-
* @param {number} min - Minimum number of suggestions to generate.
|
|
541
|
-
* @param {number} max - Maximum number of suggestions to generate.
|
|
540
|
+
* @param {number | bigint} min - Minimum number of suggestions to generate.
|
|
541
|
+
* @param {number | bigint} max - Maximum number of suggestions to generate.
|
|
542
542
|
* @throws {AppwriteException}
|
|
543
543
|
* @returns {Promise<Models.ColumnList>}
|
|
544
544
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
545
545
|
*/
|
|
546
|
-
suggestColumns(databaseId: string, tableId: string, context?: string, min?: number, max?: number): Promise<Models.ColumnList>;
|
|
546
|
+
suggestColumns(databaseId: string, tableId: string, context?: string, min?: number | bigint, max?: number | bigint): Promise<Models.ColumnList>;
|
|
547
547
|
suggestColumns(
|
|
548
|
-
paramsOrFirst: { databaseId: string, tableId: string, context?: string, min?: number, max?: number } | string,
|
|
549
|
-
...rest: [(string)?, (string)?, (number)?, (number)?]
|
|
548
|
+
paramsOrFirst: { databaseId: string, tableId: string, context?: string, min?: number | bigint, max?: number | bigint } | string,
|
|
549
|
+
...rest: [(string)?, (string)?, (number | bigint)?, (number | bigint)?]
|
|
550
550
|
): Promise<Models.ColumnList> {
|
|
551
|
-
let params: { databaseId: string, tableId: string, context?: string, min?: number, max?: number };
|
|
551
|
+
let params: { databaseId: string, tableId: string, context?: string, min?: number | bigint, max?: number | bigint };
|
|
552
552
|
|
|
553
553
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
554
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, context?: string, min?: number, max?: number };
|
|
554
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, context?: string, min?: number | bigint, max?: number | bigint };
|
|
555
555
|
} else {
|
|
556
556
|
params = {
|
|
557
557
|
databaseId: paramsOrFirst as string,
|
|
558
558
|
tableId: rest[0] as string,
|
|
559
559
|
context: rest[1] as string,
|
|
560
|
-
min: rest[2] as number,
|
|
561
|
-
max: rest[3] as number
|
|
560
|
+
min: rest[2] as number | bigint,
|
|
561
|
+
max: rest[3] as number | bigint
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
564
|
|
|
@@ -610,38 +610,38 @@ export class Console {
|
|
|
610
610
|
*
|
|
611
611
|
* @param {string} params.databaseId - Database ID.
|
|
612
612
|
* @param {string} params.tableId - Table ID.
|
|
613
|
-
* @param {number} params.min - Minimum number of suggestions to generate.
|
|
614
|
-
* @param {number} params.max - Maximum number of suggestions to generate.
|
|
613
|
+
* @param {number | bigint} params.min - Minimum number of suggestions to generate.
|
|
614
|
+
* @param {number | bigint} params.max - Maximum number of suggestions to generate.
|
|
615
615
|
* @throws {AppwriteException}
|
|
616
616
|
* @returns {Promise<Models.ColumnIndexList>}
|
|
617
617
|
*/
|
|
618
|
-
suggestIndexes(params: { databaseId: string, tableId: string, min?: number, max?: number }): Promise<Models.ColumnIndexList>;
|
|
618
|
+
suggestIndexes(params: { databaseId: string, tableId: string, min?: number | bigint, max?: number | bigint }): Promise<Models.ColumnIndexList>;
|
|
619
619
|
/**
|
|
620
620
|
* Suggests database indexes for table columns based on the provided table structure and existing columns. The API will also analyze the table's column types, names, and patterns to recommend optimal indexes that improve query performance for common database operations like filtering, sorting, and searching.
|
|
621
621
|
*
|
|
622
622
|
* @param {string} databaseId - Database ID.
|
|
623
623
|
* @param {string} tableId - Table ID.
|
|
624
|
-
* @param {number} min - Minimum number of suggestions to generate.
|
|
625
|
-
* @param {number} max - Maximum number of suggestions to generate.
|
|
624
|
+
* @param {number | bigint} min - Minimum number of suggestions to generate.
|
|
625
|
+
* @param {number | bigint} max - Maximum number of suggestions to generate.
|
|
626
626
|
* @throws {AppwriteException}
|
|
627
627
|
* @returns {Promise<Models.ColumnIndexList>}
|
|
628
628
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
629
629
|
*/
|
|
630
|
-
suggestIndexes(databaseId: string, tableId: string, min?: number, max?: number): Promise<Models.ColumnIndexList>;
|
|
630
|
+
suggestIndexes(databaseId: string, tableId: string, min?: number | bigint, max?: number | bigint): Promise<Models.ColumnIndexList>;
|
|
631
631
|
suggestIndexes(
|
|
632
|
-
paramsOrFirst: { databaseId: string, tableId: string, min?: number, max?: number } | string,
|
|
633
|
-
...rest: [(string)?, (number)?, (number)?]
|
|
632
|
+
paramsOrFirst: { databaseId: string, tableId: string, min?: number | bigint, max?: number | bigint } | string,
|
|
633
|
+
...rest: [(string)?, (number | bigint)?, (number | bigint)?]
|
|
634
634
|
): Promise<Models.ColumnIndexList> {
|
|
635
|
-
let params: { databaseId: string, tableId: string, min?: number, max?: number };
|
|
635
|
+
let params: { databaseId: string, tableId: string, min?: number | bigint, max?: number | bigint };
|
|
636
636
|
|
|
637
637
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
638
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, min?: number, max?: number };
|
|
638
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, min?: number | bigint, max?: number | bigint };
|
|
639
639
|
} else {
|
|
640
640
|
params = {
|
|
641
641
|
databaseId: paramsOrFirst as string,
|
|
642
642
|
tableId: rest[0] as string,
|
|
643
|
-
min: rest[1] as number,
|
|
644
|
-
max: rest[2] as number
|
|
643
|
+
min: rest[1] as number | bigint,
|
|
644
|
+
max: rest[2] as number | bigint
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
647
|
|