diff --git a/CHANGELOG.md b/CHANGELOG.md
index a282565..aad642a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,15 @@
# Change Log
+## 28.2.0-rc.0
+
+* Added: `Push` service for MQTT realtime push messages
+* Added: `Topic` and `ResolvedTopic` builders for push topic filters
+* Added: `Client.setPushEndpoint()` and `Client.setPushClientId()`
+* Added: `Avatars.deletePhoto()` method
+* Added: `Models.Account` type
+* Added: `Webflow` to the `OAuthProvider` enum
+* Updated: `Client.chunkedUpload()` accepts a `responseType`, supports `text`, and falls back without a file
+
## 28.1.0
* Added: `Apps` service to create and manage OAuth2 apps, their secrets, keys, and installations
diff --git a/README.md b/README.md
index a9d1bd4..fe73a8c 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ import { Client, Account } from 'appwrite';
To install with a CDN (content delivery network) add the following scripts to the bottom of your
tag, but before you use any Appwrite services:
```html
-
+
```
## Getting Started
diff --git a/docs/examples/account/create-email-password-session.md b/docs/examples/account/create-email-password-session.md
index 6093aa2..40ae7c9 100644
--- a/docs/examples/account/create-email-password-session.md
+++ b/docs/examples/account/create-email-password-session.md
@@ -10,6 +10,7 @@ const account = new Account(client);
const result = await account.createEmailPasswordSession({
email: 'email@example.com',
password: 'password',
+ duration: 60, // optional
});
console.log(result);
diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md
index 1bd929a..1e32eb3 100644
--- a/docs/examples/account/delete-sessions.md
+++ b/docs/examples/account/delete-sessions.md
@@ -7,7 +7,9 @@ const client = new Client()
const account = new Account(client);
-const result = await account.deleteSessions();
+const result = await account.deleteSessions({
+ current: false, // optional
+});
console.log(result);
```
diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md
index d07cf48..99d0f05 100644
--- a/docs/examples/account/list-sessions.md
+++ b/docs/examples/account/list-sessions.md
@@ -7,7 +7,9 @@ const client = new Client()
const account = new Account(client);
-const result = await account.listSessions();
+const result = await account.listSessions({
+ total: false, // optional
+});
console.log(result);
```
diff --git a/docs/examples/avatars/delete-photo.md b/docs/examples/avatars/delete-photo.md
new file mode 100644
index 0000000..fd5d42f
--- /dev/null
+++ b/docs/examples/avatars/delete-photo.md
@@ -0,0 +1,13 @@
+```javascript
+import { Client, Avatars } from 'appwrite';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const avatars = new Avatars(client);
+
+const result = await avatars.deletePhoto();
+
+console.log(result);
+```
diff --git a/docs/examples/avatars/get-screenshot.md b/docs/examples/avatars/get-screenshot.md
index 680d225..d1f1a16 100644
--- a/docs/examples/avatars/get-screenshot.md
+++ b/docs/examples/avatars/get-screenshot.md
@@ -17,8 +17,7 @@ const avatars = new Avatars(client);
const result = avatars.getScreenshot({
url: 'https://example.com',
headers: {
- Authorization: 'Bearer token123',
- 'X-Custom-Header': 'value',
+ 'Accept-Language': 'en-US,en;q=0.9',
}, // optional
viewportWidth: 1920, // optional
viewportHeight: 1080, // optional
diff --git a/docs/examples/avatars/update-photo.md b/docs/examples/avatars/update-photo.md
new file mode 100644
index 0000000..2deb920
--- /dev/null
+++ b/docs/examples/avatars/update-photo.md
@@ -0,0 +1,15 @@
+```javascript
+import { Client, Avatars } from 'appwrite';
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const avatars = new Avatars(client);
+
+const result = await avatars.updatePhoto({
+ file: document.getElementById('uploader').files[0],
+});
+
+console.log(result);
+```
diff --git a/docs/examples/databases/list-transactions.md b/docs/examples/databases/list-transactions.md
index bb8ae2e..03e770c 100644
--- a/docs/examples/databases/list-transactions.md
+++ b/docs/examples/databases/list-transactions.md
@@ -9,6 +9,7 @@ const databases = new Databases(client);
const result = await databases.listTransactions({
queries: [], // optional
+ total: false, // optional
});
console.log(result);
diff --git a/docs/examples/documentsdb/create-documents.md b/docs/examples/documentsdb/create-documents.md
index c2830b9..b86362c 100644
--- a/docs/examples/documentsdb/create-documents.md
+++ b/docs/examples/documentsdb/create-documents.md
@@ -10,7 +10,16 @@ const documentsDB = new DocumentsDB(client);
const result = await documentsDB.createDocuments({
databaseId: '',
collectionId: '',
- documents: [],
+ documents: [
+ {
+ $id: 'example1',
+ username: 'walter.obrien',
+ email: 'walter.obrien@example.com',
+ fullName: "Walter O'Brien",
+ age: 30,
+ isAdmin: false,
+ },
+ ],
transactionId: '', // optional
});
diff --git a/docs/examples/documentsdb/list-transactions.md b/docs/examples/documentsdb/list-transactions.md
index 161d388..6d43c9b 100644
--- a/docs/examples/documentsdb/list-transactions.md
+++ b/docs/examples/documentsdb/list-transactions.md
@@ -9,6 +9,7 @@ const documentsDB = new DocumentsDB(client);
const result = await documentsDB.listTransactions({
queries: [], // optional
+ total: false, // optional
});
console.log(result);
diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md
index abd27e3..5e0a138 100644
--- a/docs/examples/graphql/mutation.md
+++ b/docs/examples/graphql/mutation.md
@@ -8,7 +8,9 @@ const client = new Client()
const graphql = new Graphql(client);
const result = await graphql.mutation({
- query: {},
+ query: {
+ query: 'mutation { accountUpdateName(name: "Walter") { name } }',
+ },
});
console.log(result);
diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md
index 21b353f..e18863e 100644
--- a/docs/examples/graphql/query.md
+++ b/docs/examples/graphql/query.md
@@ -8,7 +8,9 @@ const client = new Client()
const graphql = new Graphql(client);
const result = await graphql.query({
- query: {},
+ query: {
+ query: 'query { localeGet { ip } }',
+ },
});
console.log(result);
diff --git a/docs/examples/locale/list-codes.md b/docs/examples/locale/list-codes.md
index dce429e..d4647f3 100644
--- a/docs/examples/locale/list-codes.md
+++ b/docs/examples/locale/list-codes.md
@@ -7,7 +7,9 @@ const client = new Client()
const locale = new Locale(client);
-const result = await locale.listCodes();
+const result = await locale.listCodes({
+ total: false, // optional
+});
console.log(result);
```
diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md
index 4fde425..81321ad 100644
--- a/docs/examples/locale/list-continents.md
+++ b/docs/examples/locale/list-continents.md
@@ -7,7 +7,9 @@ const client = new Client()
const locale = new Locale(client);
-const result = await locale.listContinents();
+const result = await locale.listContinents({
+ total: false, // optional
+});
console.log(result);
```
diff --git a/docs/examples/locale/list-countries-eu.md b/docs/examples/locale/list-countries-eu.md
index 9172454..902e257 100644
--- a/docs/examples/locale/list-countries-eu.md
+++ b/docs/examples/locale/list-countries-eu.md
@@ -7,7 +7,9 @@ const client = new Client()
const locale = new Locale(client);
-const result = await locale.listCountriesEU();
+const result = await locale.listCountriesEU({
+ total: false, // optional
+});
console.log(result);
```
diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md
index 95ef6e5..8bf2abe 100644
--- a/docs/examples/locale/list-countries-phones.md
+++ b/docs/examples/locale/list-countries-phones.md
@@ -7,7 +7,9 @@ const client = new Client()
const locale = new Locale(client);
-const result = await locale.listCountriesPhones();
+const result = await locale.listCountriesPhones({
+ total: false, // optional
+});
console.log(result);
```
diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md
index 7d37e80..4533178 100644
--- a/docs/examples/locale/list-countries.md
+++ b/docs/examples/locale/list-countries.md
@@ -7,7 +7,9 @@ const client = new Client()
const locale = new Locale(client);
-const result = await locale.listCountries();
+const result = await locale.listCountries({
+ total: false, // optional
+});
console.log(result);
```
diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md
index b123b17..f52d26d 100644
--- a/docs/examples/locale/list-currencies.md
+++ b/docs/examples/locale/list-currencies.md
@@ -7,7 +7,9 @@ const client = new Client()
const locale = new Locale(client);
-const result = await locale.listCurrencies();
+const result = await locale.listCurrencies({
+ total: false, // optional
+});
console.log(result);
```
diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md
index c9abd5d..4ff97c3 100644
--- a/docs/examples/locale/list-languages.md
+++ b/docs/examples/locale/list-languages.md
@@ -7,7 +7,9 @@ const client = new Client()
const locale = new Locale(client);
-const result = await locale.listLanguages();
+const result = await locale.listLanguages({
+ total: false, // optional
+});
console.log(result);
```
diff --git a/docs/examples/tablesdb/list-transactions.md b/docs/examples/tablesdb/list-transactions.md
index 20f0dba..6b3a60a 100644
--- a/docs/examples/tablesdb/list-transactions.md
+++ b/docs/examples/tablesdb/list-transactions.md
@@ -9,6 +9,7 @@ const tablesDB = new TablesDB(client);
const result = await tablesDB.listTransactions({
queries: [], // optional
+ total: false, // optional
});
console.log(result);
diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md
index d8f15f3..e7e03ea 100644
--- a/docs/examples/teams/create-membership.md
+++ b/docs/examples/teams/create-membership.md
@@ -9,7 +9,7 @@ const teams = new Teams(client);
const result = await teams.createMembership({
teamId: '',
- roles: [],
+ roles: ['editor'],
email: 'email@example.com', // optional
userId: '', // optional
phone: '+12065550100', // optional
diff --git a/docs/examples/teams/update-membership.md b/docs/examples/teams/update-membership.md
index a568e30..ce05e53 100644
--- a/docs/examples/teams/update-membership.md
+++ b/docs/examples/teams/update-membership.md
@@ -10,7 +10,7 @@ const teams = new Teams(client);
const result = await teams.updateMembership({
teamId: '',
membershipId: '',
- roles: [],
+ roles: ['editor'],
});
console.log(result);
diff --git a/docs/examples/vectorsdb/create-operations.md b/docs/examples/vectorsdb/create-operations.md
index 35fb3d3..7e92256 100644
--- a/docs/examples/vectorsdb/create-operations.md
+++ b/docs/examples/vectorsdb/create-operations.md
@@ -16,7 +16,10 @@ const result = await vectorsDB.createOperations({
collectionId: '',
documentId: '',
data: {
- name: "Walter O'Brien",
+ embeddings: [0.12, -0.55, 0.88, 1.02],
+ metadata: {
+ name: 'First document',
+ },
},
},
], // optional
diff --git a/docs/examples/vectorsdb/list-transactions.md b/docs/examples/vectorsdb/list-transactions.md
index a39afbc..981018e 100644
--- a/docs/examples/vectorsdb/list-transactions.md
+++ b/docs/examples/vectorsdb/list-transactions.md
@@ -9,6 +9,7 @@ const vectorsDB = new VectorsDB(client);
const result = await vectorsDB.listTransactions({
queries: [], // optional
+ total: false, // optional
});
console.log(result);
diff --git a/package-lock.json b/package-lock.json
index 5f28bd4..0cc11e2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,2247 +1,2788 @@
{
- "name": "appwrite",
- "version": "28.1.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "appwrite",
- "version": "28.1.0",
- "license": "BSD-3-Clause",
- "dependencies": {
- "json-bigint": "1.0.0"
- },
- "devDependencies": {
- "@eslint/js": "10.0.1",
- "@rollup/plugin-commonjs": "29.0.3",
- "@rollup/plugin-node-resolve": "16.0.3",
- "@rollup/plugin-typescript": "12.3.0",
- "@types/json-bigint": "1.0.4",
- "eslint": "10.10.0",
- "playwright": "1.56.1",
- "prettier": "3.9.6",
- "rollup": "4.63.2",
- "serve-handler": "6.1.7",
- "tslib": "2.8.1",
- "typescript": "5.9.3",
- "typescript-eslint": "8.70.0"
- },
- "engines": {
- "node": ">=18.0.0"
- }
- },
- "node_modules/@cacheable/memory": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz",
- "integrity": "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@cacheable/utils": "^2.5.0",
- "@keyv/bigmap": "^1.3.1",
- "hookified": "^1.15.1",
- "keyv": "^5.6.0"
- }
- },
- "node_modules/@cacheable/utils": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.5.0.tgz",
- "integrity": "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "hashery": "^1.5.1",
- "keyv": "^5.6.0"
- }
- },
- "node_modules/@eslint-community/eslint-utils": {
- "version": "4.10.1",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz",
- "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "eslint-visitor-keys": "^3.4.3"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- },
- "peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
- }
- },
- "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
- "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/@eslint-community/regexpp": {
- "version": "4.12.2",
- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",
- "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
- }
- },
- "node_modules/@eslint/config-array": {
- "version": "0.23.5",
- "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz",
- "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@eslint/object-schema": "^3.0.5",
- "debug": "^4.3.1",
- "minimatch": "^10.2.4"
- },
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- }
- },
- "node_modules/@eslint/config-array/node_modules/minimatch": {
- "version": "10.2.6",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",
- "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "brace-expansion": "^5.0.8"
- },
- "engines": {
- "node": "18 || 20 || >=22"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/@eslint/config-helpers": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz",
- "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@eslint/core": "^1.2.1"
- },
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- }
- },
- "node_modules/@eslint/core": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz",
- "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@types/json-schema": "^7.0.15"
- },
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- }
- },
- "node_modules/@eslint/js": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz",
- "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- },
- "funding": {
- "url": "https://eslint.org/donate"
- },
- "peerDependencies": {
- "eslint": "^10.0.0"
- },
- "peerDependenciesMeta": {
- "eslint": {
- "optional": true
- }
- }
- },
- "node_modules/@eslint/object-schema": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz",
- "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- }
- },
- "node_modules/@eslint/plugin-kit": {
- "version": "0.7.3",
- "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz",
- "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@eslint/core": "^1.2.1",
- "levn": "^0.4.1"
- },
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- }
- },
- "node_modules/@humanfs/core": {
- "version": "0.19.2",
- "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",
- "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@humanfs/types": "^0.15.0"
- },
- "engines": {
- "node": ">=18.18.0"
- }
- },
- "node_modules/@humanfs/node": {
- "version": "0.16.8",
- "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz",
- "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@humanfs/core": "^0.19.2",
- "@humanfs/types": "^0.15.0",
- "@humanwhocodes/retry": "^0.4.0"
- },
- "engines": {
- "node": ">=18.18.0"
- }
- },
- "node_modules/@humanfs/types": {
- "version": "0.15.0",
- "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz",
- "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=18.18.0"
- }
- },
- "node_modules/@humanwhocodes/module-importer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
- "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=12.22"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/nzakas"
- }
- },
- "node_modules/@humanwhocodes/retry": {
- "version": "0.4.3",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
- "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=18.18"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/nzakas"
- }
- },
- "node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.5.5",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
- "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@keyv/bigmap": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.3.1.tgz",
- "integrity": "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "hashery": "^1.4.0",
- "hookified": "^1.15.0"
- },
- "engines": {
- "node": ">= 18"
- },
- "peerDependencies": {
- "keyv": "^5.6.0"
- }
- },
- "node_modules/@keyv/serialize": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz",
- "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@napi-rs/lzma-linux-x64-gnu": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz",
- "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": "^22.20 || ^24.12 || >=25"
- }
- },
- "node_modules/@rollup/plugin-commonjs": {
- "version": "29.0.3",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz",
- "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@rollup/pluginutils": "^5.0.1",
- "commondir": "^1.0.1",
- "estree-walker": "^2.0.2",
- "fdir": "^6.2.0",
- "is-reference": "1.2.1",
- "magic-string": "^0.30.3",
- "picomatch": "^4.0.2"
- },
- "engines": {
- "node": ">=16.0.0 || 14 >= 14.17"
- },
- "peerDependencies": {
- "rollup": "^2.68.0||^3.0.0||^4.0.0"
- },
- "peerDependenciesMeta": {
- "rollup": {
- "optional": true
- }
- }
- },
- "node_modules/@rollup/plugin-node-resolve": {
- "version": "16.0.3",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz",
- "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@rollup/pluginutils": "^5.0.1",
- "@types/resolve": "1.20.2",
- "deepmerge": "^4.2.2",
- "is-module": "^1.0.0",
- "resolve": "^1.22.1"
- },
- "engines": {
- "node": ">=14.0.0"
- },
- "peerDependencies": {
- "rollup": "^2.78.0||^3.0.0||^4.0.0"
- },
- "peerDependenciesMeta": {
- "rollup": {
- "optional": true
- }
- }
- },
- "node_modules/@rollup/plugin-typescript": {
- "version": "12.3.0",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz",
- "integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@rollup/pluginutils": "^5.1.0",
- "resolve": "^1.22.1"
- },
- "engines": {
- "node": ">=14.0.0"
- },
- "peerDependencies": {
- "rollup": "^2.14.0||^3.0.0||^4.0.0",
- "tslib": "*",
- "typescript": ">=3.7.0"
- },
- "peerDependenciesMeta": {
- "rollup": {
- "optional": true
- },
- "tslib": {
- "optional": true
- }
- }
- },
- "node_modules/@rollup/pluginutils": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz",
- "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "^1.0.0",
- "estree-walker": "^2.0.2",
- "picomatch": "^4.0.2"
- },
- "engines": {
- "node": ">=14.0.0"
- },
- "peerDependencies": {
- "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
- },
- "peerDependenciesMeta": {
- "rollup": {
- "optional": true
- }
- }
- },
- "node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.2.tgz",
- "integrity": "sha512-Xa6RDoWa+hNiX6PgsljlH6W75RaONx3y6PVlbLhkEWW+GaPQ3dP5gwbL/erAzQHWwkvW5UxdD5l87Qx2FAQ/4A==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-android-arm64": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.2.tgz",
- "integrity": "sha512-vNASxsghMfQ5s+v3PrpnJd+ryL/26lxCCaGI+sDJ7VzmHiYXIrrVltsDhaawxLM1WcoMU2oYlbPHLaYQtBzhcg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.2.tgz",
- "integrity": "sha512-0dWDjmlrpZAgjPD/aPzUDhBW8APLRjAni5bOrM76wiiZm+E+KTMVKNhAzaTBohz8UyO2fKNAl0+fygbe2HZXOA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.2.tgz",
- "integrity": "sha512-N58uktcwzk3+qT4KHEuNdIxX1N01RWrkfVoml69EAbSaNDL+sbNVLx2RMl4Qd23lpA0fgPvyh5hHb4weD5WKmg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.2.tgz",
- "integrity": "sha512-HWF2zH8EAp2scWRpt2PGe6iUGz7zi04waXsdRr3zb4DWCk2ImIo5FZu0jjmD53nP/DGSvnW0e7/1ToCNZs2lZw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.2.tgz",
- "integrity": "sha512-MkvcwHMnzPSMOQEwB6wHnLzmc+hT8BGc5bW/Mhmjjgx3wbj6VBnlc47XsK74kD0K9MikFfXpQqyz4NUXaUW62A==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.2.tgz",
- "integrity": "sha512-xe1bCKPJaKsD0tfd7Rb6bGfUogJTpKbTEEthsfdb7hTfTRNJVQTdirabQx0o6ERVba/smkM720soMY+0QnrlSQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.2.tgz",
- "integrity": "sha512-yOM7LdK0p6gk6+Q773OEwtlsikT1TL3yMmYsTtRlDRPha5vV2DC5x7LqRWDr6f3cSYNMKVqxzffXv8ivxNBIFQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.2.tgz",
- "integrity": "sha512-qiWuJJV3DybA2IfzvRimeKXGrGuVPv1zobSY/26KnP3HbV0VcNb3ECzgvtbvF3xjSMkcooou6HASXZuLdjnhpQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.2.tgz",
- "integrity": "sha512-akcZquRzCY/KpUoZAMBhGf7oi4LmXq1BzRA5CPAC3rkUf28Y/sAYV3jSL+JKd7cwEyFvR5G0XVZ0gaMedP+60A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-loong64-gnu": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.2.tgz",
- "integrity": "sha512-fNwYHrPyYyxauPzX/cpYw8Z7LQpp+DGA0KCoswA0aVFBpmdMil9XgjB8V3Ny64Ihu797+GKcuJqnsOKEmor7fA==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-loong64-musl": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.2.tgz",
- "integrity": "sha512-XfvsgzR7DZqREdst7K1Mj3ilSUM5xLAHJcIMDFPKdxTs9q5VHOT8aMA+a683fqBu7DQl8+Sd9HCsQYL8EMY9qA==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-ppc64-gnu": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.2.tgz",
- "integrity": "sha512-Pp7gVZggEFlbcuztay+/U0gVG9S1XAh8i7I1Re/htbAzo43P5wHZHw6pTyzotISqlKohoh9RpIfnOz3RbemK1w==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-ppc64-musl": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.2.tgz",
- "integrity": "sha512-zkgL2xff6i7u5hau/m6FGeS8gRkLEdgLw522WGmdWWlLd9btmNl3S80mcEjtGq+kvgUekQ3+BOYLLLcPlS2LIA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.2.tgz",
- "integrity": "sha512-qOheJomrkVCbbHFJ7L3J97cnhfogKqguAQphv26+3ZsAQIF1L19b+dArl//s8rjJHJLz9byykyM8NBP4nmSa1g==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.2.tgz",
- "integrity": "sha512-XlxLD54wQhH3FciCgMofxBw27NzUe818gJH410qWvc41UT0ZFcgxVjyX5/EK8MPTupjeVWqN5oy+9pCA9mqfCA==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.2.tgz",
- "integrity": "sha512-vdryWeRb2bLJZf0Fv/W8se6nvsHe2PkTCxV0meheK3nQE+G90VCJcke51Miy1yQRsfm2uqIyjXOu4wmUzbTtkQ==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.2.tgz",
- "integrity": "sha512-bcq2h2pkKmH2po4cZV8VWzO4lL40STyu/nLoFpYMQp9C2tCVNTdcVv86MwSsn3D5s1FBe2Ty1atqvVAUTMimNg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.2.tgz",
- "integrity": "sha512-EGoo5DMVMRkTId8fuTDaoxVlR5ZTsKULUezRjd9gCw5eeY+DjCvDpZAOlNUvKPGX+7rS1RWx6j+yOpNPx0cUgQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-openbsd-x64": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.2.tgz",
- "integrity": "sha512-MErl12k7BFHZG1TI9QF/3lSSZARzq9KgNy/FjnqFMCkv+N4RSSzoUCA5h2mqHX4Mox3WaTVKblyzhQ1zRb2ZuQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ]
- },
- "node_modules/@rollup/rollup-openharmony-arm64": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.2.tgz",
- "integrity": "sha512-ILs8k07Wh4p0PsNY4wYLEaXZKMOpVhrG5QDB0yHhGhuzOfDlnyHN6sflL4El/MpUP1y8uY2lUZrv4oBS6pTT3g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openharmony"
- ]
- },
- "node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.2.tgz",
- "integrity": "sha512-hKgB3nz/TKD3Wv78XEsyXzQsNjvhOHmwKQTvXADGOyU/cIClZDO7DsoggbdmJDPGp5V80tA3Vfv61PaKTLH3LA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.2.tgz",
- "integrity": "sha512-T4wf1mudIDxN8Q/CWIBJC1u5gQUc+r5mPvlwoSbIvNkyVTP2TAFeobEmst5AQ4gMyAz4sSByVdoTDfvTmGK/8g==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-gnu": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.2.tgz",
- "integrity": "sha512-tC3IY7qoaD9Ll3/8WJQn49j5V2f/NuI9S41NOE2iM5MPs3sPIvOkVToLcz/7Bz4pyF7PSvrtwu8I/pUrGOSecQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.2.tgz",
- "integrity": "sha512-6NHnk/K3eq2ZFYcU1X8g67s9qIJRCOTT92gwLMVBp08dB2uuuwI1/Q/empzL2Bfr2f2WRLJVwpp90RmacQyFkw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@types/esrecurse": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz",
- "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/estree": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
- "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/json-bigint": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz",
- "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/json-schema": {
- "version": "7.0.15",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
- "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/resolve": {
- "version": "1.20.2",
- "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
- "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@typescript-eslint/eslint-plugin": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz",
- "integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@eslint-community/regexpp": "^4.12.2",
- "@typescript-eslint/scope-manager": "8.70.0",
- "@typescript-eslint/type-utils": "8.70.0",
- "@typescript-eslint/utils": "8.70.0",
- "@typescript-eslint/visitor-keys": "8.70.0",
- "ignore": "^7.0.5",
- "natural-compare": "^1.4.0",
- "ts-api-utils": "^2.5.0"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "@typescript-eslint/parser": "^8.70.0",
- "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
- "typescript": ">=4.8.4 <6.1.0"
- }
- },
- "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
- "version": "7.0.10",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.10.tgz",
- "integrity": "sha512-HpbUakT7xp5miBUywCHf36ZEuAJNklBJDDsGpUIjMzOSmM8ELSfA9Sa/QDPeNeqeoN31u+UTCkL4klCOVvRm4Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/@typescript-eslint/parser": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz",
- "integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/scope-manager": "8.70.0",
- "@typescript-eslint/types": "8.70.0",
- "@typescript-eslint/typescript-estree": "8.70.0",
- "@typescript-eslint/visitor-keys": "8.70.0",
- "debug": "^4.4.3"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
- "typescript": ">=4.8.4 <6.1.0"
- }
- },
- "node_modules/@typescript-eslint/project-service": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz",
- "integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/tsconfig-utils": "^8.70.0",
- "@typescript-eslint/types": "^8.70.0",
- "debug": "^4.4.3"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "typescript": ">=4.8.4 <6.1.0"
- }
- },
- "node_modules/@typescript-eslint/scope-manager": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz",
- "integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/types": "8.70.0",
- "@typescript-eslint/visitor-keys": "8.70.0"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- }
- },
- "node_modules/@typescript-eslint/tsconfig-utils": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz",
- "integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "typescript": ">=4.8.4 <6.1.0"
- }
- },
- "node_modules/@typescript-eslint/type-utils": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz",
- "integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/types": "8.70.0",
- "@typescript-eslint/typescript-estree": "8.70.0",
- "@typescript-eslint/utils": "8.70.0",
- "debug": "^4.4.3",
- "ts-api-utils": "^2.5.0"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
- "typescript": ">=4.8.4 <6.1.0"
- }
- },
- "node_modules/@typescript-eslint/types": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz",
- "integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- }
- },
- "node_modules/@typescript-eslint/typescript-estree": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz",
- "integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/project-service": "8.70.0",
- "@typescript-eslint/tsconfig-utils": "8.70.0",
- "@typescript-eslint/types": "8.70.0",
- "@typescript-eslint/visitor-keys": "8.70.0",
- "debug": "^4.4.3",
- "minimatch": "^10.2.2",
- "semver": "^7.7.3",
- "tinyglobby": "^0.2.15",
- "ts-api-utils": "^2.5.0"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "typescript": ">=4.8.4 <6.1.0"
- }
- },
- "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
- "version": "10.2.6",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",
- "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "brace-expansion": "^5.0.8"
- },
- "engines": {
- "node": "18 || 20 || >=22"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/@typescript-eslint/utils": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz",
- "integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@eslint-community/eslint-utils": "^4.9.1",
- "@typescript-eslint/scope-manager": "8.70.0",
- "@typescript-eslint/types": "8.70.0",
- "@typescript-eslint/typescript-estree": "8.70.0"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
- "typescript": ">=4.8.4 <6.1.0"
- }
- },
- "node_modules/@typescript-eslint/visitor-keys": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz",
- "integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/types": "8.70.0",
- "eslint-visitor-keys": "^5.0.0"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- }
- },
- "node_modules/acorn": {
- "version": "8.18.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz",
- "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "acorn": "bin/acorn"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/acorn-jsx": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
- }
- },
- "node_modules/ajv": {
- "version": "6.15.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
- "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/balanced-match": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
- "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "18 || 20 || >=22"
- }
- },
- "node_modules/bignumber.js": {
- "version": "9.3.1",
- "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz",
- "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==",
- "license": "MIT",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/brace-expansion": {
- "version": "5.0.9",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
- "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^4.0.2"
- },
- "engines": {
- "node": "20 || >=22"
- }
- },
- "node_modules/bytes": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
- "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/cacheable": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.5.0.tgz",
- "integrity": "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@cacheable/memory": "^2.2.0",
- "@cacheable/utils": "^2.5.0",
- "hookified": "^1.15.0",
- "keyv": "^5.6.0",
- "qified": "^0.10.1"
- }
- },
- "node_modules/commondir": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
- "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/content-disposition": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
- "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cross-spawn": {
- "version": "7.0.6",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
- "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/debug": {
- "version": "4.4.3",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
- "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ms": "^2.1.3"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/deep-is": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
- "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/deepmerge": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
- "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/es-errors": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
- "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/escape-string-regexp": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint": {
- "version": "10.10.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.10.0.tgz",
- "integrity": "sha512-NPXn6r5zl4uET1DAVPaOwzX3rut4c0wcmw3dWJAfOsTM5+TogXo0DDjz8pwm/hL8cyVNpHqeK4JpN0NjnyFFNw==",
- "dev": true,
- "license": "MIT",
- "workspaces": [
- "packages/*"
- ],
- "dependencies": {
- "@eslint-community/eslint-utils": "^4.8.0",
- "@eslint-community/regexpp": "^4.12.2",
- "@eslint/config-array": "^0.23.5",
- "@eslint/config-helpers": "^0.7.0",
- "@eslint/core": "^1.2.1",
- "@eslint/plugin-kit": "^0.7.3",
- "@humanfs/node": "^0.16.6",
- "@humanwhocodes/module-importer": "^1.0.1",
- "@humanwhocodes/retry": "^0.4.2",
- "@types/estree": "^1.0.6",
- "ajv": "^6.14.0",
- "cross-spawn": "^7.0.6",
- "debug": "^4.3.2",
- "escape-string-regexp": "^4.0.0",
- "eslint-scope": "^9.1.2",
- "eslint-visitor-keys": "^5.0.1",
- "espree": "^11.2.0",
- "esquery": "^1.7.0",
- "esutils": "^2.0.2",
- "fast-deep-equal": "^3.1.3",
- "file-entry-cache": "11.1.5 || >11.1.6 <12",
- "find-up": "^5.0.0",
- "glob-parent": "^6.0.2",
- "ignore": "^5.2.0",
- "imurmurhash": "^0.1.4",
- "is-glob": "^4.0.0",
- "json-stable-stringify-without-jsonify": "^1.0.1",
- "minimatch": "^10.2.5",
- "natural-compare": "^1.4.0",
- "optionator": "^0.9.3"
- },
- "bin": {
- "eslint": "bin/eslint.js"
- },
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- },
- "funding": {
- "url": "https://eslint.org/donate"
- },
- "peerDependencies": {
- "jiti": "*"
- },
- "peerDependenciesMeta": {
- "jiti": {
- "optional": true
- }
- }
- },
- "node_modules/eslint-scope": {
- "version": "9.1.2",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz",
- "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "@types/esrecurse": "^4.3.1",
- "@types/estree": "^1.0.8",
- "esrecurse": "^4.3.0",
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint-visitor-keys": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
- "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint/node_modules/minimatch": {
- "version": "10.2.6",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",
- "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "brace-expansion": "^5.0.8"
- },
- "engines": {
- "node": "18 || 20 || >=22"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/espree": {
- "version": "11.2.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz",
- "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "acorn": "^8.16.0",
- "acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^5.0.1"
- },
- "engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/esquery": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",
- "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "estraverse": "^5.1.0"
- },
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/esrecurse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
- "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/estraverse": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "dev": true,
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/estree-walker": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
- "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/esutils": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
- "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
- "dev": true,
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/fast-json-stable-stringify": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/fast-levenshtein": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
- "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/fdir": {
- "version": "6.5.0",
- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
- "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12.0.0"
- },
- "peerDependencies": {
- "picomatch": "^3 || ^4"
- },
- "peerDependenciesMeta": {
- "picomatch": {
- "optional": true
- }
- }
- },
- "node_modules/file-entry-cache": {
- "version": "11.1.5",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-11.1.5.tgz",
- "integrity": "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "flat-cache": "^6.1.23"
- }
- },
- "node_modules/find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/flat-cache": {
- "version": "6.1.23",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.23.tgz",
- "integrity": "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cacheable": "^2.5.0",
- "flatted": "^3.4.2",
- "hookified": "^1.15.0"
- }
- },
- "node_modules/flatted": {
- "version": "3.4.4",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz",
- "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/function-bind": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
- "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
- "dev": true,
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/glob-parent": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
- "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "is-glob": "^4.0.3"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/hashery": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz",
- "integrity": "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "hookified": "^1.15.0"
- },
- "engines": {
- "node": ">=20"
- }
- },
- "node_modules/hasown": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
- "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "function-bind": "^1.1.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/hookified": {
- "version": "1.15.1",
- "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz",
- "integrity": "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/ignore": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
- "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.8.19"
- }
- },
- "node_modules/is-core-module": {
- "version": "2.16.2",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz",
- "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "hasown": "^2.0.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-module": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
- "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/is-reference": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
- "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "*"
- }
- },
- "node_modules/isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/json-bigint": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
- "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
- "license": "MIT",
- "dependencies": {
- "bignumber.js": "^9.0.0"
- }
- },
- "node_modules/json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/json-stable-stringify-without-jsonify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
- "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/keyv": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz",
- "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@keyv/serialize": "^1.1.1"
- }
- },
- "node_modules/levn": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
- "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "prelude-ls": "^1.2.1",
- "type-check": "~0.4.0"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-locate": "^5.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/magic-string": {
- "version": "0.30.21",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
- "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/sourcemap-codec": "^1.5.5"
- }
- },
- "node_modules/mime-db": {
- "version": "1.33.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
- "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime-types": {
- "version": "2.1.18",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz",
- "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "mime-db": "~1.33.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/minimatch": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
- "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/natural-compare": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
- "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/optionator": {
- "version": "0.9.4",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
- "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "deep-is": "^0.1.3",
- "fast-levenshtein": "^2.0.6",
- "levn": "^0.4.1",
- "prelude-ls": "^1.2.1",
- "type-check": "^0.4.0",
- "word-wrap": "^1.2.5"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "yocto-queue": "^0.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-limit": "^3.0.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/path-exists": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-is-inside": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
- "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==",
- "dev": true,
- "license": "(WTFPL OR MIT)"
- },
- "node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-parse": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
- "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/path-to-regexp": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz",
- "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/picomatch": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
- "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/playwright": {
- "version": "1.56.1",
- "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz",
- "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "playwright-core": "1.56.1"
- },
- "bin": {
- "playwright": "cli.js"
- },
- "engines": {
- "node": ">=18"
- },
- "optionalDependencies": {
- "fsevents": "2.3.2"
- }
- },
- "node_modules/playwright-core": {
- "version": "1.56.1",
- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz",
- "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
- "dev": true,
- "license": "Apache-2.0",
- "bin": {
- "playwright-core": "cli.js"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/prelude-ls": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
- "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/prettier": {
- "version": "3.9.6",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz",
- "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "prettier": "bin/prettier.cjs"
- },
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/prettier/prettier?sponsor=1"
- }
- },
- "node_modules/punycode": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
- "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/qified": {
- "version": "0.10.1",
- "resolved": "https://registry.npmjs.org/qified/-/qified-0.10.1.tgz",
- "integrity": "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "hookified": "^2.1.1"
- },
- "engines": {
- "node": ">=20"
- }
- },
- "node_modules/qified/node_modules/hookified": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/hookified/-/hookified-2.2.0.tgz",
- "integrity": "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/range-parser": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
- "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/resolve": {
- "version": "1.22.12",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz",
- "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "is-core-module": "^2.16.1",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- },
- "bin": {
- "resolve": "bin/resolve"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/rollup": {
- "version": "4.63.2",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.2.tgz",
- "integrity": "sha512-l5eyksV4tPBj6lJyEa37YzIOCSOV7lkZzEHUdpjWZbtD7wTcFYmEYXSgm5bT4vV+dZLb9rBG1W9GROOG4NS4Ew==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "1.0.9"
- },
- "bin": {
- "rollup": "dist/bin/rollup"
- },
- "engines": {
- "node": ">=18.0.0",
- "npm": ">=8.0.0"
- },
- "optionalDependencies": {
- "@napi-rs/lzma-linux-x64-gnu": "1.5.1",
- "@rollup/rollup-android-arm-eabi": "4.63.2",
- "@rollup/rollup-android-arm64": "4.63.2",
- "@rollup/rollup-darwin-arm64": "4.63.2",
- "@rollup/rollup-darwin-x64": "4.63.2",
- "@rollup/rollup-freebsd-arm64": "4.63.2",
- "@rollup/rollup-freebsd-x64": "4.63.2",
- "@rollup/rollup-linux-arm-gnueabihf": "4.63.2",
- "@rollup/rollup-linux-arm-musleabihf": "4.63.2",
- "@rollup/rollup-linux-arm64-gnu": "4.63.2",
- "@rollup/rollup-linux-arm64-musl": "4.63.2",
- "@rollup/rollup-linux-loong64-gnu": "4.63.2",
- "@rollup/rollup-linux-loong64-musl": "4.63.2",
- "@rollup/rollup-linux-ppc64-gnu": "4.63.2",
- "@rollup/rollup-linux-ppc64-musl": "4.63.2",
- "@rollup/rollup-linux-riscv64-gnu": "4.63.2",
- "@rollup/rollup-linux-riscv64-musl": "4.63.2",
- "@rollup/rollup-linux-s390x-gnu": "4.63.2",
- "@rollup/rollup-linux-x64-gnu": "4.63.2",
- "@rollup/rollup-linux-x64-musl": "4.63.2",
- "@rollup/rollup-openbsd-x64": "4.63.2",
- "@rollup/rollup-openharmony-arm64": "4.63.2",
- "@rollup/rollup-win32-arm64-msvc": "4.63.2",
- "@rollup/rollup-win32-ia32-msvc": "4.63.2",
- "@rollup/rollup-win32-x64-gnu": "4.63.2",
- "@rollup/rollup-win32-x64-msvc": "4.63.2",
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/semver": {
- "version": "7.8.5",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
- "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/serve-handler": {
- "version": "6.1.7",
- "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz",
- "integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "bytes": "3.0.0",
- "content-disposition": "0.5.2",
- "mime-types": "2.1.18",
- "minimatch": "3.1.5",
- "path-is-inside": "1.0.2",
- "path-to-regexp": "3.3.0",
- "range-parser": "1.2.0"
- }
- },
- "node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/supports-preserve-symlinks-flag": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
- "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/tinyglobby": {
- "version": "0.2.17",
- "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
- "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fdir": "^6.5.0",
- "picomatch": "^4.0.4"
- },
- "engines": {
- "node": ">=12.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/SuperchupuDev"
- }
- },
- "node_modules/ts-api-utils": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",
- "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18.12"
- },
- "peerDependencies": {
- "typescript": ">=4.8.4"
- }
- },
- "node_modules/tslib": {
- "version": "2.8.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
- "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
- "dev": true,
- "license": "0BSD"
- },
- "node_modules/type-check": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
- "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "prelude-ls": "^1.2.1"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/typescript": {
- "version": "5.9.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
- "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
- "dev": true,
- "license": "Apache-2.0",
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=14.17"
- }
- },
- "node_modules/typescript-eslint": {
- "version": "8.70.0",
- "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.0.tgz",
- "integrity": "sha512-P/W5cz70/cQAuKfY3xwQMWWTV7BvJ0mAQmi+9mBcsVPaBUpd6Ohpa+fECv9rBFrQcig86jAiNBFNWUqnTjr4pw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/eslint-plugin": "8.70.0",
- "@typescript-eslint/parser": "8.70.0",
- "@typescript-eslint/typescript-estree": "8.70.0",
- "@typescript-eslint/utils": "8.70.0"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
- "typescript": ">=4.8.4 <6.1.0"
- }
- },
- "node_modules/uri-js": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
- "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "punycode": "^2.1.0"
- }
- },
- "node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/word-wrap": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
- "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/yocto-queue": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
- "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "name": "appwrite",
+ "version": "28.2.0-rc.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "appwrite",
+ "version": "28.2.0-rc.0",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "buffer": "6.0.3",
+ "json-bigint": "1.0.0",
+ "mqtt": "5.15.2"
+ },
+ "devDependencies": {
+ "@eslint/js": "10.0.1",
+ "@rollup/plugin-commonjs": "29.0.3",
+ "@rollup/plugin-node-resolve": "16.0.3",
+ "@rollup/plugin-typescript": "12.3.0",
+ "@types/json-bigint": "1.0.4",
+ "eslint": "10.10.0",
+ "playwright": "1.56.1",
+ "prettier": "3.9.6",
+ "rollup": "4.63.2",
+ "rollup-plugin-polyfill-node": "0.13.0",
+ "serve-handler": "6.1.7",
+ "tslib": "2.8.1",
+ "typescript": "5.9.3",
+ "typescript-eslint": "8.70.0"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "overrides": {
+ "brace-expansion": "5.0.12"
+ }
+ },
+ "node_modules/@babel/runtime": {
+ "version": "7.29.7",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz",
+ "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@cacheable/memory": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz",
+ "integrity": "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cacheable/utils": "^2.5.0",
+ "@keyv/bigmap": "^1.3.1",
+ "hookified": "^1.15.1",
+ "keyv": "^5.6.0"
+ }
+ },
+ "node_modules/@cacheable/utils": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.5.0.tgz",
+ "integrity": "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hashery": "^1.5.1",
+ "keyv": "^5.6.0"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.10.1",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz",
+ "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "eslint-visitor-keys": "^3.4.3"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.12.2",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",
+ "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@eslint/config-array": {
+ "version": "0.23.5",
+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz",
+ "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/object-schema": "^3.0.5",
+ "debug": "^4.3.1",
+ "minimatch": "^10.2.4"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
+ },
+ "node_modules/@eslint/config-helpers": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz",
+ "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^1.2.1"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
+ },
+ "node_modules/@eslint/core": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz",
+ "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/json-schema": "^7.0.15"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
+ },
+ "node_modules/@eslint/js": {
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz",
+ "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://eslint.org/donate"
+ },
+ "peerDependencies": {
+ "eslint": "^10.0.0"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@eslint/object-schema": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz",
+ "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
+ },
+ "node_modules/@eslint/plugin-kit": {
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz",
+ "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^1.2.1",
+ "levn": "^0.4.1"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
+ },
+ "node_modules/@humanfs/core": {
+ "version": "0.19.2",
+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",
+ "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@humanfs/types": "^0.15.0"
+ },
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/@humanfs/node": {
+ "version": "0.16.8",
+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz",
+ "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@humanfs/core": "^0.19.2",
+ "@humanfs/types": "^0.15.0",
+ "@humanwhocodes/retry": "^0.4.0"
+ },
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/@humanfs/types": {
+ "version": "0.15.0",
+ "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz",
+ "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@humanwhocodes/retry": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.18"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",
+ "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@keyv/bigmap": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.3.1.tgz",
+ "integrity": "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hashery": "^1.4.0",
+ "hookified": "^1.15.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "keyv": "^5.6.0"
+ }
+ },
+ "node_modules/@keyv/serialize": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz",
+ "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@napi-rs/lzma-linux-x64-gnu": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz",
+ "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^22.20 || ^24.12 || >=25"
+ }
+ },
+ "node_modules/@rollup/plugin-commonjs": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz",
+ "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rollup/pluginutils": "^5.0.1",
+ "commondir": "^1.0.1",
+ "estree-walker": "^2.0.2",
+ "fdir": "^6.2.0",
+ "is-reference": "1.2.1",
+ "magic-string": "^0.30.3",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=16.0.0 || 14 >= 14.17"
+ },
+ "peerDependencies": {
+ "rollup": "^2.68.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/plugin-inject": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz",
+ "integrity": "sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rollup/pluginutils": "^5.0.1",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.30.3"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/plugin-node-resolve": {
+ "version": "16.0.3",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz",
+ "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rollup/pluginutils": "^5.0.1",
+ "@types/resolve": "1.20.2",
+ "deepmerge": "^4.2.2",
+ "is-module": "^1.0.0",
+ "resolve": "^1.22.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^2.78.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/plugin-typescript": {
+ "version": "12.3.0",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz",
+ "integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rollup/pluginutils": "^5.1.0",
+ "resolve": "^1.22.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^2.14.0||^3.0.0||^4.0.0",
+ "tslib": "*",
+ "typescript": ">=3.7.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ },
+ "tslib": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/pluginutils": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz",
+ "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "estree-walker": "^2.0.2",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.2.tgz",
+ "integrity": "sha512-Xa6RDoWa+hNiX6PgsljlH6W75RaONx3y6PVlbLhkEWW+GaPQ3dP5gwbL/erAzQHWwkvW5UxdD5l87Qx2FAQ/4A==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.2.tgz",
+ "integrity": "sha512-vNASxsghMfQ5s+v3PrpnJd+ryL/26lxCCaGI+sDJ7VzmHiYXIrrVltsDhaawxLM1WcoMU2oYlbPHLaYQtBzhcg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.2.tgz",
+ "integrity": "sha512-0dWDjmlrpZAgjPD/aPzUDhBW8APLRjAni5bOrM76wiiZm+E+KTMVKNhAzaTBohz8UyO2fKNAl0+fygbe2HZXOA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.2.tgz",
+ "integrity": "sha512-N58uktcwzk3+qT4KHEuNdIxX1N01RWrkfVoml69EAbSaNDL+sbNVLx2RMl4Qd23lpA0fgPvyh5hHb4weD5WKmg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.2.tgz",
+ "integrity": "sha512-HWF2zH8EAp2scWRpt2PGe6iUGz7zi04waXsdRr3zb4DWCk2ImIo5FZu0jjmD53nP/DGSvnW0e7/1ToCNZs2lZw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.2.tgz",
+ "integrity": "sha512-MkvcwHMnzPSMOQEwB6wHnLzmc+hT8BGc5bW/Mhmjjgx3wbj6VBnlc47XsK74kD0K9MikFfXpQqyz4NUXaUW62A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.2.tgz",
+ "integrity": "sha512-xe1bCKPJaKsD0tfd7Rb6bGfUogJTpKbTEEthsfdb7hTfTRNJVQTdirabQx0o6ERVba/smkM720soMY+0QnrlSQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.2.tgz",
+ "integrity": "sha512-yOM7LdK0p6gk6+Q773OEwtlsikT1TL3yMmYsTtRlDRPha5vV2DC5x7LqRWDr6f3cSYNMKVqxzffXv8ivxNBIFQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.2.tgz",
+ "integrity": "sha512-qiWuJJV3DybA2IfzvRimeKXGrGuVPv1zobSY/26KnP3HbV0VcNb3ECzgvtbvF3xjSMkcooou6HASXZuLdjnhpQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.2.tgz",
+ "integrity": "sha512-akcZquRzCY/KpUoZAMBhGf7oi4LmXq1BzRA5CPAC3rkUf28Y/sAYV3jSL+JKd7cwEyFvR5G0XVZ0gaMedP+60A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.2.tgz",
+ "integrity": "sha512-fNwYHrPyYyxauPzX/cpYw8Z7LQpp+DGA0KCoswA0aVFBpmdMil9XgjB8V3Ny64Ihu797+GKcuJqnsOKEmor7fA==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-musl": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.2.tgz",
+ "integrity": "sha512-XfvsgzR7DZqREdst7K1Mj3ilSUM5xLAHJcIMDFPKdxTs9q5VHOT8aMA+a683fqBu7DQl8+Sd9HCsQYL8EMY9qA==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.2.tgz",
+ "integrity": "sha512-Pp7gVZggEFlbcuztay+/U0gVG9S1XAh8i7I1Re/htbAzo43P5wHZHw6pTyzotISqlKohoh9RpIfnOz3RbemK1w==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-musl": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.2.tgz",
+ "integrity": "sha512-zkgL2xff6i7u5hau/m6FGeS8gRkLEdgLw522WGmdWWlLd9btmNl3S80mcEjtGq+kvgUekQ3+BOYLLLcPlS2LIA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.2.tgz",
+ "integrity": "sha512-qOheJomrkVCbbHFJ7L3J97cnhfogKqguAQphv26+3ZsAQIF1L19b+dArl//s8rjJHJLz9byykyM8NBP4nmSa1g==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.2.tgz",
+ "integrity": "sha512-XlxLD54wQhH3FciCgMofxBw27NzUe818gJH410qWvc41UT0ZFcgxVjyX5/EK8MPTupjeVWqN5oy+9pCA9mqfCA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.2.tgz",
+ "integrity": "sha512-vdryWeRb2bLJZf0Fv/W8se6nvsHe2PkTCxV0meheK3nQE+G90VCJcke51Miy1yQRsfm2uqIyjXOu4wmUzbTtkQ==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.2.tgz",
+ "integrity": "sha512-bcq2h2pkKmH2po4cZV8VWzO4lL40STyu/nLoFpYMQp9C2tCVNTdcVv86MwSsn3D5s1FBe2Ty1atqvVAUTMimNg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.2.tgz",
+ "integrity": "sha512-EGoo5DMVMRkTId8fuTDaoxVlR5ZTsKULUezRjd9gCw5eeY+DjCvDpZAOlNUvKPGX+7rS1RWx6j+yOpNPx0cUgQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-openbsd-x64": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.2.tgz",
+ "integrity": "sha512-MErl12k7BFHZG1TI9QF/3lSSZARzq9KgNy/FjnqFMCkv+N4RSSzoUCA5h2mqHX4Mox3WaTVKblyzhQ1zRb2ZuQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.2.tgz",
+ "integrity": "sha512-ILs8k07Wh4p0PsNY4wYLEaXZKMOpVhrG5QDB0yHhGhuzOfDlnyHN6sflL4El/MpUP1y8uY2lUZrv4oBS6pTT3g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.2.tgz",
+ "integrity": "sha512-hKgB3nz/TKD3Wv78XEsyXzQsNjvhOHmwKQTvXADGOyU/cIClZDO7DsoggbdmJDPGp5V80tA3Vfv61PaKTLH3LA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.2.tgz",
+ "integrity": "sha512-T4wf1mudIDxN8Q/CWIBJC1u5gQUc+r5mPvlwoSbIvNkyVTP2TAFeobEmst5AQ4gMyAz4sSByVdoTDfvTmGK/8g==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.2.tgz",
+ "integrity": "sha512-tC3IY7qoaD9Ll3/8WJQn49j5V2f/NuI9S41NOE2iM5MPs3sPIvOkVToLcz/7Bz4pyF7PSvrtwu8I/pUrGOSecQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.2.tgz",
+ "integrity": "sha512-6NHnk/K3eq2ZFYcU1X8g67s9qIJRCOTT92gwLMVBp08dB2uuuwI1/Q/empzL2Bfr2f2WRLJVwpp90RmacQyFkw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@types/esrecurse": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz",
+ "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
+ "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/json-bigint": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz",
+ "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/json-schema": {
+ "version": "7.0.15",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/node": {
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.3.tgz",
+ "integrity": "sha512-dsqMQQoeTLqu9wynDD00q573mNzso3IdQOAfHRJqLCcmCFPoGo9A1bDpUcv/9tnKpErQWv9uKeGfl37EIS02Yg==",
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~8.9.0"
+ }
+ },
+ "node_modules/@types/readable-stream": {
+ "version": "4.0.25",
+ "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.25.tgz",
+ "integrity": "sha512-7GsxL8Wd5X3jh73/qgW7WCnbBvGSdD8U3E4Jiuus3/8I+PN20DtlkJtwFhr/sImXfDDQ2Z03i/9wNiIF3TVSsw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/resolve": {
+ "version": "1.20.2",
+ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
+ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/ws": {
+ "version": "8.18.2",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.2.tgz",
+ "integrity": "sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz",
+ "integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.12.2",
+ "@typescript-eslint/scope-manager": "8.70.0",
+ "@typescript-eslint/type-utils": "8.70.0",
+ "@typescript-eslint/utils": "8.70.0",
+ "@typescript-eslint/visitor-keys": "8.70.0",
+ "ignore": "^7.0.5",
+ "natural-compare": "^1.4.0",
+ "ts-api-utils": "^2.5.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/parser": "^8.70.0",
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
+ "version": "7.0.10",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.10.tgz",
+ "integrity": "sha512-HpbUakT7xp5miBUywCHf36ZEuAJNklBJDDsGpUIjMzOSmM8ELSfA9Sa/QDPeNeqeoN31u+UTCkL4klCOVvRm4Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/@typescript-eslint/parser": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz",
+ "integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "8.70.0",
+ "@typescript-eslint/types": "8.70.0",
+ "@typescript-eslint/typescript-estree": "8.70.0",
+ "@typescript-eslint/visitor-keys": "8.70.0",
+ "debug": "^4.4.3"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/project-service": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz",
+ "integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/tsconfig-utils": "^8.70.0",
+ "@typescript-eslint/types": "^8.70.0",
+ "debug": "^4.4.3"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz",
+ "integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.70.0",
+ "@typescript-eslint/visitor-keys": "8.70.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/tsconfig-utils": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz",
+ "integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz",
+ "integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.70.0",
+ "@typescript-eslint/typescript-estree": "8.70.0",
+ "@typescript-eslint/utils": "8.70.0",
+ "debug": "^4.4.3",
+ "ts-api-utils": "^2.5.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/types": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz",
+ "integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz",
+ "integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/project-service": "8.70.0",
+ "@typescript-eslint/tsconfig-utils": "8.70.0",
+ "@typescript-eslint/types": "8.70.0",
+ "@typescript-eslint/visitor-keys": "8.70.0",
+ "debug": "^4.4.3",
+ "minimatch": "^10.2.2",
+ "semver": "^7.7.3",
+ "tinyglobby": "^0.2.15",
+ "ts-api-utils": "^2.5.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz",
+ "integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.9.1",
+ "@typescript-eslint/scope-manager": "8.70.0",
+ "@typescript-eslint/types": "8.70.0",
+ "@typescript-eslint/typescript-estree": "8.70.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz",
+ "integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.70.0",
+ "eslint-visitor-keys": "^5.0.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/abort-controller": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
+ "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
+ "license": "MIT",
+ "dependencies": {
+ "event-target-shim": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=6.5"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.18.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz",
+ "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.15.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
+ "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "18 || 20 || >=22"
+ }
+ },
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/bignumber.js": {
+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz",
+ "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==",
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/bl": {
+ "version": "6.1.6",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-6.1.6.tgz",
+ "integrity": "sha512-jLsPgN/YSvPUg9UX0Kd73CXpm2Psg9FxMeCSXnk3WBO3CMT10JMwijubhGfHCnFu6TPn1ei3b975dxv7K2pWVg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/readable-stream": "^4.0.0",
+ "buffer": "^6.0.3",
+ "inherits": "^2.0.4",
+ "readable-stream": "^4.2.0"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "5.0.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz",
+ "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^4.0.2"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ }
+ },
+ "node_modules/broker-factory": {
+ "version": "3.1.15",
+ "resolved": "https://registry.npmjs.org/broker-factory/-/broker-factory-3.1.15.tgz",
+ "integrity": "sha512-ko+aWvgNuP49meGrdjUu7rC+Y+Wai3cCPxP3xWwHsHfehFjOh5ZQM2yC4gEB2UddeZ/YXhm0K1eG/L6fxym2Og==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.29.7",
+ "fast-unique-numbers": "^9.0.27",
+ "tslib": "^2.8.1",
+ "worker-factory": "^7.0.50"
+ }
+ },
+ "node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "license": "MIT"
+ },
+ "node_modules/bytes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/cacheable": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.5.0.tgz",
+ "integrity": "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cacheable/memory": "^2.2.0",
+ "@cacheable/utils": "^2.5.0",
+ "hookified": "^1.15.0",
+ "keyv": "^5.6.0",
+ "qified": "^0.10.1"
+ }
+ },
+ "node_modules/commist": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/commist/-/commist-3.2.0.tgz",
+ "integrity": "sha512-4PIMoPniho+LqXmpS5d3NuGYncG6XWlkBSVGiWycL22dd42OYdUGil2CWuzklaJoNxyxUSpO4MKIBU94viWNAw==",
+ "license": "MIT"
+ },
+ "node_modules/commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/concat-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
+ "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
+ "engines": [
+ "node >= 6.0"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.0.2",
+ "typedarray": "^0.0.6"
+ }
+ },
+ "node_modules/concat-stream/node_modules/readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
+ "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/deepmerge": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint": {
+ "version": "10.10.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.10.0.tgz",
+ "integrity": "sha512-NPXn6r5zl4uET1DAVPaOwzX3rut4c0wcmw3dWJAfOsTM5+TogXo0DDjz8pwm/hL8cyVNpHqeK4JpN0NjnyFFNw==",
+ "dev": true,
+ "license": "MIT",
+ "workspaces": [
+ "packages/*"
+ ],
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.8.0",
+ "@eslint-community/regexpp": "^4.12.2",
+ "@eslint/config-array": "^0.23.5",
+ "@eslint/config-helpers": "^0.7.0",
+ "@eslint/core": "^1.2.1",
+ "@eslint/plugin-kit": "^0.7.3",
+ "@humanfs/node": "^0.16.6",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@humanwhocodes/retry": "^0.4.2",
+ "@types/estree": "^1.0.6",
+ "ajv": "^6.14.0",
+ "cross-spawn": "^7.0.6",
+ "debug": "^4.3.2",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^9.1.2",
+ "eslint-visitor-keys": "^5.0.1",
+ "espree": "^11.2.0",
+ "esquery": "^1.7.0",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "11.1.5 || >11.1.6 <12",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
+ "is-glob": "^4.0.0",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "minimatch": "^10.2.5",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3"
+ },
+ "bin": {
+ "eslint": "bin/eslint.js"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://eslint.org/donate"
+ },
+ "peerDependencies": {
+ "jiti": "*"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "9.1.2",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz",
+ "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "@types/esrecurse": "^4.3.1",
+ "@types/estree": "^1.0.8",
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-visitor-keys": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/espree": {
+ "version": "11.2.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz",
+ "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "acorn": "^8.16.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^5.0.1"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esquery": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",
+ "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "estraverse": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/event-target-shim": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
+ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.x"
+ }
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-unique-numbers": {
+ "version": "9.0.27",
+ "resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-9.0.27.tgz",
+ "integrity": "sha512-nDA9ADeINN8SA2u2wCtU+siWFTTDqQR37XvgPIDDmboWQeExz7X0mImxuaN+kJddliIqy2FpVRmnvRZ+j8i1/A==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.29.2",
+ "tslib": "^2.8.1"
+ },
+ "engines": {
+ "node": ">=18.2.0"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/file-entry-cache": {
+ "version": "11.1.5",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-11.1.5.tgz",
+ "integrity": "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "flat-cache": "^6.1.23"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/flat-cache": {
+ "version": "6.1.23",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.23.tgz",
+ "integrity": "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cacheable": "^2.5.0",
+ "flatted": "^3.4.2",
+ "hookified": "^1.15.0"
+ }
+ },
+ "node_modules/flatted": {
+ "version": "3.4.4",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz",
+ "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/hashery": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz",
+ "integrity": "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hookified": "^1.15.0"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/help-me": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz",
+ "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==",
+ "license": "MIT"
+ },
+ "node_modules/hookified": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz",
+ "integrity": "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/ip-address": {
+ "version": "10.7.2",
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.2.tgz",
+ "integrity": "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.17.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.17.0.tgz",
+ "integrity": "sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-module": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
+ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/is-reference": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
+ "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/js-sdsl": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz",
+ "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/js-sdsl"
+ }
+ },
+ "node_modules/json-bigint": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
+ "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "bignumber.js": "^9.0.0"
+ }
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/keyv": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz",
+ "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@keyv/serialize": "^1.1.1"
+ }
+ },
+ "node_modules/levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "license": "ISC"
+ },
+ "node_modules/magic-string": {
+ "version": "0.30.21",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.5"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
+ "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.18",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz",
+ "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "~1.33.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "10.2.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",
+ "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "brace-expansion": "^5.0.8"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/mqtt": {
+ "version": "5.15.2",
+ "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.15.2.tgz",
+ "integrity": "sha512-VWZU2CSUY3U3oN0PSBRDE5SNsFi4zqqNeQ/uv3pZWqY3CrBXD/dhd0ZLjlsk5YnebGlrapi4lRVNJPUNQ5aZ3w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/readable-stream": "^4.0.21",
+ "@types/ws": "^8.18.1",
+ "commist": "^3.2.0",
+ "concat-stream": "^2.0.0",
+ "debug": "^4.4.1",
+ "help-me": "^5.0.0",
+ "lru-cache": "^10.4.3",
+ "minimist": "^1.2.8",
+ "mqtt-packet": "^9.0.2",
+ "number-allocator": "^1.0.14",
+ "readable-stream": "^4.7.0",
+ "rfdc": "^1.4.1",
+ "socks": "^2.8.6",
+ "split2": "^4.2.0",
+ "worker-timers": "^8.0.23",
+ "ws": "^8.18.3"
+ },
+ "bin": {
+ "mqtt": "build/bin/mqtt.js",
+ "mqtt_pub": "build/bin/pub.js",
+ "mqtt_sub": "build/bin/sub.js"
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
+ "node_modules/mqtt-packet": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-9.0.2.tgz",
+ "integrity": "sha512-MvIY0B8/qjq7bKxdN1eD+nrljoeaai+qjLJgfRn3TiMuz0pamsIWY2bFODPZMSNmabsLANXsLl4EMoWvlaTZWA==",
+ "license": "MIT",
+ "dependencies": {
+ "bl": "^6.0.8",
+ "debug": "^4.3.4",
+ "process-nextick-args": "^2.0.1"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/number-allocator": {
+ "version": "1.0.14",
+ "resolved": "https://registry.npmjs.org/number-allocator/-/number-allocator-1.0.14.tgz",
+ "integrity": "sha512-OrL44UTVAvkKdOdRQZIJpLkAdjXGTRda052sN4sO77bKEzYYqWKMBjQvrJFzqygI99gL6Z4u2xctPW1tB8ErvA==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.1",
+ "js-sdsl": "4.3.0"
+ }
+ },
+ "node_modules/optionator": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
+ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0",
+ "word-wrap": "^1.2.5"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-inside": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
+ "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==",
+ "dev": true,
+ "license": "(WTFPL OR MIT)"
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/path-to-regexp": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz",
+ "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/picomatch": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/playwright": {
+ "version": "1.56.1",
+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz",
+ "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "playwright-core": "1.56.1"
+ },
+ "bin": {
+ "playwright": "cli.js"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "fsevents": "2.3.2"
+ }
+ },
+ "node_modules/playwright-core": {
+ "version": "1.56.1",
+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz",
+ "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "playwright-core": "cli.js"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/prelude-ls": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "3.9.6",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz",
+ "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "prettier": "bin/prettier.cjs"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6.0"
+ }
+ },
+ "node_modules/process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "license": "MIT"
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/qified": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/qified/-/qified-0.10.1.tgz",
+ "integrity": "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hookified": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/qified/node_modules/hookified": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/hookified/-/hookified-2.2.0.tgz",
+ "integrity": "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
+ "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
+ "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
+ "license": "MIT",
+ "dependencies": {
+ "abort-controller": "^3.0.0",
+ "buffer": "^6.0.3",
+ "events": "^3.3.0",
+ "process": "^0.11.10",
+ "string_decoder": "^1.3.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.12",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz",
+ "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "is-core-module": "^2.16.1",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/rfdc": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
+ "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
+ "license": "MIT"
+ },
+ "node_modules/rollup": {
+ "version": "4.63.2",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.2.tgz",
+ "integrity": "sha512-l5eyksV4tPBj6lJyEa37YzIOCSOV7lkZzEHUdpjWZbtD7wTcFYmEYXSgm5bT4vV+dZLb9rBG1W9GROOG4NS4Ew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "1.0.9"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@napi-rs/lzma-linux-x64-gnu": "1.5.1",
+ "@rollup/rollup-android-arm-eabi": "4.63.2",
+ "@rollup/rollup-android-arm64": "4.63.2",
+ "@rollup/rollup-darwin-arm64": "4.63.2",
+ "@rollup/rollup-darwin-x64": "4.63.2",
+ "@rollup/rollup-freebsd-arm64": "4.63.2",
+ "@rollup/rollup-freebsd-x64": "4.63.2",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.63.2",
+ "@rollup/rollup-linux-arm-musleabihf": "4.63.2",
+ "@rollup/rollup-linux-arm64-gnu": "4.63.2",
+ "@rollup/rollup-linux-arm64-musl": "4.63.2",
+ "@rollup/rollup-linux-loong64-gnu": "4.63.2",
+ "@rollup/rollup-linux-loong64-musl": "4.63.2",
+ "@rollup/rollup-linux-ppc64-gnu": "4.63.2",
+ "@rollup/rollup-linux-ppc64-musl": "4.63.2",
+ "@rollup/rollup-linux-riscv64-gnu": "4.63.2",
+ "@rollup/rollup-linux-riscv64-musl": "4.63.2",
+ "@rollup/rollup-linux-s390x-gnu": "4.63.2",
+ "@rollup/rollup-linux-x64-gnu": "4.63.2",
+ "@rollup/rollup-linux-x64-musl": "4.63.2",
+ "@rollup/rollup-openbsd-x64": "4.63.2",
+ "@rollup/rollup-openharmony-arm64": "4.63.2",
+ "@rollup/rollup-win32-arm64-msvc": "4.63.2",
+ "@rollup/rollup-win32-ia32-msvc": "4.63.2",
+ "@rollup/rollup-win32-x64-gnu": "4.63.2",
+ "@rollup/rollup-win32-x64-msvc": "4.63.2",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/rollup-plugin-polyfill-node": {
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.13.0.tgz",
+ "integrity": "sha512-FYEvpCaD5jGtyBuBFcQImEGmTxDTPbiHjJdrYIp+mFIwgXiXabxvKUK7ZT9P31ozu2Tqm9llYQMRWsfvTMTAOw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rollup/plugin-inject": "^5.0.4"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "7.8.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/serve-handler": {
+ "version": "6.1.7",
+ "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz",
+ "integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "3.0.0",
+ "content-disposition": "0.5.2",
+ "mime-types": "2.1.18",
+ "minimatch": "3.1.5",
+ "path-is-inside": "1.0.2",
+ "path-to-regexp": "3.3.0",
+ "range-parser": "1.2.0"
+ }
+ },
+ "node_modules/serve-handler/node_modules/minimatch": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
+ "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/smart-buffer": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
+ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6.0.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/socks": {
+ "version": "2.8.10",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.10.tgz",
+ "integrity": "sha512-e0VyvkVTwVYViNovRkZ9aodhxVlyoMn7eJhVUPxZ+eK9P/7CBkxvvsBOHqFPEH416726W8tLXXXjKwqgTErrCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ip-address": "^10.1.1",
+ "smart-buffer": "^4.2.0"
+ },
+ "engines": {
+ "node": ">= 10.0.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/split2": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
+ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
+ "license": "ISC",
+ "engines": {
+ "node": ">= 10.x"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.17",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/ts-api-utils": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",
+ "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.12"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "license": "0BSD"
+ },
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prelude-ls": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/typedarray": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
+ "license": "MIT"
+ },
+ "node_modules/typescript": {
+ "version": "5.9.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/typescript-eslint": {
+ "version": "8.70.0",
+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.0.tgz",
+ "integrity": "sha512-P/W5cz70/cQAuKfY3xwQMWWTV7BvJ0mAQmi+9mBcsVPaBUpd6Ohpa+fECv9rBFrQcig86jAiNBFNWUqnTjr4pw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/eslint-plugin": "8.70.0",
+ "@typescript-eslint/parser": "8.70.0",
+ "@typescript-eslint/typescript-estree": "8.70.0",
+ "@typescript-eslint/utils": "8.70.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+ "typescript": ">=4.8.4 <6.1.0"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "8.9.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
+ "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
+ "license": "MIT"
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "license": "MIT"
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/word-wrap": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/worker-factory": {
+ "version": "7.0.50",
+ "resolved": "https://registry.npmjs.org/worker-factory/-/worker-factory-7.0.50.tgz",
+ "integrity": "sha512-hhwc0G+sFwM4qBuhJIUBn2p1Jf8v/FwmLUANBf/Q+Lt2uI8mfIZQhXaZQACodQD4R7Zp6cn/6702bIvNn2puJQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.29.7",
+ "fast-unique-numbers": "^9.0.27",
+ "tslib": "^2.8.1"
+ }
+ },
+ "node_modules/worker-timers": {
+ "version": "8.0.34",
+ "resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-8.0.34.tgz",
+ "integrity": "sha512-WXL+Dqsm0G6dnC66rQsvM3tPT2adhbqSirWUCZGglkALOr8ocS0KlpU0iuKbjflJOlu3ydZikMEVrYnHOM9suw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.29.7",
+ "tslib": "^2.8.1",
+ "worker-timers-broker": "^8.0.18",
+ "worker-timers-worker": "^9.0.15"
+ }
+ },
+ "node_modules/worker-timers-broker": {
+ "version": "8.0.18",
+ "resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-8.0.18.tgz",
+ "integrity": "sha512-FrjzDVX1wKfZN0gRbCFqv8VHuTncG4sbI/WGEg4tSSQeIsnwqg4YBYWMAHYLJtUDEYYmiK65UKFrVMVk2irDSg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.29.7",
+ "broker-factory": "^3.1.15",
+ "fast-unique-numbers": "^9.0.27",
+ "tslib": "^2.8.1",
+ "worker-timers-worker": "^9.0.15"
+ }
+ },
+ "node_modules/worker-timers-worker": {
+ "version": "9.0.15",
+ "resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-9.0.15.tgz",
+ "integrity": "sha512-KKUe7lZ/Aignr51H6hOUik8LwTnIgojH/1lwhli8A8qIEIyewogZTpNpMW5B6BF7nmwBOkUoTYgf1H3QShcjSA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.29.7",
+ "tslib": "^2.8.1",
+ "worker-factory": "^7.0.50"
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.22.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.0.tgz",
+ "integrity": "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
}
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
}
+ }
}
diff --git a/package.json b/package.json
index 92fb84e..d7fc9b2 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "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": "28.1.0",
+ "version": "28.2.0-rc.0",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
@@ -37,7 +37,9 @@
"node": ">=18.0.0"
},
"dependencies": {
- "json-bigint": "1.0.0"
+ "buffer": "6.0.3",
+ "json-bigint": "1.0.0",
+ "mqtt": "5.15.2"
},
"devDependencies": {
"@eslint/js": "10.0.1",
@@ -49,13 +51,14 @@
"playwright": "1.56.1",
"prettier": "3.9.6",
"rollup": "4.63.2",
+ "rollup-plugin-polyfill-node": "0.13.0",
"serve-handler": "6.1.7",
"tslib": "2.8.1",
"typescript": "5.9.3",
"typescript-eslint": "8.70.0"
},
"overrides": {
- "brace-expansion": "5.0.9"
+ "brace-expansion": "5.0.12"
},
"jsdelivr": "dist/iife/sdk.js",
"unpkg": "dist/iife/sdk.js"
diff --git a/rollup.config.mjs b/rollup.config.mjs
index 0d5864b..d75817e 100644
--- a/rollup.config.mjs
+++ b/rollup.config.mjs
@@ -3,6 +3,7 @@ const pkg = JSON.parse(readFileSync('./package.json', 'utf8'));
import typescript from '@rollup/plugin-typescript';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
+import nodePolyfills from 'rollup-plugin-polyfill-node';
const external = Object.keys(pkg.dependencies ?? {});
@@ -28,7 +29,10 @@ export default [
{
input: 'src/index.ts',
plugins: [
- resolve({ browser: true }),
+ // The Push service uses mqtt.js, which references Node built-ins
+ // (buffer/process/stream/…); polyfill them for the browser bundle.
+ nodePolyfills(),
+ resolve({ browser: true, preferBuiltins: false }),
commonjs(),
typescript({ outDir: 'dist' }),
],
@@ -38,6 +42,8 @@ export default [
file: pkg.jsdelivr,
name: 'Appwrite',
extend: true,
+ // A script tag has no module loader, so the lazy mqtt.js import is inlined here.
+ inlineDynamicImports: true,
},
],
},
diff --git a/src/client.ts b/src/client.ts
index 83690d6..502ecc1 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -368,6 +368,8 @@ class Client {
config: {
endpoint: string;
endpointRealtime: string;
+ endpointPush: string;
+ pushClientId: string;
project: string;
jwt: string;
bearer: string;
@@ -380,6 +382,8 @@ class Client {
} = {
endpoint: 'https://cloud.appwrite.io/v1',
endpointRealtime: '',
+ endpointPush: '',
+ pushClientId: '',
project: '',
jwt: '',
bearer: '',
@@ -397,7 +401,7 @@ class Client {
'x-sdk-name': 'Web',
'x-sdk-platform': 'client',
'x-sdk-language': 'web',
- 'x-sdk-version': '28.1.0',
+ 'x-sdk-version': '28.2.0-rc.0',
'X-Appwrite-Response-Format': '2.3.0',
};
@@ -467,6 +471,56 @@ class Client {
return this;
}
+ /**
+ * Set Push Endpoint
+ *
+ * The MQTT-over-WebSocket URL the AppwritePush service connects to.
+ *
+ * @param {string} endpointPush
+ *
+ * @returns {this}
+ */
+ setPushEndpoint(endpointPush: string): this {
+ if (!endpointPush || typeof endpointPush !== 'string') {
+ throw new AppwriteException('Endpoint must be a valid string');
+ }
+
+ if (
+ !endpointPush.startsWith('ws://') &&
+ !endpointPush.startsWith('wss://')
+ ) {
+ throw new AppwriteException(
+ 'Invalid push endpoint URL: ' + endpointPush,
+ );
+ }
+
+ this.config.endpointPush = endpointPush;
+ return this;
+ }
+
+ /**
+ * Set Push Client Id
+ *
+ * A stable client id for the AppwritePush service. The broker keys its
+ * offline-replay cursor on this id, so pass a stable value to resume replay across
+ * reloads/restarts. Defaults, when unset, to one per user and tab: stable across reloads of
+ * the tab, different in every other tab, and distinct for each connection open at the same
+ * time, so no two connections take over each other's session. An explicit id shared by
+ * several tabs or connections makes them do that.
+ *
+ * @param {string} pushClientId
+ *
+ * @returns {this}
+ */
+ setPushClientId(pushClientId: string): this {
+ if (!pushClientId || typeof pushClientId !== 'string') {
+ throw new AppwriteException('Client id must be a valid string');
+ }
+
+ this.config.pushClientId = pushClientId;
+ return this;
+ }
+
/**
* Set Project
*
@@ -985,6 +1039,11 @@ class Client {
for (const nestedValue of value) {
formData.append(`${key}[]`, nestedValue);
}
+ } else if (
+ value !== null &&
+ typeof value === 'object'
+ ) {
+ formData.append(key, JSONbig.stringify(value));
} else {
formData.append(key, value);
}
@@ -1006,6 +1065,7 @@ class Client {
headers: Headers = {},
originalPayload: Payload = {},
onProgress: (progress: UploadProgress) => void,
+ responseType = 'json',
) {
const [fileParam, file] =
Object.entries(originalPayload).find(
@@ -1013,11 +1073,23 @@ class Client {
) ?? [];
if (!file || !fileParam) {
- throw new Error('File not found in payload');
+ return await this.call(
+ method,
+ url,
+ headers,
+ originalPayload,
+ responseType,
+ );
}
- if (file.size <= Client.CHUNK_SIZE) {
- return await this.call(method, url, headers, originalPayload);
+ if (file.size <= Client.CHUNK_SIZE || responseType === 'text') {
+ return await this.call(
+ method,
+ url,
+ headers,
+ originalPayload,
+ responseType,
+ );
}
const totalChunks = Math.ceil(file.size / Client.CHUNK_SIZE);
@@ -1037,6 +1109,7 @@ class Client {
url,
firstChunkHeaders,
firstPayload,
+ responseType,
);
const uploadId = response?.$id;
@@ -1097,6 +1170,7 @@ class Client {
url,
chunkHeaders,
chunkPayload,
+ responseType,
);
if (rejected) {
@@ -1206,7 +1280,9 @@ class Client {
);
}
- if (
+ if (responseType === 'text' && response.status < 400) {
+ data = await response.text();
+ } else if (
response.headers.get('content-type')?.includes('application/json')
) {
data = JSONbig.parse(await response.text());
diff --git a/src/enums/o-auth-provider.ts b/src/enums/o-auth-provider.ts
index 92a9597..3dab5fb 100644
--- a/src/enums/o-auth-provider.ts
+++ b/src/enums/o-auth-provider.ts
@@ -41,6 +41,7 @@ export enum OAuthProvider {
Tradeshift = 'tradeshift',
TradeshiftBox = 'tradeshiftBox',
Twitch = 'twitch',
+ Webflow = 'webflow',
Wordpress = 'wordpress',
X = 'x',
Yahoo = 'yahoo',
diff --git a/src/index.ts b/src/index.ts
index 02956e9..dbf2afb 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -25,6 +25,7 @@ export { TablesDB } from './services/tables-db';
export { Teams } from './services/teams';
export { VectorsDB } from './services/vectors-db';
export { Realtime } from './services/realtime';
+export { Push } from './services/push';
export type {
Models,
Payload,
@@ -32,10 +33,17 @@ export type {
UploadProgress,
} from './client';
export type { RealtimeSubscription } from './services/realtime';
+export type {
+ PushMessage,
+ PushSubscription,
+ SubscribeOptions,
+ MessageCallback,
+} from './services/push';
export type { QueryTypes, QueryTypesList } from './query';
export { Permission } from './permission';
export { Role } from './role';
export { ID } from './id';
+export { Topic, ResolvedTopic } from './topic';
export { Channel } from './channel';
export { Operator, Condition } from './operator';
export { AuthenticatorType } from './enums/authenticator-type';
diff --git a/src/models.ts b/src/models.ts
index 9b12125..11354fb 100644
--- a/src/models.ts
+++ b/src/models.ts
@@ -582,6 +582,110 @@ export namespace Models {
threads: number;
};
+ /**
+ * Account
+ */
+ export type Account<
+ Preferences extends Models.Preferences = Models.DefaultPreferences,
+ > = {
+ /**
+ * User ID.
+ */
+ $id: string;
+ /**
+ * User creation date in ISO 8601 format.
+ */
+ $createdAt: string;
+ /**
+ * User update date in ISO 8601 format.
+ */
+ $updatedAt: string;
+ /**
+ * User name.
+ */
+ name: string;
+ /**
+ * User registration date in ISO 8601 format.
+ */
+ registration: string;
+ /**
+ * User status. Pass `true` for enabled and `false` for disabled.
+ */
+ status: boolean;
+ /**
+ * Labels for the user.
+ */
+ labels: string[];
+ /**
+ * Password update time in ISO 8601 format.
+ */
+ passwordUpdate: string;
+ /**
+ * User email address.
+ */
+ email: string;
+ /**
+ * User phone number in E.164 format.
+ */
+ phone: string;
+ /**
+ * Email verification status.
+ */
+ emailVerification: boolean;
+ /**
+ * Canonical form of the user email address.
+ */
+ emailCanonical?: string;
+ /**
+ * Whether the user email is from a free email provider.
+ */
+ emailIsFree?: boolean;
+ /**
+ * Whether the user email is from a disposable email provider.
+ */
+ emailIsDisposable?: boolean;
+ /**
+ * Whether the user email is from a corporate domain.
+ */
+ emailIsCorporate?: boolean;
+ /**
+ * Whether the user email is in its canonical form.
+ */
+ emailIsCanonical?: boolean;
+ /**
+ * Whether the password was found in a known data breach the last time it was checked. Null when the password has never been checked.
+ */
+ passwordPwned?: boolean;
+ /**
+ * Phone verification status.
+ */
+ phoneVerification: boolean;
+ /**
+ * Multi factor authentication status.
+ */
+ mfa: boolean;
+ /**
+ * User preferences as a key-value object
+ */
+ prefs: Preferences;
+ /**
+ * A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.
+ */
+ targets: Target[];
+ /**
+ * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.
+ */
+ accessedAt: string;
+ /**
+ * Whether the user can impersonate other users.
+ */
+ impersonator?: boolean;
+ /**
+ * ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.
+ */
+ impersonatorUserId?: string;
+ };
+
/**
* Preferences
*/
diff --git a/src/service.ts b/src/service.ts
deleted file mode 100644
index f602034..0000000
--- a/src/service.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { Client } from './client';
-import type { Payload } from './client';
-
-export class Service {
- /**
- * The size for chunked uploads in bytes.
- */
- static CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
-
- client: Client;
-
- constructor(client: Client) {
- this.client = client;
- }
-
- static flatten(data: Payload, prefix = ''): Payload {
- let output: Payload = {};
-
- for (const [key, value] of Object.entries(data)) {
- const finalKey = prefix ? prefix + '[' + key + ']' : key;
- if (Array.isArray(value)) {
- output = { ...output, ...Service.flatten(value, finalKey) };
- } else {
- output[finalKey] = value;
- }
- }
-
- return output;
- }
-}
diff --git a/src/services/account.ts b/src/services/account.ts
index 72b18fb..b1d3a3c 100644
--- a/src/services/account.ts
+++ b/src/services/account.ts
@@ -1,4 +1,3 @@
-import { Service } from '../service';
import { AppwriteException, Client, type Payload } from '../client';
import type { Models } from '../models';
@@ -23,7 +22,7 @@ export class Account {
Preferences extends Models.Preferences = Models.DefaultPreferences,
>(): Promise> {
const apiPath = '/account';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -31,7 +30,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -119,18 +118,18 @@ export class Account {
);
}
const apiPath = '/account';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof email !== 'undefined') {
- payload['email'] = email;
+ apiPayload['email'] = email;
}
if (typeof password !== 'undefined') {
- payload['password'] = password;
+ apiPayload['password'] = password;
}
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -140,7 +139,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -195,12 +194,12 @@ export class Account {
const total = params.total;
const apiPath = '/account/consents';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -209,7 +208,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -257,7 +256,7 @@ export class Account {
'{consentId}',
encodeURIComponent(String(consentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -265,7 +264,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -311,7 +310,7 @@ export class Account {
'{consentId}',
encodeURIComponent(String(consentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -320,7 +319,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -390,12 +389,12 @@ export class Account {
'{consentId}',
encodeURIComponent(String(consentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -404,7 +403,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -470,7 +469,7 @@ export class Account {
const apiPath = '/account/consents/{consentId}/tokens/{tokenId}'
.replace('{consentId}', encodeURIComponent(String(consentId)))
.replace('{tokenId}', encodeURIComponent(String(tokenId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -478,7 +477,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -541,7 +540,7 @@ export class Account {
const apiPath = '/account/consents/{consentId}/tokens/{tokenId}'
.replace('{consentId}', encodeURIComponent(String(consentId)))
.replace('{tokenId}', encodeURIComponent(String(tokenId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -550,7 +549,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -619,12 +618,12 @@ export class Account {
);
}
const apiPath = '/account/email';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof email !== 'undefined') {
- payload['email'] = email;
+ apiPayload['email'] = email;
}
if (typeof password !== 'undefined') {
- payload['password'] = password;
+ apiPayload['password'] = password;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -634,7 +633,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -689,12 +688,12 @@ export class Account {
const total = params.total;
const apiPath = '/account/identities';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -703,7 +702,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -751,7 +750,7 @@ export class Account {
'{identityId}',
encodeURIComponent(String(identityId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -760,7 +759,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -801,9 +800,9 @@ export class Account {
const duration = params.duration;
const apiPath = '/account/jwts';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof duration !== 'undefined') {
- payload['duration'] = duration;
+ apiPayload['duration'] = duration;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -813,7 +812,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -862,9 +861,9 @@ export class Account {
throw new AppwriteException('Missing required parameter: "mfa"');
}
const apiPath = '/account/mfa';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof mfa !== 'undefined') {
- payload['mfa'] = mfa;
+ apiPayload['mfa'] = mfa;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -874,7 +873,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -924,7 +923,7 @@ export class Account {
'{type}',
encodeURIComponent(String(type)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -933,7 +932,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -982,7 +981,7 @@ export class Account {
'{type}',
encodeURIComponent(String(type)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -991,7 +990,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1060,9 +1059,9 @@ export class Account {
'{type}',
encodeURIComponent(String(type)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof otp !== 'undefined') {
- payload['otp'] = otp;
+ apiPayload['otp'] = otp;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1072,7 +1071,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -1140,9 +1139,9 @@ export class Account {
'{type}',
encodeURIComponent(String(type)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof otp !== 'undefined') {
- payload['otp'] = otp;
+ apiPayload['otp'] = otp;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1152,7 +1151,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -1200,7 +1199,7 @@ export class Account {
'{type}',
encodeURIComponent(String(type)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1209,7 +1208,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -1256,7 +1255,7 @@ export class Account {
'{type}',
encodeURIComponent(String(type)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1265,7 +1264,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -1314,9 +1313,9 @@ export class Account {
throw new AppwriteException('Missing required parameter: "factor"');
}
const apiPath = '/account/mfa/challenges';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof factor !== 'undefined') {
- payload['factor'] = factor;
+ apiPayload['factor'] = factor;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1326,7 +1325,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1374,9 +1373,9 @@ export class Account {
throw new AppwriteException('Missing required parameter: "factor"');
}
const apiPath = '/account/mfa/challenges';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof factor !== 'undefined') {
- payload['factor'] = factor;
+ apiPayload['factor'] = factor;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1386,7 +1385,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1449,12 +1448,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "otp"');
}
const apiPath = '/account/mfa/challenges';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof challengeId !== 'undefined') {
- payload['challengeId'] = challengeId;
+ apiPayload['challengeId'] = challengeId;
}
if (typeof otp !== 'undefined') {
- payload['otp'] = otp;
+ apiPayload['otp'] = otp;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1464,7 +1463,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -1526,12 +1525,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "otp"');
}
const apiPath = '/account/mfa/challenges';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof challengeId !== 'undefined') {
- payload['challengeId'] = challengeId;
+ apiPayload['challengeId'] = challengeId;
}
if (typeof otp !== 'undefined') {
- payload['otp'] = otp;
+ apiPayload['otp'] = otp;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1541,7 +1540,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -1553,7 +1552,7 @@ export class Account {
*/
listMfaFactors(): Promise {
const apiPath = '/account/mfa/factors';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1561,7 +1560,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1572,7 +1571,7 @@ export class Account {
*/
listMFAFactors(): Promise {
const apiPath = '/account/mfa/factors';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1580,7 +1579,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1592,7 +1591,7 @@ export class Account {
*/
getMfaRecoveryCodes(): Promise {
const apiPath = '/account/mfa/recovery-codes';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1600,7 +1599,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1611,7 +1610,7 @@ export class Account {
*/
getMFARecoveryCodes(): Promise {
const apiPath = '/account/mfa/recovery-codes';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1619,7 +1618,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1631,7 +1630,7 @@ export class Account {
*/
createMfaRecoveryCodes(): Promise {
const apiPath = '/account/mfa/recovery-codes';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1640,7 +1639,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1651,7 +1650,7 @@ export class Account {
*/
createMFARecoveryCodes(): Promise {
const apiPath = '/account/mfa/recovery-codes';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1660,7 +1659,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1672,7 +1671,7 @@ export class Account {
*/
updateMfaRecoveryCodes(): Promise {
const apiPath = '/account/mfa/recovery-codes';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1681,7 +1680,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1692,7 +1691,7 @@ export class Account {
*/
updateMFARecoveryCodes(): Promise {
const apiPath = '/account/mfa/recovery-codes';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1701,7 +1700,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1750,9 +1749,9 @@ export class Account {
throw new AppwriteException('Missing required parameter: "name"');
}
const apiPath = '/account/name';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1762,7 +1761,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1827,12 +1826,12 @@ export class Account {
);
}
const apiPath = '/account/password';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof password !== 'undefined') {
- payload['password'] = password;
+ apiPayload['password'] = password;
}
if (typeof oldPassword !== 'undefined') {
- payload['oldPassword'] = oldPassword;
+ apiPayload['oldPassword'] = oldPassword;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1842,7 +1841,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1907,12 +1906,12 @@ export class Account {
);
}
const apiPath = '/account/phone';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof phone !== 'undefined') {
- payload['phone'] = phone;
+ apiPayload['phone'] = phone;
}
if (typeof password !== 'undefined') {
- payload['password'] = password;
+ apiPayload['password'] = password;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1922,7 +1921,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1935,7 +1934,7 @@ export class Account {
Preferences extends Models.Preferences = Models.DefaultPreferences,
>(): Promise {
const apiPath = '/account/prefs';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1943,7 +1942,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1995,9 +1994,9 @@ export class Account {
throw new AppwriteException('Missing required parameter: "prefs"');
}
const apiPath = '/account/prefs';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof prefs !== 'undefined') {
- payload['prefs'] = prefs;
+ apiPayload['prefs'] = prefs;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2007,7 +2006,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -2061,12 +2060,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "url"');
}
const apiPath = '/account/recovery';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof email !== 'undefined') {
- payload['email'] = email;
+ apiPayload['email'] = email;
}
if (typeof url !== 'undefined') {
- payload['url'] = url;
+ apiPayload['url'] = url;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2076,7 +2075,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -2153,15 +2152,15 @@ export class Account {
);
}
const apiPath = '/account/recovery';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
if (typeof password !== 'undefined') {
- payload['password'] = password;
+ apiPayload['password'] = password;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2171,7 +2170,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -2231,12 +2230,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "email"');
}
const apiPath = '/account/recovery/otp';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof email !== 'undefined') {
- payload['email'] = email;
+ apiPayload['email'] = email;
}
if (typeof phrase !== 'undefined') {
- payload['phrase'] = phrase;
+ apiPayload['phrase'] = phrase;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2246,7 +2245,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -2321,15 +2320,15 @@ export class Account {
);
}
const apiPath = '/account/recovery/otp';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
if (typeof password !== 'undefined') {
- payload['password'] = password;
+ apiPayload['password'] = password;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2339,18 +2338,51 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
* Get the list of active sessions across different devices for the currently logged in user.
*
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ */
+ listSessions(params?: { total?: boolean }): Promise;
+ /**
+ * Get the list of active sessions across different devices for the currently logged in user.
+ *
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
*/
- listSessions(): Promise {
+ listSessions(total?: boolean): Promise;
+ listSessions(
+ paramsOrFirst?: { total?: boolean } | boolean,
+ ): Promise {
+ let params: { total?: boolean };
+
+ if (
+ typeof paramsOrFirst === 'undefined' ||
+ (paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst))
+ ) {
+ params = (paramsOrFirst || {}) as { total?: boolean };
+ } else {
+ params = {
+ total: paramsOrFirst as boolean,
+ };
+ }
+
+ const total = params.total;
+
const apiPath = '/account/sessions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -2358,18 +2390,51 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
- * Delete all sessions from the user account and remove any sessions cookies from the end client.
+ * Delete all sessions from the user account and remove any sessions cookies from the end client. Pass `current` as false to keep the session making the request and sign out of every other session.
*
+ * @param {boolean} params.current - Delete the current session too. Use false to sign out of every other session while staying signed in on this one.
* @throws {AppwriteException}
* @returns {Promise<{}>}
*/
- deleteSessions(): Promise<{}> {
+ deleteSessions(params?: { current?: boolean }): Promise<{}>;
+ /**
+ * Delete all sessions from the user account and remove any sessions cookies from the end client. Pass `current` as false to keep the session making the request and sign out of every other session.
+ *
+ * @param {boolean} current - Delete the current session too. Use false to sign out of every other session while staying signed in on this one.
+ * @throws {AppwriteException}
+ * @returns {Promise<{}>}
+ * @deprecated Use the object parameter style method for a better developer experience.
+ */
+ deleteSessions(current?: boolean): Promise<{}>;
+ deleteSessions(
+ paramsOrFirst?: { current?: boolean } | boolean,
+ ): Promise<{}> {
+ let params: { current?: boolean };
+
+ if (
+ typeof paramsOrFirst === 'undefined' ||
+ (paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst))
+ ) {
+ params = (paramsOrFirst || {}) as { current?: boolean };
+ } else {
+ params = {
+ current: paramsOrFirst as boolean,
+ };
+ }
+
+ const current = params.current;
+
const apiPath = '/account/sessions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
+ if (typeof current !== 'undefined') {
+ apiPayload['current'] = current;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -2378,7 +2443,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -2389,7 +2454,7 @@ export class Account {
*/
createAnonymousSession(): Promise {
const apiPath = '/account/sessions/anonymous';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -2398,30 +2463,33 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
- * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.
+ * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. Use the optional `duration` parameter to create a shorter session, for example when the user doesn't choose "remember me". It must be at least 60 seconds and cannot exceed the project maximum session length.
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} params.email - User email.
* @param {string} params.password - User password. Must be at least 8 chars.
+ * @param {number} params.duration - Session length in seconds. Minimum is 60 seconds, and it cannot exceed the project maximum session length. Defaults to the project maximum session length.
* @throws {AppwriteException}
* @returns {Promise}
*/
createEmailPasswordSession(params: {
email: string;
password: string;
+ duration?: number;
}): Promise;
/**
- * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.
+ * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. Use the optional `duration` parameter to create a shorter session, for example when the user doesn't choose "remember me". It must be at least 60 seconds and cannot exceed the project maximum session length.
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
* @param {string} email - User email.
* @param {string} password - User password. Must be at least 8 chars.
+ * @param {number} duration - Session length in seconds. Minimum is 60 seconds, and it cannot exceed the project maximum session length. Defaults to the project maximum session length.
* @throws {AppwriteException}
* @returns {Promise}
* @deprecated Use the object parameter style method for a better developer experience.
@@ -2429,12 +2497,14 @@ export class Account {
createEmailPasswordSession(
email: string,
password: string,
+ duration?: number,
): Promise;
createEmailPasswordSession(
- paramsOrFirst: { email: string; password: string } | string,
- ...rest: [string?]
+ paramsOrFirst:
+ { email: string; password: string; duration?: number } | string,
+ ...rest: [string?, number?]
): Promise {
- let params: { email: string; password: string };
+ let params: { email: string; password: string; duration?: number };
if (
paramsOrFirst &&
@@ -2444,16 +2514,19 @@ export class Account {
params = (paramsOrFirst || {}) as {
email: string;
password: string;
+ duration?: number;
};
} else {
params = {
email: paramsOrFirst as string,
password: rest[0] as string,
+ duration: rest[1] as number,
};
}
const email = params.email;
const password = params.password;
+ const duration = params.duration;
if (typeof email === 'undefined') {
throw new AppwriteException('Missing required parameter: "email"');
@@ -2464,12 +2537,15 @@ export class Account {
);
}
const apiPath = '/account/sessions/email';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof email !== 'undefined') {
- payload['email'] = email;
+ apiPayload['email'] = email;
}
if (typeof password !== 'undefined') {
- payload['password'] = password;
+ apiPayload['password'] = password;
+ }
+ if (typeof duration !== 'undefined') {
+ apiPayload['duration'] = duration;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2479,7 +2555,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -2615,24 +2691,24 @@ export class Account {
);
}
const apiPath = '/account/sessions/id-token';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof provider !== 'undefined') {
- payload['provider'] = provider;
+ apiPayload['provider'] = provider;
}
if (typeof idToken !== 'undefined') {
- payload['idToken'] = idToken;
+ apiPayload['idToken'] = idToken;
}
if (typeof nonce !== 'undefined') {
- payload['nonce'] = nonce;
+ apiPayload['nonce'] = nonce;
}
if (typeof accessToken !== 'undefined') {
- payload['accessToken'] = accessToken;
+ apiPayload['accessToken'] = accessToken;
}
if (typeof accessTokenExpiry !== 'undefined') {
- payload['accessTokenExpiry'] = accessTokenExpiry;
+ apiPayload['accessTokenExpiry'] = accessTokenExpiry;
}
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2642,7 +2718,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -2703,12 +2779,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "secret"');
}
const apiPath = '/account/sessions/magic-url';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2718,7 +2794,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -2729,7 +2805,7 @@ export class Account {
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
*
- * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
+ * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
* @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
@@ -2750,7 +2826,7 @@ export class Account {
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
*
- * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
+ * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
* @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
@@ -2820,21 +2896,21 @@ export class Account {
'{provider}',
encodeURIComponent(String(provider)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof success !== 'undefined') {
- payload['success'] = success;
+ apiPayload['success'] = success;
}
if (typeof failure !== 'undefined') {
- payload['failure'] = failure;
+ apiPayload['failure'] = failure;
}
if (typeof scopes !== 'undefined') {
- payload['scopes'] = scopes;
+ apiPayload['scopes'] = scopes;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
+ apiPayload['project'] = this.client.config.project;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -2901,12 +2977,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "secret"');
}
const apiPath = '/account/sessions/phone';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2916,7 +2992,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -2973,12 +3049,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "secret"');
}
const apiPath = '/account/sessions/token';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -2988,7 +3064,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -3036,7 +3112,7 @@ export class Account {
'{sessionId}',
encodeURIComponent(String(sessionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -3044,7 +3120,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -3092,7 +3168,7 @@ export class Account {
'{sessionId}',
encodeURIComponent(String(sessionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -3101,7 +3177,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -3147,7 +3223,7 @@ export class Account {
'{sessionId}',
encodeURIComponent(String(sessionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -3156,7 +3232,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -3169,7 +3245,7 @@ export class Account {
Preferences extends Models.Preferences = Models.DefaultPreferences,
>(): Promise> {
const apiPath = '/account/status';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -3178,7 +3254,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -3255,15 +3331,15 @@ export class Account {
);
}
const apiPath = '/account/targets/push';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof targetId !== 'undefined') {
- payload['targetId'] = targetId;
+ apiPayload['targetId'] = targetId;
}
if (typeof identifier !== 'undefined') {
- payload['identifier'] = identifier;
+ apiPayload['identifier'] = identifier;
}
if (typeof providerId !== 'undefined') {
- payload['providerId'] = providerId;
+ apiPayload['providerId'] = providerId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -3273,7 +3349,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -3340,9 +3416,9 @@ export class Account {
'{targetId}',
encodeURIComponent(String(targetId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof identifier !== 'undefined') {
- payload['identifier'] = identifier;
+ apiPayload['identifier'] = identifier;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -3352,7 +3428,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -3400,7 +3476,7 @@ export class Account {
'{targetId}',
encodeURIComponent(String(targetId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -3409,7 +3485,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -3483,15 +3559,15 @@ export class Account {
throw new AppwriteException('Missing required parameter: "email"');
}
const apiPath = '/account/tokens/email';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof email !== 'undefined') {
- payload['email'] = email;
+ apiPayload['email'] = email;
}
if (typeof phrase !== 'undefined') {
- payload['phrase'] = phrase;
+ apiPayload['phrase'] = phrase;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -3501,7 +3577,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -3588,18 +3664,18 @@ export class Account {
throw new AppwriteException('Missing required parameter: "email"');
}
const apiPath = '/account/tokens/magic-url';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof email !== 'undefined') {
- payload['email'] = email;
+ apiPayload['email'] = email;
}
if (typeof url !== 'undefined') {
- payload['url'] = url;
+ apiPayload['url'] = url;
}
if (typeof phrase !== 'undefined') {
- payload['phrase'] = phrase;
+ apiPayload['phrase'] = phrase;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -3609,7 +3685,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -3621,7 +3697,7 @@ export class Account {
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
- * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
+ * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
* @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
@@ -3643,7 +3719,7 @@ export class Account {
*
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
*
- * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
+ * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
* @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
* @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
@@ -3713,21 +3789,21 @@ export class Account {
'{provider}',
encodeURIComponent(String(provider)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof success !== 'undefined') {
- payload['success'] = success;
+ apiPayload['success'] = success;
}
if (typeof failure !== 'undefined') {
- payload['failure'] = failure;
+ apiPayload['failure'] = failure;
}
if (typeof scopes !== 'undefined') {
- payload['scopes'] = scopes;
+ apiPayload['scopes'] = scopes;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
+ apiPayload['project'] = this.client.config.project;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -3794,12 +3870,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "phone"');
}
const apiPath = '/account/tokens/phone';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof phone !== 'undefined') {
- payload['phone'] = phone;
+ apiPayload['phone'] = phone;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -3809,7 +3885,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -3858,9 +3934,9 @@ export class Account {
throw new AppwriteException('Missing required parameter: "url"');
}
const apiPath = '/account/verifications/email';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof url !== 'undefined') {
- payload['url'] = url;
+ apiPayload['url'] = url;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -3870,7 +3946,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -3920,9 +3996,9 @@ export class Account {
throw new AppwriteException('Missing required parameter: "url"');
}
const apiPath = '/account/verifications/email';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof url !== 'undefined') {
- payload['url'] = url;
+ apiPayload['url'] = url;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -3932,7 +4008,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -3992,12 +4068,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "secret"');
}
const apiPath = '/account/verifications/email';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -4007,7 +4083,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -4065,12 +4141,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "secret"');
}
const apiPath = '/account/verifications/email';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -4080,7 +4156,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -4129,9 +4205,9 @@ export class Account {
const phrase = params.phrase;
const apiPath = '/account/verifications/email/otp';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof phrase !== 'undefined') {
- payload['phrase'] = phrase;
+ apiPayload['phrase'] = phrase;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -4141,7 +4217,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -4203,12 +4279,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "secret"');
}
const apiPath = '/account/verifications/email/otp';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -4218,7 +4294,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -4229,7 +4305,7 @@ export class Account {
*/
createPhoneVerification(): Promise {
const apiPath = '/account/verifications/phone';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -4238,7 +4314,7 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -4298,12 +4374,12 @@ export class Account {
throw new AppwriteException('Missing required parameter: "secret"');
}
const apiPath = '/account/verifications/phone';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -4313,6 +4389,6 @@ export class Account {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/apps.ts b/src/services/apps.ts
index b746385..bd67c75 100644
--- a/src/services/apps.ts
+++ b/src/services/apps.ts
@@ -57,12 +57,12 @@ export class Apps {
const total = params.total;
const apiPath = '/apps';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -71,7 +71,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -316,63 +316,63 @@ export class Apps {
);
}
const apiPath = '/apps';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof appId !== 'undefined') {
- payload['appId'] = appId;
+ apiPayload['appId'] = appId;
}
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
if (typeof description !== 'undefined') {
- payload['description'] = description;
+ apiPayload['description'] = description;
}
if (typeof clientUri !== 'undefined') {
- payload['clientUri'] = clientUri;
+ apiPayload['clientUri'] = clientUri;
}
if (typeof logoUri !== 'undefined') {
- payload['logoUri'] = logoUri;
+ apiPayload['logoUri'] = logoUri;
}
if (typeof privacyPolicyUrl !== 'undefined') {
- payload['privacyPolicyUrl'] = privacyPolicyUrl;
+ apiPayload['privacyPolicyUrl'] = privacyPolicyUrl;
}
if (typeof termsUrl !== 'undefined') {
- payload['termsUrl'] = termsUrl;
+ apiPayload['termsUrl'] = termsUrl;
}
if (typeof contacts !== 'undefined') {
- payload['contacts'] = contacts;
+ apiPayload['contacts'] = contacts;
}
if (typeof tagline !== 'undefined') {
- payload['tagline'] = tagline;
+ apiPayload['tagline'] = tagline;
}
if (typeof tags !== 'undefined') {
- payload['tags'] = tags;
+ apiPayload['tags'] = tags;
}
if (typeof images !== 'undefined') {
- payload['images'] = images;
+ apiPayload['images'] = images;
}
if (typeof supportUrl !== 'undefined') {
- payload['supportUrl'] = supportUrl;
+ apiPayload['supportUrl'] = supportUrl;
}
if (typeof dataDeletionUrl !== 'undefined') {
- payload['dataDeletionUrl'] = dataDeletionUrl;
+ apiPayload['dataDeletionUrl'] = dataDeletionUrl;
}
if (typeof redirectUris !== 'undefined') {
- payload['redirectUris'] = redirectUris;
+ apiPayload['redirectUris'] = redirectUris;
}
if (typeof postLogoutRedirectUris !== 'undefined') {
- payload['postLogoutRedirectUris'] = postLogoutRedirectUris;
+ apiPayload['postLogoutRedirectUris'] = postLogoutRedirectUris;
}
if (typeof enabled !== 'undefined') {
- payload['enabled'] = enabled;
+ apiPayload['enabled'] = enabled;
}
if (typeof type !== 'undefined') {
- payload['type'] = type;
+ apiPayload['type'] = type;
}
if (typeof deviceFlow !== 'undefined') {
- payload['deviceFlow'] = deviceFlow;
+ apiPayload['deviceFlow'] = deviceFlow;
}
if (typeof teamId !== 'undefined') {
- payload['teamId'] = teamId;
+ apiPayload['teamId'] = teamId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -382,7 +382,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -393,7 +393,7 @@ export class Apps {
*/
listInstallationScopes(): Promise {
const apiPath = '/apps/scopes/installations';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -401,7 +401,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -412,7 +412,7 @@ export class Apps {
*/
listOAuth2Scopes(): Promise {
const apiPath = '/apps/scopes/oauth2';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -420,7 +420,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -464,7 +464,7 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -472,7 +472,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -725,63 +725,63 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
if (typeof description !== 'undefined') {
- payload['description'] = description;
+ apiPayload['description'] = description;
}
if (typeof clientUri !== 'undefined') {
- payload['clientUri'] = clientUri;
+ apiPayload['clientUri'] = clientUri;
}
if (typeof logoUri !== 'undefined') {
- payload['logoUri'] = logoUri;
+ apiPayload['logoUri'] = logoUri;
}
if (typeof privacyPolicyUrl !== 'undefined') {
- payload['privacyPolicyUrl'] = privacyPolicyUrl;
+ apiPayload['privacyPolicyUrl'] = privacyPolicyUrl;
}
if (typeof termsUrl !== 'undefined') {
- payload['termsUrl'] = termsUrl;
+ apiPayload['termsUrl'] = termsUrl;
}
if (typeof contacts !== 'undefined') {
- payload['contacts'] = contacts;
+ apiPayload['contacts'] = contacts;
}
if (typeof tagline !== 'undefined') {
- payload['tagline'] = tagline;
+ apiPayload['tagline'] = tagline;
}
if (typeof tags !== 'undefined') {
- payload['tags'] = tags;
+ apiPayload['tags'] = tags;
}
if (typeof images !== 'undefined') {
- payload['images'] = images;
+ apiPayload['images'] = images;
}
if (typeof supportUrl !== 'undefined') {
- payload['supportUrl'] = supportUrl;
+ apiPayload['supportUrl'] = supportUrl;
}
if (typeof dataDeletionUrl !== 'undefined') {
- payload['dataDeletionUrl'] = dataDeletionUrl;
+ apiPayload['dataDeletionUrl'] = dataDeletionUrl;
}
if (typeof enabled !== 'undefined') {
- payload['enabled'] = enabled;
+ apiPayload['enabled'] = enabled;
}
if (typeof redirectUris !== 'undefined') {
- payload['redirectUris'] = redirectUris;
+ apiPayload['redirectUris'] = redirectUris;
}
if (typeof postLogoutRedirectUris !== 'undefined') {
- payload['postLogoutRedirectUris'] = postLogoutRedirectUris;
+ apiPayload['postLogoutRedirectUris'] = postLogoutRedirectUris;
}
if (typeof type !== 'undefined') {
- payload['type'] = type;
+ apiPayload['type'] = type;
}
if (typeof deviceFlow !== 'undefined') {
- payload['deviceFlow'] = deviceFlow;
+ apiPayload['deviceFlow'] = deviceFlow;
}
if (typeof installationScopes !== 'undefined') {
- payload['installationScopes'] = installationScopes;
+ apiPayload['installationScopes'] = installationScopes;
}
if (typeof installationRedirectUrl !== 'undefined') {
- payload['installationRedirectUrl'] = installationRedirectUrl;
+ apiPayload['installationRedirectUrl'] = installationRedirectUrl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -791,7 +791,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -835,7 +835,7 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -844,7 +844,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -912,12 +912,12 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -926,7 +926,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -993,7 +993,7 @@ export class Apps {
'{installationId}',
encodeURIComponent(String(installationId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1001,7 +1001,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1065,7 +1065,7 @@ export class Apps {
'{installationId}',
encodeURIComponent(String(installationId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1074,7 +1074,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -1141,7 +1141,7 @@ export class Apps {
'{installationId}',
encodeURIComponent(String(installationId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1150,7 +1150,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1218,12 +1218,12 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1232,7 +1232,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1278,7 +1278,7 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1287,7 +1287,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1340,7 +1340,7 @@ export class Apps {
const apiPath = '/apps/{appId}/keys/{keyId}'
.replace('{appId}', encodeURIComponent(String(appId)))
.replace('{keyId}', encodeURIComponent(String(keyId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1348,7 +1348,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1401,7 +1401,7 @@ export class Apps {
const apiPath = '/apps/{appId}/keys/{keyId}'
.replace('{appId}', encodeURIComponent(String(appId)))
.replace('{keyId}', encodeURIComponent(String(keyId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1410,7 +1410,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -1478,12 +1478,12 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1492,7 +1492,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1538,7 +1538,7 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1547,7 +1547,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1608,7 +1608,7 @@ export class Apps {
const apiPath = '/apps/{appId}/secrets/{secretId}'
.replace('{appId}', encodeURIComponent(String(appId)))
.replace('{secretId}', encodeURIComponent(String(secretId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1616,7 +1616,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1674,7 +1674,7 @@ export class Apps {
const apiPath = '/apps/{appId}/secrets/{secretId}'
.replace('{appId}', encodeURIComponent(String(appId)))
.replace('{secretId}', encodeURIComponent(String(secretId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1683,7 +1683,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -1737,9 +1737,9 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof teamId !== 'undefined') {
- payload['teamId'] = teamId;
+ apiPayload['teamId'] = teamId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1749,7 +1749,7 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1793,7 +1793,7 @@ export class Apps {
'{appId}',
encodeURIComponent(String(appId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1802,6 +1802,6 @@ export class Apps {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/avatars.ts b/src/services/avatars.ts
index 84c42d3..eaec088 100644
--- a/src/services/avatars.ts
+++ b/src/services/avatars.ts
@@ -1,5 +1,10 @@
-import { Service } from '../service';
-import { AppwriteException, Client, type Payload } from '../client';
+import {
+ AppwriteException,
+ Client,
+ type Payload,
+ UploadProgress,
+} from '../client';
+import type { Models } from '../models';
import { Browser } from '../enums/browser';
import { CreditCard } from '../enums/credit-card';
@@ -106,22 +111,22 @@ export class Avatars {
'{code}',
encodeURIComponent(String(code)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof width !== 'undefined') {
- payload['width'] = width;
+ apiPayload['width'] = width;
}
if (typeof height !== 'undefined') {
- payload['height'] = height;
+ apiPayload['height'] = height;
}
if (typeof quality !== 'undefined') {
- payload['quality'] = quality;
+ apiPayload['quality'] = quality;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -221,22 +226,22 @@ export class Avatars {
'{code}',
encodeURIComponent(String(code)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof width !== 'undefined') {
- payload['width'] = width;
+ apiPayload['width'] = width;
}
if (typeof height !== 'undefined') {
- payload['height'] = height;
+ apiPayload['height'] = height;
}
if (typeof quality !== 'undefined') {
- payload['quality'] = quality;
+ apiPayload['quality'] = quality;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -285,16 +290,16 @@ export class Avatars {
throw new AppwriteException('Missing required parameter: "url"');
}
const apiPath = '/avatars/favicon';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof url !== 'undefined') {
- payload['url'] = url;
+ apiPayload['url'] = url;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -389,22 +394,22 @@ export class Avatars {
'{code}',
encodeURIComponent(String(code)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof width !== 'undefined') {
- payload['width'] = width;
+ apiPayload['width'] = width;
}
if (typeof height !== 'undefined') {
- payload['height'] = height;
+ apiPayload['height'] = height;
}
if (typeof quality !== 'undefined') {
- payload['quality'] = quality;
+ apiPayload['quality'] = quality;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -473,22 +478,22 @@ export class Avatars {
throw new AppwriteException('Missing required parameter: "url"');
}
const apiPath = '/avatars/image';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof url !== 'undefined') {
- payload['url'] = url;
+ apiPayload['url'] = url;
}
if (typeof width !== 'undefined') {
- payload['width'] = width;
+ apiPayload['width'] = width;
}
if (typeof height !== 'undefined') {
- payload['height'] = height;
+ apiPayload['height'] = height;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -583,25 +588,25 @@ export class Avatars {
const background = params.background;
const apiPath = '/avatars/initials';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
if (typeof width !== 'undefined') {
- payload['width'] = width;
+ apiPayload['width'] = width;
}
if (typeof height !== 'undefined') {
- payload['height'] = height;
+ apiPayload['height'] = height;
}
if (typeof background !== 'undefined') {
- payload['background'] = background;
+ apiPayload['background'] = background;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -609,7 +614,7 @@ export class Avatars {
}
/**
- * Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback.
+ * Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: a custom uploaded photo (see avatars.updatePhoto), OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback.
*
* Passing `userId` — `current()` for the authenticated user — resolves the photo from everything known about that user: identity photos, email, and name. An explicit `emailHash` or `name` then overrides just that value, and the user's remaining sources stay in the chain. Without `userId`, passing `emailHash` and/or `name` resolves the avatar from those values alone: the hash is looked up on Gravatar and Libravatar, the name is rendered as initials, and the session user stays out of the chain so their own photo never shadows the avatar being asked for. When nothing is passed, the photo resolves for the currently authenticated user. Emails are only ever accepted pre-hashed, so no address ends up in a URL.
*
@@ -635,7 +640,7 @@ export class Avatars {
name?: string;
}): string;
/**
- * Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback.
+ * Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: a custom uploaded photo (see avatars.updatePhoto), OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback.
*
* Passing `userId` — `current()` for the authenticated user — resolves the photo from everything known about that user: identity photos, email, and name. An explicit `emailHash` or `name` then overrides just that value, and the user's remaining sources stay in the chain. Without `userId`, passing `emailHash` and/or `name` resolves the avatar from those values alone: the hash is looked up on Gravatar and Libravatar, the name is rendered as initials, and the session user stays out of the chain so their own photo never shadows the avatar being asked for. When nothing is passed, the photo resolves for the currently authenticated user. Emails are only ever accepted pre-hashed, so no address ends up in a URL.
*
@@ -726,43 +731,145 @@ export class Avatars {
const name = params.name;
const apiPath = '/avatars/photo';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof width !== 'undefined') {
- payload['width'] = width;
+ apiPayload['width'] = width;
}
if (typeof height !== 'undefined') {
- payload['height'] = height;
+ apiPayload['height'] = height;
}
if (typeof quality !== 'undefined') {
- payload['quality'] = quality;
+ apiPayload['quality'] = quality;
}
if (typeof output !== 'undefined') {
- payload['output'] = output;
+ apiPayload['output'] = output;
}
if (typeof rating !== 'undefined') {
- payload['rating'] = rating;
+ apiPayload['rating'] = rating;
}
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof emailHash !== 'undefined') {
- payload['emailHash'] = emailHash;
+ apiPayload['emailHash'] = emailHash;
}
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
return uri.toString();
}
+ /**
+ * Update the profile photo of the currently authenticated user. The uploaded image takes priority over every other photo source, including OAuth2 identity photos, Gravatar, and Libravatar. Updating an already customized photo replaces it. The image must be at most 5MB and is sent in a single request.
+ *
+ * @param {File} params.file - Binary image file of at most 5MB. Allowed file types are png, jpg, jpeg, and webp.
+ * @throws {AppwriteException}
+ * @returns {Promise>}
+ */
+ updatePhoto<
+ Preferences extends Models.Preferences = Models.DefaultPreferences,
+ >(params: {
+ file: File;
+ onProgress?: (progress: UploadProgress) => void;
+ }): Promise>;
+ /**
+ * Update the profile photo of the currently authenticated user. The uploaded image takes priority over every other photo source, including OAuth2 identity photos, Gravatar, and Libravatar. Updating an already customized photo replaces it. The image must be at most 5MB and is sent in a single request.
+ *
+ * @param {File} file - Binary image file of at most 5MB. Allowed file types are png, jpg, jpeg, and webp.
+ * @throws {AppwriteException}
+ * @returns {Promise>}
+ * @deprecated Use the object parameter style method for a better developer experience.
+ */
+ updatePhoto<
+ Preferences extends Models.Preferences = Models.DefaultPreferences,
+ >(
+ file: File,
+ onProgress?: (progress: UploadProgress) => void,
+ ): Promise>;
+ updatePhoto<
+ Preferences extends Models.Preferences = Models.DefaultPreferences,
+ >(
+ paramsOrFirst:
+ | { file: File; onProgress?: (progress: UploadProgress) => void }
+ | File,
+ ...rest: [((progress: UploadProgress) => void)?]
+ ): Promise> {
+ let params: { file: File };
+ let onProgress: (progress: UploadProgress) => void;
+
+ if (
+ paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst) &&
+ ('file' in paramsOrFirst || 'onProgress' in paramsOrFirst)
+ ) {
+ params = (paramsOrFirst || {}) as { file: File };
+ onProgress = paramsOrFirst?.onProgress as (
+ progress: UploadProgress,
+ ) => void;
+ } else {
+ params = {
+ file: paramsOrFirst as File,
+ };
+ onProgress = rest[0] as (progress: UploadProgress) => void;
+ }
+
+ const file = params.file;
+
+ if (typeof file === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "file"');
+ }
+ const apiPath = '/avatars/photo';
+ const apiPayload: Payload = {};
+ if (typeof file !== 'undefined') {
+ apiPayload['file'] = file;
+ }
+ const uri = new URL(this.client.config.endpoint + apiPath);
+
+ const apiHeaders: { [header: string]: string } = {
+ 'X-Appwrite-Project': this.client.config.project,
+ 'content-type': 'multipart/form-data',
+ accept: 'application/json',
+ };
+
+ return this.client.chunkedUpload(
+ 'put',
+ uri,
+ apiHeaders,
+ apiPayload,
+ onProgress,
+ );
+ }
+
+ /**
+ * Delete the profile photo of the currently authenticated user and store the built-in static placeholder in its place. The placeholder is the user's photo from then on, so it takes priority over every other photo source — OAuth2 identity photos, Gravatar, Libravatar, and initials — until a new photo is uploaded with avatars.updatePhoto.
+ *
+ * @throws {AppwriteException}
+ * @returns {Promise<{}>}
+ */
+ deletePhoto(): Promise<{}> {
+ const apiPath = '/avatars/photo';
+ const apiPayload: Payload = {};
+ const uri = new URL(this.client.config.endpoint + apiPath);
+
+ const apiHeaders: { [header: string]: string } = {
+ 'X-Appwrite-Project': this.client.config.project,
+ 'content-type': 'application/json',
+ accept: 'application/json',
+ };
+
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
+ }
+
/**
* Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
*
@@ -845,25 +952,25 @@ export class Avatars {
throw new AppwriteException('Missing required parameter: "text"');
}
const apiPath = '/avatars/qr';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof text !== 'undefined') {
- payload['text'] = text;
+ apiPayload['text'] = text;
}
if (typeof size !== 'undefined') {
- payload['size'] = size;
+ apiPayload['size'] = size;
}
if (typeof margin !== 'undefined') {
- payload['margin'] = margin;
+ apiPayload['margin'] = margin;
}
if (typeof download !== 'undefined') {
- payload['download'] = download;
+ apiPayload['download'] = download;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -878,7 +985,7 @@ export class Avatars {
* When width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.
*
* @param {string} params.url - Website URL which you want to capture.
- * @param {object} params.headers - HTTP headers to send with the browser request. Defaults to empty.
+ * @param {object} params.headers - HTTP headers to send with the browser request. Only Accept and Accept-Language are allowed. Defaults to empty.
* @param {number} params.viewportWidth - Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.
* @param {number} params.viewportHeight - Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.
* @param {number} params.scale - Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.
@@ -930,7 +1037,7 @@ export class Avatars {
* When width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.
*
* @param {string} url - Website URL which you want to capture.
- * @param {object} headers - HTTP headers to send with the browser request. Defaults to empty.
+ * @param {object} headers - HTTP headers to send with the browser request. Only Accept and Accept-Language are allowed. Defaults to empty.
* @param {number} viewportWidth - Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.
* @param {number} viewportHeight - Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.
* @param {number} scale - Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.
@@ -1122,73 +1229,73 @@ export class Avatars {
throw new AppwriteException('Missing required parameter: "url"');
}
const apiPath = '/avatars/screenshots';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof url !== 'undefined') {
- payload['url'] = url;
+ apiPayload['url'] = url;
}
if (typeof headers !== 'undefined') {
- payload['headers'] = headers;
+ apiPayload['headers'] = headers;
}
if (typeof viewportWidth !== 'undefined') {
- payload['viewportWidth'] = viewportWidth;
+ apiPayload['viewportWidth'] = viewportWidth;
}
if (typeof viewportHeight !== 'undefined') {
- payload['viewportHeight'] = viewportHeight;
+ apiPayload['viewportHeight'] = viewportHeight;
}
if (typeof scale !== 'undefined') {
- payload['scale'] = scale;
+ apiPayload['scale'] = scale;
}
if (typeof theme !== 'undefined') {
- payload['theme'] = theme;
+ apiPayload['theme'] = theme;
}
if (typeof userAgent !== 'undefined') {
- payload['userAgent'] = userAgent;
+ apiPayload['userAgent'] = userAgent;
}
if (typeof fullpage !== 'undefined') {
- payload['fullpage'] = fullpage;
+ apiPayload['fullpage'] = fullpage;
}
if (typeof locale !== 'undefined') {
- payload['locale'] = locale;
+ apiPayload['locale'] = locale;
}
if (typeof timezone !== 'undefined') {
- payload['timezone'] = timezone;
+ apiPayload['timezone'] = timezone;
}
if (typeof latitude !== 'undefined') {
- payload['latitude'] = latitude;
+ apiPayload['latitude'] = latitude;
}
if (typeof longitude !== 'undefined') {
- payload['longitude'] = longitude;
+ apiPayload['longitude'] = longitude;
}
if (typeof accuracy !== 'undefined') {
- payload['accuracy'] = accuracy;
+ apiPayload['accuracy'] = accuracy;
}
if (typeof touch !== 'undefined') {
- payload['touch'] = touch;
+ apiPayload['touch'] = touch;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof sleep !== 'undefined') {
- payload['sleep'] = sleep;
+ apiPayload['sleep'] = sleep;
}
if (typeof width !== 'undefined') {
- payload['width'] = width;
+ apiPayload['width'] = width;
}
if (typeof height !== 'undefined') {
- payload['height'] = height;
+ apiPayload['height'] = height;
}
if (typeof quality !== 'undefined') {
- payload['quality'] = quality;
+ apiPayload['quality'] = quality;
}
if (typeof output !== 'undefined') {
- payload['output'] = output;
+ apiPayload['output'] = output;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
diff --git a/src/services/databases.ts b/src/services/databases.ts
index 35c9a4f..98102c1 100644
--- a/src/services/databases.ts
+++ b/src/services/databases.ts
@@ -12,46 +12,61 @@ export class Databases {
* List transactions across all databases.
*
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTransactions` instead.
*/
listTransactions(params?: {
queries?: string[];
+ total?: boolean;
}): Promise;
/**
* List transactions across all databases.
*
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
* @deprecated Use the object parameter style method for a better developer experience.
*/
- listTransactions(queries?: string[]): Promise;
listTransactions(
- paramsOrFirst?: { queries?: string[] } | string[],
+ queries?: string[],
+ total?: boolean,
+ ): Promise;
+ listTransactions(
+ paramsOrFirst?: { queries?: string[]; total?: boolean } | string[],
+ ...rest: [boolean?]
): Promise {
- let params: { queries?: string[] };
+ let params: { queries?: string[]; total?: boolean };
if (
- typeof paramsOrFirst === 'undefined' ||
+ (typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
(paramsOrFirst &&
typeof paramsOrFirst === 'object' &&
!Array.isArray(paramsOrFirst))
) {
- params = (paramsOrFirst || {}) as { queries?: string[] };
+ params = (paramsOrFirst || {}) as {
+ queries?: string[];
+ total?: boolean;
+ };
} else {
params = {
queries: paramsOrFirst as string[],
+ total: rest[0] as boolean,
};
}
const queries = params.queries;
+ const total = params.total;
const apiPath = '/databases/transactions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
+ }
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -60,7 +75,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -102,9 +117,9 @@ export class Databases {
const ttl = params.ttl;
const apiPath = '/databases/transactions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -114,7 +129,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -165,7 +180,7 @@ export class Databases {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -173,7 +188,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -249,12 +264,12 @@ export class Databases {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof commit !== 'undefined') {
- payload['commit'] = commit;
+ apiPayload['commit'] = commit;
}
if (typeof rollback !== 'undefined') {
- payload['rollback'] = rollback;
+ apiPayload['rollback'] = rollback;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -264,7 +279,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -313,7 +328,7 @@ export class Databases {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -322,7 +337,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -387,9 +402,9 @@ export class Databases {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof operations !== 'undefined') {
- payload['operations'] = operations;
+ apiPayload['operations'] = operations;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -399,7 +414,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -516,18 +531,18 @@ export class Databases {
'{collectionId}',
encodeURIComponent(String(collectionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -536,7 +551,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -686,18 +701,18 @@ export class Databases {
'{collectionId}',
encodeURIComponent(String(collectionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof documentId !== 'undefined') {
- payload['documentId'] = documentId;
+ apiPayload['documentId'] = documentId;
}
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -707,7 +722,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -824,12 +839,12 @@ export class Databases {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -838,7 +853,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -991,15 +1006,15 @@ export class Databases {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1009,7 +1024,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -1162,15 +1177,15 @@ export class Databases {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1180,7 +1195,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1286,9 +1301,9 @@ export class Databases {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1298,7 +1313,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -1440,15 +1455,15 @@ export class Databases {
)
.replace('{documentId}', encodeURIComponent(String(documentId)))
.replace('{attribute}', encodeURIComponent(String(attribute)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof value !== 'undefined') {
- payload['value'] = value;
+ apiPayload['value'] = value;
}
if (typeof min !== 'undefined') {
- payload['min'] = min;
+ apiPayload['min'] = min;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1458,7 +1473,7 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1600,15 +1615,15 @@ export class Databases {
)
.replace('{documentId}', encodeURIComponent(String(documentId)))
.replace('{attribute}', encodeURIComponent(String(attribute)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof value !== 'undefined') {
- payload['value'] = value;
+ apiPayload['value'] = value;
}
if (typeof max !== 'undefined') {
- payload['max'] = max;
+ apiPayload['max'] = max;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1618,6 +1633,6 @@ export class Databases {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/documents-db.ts b/src/services/documents-db.ts
index f30378d..82a86a9 100644
--- a/src/services/documents-db.ts
+++ b/src/services/documents-db.ts
@@ -12,45 +12,60 @@ export class DocumentsDB {
* List transactions across all databases.
*
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
*/
listTransactions(params?: {
queries?: string[];
+ total?: boolean;
}): Promise;
/**
* List transactions across all databases.
*
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
* @deprecated Use the object parameter style method for a better developer experience.
*/
- listTransactions(queries?: string[]): Promise;
listTransactions(
- paramsOrFirst?: { queries?: string[] } | string[],
+ queries?: string[],
+ total?: boolean,
+ ): Promise;
+ listTransactions(
+ paramsOrFirst?: { queries?: string[]; total?: boolean } | string[],
+ ...rest: [boolean?]
): Promise {
- let params: { queries?: string[] };
+ let params: { queries?: string[]; total?: boolean };
if (
- typeof paramsOrFirst === 'undefined' ||
+ (typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
(paramsOrFirst &&
typeof paramsOrFirst === 'object' &&
!Array.isArray(paramsOrFirst))
) {
- params = (paramsOrFirst || {}) as { queries?: string[] };
+ params = (paramsOrFirst || {}) as {
+ queries?: string[];
+ total?: boolean;
+ };
} else {
params = {
queries: paramsOrFirst as string[],
+ total: rest[0] as boolean,
};
}
const queries = params.queries;
+ const total = params.total;
const apiPath = '/documentsdb/transactions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
+ }
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -59,7 +74,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -100,9 +115,9 @@ export class DocumentsDB {
const ttl = params.ttl;
const apiPath = '/documentsdb/transactions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -112,7 +127,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -162,7 +177,7 @@ export class DocumentsDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -170,7 +185,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -245,12 +260,12 @@ export class DocumentsDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof commit !== 'undefined') {
- payload['commit'] = commit;
+ apiPayload['commit'] = commit;
}
if (typeof rollback !== 'undefined') {
- payload['rollback'] = rollback;
+ apiPayload['rollback'] = rollback;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -260,7 +275,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -308,7 +323,7 @@ export class DocumentsDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -317,7 +332,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -381,9 +396,9 @@ export class DocumentsDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof operations !== 'undefined') {
- payload['operations'] = operations;
+ apiPayload['operations'] = operations;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -393,7 +408,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -509,18 +524,18 @@ export class DocumentsDB {
'{collectionId}',
encodeURIComponent(String(collectionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -529,7 +544,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -678,18 +693,18 @@ export class DocumentsDB {
'{collectionId}',
encodeURIComponent(String(collectionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof documentId !== 'undefined') {
- payload['documentId'] = documentId;
+ apiPayload['documentId'] = documentId;
}
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -699,7 +714,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -802,12 +817,12 @@ export class DocumentsDB {
'{collectionId}',
encodeURIComponent(String(collectionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof documents !== 'undefined') {
- payload['documents'] = documents;
+ apiPayload['documents'] = documents;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -817,7 +832,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -933,12 +948,12 @@ export class DocumentsDB {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -947,7 +962,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1099,15 +1114,15 @@ export class DocumentsDB {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1117,7 +1132,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -1269,15 +1284,15 @@ export class DocumentsDB {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1287,7 +1302,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1392,9 +1407,9 @@ export class DocumentsDB {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1404,7 +1419,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -1545,15 +1560,15 @@ export class DocumentsDB {
)
.replace('{documentId}', encodeURIComponent(String(documentId)))
.replace('{attribute}', encodeURIComponent(String(attribute)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof value !== 'undefined') {
- payload['value'] = value;
+ apiPayload['value'] = value;
}
if (typeof min !== 'undefined') {
- payload['min'] = min;
+ apiPayload['min'] = min;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1563,7 +1578,7 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1704,15 +1719,15 @@ export class DocumentsDB {
)
.replace('{documentId}', encodeURIComponent(String(documentId)))
.replace('{attribute}', encodeURIComponent(String(attribute)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof value !== 'undefined') {
- payload['value'] = value;
+ apiPayload['value'] = value;
}
if (typeof max !== 'undefined') {
- payload['max'] = max;
+ apiPayload['max'] = max;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1722,6 +1737,6 @@ export class DocumentsDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/functions.ts b/src/services/functions.ts
index b9a9264..7ab3248 100644
--- a/src/services/functions.ts
+++ b/src/services/functions.ts
@@ -77,12 +77,12 @@ export class Functions {
'{functionId}',
encodeURIComponent(String(functionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -91,7 +91,7 @@ export class Functions {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -213,24 +213,24 @@ export class Functions {
'{functionId}',
encodeURIComponent(String(functionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof body !== 'undefined') {
- payload['body'] = body;
+ apiPayload['body'] = body;
}
if (typeof async !== 'undefined') {
- payload['async'] = async;
+ apiPayload['async'] = async;
}
if (typeof xpath !== 'undefined') {
- payload['path'] = xpath;
+ apiPayload['path'] = xpath;
}
if (typeof method !== 'undefined') {
- payload['method'] = method;
+ apiPayload['method'] = method;
}
if (typeof headers !== 'undefined') {
- payload['headers'] = headers;
+ apiPayload['headers'] = headers;
}
if (typeof scheduledAt !== 'undefined') {
- payload['scheduledAt'] = scheduledAt;
+ apiPayload['scheduledAt'] = scheduledAt;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -240,7 +240,7 @@ export class Functions {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -306,7 +306,7 @@ export class Functions {
const apiPath = '/functions/{functionId}/executions/{executionId}'
.replace('{functionId}', encodeURIComponent(String(functionId)))
.replace('{executionId}', encodeURIComponent(String(executionId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -314,6 +314,6 @@ export class Functions {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/graphql.ts b/src/services/graphql.ts
index 819fe85..387518f 100644
--- a/src/services/graphql.ts
+++ b/src/services/graphql.ts
@@ -46,9 +46,9 @@ export class Graphql {
throw new AppwriteException('Missing required parameter: "query"');
}
const apiPath = '/graphql';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof query !== 'undefined') {
- payload['query'] = query;
+ apiPayload['query'] = query;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -59,7 +59,7 @@ export class Graphql {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -101,9 +101,9 @@ export class Graphql {
throw new AppwriteException('Missing required parameter: "query"');
}
const apiPath = '/graphql/mutation';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof query !== 'undefined') {
- payload['query'] = query;
+ apiPayload['query'] = query;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -114,6 +114,6 @@ export class Graphql {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/locale.ts b/src/services/locale.ts
index 04a517f..d7e6a82 100644
--- a/src/services/locale.ts
+++ b/src/services/locale.ts
@@ -18,7 +18,7 @@ export class Locale {
*/
get(): Promise {
const apiPath = '/locale';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -26,18 +26,51 @@ export class Locale {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
* List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
*
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
*/
- listCodes(): Promise {
+ listCodes(params?: { total?: boolean }): Promise;
+ /**
+ * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
+ *
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
+ */
+ listCodes(total?: boolean): Promise;
+ listCodes(
+ paramsOrFirst?: { total?: boolean } | boolean,
+ ): Promise {
+ let params: { total?: boolean };
+
+ if (
+ typeof paramsOrFirst === 'undefined' ||
+ (paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst))
+ ) {
+ params = (paramsOrFirst || {}) as { total?: boolean };
+ } else {
+ params = {
+ total: paramsOrFirst as boolean,
+ };
+ }
+
+ const total = params.total;
+
const apiPath = '/locale/codes';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -45,18 +78,51 @@ export class Locale {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
* List of all continents. You can use the locale header to get the data in a supported language.
*
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ */
+ listContinents(params?: { total?: boolean }): Promise;
+ /**
+ * List of all continents. You can use the locale header to get the data in a supported language.
+ *
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
*/
- listContinents(): Promise {
+ listContinents(total?: boolean): Promise;
+ listContinents(
+ paramsOrFirst?: { total?: boolean } | boolean,
+ ): Promise {
+ let params: { total?: boolean };
+
+ if (
+ typeof paramsOrFirst === 'undefined' ||
+ (paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst))
+ ) {
+ params = (paramsOrFirst || {}) as { total?: boolean };
+ } else {
+ params = {
+ total: paramsOrFirst as boolean,
+ };
+ }
+
+ const total = params.total;
+
const apiPath = '/locale/continents';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -64,18 +130,51 @@ export class Locale {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
* List of all countries. You can use the locale header to get the data in a supported language.
*
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ */
+ listCountries(params?: { total?: boolean }): Promise;
+ /**
+ * List of all countries. You can use the locale header to get the data in a supported language.
+ *
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
*/
- listCountries(): Promise {
+ listCountries(total?: boolean): Promise;
+ listCountries(
+ paramsOrFirst?: { total?: boolean } | boolean,
+ ): Promise {
+ let params: { total?: boolean };
+
+ if (
+ typeof paramsOrFirst === 'undefined' ||
+ (paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst))
+ ) {
+ params = (paramsOrFirst || {}) as { total?: boolean };
+ } else {
+ params = {
+ total: paramsOrFirst as boolean,
+ };
+ }
+
+ const total = params.total;
+
const apiPath = '/locale/countries';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -83,18 +182,51 @@ export class Locale {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
* List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
*
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
*/
- listCountriesEU(): Promise {
+ listCountriesEU(params?: { total?: boolean }): Promise;
+ /**
+ * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
+ *
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
+ */
+ listCountriesEU(total?: boolean): Promise;
+ listCountriesEU(
+ paramsOrFirst?: { total?: boolean } | boolean,
+ ): Promise {
+ let params: { total?: boolean };
+
+ if (
+ typeof paramsOrFirst === 'undefined' ||
+ (paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst))
+ ) {
+ params = (paramsOrFirst || {}) as { total?: boolean };
+ } else {
+ params = {
+ total: paramsOrFirst as boolean,
+ };
+ }
+
+ const total = params.total;
+
const apiPath = '/locale/countries/eu';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -102,18 +234,53 @@ export class Locale {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
* List of all countries phone codes. You can use the locale header to get the data in a supported language.
*
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ */
+ listCountriesPhones(params?: {
+ total?: boolean;
+ }): Promise;
+ /**
+ * List of all countries phone codes. You can use the locale header to get the data in a supported language.
+ *
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
*/
- listCountriesPhones(): Promise {
+ listCountriesPhones(total?: boolean): Promise;
+ listCountriesPhones(
+ paramsOrFirst?: { total?: boolean } | boolean,
+ ): Promise {
+ let params: { total?: boolean };
+
+ if (
+ typeof paramsOrFirst === 'undefined' ||
+ (paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst))
+ ) {
+ params = (paramsOrFirst || {}) as { total?: boolean };
+ } else {
+ params = {
+ total: paramsOrFirst as boolean,
+ };
+ }
+
+ const total = params.total;
+
const apiPath = '/locale/countries/phones';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -121,18 +288,51 @@ export class Locale {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
* List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
*
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
*/
- listCurrencies(): Promise {
+ listCurrencies(params?: { total?: boolean }): Promise;
+ /**
+ * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
+ *
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
+ */
+ listCurrencies(total?: boolean): Promise;
+ listCurrencies(
+ paramsOrFirst?: { total?: boolean } | boolean,
+ ): Promise {
+ let params: { total?: boolean };
+
+ if (
+ typeof paramsOrFirst === 'undefined' ||
+ (paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst))
+ ) {
+ params = (paramsOrFirst || {}) as { total?: boolean };
+ } else {
+ params = {
+ total: paramsOrFirst as boolean,
+ };
+ }
+
+ const total = params.total;
+
const apiPath = '/locale/currencies';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -140,18 +340,51 @@ export class Locale {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
* List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
*
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
*/
- listLanguages(): Promise {
+ listLanguages(params?: { total?: boolean }): Promise;
+ /**
+ * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
+ *
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
+ */
+ listLanguages(total?: boolean): Promise;
+ listLanguages(
+ paramsOrFirst?: { total?: boolean } | boolean,
+ ): Promise {
+ let params: { total?: boolean };
+
+ if (
+ typeof paramsOrFirst === 'undefined' ||
+ (paramsOrFirst &&
+ typeof paramsOrFirst === 'object' &&
+ !Array.isArray(paramsOrFirst))
+ ) {
+ params = (paramsOrFirst || {}) as { total?: boolean };
+ } else {
+ params = {
+ total: paramsOrFirst as boolean,
+ };
+ }
+
+ const total = params.total;
+
const apiPath = '/locale/languages';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -159,6 +392,6 @@ export class Locale {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/messaging.ts b/src/services/messaging.ts
index d120f1d..740ecf1 100644
--- a/src/services/messaging.ts
+++ b/src/services/messaging.ts
@@ -86,12 +86,12 @@ export class Messaging {
'{topicId}',
encodeURIComponent(String(topicId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof subscriberId !== 'undefined') {
- payload['subscriberId'] = subscriberId;
+ apiPayload['subscriberId'] = subscriberId;
}
if (typeof targetId !== 'undefined') {
- payload['targetId'] = targetId;
+ apiPayload['targetId'] = targetId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -101,7 +101,7 @@ export class Messaging {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -167,7 +167,7 @@ export class Messaging {
'{subscriberId}',
encodeURIComponent(String(subscriberId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -176,6 +176,6 @@ export class Messaging {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/oauth-2.ts b/src/services/oauth-2.ts
index 921f690..0cb439c 100644
--- a/src/services/oauth-2.ts
+++ b/src/services/oauth-2.ts
@@ -80,15 +80,15 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof grantId !== 'undefined') {
- payload['grant_id'] = grantId;
+ apiPayload['grant_id'] = grantId;
}
if (typeof authorizationDetails !== 'undefined') {
- payload['authorization_details'] = authorizationDetails;
+ apiPayload['authorization_details'] = authorizationDetails;
}
if (typeof scope !== 'undefined') {
- payload['scope'] = scope;
+ apiPayload['scope'] = scope;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -97,7 +97,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -285,48 +285,48 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof clientId !== 'undefined') {
- payload['client_id'] = clientId;
+ apiPayload['client_id'] = clientId;
}
if (typeof redirectUri !== 'undefined') {
- payload['redirect_uri'] = redirectUri;
+ apiPayload['redirect_uri'] = redirectUri;
}
if (typeof responseType !== 'undefined') {
- payload['response_type'] = responseType;
+ apiPayload['response_type'] = responseType;
}
if (typeof scope !== 'undefined') {
- payload['scope'] = scope;
+ apiPayload['scope'] = scope;
}
if (typeof state !== 'undefined') {
- payload['state'] = state;
+ apiPayload['state'] = state;
}
if (typeof nonce !== 'undefined') {
- payload['nonce'] = nonce;
+ apiPayload['nonce'] = nonce;
}
if (typeof codeChallenge !== 'undefined') {
- payload['code_challenge'] = codeChallenge;
+ apiPayload['code_challenge'] = codeChallenge;
}
if (typeof codeChallengeMethod !== 'undefined') {
- payload['code_challenge_method'] = codeChallengeMethod;
+ apiPayload['code_challenge_method'] = codeChallengeMethod;
}
if (typeof prompt !== 'undefined') {
- payload['prompt'] = prompt;
+ apiPayload['prompt'] = prompt;
}
if (typeof maxAge !== 'undefined') {
- payload['max_age'] = maxAge;
+ apiPayload['max_age'] = maxAge;
}
if (typeof authorizationDetails !== 'undefined') {
- payload['authorization_details'] = authorizationDetails;
+ apiPayload['authorization_details'] = authorizationDetails;
}
if (typeof resource !== 'undefined') {
- payload['resource'] = resource;
+ apiPayload['resource'] = resource;
}
if (typeof audience !== 'undefined') {
- payload['audience'] = audience;
+ apiPayload['audience'] = audience;
}
if (typeof requestUri !== 'undefined') {
- payload['request_uri'] = requestUri;
+ apiPayload['request_uri'] = requestUri;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -334,7 +334,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -522,48 +522,48 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof clientId !== 'undefined') {
- payload['client_id'] = clientId;
+ apiPayload['client_id'] = clientId;
}
if (typeof redirectUri !== 'undefined') {
- payload['redirect_uri'] = redirectUri;
+ apiPayload['redirect_uri'] = redirectUri;
}
if (typeof responseType !== 'undefined') {
- payload['response_type'] = responseType;
+ apiPayload['response_type'] = responseType;
}
if (typeof scope !== 'undefined') {
- payload['scope'] = scope;
+ apiPayload['scope'] = scope;
}
if (typeof state !== 'undefined') {
- payload['state'] = state;
+ apiPayload['state'] = state;
}
if (typeof nonce !== 'undefined') {
- payload['nonce'] = nonce;
+ apiPayload['nonce'] = nonce;
}
if (typeof codeChallenge !== 'undefined') {
- payload['code_challenge'] = codeChallenge;
+ apiPayload['code_challenge'] = codeChallenge;
}
if (typeof codeChallengeMethod !== 'undefined') {
- payload['code_challenge_method'] = codeChallengeMethod;
+ apiPayload['code_challenge_method'] = codeChallengeMethod;
}
if (typeof prompt !== 'undefined') {
- payload['prompt'] = prompt;
+ apiPayload['prompt'] = prompt;
}
if (typeof maxAge !== 'undefined') {
- payload['max_age'] = maxAge;
+ apiPayload['max_age'] = maxAge;
}
if (typeof authorizationDetails !== 'undefined') {
- payload['authorization_details'] = authorizationDetails;
+ apiPayload['authorization_details'] = authorizationDetails;
}
if (typeof resource !== 'undefined') {
- payload['resource'] = resource;
+ apiPayload['resource'] = resource;
}
if (typeof audience !== 'undefined') {
- payload['audience'] = audience;
+ apiPayload['audience'] = audience;
}
if (typeof requestUri !== 'undefined') {
- payload['request_uri'] = requestUri;
+ apiPayload['request_uri'] = requestUri;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -572,7 +572,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -665,21 +665,21 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof clientId !== 'undefined') {
- payload['client_id'] = clientId;
+ apiPayload['client_id'] = clientId;
}
if (typeof scope !== 'undefined') {
- payload['scope'] = scope;
+ apiPayload['scope'] = scope;
}
if (typeof authorizationDetails !== 'undefined') {
- payload['authorization_details'] = authorizationDetails;
+ apiPayload['authorization_details'] = authorizationDetails;
}
if (typeof resource !== 'undefined') {
- payload['resource'] = resource;
+ apiPayload['resource'] = resource;
}
if (typeof audience !== 'undefined') {
- payload['audience'] = audience;
+ apiPayload['audience'] = audience;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -688,7 +688,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -736,9 +736,9 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userCode !== 'undefined') {
- payload['user_code'] = userCode;
+ apiPayload['user_code'] = userCode;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -747,7 +747,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -797,14 +797,14 @@ export class Oauth2 {
encodeURIComponent(String(this.client.config.project)),
)
.replace('{grant_id}', encodeURIComponent(String(grantId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -906,24 +906,24 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof idTokenHint !== 'undefined') {
- payload['id_token_hint'] = idTokenHint;
+ apiPayload['id_token_hint'] = idTokenHint;
}
if (typeof logoutHint !== 'undefined') {
- payload['logout_hint'] = logoutHint;
+ apiPayload['logout_hint'] = logoutHint;
}
if (typeof clientId !== 'undefined') {
- payload['client_id'] = clientId;
+ apiPayload['client_id'] = clientId;
}
if (typeof postLogoutRedirectUri !== 'undefined') {
- payload['post_logout_redirect_uri'] = postLogoutRedirectUri;
+ apiPayload['post_logout_redirect_uri'] = postLogoutRedirectUri;
}
if (typeof state !== 'undefined') {
- payload['state'] = state;
+ apiPayload['state'] = state;
}
if (typeof uiLocales !== 'undefined') {
- payload['ui_locales'] = uiLocales;
+ apiPayload['ui_locales'] = uiLocales;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -931,7 +931,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1033,24 +1033,24 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof idTokenHint !== 'undefined') {
- payload['id_token_hint'] = idTokenHint;
+ apiPayload['id_token_hint'] = idTokenHint;
}
if (typeof logoutHint !== 'undefined') {
- payload['logout_hint'] = logoutHint;
+ apiPayload['logout_hint'] = logoutHint;
}
if (typeof clientId !== 'undefined') {
- payload['client_id'] = clientId;
+ apiPayload['client_id'] = clientId;
}
if (typeof postLogoutRedirectUri !== 'undefined') {
- payload['post_logout_redirect_uri'] = postLogoutRedirectUri;
+ apiPayload['post_logout_redirect_uri'] = postLogoutRedirectUri;
}
if (typeof state !== 'undefined') {
- payload['state'] = state;
+ apiPayload['state'] = state;
}
if (typeof uiLocales !== 'undefined') {
- payload['ui_locales'] = uiLocales;
+ apiPayload['ui_locales'] = uiLocales;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1059,7 +1059,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1125,15 +1125,15 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof limit !== 'undefined') {
- payload['limit'] = limit;
+ apiPayload['limit'] = limit;
}
if (typeof offset !== 'undefined') {
- payload['offset'] = offset;
+ apiPayload['offset'] = offset;
}
if (typeof search !== 'undefined') {
- payload['search'] = search;
+ apiPayload['search'] = search;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1141,7 +1141,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1333,45 +1333,45 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof clientId !== 'undefined') {
- payload['client_id'] = clientId;
+ apiPayload['client_id'] = clientId;
}
if (typeof redirectUri !== 'undefined') {
- payload['redirect_uri'] = redirectUri;
+ apiPayload['redirect_uri'] = redirectUri;
}
if (typeof responseType !== 'undefined') {
- payload['response_type'] = responseType;
+ apiPayload['response_type'] = responseType;
}
if (typeof scope !== 'undefined') {
- payload['scope'] = scope;
+ apiPayload['scope'] = scope;
}
if (typeof state !== 'undefined') {
- payload['state'] = state;
+ apiPayload['state'] = state;
}
if (typeof nonce !== 'undefined') {
- payload['nonce'] = nonce;
+ apiPayload['nonce'] = nonce;
}
if (typeof codeChallenge !== 'undefined') {
- payload['code_challenge'] = codeChallenge;
+ apiPayload['code_challenge'] = codeChallenge;
}
if (typeof codeChallengeMethod !== 'undefined') {
- payload['code_challenge_method'] = codeChallengeMethod;
+ apiPayload['code_challenge_method'] = codeChallengeMethod;
}
if (typeof prompt !== 'undefined') {
- payload['prompt'] = prompt;
+ apiPayload['prompt'] = prompt;
}
if (typeof maxAge !== 'undefined') {
- payload['max_age'] = maxAge;
+ apiPayload['max_age'] = maxAge;
}
if (typeof authorizationDetails !== 'undefined') {
- payload['authorization_details'] = authorizationDetails;
+ apiPayload['authorization_details'] = authorizationDetails;
}
if (typeof resource !== 'undefined') {
- payload['resource'] = resource;
+ apiPayload['resource'] = resource;
}
if (typeof audience !== 'undefined') {
- payload['audience'] = audience;
+ apiPayload['audience'] = audience;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1380,7 +1380,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1446,15 +1446,15 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof limit !== 'undefined') {
- payload['limit'] = limit;
+ apiPayload['limit'] = limit;
}
if (typeof offset !== 'undefined') {
- payload['offset'] = offset;
+ apiPayload['offset'] = offset;
}
if (typeof search !== 'undefined') {
- payload['search'] = search;
+ apiPayload['search'] = search;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1462,7 +1462,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1510,9 +1510,9 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof grantId !== 'undefined') {
- payload['grant_id'] = grantId;
+ apiPayload['grant_id'] = grantId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1521,7 +1521,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1607,18 +1607,18 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof token !== 'undefined') {
- payload['token'] = token;
+ apiPayload['token'] = token;
}
if (typeof tokenTypeHint !== 'undefined') {
- payload['token_type_hint'] = tokenTypeHint;
+ apiPayload['token_type_hint'] = tokenTypeHint;
}
if (typeof clientId !== 'undefined') {
- payload['client_id'] = clientId;
+ apiPayload['client_id'] = clientId;
}
if (typeof clientSecret !== 'undefined') {
- payload['client_secret'] = clientSecret;
+ apiPayload['client_secret'] = clientSecret;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1627,7 +1627,7 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1779,36 +1779,36 @@ export class Oauth2 {
'{project_id}',
encodeURIComponent(String(this.client.config.project)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof grantType !== 'undefined') {
- payload['grant_type'] = grantType;
+ apiPayload['grant_type'] = grantType;
}
if (typeof code !== 'undefined') {
- payload['code'] = code;
+ apiPayload['code'] = code;
}
if (typeof refreshToken !== 'undefined') {
- payload['refresh_token'] = refreshToken;
+ apiPayload['refresh_token'] = refreshToken;
}
if (typeof deviceCode !== 'undefined') {
- payload['device_code'] = deviceCode;
+ apiPayload['device_code'] = deviceCode;
}
if (typeof clientId !== 'undefined') {
- payload['client_id'] = clientId;
+ apiPayload['client_id'] = clientId;
}
if (typeof clientSecret !== 'undefined') {
- payload['client_secret'] = clientSecret;
+ apiPayload['client_secret'] = clientSecret;
}
if (typeof codeVerifier !== 'undefined') {
- payload['code_verifier'] = codeVerifier;
+ apiPayload['code_verifier'] = codeVerifier;
}
if (typeof redirectUri !== 'undefined') {
- payload['redirect_uri'] = redirectUri;
+ apiPayload['redirect_uri'] = redirectUri;
}
if (typeof resource !== 'undefined') {
- payload['resource'] = resource;
+ apiPayload['resource'] = resource;
}
if (typeof audience !== 'undefined') {
- payload['audience'] = audience;
+ apiPayload['audience'] = audience;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1817,6 +1817,6 @@ export class Oauth2 {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/organization.ts b/src/services/organization.ts
index 1ea7838..4ae3386 100644
--- a/src/services/organization.ts
+++ b/src/services/organization.ts
@@ -60,12 +60,12 @@ export class Organization {
const total = params.total;
const apiPath = '/organization/installations';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -74,7 +74,7 @@ export class Organization {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -132,12 +132,12 @@ export class Organization {
throw new AppwriteException('Missing required parameter: "appId"');
}
const apiPath = '/organization/installations';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof appId !== 'undefined') {
- payload['appId'] = appId;
+ apiPayload['appId'] = appId;
}
if (typeof authorizationDetails !== 'undefined') {
- payload['authorizationDetails'] = authorizationDetails;
+ apiPayload['authorizationDetails'] = authorizationDetails;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -147,7 +147,7 @@ export class Organization {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -197,7 +197,7 @@ export class Organization {
'{installationId}',
encodeURIComponent(String(installationId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -205,7 +205,7 @@ export class Organization {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -268,9 +268,9 @@ export class Organization {
'{installationId}',
encodeURIComponent(String(installationId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof authorizationDetails !== 'undefined') {
- payload['authorizationDetails'] = authorizationDetails;
+ apiPayload['authorizationDetails'] = authorizationDetails;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -280,7 +280,7 @@ export class Organization {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -328,7 +328,7 @@ export class Organization {
'{installationId}',
encodeURIComponent(String(installationId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -337,6 +337,6 @@ export class Organization {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/presences.ts b/src/services/presences.ts
index a612176..df362c3 100644
--- a/src/services/presences.ts
+++ b/src/services/presences.ts
@@ -70,15 +70,15 @@ export class Presences {
const ttl = params.ttl;
const apiPath = '/presences';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -87,7 +87,7 @@ export class Presences {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -137,7 +137,7 @@ export class Presences {
'{presenceId}',
encodeURIComponent(String(presenceId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -145,7 +145,7 @@ export class Presences {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -247,18 +247,18 @@ export class Presences {
'{presenceId}',
encodeURIComponent(String(presenceId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof status !== 'undefined') {
- payload['status'] = status;
+ apiPayload['status'] = status;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof expiresAt !== 'undefined') {
- payload['expiresAt'] = expiresAt;
+ apiPayload['expiresAt'] = expiresAt;
}
if (typeof metadata !== 'undefined') {
- payload['metadata'] = metadata;
+ apiPayload['metadata'] = metadata;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -268,7 +268,7 @@ export class Presences {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -376,21 +376,21 @@ export class Presences {
'{presenceId}',
encodeURIComponent(String(presenceId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof status !== 'undefined') {
- payload['status'] = status;
+ apiPayload['status'] = status;
}
if (typeof expiresAt !== 'undefined') {
- payload['expiresAt'] = expiresAt;
+ apiPayload['expiresAt'] = expiresAt;
}
if (typeof metadata !== 'undefined') {
- payload['metadata'] = metadata;
+ apiPayload['metadata'] = metadata;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof purge !== 'undefined') {
- payload['purge'] = purge;
+ apiPayload['purge'] = purge;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -400,7 +400,7 @@ export class Presences {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -448,7 +448,7 @@ export class Presences {
'{presenceId}',
encodeURIComponent(String(presenceId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -457,6 +457,6 @@ export class Presences {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/push.ts b/src/services/push.ts
new file mode 100644
index 0000000..5b2162d
--- /dev/null
+++ b/src/services/push.ts
@@ -0,0 +1,1029 @@
+import type {
+ IClientOptions,
+ IConnackPacket,
+ IPublishPacket,
+ MqttClient,
+} from 'mqtt';
+
+import { Client } from '../client';
+import type { ResolvedTopic, Topic } from '../topic';
+
+/** A message delivered on a subscribed topic (the MQTT analog of a Realtime event). */
+export interface PushMessage {
+ topic: string;
+ /** The payload decoded as UTF-8 text, as it was sent. */
+ data: string;
+ /** The raw payload, for binary messages. */
+ payload: Uint8Array;
+ qos: number;
+}
+
+export type MessageCallback = (message: PushMessage) => void | Promise;
+
+/** Per-subscription options passed to `subscribe` and `PushSubscription.update`. */
+export interface SubscribeOptions {
+ /**
+ * Also surface each matching message as a browser notification while the tab is
+ * open. Defaults to false.
+ */
+ background?: boolean;
+ /** Notification title for this subscription. Defaults to the message topic. */
+ title?: string;
+ /**
+ * Retry delivery of messages missed while disconnected. `true` (the default) subscribes
+ * at QoS 1 so the broker holds this topic's messages and redelivers them on reconnect;
+ * `false` uses QoS 0 (at-most-once, may be lost). Per-subscription — the connection
+ * always keeps its session (clean start off).
+ */
+ retry?: boolean;
+}
+
+/**
+ * Handle for a live subscription. `unsubscribe()` drops it (and closes the connection
+ * once the last one is gone); `update()` toggles this subscription's per-message options
+ * without resubscribing.
+ */
+export interface PushSubscription {
+ unsubscribe(): void;
+ update(options: SubscribeOptions): void;
+}
+
+type AuthMethod = 'appwrite-jwt' | 'appwrite-session' | '';
+
+const TAB_ID_KEY = 'appwrite-push-client-id';
+
+interface Transport {
+ connect: typeof import('mqtt').connect;
+ Buffer: typeof import('buffer').Buffer;
+}
+
+// Loaded on first connect, so an app that never uses Push does not bundle mqtt.js.
+let transport: Promise | null = null;
+
+function loadTransport(): Promise {
+ if (!transport) {
+ transport = Promise.all([import('mqtt'), import('buffer')]).then(
+ // The browser build of mqtt.js (dist/mqtt.esm.js) exports only a default.
+ ([mqtt, buffer]) => ({
+ connect: (mqtt.default ?? mqtt).connect,
+ Buffer: buffer.Buffer,
+ }),
+ );
+ // A failed load must not poison later connects.
+ transport.catch(() => {
+ transport = null;
+ });
+ }
+ return transport;
+}
+
+// Fixed connection tuning — not exposed as options.
+const KEEP_ALIVE_SECONDS = 60;
+const RECONNECT_PERIOD_MS = 2000;
+
+/**
+ * Appwrite native push service — the Realtime analog over an MQTT broker, without
+ * FCM or APNS. In the browser the transport is MQTT 5 over WebSocket: while the page is
+ * open the connection stays up and each message is handed to your callback, and a
+ * subscription may also opt into a browser notification per message.
+ *
+ * The connection has no tunables — it always keeps its session (clean start off) so the
+ * broker can redeliver missed messages, and reliability is chosen per subscription via
+ * `retry`. `subscribe` opens the connection lazily and returns a
+ * {@link PushSubscription} handle (unlike Realtime's bare unsubscribe callable — Push
+ * carries per-subscription state). The credential is read off the client — set a JWT or
+ * session on it (`Client.setJWT` / `Client.setSession`), the same way every other service
+ * reads auth.
+ *
+ * const client = new Client().setEndpoint(...).setProject(...).setJWT(jwt);
+ * const push = new Push(client);
+ * const sub = await push.subscribe('user/123/#', (m) =>
+ * console.log(m.topic, m.data),
+ * );
+ * // sub.update({ background: true }); sub.unsubscribe();
+ */
+export class Push {
+ client: Client;
+
+ private mqtt: MqttClient | null = null;
+ private connecting: Promise | null = null;
+ private Buffer: Transport['Buffer'] | null = null;
+ /** Bumped by close(), so a connect still loading mqtt.js knows to stop. */
+ private generation = 0;
+ /** Set once the first CONNACK lands, so 'connect' events after are reconnects. */
+ private everConnected = false;
+
+ private onOpenCb?: () => void;
+ private onCloseCb?: () => void;
+ private onErrorCb?: (error: Error) => void;
+ /** Errors already handed to onError, so one failure is reported once. */
+ private reported = new WeakSet();
+ /** mqtt.js connect errors mapped to the error handed out for them (see connectError). */
+ private connectErrors = new WeakMap();
+ /** True while the first connect is in flight: its errors go to the waiting caller. */
+ private opening = false;
+
+ // Local id -> subscription state. The id is never sent to the broker; it only lets
+ // the same topic carry more than one callback (each with its own options).
+ /**
+ * This tab's part of the default client id when the tab has none yet (see claimTabId):
+ * random, but kept for this instance so reconnects resume the same broker session.
+ */
+ private readonly fallbackClientId = randomId();
+ /** The default client id claimed for this instance's connection, released on close(). */
+ private tabId = '';
+ /** In-flight claim of {@link tabId}, memoized per generation: a credential switch (same
+ * generation) shares the one claim; a close/reopen (new generation) chains a fresh claim. */
+ private tabIdClaim: Promise | null = null;
+ private tabIdClaimGeneration = -1;
+ private connectedKey = '';
+ private connectionEpoch = 0;
+
+ private readonly subscriptions = new Map<
+ string,
+ {
+ topic: string;
+ callback: MessageCallback;
+ background: boolean;
+ title?: string;
+ qos: 0 | 1;
+ }
+ >();
+
+ constructor(client: Client) {
+ this.client = client;
+ }
+
+ // The broker subscription for a filter uses the highest QoS any local subscription on
+ // it wants, so a QoS-0 subscription never downgrades a QoS-1 one sharing the filter.
+ private effectiveQos(filter: string): 0 | 1 {
+ for (const sub of this.subscriptions.values()) {
+ if (sub.topic === filter && sub.qos === 1) {
+ return 1;
+ }
+ }
+ return 0;
+ }
+
+ /** Register a callback invoked when the connection opens (CONNACK success). */
+ onOpen(callback: () => void): this {
+ this.onOpenCb = callback;
+ return this;
+ }
+
+ /** Register a callback invoked when the connection closes. */
+ onClose(callback: () => void): this {
+ this.onCloseCb = callback;
+ return this;
+ }
+
+ /** Register a callback invoked on a connection error. */
+ onError(callback: (error: Error) => void): this {
+ this.onErrorCb = callback;
+ return this;
+ }
+
+ /**
+ * The signed-in user's own topic, `users/`, for a topic-less subscribe. The id comes
+ * from the credential the connection authenticates with: the JWT when one is set (never
+ * the session, which could belong to a different user), else the session.
+ */
+ private userTopic(): string {
+ const { jwt, session } = this.client.config;
+ const userId = jwt ? userIdFromJwt(jwt) : userIdFromSession(session);
+ if (!userId) {
+ throw new Error(
+ 'subscribe() without a topic needs a signed-in user: set a JWT or session on the client',
+ );
+ }
+ return `users/${userId}`;
+ }
+
+ /**
+ * Hand an error to the onError callback, once per error. These errors happen outside any
+ * call (reconnects, broker DISCONNECTs, background re-subscribes), so they are never
+ * thrown, which would crash the app from inside mqtt.js: with no callback registered
+ * they are logged, like Realtime does.
+ */
+ private report(error: unknown): void {
+ const err = toError(error);
+ if (this.reported.has(err)) {
+ return;
+ }
+ this.reported.add(err);
+ if (!this.onErrorCb) {
+ console.error('Appwrite Push error:', err);
+ return;
+ }
+ try {
+ this.onErrorCb(err);
+ } catch (callbackError) {
+ console.error('Appwrite Push onError threw:', callbackError);
+ }
+ }
+
+ /**
+ * For a call that fails to its caller: report the error to onError when a callback is
+ * registered, then throw it to the caller, who can catch it.
+ */
+ private fail(error: unknown): never {
+ const err = toError(error);
+ if (this.onErrorCb) {
+ this.report(err);
+ }
+ throw err;
+ }
+
+ // --- realtime-like API ---
+
+ /**
+ * Subscribe to one or more topics. Resolves to a {@link PushSubscription} handle.
+ *
+ * Each topic is a string or a `Topic` builder, e.g.
+ * `Topic.path(['user', userId]).all()`.
+ *
+ * Called with only a callback, `subscribe((message) => {...}, options)` subscribes to the
+ * signed-in user's own topic, `users/`, like FCM/APNs delivery to a device. The
+ * user id is read from the JWT (or session) set on the client. This form defaults to
+ * `background: true` and `retry: true` (QoS 1); pass either in the options to override.
+ *
+ * Awaiting resolves only once the broker has acked every SUBSCRIBE (SUBACK):
+ * the broker only starts routing a topic once its subscription is registered,
+ * so publishing before the ack races the message ahead of the subscription and
+ * it is dropped (no retained replay on MQTT). Awaiting here makes
+ * subscribe-then-publish reliable.
+ *
+ * Pass `{ background: true, title }` to also show a browser notification per matching
+ * message while the tab is open, and `{ retry: false }` for at-most-once
+ * (QoS 0) delivery; toggle either later with the handle's `update`.
+ */
+ subscribe(
+ callback: MessageCallback,
+ options?: SubscribeOptions,
+ ): Promise;
+ subscribe(
+ topics:
+ string | Topic | ResolvedTopic | (string | Topic | ResolvedTopic)[],
+ callback: MessageCallback,
+ options?: SubscribeOptions,
+ ): Promise;
+ async subscribe(
+ topicsOrCallback:
+ | string
+ | Topic
+ | ResolvedTopic
+ | (string | Topic | ResolvedTopic)[]
+ | MessageCallback,
+ callbackOrOptions?: MessageCallback | SubscribeOptions,
+ topicOptions: SubscribeOptions = {},
+ ): Promise {
+ // Every failure reaches onError (when registered) and is thrown to the caller.
+ try {
+ return await this.subscribeWith(
+ topicsOrCallback,
+ callbackOrOptions,
+ topicOptions,
+ );
+ } catch (err) {
+ this.fail(err);
+ }
+ }
+
+ private async subscribeWith(
+ topicsOrCallback:
+ | string
+ | Topic
+ | ResolvedTopic
+ | (string | Topic | ResolvedTopic)[]
+ | MessageCallback,
+ callbackOrOptions: MessageCallback | SubscribeOptions | undefined,
+ topicOptions: SubscribeOptions,
+ ): Promise {
+ // Topic-less form: subscribe(callback, options) targets the signed-in user's topic.
+ const userForm = typeof topicsOrCallback === 'function';
+ const topics = userForm ? this.userTopic() : topicsOrCallback;
+ const callback = (
+ userForm ? topicsOrCallback : callbackOrOptions
+ ) as MessageCallback;
+ const options = (
+ userForm ? (callbackOrOptions ?? {}) : topicOptions
+ ) as SubscribeOptions;
+ const topicList = (Array.isArray(topics) ? topics : [topics]).map(
+ (topic) => topic.toString(),
+ );
+ // The user topic defaults to background delivery, like FCM/APNs; topics default off.
+ const background = options.background ?? userForm;
+ const qos: 0 | 1 = (options.retry ?? true) ? 1 : 0;
+
+ if (background) {
+ this.requestNotificationPermission();
+ }
+
+ let client: MqttClient;
+ try {
+ client = await this.connect();
+ } catch (err) {
+ if (err instanceof SupersededError) {
+ return this.subscribeWith(
+ topicsOrCallback,
+ callbackOrOptions,
+ topicOptions,
+ );
+ }
+ throw err;
+ }
+ const epoch = this.connectionEpoch;
+
+ const ids: string[] = [];
+ const acks: Promise[] = [];
+ for (const topic of topicList) {
+ const id = randomId();
+ ids.push(id);
+ this.subscriptions.set(id, {
+ topic,
+ callback,
+ background,
+ title: options.title,
+ qos,
+ });
+ acks.push(
+ new Promise((resolve, reject) => {
+ client.subscribe(
+ topic,
+ { qos: this.effectiveQos(topic) },
+ (err) => (err ? reject(err) : resolve()),
+ );
+ }),
+ );
+ }
+
+ const unsubscribe = () => {
+ // Filters whose removed sub was QoS 1: their effective QoS may now drop.
+ const maybeDowngrade = new Set();
+ for (const id of ids) {
+ const entry = this.subscriptions.get(id);
+ this.subscriptions.delete(id);
+ if (entry?.qos === 1) {
+ maybeDowngrade.add(entry.topic);
+ }
+ // Only unsubscribe the broker filter once its last local callback is gone.
+ const stillUsed = [...this.subscriptions.values()].some(
+ (s) => s.topic === entry?.topic,
+ );
+ if (entry && this.mqtt && !stillUsed) {
+ this.mqtt.unsubscribe(entry.topic, (err) => {
+ if (err) {
+ this.report(err);
+ }
+ });
+ }
+ }
+ // A filter that lost its last QoS-1 sub but still has QoS-0 subs must be
+ // re-SUBSCRIBEd at the lower QoS, or the broker keeps replaying to at-most-once subs.
+ for (const filter of maybeDowngrade) {
+ const stillUsed = [...this.subscriptions.values()].some(
+ (s) => s.topic === filter,
+ );
+ if (stillUsed && this.effectiveQos(filter) === 0) {
+ this.mqtt?.subscribe(filter, { qos: 0 }, (err) => {
+ if (err) {
+ this.report(err);
+ }
+ });
+ }
+ }
+ if (this.subscriptions.size === 0) {
+ this.close();
+ }
+ };
+
+ // If any topic's subscribe fails, roll this call's registrations back (and drop
+ // any now-unused broker filter) so a failed subscribe leaks no callback, then rethrow.
+ try {
+ await Promise.all(acks);
+ } catch (err) {
+ if (epoch !== this.connectionEpoch) {
+ for (const id of ids) {
+ this.subscriptions.delete(id);
+ }
+ return this.subscribeWith(
+ topicsOrCallback,
+ callbackOrOptions,
+ topicOptions,
+ );
+ }
+ unsubscribe();
+ throw err;
+ }
+
+ const update = (next: SubscribeOptions) => {
+ const enabling = next.background === true;
+ const changedFilters = new Set();
+ // Remember the pre-update QoS per id so a rejected re-SUBSCRIBE can be rolled back.
+ const previous = new Map();
+ for (const id of ids) {
+ const entry = this.subscriptions.get(id);
+ if (!entry) {
+ continue;
+ }
+ if (next.background !== undefined) {
+ entry.background = next.background;
+ }
+ if (next.title !== undefined) {
+ entry.title = next.title;
+ }
+ if (next.retry !== undefined) {
+ const q: 0 | 1 = next.retry ? 1 : 0;
+ if (q !== entry.qos) {
+ previous.set(id, entry.qos);
+ entry.qos = q;
+ changedFilters.add(entry.topic);
+ }
+ }
+ }
+ if (enabling) {
+ this.requestNotificationPermission();
+ }
+ // Re-SUBSCRIBE the affected filters at their new effective QoS (a SUBSCRIBE to an
+ // existing filter just updates its QoS — no unsubscribe gap). If the broker rejects
+ // it, the old subscription still stands, so restore the local QoS to match and
+ // surface the error rather than silently assuming the change took effect.
+ for (const filter of changedFilters) {
+ this.mqtt?.subscribe(
+ filter,
+ { qos: this.effectiveQos(filter) },
+ (err) => {
+ if (!err) {
+ return;
+ }
+ for (const [id, q] of previous) {
+ const entry = this.subscriptions.get(id);
+ if (entry && entry.topic === filter) {
+ entry.qos = q;
+ }
+ }
+ this.report(err);
+ },
+ );
+ }
+ };
+
+ return { unsubscribe, update };
+ }
+
+ /** Tear down the connection and drop all active subscriptions. */
+ close(): void {
+ if (this.mqtt) {
+ this.mqtt.end(true);
+ this.mqtt = null;
+ }
+ if (this.tabId !== '') {
+ releaseTabId(this.tabId);
+ this.tabId = '';
+ }
+ this.connecting = null;
+ // Bumping the generation ends the current claim: one still in flight releases its id when
+ // it resolves, and the next open() chains a fresh claim after it (see claimClientId).
+ this.generation++;
+ this.everConnected = false;
+ this.subscriptions.clear();
+ }
+
+ /**
+ * Re-register every active subscription. Called on each reconnect so a client that
+ * reconnects with a fresh (or cleared) session does not silently stop receiving;
+ * re-subscribing an existing filter is idempotent.
+ */
+ private resubscribeAll(): void {
+ const client = this.mqtt;
+ if (!client) {
+ return;
+ }
+ const filters = new Set(
+ [...this.subscriptions.values()].map((s) => s.topic),
+ );
+ for (const filter of filters) {
+ client.subscribe(
+ filter,
+ { qos: this.effectiveQos(filter) },
+ (err) => {
+ if (err) {
+ this.report(err);
+ }
+ },
+ );
+ }
+ }
+
+ // --- internals ---
+
+ private connect(): Promise {
+ if (
+ (this.mqtt || this.connecting) &&
+ this.connectedKey !== this.credentialKey()
+ ) {
+ this.connectionEpoch++;
+ this.mqtt?.end(true);
+ this.mqtt = null;
+ this.connecting = null;
+ this.everConnected = this.subscriptions.size > 0;
+ }
+ if (this.mqtt && !this.connecting) {
+ return Promise.resolve(this.mqtt);
+ }
+ if (!this.connecting) {
+ const connecting = this.open();
+ this.connecting = connecting;
+ // A failed open must not poison future attempts — clear the cached
+ // in-flight promise so a later subscribe/publish can retry.
+ connecting.catch(() => {
+ if (this.connecting === connecting) {
+ this.connecting = null;
+ }
+ });
+ }
+ return this.connecting.then(() => this.mqtt!);
+ }
+
+ private credential(): { authMethod: AuthMethod; credential: string } {
+ if (this.client.config.jwt) {
+ return {
+ authMethod: 'appwrite-jwt',
+ credential: this.client.config.jwt,
+ };
+ }
+ if (this.client.config.session) {
+ return {
+ authMethod: 'appwrite-session',
+ credential: this.client.config.session,
+ };
+ }
+ throw new Error(
+ 'No credential set on the client; call Client.setJWT() or Client.setSession() first.',
+ );
+ }
+
+ private credentialKey(): string {
+ try {
+ const { authMethod, credential } = this.credential();
+ return [
+ this.endpointUrl(),
+ this.client.config.project ?? '',
+ this.client.config.pushClientId ?? '',
+ authMethod,
+ credential,
+ ].join('|');
+ } catch {
+ return '';
+ }
+ }
+
+ private endpointUrl(): string {
+ // The push endpoint set on the client (Client.setPushEndpoint) wins.
+ if (this.client.config.endpointPush !== '') {
+ return this.client.config.endpointPush;
+ }
+ // Otherwise default to a `push.` host on the regular API endpoint (not the
+ // independently-configurable realtime endpoint), scheme switched to ws/wss.
+ const wsEndpoint = this.client.config.endpoint
+ .replace('https://', 'wss://')
+ .replace('http://', 'ws://');
+ // Prefix the host with `push.` (scheme://host/path -> scheme://push.host/path).
+ const separator = '://';
+ const at = wsEndpoint.indexOf(separator);
+ return at === -1
+ ? wsEndpoint
+ : `${wsEndpoint.slice(0, at + separator.length)}push.${wsEndpoint.slice(at + separator.length)}`;
+ }
+
+ /**
+ * Claim this connection's default client id, memoized per generation. A credential switch (same
+ * generation) shares the one claim, so concurrent open() calls never each claim. A close/reopen
+ * (a new generation) chains a fresh claim after the previous one has settled and released its
+ * id, so the reopened connection can take the tab's stored id back rather than a fallback. A
+ * claim that resolves after its generation has ended releases its id instead of keeping it, so
+ * a stale open connects with nothing reserved and the stored id is never stranded.
+ */
+ private claimClientId(): Promise {
+ const generation = this.generation;
+ if (
+ this.tabIdClaim === null ||
+ this.tabIdClaimGeneration !== generation
+ ) {
+ const previous = this.tabIdClaim ?? Promise.resolve('');
+ this.tabIdClaimGeneration = generation;
+ const claim = previous
+ .catch(() => '')
+ .then(() => claimTabId(this.fallbackClientId))
+ .then((id) => {
+ if (this.generation !== generation) {
+ releaseTabId(id);
+ return '';
+ }
+ this.tabId = id;
+ return id;
+ });
+ this.tabIdClaim = claim;
+ return claim;
+ }
+ return this.tabIdClaim;
+ }
+
+ private async open(): Promise {
+ const { authMethod, credential } = this.credential();
+ this.connectedKey = this.credentialKey();
+ const epoch = this.connectionEpoch;
+ const generation = this.generation;
+
+ const project = this.client.config.project ?? '';
+ // Client id, when the app did not set one with Client.setPushClientId(). Unlike the
+ // native SDKs (which send an empty id and let the broker derive a stable one), mqtt.js
+ // rejects an empty id with clean start off, so derive one per user and tab from the
+ // credential this connection authenticates with (the JWT's userId, or the session's user
+ // id) and an id kept in the tab's sessionStorage. It stays the same across reloads, so
+ // the broker's replay cursor resumes, and differs between tabs and browsers, so two of
+ // them do not take over each other's session. The credential itself is never used.
+ const userId =
+ authMethod === 'appwrite-jwt'
+ ? userIdFromJwt(credential)
+ : userIdFromSession(credential);
+ // Claim once per instance (memoized) and reuse it across reconnects and credential
+ // switches, so concurrent open() calls never each claim and strand the tab's stored id.
+ // Concurrent instances still get distinct ids. If close() ran while the claim was pending
+ // this open is stale, so stop before connecting (the claim releases its own id).
+ if (!this.client.config.pushClientId) {
+ await this.claimClientId();
+ if (generation !== this.generation) {
+ throw new Error('Push was closed while connecting.');
+ }
+ }
+ const tabId = this.tabId;
+ const clientId =
+ this.client.config.pushClientId ||
+ (userId ? `${userId}-${tabId}` : tabId);
+
+ const { connect, Buffer } = await loadTransport();
+ if (generation !== this.generation) {
+ throw new Error('Push was closed while connecting.');
+ }
+ if (epoch !== this.connectionEpoch) {
+ throw new SupersededError();
+ }
+ this.Buffer = Buffer;
+
+ const options: IClientOptions = {
+ clientId,
+ protocolVersion: 5,
+ clean: false, // always keep the session so the broker can replay QoS-1 topics
+ keepalive: KEEP_ALIVE_SECONDS,
+ reconnectPeriod: RECONNECT_PERIOD_MS,
+ manualConnect: true,
+ // Enhanced auth carried in CONNECT properties.
+ properties: {
+ authenticationMethod: authMethod,
+ authenticationData: Buffer.from(credential),
+ userProperties: { projectId: project },
+ },
+ };
+
+ const client = connect(this.endpointUrl(), options);
+ this.mqtt = client;
+
+ client.on('message', (_topic, _payload, packet) => {
+ this.dispatch(packet).catch((err) => this.report(err));
+ });
+
+ // Persistent lifecycle listeners. Re-register every subscription on reconnect
+ // (harmless if the broker resumed our session), and surface the lifecycle to the
+ // caller's onOpen/onClose/onError hooks.
+ client.on('connect', () => {
+ if (this.everConnected) {
+ this.resubscribeAll();
+ }
+ this.everConnected = true;
+ this.onOpenCb?.();
+ });
+ client.on('close', () => this.onCloseCb?.());
+ // The broker explains a refused CONNECT (CONNACK) or a server-initiated DISCONNECT
+ // with an MQTT 5 Reason String. mqtt.js reports only the reason code, so capture the
+ // string off the packet (packetreceive fires before mqtt.js handles it) and hand it
+ // to onError as the error message.
+ let refusedReason: string | undefined;
+ client.on('packetreceive', (packet) => {
+ if (packet.cmd === 'connack') {
+ refusedReason =
+ (packet.reasonCode ?? 0) !== 0
+ ? packet.properties?.reasonString
+ : undefined;
+ }
+ });
+ client.on('error', (err) => {
+ if (epoch !== this.connectionEpoch) {
+ return;
+ }
+ const error = this.connectError(err, refusedReason);
+ // While the first connect is pending its caller receives the error (and reports it
+ // through fail()); afterwards, e.g. on reconnect, report it here.
+ if (!this.opening) {
+ this.report(error);
+ }
+ });
+ client.on('disconnect', (packet) => {
+ if ((packet.reasonCode ?? 0) !== 0) {
+ this.report(
+ new Error(
+ packet.properties?.reasonString ??
+ `Disconnected by the broker (reason ${packet.reasonCode})`,
+ ),
+ );
+ }
+ });
+
+ this.opening = true;
+ await new Promise((resolve, reject) => {
+ const onConnect = (packet: IConnackPacket) => {
+ cleanup();
+ if (epoch !== this.connectionEpoch) {
+ reject(new SupersededError());
+ return;
+ }
+ const rc = packet.reasonCode ?? packet.returnCode ?? 0;
+ if (rc !== 0) {
+ this.close();
+ reject(
+ new Error(
+ refusedReason ??
+ `MQTT authentication failed (CONNACK reason ${rc})`,
+ ),
+ );
+ } else {
+ resolve();
+ }
+ };
+ const onError = (err: Error) => {
+ cleanup();
+ if (epoch !== this.connectionEpoch) {
+ reject(new SupersededError());
+ return;
+ }
+ this.close();
+ reject(this.connectError(err, refusedReason));
+ };
+ const onClose = () => {
+ if (epoch !== this.connectionEpoch) {
+ cleanup();
+ reject(new SupersededError());
+ }
+ };
+ const cleanup = () => {
+ if (epoch === this.connectionEpoch) {
+ this.opening = false;
+ }
+ client.removeListener('connect', onConnect);
+ client.removeListener('error', onError);
+ client.removeListener('close', onClose);
+ };
+ client.on('connect', onConnect);
+ client.on('error', onError);
+ client.on('close', onClose);
+ client.connect();
+ });
+ }
+
+ /**
+ * The error for a failed connect: the broker's Reason String when it sent one (a refused
+ * CONNACK), else mqtt.js's error. Memoized so both error listeners hand out the same
+ * object and it is reported once.
+ */
+ private connectError(err: unknown, reason: string | undefined): Error {
+ const source = toError(err);
+ let error = this.connectErrors.get(source);
+ if (!error) {
+ error = reason ? new Error(reason) : source;
+ this.connectErrors.set(source, error);
+ }
+ return error;
+ }
+
+ /** Fan a delivered packet out to every subscription whose filter matches. */
+ private async dispatch(packet: IPublishPacket): Promise {
+ const Buffer = this.Buffer!;
+ const payload = Buffer.isBuffer(packet.payload)
+ ? packet.payload
+ : Buffer.from(packet.payload);
+ const message: PushMessage = {
+ topic: packet.topic.toString(),
+ data: new TextDecoder().decode(payload),
+ payload,
+ qos: packet.qos,
+ };
+ for (const sub of this.subscriptions.values()) {
+ if (matches(sub.topic, message.topic)) {
+ await sub.callback(message);
+ // Notification is per-subscription: only subs that opted in post one,
+ // each with its own title.
+ if (sub.background) {
+ this.notify(message, sub.title);
+ }
+ }
+ }
+ }
+
+ private requestNotificationPermission(): void {
+ if (
+ typeof Notification !== 'undefined' &&
+ Notification.permission === 'default'
+ ) {
+ Promise.resolve(Notification.requestPermission()).catch((err) =>
+ this.report(err),
+ );
+ }
+ }
+
+ /** Post a browser notification for a message a background subscription matched. */
+ private notify(message: PushMessage, title?: string): void {
+ if (
+ typeof Notification === 'undefined' ||
+ Notification.permission !== 'granted'
+ ) {
+ return;
+ }
+ try {
+ new Notification(title ?? message.topic, {
+ body: message.data,
+ });
+ } catch {
+ // Some browsers only allow notifications from a service worker; ignore.
+ }
+ }
+}
+
+class SupersededError extends Error {
+ constructor() {
+ super('The push connection was superseded');
+ }
+}
+
+/** Normalize anything thrown or passed to an error handler into an `Error`. */
+function toError(error: unknown): Error {
+ return error instanceof Error ? error : new Error(String(error));
+}
+
+/**
+ * The userId claim from an Appwrite JWT, used as the default MQTT client id so the
+ * broker's replay cursor is stable per user. Returns '' when the token is not a decodable JWT
+ * (e.g. a plain string), so the caller can fall back to the session or raw credential.
+ */
+function userIdFromJwt(jwt?: string): string {
+ if (!jwt) {
+ return '';
+ }
+ const parts = jwt.split('.');
+ if (parts.length < 2) {
+ return '';
+ }
+ try {
+ const payload = JSON.parse(
+ decodeBase64(parts[1].replace(/-/g, '+').replace(/_/g, '/')),
+ );
+ return typeof payload.userId === 'string' ? payload.userId : '';
+ } catch {
+ return '';
+ }
+}
+
+/**
+ * The user id inside a session secret, which is base64 of JSON `{"id": , "secret": ...}`.
+ * Returns '' when the value is not such a secret.
+ */
+function userIdFromSession(session?: string): string {
+ if (!session) {
+ return '';
+ }
+ try {
+ const payload = JSON.parse(decodeBase64(session));
+ return typeof payload.id === 'string' ? payload.id : '';
+ } catch {
+ return '';
+ }
+}
+
+/** Ids in use by live connections in this page, so two Push instances never share a client id. */
+const claimedTabIds = new Set();
+/** The tab's stored id, resolved and locked once per page (see claimStoredTabId). */
+let storedTabIdClaim: Promise | null = null;
+
+/**
+ * A default client id for one Push connection in this page. The first connection alive takes the
+ * tab's stored id (kept in sessionStorage and locked for the page's lifetime, so it stays the same
+ * across reloads and the broker's replay cursor resumes). Any connection alive at the same time
+ * takes a distinct locked id instead, so simultaneous Push instances never share a client id and
+ * so cannot take over each other's broker session. `fallback` is this instance's own random id.
+ */
+async function claimTabId(fallback: string): Promise {
+ const stored = await claimStoredTabId(fallback);
+ if (stored !== '' && !claimedTabIds.has(stored)) {
+ claimedTabIds.add(stored);
+ return stored;
+ }
+ // The tab's id is taken by another live connection here: take a distinct, locked id without
+ // touching the tab's stored cursor.
+ let id = fallback;
+ while (claimedTabIds.has(id)) {
+ id = randomId();
+ }
+ const locks =
+ typeof navigator === 'undefined' ? undefined : navigator.locks;
+ if (locks) {
+ await holdTabId(locks, id);
+ }
+ claimedTabIds.add(id);
+ return id;
+}
+
+/** Free an id when its connection closes, so a later connection can reuse it (e.g. the stored id). */
+function releaseTabId(id: string): void {
+ claimedTabIds.delete(id);
+}
+
+/**
+ * The tab's stored id, resolved and locked once per page: the value in sessionStorage when a lock
+ * on it is free (this tab owns it), else a fresh id that is locked and stored. Without Web Locks
+ * (or when locking fails) a copied id cannot be told apart from another tab's, so the page uses a
+ * fresh id and leaves sessionStorage alone. '' when sessionStorage cannot be read, so the caller
+ * falls back to its own id.
+ */
+function claimStoredTabId(fallback: string): Promise {
+ storedTabIdClaim ??= (async () => {
+ const locks =
+ typeof navigator === 'undefined' ? undefined : navigator.locks;
+ if (!locks) {
+ return fallback;
+ }
+ let stored: string | null;
+ try {
+ stored = window.sessionStorage.getItem(TAB_ID_KEY);
+ } catch {
+ return '';
+ }
+ if (stored && (await holdTabId(locks, stored))) {
+ return stored;
+ }
+ if (!(await holdTabId(locks, fallback))) {
+ return fallback;
+ }
+ try {
+ window.sessionStorage.setItem(TAB_ID_KEY, fallback);
+ } catch {
+ // Not persisted, but still usable as this page's stored id for this session.
+ }
+ return fallback;
+ })();
+ return storedTabIdClaim;
+}
+
+function holdTabId(locks: LockManager, id: string): Promise {
+ return new Promise((resolve) => {
+ locks
+ .request(`${TAB_ID_KEY}:${id}`, { ifAvailable: true }, (lock) => {
+ resolve(lock !== null);
+ return lock ? new Promise(() => {}) : undefined;
+ })
+ .catch(() => resolve(false));
+ });
+}
+
+/** Base64 to UTF-8 text without `buffer`, which only loads once Push connects. */
+function decodeBase64(value: string): string {
+ return new TextDecoder().decode(
+ Uint8Array.from(atob(value), (char) => char.charCodeAt(0)),
+ );
+}
+
+/** A hex id, uuid4-like enough for a client-generated client id suffix. */
+function randomId(): string {
+ let out = '';
+ for (let i = 0; i < 32; i++) {
+ out += Math.floor(Math.random() * 16).toString(16);
+ }
+ return out;
+}
+
+/** MQTT topic-filter match with '+' (single level) and '#' (multi level). */
+function matches(filter: string, topic: string): boolean {
+ const filterParts = filter.split('/');
+ const topicParts = topic.split('/');
+ for (let i = 0; i < filterParts.length; i++) {
+ const part = filterParts[i];
+ if (part === '#') {
+ return true;
+ }
+ if (i >= topicParts.length) {
+ return false;
+ }
+ if (part !== '+' && part !== topicParts[i]) {
+ return false;
+ }
+ }
+ return filterParts.length === topicParts.length;
+}
diff --git a/src/services/storage.ts b/src/services/storage.ts
index 5fd3911..bd0220f 100644
--- a/src/services/storage.ts
+++ b/src/services/storage.ts
@@ -1,4 +1,3 @@
-import { Service } from '../service';
import {
AppwriteException,
Client,
@@ -101,15 +100,15 @@ export class Storage {
'{bucketId}',
encodeURIComponent(String(bucketId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof search !== 'undefined') {
- payload['search'] = search;
+ apiPayload['search'] = search;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -118,7 +117,7 @@ export class Storage {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -249,18 +248,18 @@ export class Storage {
'{bucketId}',
encodeURIComponent(String(bucketId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof fileId !== 'undefined') {
- payload['fileId'] = fileId;
+ apiPayload['fileId'] = fileId;
}
if (typeof file !== 'undefined') {
- payload['file'] = file;
+ apiPayload['file'] = file;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof folder !== 'undefined') {
- payload['folder'] = folder;
+ apiPayload['folder'] = folder;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -274,7 +273,7 @@ export class Storage {
'post',
uri,
apiHeaders,
- payload,
+ apiPayload,
onProgress,
);
}
@@ -334,7 +333,7 @@ export class Storage {
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'
.replace('{bucketId}', encodeURIComponent(String(bucketId)))
.replace('{fileId}', encodeURIComponent(String(fileId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -342,7 +341,7 @@ export class Storage {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -432,12 +431,12 @@ export class Storage {
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'
.replace('{bucketId}', encodeURIComponent(String(bucketId)))
.replace('{fileId}', encodeURIComponent(String(fileId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -447,7 +446,7 @@ export class Storage {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -505,7 +504,7 @@ export class Storage {
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'
.replace('{bucketId}', encodeURIComponent(String(bucketId)))
.replace('{fileId}', encodeURIComponent(String(fileId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -514,7 +513,7 @@ export class Storage {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -582,16 +581,16 @@ export class Storage {
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'
.replace('{bucketId}', encodeURIComponent(String(bucketId)))
.replace('{fileId}', encodeURIComponent(String(fileId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof token !== 'undefined') {
- payload['token'] = token;
+ apiPayload['token'] = token;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -789,49 +788,49 @@ export class Storage {
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'
.replace('{bucketId}', encodeURIComponent(String(bucketId)))
.replace('{fileId}', encodeURIComponent(String(fileId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof width !== 'undefined') {
- payload['width'] = width;
+ apiPayload['width'] = width;
}
if (typeof height !== 'undefined') {
- payload['height'] = height;
+ apiPayload['height'] = height;
}
if (typeof gravity !== 'undefined') {
- payload['gravity'] = gravity;
+ apiPayload['gravity'] = gravity;
}
if (typeof quality !== 'undefined') {
- payload['quality'] = quality;
+ apiPayload['quality'] = quality;
}
if (typeof borderWidth !== 'undefined') {
- payload['borderWidth'] = borderWidth;
+ apiPayload['borderWidth'] = borderWidth;
}
if (typeof borderColor !== 'undefined') {
- payload['borderColor'] = borderColor;
+ apiPayload['borderColor'] = borderColor;
}
if (typeof borderRadius !== 'undefined') {
- payload['borderRadius'] = borderRadius;
+ apiPayload['borderRadius'] = borderRadius;
}
if (typeof opacity !== 'undefined') {
- payload['opacity'] = opacity;
+ apiPayload['opacity'] = opacity;
}
if (typeof rotation !== 'undefined') {
- payload['rotation'] = rotation;
+ apiPayload['rotation'] = rotation;
}
if (typeof background !== 'undefined') {
- payload['background'] = background;
+ apiPayload['background'] = background;
}
if (typeof output !== 'undefined') {
- payload['output'] = output;
+ apiPayload['output'] = output;
}
if (typeof token !== 'undefined') {
- payload['token'] = token;
+ apiPayload['token'] = token;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
@@ -903,16 +902,16 @@ export class Storage {
const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'
.replace('{bucketId}', encodeURIComponent(String(bucketId)))
.replace('{fileId}', encodeURIComponent(String(fileId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof token !== 'undefined') {
- payload['token'] = token;
+ apiPayload['token'] = token;
}
const uri = new URL(this.client.config.endpoint + apiPath);
- payload['project'] = this.client.config.project;
- payload['impersonateuserid'] = this.client.config.impersonateuserid;
+ apiPayload['project'] = this.client.config.project;
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
- for (const [key, value] of Object.entries(Service.flatten(payload))) {
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
uri.searchParams.append(key, value);
}
diff --git a/src/services/tables-db.ts b/src/services/tables-db.ts
index 3a3d1fc..00acbed 100644
--- a/src/services/tables-db.ts
+++ b/src/services/tables-db.ts
@@ -12,45 +12,60 @@ export class TablesDB {
* List transactions across all databases.
*
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
*/
listTransactions(params?: {
queries?: string[];
+ total?: boolean;
}): Promise;
/**
* List transactions across all databases.
*
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
* @deprecated Use the object parameter style method for a better developer experience.
*/
- listTransactions(queries?: string[]): Promise;
listTransactions(
- paramsOrFirst?: { queries?: string[] } | string[],
+ queries?: string[],
+ total?: boolean,
+ ): Promise;
+ listTransactions(
+ paramsOrFirst?: { queries?: string[]; total?: boolean } | string[],
+ ...rest: [boolean?]
): Promise {
- let params: { queries?: string[] };
+ let params: { queries?: string[]; total?: boolean };
if (
- typeof paramsOrFirst === 'undefined' ||
+ (typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
(paramsOrFirst &&
typeof paramsOrFirst === 'object' &&
!Array.isArray(paramsOrFirst))
) {
- params = (paramsOrFirst || {}) as { queries?: string[] };
+ params = (paramsOrFirst || {}) as {
+ queries?: string[];
+ total?: boolean;
+ };
} else {
params = {
queries: paramsOrFirst as string[],
+ total: rest[0] as boolean,
};
}
const queries = params.queries;
+ const total = params.total;
const apiPath = '/tablesdb/transactions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
+ }
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -59,7 +74,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -100,9 +115,9 @@ export class TablesDB {
const ttl = params.ttl;
const apiPath = '/tablesdb/transactions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -112,7 +127,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -162,7 +177,7 @@ export class TablesDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -170,7 +185,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -245,12 +260,12 @@ export class TablesDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof commit !== 'undefined') {
- payload['commit'] = commit;
+ apiPayload['commit'] = commit;
}
if (typeof rollback !== 'undefined') {
- payload['rollback'] = rollback;
+ apiPayload['rollback'] = rollback;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -260,7 +275,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -308,7 +323,7 @@ export class TablesDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -317,7 +332,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -381,9 +396,9 @@ export class TablesDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof operations !== 'undefined') {
- payload['operations'] = operations;
+ apiPayload['operations'] = operations;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -393,7 +408,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -503,18 +518,18 @@ export class TablesDB {
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'
.replace('{databaseId}', encodeURIComponent(String(databaseId)))
.replace('{tableId}', encodeURIComponent(String(tableId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -523,7 +538,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -659,18 +674,18 @@ export class TablesDB {
const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'
.replace('{databaseId}', encodeURIComponent(String(databaseId)))
.replace('{tableId}', encodeURIComponent(String(tableId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof rowId !== 'undefined') {
- payload['rowId'] = rowId;
+ apiPayload['rowId'] = rowId;
}
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -680,7 +695,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -785,12 +800,12 @@ export class TablesDB {
.replace('{databaseId}', encodeURIComponent(String(databaseId)))
.replace('{tableId}', encodeURIComponent(String(tableId)))
.replace('{rowId}', encodeURIComponent(String(rowId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -799,7 +814,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -936,15 +951,15 @@ export class TablesDB {
.replace('{databaseId}', encodeURIComponent(String(databaseId)))
.replace('{tableId}', encodeURIComponent(String(tableId)))
.replace('{rowId}', encodeURIComponent(String(rowId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -954,7 +969,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -1091,15 +1106,15 @@ export class TablesDB {
.replace('{databaseId}', encodeURIComponent(String(databaseId)))
.replace('{tableId}', encodeURIComponent(String(tableId)))
.replace('{rowId}', encodeURIComponent(String(rowId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1109,7 +1124,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1205,9 +1220,9 @@ export class TablesDB {
.replace('{databaseId}', encodeURIComponent(String(databaseId)))
.replace('{tableId}', encodeURIComponent(String(tableId)))
.replace('{rowId}', encodeURIComponent(String(rowId)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1217,7 +1232,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -1345,15 +1360,15 @@ export class TablesDB {
.replace('{tableId}', encodeURIComponent(String(tableId)))
.replace('{rowId}', encodeURIComponent(String(rowId)))
.replace('{column}', encodeURIComponent(String(column)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof value !== 'undefined') {
- payload['value'] = value;
+ apiPayload['value'] = value;
}
if (typeof min !== 'undefined') {
- payload['min'] = min;
+ apiPayload['min'] = min;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1363,7 +1378,7 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1491,15 +1506,15 @@ export class TablesDB {
.replace('{tableId}', encodeURIComponent(String(tableId)))
.replace('{rowId}', encodeURIComponent(String(rowId)))
.replace('{column}', encodeURIComponent(String(column)));
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof value !== 'undefined') {
- payload['value'] = value;
+ apiPayload['value'] = value;
}
if (typeof max !== 'undefined') {
- payload['max'] = max;
+ apiPayload['max'] = max;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1509,6 +1524,6 @@ export class TablesDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/teams.ts b/src/services/teams.ts
index 54aacf1..692cb2b 100644
--- a/src/services/teams.ts
+++ b/src/services/teams.ts
@@ -70,15 +70,15 @@ export class Teams {
const total = params.total;
const apiPath = '/teams';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof search !== 'undefined') {
- payload['search'] = search;
+ apiPayload['search'] = search;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -87,7 +87,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -95,7 +95,7 @@ export class Teams {
*
* @param {string} params.teamId - Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
* @param {string} params.name - Team name. Max length: 128 chars.
- * @param {string[]} params.roles - Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
+ * @param {string[]} params.roles - Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
* @throws {AppwriteException}
* @returns {Promise>}
*/
@@ -111,7 +111,7 @@ export class Teams {
*
* @param {string} teamId - Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
* @param {string} name - Team name. Max length: 128 chars.
- * @param {string[]} roles - Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
+ * @param {string[]} roles - Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
* @throws {AppwriteException}
* @returns {Promise>}
* @deprecated Use the object parameter style method for a better developer experience.
@@ -157,15 +157,15 @@ export class Teams {
throw new AppwriteException('Missing required parameter: "name"');
}
const apiPath = '/teams';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof teamId !== 'undefined') {
- payload['teamId'] = teamId;
+ apiPayload['teamId'] = teamId;
}
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
if (typeof roles !== 'undefined') {
- payload['roles'] = roles;
+ apiPayload['roles'] = roles;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -175,7 +175,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -225,7 +225,7 @@ export class Teams {
'{teamId}',
encodeURIComponent(String(teamId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -233,7 +233,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -296,9 +296,9 @@ export class Teams {
'{teamId}',
encodeURIComponent(String(teamId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -308,7 +308,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -352,7 +352,7 @@ export class Teams {
'{teamId}',
encodeURIComponent(String(teamId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -361,7 +361,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -429,12 +429,12 @@ export class Teams {
'{teamId}',
encodeURIComponent(String(teamId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -443,7 +443,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -519,12 +519,12 @@ export class Teams {
'{teamId}',
encodeURIComponent(String(teamId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof appId !== 'undefined') {
- payload['appId'] = appId;
+ apiPayload['appId'] = appId;
}
if (typeof authorizationDetails !== 'undefined') {
- payload['authorizationDetails'] = authorizationDetails;
+ apiPayload['authorizationDetails'] = authorizationDetails;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -534,7 +534,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -601,7 +601,7 @@ export class Teams {
'{installationId}',
encodeURIComponent(String(installationId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -609,7 +609,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -693,9 +693,9 @@ export class Teams {
'{installationId}',
encodeURIComponent(String(installationId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof authorizationDetails !== 'undefined') {
- payload['authorizationDetails'] = authorizationDetails;
+ apiPayload['authorizationDetails'] = authorizationDetails;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -705,7 +705,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -769,7 +769,7 @@ export class Teams {
'{installationId}',
encodeURIComponent(String(installationId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -778,7 +778,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -864,15 +864,15 @@ export class Teams {
'{teamId}',
encodeURIComponent(String(teamId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof search !== 'undefined') {
- payload['search'] = search;
+ apiPayload['search'] = search;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -881,7 +881,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1011,24 +1011,24 @@ export class Teams {
'{teamId}',
encodeURIComponent(String(teamId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof email !== 'undefined') {
- payload['email'] = email;
+ apiPayload['email'] = email;
}
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof phone !== 'undefined') {
- payload['phone'] = phone;
+ apiPayload['phone'] = phone;
}
if (typeof roles !== 'undefined') {
- payload['roles'] = roles;
+ apiPayload['roles'] = roles;
}
if (typeof url !== 'undefined') {
- payload['url'] = url;
+ apiPayload['url'] = url;
}
if (typeof name !== 'undefined') {
- payload['name'] = name;
+ apiPayload['name'] = name;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1038,7 +1038,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -1105,7 +1105,7 @@ export class Teams {
'{membershipId}',
encodeURIComponent(String(membershipId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1113,7 +1113,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1193,9 +1193,9 @@ export class Teams {
'{membershipId}',
encodeURIComponent(String(membershipId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof roles !== 'undefined') {
- payload['roles'] = roles;
+ apiPayload['roles'] = roles;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1205,7 +1205,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1269,7 +1269,7 @@ export class Teams {
'{membershipId}',
encodeURIComponent(String(membershipId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1278,7 +1278,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -1383,12 +1383,12 @@ export class Teams {
'{membershipId}',
encodeURIComponent(String(membershipId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof userId !== 'undefined') {
- payload['userId'] = userId;
+ apiPayload['userId'] = userId;
}
if (typeof secret !== 'undefined') {
- payload['secret'] = secret;
+ apiPayload['secret'] = secret;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1398,7 +1398,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1448,7 +1448,7 @@ export class Teams {
'{teamId}',
encodeURIComponent(String(teamId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1456,7 +1456,7 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1516,9 +1516,9 @@ export class Teams {
'{teamId}',
encodeURIComponent(String(teamId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof prefs !== 'undefined') {
- payload['prefs'] = prefs;
+ apiPayload['prefs'] = prefs;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1528,6 +1528,6 @@ export class Teams {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/services/vectors-db.ts b/src/services/vectors-db.ts
index 6720033..af957f3 100644
--- a/src/services/vectors-db.ts
+++ b/src/services/vectors-db.ts
@@ -12,45 +12,60 @@ export class VectorsDB {
* List transactions across all databases.
*
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
*/
listTransactions(params?: {
queries?: string[];
+ total?: boolean;
}): Promise;
/**
* List transactions across all databases.
*
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
* @deprecated Use the object parameter style method for a better developer experience.
*/
- listTransactions(queries?: string[]): Promise;
listTransactions(
- paramsOrFirst?: { queries?: string[] } | string[],
+ queries?: string[],
+ total?: boolean,
+ ): Promise;
+ listTransactions(
+ paramsOrFirst?: { queries?: string[]; total?: boolean } | string[],
+ ...rest: [boolean?]
): Promise {
- let params: { queries?: string[] };
+ let params: { queries?: string[]; total?: boolean };
if (
- typeof paramsOrFirst === 'undefined' ||
+ (typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
(paramsOrFirst &&
typeof paramsOrFirst === 'object' &&
!Array.isArray(paramsOrFirst))
) {
- params = (paramsOrFirst || {}) as { queries?: string[] };
+ params = (paramsOrFirst || {}) as {
+ queries?: string[];
+ total?: boolean;
+ };
} else {
params = {
queries: paramsOrFirst as string[],
+ total: rest[0] as boolean,
};
}
const queries = params.queries;
+ const total = params.total;
const apiPath = '/vectorsdb/transactions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
+ }
+ if (typeof total !== 'undefined') {
+ apiPayload['total'] = total;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -59,7 +74,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -100,9 +115,9 @@ export class VectorsDB {
const ttl = params.ttl;
const apiPath = '/vectorsdb/transactions';
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -112,7 +127,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -162,7 +177,7 @@ export class VectorsDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -170,7 +185,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -245,12 +260,12 @@ export class VectorsDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof commit !== 'undefined') {
- payload['commit'] = commit;
+ apiPayload['commit'] = commit;
}
if (typeof rollback !== 'undefined') {
- payload['rollback'] = rollback;
+ apiPayload['rollback'] = rollback;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -260,7 +275,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -308,7 +323,7 @@ export class VectorsDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -317,7 +332,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
/**
@@ -381,9 +396,9 @@ export class VectorsDB {
'{transactionId}',
encodeURIComponent(String(transactionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof operations !== 'undefined') {
- payload['operations'] = operations;
+ apiPayload['operations'] = operations;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -393,7 +408,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -509,18 +524,18 @@ export class VectorsDB {
'{collectionId}',
encodeURIComponent(String(collectionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -529,7 +544,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -678,18 +693,18 @@ export class VectorsDB {
'{collectionId}',
encodeURIComponent(String(collectionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof documentId !== 'undefined') {
- payload['documentId'] = documentId;
+ apiPayload['documentId'] = documentId;
}
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -699,7 +714,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -817,18 +832,18 @@ export class VectorsDB {
'{collectionId}',
encodeURIComponent(String(collectionId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
if (typeof total !== 'undefined') {
- payload['total'] = total;
+ apiPayload['total'] = total;
}
if (typeof ttl !== 'undefined') {
- payload['ttl'] = ttl;
+ apiPayload['ttl'] = ttl;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -838,7 +853,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('post', uri, apiHeaders, payload);
+ return this.client.call('post', uri, apiHeaders, apiPayload);
}
/**
@@ -954,12 +969,12 @@ export class VectorsDB {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
+ apiPayload['queries'] = queries;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -968,7 +983,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('get', uri, apiHeaders, payload);
+ return this.client.call('get', uri, apiHeaders, apiPayload);
}
/**
@@ -1120,15 +1135,15 @@ export class VectorsDB {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1138,7 +1153,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('put', uri, apiHeaders, payload);
+ return this.client.call('put', uri, apiHeaders, apiPayload);
}
/**
@@ -1290,15 +1305,15 @@ export class VectorsDB {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof data !== 'undefined') {
- payload['data'] = data;
+ apiPayload['data'] = data;
}
if (typeof permissions !== 'undefined') {
- payload['permissions'] = permissions;
+ apiPayload['permissions'] = permissions;
}
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1308,7 +1323,7 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('patch', uri, apiHeaders, payload);
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
}
/**
@@ -1413,9 +1428,9 @@ export class VectorsDB {
'{documentId}',
encodeURIComponent(String(documentId)),
);
- const payload: Payload = {};
+ const apiPayload: Payload = {};
if (typeof transactionId !== 'undefined') {
- payload['transactionId'] = transactionId;
+ apiPayload['transactionId'] = transactionId;
}
const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1425,6 +1440,6 @@ export class VectorsDB {
accept: 'application/json',
};
- return this.client.call('delete', uri, apiHeaders, payload);
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
}
}
diff --git a/src/topic.ts b/src/topic.ts
new file mode 100644
index 0000000..cd6cea0
--- /dev/null
+++ b/src/topic.ts
@@ -0,0 +1,103 @@
+/**
+ * Validate the levels passed to `path()`: a non-empty array of non-empty strings, none holding
+ * the level separator `/` or the wildcards `+` and `#` (use `any()` and `all()` for those).
+ */
+function levelsOf(levels: unknown): string[] {
+ if (!Array.isArray(levels)) {
+ throw new Error("path() expects an array, e.g. path(['user'])");
+ }
+ if (levels.length === 0) {
+ throw new Error('path() needs at least one level');
+ }
+ return levels.map((level: unknown, index: number) => {
+ if (typeof level !== 'string') {
+ const type = level === null ? 'null' : typeof level;
+ throw new Error(
+ `level at index ${index} must be a string, got ${type}`,
+ );
+ }
+ if (level === '') {
+ throw new Error(`empty level at index ${index}`);
+ }
+ if (level.includes('/')) {
+ const parts = level
+ .split('/')
+ .map((part) => `'${part}'`)
+ .join(', ');
+ throw new Error(
+ `"${level}" contains "/", split it: path([${parts}])`,
+ );
+ }
+ if (level === '+') {
+ throw new Error('"+" is reserved, use any()');
+ }
+ if (level.includes('+')) {
+ throw new Error(`"${level}" contains "+", use any() for wildcards`);
+ }
+ if (level === '#') {
+ throw new Error('"#" is reserved, use all()');
+ }
+ if (level.includes('#')) {
+ throw new Error(`"${level}" contains "#", use all() for wildcards`);
+ }
+ return level;
+ });
+}
+
+/**
+ * Helper to build MQTT topics for `Push`, level by level.
+ *
+ * Topic.path(['user', userId, 'notification']); // "user/123/notification"
+ * Topic.path(['user']).any().path(['notification']); // "user/+/notification"
+ * Topic.path(['org']).any().path(['logs']).all(); // "org/+/logs/#"
+ *
+ * `any()` matches exactly one level and `all()` everything below, at any depth (including the
+ * parent itself). `all()` ends the topic, so it returns a {@link ResolvedTopic}.
+ */
+export class Topic {
+ private constructor(private readonly levels: readonly string[]) {}
+
+ /** Start a topic with the given levels, e.g. `Topic.path(['user', userId])`. */
+ static path(levels: string[]): Topic {
+ return new Topic(levelsOf(levels));
+ }
+
+ /** Start a topic with a single-level wildcard (`+`). */
+ static any(): Topic {
+ return new Topic(['+']);
+ }
+
+ /** The multi-level wildcard alone (`#`): matches every topic. */
+ static all(): ResolvedTopic {
+ return new ResolvedTopic(['#']);
+ }
+
+ /** Append the given levels. */
+ path(levels: string[]): Topic {
+ return new Topic([...this.levels, ...levelsOf(levels)]);
+ }
+
+ /** Append a single-level wildcard (`+`): matches exactly one level. */
+ any(): Topic {
+ return new Topic([...this.levels, '+']);
+ }
+
+ /** Append the multi-level wildcard (`#`) and end the topic. */
+ all(): ResolvedTopic {
+ return new ResolvedTopic([...this.levels, '#']);
+ }
+
+ toString(): string {
+ return this.levels.join('/');
+ }
+}
+
+/** A topic ended by `all()`: nothing can be appended after the `#` wildcard. */
+export class ResolvedTopic {
+ /** @internal Created by {@link Topic.all}. */
+ constructor(private readonly levels: readonly string[]) {}
+
+ toString(): string {
+ return this.levels.join('/');
+ }
+}
diff --git a/tsconfig.json b/tsconfig.json
index c7292aa..a89200c 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -9,6 +9,7 @@
"lib": ["ESNext", "DOM"],
"listEmittedFiles": false,
"listFiles": false,
+ "module": "ES2020",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"pretty": true,