node-appwrite 22.0.0 → 22.1.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 (74) hide show
  1. package/README.md +1 -1
  2. package/dist/client.js +2 -2
  3. package/dist/client.js.map +1 -1
  4. package/dist/client.mjs +2 -2
  5. package/dist/client.mjs.map +1 -1
  6. package/dist/enums/backup-services.d.mts +7 -0
  7. package/dist/enums/backup-services.d.ts +7 -0
  8. package/dist/enums/backup-services.js +12 -0
  9. package/dist/enums/backup-services.js.map +1 -0
  10. package/dist/enums/backup-services.mjs +11 -0
  11. package/dist/enums/backup-services.mjs.map +1 -0
  12. package/dist/enums/build-runtime.d.mts +3 -4
  13. package/dist/enums/build-runtime.d.ts +3 -4
  14. package/dist/enums/build-runtime.js +2 -3
  15. package/dist/enums/build-runtime.js.map +1 -1
  16. package/dist/enums/build-runtime.mjs +2 -3
  17. package/dist/enums/build-runtime.mjs.map +1 -1
  18. package/dist/enums/runtime.d.mts +3 -4
  19. package/dist/enums/runtime.d.ts +3 -4
  20. package/dist/enums/runtime.js +2 -3
  21. package/dist/enums/runtime.js.map +1 -1
  22. package/dist/enums/runtime.mjs +2 -3
  23. package/dist/enums/runtime.mjs.map +1 -1
  24. package/dist/enums/scopes.d.mts +9 -1
  25. package/dist/enums/scopes.d.ts +9 -1
  26. package/dist/enums/scopes.js +8 -0
  27. package/dist/enums/scopes.js.map +1 -1
  28. package/dist/enums/scopes.mjs +8 -0
  29. package/dist/enums/scopes.mjs.map +1 -1
  30. package/dist/index.d.mts +2 -1
  31. package/dist/index.d.ts +2 -1
  32. package/dist/index.js +10 -5
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.mjs +2 -1
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/models.d.mts +216 -2
  37. package/dist/models.d.ts +216 -2
  38. package/dist/services/account.js +3 -3
  39. package/dist/services/account.js.map +1 -1
  40. package/dist/services/account.mjs +3 -3
  41. package/dist/services/account.mjs.map +1 -1
  42. package/dist/services/avatars.js +3 -3
  43. package/dist/services/avatars.js.map +1 -1
  44. package/dist/services/avatars.mjs +3 -3
  45. package/dist/services/avatars.mjs.map +1 -1
  46. package/dist/services/backups.d.mts +291 -0
  47. package/dist/services/backups.d.ts +291 -0
  48. package/dist/services/backups.js +404 -0
  49. package/dist/services/backups.js.map +1 -0
  50. package/dist/services/backups.mjs +403 -0
  51. package/dist/services/backups.mjs.map +1 -0
  52. package/dist/services/graphql.js.map +1 -1
  53. package/dist/services/graphql.mjs.map +1 -1
  54. package/dist/services/health.d.mts +95 -0
  55. package/dist/services/health.d.ts +95 -0
  56. package/dist/services/health.js +121 -1
  57. package/dist/services/health.js.map +1 -1
  58. package/dist/services/health.mjs +121 -1
  59. package/dist/services/health.mjs.map +1 -1
  60. package/dist/services/storage.d.mts +4 -4
  61. package/dist/services/storage.d.ts +4 -4
  62. package/dist/services/storage.js.map +1 -1
  63. package/dist/services/storage.mjs.map +1 -1
  64. package/dist/services/teams.d.mts +8 -9
  65. package/dist/services/teams.d.ts +8 -9
  66. package/dist/services/teams.js.map +1 -1
  67. package/dist/services/teams.mjs.map +1 -1
  68. package/package.json +1 -1
  69. package/dist/enums/roles.d.mts +0 -7
  70. package/dist/enums/roles.d.ts +0 -7
  71. package/dist/enums/roles.js +0 -12
  72. package/dist/enums/roles.js.map +0 -1
  73. package/dist/enums/roles.mjs +0 -11
  74. package/dist/enums/roles.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  export { AppwriteException, Client, Query } from './client.mjs';
2
2
  export { Account } from './services/account.mjs';
3
3
  export { Avatars } from './services/avatars.mjs';
4
+ export { Backups } from './services/backups.mjs';
4
5
  export { Databases } from './services/databases.mjs';
5
6
  export { Functions } from './services/functions.mjs';
6
7
  export { Graphql } from './services/graphql.mjs';
@@ -27,6 +28,7 @@ export { Theme } from './enums/theme.mjs';
27
28
  export { Timezone } from './enums/timezone.mjs';
28
29
  export { BrowserPermission } from './enums/browser-permission.mjs';
29
30
  export { ImageFormat } from './enums/image-format.mjs';
31
+ export { BackupServices } from './enums/backup-services.mjs';
30
32
  export { RelationshipType } from './enums/relationship-type.mjs';
31
33
  export { RelationMutate } from './enums/relation-mutate.mjs';
32
34
  export { IndexType } from './enums/index-type.mjs';
@@ -45,7 +47,6 @@ export { BuildRuntime } from './enums/build-runtime.mjs';
45
47
  export { Adapter } from './enums/adapter.mjs';
46
48
  export { Compression } from './enums/compression.mjs';
47
49
  export { ImageGravity } from './enums/image-gravity.mjs';
48
- export { Roles } from './enums/roles.mjs';
49
50
  export { PasswordHash } from './enums/password-hash.mjs';
50
51
  export { MessagingProviderType } from './enums/messaging-provider-type.mjs';
51
52
  export { DatabaseType } from './enums/database-type.mjs';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAAA,SAAS,QAAQ,OAAO,yBAAyB;AACjD,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,aAAa;AACtB,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,aAAa;AAGtB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,UAAU;AACnB,SAAS,UAAU,iBAAiB;AACpC,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AACrC,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AACjC,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,YAAY;AACrB,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AACtC,SAAS,yBAAyB;AAClC,SAAS,qBAAqB","sourcesContent":["export { Client, Query, AppwriteException } from './client';\nexport { Account } from './services/account';\nexport { Avatars } from './services/avatars';\nexport { Databases } from './services/databases';\nexport { Functions } from './services/functions';\nexport { Graphql } from './services/graphql';\nexport { Health } from './services/health';\nexport { Locale } from './services/locale';\nexport { Messaging } from './services/messaging';\nexport { Sites } from './services/sites';\nexport { Storage } from './services/storage';\nexport { TablesDB } from './services/tables-db';\nexport { Teams } from './services/teams';\nexport { Tokens } from './services/tokens';\nexport { Users } from './services/users';\nexport type { Models, Payload, UploadProgress } from './client';\nexport type { QueryTypes, QueryTypesList } from './query';\nexport { Permission } from './permission';\nexport { Role } from './role';\nexport { ID } from './id';\nexport { Operator, Condition } from './operator';\nexport { AuthenticatorType } from './enums/authenticator-type';\nexport { AuthenticationFactor } from './enums/authentication-factor';\nexport { OAuthProvider } from './enums/o-auth-provider';\nexport { Browser } from './enums/browser';\nexport { CreditCard } from './enums/credit-card';\nexport { Flag } from './enums/flag';\nexport { Theme } from './enums/theme';\nexport { Timezone } from './enums/timezone';\nexport { BrowserPermission } from './enums/browser-permission';\nexport { ImageFormat } from './enums/image-format';\nexport { RelationshipType } from './enums/relationship-type';\nexport { RelationMutate } from './enums/relation-mutate';\nexport { IndexType } from './enums/index-type';\nexport { OrderBy } from './enums/order-by';\nexport { Runtime } from './enums/runtime';\nexport { Scopes } from './enums/scopes';\nexport { TemplateReferenceType } from './enums/template-reference-type';\nexport { VCSReferenceType } from './enums/vcs-reference-type';\nexport { DeploymentDownloadType } from './enums/deployment-download-type';\nexport { ExecutionMethod } from './enums/execution-method';\nexport { Name } from './enums/name';\nexport { MessagePriority } from './enums/message-priority';\nexport { SmtpEncryption } from './enums/smtp-encryption';\nexport { Framework } from './enums/framework';\nexport { BuildRuntime } from './enums/build-runtime';\nexport { Adapter } from './enums/adapter';\nexport { Compression } from './enums/compression';\nexport { ImageGravity } from './enums/image-gravity';\nexport { Roles } from './enums/roles';\nexport { PasswordHash } from './enums/password-hash';\nexport { MessagingProviderType } from './enums/messaging-provider-type';\nexport { DatabaseType } from './enums/database-type';\nexport { AttributeStatus } from './enums/attribute-status';\nexport { ColumnStatus } from './enums/column-status';\nexport { IndexStatus } from './enums/index-status';\nexport { DeploymentStatus } from './enums/deployment-status';\nexport { ExecutionTrigger } from './enums/execution-trigger';\nexport { ExecutionStatus } from './enums/execution-status';\nexport { HealthAntivirusStatus } from './enums/health-antivirus-status';\nexport { HealthCheckStatus } from './enums/health-check-status';\nexport { MessageStatus } from './enums/message-status';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAAA,SAAS,QAAQ,OAAO,yBAAyB;AACjD,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,aAAa;AACtB,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,aAAa;AAGtB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,UAAU;AACnB,SAAS,UAAU,iBAAiB;AACpC,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AACrC,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AACjC,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,YAAY;AACrB,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AACtC,SAAS,yBAAyB;AAClC,SAAS,qBAAqB","sourcesContent":["export { Client, Query, AppwriteException } from './client';\nexport { Account } from './services/account';\nexport { Avatars } from './services/avatars';\nexport { Backups } from './services/backups';\nexport { Databases } from './services/databases';\nexport { Functions } from './services/functions';\nexport { Graphql } from './services/graphql';\nexport { Health } from './services/health';\nexport { Locale } from './services/locale';\nexport { Messaging } from './services/messaging';\nexport { Sites } from './services/sites';\nexport { Storage } from './services/storage';\nexport { TablesDB } from './services/tables-db';\nexport { Teams } from './services/teams';\nexport { Tokens } from './services/tokens';\nexport { Users } from './services/users';\nexport type { Models, Payload, UploadProgress } from './client';\nexport type { QueryTypes, QueryTypesList } from './query';\nexport { Permission } from './permission';\nexport { Role } from './role';\nexport { ID } from './id';\nexport { Operator, Condition } from './operator';\nexport { AuthenticatorType } from './enums/authenticator-type';\nexport { AuthenticationFactor } from './enums/authentication-factor';\nexport { OAuthProvider } from './enums/o-auth-provider';\nexport { Browser } from './enums/browser';\nexport { CreditCard } from './enums/credit-card';\nexport { Flag } from './enums/flag';\nexport { Theme } from './enums/theme';\nexport { Timezone } from './enums/timezone';\nexport { BrowserPermission } from './enums/browser-permission';\nexport { ImageFormat } from './enums/image-format';\nexport { BackupServices } from './enums/backup-services';\nexport { RelationshipType } from './enums/relationship-type';\nexport { RelationMutate } from './enums/relation-mutate';\nexport { IndexType } from './enums/index-type';\nexport { OrderBy } from './enums/order-by';\nexport { Runtime } from './enums/runtime';\nexport { Scopes } from './enums/scopes';\nexport { TemplateReferenceType } from './enums/template-reference-type';\nexport { VCSReferenceType } from './enums/vcs-reference-type';\nexport { DeploymentDownloadType } from './enums/deployment-download-type';\nexport { ExecutionMethod } from './enums/execution-method';\nexport { Name } from './enums/name';\nexport { MessagePriority } from './enums/message-priority';\nexport { SmtpEncryption } from './enums/smtp-encryption';\nexport { Framework } from './enums/framework';\nexport { BuildRuntime } from './enums/build-runtime';\nexport { Adapter } from './enums/adapter';\nexport { Compression } from './enums/compression';\nexport { ImageGravity } from './enums/image-gravity';\nexport { PasswordHash } from './enums/password-hash';\nexport { MessagingProviderType } from './enums/messaging-provider-type';\nexport { DatabaseType } from './enums/database-type';\nexport { AttributeStatus } from './enums/attribute-status';\nexport { ColumnStatus } from './enums/column-status';\nexport { IndexStatus } from './enums/index-status';\nexport { DeploymentStatus } from './enums/deployment-status';\nexport { ExecutionTrigger } from './enums/execution-trigger';\nexport { ExecutionStatus } from './enums/execution-status';\nexport { HealthAntivirusStatus } from './enums/health-antivirus-status';\nexport { HealthCheckStatus } from './enums/health-check-status';\nexport { MessageStatus } from './enums/message-status';\n"]}
package/dist/models.d.mts CHANGED
@@ -523,6 +523,14 @@ declare namespace Models {
523
523
  * Database type.
524
524
  */
525
525
  type: DatabaseType;
526
+ /**
527
+ * Database backup policies.
528
+ */
529
+ policies: Index[];
530
+ /**
531
+ * Database backup archives.
532
+ */
533
+ archives: Collection[];
526
534
  };
527
535
  /**
528
536
  * Collection
@@ -568,6 +576,14 @@ declare namespace Models {
568
576
  * Collection indexes.
569
577
  */
570
578
  indexes: Index[];
579
+ /**
580
+ * Maximum document size in bytes. Returns 0 when no limit applies.
581
+ */
582
+ bytesMax: number;
583
+ /**
584
+ * Currently used document size in bytes based on defined attributes.
585
+ */
586
+ bytesUsed: number;
571
587
  };
572
588
  /**
573
589
  * Attributes List
@@ -1390,11 +1406,19 @@ declare namespace Models {
1390
1406
  /**
1391
1407
  * Table columns.
1392
1408
  */
1393
- columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnString)[];
1409
+ columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
1394
1410
  /**
1395
1411
  * Table indexes.
1396
1412
  */
1397
1413
  indexes: ColumnIndex[];
1414
+ /**
1415
+ * Maximum row size in bytes. Returns 0 when no limit applies.
1416
+ */
1417
+ bytesMax: number;
1418
+ /**
1419
+ * Currently used row size in bytes based on defined columns.
1420
+ */
1421
+ bytesUsed: number;
1398
1422
  };
1399
1423
  /**
1400
1424
  * Columns List
@@ -1407,7 +1431,7 @@ declare namespace Models {
1407
1431
  /**
1408
1432
  * List of columns.
1409
1433
  */
1410
- columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnString)[];
1434
+ columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
1411
1435
  };
1412
1436
  /**
1413
1437
  * ColumnString
@@ -4184,6 +4208,196 @@ declare namespace Models {
4184
4208
  */
4185
4209
  expired: boolean;
4186
4210
  };
4211
+ /**
4212
+ * Archive
4213
+ */
4214
+ export type BackupArchive = {
4215
+ /**
4216
+ * Archive ID.
4217
+ */
4218
+ $id: string;
4219
+ /**
4220
+ * Archive creation time in ISO 8601 format.
4221
+ */
4222
+ $createdAt: string;
4223
+ /**
4224
+ * Archive update date in ISO 8601 format.
4225
+ */
4226
+ $updatedAt: string;
4227
+ /**
4228
+ * Archive policy ID.
4229
+ */
4230
+ policyId: string;
4231
+ /**
4232
+ * Archive size in bytes.
4233
+ */
4234
+ size: number;
4235
+ /**
4236
+ * The status of the archive creation. Possible values: pending, processing, uploading, completed, failed.
4237
+ */
4238
+ status: string;
4239
+ /**
4240
+ * The backup start time.
4241
+ */
4242
+ startedAt: string;
4243
+ /**
4244
+ * Migration ID.
4245
+ */
4246
+ migrationId: string;
4247
+ /**
4248
+ * The services that are backed up by this archive.
4249
+ */
4250
+ services: string[];
4251
+ /**
4252
+ * The resources that are backed up by this archive.
4253
+ */
4254
+ resources: string[];
4255
+ /**
4256
+ * The resource ID to backup. Set only if this archive should backup a single resource.
4257
+ */
4258
+ resourceId?: string;
4259
+ /**
4260
+ * The resource type to backup. Set only if this archive should backup a single resource.
4261
+ */
4262
+ resourceType?: string;
4263
+ };
4264
+ /**
4265
+ * backup
4266
+ */
4267
+ export type BackupPolicy = {
4268
+ /**
4269
+ * Backup policy ID.
4270
+ */
4271
+ $id: string;
4272
+ /**
4273
+ * Backup policy name.
4274
+ */
4275
+ name: string;
4276
+ /**
4277
+ * Policy creation date in ISO 8601 format.
4278
+ */
4279
+ $createdAt: string;
4280
+ /**
4281
+ * Policy update date in ISO 8601 format.
4282
+ */
4283
+ $updatedAt: string;
4284
+ /**
4285
+ * The services that are backed up by this policy.
4286
+ */
4287
+ services: string[];
4288
+ /**
4289
+ * The resources that are backed up by this policy.
4290
+ */
4291
+ resources: string[];
4292
+ /**
4293
+ * The resource ID to backup. Set only if this policy should backup a single resource.
4294
+ */
4295
+ resourceId?: string;
4296
+ /**
4297
+ * The resource type to backup. Set only if this policy should backup a single resource.
4298
+ */
4299
+ resourceType?: string;
4300
+ /**
4301
+ * How many days to keep the backup before it will be automatically deleted.
4302
+ */
4303
+ retention: number;
4304
+ /**
4305
+ * Policy backup schedule in CRON format.
4306
+ */
4307
+ schedule: string;
4308
+ /**
4309
+ * Is this policy enabled.
4310
+ */
4311
+ enabled: boolean;
4312
+ };
4313
+ /**
4314
+ * Restoration
4315
+ */
4316
+ export type BackupRestoration = {
4317
+ /**
4318
+ * Restoration ID.
4319
+ */
4320
+ $id: string;
4321
+ /**
4322
+ * Restoration creation time in ISO 8601 format.
4323
+ */
4324
+ $createdAt: string;
4325
+ /**
4326
+ * Restoration update date in ISO 8601 format.
4327
+ */
4328
+ $updatedAt: string;
4329
+ /**
4330
+ * Backup archive ID.
4331
+ */
4332
+ archiveId: string;
4333
+ /**
4334
+ * Backup policy ID.
4335
+ */
4336
+ policyId: string;
4337
+ /**
4338
+ * The status of the restoration. Possible values: pending, downloading, processing, completed, failed.
4339
+ */
4340
+ status: string;
4341
+ /**
4342
+ * The backup start time.
4343
+ */
4344
+ startedAt: string;
4345
+ /**
4346
+ * Migration ID.
4347
+ */
4348
+ migrationId: string;
4349
+ /**
4350
+ * The services that are backed up by this policy.
4351
+ */
4352
+ services: string[];
4353
+ /**
4354
+ * The resources that are backed up by this policy.
4355
+ */
4356
+ resources: string[];
4357
+ /**
4358
+ * Optional data in key-value object.
4359
+ */
4360
+ options: string;
4361
+ };
4362
+ /**
4363
+ * Backup archive list
4364
+ */
4365
+ export type BackupArchiveList = {
4366
+ /**
4367
+ * Total number of archives that matched your query.
4368
+ */
4369
+ total: number;
4370
+ /**
4371
+ * List of archives.
4372
+ */
4373
+ archives: BackupArchive[];
4374
+ };
4375
+ /**
4376
+ * Backup policy list
4377
+ */
4378
+ export type BackupPolicyList = {
4379
+ /**
4380
+ * Total number of policies that matched your query.
4381
+ */
4382
+ total: number;
4383
+ /**
4384
+ * List of policies.
4385
+ */
4386
+ policies: BackupPolicy[];
4387
+ };
4388
+ /**
4389
+ * Backup restoration list
4390
+ */
4391
+ export type BackupRestorationList = {
4392
+ /**
4393
+ * Total number of restorations that matched your query.
4394
+ */
4395
+ total: number;
4396
+ /**
4397
+ * List of restorations.
4398
+ */
4399
+ restorations: BackupRestoration[];
4400
+ };
4187
4401
  export {};
4188
4402
  }
4189
4403
 
package/dist/models.d.ts CHANGED
@@ -523,6 +523,14 @@ declare namespace Models {
523
523
  * Database type.
524
524
  */
525
525
  type: DatabaseType;
526
+ /**
527
+ * Database backup policies.
528
+ */
529
+ policies: Index[];
530
+ /**
531
+ * Database backup archives.
532
+ */
533
+ archives: Collection[];
526
534
  };
527
535
  /**
528
536
  * Collection
@@ -568,6 +576,14 @@ declare namespace Models {
568
576
  * Collection indexes.
569
577
  */
570
578
  indexes: Index[];
579
+ /**
580
+ * Maximum document size in bytes. Returns 0 when no limit applies.
581
+ */
582
+ bytesMax: number;
583
+ /**
584
+ * Currently used document size in bytes based on defined attributes.
585
+ */
586
+ bytesUsed: number;
571
587
  };
572
588
  /**
573
589
  * Attributes List
@@ -1390,11 +1406,19 @@ declare namespace Models {
1390
1406
  /**
1391
1407
  * Table columns.
1392
1408
  */
1393
- columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnString)[];
1409
+ columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
1394
1410
  /**
1395
1411
  * Table indexes.
1396
1412
  */
1397
1413
  indexes: ColumnIndex[];
1414
+ /**
1415
+ * Maximum row size in bytes. Returns 0 when no limit applies.
1416
+ */
1417
+ bytesMax: number;
1418
+ /**
1419
+ * Currently used row size in bytes based on defined columns.
1420
+ */
1421
+ bytesUsed: number;
1398
1422
  };
1399
1423
  /**
1400
1424
  * Columns List
@@ -1407,7 +1431,7 @@ declare namespace Models {
1407
1431
  /**
1408
1432
  * List of columns.
1409
1433
  */
1410
- columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnString)[];
1434
+ columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
1411
1435
  };
1412
1436
  /**
1413
1437
  * ColumnString
@@ -4184,6 +4208,196 @@ declare namespace Models {
4184
4208
  */
4185
4209
  expired: boolean;
4186
4210
  };
4211
+ /**
4212
+ * Archive
4213
+ */
4214
+ export type BackupArchive = {
4215
+ /**
4216
+ * Archive ID.
4217
+ */
4218
+ $id: string;
4219
+ /**
4220
+ * Archive creation time in ISO 8601 format.
4221
+ */
4222
+ $createdAt: string;
4223
+ /**
4224
+ * Archive update date in ISO 8601 format.
4225
+ */
4226
+ $updatedAt: string;
4227
+ /**
4228
+ * Archive policy ID.
4229
+ */
4230
+ policyId: string;
4231
+ /**
4232
+ * Archive size in bytes.
4233
+ */
4234
+ size: number;
4235
+ /**
4236
+ * The status of the archive creation. Possible values: pending, processing, uploading, completed, failed.
4237
+ */
4238
+ status: string;
4239
+ /**
4240
+ * The backup start time.
4241
+ */
4242
+ startedAt: string;
4243
+ /**
4244
+ * Migration ID.
4245
+ */
4246
+ migrationId: string;
4247
+ /**
4248
+ * The services that are backed up by this archive.
4249
+ */
4250
+ services: string[];
4251
+ /**
4252
+ * The resources that are backed up by this archive.
4253
+ */
4254
+ resources: string[];
4255
+ /**
4256
+ * The resource ID to backup. Set only if this archive should backup a single resource.
4257
+ */
4258
+ resourceId?: string;
4259
+ /**
4260
+ * The resource type to backup. Set only if this archive should backup a single resource.
4261
+ */
4262
+ resourceType?: string;
4263
+ };
4264
+ /**
4265
+ * backup
4266
+ */
4267
+ export type BackupPolicy = {
4268
+ /**
4269
+ * Backup policy ID.
4270
+ */
4271
+ $id: string;
4272
+ /**
4273
+ * Backup policy name.
4274
+ */
4275
+ name: string;
4276
+ /**
4277
+ * Policy creation date in ISO 8601 format.
4278
+ */
4279
+ $createdAt: string;
4280
+ /**
4281
+ * Policy update date in ISO 8601 format.
4282
+ */
4283
+ $updatedAt: string;
4284
+ /**
4285
+ * The services that are backed up by this policy.
4286
+ */
4287
+ services: string[];
4288
+ /**
4289
+ * The resources that are backed up by this policy.
4290
+ */
4291
+ resources: string[];
4292
+ /**
4293
+ * The resource ID to backup. Set only if this policy should backup a single resource.
4294
+ */
4295
+ resourceId?: string;
4296
+ /**
4297
+ * The resource type to backup. Set only if this policy should backup a single resource.
4298
+ */
4299
+ resourceType?: string;
4300
+ /**
4301
+ * How many days to keep the backup before it will be automatically deleted.
4302
+ */
4303
+ retention: number;
4304
+ /**
4305
+ * Policy backup schedule in CRON format.
4306
+ */
4307
+ schedule: string;
4308
+ /**
4309
+ * Is this policy enabled.
4310
+ */
4311
+ enabled: boolean;
4312
+ };
4313
+ /**
4314
+ * Restoration
4315
+ */
4316
+ export type BackupRestoration = {
4317
+ /**
4318
+ * Restoration ID.
4319
+ */
4320
+ $id: string;
4321
+ /**
4322
+ * Restoration creation time in ISO 8601 format.
4323
+ */
4324
+ $createdAt: string;
4325
+ /**
4326
+ * Restoration update date in ISO 8601 format.
4327
+ */
4328
+ $updatedAt: string;
4329
+ /**
4330
+ * Backup archive ID.
4331
+ */
4332
+ archiveId: string;
4333
+ /**
4334
+ * Backup policy ID.
4335
+ */
4336
+ policyId: string;
4337
+ /**
4338
+ * The status of the restoration. Possible values: pending, downloading, processing, completed, failed.
4339
+ */
4340
+ status: string;
4341
+ /**
4342
+ * The backup start time.
4343
+ */
4344
+ startedAt: string;
4345
+ /**
4346
+ * Migration ID.
4347
+ */
4348
+ migrationId: string;
4349
+ /**
4350
+ * The services that are backed up by this policy.
4351
+ */
4352
+ services: string[];
4353
+ /**
4354
+ * The resources that are backed up by this policy.
4355
+ */
4356
+ resources: string[];
4357
+ /**
4358
+ * Optional data in key-value object.
4359
+ */
4360
+ options: string;
4361
+ };
4362
+ /**
4363
+ * Backup archive list
4364
+ */
4365
+ export type BackupArchiveList = {
4366
+ /**
4367
+ * Total number of archives that matched your query.
4368
+ */
4369
+ total: number;
4370
+ /**
4371
+ * List of archives.
4372
+ */
4373
+ archives: BackupArchive[];
4374
+ };
4375
+ /**
4376
+ * Backup policy list
4377
+ */
4378
+ export type BackupPolicyList = {
4379
+ /**
4380
+ * Total number of policies that matched your query.
4381
+ */
4382
+ total: number;
4383
+ /**
4384
+ * List of policies.
4385
+ */
4386
+ policies: BackupPolicy[];
4387
+ };
4388
+ /**
4389
+ * Backup restoration list
4390
+ */
4391
+ export type BackupRestorationList = {
4392
+ /**
4393
+ * Total number of restorations that matched your query.
4394
+ */
4395
+ total: number;
4396
+ /**
4397
+ * List of restorations.
4398
+ */
4399
+ restorations: BackupRestoration[];
4400
+ };
4187
4401
  export {};
4188
4402
  }
4189
4403
 
@@ -304,7 +304,7 @@ class Account {
304
304
  }
305
305
  updateMfaAuthenticator(paramsOrFirst, ...rest) {
306
306
  let params;
307
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "type" in paramsOrFirst) {
307
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("type" in paramsOrFirst || "otp" in paramsOrFirst)) {
308
308
  params = paramsOrFirst || {};
309
309
  } else {
310
310
  params = {
@@ -338,7 +338,7 @@ class Account {
338
338
  }
339
339
  updateMFAAuthenticator(paramsOrFirst, ...rest) {
340
340
  let params;
341
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "type" in paramsOrFirst) {
341
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("type" in paramsOrFirst || "otp" in paramsOrFirst)) {
342
342
  params = paramsOrFirst || {};
343
343
  } else {
344
344
  params = {
@@ -1332,7 +1332,7 @@ class Account {
1332
1332
  }
1333
1333
  createOAuth2Token(paramsOrFirst, ...rest) {
1334
1334
  let params;
1335
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "provider" in paramsOrFirst) {
1335
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("provider" in paramsOrFirst || "success" in paramsOrFirst || "failure" in paramsOrFirst || "scopes" in paramsOrFirst)) {
1336
1336
  params = paramsOrFirst || {};
1337
1337
  } else {
1338
1338
  params = {