@appwrite.io/console 1.8.0 → 1.10.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 (105) hide show
  1. package/.github/workflows/publish.yml +1 -1
  2. package/CHANGELOG.md +45 -6
  3. package/README.md +82 -2
  4. package/dist/cjs/sdk.js +532 -200
  5. package/dist/cjs/sdk.js.map +1 -1
  6. package/dist/esm/sdk.js +533 -201
  7. package/dist/esm/sdk.js.map +1 -1
  8. package/dist/iife/sdk.js +532 -200
  9. package/docs/examples/databases/create-document.md +1 -3
  10. package/docs/examples/databases/create-documents.md +1 -1
  11. package/docs/examples/databases/decrement-document-attribute.md +18 -0
  12. package/docs/examples/databases/increment-document-attribute.md +18 -0
  13. package/docs/examples/databases/upsert-documents.md +1 -1
  14. package/docs/examples/domains/create-record-a-a-a-a.md +1 -1
  15. package/docs/examples/domains/create-record-a.md +1 -1
  16. package/docs/examples/domains/create-record-alias.md +1 -1
  17. package/docs/examples/domains/create-record-c-a-a.md +1 -1
  18. package/docs/examples/domains/create-record-c-n-a-m-e.md +1 -1
  19. package/docs/examples/domains/create-record-h-t-t-p-s.md +1 -1
  20. package/docs/examples/domains/create-record-m-x.md +1 -1
  21. package/docs/examples/domains/create-record-n-s.md +1 -1
  22. package/docs/examples/domains/create-record-s-r-v.md +1 -1
  23. package/docs/examples/domains/create-record-t-x-t.md +1 -1
  24. package/docs/examples/domains/update-record-a-a-a-a.md +1 -1
  25. package/docs/examples/domains/update-record-a.md +1 -1
  26. package/docs/examples/domains/update-record-alias.md +1 -1
  27. package/docs/examples/domains/update-record-c-a-a.md +1 -1
  28. package/docs/examples/domains/update-record-c-n-a-m-e.md +1 -1
  29. package/docs/examples/domains/update-record-h-t-t-p-s.md +1 -1
  30. package/docs/examples/domains/update-record-m-x.md +1 -1
  31. package/docs/examples/domains/update-record-n-s.md +1 -1
  32. package/docs/examples/domains/update-record-s-r-v.md +1 -1
  33. package/docs/examples/domains/update-record-t-x-t.md +1 -1
  34. package/docs/examples/functions/create-execution.md +1 -1
  35. package/docs/examples/health/{get-queue-stats-usage-dump.md → get-queue-billing-project-aggregation.md} +2 -2
  36. package/docs/examples/health/{get-queue-billing-aggregation.md → get-queue-billing-team-aggregation.md} +1 -1
  37. package/docs/examples/organizations/cancel-downgrade.md +13 -0
  38. package/docs/examples/organizations/estimation-create-organization.md +16 -0
  39. package/docs/examples/organizations/estimation-delete-organization.md +13 -0
  40. package/docs/examples/organizations/estimation-update-plan.md +16 -0
  41. package/docs/examples/organizations/get-available-credits.md +13 -0
  42. package/docs/examples/organizations/get-usage.md +1 -1
  43. package/docs/examples/organizations/update-projects.md +14 -0
  44. package/docs/examples/organizations/validate-payment.md +14 -0
  45. package/docs/examples/proxy/create-redirect-rule.md +4 -2
  46. package/docs/examples/vcs/get-repository-contents.md +2 -1
  47. package/package.json +1 -1
  48. package/src/client.ts +5 -4
  49. package/src/enums/build-runtime.ts +2 -0
  50. package/src/enums/image-format.ts +1 -0
  51. package/src/enums/proxy-resource-type.ts +4 -0
  52. package/src/enums/runtime.ts +2 -0
  53. package/src/index.ts +1 -0
  54. package/src/models.ts +513 -11
  55. package/src/services/account.ts +97 -36
  56. package/src/services/avatars.ts +26 -20
  57. package/src/services/backups.ts +11 -0
  58. package/src/services/console.ts +8 -1
  59. package/src/services/databases.ts +190 -31
  60. package/src/services/domains.ts +111 -69
  61. package/src/services/functions.ts +37 -8
  62. package/src/services/graphql.ts +1 -0
  63. package/src/services/health.ts +54 -4
  64. package/src/services/locale.ts +9 -2
  65. package/src/services/messaging.ts +53 -8
  66. package/src/services/migrations.ts +12 -0
  67. package/src/services/organizations.ts +301 -14
  68. package/src/services/project.ts +5 -0
  69. package/src/services/projects.ts +50 -0
  70. package/src/services/proxy.ts +23 -1
  71. package/src/services/sites.ts +32 -4
  72. package/src/services/storage.ts +23 -9
  73. package/src/services/teams.ts +30 -17
  74. package/src/services/tokens.ts +4 -0
  75. package/src/services/users.ts +69 -27
  76. package/src/services/vcs.ts +16 -4
  77. package/types/enums/build-runtime.d.ts +3 -1
  78. package/types/enums/image-format.d.ts +2 -1
  79. package/types/enums/proxy-resource-type.d.ts +4 -0
  80. package/types/enums/runtime.d.ts +3 -1
  81. package/types/index.d.ts +1 -0
  82. package/types/models.d.ts +494 -188
  83. package/types/services/account.d.ts +36 -36
  84. package/types/services/avatars.d.ts +20 -20
  85. package/types/services/console.d.ts +1 -1
  86. package/types/services/databases.d.ts +67 -31
  87. package/types/services/domains.d.ts +69 -69
  88. package/types/services/functions.d.ts +8 -8
  89. package/types/services/health.d.ts +11 -3
  90. package/types/services/locale.d.ts +2 -2
  91. package/types/services/messaging.d.ts +8 -8
  92. package/types/services/organizations.d.ts +88 -14
  93. package/types/services/proxy.d.ts +4 -1
  94. package/types/services/sites.d.ts +4 -4
  95. package/types/services/storage.d.ts +9 -9
  96. package/types/services/teams.d.ts +17 -17
  97. package/types/services/users.d.ts +27 -27
  98. package/types/services/vcs.d.ts +4 -4
  99. package/docs/examples/functions/create-build.md +0 -15
  100. package/docs/examples/functions/get-function-usage.md +0 -14
  101. package/docs/examples/functions/update-deployment-build.md +0 -14
  102. package/docs/examples/functions/update-deployment.md +0 -14
  103. package/docs/examples/proxy/create-rule.md +0 -15
  104. package/src/enums/resource-type.ts +0 -4
  105. package/types/enums/resource-type.d.ts +0 -4
@@ -2,9 +2,7 @@ import { Client, Databases } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
- .setSession('') //
6
- .setKey('<YOUR_API_KEY>') // Your secret API key
7
- .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
8
6
 
9
7
  const databases = new Databases(client);
10
8
 
@@ -2,7 +2,7 @@ import { Client, Databases } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
- .setKey('<YOUR_API_KEY>'); // Your secret API key
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const databases = new Databases(client);
8
8
 
@@ -0,0 +1,18 @@
1
+ import { Client, Databases } 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 databases = new Databases(client);
8
+
9
+ const result = await databases.decrementDocumentAttribute(
10
+ '<DATABASE_ID>', // databaseId
11
+ '<COLLECTION_ID>', // collectionId
12
+ '<DOCUMENT_ID>', // documentId
13
+ '', // attribute
14
+ null, // value (optional)
15
+ null // min (optional)
16
+ );
17
+
18
+ console.log(result);
@@ -0,0 +1,18 @@
1
+ import { Client, Databases } 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 databases = new Databases(client);
8
+
9
+ const result = await databases.incrementDocumentAttribute(
10
+ '<DATABASE_ID>', // databaseId
11
+ '<COLLECTION_ID>', // collectionId
12
+ '<DOCUMENT_ID>', // documentId
13
+ '', // attribute
14
+ null, // value (optional)
15
+ null // max (optional)
16
+ );
17
+
18
+ console.log(result);
@@ -9,7 +9,7 @@ const databases = new Databases(client);
9
9
  const result = await databases.upsertDocuments(
10
10
  '<DATABASE_ID>', // databaseId
11
11
  '<COLLECTION_ID>', // collectionId
12
- [] // documents (optional)
12
+ [] // documents
13
13
  );
14
14
 
15
15
  console.log(result);
@@ -10,7 +10,7 @@ const result = await domains.createRecordAAAA(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
12
  '', // value
13
- null, // ttl
13
+ 1, // ttl
14
14
  '<COMMENT>' // comment (optional)
15
15
  );
16
16
 
@@ -10,7 +10,7 @@ const result = await domains.createRecordA(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
12
  '', // value
13
- null, // ttl
13
+ 1, // ttl
14
14
  '<COMMENT>' // comment (optional)
15
15
  );
16
16
 
@@ -10,7 +10,7 @@ const result = await domains.createRecordAlias(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
12
  '<VALUE>', // value
13
- null, // ttl
13
+ 1, // ttl
14
14
  '<COMMENT>' // comment (optional)
15
15
  );
16
16
 
@@ -10,7 +10,7 @@ const result = await domains.createRecordCAA(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
12
  '<VALUE>', // value
13
- null, // ttl
13
+ 1, // ttl
14
14
  '<COMMENT>' // comment (optional)
15
15
  );
16
16
 
@@ -10,7 +10,7 @@ const result = await domains.createRecordCNAME(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
12
  '<VALUE>', // value
13
- null, // ttl
13
+ 1, // ttl
14
14
  '<COMMENT>' // comment (optional)
15
15
  );
16
16
 
@@ -10,7 +10,7 @@ const result = await domains.createRecordHTTPS(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
12
  '<VALUE>', // value
13
- null, // ttl
13
+ 1, // ttl
14
14
  '<COMMENT>' // comment (optional)
15
15
  );
16
16
 
@@ -10,7 +10,7 @@ const result = await domains.createRecordMX(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
12
  '<VALUE>', // value
13
- null, // ttl
13
+ 1, // ttl
14
14
  null, // priority
15
15
  '<COMMENT>' // comment (optional)
16
16
  );
@@ -10,7 +10,7 @@ const result = await domains.createRecordNS(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
12
  '<VALUE>', // value
13
- null, // ttl
13
+ 1, // ttl
14
14
  '<COMMENT>' // comment (optional)
15
15
  );
16
16
 
@@ -10,7 +10,7 @@ const result = await domains.createRecordSRV(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
12
  '<VALUE>', // value
13
- null, // ttl
13
+ 1, // ttl
14
14
  null, // priority
15
15
  null, // weight
16
16
  null, // port
@@ -9,7 +9,7 @@ const domains = new Domains(client);
9
9
  const result = await domains.createRecordTXT(
10
10
  '<DOMAIN_ID>', // domainId
11
11
  '<NAME>', // name
12
- null, // ttl
12
+ 1, // ttl
13
13
  '<VALUE>', // value (optional)
14
14
  '<COMMENT>' // comment (optional)
15
15
  );
@@ -11,7 +11,7 @@ const result = await domains.updateRecordAAAA(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  '<COMMENT>' // comment (optional)
16
16
  );
17
17
 
@@ -11,7 +11,7 @@ const result = await domains.updateRecordA(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  '<COMMENT>' // comment (optional)
16
16
  );
17
17
 
@@ -11,7 +11,7 @@ const result = await domains.updateRecordAlias(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '<VALUE>', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  '<COMMENT>' // comment (optional)
16
16
  );
17
17
 
@@ -11,7 +11,7 @@ const result = await domains.updateRecordCAA(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '<VALUE>', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  '<COMMENT>' // comment (optional)
16
16
  );
17
17
 
@@ -11,7 +11,7 @@ const result = await domains.updateRecordCNAME(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '<VALUE>', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  '<COMMENT>' // comment (optional)
16
16
  );
17
17
 
@@ -11,7 +11,7 @@ const result = await domains.updateRecordHTTPS(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '<VALUE>', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  '<COMMENT>' // comment (optional)
16
16
  );
17
17
 
@@ -11,7 +11,7 @@ const result = await domains.updateRecordMX(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '<VALUE>', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  null, // priority
16
16
  '<COMMENT>' // comment (optional)
17
17
  );
@@ -11,7 +11,7 @@ const result = await domains.updateRecordNS(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '<VALUE>', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  '<COMMENT>' // comment (optional)
16
16
  );
17
17
 
@@ -11,7 +11,7 @@ const result = await domains.updateRecordSRV(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '<VALUE>', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  null, // priority
16
16
  null, // weight
17
17
  null, // port
@@ -11,7 +11,7 @@ const result = await domains.updateRecordTXT(
11
11
  '<RECORD_ID>', // recordId
12
12
  '<NAME>', // name
13
13
  '<VALUE>', // value
14
- null, // ttl
14
+ 1, // ttl
15
15
  '<COMMENT>' // comment (optional)
16
16
  );
17
17
 
@@ -13,7 +13,7 @@ const result = await functions.createExecution(
13
13
  '<PATH>', // path (optional)
14
14
  ExecutionMethod.GET, // method (optional)
15
15
  {}, // headers (optional)
16
- '' // scheduledAt (optional)
16
+ '<SCHEDULED_AT>' // scheduledAt (optional)
17
17
  );
18
18
 
19
19
  console.log(result);
@@ -1,12 +1,12 @@
1
1
  import { Client, Health } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const health = new Health(client);
8
8
 
9
- const result = await health.getQueueStatsUsageDump(
9
+ const result = await health.getQueueBillingProjectAggregation(
10
10
  null // threshold (optional)
11
11
  );
12
12
 
@@ -6,7 +6,7 @@ const client = new Client()
6
6
 
7
7
  const health = new Health(client);
8
8
 
9
- const result = await health.getQueueBillingAggregation(
9
+ const result = await health.getQueueBillingTeamAggregation(
10
10
  null // threshold (optional)
11
11
  );
12
12
 
@@ -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.cancelDowngrade(
10
+ '<ORGANIZATION_ID>' // organizationId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,16 @@
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.estimationCreateOrganization(
10
+ .Tier0, // billingPlan
11
+ '<PAYMENT_METHOD_ID>', // paymentMethodId (optional)
12
+ [], // invites (optional)
13
+ '<COUPON_ID>' // couponId (optional)
14
+ );
15
+
16
+ console.log(result);
@@ -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.estimationDeleteOrganization(
10
+ '<ORGANIZATION_ID>' // organizationId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,16 @@
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.estimationUpdatePlan(
10
+ '<ORGANIZATION_ID>', // organizationId
11
+ .Tier0, // billingPlan
12
+ [], // invites (optional)
13
+ '<COUPON_ID>' // couponId (optional)
14
+ );
15
+
16
+ console.log(result);
@@ -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.getAvailableCredits(
10
+ '<ORGANIZATION_ID>' // organizationId
11
+ );
12
+
13
+ console.log(result);
@@ -1,7 +1,7 @@
1
1
  import { Client, Organizations } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
- .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
4
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
7
  const organizations = new Organizations(client);
@@ -0,0 +1,14 @@
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.updateProjects(
10
+ '<ORGANIZATION_ID>', // organizationId
11
+ [] // projects (optional)
12
+ );
13
+
14
+ console.log(result);
@@ -0,0 +1,14 @@
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.validatePayment(
10
+ '<ORGANIZATION_ID>', // organizationId
11
+ [] // invites (optional)
12
+ );
13
+
14
+ console.log(result);
@@ -1,4 +1,4 @@
1
- import { Client, Proxy, } from "@appwrite.io/console";
1
+ import { Client, Proxy, , ProxyResourceType } 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,9 @@ const proxy = new Proxy(client);
9
9
  const result = await proxy.createRedirectRule(
10
10
  '', // domain
11
11
  'https://example.com', // url
12
- .MovedPermanently301 // statusCode
12
+ .MovedPermanently301, // statusCode
13
+ '<RESOURCE_ID>', // resourceId
14
+ ProxyResourceType.Site // resourceType
13
15
  );
14
16
 
15
17
  console.log(result);
@@ -9,7 +9,8 @@ const vcs = new Vcs(client);
9
9
  const result = await vcs.getRepositoryContents(
10
10
  '<INSTALLATION_ID>', // installationId
11
11
  '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId
12
- '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional)
12
+ '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional)
13
+ '<PROVIDER_REFERENCE>' // providerReference (optional)
13
14
  );
14
15
 
15
16
  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 abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5
- "version": "1.8.0",
5
+ "version": "1.10.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/src/client.ts CHANGED
@@ -316,7 +316,7 @@ class Client {
316
316
  'x-sdk-name': 'Console',
317
317
  'x-sdk-platform': 'console',
318
318
  'x-sdk-language': 'web',
319
- 'x-sdk-version': '1.8.0',
319
+ 'x-sdk-version': '1.10.0',
320
320
  'X-Appwrite-Response-Format': '1.7.0',
321
321
  };
322
322
 
@@ -677,9 +677,9 @@ class Client {
677
677
  }
678
678
 
679
679
  async chunkedUpload(method: string, url: URL, headers: Headers = {}, originalPayload: Payload = {}, onProgress: (progress: UploadProgress) => void) {
680
- const file = Object.values(originalPayload).find((value) => value instanceof File);
680
+ const [fileParam, file] = Object.entries(originalPayload).find(([_, value]) => value instanceof File) ?? [];
681
681
 
682
- if (!file) {
682
+ if (!file || !fileParam) {
683
683
  throw new Error('File not found in payload');
684
684
  }
685
685
 
@@ -699,7 +699,8 @@ class Client {
699
699
  headers['content-range'] = `bytes ${start}-${end-1}/${file.size}`;
700
700
  const chunk = file.slice(start, end);
701
701
 
702
- let payload = { ...originalPayload, file: new File([chunk], file.name)};
702
+ let payload = { ...originalPayload };
703
+ payload[fileParam] = new File([chunk], file.name);
703
704
 
704
705
  response = await this.call(method, url, headers, payload);
705
706
 
@@ -33,6 +33,7 @@ export enum BuildRuntime {
33
33
  Dart31 = 'dart-3.1',
34
34
  Dart33 = 'dart-3.3',
35
35
  Dart35 = 'dart-3.5',
36
+ Dart38 = 'dart-3.8',
36
37
  Dotnet60 = 'dotnet-6.0',
37
38
  Dotnet70 = 'dotnet-7.0',
38
39
  Dotnet80 = 'dotnet-8.0',
@@ -59,4 +60,5 @@ export enum BuildRuntime {
59
60
  Flutter324 = 'flutter-3.24',
60
61
  Flutter327 = 'flutter-3.27',
61
62
  Flutter329 = 'flutter-3.29',
63
+ Flutter332 = 'flutter-3.32',
62
64
  }
@@ -5,4 +5,5 @@ export enum ImageFormat {
5
5
  Webp = 'webp',
6
6
  Heic = 'heic',
7
7
  Avif = 'avif',
8
+ Gif = 'gif',
8
9
  }
@@ -0,0 +1,4 @@
1
+ export enum ProxyResourceType {
2
+ Site = 'site',
3
+ Function = 'function',
4
+ }
@@ -33,6 +33,7 @@ export enum Runtime {
33
33
  Dart31 = 'dart-3.1',
34
34
  Dart33 = 'dart-3.3',
35
35
  Dart35 = 'dart-3.5',
36
+ Dart38 = 'dart-3.8',
36
37
  Dotnet60 = 'dotnet-6.0',
37
38
  Dotnet70 = 'dotnet-7.0',
38
39
  Dotnet80 = 'dotnet-8.0',
@@ -59,4 +60,5 @@ export enum Runtime {
59
60
  Flutter324 = 'flutter-3.24',
60
61
  Flutter327 = 'flutter-3.27',
61
62
  Flutter329 = 'flutter-3.29',
63
+ Flutter332 = 'flutter-3.32',
62
64
  }
package/src/index.ts CHANGED
@@ -66,6 +66,7 @@ export { EmailTemplateLocale } from './enums/email-template-locale';
66
66
  export { SmsTemplateType } from './enums/sms-template-type';
67
67
  export { SmsTemplateLocale } from './enums/sms-template-locale';
68
68
  export { StatusCode } from './enums/status-code';
69
+ export { ProxyResourceType } from './enums/proxy-resource-type';
69
70
  export { Framework } from './enums/framework';
70
71
  export { BuildRuntime } from './enums/build-runtime';
71
72
  export { Adapter } from './enums/adapter';