From 72952ef30babc50b5973b1973791a1b24f1b788c Mon Sep 17 00:00:00 2001 From: premtsd-code Date: Wed, 20 May 2026 07:50:10 +0000 Subject: [PATCH 1/4] test commit --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +test From 2b323e2d38356019eb88c85dfcbb25fd3c90e0f7 Mon Sep 17 00:00:00 2001 From: premtsd-code Date: Wed, 20 May 2026 07:51:23 +0000 Subject: [PATCH 2/4] Revert "test commit" This reverts commit 72952ef30babc50b5973b1973791a1b24f1b788c. --- test.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index 9daeafb..0000000 --- a/test.txt +++ /dev/null @@ -1 +0,0 @@ -test From 93f693a5f58aa67407ba1640f915d500df3ec900 Mon Sep 17 00:00:00 2001 From: premtsd-code Date: Wed, 20 May 2026 07:56:55 +0000 Subject: [PATCH 3/4] chore: update Node.js SDK to 25.0.1 --- CHANGELOG.md | 8 ++++++++ docs/examples/advisor/get-insight.md | 2 +- docs/examples/advisor/get-report.md | 2 +- docs/examples/advisor/list-insights.md | 2 +- docs/examples/advisor/list-reports.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/client.ts | 4 ++-- src/enums/build-runtime.ts | 3 +++ src/enums/runtime.ts | 3 +++ src/models.ts | 22 +++++++++++++--------- test/services/project.test.js | 18 ------------------ test/services/storage.test.js | 3 +++ 13 files changed, 39 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 475cf10..b436a52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 25.0.1 + +* Fixed: `BillingLimits` inner fields and `Project.billingLimits` are now optional — server emits sparse "limits crossed" map +* Fixed: `Project.consoleAccessedAt` defaults to empty string for never-accessed projects (no longer null) +* Added: `File.sizeActual` field — actual bytes used on disk after compression / encryption +* Updated: `BuildRuntime` and `Runtime` enums with `deno-1.21`, `deno-1.24`, and `deno-1.35` +* Updated: Advisor doc examples corrected to use API key auth instead of session + ## 25.0.0 * Breaking: Renamed `AuthMethod` enum to `ProjectAuthMethodId` diff --git a/docs/examples/advisor/get-insight.md b/docs/examples/advisor/get-insight.md index abec35e..7a625d2 100644 --- a/docs/examples/advisor/get-insight.md +++ b/docs/examples/advisor/get-insight.md @@ -4,7 +4,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const advisor = new sdk.Advisor(client); diff --git a/docs/examples/advisor/get-report.md b/docs/examples/advisor/get-report.md index 06bc109..abd111c 100644 --- a/docs/examples/advisor/get-report.md +++ b/docs/examples/advisor/get-report.md @@ -4,7 +4,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const advisor = new sdk.Advisor(client); diff --git a/docs/examples/advisor/list-insights.md b/docs/examples/advisor/list-insights.md index c754b65..a4adefa 100644 --- a/docs/examples/advisor/list-insights.md +++ b/docs/examples/advisor/list-insights.md @@ -4,7 +4,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const advisor = new sdk.Advisor(client); diff --git a/docs/examples/advisor/list-reports.md b/docs/examples/advisor/list-reports.md index 4227d53..6fa66f1 100644 --- a/docs/examples/advisor/list-reports.md +++ b/docs/examples/advisor/list-reports.md @@ -4,7 +4,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const advisor = new sdk.Advisor(client); diff --git a/package-lock.json b/package-lock.json index 0c31b05..32838a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "node-appwrite", - "version": "25.0.0", + "version": "25.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "node-appwrite", - "version": "25.0.0", + "version": "25.0.1", "dependencies": { "json-bigint": "1.0.0", "node-fetch-native-with-agent": "1.7.2" diff --git a/package.json b/package.json index b79ffc5..0863b19 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "node-appwrite", "homepage": "https://appwrite.io/support", "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", - "version": "25.0.0", + "version": "25.0.1", "license": "BSD-3-Clause", "main": "dist/index.js", "type": "commonjs", diff --git a/src/client.ts b/src/client.ts index 46b481f..38b6b13 100644 --- a/src/client.ts +++ b/src/client.ts @@ -74,7 +74,7 @@ class AppwriteException extends Error { } function getUserAgent() { - let ua = 'AppwriteNodeJSSDK/25.0.0'; + let ua = 'AppwriteNodeJSSDK/25.0.1'; // `process` is a global in Node.js, but not fully available in all runtimes. const platform: string[] = []; @@ -128,7 +128,7 @@ class Client { 'x-sdk-name': 'Node.js', 'x-sdk-platform': 'server', 'x-sdk-language': 'nodejs', - 'x-sdk-version': '25.0.0', + 'x-sdk-version': '25.0.1', 'user-agent' : getUserAgent(), 'X-Appwrite-Response-Format': '1.9.5', }; diff --git a/src/enums/build-runtime.ts b/src/enums/build-runtime.ts index 1466d63..dddeeb2 100644 --- a/src/enums/build-runtime.ts +++ b/src/enums/build-runtime.ts @@ -30,6 +30,9 @@ export enum BuildRuntime { Pythonml311 = 'python-ml-3.11', Pythonml312 = 'python-ml-3.12', Pythonml313 = 'python-ml-3.13', + Deno121 = 'deno-1.21', + Deno124 = 'deno-1.24', + Deno135 = 'deno-1.35', Deno140 = 'deno-1.40', Deno146 = 'deno-1.46', Deno20 = 'deno-2.0', diff --git a/src/enums/runtime.ts b/src/enums/runtime.ts index f4d2068..a2b22ef 100644 --- a/src/enums/runtime.ts +++ b/src/enums/runtime.ts @@ -30,6 +30,9 @@ export enum Runtime { Pythonml311 = 'python-ml-3.11', Pythonml312 = 'python-ml-3.12', Pythonml313 = 'python-ml-3.13', + Deno121 = 'deno-1.21', + Deno124 = 'deno-1.24', + Deno135 = 'deno-1.35', Deno140 = 'deno-1.40', Deno146 = 'deno-1.46', Deno20 = 'deno-2.0', diff --git a/src/models.ts b/src/models.ts index 6b0d05c..de93495 100644 --- a/src/models.ts +++ b/src/models.ts @@ -3359,6 +3359,10 @@ export namespace Models { * File original size in bytes. */ sizeOriginal: number; + /** + * File actual stored size in bytes after compression and/or encryption. + */ + sizeActual: number; /** * Total number of chunks available */ @@ -4210,7 +4214,7 @@ export namespace Models { /** * Billing limits reached */ - billingLimits: BillingLimits; + billingLimits?: BillingLimits; /** * Project blocks information */ @@ -6760,35 +6764,35 @@ export namespace Models { /** * Bandwidth limit */ - bandwidth: number; + bandwidth?: number; /** * Storage limit */ - storage: number; + storage?: number; /** * Users limit */ - users: number; + users?: number; /** * Executions limit */ - executions: number; + executions?: number; /** * GBHours limit */ - GBHours: number; + GBHours?: number; /** * Image transformations limit */ - imageTransformations: number; + imageTransformations?: number; /** * Auth phone limit */ - authPhone: number; + authPhone?: number; /** * Budget limit percentage */ - budgetLimit: number; + budgetLimit?: number; } /** diff --git a/test/services/project.test.js b/test/services/project.test.js index 29a4071..7a18b7e 100644 --- a/test/services/project.test.js +++ b/test/services/project.test.js @@ -36,7 +36,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -89,7 +88,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -257,7 +255,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1431,7 +1428,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1472,7 +1468,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1513,7 +1508,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1554,7 +1548,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1594,7 +1587,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1635,7 +1627,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1676,7 +1667,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1717,7 +1707,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1758,7 +1747,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1799,7 +1787,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1840,7 +1827,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1881,7 +1867,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1942,7 +1927,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -1984,7 +1968,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); @@ -2026,7 +2009,6 @@ describe('Project', () => { 'services': [], 'protocols': [], 'region': 'fra', - 'billingLimits': {}, 'blocks': [], 'consoleAccessedAt': '2020-10-15T06:38:00.000+00:00',}; mockedFetch.mockImplementation(() => Response.json(data)); diff --git a/test/services/storage.test.js b/test/services/storage.test.js index 22ab179..5b28529 100644 --- a/test/services/storage.test.js +++ b/test/services/storage.test.js @@ -152,6 +152,7 @@ describe('Storage', () => { 'signature': '5d529fd02b544198ae075bd57c1762bb', 'mimeType': 'image/png', 'sizeOriginal': 17890, + 'sizeActual': 12345, 'chunksTotal': 17890, 'chunksUploaded': 17890, 'encryption': true, @@ -181,6 +182,7 @@ describe('Storage', () => { 'signature': '5d529fd02b544198ae075bd57c1762bb', 'mimeType': 'image/png', 'sizeOriginal': 17890, + 'sizeActual': 12345, 'chunksTotal': 17890, 'chunksUploaded': 17890, 'encryption': true, @@ -209,6 +211,7 @@ describe('Storage', () => { 'signature': '5d529fd02b544198ae075bd57c1762bb', 'mimeType': 'image/png', 'sizeOriginal': 17890, + 'sizeActual': 12345, 'chunksTotal': 17890, 'chunksUploaded': 17890, 'encryption': true, From b3bb78eef436f8ebb195eeccbbedd52393c183c4 Mon Sep 17 00:00:00 2001 From: premtsd-code Date: Wed, 20 May 2026 08:34:45 +0000 Subject: [PATCH 4/4] feat: update Node.js SDK to 25.1.0 * Added `sizeActual` property to file model for actual stored size after compression * Added `Deno121`, `Deno124`, and `Deno135` runtime options to `BuildRuntime` and `Runtime` enums * Updated advisor authentication examples to use API key instead of session * Updated billing limits properties to be optional in project models --- CHANGELOG.md | 11 +++++------ package-lock.json | 4 ++-- package.json | 2 +- src/client.ts | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b436a52..a47aa7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,11 @@ # Change Log -## 25.0.1 +## 25.1.0 -* Fixed: `BillingLimits` inner fields and `Project.billingLimits` are now optional — server emits sparse "limits crossed" map -* Fixed: `Project.consoleAccessedAt` defaults to empty string for never-accessed projects (no longer null) -* Added: `File.sizeActual` field — actual bytes used on disk after compression / encryption -* Updated: `BuildRuntime` and `Runtime` enums with `deno-1.21`, `deno-1.24`, and `deno-1.35` -* Updated: Advisor doc examples corrected to use API key auth instead of session +* Added `sizeActual` property to file model for actual stored size after compression +* Added `Deno121`, `Deno124`, and `Deno135` runtime options to `BuildRuntime` and `Runtime` enums +* Updated advisor authentication examples to use API key instead of session +* Updated billing limits properties to be optional in project models ## 25.0.0 diff --git a/package-lock.json b/package-lock.json index 32838a6..fa96a4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "node-appwrite", - "version": "25.0.1", + "version": "25.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "node-appwrite", - "version": "25.0.1", + "version": "25.1.0", "dependencies": { "json-bigint": "1.0.0", "node-fetch-native-with-agent": "1.7.2" diff --git a/package.json b/package.json index 0863b19..6b06e98 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "node-appwrite", "homepage": "https://appwrite.io/support", "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", - "version": "25.0.1", + "version": "25.1.0", "license": "BSD-3-Clause", "main": "dist/index.js", "type": "commonjs", diff --git a/src/client.ts b/src/client.ts index 38b6b13..37bb016 100644 --- a/src/client.ts +++ b/src/client.ts @@ -74,7 +74,7 @@ class AppwriteException extends Error { } function getUserAgent() { - let ua = 'AppwriteNodeJSSDK/25.0.1'; + let ua = 'AppwriteNodeJSSDK/25.1.0'; // `process` is a global in Node.js, but not fully available in all runtimes. const platform: string[] = []; @@ -128,7 +128,7 @@ class Client { 'x-sdk-name': 'Node.js', 'x-sdk-platform': 'server', 'x-sdk-language': 'nodejs', - 'x-sdk-version': '25.0.1', + 'x-sdk-version': '25.1.0', 'user-agent' : getUserAgent(), 'X-Appwrite-Response-Format': '1.9.5', };