@appwrite.io/console 2.1.3 → 2.2.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 (132) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +1564 -187
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +1565 -188
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +1564 -187
  8. package/docs/examples/account/create-key.md +15 -0
  9. package/docs/examples/account/delete-key.md +13 -0
  10. package/docs/examples/account/get-key.md +13 -0
  11. package/docs/examples/account/list-keys.md +13 -0
  12. package/docs/examples/account/update-key.md +16 -0
  13. package/docs/examples/avatars/get-screenshot.md +5 -5
  14. package/docs/examples/backups/create-archive.md +2 -2
  15. package/docs/examples/backups/create-policy.md +2 -2
  16. package/docs/examples/backups/create-restoration.md +2 -2
  17. package/docs/examples/console/{get-regions.md → list-regions.md} +1 -3
  18. package/docs/examples/databases/create-index.md +2 -2
  19. package/docs/examples/databases/create-longtext-attribute.md +18 -0
  20. package/docs/examples/databases/create-mediumtext-attribute.md +18 -0
  21. package/docs/examples/databases/create-text-attribute.md +18 -0
  22. package/docs/examples/databases/create-varchar-attribute.md +19 -0
  23. package/docs/examples/databases/update-collection.md +1 -1
  24. package/docs/examples/databases/update-longtext-attribute.md +18 -0
  25. package/docs/examples/databases/update-mediumtext-attribute.md +18 -0
  26. package/docs/examples/databases/update-text-attribute.md +18 -0
  27. package/docs/examples/databases/update-varchar-attribute.md +19 -0
  28. package/docs/examples/databases/update.md +1 -1
  29. package/docs/examples/functions/create.md +2 -2
  30. package/docs/examples/functions/list-templates.md +3 -3
  31. package/docs/examples/functions/update.md +2 -2
  32. package/docs/examples/migrations/create-appwrite-migration.md +2 -2
  33. package/docs/examples/migrations/create-firebase-migration.md +2 -2
  34. package/docs/examples/migrations/create-n-host-migration.md +2 -2
  35. package/docs/examples/migrations/create-supabase-migration.md +2 -2
  36. package/docs/examples/migrations/get-appwrite-report.md +2 -2
  37. package/docs/examples/migrations/get-firebase-report.md +2 -2
  38. package/docs/examples/migrations/get-n-host-report.md +2 -2
  39. package/docs/examples/migrations/get-supabase-report.md +2 -2
  40. package/docs/examples/organizations/create-key.md +16 -0
  41. package/docs/examples/organizations/create.md +2 -2
  42. package/docs/examples/organizations/delete-key.md +14 -0
  43. package/docs/examples/organizations/estimation-create-organization.md +2 -2
  44. package/docs/examples/organizations/estimation-update-plan.md +2 -2
  45. package/docs/examples/organizations/get-key.md +14 -0
  46. package/docs/examples/organizations/list-keys.md +14 -0
  47. package/docs/examples/organizations/list-regions.md +13 -0
  48. package/docs/examples/organizations/update-key.md +17 -0
  49. package/docs/examples/organizations/update-plan.md +2 -2
  50. package/docs/examples/projects/create-jwt.md +2 -2
  51. package/docs/examples/projects/create-key.md +2 -2
  52. package/docs/examples/projects/update-key.md +2 -2
  53. package/docs/examples/sites/list-templates.md +3 -3
  54. package/docs/examples/tablesdb/create-index.md +2 -2
  55. package/docs/examples/tablesdb/create-longtext-column.md +18 -0
  56. package/docs/examples/tablesdb/create-mediumtext-column.md +18 -0
  57. package/docs/examples/tablesdb/create-text-column.md +18 -0
  58. package/docs/examples/tablesdb/create-varchar-column.md +19 -0
  59. package/docs/examples/tablesdb/update-longtext-column.md +18 -0
  60. package/docs/examples/tablesdb/update-mediumtext-column.md +18 -0
  61. package/docs/examples/tablesdb/update-table.md +1 -1
  62. package/docs/examples/tablesdb/update-text-column.md +18 -0
  63. package/docs/examples/tablesdb/update-varchar-column.md +19 -0
  64. package/docs/examples/tablesdb/update.md +1 -1
  65. package/docs/examples/teams/create-membership.md +2 -2
  66. package/docs/examples/teams/update-membership.md +2 -2
  67. package/package.json +1 -1
  68. package/src/channel.ts +8 -4
  69. package/src/client.ts +3 -28
  70. package/src/enums/browser-permission.ts +22 -0
  71. package/src/enums/deployment-status.ts +1 -0
  72. package/src/enums/frameworks.ts +17 -0
  73. package/src/enums/order-by.ts +4 -0
  74. package/src/enums/resources.ts +13 -0
  75. package/src/enums/roles.ts +7 -0
  76. package/src/enums/runtimes.ts +66 -0
  77. package/src/enums/scopes.ts +65 -0
  78. package/src/enums/services.ts +5 -0
  79. package/src/enums/use-cases.ts +11 -0
  80. package/src/index.ts +9 -1
  81. package/src/models.ts +349 -1
  82. package/src/services/account.ts +364 -56
  83. package/src/services/assistant.ts +1 -1
  84. package/src/services/avatars.ts +17 -16
  85. package/src/services/backups.ts +37 -36
  86. package/src/services/console.ts +11 -42
  87. package/src/services/databases.ts +1060 -280
  88. package/src/services/domains.ts +44 -44
  89. package/src/services/functions.ts +60 -57
  90. package/src/services/graphql.ts +2 -2
  91. package/src/services/health.ts +22 -20
  92. package/src/services/messaging.ts +56 -56
  93. package/src/services/migrations.ts +79 -78
  94. package/src/services/organizations.ts +466 -70
  95. package/src/services/project.ts +5 -5
  96. package/src/services/projects.ts +86 -85
  97. package/src/services/proxy.ts +8 -8
  98. package/src/services/sites.ts +42 -40
  99. package/src/services/storage.ts +16 -16
  100. package/src/services/tables-db.ts +1050 -268
  101. package/src/services/teams.ts +31 -30
  102. package/src/services/tokens.ts +5 -5
  103. package/src/services/users.ts +49 -49
  104. package/src/services/vcs.ts +10 -10
  105. package/types/channel.d.ts +5 -4
  106. package/types/enums/browser-permission.d.ts +22 -0
  107. package/types/enums/deployment-status.d.ts +1 -0
  108. package/types/enums/frameworks.d.ts +17 -0
  109. package/types/enums/order-by.d.ts +4 -0
  110. package/types/enums/resources.d.ts +13 -0
  111. package/types/enums/roles.d.ts +7 -0
  112. package/types/enums/runtimes.d.ts +66 -0
  113. package/types/enums/scopes.d.ts +65 -0
  114. package/types/enums/services.d.ts +5 -0
  115. package/types/enums/use-cases.d.ts +11 -0
  116. package/types/index.d.ts +9 -1
  117. package/types/models.d.ts +341 -1
  118. package/types/services/account.d.ts +111 -0
  119. package/types/services/avatars.d.ts +5 -4
  120. package/types/services/backups.d.ts +13 -12
  121. package/types/services/console.d.ts +1 -13
  122. package/types/services/databases.d.ts +303 -8
  123. package/types/services/functions.d.ts +18 -15
  124. package/types/services/health.d.ts +2 -0
  125. package/types/services/migrations.d.ts +33 -32
  126. package/types/services/organizations.d.ts +161 -17
  127. package/types/services/projects.d.ts +13 -12
  128. package/types/services/sites.d.ts +9 -7
  129. package/types/services/tables-db.d.ts +305 -8
  130. package/types/services/teams.d.ts +9 -8
  131. package/src/enums/billing-plan.ts +0 -17
  132. package/types/enums/billing-plan.d.ts +0 -17
@@ -0,0 +1,13 @@
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.listRegions({
10
+ organizationId: '<ORGANIZATION_ID>'
11
+ });
12
+
13
+ console.log(result);
@@ -0,0 +1,17 @@
1
+ import { Client, Organizations, Scopes } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.updateKey({
10
+ organizationId: '<ORGANIZATION_ID>',
11
+ keyId: '<KEY_ID>',
12
+ name: '<NAME>',
13
+ scopes: [Scopes.PlatformsRead],
14
+ expire: '' // optional
15
+ });
16
+
17
+ console.log(result);
@@ -1,4 +1,4 @@
1
- import { Client, Organizations, BillingPlan } from "@appwrite.io/console";
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -8,7 +8,7 @@ const organizations = new Organizations(client);
8
8
 
9
9
  const result = await organizations.updatePlan({
10
10
  organizationId: '<ORGANIZATION_ID>',
11
- billingPlan: BillingPlan.Tier0,
11
+ billingPlan: 'tier-0',
12
12
  paymentMethodId: '<PAYMENT_METHOD_ID>', // optional
13
13
  billingAddressId: '<BILLING_ADDRESS_ID>', // optional
14
14
  invites: [], // optional
@@ -1,4 +1,4 @@
1
- import { Client, Projects } from "@appwrite.io/console";
1
+ import { Client, Projects, Scopes } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -8,7 +8,7 @@ const projects = new Projects(client);
8
8
 
9
9
  const result = await projects.createJWT({
10
10
  projectId: '<PROJECT_ID>',
11
- scopes: [],
11
+ scopes: [Scopes.SessionsWrite],
12
12
  duration: 0 // optional
13
13
  });
14
14
 
@@ -1,4 +1,4 @@
1
- import { Client, Projects } from "@appwrite.io/console";
1
+ import { Client, Projects, Scopes } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -9,7 +9,7 @@ const projects = new Projects(client);
9
9
  const result = await projects.createKey({
10
10
  projectId: '<PROJECT_ID>',
11
11
  name: '<NAME>',
12
- scopes: [],
12
+ scopes: [Scopes.SessionsWrite],
13
13
  expire: '' // optional
14
14
  });
15
15
 
@@ -1,4 +1,4 @@
1
- import { Client, Projects } from "@appwrite.io/console";
1
+ import { Client, Projects, Scopes } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -10,7 +10,7 @@ const result = await projects.updateKey({
10
10
  projectId: '<PROJECT_ID>',
11
11
  keyId: '<KEY_ID>',
12
12
  name: '<NAME>',
13
- scopes: [],
13
+ scopes: [Scopes.SessionsWrite],
14
14
  expire: '' // optional
15
15
  });
16
16
 
@@ -1,4 +1,4 @@
1
- import { Client, Sites } from "@appwrite.io/console";
1
+ import { Client, Sites, Frameworks, UseCases } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -7,8 +7,8 @@ const client = new Client()
7
7
  const sites = new Sites(client);
8
8
 
9
9
  const result = await sites.listTemplates({
10
- frameworks: [], // optional
11
- useCases: [], // optional
10
+ frameworks: [Frameworks.Analog], // optional
11
+ useCases: [UseCases.Portfolio], // optional
12
12
  limit: 1, // optional
13
13
  offset: 0 // optional
14
14
  });
@@ -1,4 +1,4 @@
1
- import { Client, TablesDB, IndexType } from "@appwrite.io/console";
1
+ import { Client, TablesDB, IndexType, OrderBy } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -12,7 +12,7 @@ const result = await tablesDB.createIndex({
12
12
  key: '',
13
13
  type: IndexType.Key,
14
14
  columns: [],
15
- orders: [], // optional
15
+ orders: [OrderBy.Asc], // optional
16
16
  lengths: [] // optional
17
17
  });
18
18
 
@@ -0,0 +1,18 @@
1
+ import { Client, TablesDB } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const tablesDB = new TablesDB(client);
8
+
9
+ const result = await tablesDB.createLongtextColumn({
10
+ databaseId: '<DATABASE_ID>',
11
+ tableId: '<TABLE_ID>',
12
+ key: '',
13
+ required: false,
14
+ default: '<DEFAULT>', // optional
15
+ array: false // optional
16
+ });
17
+
18
+ console.log(result);
@@ -0,0 +1,18 @@
1
+ import { Client, TablesDB } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const tablesDB = new TablesDB(client);
8
+
9
+ const result = await tablesDB.createMediumtextColumn({
10
+ databaseId: '<DATABASE_ID>',
11
+ tableId: '<TABLE_ID>',
12
+ key: '',
13
+ required: false,
14
+ default: '<DEFAULT>', // optional
15
+ array: false // optional
16
+ });
17
+
18
+ console.log(result);
@@ -0,0 +1,18 @@
1
+ import { Client, TablesDB } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const tablesDB = new TablesDB(client);
8
+
9
+ const result = await tablesDB.createTextColumn({
10
+ databaseId: '<DATABASE_ID>',
11
+ tableId: '<TABLE_ID>',
12
+ key: '',
13
+ required: false,
14
+ default: '<DEFAULT>', // optional
15
+ array: false // optional
16
+ });
17
+
18
+ console.log(result);
@@ -0,0 +1,19 @@
1
+ import { Client, TablesDB } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const tablesDB = new TablesDB(client);
8
+
9
+ const result = await tablesDB.createVarcharColumn({
10
+ databaseId: '<DATABASE_ID>',
11
+ tableId: '<TABLE_ID>',
12
+ key: '',
13
+ size: 1,
14
+ required: false,
15
+ default: '<DEFAULT>', // optional
16
+ array: false // optional
17
+ });
18
+
19
+ console.log(result);
@@ -0,0 +1,18 @@
1
+ import { Client, TablesDB } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const tablesDB = new TablesDB(client);
8
+
9
+ const result = await tablesDB.updateLongtextColumn({
10
+ databaseId: '<DATABASE_ID>',
11
+ tableId: '<TABLE_ID>',
12
+ key: '',
13
+ required: false,
14
+ default: '<DEFAULT>',
15
+ newKey: '' // optional
16
+ });
17
+
18
+ console.log(result);
@@ -0,0 +1,18 @@
1
+ import { Client, TablesDB } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const tablesDB = new TablesDB(client);
8
+
9
+ const result = await tablesDB.updateMediumtextColumn({
10
+ databaseId: '<DATABASE_ID>',
11
+ tableId: '<TABLE_ID>',
12
+ key: '',
13
+ required: false,
14
+ default: '<DEFAULT>',
15
+ newKey: '' // optional
16
+ });
17
+
18
+ console.log(result);
@@ -9,7 +9,7 @@ const tablesDB = new TablesDB(client);
9
9
  const result = await tablesDB.updateTable({
10
10
  databaseId: '<DATABASE_ID>',
11
11
  tableId: '<TABLE_ID>',
12
- name: '<NAME>',
12
+ name: '<NAME>', // optional
13
13
  permissions: [Permission.read(Role.any())], // optional
14
14
  rowSecurity: false, // optional
15
15
  enabled: false // optional
@@ -0,0 +1,18 @@
1
+ import { Client, TablesDB } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const tablesDB = new TablesDB(client);
8
+
9
+ const result = await tablesDB.updateTextColumn({
10
+ databaseId: '<DATABASE_ID>',
11
+ tableId: '<TABLE_ID>',
12
+ key: '',
13
+ required: false,
14
+ default: '<DEFAULT>',
15
+ newKey: '' // optional
16
+ });
17
+
18
+ console.log(result);
@@ -0,0 +1,19 @@
1
+ import { Client, TablesDB } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const tablesDB = new TablesDB(client);
8
+
9
+ const result = await tablesDB.updateVarcharColumn({
10
+ databaseId: '<DATABASE_ID>',
11
+ tableId: '<TABLE_ID>',
12
+ key: '',
13
+ required: false,
14
+ default: '<DEFAULT>',
15
+ size: 1, // optional
16
+ newKey: '' // optional
17
+ });
18
+
19
+ console.log(result);
@@ -8,7 +8,7 @@ const tablesDB = new TablesDB(client);
8
8
 
9
9
  const result = await tablesDB.update({
10
10
  databaseId: '<DATABASE_ID>',
11
- name: '<NAME>',
11
+ name: '<NAME>', // optional
12
12
  enabled: false // optional
13
13
  });
14
14
 
@@ -1,4 +1,4 @@
1
- import { Client, Teams } from "@appwrite.io/console";
1
+ import { Client, Teams, Roles } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -8,7 +8,7 @@ const teams = new Teams(client);
8
8
 
9
9
  const result = await teams.createMembership({
10
10
  teamId: '<TEAM_ID>',
11
- roles: [],
11
+ roles: [Roles.Developer],
12
12
  email: 'email@example.com', // optional
13
13
  userId: '<USER_ID>', // optional
14
14
  phone: '+12065550100', // optional
@@ -1,4 +1,4 @@
1
- import { Client, Teams } from "@appwrite.io/console";
1
+ import { Client, Teams, Roles } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -9,7 +9,7 @@ const teams = new Teams(client);
9
9
  const result = await teams.updateMembership({
10
10
  teamId: '<TEAM_ID>',
11
11
  membershipId: '<MEMBERSHIP_ID>',
12
- roles: []
12
+ roles: [Roles.Developer]
13
13
  });
14
14
 
15
15
  console.log(result);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@appwrite.io/console",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
5
- "version": "2.1.3",
5
+ "version": "2.2.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/src/channel.ts CHANGED
@@ -112,21 +112,25 @@ export class Channel<T> {
112
112
  }
113
113
 
114
114
  // Global events
115
- static get documents(): string {
115
+ static documents(): string {
116
116
  return "documents";
117
117
  }
118
118
 
119
- static get rows(): string {
119
+ static rows(): string {
120
120
  return "rows";
121
121
  }
122
122
 
123
- static get files(): string {
123
+ static files(): string {
124
124
  return "files";
125
125
  }
126
126
 
127
- static get executions(): string {
127
+ static executions(): string {
128
128
  return "executions";
129
129
  }
130
+
131
+ static teams(): string {
132
+ return "teams";
133
+ }
130
134
  }
131
135
 
132
136
  // Export types for backward compatibility with realtime
package/src/client.ts CHANGED
@@ -5,51 +5,26 @@ import BigNumber from 'bignumber.js';
5
5
  const JSONbigParser = JSONbigModule({ storeAsString: false });
6
6
  const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });
7
7
 
8
- /**
9
- * Converts BigNumber objects from json-bigint to native types.
10
- * - Integer BigNumbers → BigInt (if unsafe) or number (if safe)
11
- * - Float BigNumbers → number
12
- * - Strings remain strings (never converted to BigNumber by json-bigint)
13
- */
14
8
  const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
15
9
  const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
16
10
 
17
- function convertBigNumbers(value: any): any {
18
- if (value === null || value === undefined) return value;
19
-
20
- if (Array.isArray(value)) {
21
- return value.map(convertBigNumbers);
22
- }
23
-
11
+ function reviver(_key: string, value: any): any {
24
12
  if (BigNumber.isBigNumber(value)) {
25
13
  if (value.isInteger()) {
26
14
  const str = value.toFixed();
27
15
  const bi = BigInt(str);
28
-
29
16
  if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
30
17
  return Number(str);
31
18
  }
32
-
33
19
  return bi;
34
20
  }
35
-
36
- // float
37
21
  return value.toNumber();
38
22
  }
39
-
40
- if (typeof value === 'object') {
41
- const result: any = {};
42
- for (const [k, v] of Object.entries(value)) {
43
- result[k] = convertBigNumbers(v);
44
- }
45
- return result;
46
- }
47
-
48
23
  return value;
49
24
  }
50
25
 
51
26
  const JSONbig = {
52
- parse: (text: string) => convertBigNumbers(JSONbigParser.parse(text)),
27
+ parse: (text: string) => JSONbigParser.parse(text, reviver),
53
28
  stringify: JSONbigSerializer.stringify
54
29
  };
55
30
 
@@ -385,7 +360,7 @@ class Client {
385
360
  'x-sdk-name': 'Console',
386
361
  'x-sdk-platform': 'console',
387
362
  'x-sdk-language': 'web',
388
- 'x-sdk-version': '2.1.3',
363
+ 'x-sdk-version': '2.2.0',
389
364
  'X-Appwrite-Response-Format': '1.8.0',
390
365
  };
391
366
 
@@ -0,0 +1,22 @@
1
+ export enum BrowserPermission {
2
+ Geolocation = 'geolocation',
3
+ Camera = 'camera',
4
+ Microphone = 'microphone',
5
+ Notifications = 'notifications',
6
+ Midi = 'midi',
7
+ Push = 'push',
8
+ Clipboardread = 'clipboard-read',
9
+ Clipboardwrite = 'clipboard-write',
10
+ Paymenthandler = 'payment-handler',
11
+ Usb = 'usb',
12
+ Bluetooth = 'bluetooth',
13
+ Accelerometer = 'accelerometer',
14
+ Gyroscope = 'gyroscope',
15
+ Magnetometer = 'magnetometer',
16
+ Ambientlightsensor = 'ambient-light-sensor',
17
+ Backgroundsync = 'background-sync',
18
+ Persistentstorage = 'persistent-storage',
19
+ Screenwakelock = 'screen-wake-lock',
20
+ Webshare = 'web-share',
21
+ Xrspatialtracking = 'xr-spatial-tracking',
22
+ }
@@ -3,5 +3,6 @@ export enum DeploymentStatus {
3
3
  Processing = 'processing',
4
4
  Building = 'building',
5
5
  Ready = 'ready',
6
+ Canceled = 'canceled',
6
7
  Failed = 'failed',
7
8
  }
@@ -0,0 +1,17 @@
1
+ export enum Frameworks {
2
+ Analog = 'analog',
3
+ Angular = 'angular',
4
+ Nextjs = 'nextjs',
5
+ React = 'react',
6
+ Nuxt = 'nuxt',
7
+ Vue = 'vue',
8
+ Sveltekit = 'sveltekit',
9
+ Astro = 'astro',
10
+ Tanstackstart = 'tanstack-start',
11
+ Remix = 'remix',
12
+ Lynx = 'lynx',
13
+ Flutter = 'flutter',
14
+ Reactnative = 'react-native',
15
+ Vite = 'vite',
16
+ Other = 'other',
17
+ }
@@ -0,0 +1,4 @@
1
+ export enum OrderBy {
2
+ Asc = 'asc',
3
+ Desc = 'desc',
4
+ }
@@ -0,0 +1,13 @@
1
+ export enum Resources {
2
+ User = 'user',
3
+ Database = 'database',
4
+ Table = 'table',
5
+ Column = 'column',
6
+ Index = 'index',
7
+ Row = 'row',
8
+ Document = 'document',
9
+ Attribute = 'attribute',
10
+ Collection = 'collection',
11
+ Bucket = 'bucket',
12
+ File = 'file',
13
+ }
@@ -0,0 +1,7 @@
1
+ export enum Roles {
2
+ Developer = 'developer',
3
+ Editor = 'editor',
4
+ Analyst = 'analyst',
5
+ Billing = 'billing',
6
+ Owner = 'owner',
7
+ }
@@ -0,0 +1,66 @@
1
+ export enum Runtimes {
2
+ Node145 = 'node-14.5',
3
+ Node160 = 'node-16.0',
4
+ Node180 = 'node-18.0',
5
+ Node190 = 'node-19.0',
6
+ Node200 = 'node-20.0',
7
+ Node210 = 'node-21.0',
8
+ Node22 = 'node-22',
9
+ Php80 = 'php-8.0',
10
+ Php81 = 'php-8.1',
11
+ Php82 = 'php-8.2',
12
+ Php83 = 'php-8.3',
13
+ Ruby30 = 'ruby-3.0',
14
+ Ruby31 = 'ruby-3.1',
15
+ Ruby32 = 'ruby-3.2',
16
+ Ruby33 = 'ruby-3.3',
17
+ Python38 = 'python-3.8',
18
+ Python39 = 'python-3.9',
19
+ Python310 = 'python-3.10',
20
+ Python311 = 'python-3.11',
21
+ Python312 = 'python-3.12',
22
+ Pythonml311 = 'python-ml-3.11',
23
+ Pythonml312 = 'python-ml-3.12',
24
+ Deno140 = 'deno-1.40',
25
+ Deno146 = 'deno-1.46',
26
+ Deno20 = 'deno-2.0',
27
+ Dart215 = 'dart-2.15',
28
+ Dart216 = 'dart-2.16',
29
+ Dart217 = 'dart-2.17',
30
+ Dart218 = 'dart-2.18',
31
+ Dart219 = 'dart-2.19',
32
+ Dart30 = 'dart-3.0',
33
+ Dart31 = 'dart-3.1',
34
+ Dart33 = 'dart-3.3',
35
+ Dart35 = 'dart-3.5',
36
+ Dart38 = 'dart-3.8',
37
+ Dart39 = 'dart-3.9',
38
+ Dotnet60 = 'dotnet-6.0',
39
+ Dotnet70 = 'dotnet-7.0',
40
+ Dotnet80 = 'dotnet-8.0',
41
+ Java80 = 'java-8.0',
42
+ Java110 = 'java-11.0',
43
+ Java170 = 'java-17.0',
44
+ Java180 = 'java-18.0',
45
+ Java210 = 'java-21.0',
46
+ Java22 = 'java-22',
47
+ Swift55 = 'swift-5.5',
48
+ Swift58 = 'swift-5.8',
49
+ Swift59 = 'swift-5.9',
50
+ Swift510 = 'swift-5.10',
51
+ Kotlin16 = 'kotlin-1.6',
52
+ Kotlin18 = 'kotlin-1.8',
53
+ Kotlin19 = 'kotlin-1.9',
54
+ Kotlin20 = 'kotlin-2.0',
55
+ Cpp17 = 'cpp-17',
56
+ Cpp20 = 'cpp-20',
57
+ Bun10 = 'bun-1.0',
58
+ Bun11 = 'bun-1.1',
59
+ Go123 = 'go-1.23',
60
+ Static1 = 'static-1',
61
+ Flutter324 = 'flutter-3.24',
62
+ Flutter327 = 'flutter-3.27',
63
+ Flutter329 = 'flutter-3.29',
64
+ Flutter332 = 'flutter-3.32',
65
+ Flutter335 = 'flutter-3.35',
66
+ }
@@ -0,0 +1,65 @@
1
+ export enum Scopes {
2
+ SessionsWrite = 'sessions.write',
3
+ UsersRead = 'users.read',
4
+ UsersWrite = 'users.write',
5
+ TeamsRead = 'teams.read',
6
+ TeamsWrite = 'teams.write',
7
+ DatabasesRead = 'databases.read',
8
+ DatabasesWrite = 'databases.write',
9
+ CollectionsRead = 'collections.read',
10
+ CollectionsWrite = 'collections.write',
11
+ TablesRead = 'tables.read',
12
+ TablesWrite = 'tables.write',
13
+ AttributesRead = 'attributes.read',
14
+ AttributesWrite = 'attributes.write',
15
+ ColumnsRead = 'columns.read',
16
+ ColumnsWrite = 'columns.write',
17
+ IndexesRead = 'indexes.read',
18
+ IndexesWrite = 'indexes.write',
19
+ DocumentsRead = 'documents.read',
20
+ DocumentsWrite = 'documents.write',
21
+ RowsRead = 'rows.read',
22
+ RowsWrite = 'rows.write',
23
+ FilesRead = 'files.read',
24
+ FilesWrite = 'files.write',
25
+ BucketsRead = 'buckets.read',
26
+ BucketsWrite = 'buckets.write',
27
+ FunctionsRead = 'functions.read',
28
+ FunctionsWrite = 'functions.write',
29
+ SitesRead = 'sites.read',
30
+ SitesWrite = 'sites.write',
31
+ LogRead = 'log.read',
32
+ LogWrite = 'log.write',
33
+ ExecutionRead = 'execution.read',
34
+ ExecutionWrite = 'execution.write',
35
+ LocaleRead = 'locale.read',
36
+ AvatarsRead = 'avatars.read',
37
+ HealthRead = 'health.read',
38
+ ProvidersRead = 'providers.read',
39
+ ProvidersWrite = 'providers.write',
40
+ MessagesRead = 'messages.read',
41
+ MessagesWrite = 'messages.write',
42
+ TopicsRead = 'topics.read',
43
+ TopicsWrite = 'topics.write',
44
+ SubscribersRead = 'subscribers.read',
45
+ SubscribersWrite = 'subscribers.write',
46
+ TargetsRead = 'targets.read',
47
+ TargetsWrite = 'targets.write',
48
+ RulesRead = 'rules.read',
49
+ RulesWrite = 'rules.write',
50
+ MigrationsRead = 'migrations.read',
51
+ MigrationsWrite = 'migrations.write',
52
+ VcsRead = 'vcs.read',
53
+ VcsWrite = 'vcs.write',
54
+ AssistantRead = 'assistant.read',
55
+ TokensRead = 'tokens.read',
56
+ TokensWrite = 'tokens.write',
57
+ PoliciesWrite = 'policies.write',
58
+ PoliciesRead = 'policies.read',
59
+ ArchivesRead = 'archives.read',
60
+ ArchivesWrite = 'archives.write',
61
+ RestorationsRead = 'restorations.read',
62
+ RestorationsWrite = 'restorations.write',
63
+ DomainsRead = 'domains.read',
64
+ DomainsWrite = 'domains.write',
65
+ }
@@ -0,0 +1,5 @@
1
+ export enum Services {
2
+ Databases = 'databases',
3
+ Functions = 'functions',
4
+ Storage = 'storage',
5
+ }