appwrite-cli 19.0.0 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -87725,7 +87725,7 @@ var package_default = {
87725
87725
  type: "module",
87726
87726
  homepage: "https://appwrite.io/support",
87727
87727
  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",
87728
- version: "19.0.0",
87728
+ version: "19.1.0",
87729
87729
  license: "BSD-3-Clause",
87730
87730
  main: "dist/index.cjs",
87731
87731
  module: "dist/index.js",
@@ -87795,7 +87795,8 @@ var package_default = {
87795
87795
  },
87796
87796
  overrides: {
87797
87797
  phin: "3.7.1",
87798
- "@xmldom/xmldom": "^0.9.10"
87798
+ "@xmldom/xmldom": "^0.9.10",
87799
+ tmp: "0.2.5"
87799
87800
  },
87800
87801
  devDependencies: {
87801
87802
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -102035,7 +102036,7 @@ var import_child_process = __toESM(require("child_process"), 1);
102035
102036
  // lib/constants.ts
102036
102037
  var SDK_TITLE = "Appwrite";
102037
102038
  var SDK_TITLE_LOWER = "appwrite";
102038
- var SDK_VERSION = "19.0.0";
102039
+ var SDK_VERSION = "19.1.0";
102039
102040
  var SDK_NAME = "Command Line";
102040
102041
  var SDK_PLATFORM = "console";
102041
102042
  var SDK_LANGUAGE = "cli";
@@ -129700,6 +129701,15 @@ var drawTable = (data, options = {}) => {
129700
129701
  var drawJSON = (data) => {
129701
129702
  console.log(JSON.stringify(data, null, 2));
129702
129703
  };
129704
+ var isQueryError = (message) => /Invalid query(?: method)?/i.test(message) || /query[^.:\n]*syntax error|syntax error[^.:\n]*query/i.test(message);
129705
+ var printQueryErrorHint = (err) => {
129706
+ if (!isQueryError(err.message)) {
129707
+ return;
129708
+ }
129709
+ hint(
129710
+ `For common list filters, use flags like --limit 25, --sort-desc '$createdAt', or --where 'status=active'. Raw --queries values must be Appwrite JSON query strings, for example: ${EXECUTABLE_NAME} tables-db list-rows --queries '{"method":"limit","values":[25]}'`
129711
+ );
129712
+ };
129703
129713
  var parseError = (err) => {
129704
129714
  if (cliConfig.report) {
129705
129715
  void (async () => {
@@ -129748,6 +129758,7 @@ ${stack}`
129748
129758
  ${githubIssueUrl.href}
129749
129759
  `
129750
129760
  );
129761
+ printQueryErrorHint(err);
129751
129762
  error48("\n Stack Trace: \n");
129752
129763
  console.error(err);
129753
129764
  process.exit(1);
@@ -129755,9 +129766,11 @@ ${stack}`
129755
129766
  } else {
129756
129767
  if (cliConfig.verbose) {
129757
129768
  console.error(err);
129769
+ printQueryErrorHint(err);
129758
129770
  } else {
129759
129771
  log("For detailed error pass the --verbose or --report flag");
129760
129772
  error48(err.message);
129773
+ printQueryErrorHint(err);
129761
129774
  }
129762
129775
  process.exit(1);
129763
129776
  }
@@ -144707,6 +144720,142 @@ Example:
144707
144720
  await mydb.use("tableName").create({ ... });`
144708
144721
  ).action(actionRunner(generateAction));
144709
144722
 
144723
+ // lib/commands/utils/query.ts
144724
+ var stringifyQuery = (method, attribute, values) => {
144725
+ const query = { method };
144726
+ if (attribute !== void 0) {
144727
+ query.attribute = attribute;
144728
+ }
144729
+ if (values !== void 0) {
144730
+ query.values = Array.isArray(values) ? values : [values];
144731
+ }
144732
+ return JSON.stringify(query);
144733
+ };
144734
+ var parseQueryValue = (value) => {
144735
+ const normalized = value.trim();
144736
+ if (normalized === "true") {
144737
+ return true;
144738
+ }
144739
+ if (normalized === "false") {
144740
+ return false;
144741
+ }
144742
+ if (normalized === "null") {
144743
+ return null;
144744
+ }
144745
+ if (/^-?(?:\d+|\d*\.\d+)(?:e[+-]?\d+)?$/i.test(normalized)) {
144746
+ const parsed = Number(normalized);
144747
+ if (!Number.isFinite(parsed)) {
144748
+ throw new InvalidArgumentError(
144749
+ "Numeric filter values must be finite numbers."
144750
+ );
144751
+ }
144752
+ return parsed;
144753
+ }
144754
+ if (normalized.startsWith("[") && normalized.endsWith("]")) {
144755
+ try {
144756
+ const parsed = JSON.parse(normalized);
144757
+ if (Array.isArray(parsed)) {
144758
+ return parsed.map((item) => {
144759
+ if (item === null || typeof item === "string" || typeof item === "boolean") {
144760
+ return item;
144761
+ }
144762
+ if (typeof item === "number") {
144763
+ if (!Number.isFinite(item)) {
144764
+ throw new InvalidArgumentError(
144765
+ "Array filter values must be finite numbers."
144766
+ );
144767
+ }
144768
+ return item;
144769
+ }
144770
+ throw new InvalidArgumentError(
144771
+ "Array filters can only contain strings, numbers, booleans, or null."
144772
+ );
144773
+ });
144774
+ }
144775
+ } catch (error49) {
144776
+ if (error49 instanceof InvalidArgumentError) {
144777
+ throw error49;
144778
+ }
144779
+ throw new InvalidArgumentError(
144780
+ "Array filter values must be valid JSON arrays."
144781
+ );
144782
+ }
144783
+ }
144784
+ return normalized;
144785
+ };
144786
+ var whereOperators = [
144787
+ [/^(.+?)\s*!=\s*(.*)$/, "notEqual"],
144788
+ [/^(.+?)\s*>=\s*(.*)$/, "greaterThanEqual"],
144789
+ [/^(.+?)\s*<=\s*(.*)$/, "lessThanEqual"],
144790
+ [/^(.+?)\s*=\s*(.*)$/, "equal"],
144791
+ [/^(.+?)\s*>\s*(.*)$/, "greaterThan"],
144792
+ [/^(.+?)\s*<\s*(.*)$/, "lessThan"]
144793
+ ];
144794
+ var collectQueryValue = (value, previous = []) => [
144795
+ ...previous,
144796
+ value
144797
+ ];
144798
+ var parseWhereQuery = (expression) => {
144799
+ for (const [pattern, method] of whereOperators) {
144800
+ const match = expression.match(pattern);
144801
+ if (!match) {
144802
+ continue;
144803
+ }
144804
+ const attribute = match[1].trim();
144805
+ if (attribute === "") {
144806
+ throw new InvalidArgumentError(
144807
+ "Where filters must include an attribute before the operator."
144808
+ );
144809
+ }
144810
+ return stringifyQuery(method, attribute, parseQueryValue(match[2]));
144811
+ }
144812
+ throw new InvalidArgumentError(
144813
+ "Where filters must use one of: field=value, field!=value, field>value, field>=value, field<value, field<=value."
144814
+ );
144815
+ };
144816
+ var buildQueries = ({
144817
+ queries,
144818
+ limit,
144819
+ offset,
144820
+ cursorAfter,
144821
+ cursorBefore,
144822
+ sortAsc,
144823
+ sortDesc,
144824
+ select,
144825
+ where
144826
+ }) => {
144827
+ const builtQueries = [...queries ?? []];
144828
+ if (where) {
144829
+ builtQueries.push(...where);
144830
+ }
144831
+ if (sortAsc) {
144832
+ builtQueries.push(
144833
+ ...sortAsc.map((attribute) => stringifyQuery("orderAsc", attribute))
144834
+ );
144835
+ }
144836
+ if (sortDesc) {
144837
+ builtQueries.push(
144838
+ ...sortDesc.map((attribute) => stringifyQuery("orderDesc", attribute))
144839
+ );
144840
+ }
144841
+ if (limit !== void 0) {
144842
+ builtQueries.push(stringifyQuery("limit", void 0, limit));
144843
+ }
144844
+ if (offset !== void 0) {
144845
+ builtQueries.push(stringifyQuery("offset", void 0, offset));
144846
+ }
144847
+ if (cursorAfter !== void 0) {
144848
+ builtQueries.push(stringifyQuery("cursorAfter", void 0, cursorAfter));
144849
+ }
144850
+ if (cursorBefore !== void 0) {
144851
+ builtQueries.push(stringifyQuery("cursorBefore", void 0, cursorBefore));
144852
+ }
144853
+ if (select && select.length > 0) {
144854
+ builtQueries.push(stringifyQuery("select", void 0, select));
144855
+ }
144856
+ return builtQueries.length > 0 ? builtQueries : void 0;
144857
+ };
144858
+
144710
144859
  // lib/commands/services/account.ts
144711
144860
  var accountClient = null;
144712
144861
  var getAccountClient = async () => {
@@ -144741,13 +144890,13 @@ This endpoint can also be used to convert an anonymous account to a normal one,
144741
144890
  async ({ email: email3, password }) => parse3(await (await getAccountClient()).updateEmail(email3, password))
144742
144891
  )
144743
144892
  );
144744
- var accountListIdentitiesCommand = account.command(`list-identities`).description(`Get the list of identities for the currently logged in user.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`).option(
144893
+ var accountListIdentitiesCommand = account.command(`list-identities`).description(`Get the list of identities for the currently logged in user.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`).option(
144745
144894
  `--total [value]`,
144746
144895
  `When set to false, the total count returned will be 0 and will not be calculated.`,
144747
144896
  (value) => value === void 0 ? true : parseBool(value)
144748
- ).action(
144897
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
144749
144898
  actionRunner(
144750
- async ({ queries, total }) => parse3(await (await getAccountClient()).listIdentities(queries, total))
144899
+ async ({ queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getAccountClient()).listIdentities(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
144751
144900
  )
144752
144901
  );
144753
144902
  var accountDeleteIdentityCommand = account.command(`delete-identity`).description(`Delete an identity by its unique ID.`).requiredOption(`--identity-id <identity-id>`, `Identity ID.`).action(
@@ -144789,13 +144938,13 @@ var accountDeleteKeyCommand = account.command(`delete-key`).description(`Delete
144789
144938
  async ({ keyId }) => parse3(await (await getAccountClient()).deleteKey(keyId))
144790
144939
  )
144791
144940
  );
144792
- var accountListLogsCommand = account.command(`list-logs`).description(`Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
144941
+ var accountListLogsCommand = account.command(`list-logs`).description(`Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
144793
144942
  `--total [value]`,
144794
144943
  `When set to false, the total count returned will be 0 and will not be calculated.`,
144795
144944
  (value) => value === void 0 ? true : parseBool(value)
144796
- ).action(
144945
+ ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
144797
144946
  actionRunner(
144798
- async ({ queries, total }) => parse3(await (await getAccountClient()).listLogs(queries, total))
144947
+ async ({ queries, total, limit, offset }) => parse3(await (await getAccountClient()).listLogs(buildQueries({ queries, limit, offset }), total))
144799
144948
  )
144800
144949
  );
144801
144950
  var accountUpdateMFACommand = account.command(`update-mfa`).description(`Enable or disable MFA on an account.`).requiredOption(`--mfa <mfa>`, `Enable or disable MFA.`, parseBool).action(
@@ -145086,9 +145235,9 @@ var getBackupsClient = async () => {
145086
145235
  var backups = new Command("backups").description(commandDescriptions["backups"] ?? "").configureHelp({
145087
145236
  helpWidth: process.stdout.columns || 80
145088
145237
  });
145089
- var backupsListArchivesCommand = backups.command(`list-archives`).description(`List all archives for a project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).action(
145238
+ var backupsListArchivesCommand = backups.command(`list-archives`).description(`List all archives for a project.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145090
145239
  actionRunner(
145091
- async ({ queries }) => parse3(await (await getBackupsClient()).listArchives(queries))
145240
+ async ({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getBackupsClient()).listArchives(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
145092
145241
  )
145093
145242
  );
145094
145243
  var backupsCreateArchiveCommand = backups.command(`create-archive`).description(`Create a new archive asynchronously for a project.`).requiredOption(`--services [services...]`, `Array of services to backup`).option(`--resource-id <resource-id>`, `Resource ID. When set, only this single resource will be backed up.`).action(
@@ -145106,9 +145255,9 @@ var backupsDeleteArchiveCommand = backups.command(`delete-archive`).description(
145106
145255
  async ({ archiveId }) => parse3(await (await getBackupsClient()).deleteArchive(archiveId))
145107
145256
  )
145108
145257
  );
145109
- var backupsListPoliciesCommand = backups.command(`list-policies`).description(`List all policies for a project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).action(
145258
+ var backupsListPoliciesCommand = backups.command(`list-policies`).description(`List all policies for a project.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145110
145259
  actionRunner(
145111
- async ({ queries }) => parse3(await (await getBackupsClient()).listPolicies(queries))
145260
+ async ({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getBackupsClient()).listPolicies(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
145112
145261
  )
145113
145262
  );
145114
145263
  var backupsCreatePolicyCommand = backups.command(`create-policy`).description(`Create a new backup policy.`).requiredOption(`--policy-id <policy-id>`, `Policy 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.`).requiredOption(`--services [services...]`, `Array of services to backup`).requiredOption(`--retention <retention>`, `Days to keep backups before deletion`, parseInteger).requiredOption(`--schedule <schedule>`, `Schedule CRON syntax.`).option(`--name <name>`, `Policy name. Max length: 128 chars.`).option(`--resource-id <resource-id>`, `Resource ID. When set, only this single resource will be backed up.`).option(
@@ -145144,9 +145293,9 @@ var backupsCreateRestorationCommand = backups.command(`create-restoration`).desc
145144
145293
  async ({ archiveId, services, newResourceId, newResourceName }) => parse3(await (await getBackupsClient()).createRestoration(archiveId, services, newResourceId, newResourceName))
145145
145294
  )
145146
145295
  );
145147
- var backupsListRestorationsCommand = backups.command(`list-restorations`).description(`List all backup restorations for a project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).action(
145296
+ var backupsListRestorationsCommand = backups.command(`list-restorations`).description(`List all backup restorations for a project.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145148
145297
  actionRunner(
145149
- async ({ queries }) => parse3(await (await getBackupsClient()).listRestorations(queries))
145298
+ async ({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getBackupsClient()).listRestorations(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
145150
145299
  )
145151
145300
  );
145152
145301
  var backupsGetRestorationCommand = backups.command(`get-restoration`).description(`Get the current status of a backup restoration.`).requiredOption(`--restoration-id <restoration-id>`, `Restoration ID. Choose a custom ID\`. 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.`).action(
@@ -145167,13 +145316,13 @@ var getDatabasesClient = async () => {
145167
145316
  var databases = new Command("databases").description(commandDescriptions["databases"] ?? "").configureHelp({
145168
145317
  helpWidth: process.stdout.columns || 80
145169
145318
  });
145170
- var databasesListCommand = databases.command(`list`).description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
145319
+ var databasesListCommand = databases.command(`list`).description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
145171
145320
  `--total [value]`,
145172
145321
  `When set to false, the total count returned will be 0 and will not be calculated.`,
145173
145322
  (value) => value === void 0 ? true : parseBool(value)
145174
- ).action(
145323
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145175
145324
  actionRunner(
145176
- async ({ queries, search, total }) => parse3(await (await getDatabasesClient()).list(queries, search, total))
145325
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getDatabasesClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
145177
145326
  )
145178
145327
  );
145179
145328
  var databasesCreateCommand = databases.command(`create`).description(`Create a new Database.
@@ -145186,9 +145335,9 @@ var databasesCreateCommand = databases.command(`create`).description(`Create a n
145186
145335
  async ({ databaseId, name, enabled }) => parse3(await (await getDatabasesClient()).create(databaseId, name, enabled))
145187
145336
  )
145188
145337
  );
145189
- var databasesListTransactionsCommand = databases.command(`list-transactions`).description(`List transactions across all databases.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries).`).action(
145338
+ var databasesListTransactionsCommand = databases.command(`list-transactions`).description(`List transactions across all databases.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries).`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145190
145339
  actionRunner(
145191
- async ({ queries }) => parse3(await (await getDatabasesClient()).listTransactions(queries))
145340
+ async ({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getDatabasesClient()).listTransactions(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
145192
145341
  )
145193
145342
  );
145194
145343
  var databasesCreateTransactionCommand = databases.command(`create-transaction`).description(`Create a new transaction.`).option(`--ttl <ttl>`, `Seconds before the transaction expires.`, parseInteger).action(
@@ -145248,13 +145397,13 @@ var databasesDeleteCommand = databases.command(`delete`).description(`Delete a d
145248
145397
  async ({ databaseId }) => parse3(await (await getDatabasesClient()).delete(databaseId))
145249
145398
  )
145250
145399
  );
145251
- var databasesListCollectionsCommand = databases.command(`list-collections`).description(`Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
145400
+ var databasesListCollectionsCommand = databases.command(`list-collections`).description(`Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
145252
145401
  `--total [value]`,
145253
145402
  `When set to false, the total count returned will be 0 and will not be calculated.`,
145254
145403
  (value) => value === void 0 ? true : parseBool(value)
145255
- ).action(
145404
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145256
145405
  actionRunner(
145257
- async ({ databaseId, queries, search, total }) => parse3(await (await getDatabasesClient()).listCollections(databaseId, queries, search, total))
145406
+ async ({ databaseId, queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getDatabasesClient()).listCollections(databaseId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
145258
145407
  )
145259
145408
  );
145260
145409
  var databasesCreateCollectionCommand = databases.command(`create-collection`).description(`Create a new Collection. Before using this route, you should create a new database resource using either a server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Unique 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.`).requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`).option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`).option(
@@ -145297,13 +145446,13 @@ var databasesDeleteCollectionCommand = databases.command(`delete-collection`).de
145297
145446
  async ({ databaseId, collectionId }) => parse3(await (await getDatabasesClient()).deleteCollection(databaseId, collectionId))
145298
145447
  )
145299
145448
  );
145300
- var databasesListAttributesCommand = databases.command(`list-attributes`).description(`List attributes in the collection.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error`).option(
145449
+ var databasesListAttributesCommand = databases.command(`list-attributes`).description(`List attributes in the collection.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error`).option(
145301
145450
  `--total [value]`,
145302
145451
  `When set to false, the total count returned will be 0 and will not be calculated.`,
145303
145452
  (value) => value === void 0 ? true : parseBool(value)
145304
- ).action(
145453
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145305
145454
  actionRunner(
145306
- async ({ databaseId, collectionId, queries, total }) => parse3(await (await getDatabasesClient()).listAttributes(databaseId, collectionId, queries, total))
145455
+ async ({ databaseId, collectionId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getDatabasesClient()).listAttributes(databaseId, collectionId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
145307
145456
  )
145308
145457
  );
145309
145458
  var databasesCreateBooleanAttributeCommand = databases.command(`create-boolean-attribute`).description(`Create a boolean attribute.
@@ -145591,13 +145740,13 @@ var databasesDeleteAttributeCommand = databases.command(`delete-attribute`).desc
145591
145740
  async ({ databaseId, collectionId, key }) => parse3(await (await getDatabasesClient()).deleteAttribute(databaseId, collectionId, key))
145592
145741
  )
145593
145742
  );
145594
- var databasesListDocumentsCommand = databases.command(`list-documents`).description(`Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).option(
145743
+ var databasesListDocumentsCommand = databases.command(`list-documents`).description(`Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, pagination, and selection prefer --where, --sort-asc, --sort-desc, --limit, --offset, and --select. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).option(
145595
145744
  `--total [value]`,
145596
145745
  `When set to false, the total count returned will be 0 and will not be calculated.`,
145597
145746
  (value) => value === void 0 ? true : parseBool(value)
145598
- ).option(`--ttl <ttl>`, `TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).`, parseInteger).action(
145747
+ ).option(`--ttl <ttl>`, `TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).`, parseInteger).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).option(`--select <attribute>`, `Attribute to include in the response. Repeat for multiple attributes.`, (value, previous) => collectQueryValue(value, previous)).action(
145599
145748
  actionRunner(
145600
- async ({ databaseId, collectionId, queries, transactionId, total, ttl }) => parse3(await (await getDatabasesClient()).listDocuments(databaseId, collectionId, queries, transactionId, total, ttl))
145749
+ async ({ databaseId, collectionId, queries, transactionId, total, ttl, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset, select }) => parse3(await (await getDatabasesClient()).listDocuments(databaseId, collectionId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset, select }), transactionId, total, ttl))
145601
145750
  )
145602
145751
  );
145603
145752
  var databasesCreateDocumentCommand = databases.command(`create-document`).description(`Create a new Document. Before using this route, you should create a new collection resource using either a server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`).requiredOption(`--document-id <document-id>`, `Document 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.`).requiredOption(`--data <data>`, `Document data as JSON object.`).option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
@@ -145616,19 +145765,19 @@ var databasesUpsertDocumentsCommand = databases.command(`upsert-documents`).desc
145616
145765
  async ({ databaseId, collectionId, documents, transactionId }) => parse3(await (await getDatabasesClient()).upsertDocuments(databaseId, collectionId, documents, transactionId))
145617
145766
  )
145618
145767
  );
145619
- var databasesUpdateDocumentsCommand = databases.command(`update-documents`).description(`Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).option(`--data <data>`, `Document data as JSON object. Include only attribute and value pairs to be updated.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
145768
+ var databasesUpdateDocumentsCommand = databases.command(`update-documents`).description(`Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).option(`--data <data>`, `Document data as JSON object. Include only attribute and value pairs to be updated.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145620
145769
  actionRunner(
145621
- async ({ databaseId, collectionId, data, queries, transactionId }) => parse3(await (await getDatabasesClient()).updateDocuments(databaseId, collectionId, JSON.parse(data), queries, transactionId))
145770
+ async ({ databaseId, collectionId, data, queries, transactionId, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getDatabasesClient()).updateDocuments(databaseId, collectionId, JSON.parse(data), buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), transactionId))
145622
145771
  )
145623
145772
  );
145624
- var databasesDeleteDocumentsCommand = databases.command(`delete-documents`).description(`Bulk delete documents using queries, if no queries are passed then all documents are deleted.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
145773
+ var databasesDeleteDocumentsCommand = databases.command(`delete-documents`).description(`Bulk delete documents using queries, if no queries are passed then all documents are deleted.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145625
145774
  actionRunner(
145626
- async ({ databaseId, collectionId, queries, transactionId }) => parse3(await (await getDatabasesClient()).deleteDocuments(databaseId, collectionId, queries, transactionId))
145775
+ async ({ databaseId, collectionId, queries, transactionId, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getDatabasesClient()).deleteDocuments(databaseId, collectionId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), transactionId))
145627
145776
  )
145628
145777
  );
145629
- var databasesGetDocumentCommand = databases.command(`get-document`).description(`Get a document by its unique ID. This endpoint response returns a JSON object with the document data.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`).requiredOption(`--document-id <document-id>`, `Document ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).action(
145778
+ var databasesGetDocumentCommand = databases.command(`get-document`).description(`Get a document by its unique ID. This endpoint response returns a JSON object with the document data.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`).requiredOption(`--document-id <document-id>`, `Document ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for selecting returned attributes prefer --select. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).option(`--select <attribute>`, `Attribute to include in the response. Repeat for multiple attributes.`, (value, previous) => collectQueryValue(value, previous)).action(
145630
145779
  actionRunner(
145631
- async ({ databaseId, collectionId, documentId, queries, transactionId }) => parse3(await (await getDatabasesClient()).getDocument(databaseId, collectionId, documentId, queries, transactionId))
145780
+ async ({ databaseId, collectionId, documentId, queries, transactionId, select }) => parse3(await (await getDatabasesClient()).getDocument(databaseId, collectionId, documentId, buildQueries({ queries, select }), transactionId))
145632
145781
  )
145633
145782
  );
145634
145783
  var databasesUpsertDocumentCommand = databases.command(`upsert-document`).description(`Create or update a Document. Before using this route, you should create a new collection resource using either a server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).requiredOption(`--document-id <document-id>`, `Document ID.`).option(`--data <data>`, `Document data as JSON object. Include all required attributes of the document to be created or updated.`).option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
@@ -145646,9 +145795,9 @@ var databasesDeleteDocumentCommand = databases.command(`delete-document`).descri
145646
145795
  async ({ databaseId, collectionId, documentId, transactionId }) => parse3(await (await getDatabasesClient()).deleteDocument(databaseId, collectionId, documentId, transactionId))
145647
145796
  )
145648
145797
  );
145649
- var databasesListDocumentLogsCommand = databases.command(`list-document-logs`).description(`Get the document activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).requiredOption(`--document-id <document-id>`, `Document ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).action(
145798
+ var databasesListDocumentLogsCommand = databases.command(`list-document-logs`).description(`Get the document activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).requiredOption(`--document-id <document-id>`, `Document ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
145650
145799
  actionRunner(
145651
- async ({ databaseId, collectionId, documentId, queries }) => parse3(await (await getDatabasesClient()).listDocumentLogs(databaseId, collectionId, documentId, queries))
145800
+ async ({ databaseId, collectionId, documentId, queries, limit, offset }) => parse3(await (await getDatabasesClient()).listDocumentLogs(databaseId, collectionId, documentId, buildQueries({ queries, limit, offset })))
145652
145801
  )
145653
145802
  );
145654
145803
  var databasesDecrementDocumentAttributeCommand = databases.command(`decrement-document-attribute`).description(`Decrement a specific attribute of a document by a given value.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).requiredOption(`--document-id <document-id>`, `Document ID.`).requiredOption(`--attribute <attribute>`, `Attribute key.`).option(`--value <value>`, `Value to increment the attribute by. The value must be a number.`, parseInteger).option(`--min <min>`, `Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.`, parseInteger).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
@@ -145661,13 +145810,13 @@ var databasesIncrementDocumentAttributeCommand = databases.command(`increment-do
145661
145810
  async ({ databaseId, collectionId, documentId, attribute, value, max, transactionId }) => parse3(await (await getDatabasesClient()).incrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, max, transactionId))
145662
145811
  )
145663
145812
  );
145664
- var databasesListIndexesCommand = databases.command(`list-indexes`).description(`List indexes in the collection.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error`).option(
145813
+ var databasesListIndexesCommand = databases.command(`list-indexes`).description(`List indexes in the collection.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service server integration (https://appwrite.io/docs/server/databases#databasesCreateCollection).`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error`).option(
145665
145814
  `--total [value]`,
145666
145815
  `When set to false, the total count returned will be 0 and will not be calculated.`,
145667
145816
  (value) => value === void 0 ? true : parseBool(value)
145668
- ).action(
145817
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145669
145818
  actionRunner(
145670
- async ({ databaseId, collectionId, queries, total }) => parse3(await (await getDatabasesClient()).listIndexes(databaseId, collectionId, queries, total))
145819
+ async ({ databaseId, collectionId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getDatabasesClient()).listIndexes(databaseId, collectionId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
145671
145820
  )
145672
145821
  );
145673
145822
  var databasesCreateIndexCommand = databases.command(`create-index`).description(`Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
@@ -145686,9 +145835,9 @@ var databasesDeleteIndexCommand = databases.command(`delete-index`).description(
145686
145835
  async ({ databaseId, collectionId, key }) => parse3(await (await getDatabasesClient()).deleteIndex(databaseId, collectionId, key))
145687
145836
  )
145688
145837
  );
145689
- var databasesListCollectionLogsCommand = databases.command(`list-collection-logs`).description(`Get the collection activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).action(
145838
+ var databasesListCollectionLogsCommand = databases.command(`list-collection-logs`).description(`Get the collection activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
145690
145839
  actionRunner(
145691
- async ({ databaseId, collectionId, queries }) => parse3(await (await getDatabasesClient()).listCollectionLogs(databaseId, collectionId, queries))
145840
+ async ({ databaseId, collectionId, queries, limit, offset }) => parse3(await (await getDatabasesClient()).listCollectionLogs(databaseId, collectionId, buildQueries({ queries, limit, offset })))
145692
145841
  )
145693
145842
  );
145694
145843
  var databasesGetCollectionUsageCommand = databases.command(`get-collection-usage`).description(`Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).option(`--range <range>`, `Date range.`).action(
@@ -145696,9 +145845,9 @@ var databasesGetCollectionUsageCommand = databases.command(`get-collection-usage
145696
145845
  async ({ databaseId, collectionId, range }) => parse3(await (await getDatabasesClient()).getCollectionUsage(databaseId, collectionId, range))
145697
145846
  )
145698
145847
  );
145699
- var databasesListLogsCommand = databases.command(`list-logs`).description(`Get the database activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).action(
145848
+ var databasesListLogsCommand = databases.command(`list-logs`).description(`Get the database activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
145700
145849
  actionRunner(
145701
- async ({ databaseId, queries }) => parse3(await (await getDatabasesClient()).listLogs(databaseId, queries))
145850
+ async ({ databaseId, queries, limit, offset }) => parse3(await (await getDatabasesClient()).listLogs(databaseId, buildQueries({ queries, limit, offset })))
145702
145851
  )
145703
145852
  );
145704
145853
  var databasesGetUsageCommand = databases.command(`get-usage`).description(`Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--range <range>`, `Date range.`).action(
@@ -145720,13 +145869,13 @@ var getFunctionsClient = async () => {
145720
145869
  var functions = new Command("functions").description(commandDescriptions["functions"] ?? "").configureHelp({
145721
145870
  helpWidth: process.stdout.columns || 80
145722
145871
  });
145723
- var functionsListCommand = functions.command(`list`).description(`Get a list of all the project's functions. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
145872
+ var functionsListCommand = functions.command(`list`).description(`Get a list of all the project's functions. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
145724
145873
  `--total [value]`,
145725
145874
  `When set to false, the total count returned will be 0 and will not be calculated.`,
145726
145875
  (value) => value === void 0 ? true : parseBool(value)
145727
- ).action(
145876
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145728
145877
  actionRunner(
145729
- async ({ queries, search, total }) => parse3(await (await getFunctionsClient()).list(queries, search, total))
145878
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getFunctionsClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
145730
145879
  )
145731
145880
  );
145732
145881
  var functionsCreateCommand = functions.command(`create`).description(`Create a new function. You can pass a list of permissions (https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.`).requiredOption(`--function-id <function-id>`, `Function 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.`).requiredOption(`--name <name>`, `Function name. Max length: 128 chars.`).requiredOption(`--runtime <runtime>`, `Execution runtime.`).option(`--execute [execute...]`, `An array of role strings with execution permissions. By default no user is granted with any execute permissions. learn more about roles (https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`).option(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).option(`--schedule <schedule>`, `Schedule CRON syntax.`).option(`--timeout <timeout>`, `Function maximum execution time in seconds.`, parseInteger).option(
@@ -145807,13 +145956,13 @@ var functionsUpdateFunctionDeploymentCommand = functions.command(`update-functio
145807
145956
  async ({ functionId, deploymentId }) => parse3(await (await getFunctionsClient()).updateFunctionDeployment(functionId, deploymentId))
145808
145957
  )
145809
145958
  );
145810
- var functionsListDeploymentsCommand = functions.command(`list-deployments`).description(`Get a list of all the function's code deployments. You can use the query params to filter your results.`).requiredOption(`--function-id <function-id>`, `Function ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
145959
+ var functionsListDeploymentsCommand = functions.command(`list-deployments`).description(`Get a list of all the function's code deployments. You can use the query params to filter your results.`).requiredOption(`--function-id <function-id>`, `Function ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
145811
145960
  `--total [value]`,
145812
145961
  `When set to false, the total count returned will be 0 and will not be calculated.`,
145813
145962
  (value) => value === void 0 ? true : parseBool(value)
145814
- ).action(
145963
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145815
145964
  actionRunner(
145816
- async ({ functionId, queries, search, total }) => parse3(await (await getFunctionsClient()).listDeployments(functionId, queries, search, total))
145965
+ async ({ functionId, queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getFunctionsClient()).listDeployments(functionId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
145817
145966
  )
145818
145967
  );
145819
145968
  var functionsCreateDeploymentCommand = functions.command(`create-deployment`).description(`Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
@@ -145878,13 +146027,13 @@ var functionsUpdateDeploymentStatusCommand = functions.command(`update-deploymen
145878
146027
  async ({ functionId, deploymentId }) => parse3(await (await getFunctionsClient()).updateDeploymentStatus(functionId, deploymentId))
145879
146028
  )
145880
146029
  );
145881
- var functionsListExecutionsCommand = functions.command(`list-executions`).description(`Get a list of all the current user function execution logs. You can use the query params to filter your results.`).requiredOption(`--function-id <function-id>`, `Function ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`).option(
146030
+ var functionsListExecutionsCommand = functions.command(`list-executions`).description(`Get a list of all the current user function execution logs. You can use the query params to filter your results.`).requiredOption(`--function-id <function-id>`, `Function ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`).option(
145882
146031
  `--total [value]`,
145883
146032
  `When set to false, the total count returned will be 0 and will not be calculated.`,
145884
146033
  (value) => value === void 0 ? true : parseBool(value)
145885
- ).action(
146034
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
145886
146035
  actionRunner(
145887
- async ({ functionId, queries, total }) => parse3(await (await getFunctionsClient()).listExecutions(functionId, queries, total))
146036
+ async ({ functionId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getFunctionsClient()).listExecutions(functionId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
145888
146037
  )
145889
146038
  );
145890
146039
  var functionsCreateExecutionCommand = functions.command(`create-execution`).description(`Trigger a function execution. The returned object will return you the current execution status. You can ping the \`Get Execution\` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.`).requiredOption(`--function-id <function-id>`, `Function ID.`).option(`--body <body>`, `HTTP body of execution. Default value is empty string.`).option(
@@ -146165,13 +146314,13 @@ var getMessagingClient = async () => {
146165
146314
  var messaging = new Command("messaging").description(commandDescriptions["messaging"] ?? "").configureHelp({
146166
146315
  helpWidth: process.stdout.columns || 80
146167
146316
  });
146168
- var messagingListMessagesCommand = messaging.command(`list-messages`).description(`Get a list of all messages from the current Appwrite project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146317
+ var messagingListMessagesCommand = messaging.command(`list-messages`).description(`Get a list of all messages from the current Appwrite project.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146169
146318
  `--total [value]`,
146170
146319
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146171
146320
  (value) => value === void 0 ? true : parseBool(value)
146172
- ).action(
146321
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146173
146322
  actionRunner(
146174
- async ({ queries, search, total }) => parse3(await (await getMessagingClient()).listMessages(queries, search, total))
146323
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getMessagingClient()).listMessages(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
146175
146324
  )
146176
146325
  );
146177
146326
  var messagingCreateEmailCommand = messaging.command(`create-email`).description(`Create a new email message.`).requiredOption(`--message-id <message-id>`, `Message 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.`).requiredOption(`--subject <subject>`, `Email Subject.`).requiredOption(`--content <content>`, `Email Content.`).option(`--topics [topics...]`, `List of Topic IDs.`).option(`--users [users...]`, `List of User IDs.`).option(`--targets [targets...]`, `List of Targets IDs.`).option(`--cc [cc...]`, `Array of target IDs to be added as CC.`).option(`--bcc [bcc...]`, `Array of target IDs to be added as BCC.`).option(`--attachments [attachments...]`, `Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.`).option(
@@ -146266,31 +146415,31 @@ var messagingDeleteCommand = messaging.command(`delete`).description(`Delete a m
146266
146415
  async ({ messageId }) => parse3(await (await getMessagingClient()).delete(messageId))
146267
146416
  )
146268
146417
  );
146269
- var messagingListMessageLogsCommand = messaging.command(`list-message-logs`).description(`Get the message activity logs listed by its unique ID.`).requiredOption(`--message-id <message-id>`, `Message ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
146418
+ var messagingListMessageLogsCommand = messaging.command(`list-message-logs`).description(`Get the message activity logs listed by its unique ID.`).requiredOption(`--message-id <message-id>`, `Message ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
146270
146419
  `--total [value]`,
146271
146420
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146272
146421
  (value) => value === void 0 ? true : parseBool(value)
146273
- ).action(
146422
+ ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
146274
146423
  actionRunner(
146275
- async ({ messageId, queries, total }) => parse3(await (await getMessagingClient()).listMessageLogs(messageId, queries, total))
146424
+ async ({ messageId, queries, total, limit, offset }) => parse3(await (await getMessagingClient()).listMessageLogs(messageId, buildQueries({ queries, limit, offset }), total))
146276
146425
  )
146277
146426
  );
146278
- var messagingListTargetsCommand = messaging.command(`list-targets`).description(`Get a list of the targets associated with a message.`).requiredOption(`--message-id <message-id>`, `Message ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType`).option(
146427
+ var messagingListTargetsCommand = messaging.command(`list-targets`).description(`Get a list of the targets associated with a message.`).requiredOption(`--message-id <message-id>`, `Message ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType`).option(
146279
146428
  `--total [value]`,
146280
146429
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146281
146430
  (value) => value === void 0 ? true : parseBool(value)
146282
- ).action(
146431
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146283
146432
  actionRunner(
146284
- async ({ messageId, queries, total }) => parse3(await (await getMessagingClient()).listTargets(messageId, queries, total))
146433
+ async ({ messageId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getMessagingClient()).listTargets(messageId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
146285
146434
  )
146286
146435
  );
146287
- var messagingListProvidersCommand = messaging.command(`list-providers`).description(`Get a list of all providers from the current Appwrite project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146436
+ var messagingListProvidersCommand = messaging.command(`list-providers`).description(`Get a list of all providers from the current Appwrite project.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146288
146437
  `--total [value]`,
146289
146438
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146290
146439
  (value) => value === void 0 ? true : parseBool(value)
146291
- ).action(
146440
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146292
146441
  actionRunner(
146293
- async ({ queries, search, total }) => parse3(await (await getMessagingClient()).listProviders(queries, search, total))
146442
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getMessagingClient()).listProviders(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
146294
146443
  )
146295
146444
  );
146296
146445
  var messagingCreateApnsProviderCommand = messaging.command(`create-apns-provider`).description(`Create a new Apple Push Notification service provider.`).requiredOption(`--provider-id <provider-id>`, `Provider 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.`).requiredOption(`--name <name>`, `Provider name.`).option(`--auth-key <auth-key>`, `APNS authentication key.`).option(`--auth-key-id <auth-key-id>`, `APNS authentication key ID.`).option(`--team-id <team-id>`, `APNS team ID.`).option(`--bundle-id <bundle-id>`, `APNS bundle ID.`).option(
@@ -146526,31 +146675,31 @@ var messagingDeleteProviderCommand = messaging.command(`delete-provider`).descri
146526
146675
  async ({ providerId }) => parse3(await (await getMessagingClient()).deleteProvider(providerId))
146527
146676
  )
146528
146677
  );
146529
- var messagingListProviderLogsCommand = messaging.command(`list-provider-logs`).description(`Get the provider activity logs listed by its unique ID.`).requiredOption(`--provider-id <provider-id>`, `Provider ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
146678
+ var messagingListProviderLogsCommand = messaging.command(`list-provider-logs`).description(`Get the provider activity logs listed by its unique ID.`).requiredOption(`--provider-id <provider-id>`, `Provider ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
146530
146679
  `--total [value]`,
146531
146680
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146532
146681
  (value) => value === void 0 ? true : parseBool(value)
146533
- ).action(
146682
+ ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
146534
146683
  actionRunner(
146535
- async ({ providerId, queries, total }) => parse3(await (await getMessagingClient()).listProviderLogs(providerId, queries, total))
146684
+ async ({ providerId, queries, total, limit, offset }) => parse3(await (await getMessagingClient()).listProviderLogs(providerId, buildQueries({ queries, limit, offset }), total))
146536
146685
  )
146537
146686
  );
146538
- var messagingListSubscriberLogsCommand = messaging.command(`list-subscriber-logs`).description(`Get the subscriber activity logs listed by its unique ID.`).requiredOption(`--subscriber-id <subscriber-id>`, `Subscriber ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
146687
+ var messagingListSubscriberLogsCommand = messaging.command(`list-subscriber-logs`).description(`Get the subscriber activity logs listed by its unique ID.`).requiredOption(`--subscriber-id <subscriber-id>`, `Subscriber ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
146539
146688
  `--total [value]`,
146540
146689
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146541
146690
  (value) => value === void 0 ? true : parseBool(value)
146542
- ).action(
146691
+ ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
146543
146692
  actionRunner(
146544
- async ({ subscriberId, queries, total }) => parse3(await (await getMessagingClient()).listSubscriberLogs(subscriberId, queries, total))
146693
+ async ({ subscriberId, queries, total, limit, offset }) => parse3(await (await getMessagingClient()).listSubscriberLogs(subscriberId, buildQueries({ queries, limit, offset }), total))
146545
146694
  )
146546
146695
  );
146547
- var messagingListTopicsCommand = messaging.command(`list-topics`).description(`Get a list of all topics from the current Appwrite project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146696
+ var messagingListTopicsCommand = messaging.command(`list-topics`).description(`Get a list of all topics from the current Appwrite project.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146548
146697
  `--total [value]`,
146549
146698
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146550
146699
  (value) => value === void 0 ? true : parseBool(value)
146551
- ).action(
146700
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146552
146701
  actionRunner(
146553
- async ({ queries, search, total }) => parse3(await (await getMessagingClient()).listTopics(queries, search, total))
146702
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getMessagingClient()).listTopics(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
146554
146703
  )
146555
146704
  );
146556
146705
  var messagingCreateTopicCommand = messaging.command(`create-topic`).description(`Create a new topic.`).requiredOption(`--topic-id <topic-id>`, `Topic ID. Choose a custom Topic ID or a new Topic ID.`).requiredOption(`--name <name>`, `Topic Name.`).option(`--subscribe [subscribe...]`, `An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. learn more about roles (https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`).action(
@@ -146575,22 +146724,22 @@ var messagingDeleteTopicCommand = messaging.command(`delete-topic`).description(
146575
146724
  async ({ topicId }) => parse3(await (await getMessagingClient()).deleteTopic(topicId))
146576
146725
  )
146577
146726
  );
146578
- var messagingListTopicLogsCommand = messaging.command(`list-topic-logs`).description(`Get the topic activity logs listed by its unique ID.`).requiredOption(`--topic-id <topic-id>`, `Topic ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
146727
+ var messagingListTopicLogsCommand = messaging.command(`list-topic-logs`).description(`Get the topic activity logs listed by its unique ID.`).requiredOption(`--topic-id <topic-id>`, `Topic ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
146579
146728
  `--total [value]`,
146580
146729
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146581
146730
  (value) => value === void 0 ? true : parseBool(value)
146582
- ).action(
146731
+ ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
146583
146732
  actionRunner(
146584
- async ({ topicId, queries, total }) => parse3(await (await getMessagingClient()).listTopicLogs(topicId, queries, total))
146733
+ async ({ topicId, queries, total, limit, offset }) => parse3(await (await getMessagingClient()).listTopicLogs(topicId, buildQueries({ queries, limit, offset }), total))
146585
146734
  )
146586
146735
  );
146587
- var messagingListSubscribersCommand = messaging.command(`list-subscribers`).description(`Get a list of all subscribers from the current Appwrite project.`).requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146736
+ var messagingListSubscribersCommand = messaging.command(`list-subscribers`).description(`Get a list of all subscribers from the current Appwrite project.`).requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146588
146737
  `--total [value]`,
146589
146738
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146590
146739
  (value) => value === void 0 ? true : parseBool(value)
146591
- ).action(
146740
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146592
146741
  actionRunner(
146593
- async ({ topicId, queries, search, total }) => parse3(await (await getMessagingClient()).listSubscribers(topicId, queries, search, total))
146742
+ async ({ topicId, queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getMessagingClient()).listSubscribers(topicId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
146594
146743
  )
146595
146744
  );
146596
146745
  var messagingCreateSubscriberCommand = messaging.command(`create-subscriber`).description(`Create a new subscriber.`).requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID to subscribe to.`).requiredOption(`--subscriber-id <subscriber-id>`, `Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.`).requiredOption(`--target-id <target-id>`, `Target ID. The target ID to link to the specified Topic ID.`).action(
@@ -146622,13 +146771,13 @@ var getMigrationsClient = async () => {
146622
146771
  var migrations = new Command("migrations").description(commandDescriptions["migrations"] ?? "").configureHelp({
146623
146772
  helpWidth: process.stdout.columns || 80
146624
146773
  });
146625
- var migrationsListCommand = migrations.command(`list`).description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146774
+ var migrationsListCommand = migrations.command(`list`).description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
146626
146775
  `--total [value]`,
146627
146776
  `When set to false, the total count returned will be 0 and will not be calculated.`,
146628
146777
  (value) => value === void 0 ? true : parseBool(value)
146629
- ).action(
146778
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146630
146779
  actionRunner(
146631
- async ({ queries, search, total }) => parse3(await (await getMigrationsClient()).list(queries, search, total))
146780
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getMigrationsClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
146632
146781
  )
146633
146782
  );
146634
146783
  var migrationsCreateAppwriteMigrationCommand = migrations.command(`create-appwrite-migration`).description(`Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. `).requiredOption(`--resources [resources...]`, `List of resources to migrate`).requiredOption(`--endpoint <endpoint>`, `Source Appwrite endpoint`).requiredOption(`--project-id <project-id>`, `Source Project ID`).requiredOption(`--api-key <api-key>`, `Source API Key`).action(
@@ -146641,7 +146790,7 @@ var migrationsGetAppwriteReportCommand = migrations.command(`get-appwrite-report
146641
146790
  async ({ resources, endpoint, projectId, key }) => parse3(await (await getMigrationsClient()).getAppwriteReport(resources, endpoint, projectId, key))
146642
146791
  )
146643
146792
  );
146644
- var migrationsCreateCSVExportCommand = migrations.command(`create-csv-export`).description(`Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.`).requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`).requiredOption(`--filename <filename>`, `The name of the file to be created for the export, excluding the .csv extension.`).option(`--columns [columns...]`, `List of attributes to export. If empty, all attributes will be exported. You can use the \`*\` wildcard to export all attributes from the collection.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK to filter documents to export. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--delimiter <delimiter>`, `The character that separates each column value. Default is comma.`).option(`--enclosure <enclosure>`, `The character that encloses each column value. Default is double quotes.`).option(`--escape <escape>`, `The escape character for the enclosure character. Default is double quotes.`).option(
146793
+ var migrationsCreateCSVExportCommand = migrations.command(`create-csv-export`).description(`Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.`).requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`).requiredOption(`--filename <filename>`, `The name of the file to be created for the export, excluding the .csv extension.`).option(`--columns [columns...]`, `List of attributes to export. If empty, all attributes will be exported. You can use the \`*\` wildcard to export all attributes from the collection.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK to filter documents to export. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--delimiter <delimiter>`, `The character that separates each column value. Default is comma.`).option(`--enclosure <enclosure>`, `The character that encloses each column value. Default is double quotes.`).option(`--escape <escape>`, `The escape character for the enclosure character. Default is double quotes.`).option(
146645
146794
  `--header [value]`,
146646
146795
  `Whether to include the header row with column names. Default is true.`,
146647
146796
  (value) => value === void 0 ? true : parseBool(value)
@@ -146649,9 +146798,9 @@ var migrationsCreateCSVExportCommand = migrations.command(`create-csv-export`).d
146649
146798
  `--notify [value]`,
146650
146799
  `Set to true to receive an email when the export is complete. Default is true.`,
146651
146800
  (value) => value === void 0 ? true : parseBool(value)
146652
- ).action(
146801
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146653
146802
  actionRunner(
146654
- async ({ resourceId, filename, columns, queries, delimiter, enclosure, escape, header, notify }) => parse3(await (await getMigrationsClient()).createCSVExport(resourceId, filename, columns, queries, delimiter, enclosure, escape, header, notify))
146803
+ async ({ resourceId, filename, columns, queries, delimiter, enclosure, escape, header, notify, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getMigrationsClient()).createCSVExport(resourceId, filename, columns, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), delimiter, enclosure, escape, header, notify))
146655
146804
  )
146656
146805
  );
146657
146806
  var migrationsCreateCSVImportCommand = migrations.command(`create-csv-import`).description(`Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration (https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File ID.`).requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.`).option(
@@ -146674,13 +146823,13 @@ var migrationsGetFirebaseReportCommand = migrations.command(`get-firebase-report
146674
146823
  )
146675
146824
  );
146676
146825
  var migrationsCreateJSONExportCommand = migrations.command(`create-json-export`).description(`Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.
146677
- `).requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`).requiredOption(`--filename <filename>`, `The name of the file to be created for the export, excluding the .json extension.`).option(`--columns [columns...]`, `List of attributes to export. If empty, all attributes will be exported. You can use the \`*\` wildcard to export all attributes from the collection.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK to filter documents to export. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`).option(
146826
+ `).requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`).requiredOption(`--filename <filename>`, `The name of the file to be created for the export, excluding the .json extension.`).option(`--columns [columns...]`, `List of attributes to export. If empty, all attributes will be exported. You can use the \`*\` wildcard to export all attributes from the collection.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK to filter documents to export. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`).option(
146678
146827
  `--notify [value]`,
146679
146828
  `Set to true to receive an email when the export is complete. Default is true.`,
146680
146829
  (value) => value === void 0 ? true : parseBool(value)
146681
- ).action(
146830
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146682
146831
  actionRunner(
146683
- async ({ resourceId, filename, columns, queries, notify }) => parse3(await (await getMigrationsClient()).createJSONExport(resourceId, filename, columns, queries, notify))
146832
+ async ({ resourceId, filename, columns, queries, notify, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getMigrationsClient()).createJSONExport(resourceId, filename, columns, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), notify))
146684
146833
  )
146685
146834
  );
146686
146835
  var migrationsCreateJSONImportCommand = migrations.command(`create-json-import`).description(`Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.
@@ -146741,9 +146890,9 @@ var getOrganizationsClient = async () => {
146741
146890
  var organizations = new Command("organizations").description(commandDescriptions["organizations"] ?? "").configureHelp({
146742
146891
  helpWidth: process.stdout.columns || 80
146743
146892
  });
146744
- var organizationsListCommand = organizations.command(`list`).description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).action(
146893
+ var organizationsListCommand = organizations.command(`list`).description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146745
146894
  actionRunner(
146746
- async ({ queries, search }) => parse3(await (await getOrganizationsClient()).list(queries, search))
146895
+ async ({ queries, search, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getOrganizationsClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search))
146747
146896
  )
146748
146897
  );
146749
146898
  var organizationsCreateCommand = organizations.command(`create`).description(`Create a new organization.
@@ -146798,9 +146947,9 @@ var organizationsGetAddonPriceCommand = organizations.command(`get-addon-price`)
146798
146947
  async ({ organizationId, addon }) => parse3(await (await getOrganizationsClient()).getAddonPrice(organizationId, addon))
146799
146948
  )
146800
146949
  );
146801
- var organizationsListAggregationsCommand = organizations.command(`list-aggregations`).description(`Get a list of all aggregations for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to`).action(
146950
+ var organizationsListAggregationsCommand = organizations.command(`list-aggregations`).description(`Get a list of all aggregations for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146802
146951
  actionRunner(
146803
- async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listAggregations(organizationId, queries))
146952
+ async ({ organizationId, queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getOrganizationsClient()).listAggregations(organizationId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
146804
146953
  )
146805
146954
  );
146806
146955
  var organizationsGetAggregationCommand = organizations.command(`get-aggregation`).description(`Get a specific aggregation using it's aggregation ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--aggregation-id <aggregation-id>`, `Invoice unique ID`).option(`--limit <limit>`, `Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.`, parseInteger).option(`--offset <offset>`, `Offset value. The default value is 0. Use this param to manage pagination.`, parseInteger).action(
@@ -146824,9 +146973,9 @@ var organizationsUpdateBudgetCommand = organizations.command(`update-budget`).de
146824
146973
  )
146825
146974
  );
146826
146975
  var organizationsListCreditsCommand = organizations.command(`list-credits`).description(`List all credits for an organization.
146827
- `).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status`).action(
146976
+ `).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
146828
146977
  actionRunner(
146829
- async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listCredits(organizationId, queries))
146978
+ async ({ organizationId, queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getOrganizationsClient()).listCredits(organizationId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
146830
146979
  )
146831
146980
  );
146832
146981
  var organizationsAddCreditCommand = organizations.command(`add-credit`).description(`Add credit to an organization using a coupon.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--coupon-id <coupon-id>`, `ID of the coupon`).action(
@@ -147003,13 +147152,13 @@ var projectUpdateFreeEmailsCommand = project.command(`update-free-emails`).descr
147003
147152
  async ({ enabled }) => parse3(await (await getProjectClient()).updateFreeEmails(enabled))
147004
147153
  )
147005
147154
  );
147006
- var projectListKeysCommand = project.command(`list-keys`).description(`Get a list of all API keys from the current project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes`).option(
147155
+ var projectListKeysCommand = project.command(`list-keys`).description(`Get a list of all API keys from the current project.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes`).option(
147007
147156
  `--total [value]`,
147008
147157
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147009
147158
  (value) => value === void 0 ? true : parseBool(value)
147010
- ).action(
147159
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147011
147160
  actionRunner(
147012
- async ({ queries, total }) => parse3(await (await getProjectClient()).listKeys(queries, total))
147161
+ async ({ queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getProjectClient()).listKeys(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
147013
147162
  )
147014
147163
  );
147015
147164
  var projectCreateKeyCommand = project.command(`create-key`).description(`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.`).requiredOption(`--key-id <key-id>`, `Key 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.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).option(`--expire <expire>`, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`).action(
@@ -147037,13 +147186,13 @@ var projectUpdateLabelsCommand = project.command(`update-labels`).description(`U
147037
147186
  async ({ labels }) => parse3(await (await getProjectClient()).updateLabels(labels))
147038
147187
  )
147039
147188
  );
147040
- var projectListPlatformsCommand = project.command(`list-platforms`).description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName`).option(
147189
+ var projectListPlatformsCommand = project.command(`list-platforms`).description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName`).option(
147041
147190
  `--total [value]`,
147042
147191
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147043
147192
  (value) => value === void 0 ? true : parseBool(value)
147044
- ).action(
147193
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147045
147194
  actionRunner(
147046
- async ({ queries, total }) => parse3(await (await getProjectClient()).listPlatforms(queries, total))
147195
+ async ({ queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getProjectClient()).listPlatforms(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
147047
147196
  )
147048
147197
  );
147049
147198
  var projectCreateAndroidPlatformCommand = project.command(`create-android-platform`).description(`Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.`).requiredOption(`--platform-id <platform-id>`, `Platform 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.`).requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`).requiredOption(`--application-id <application-id>`, `Android application ID. Max length: 256 chars.`).action(
@@ -147212,13 +147361,13 @@ var projectGetUsageCommand = project.command(`get-usage`).description(`Get compr
147212
147361
  async ({ startDate, endDate, period }) => parse3(await (await getProjectClient()).getUsage(startDate, endDate, period))
147213
147362
  )
147214
147363
  );
147215
- var projectListVariablesCommand = project.command(`list-variables`).description(`Get a list of all project environment variables.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret`).option(
147364
+ var projectListVariablesCommand = project.command(`list-variables`).description(`Get a list of all project environment variables.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret`).option(
147216
147365
  `--total [value]`,
147217
147366
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147218
147367
  (value) => value === void 0 ? true : parseBool(value)
147219
- ).action(
147368
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147220
147369
  actionRunner(
147221
- async ({ queries, total }) => parse3(await (await getProjectClient()).listVariables(queries, total))
147370
+ async ({ queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getProjectClient()).listVariables(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
147222
147371
  )
147223
147372
  );
147224
147373
  var projectCreateVariableCommand = project.command(`create-variable`).description(`Create a new project environment variable. These variables can be accessed by all functions and sites in the project.`).requiredOption(`--variable-id <variable-id>`, `Variable 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.`).requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`).requiredOption(`--value <value>`, `Variable value. Max length: 8192 chars.`).option(
@@ -147262,13 +147411,13 @@ var getProjectsClient = async () => {
147262
147411
  var projects = new Command("projects").description(commandDescriptions["projects"] ?? "").configureHelp({
147263
147412
  helpWidth: process.stdout.columns || 80
147264
147413
  });
147265
- var projectsListCommand = projects.command(`list`).description(`Get a list of all projects. You can use the query params to filter your results. `).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147414
+ var projectsListCommand = projects.command(`list`).description(`Get a list of all projects. You can use the query params to filter your results. `).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147266
147415
  `--total [value]`,
147267
147416
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147268
147417
  (value) => value === void 0 ? true : parseBool(value)
147269
- ).action(
147418
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147270
147419
  actionRunner(
147271
- async ({ queries, search, total }) => parse3(await (await getProjectsClient()).list(queries, search, total))
147420
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getProjectsClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
147272
147421
  )
147273
147422
  );
147274
147423
  projectsListCommand.outputFields = ["name", "$id", "region", "status"];
@@ -147302,9 +147451,9 @@ var projectsUpdateAuthStatusCommand = projects.command(`update-auth-status`).des
147302
147451
  async ({ projectId, method, status }) => parse3(await (await getProjectsClient()).updateAuthStatus(projectId, method, status))
147303
147452
  )
147304
147453
  );
147305
- var projectsListDevKeysCommand = projects.command(`list-dev-keys`).description(`List all the project's dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire`).action(
147454
+ var projectsListDevKeysCommand = projects.command(`list-dev-keys`).description(`List all the project's dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147306
147455
  actionRunner(
147307
- async ({ projectId, queries }) => parse3(await (await getProjectsClient()).listDevKeys(projectId, queries))
147456
+ async ({ projectId, queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getProjectsClient()).listDevKeys(projectId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
147308
147457
  )
147309
147458
  );
147310
147459
  var projectsCreateDevKeyCommand = projects.command(`create-dev-key`).description(`Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--expire <expire>`, `Expiration time in ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) format.`).action(
@@ -147341,13 +147490,13 @@ var projectsUpdateOAuth2Command = projects.command(`update-o-auth-2`).descriptio
147341
147490
  async ({ projectId, provider, appId, secret, enabled }) => parse3(await (await getProjectsClient()).updateOAuth2(projectId, provider, appId, secret, enabled))
147342
147491
  )
147343
147492
  );
147344
- var projectsListSchedulesCommand = projects.command(`list-schedules`).description(`Get a list of all the project's schedules. You can use the query params to filter your results.`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: resourceType, resourceId, projectId, schedule, active, region`).option(
147493
+ var projectsListSchedulesCommand = projects.command(`list-schedules`).description(`Get a list of all the project's schedules. You can use the query params to filter your results.`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: resourceType, resourceId, projectId, schedule, active, region`).option(
147345
147494
  `--total [value]`,
147346
147495
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147347
147496
  (value) => value === void 0 ? true : parseBool(value)
147348
- ).action(
147497
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147349
147498
  actionRunner(
147350
- async ({ projectId, queries, total }) => parse3(await (await getProjectsClient()).listSchedules(projectId, queries, total))
147499
+ async ({ projectId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getProjectsClient()).listSchedules(projectId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
147351
147500
  )
147352
147501
  );
147353
147502
  var projectsCreateScheduleCommand = projects.command(`create-schedule`).description(`Create a new schedule for a resource.`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--resource-type <resource-type>`, `The resource type for the schedule. Possible values: function, execution, message, backup.`).requiredOption(`--resource-id <resource-id>`, `The resource ID to associate with this schedule.`).requiredOption(`--schedule <schedule>`, `Schedule CRON expression.`).option(
@@ -147388,13 +147537,13 @@ var getProxyClient = async () => {
147388
147537
  var proxy = new Command("proxy").description(commandDescriptions["proxy"] ?? "").configureHelp({
147389
147538
  helpWidth: process.stdout.columns || 80
147390
147539
  });
147391
- var proxyListRulesCommand = proxy.command(`list-rules`).description(`Get a list of all the proxy rules. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147540
+ var proxyListRulesCommand = proxy.command(`list-rules`).description(`Get a list of all the proxy rules. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147392
147541
  `--total [value]`,
147393
147542
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147394
147543
  (value) => value === void 0 ? true : parseBool(value)
147395
- ).action(
147544
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147396
147545
  actionRunner(
147397
- async ({ queries, search, total }) => parse3(await (await getProxyClient()).listRules(queries, search, total))
147546
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getProxyClient()).listRules(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
147398
147547
  )
147399
147548
  );
147400
147549
  var proxyCreateAPIRuleCommand = proxy.command(`create-api-rule`).description(`Create a new proxy rule for serving Appwrite's API on custom domain.`).requiredOption(`--domain <domain>`, `Domain name.`).action(
@@ -147446,13 +147595,13 @@ var getSitesClient = async () => {
147446
147595
  var sites = new Command("sites").description(commandDescriptions["sites"] ?? "").configureHelp({
147447
147596
  helpWidth: process.stdout.columns || 80
147448
147597
  });
147449
- var sitesListCommand = sites.command(`list`).description(`Get a list of all the project's sites. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147598
+ var sitesListCommand = sites.command(`list`).description(`Get a list of all the project's sites. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147450
147599
  `--total [value]`,
147451
147600
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147452
147601
  (value) => value === void 0 ? true : parseBool(value)
147453
- ).action(
147602
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147454
147603
  actionRunner(
147455
- async ({ queries, search, total }) => parse3(await (await getSitesClient()).list(queries, search, total))
147604
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getSitesClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
147456
147605
  )
147457
147606
  );
147458
147607
  var sitesCreateCommand = sites.command(`create`).description(`Create a new site.`).requiredOption(`--site-id <site-id>`, `Site 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.`).requiredOption(`--name <name>`, `Site name. Max length: 128 chars.`).requiredOption(`--framework <framework>`, `Sites framework.`).requiredOption(`--build-runtime <build-runtime>`, `Runtime to use during build step.`).option(
@@ -147529,13 +147678,13 @@ var sitesUpdateSiteDeploymentCommand = sites.command(`update-site-deployment`).d
147529
147678
  async ({ siteId, deploymentId }) => parse3(await (await getSitesClient()).updateSiteDeployment(siteId, deploymentId))
147530
147679
  )
147531
147680
  );
147532
- var sitesListDeploymentsCommand = sites.command(`list-deployments`).description(`Get a list of all the site's code deployments. You can use the query params to filter your results.`).requiredOption(`--site-id <site-id>`, `Site ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147681
+ var sitesListDeploymentsCommand = sites.command(`list-deployments`).description(`Get a list of all the site's code deployments. You can use the query params to filter your results.`).requiredOption(`--site-id <site-id>`, `Site ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147533
147682
  `--total [value]`,
147534
147683
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147535
147684
  (value) => value === void 0 ? true : parseBool(value)
147536
- ).action(
147685
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147537
147686
  actionRunner(
147538
- async ({ siteId, queries, search, total }) => parse3(await (await getSitesClient()).listDeployments(siteId, queries, search, total))
147687
+ async ({ siteId, queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getSitesClient()).listDeployments(siteId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
147539
147688
  )
147540
147689
  );
147541
147690
  var sitesCreateDeploymentCommand = sites.command(`create-deployment`).description(`Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.`).requiredOption(`--site-id <site-id>`, `Site ID.`).requiredOption(`--code <code>`, `Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.`).option(`--install-command <install-command>`, `Install Commands.`).option(`--build-command <build-command>`, `Build Commands.`).option(`--output-directory <output-directory>`, `Output Directory.`).option(
@@ -147600,13 +147749,13 @@ var sitesUpdateDeploymentStatusCommand = sites.command(`update-deployment-status
147600
147749
  async ({ siteId, deploymentId }) => parse3(await (await getSitesClient()).updateDeploymentStatus(siteId, deploymentId))
147601
147750
  )
147602
147751
  );
147603
- var sitesListLogsCommand = sites.command(`list-logs`).description(`Get a list of all site logs. You can use the query params to filter your results.`).requiredOption(`--site-id <site-id>`, `Site ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`).option(
147752
+ var sitesListLogsCommand = sites.command(`list-logs`).description(`Get a list of all site logs. You can use the query params to filter your results.`).requiredOption(`--site-id <site-id>`, `Site ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`).option(
147604
147753
  `--total [value]`,
147605
147754
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147606
147755
  (value) => value === void 0 ? true : parseBool(value)
147607
- ).action(
147756
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147608
147757
  actionRunner(
147609
- async ({ siteId, queries, total }) => parse3(await (await getSitesClient()).listLogs(siteId, queries, total))
147758
+ async ({ siteId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getSitesClient()).listLogs(siteId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
147610
147759
  )
147611
147760
  );
147612
147761
  var sitesGetLogCommand = sites.command(`get-log`).description(`Get a site request log by its unique ID.`).requiredOption(`--site-id <site-id>`, `Site ID.`).requiredOption(`--log-id <log-id>`, `Log ID.`).action(
@@ -147671,13 +147820,13 @@ var getStorageClient = async () => {
147671
147820
  var storage = new Command("storage").description(commandDescriptions["storage"] ?? "").configureHelp({
147672
147821
  helpWidth: process.stdout.columns || 80
147673
147822
  });
147674
- var storageListBucketsCommand = storage.command(`list-buckets`).description(`Get a list of all the storage buckets. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147823
+ var storageListBucketsCommand = storage.command(`list-buckets`).description(`Get a list of all the storage buckets. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147675
147824
  `--total [value]`,
147676
147825
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147677
147826
  (value) => value === void 0 ? true : parseBool(value)
147678
- ).action(
147827
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147679
147828
  actionRunner(
147680
- async ({ queries, search, total }) => parse3(await (await getStorageClient()).listBuckets(queries, search, total))
147829
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getStorageClient()).listBuckets(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
147681
147830
  )
147682
147831
  );
147683
147832
  var storageCreateBucketCommand = storage.command(`create-bucket`).description(`Create a new storage bucket.`).requiredOption(`--bucket-id <bucket-id>`, `Unique 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.`).requiredOption(`--name <name>`, `Bucket name`).option(`--permissions [permissions...]`, `An array of permission strings. By default, no user is granted with any permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`).option(
@@ -147740,13 +147889,13 @@ var storageDeleteBucketCommand = storage.command(`delete-bucket`).description(`D
147740
147889
  async ({ bucketId }) => parse3(await (await getStorageClient()).deleteBucket(bucketId))
147741
147890
  )
147742
147891
  );
147743
- var storageListFilesCommand = storage.command(`list-files`).description(`Get a list of all the user files. You can use the query params to filter your results.`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration (https://appwrite.io/docs/server/storage#createBucket).`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147892
+ var storageListFilesCommand = storage.command(`list-files`).description(`Get a list of all the user files. You can use the query params to filter your results.`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration (https://appwrite.io/docs/server/storage#createBucket).`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147744
147893
  `--total [value]`,
147745
147894
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147746
147895
  (value) => value === void 0 ? true : parseBool(value)
147747
- ).action(
147896
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147748
147897
  actionRunner(
147749
- async ({ bucketId, queries, search, total }) => parse3(await (await getStorageClient()).listFiles(bucketId, queries, search, total))
147898
+ async ({ bucketId, queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getStorageClient()).listFiles(bucketId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
147750
147899
  )
147751
147900
  );
147752
147901
  var storageCreateFileCommand = storage.command(`create-file`).description(`Create a new file. Before using this route, you should create a new bucket resource using either a server integration (https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
@@ -147834,13 +147983,13 @@ var getTablesDBClient = async () => {
147834
147983
  var tablesDB = new Command("tables-db").description(commandDescriptions["tablesDB"] ?? "").configureHelp({
147835
147984
  helpWidth: process.stdout.columns || 80
147836
147985
  });
147837
- var tablesDBListCommand = tablesDB.command(`list`).description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147986
+ var tablesDBListCommand = tablesDB.command(`list`).description(`Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147838
147987
  `--total [value]`,
147839
147988
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147840
147989
  (value) => value === void 0 ? true : parseBool(value)
147841
- ).action(
147990
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147842
147991
  actionRunner(
147843
- async ({ queries, search, total }) => parse3(await (await getTablesDBClient()).list(queries, search, total))
147992
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTablesDBClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
147844
147993
  )
147845
147994
  );
147846
147995
  var tablesDBCreateCommand = tablesDB.command(`create`).description(`Create a new Database.
@@ -147853,9 +148002,9 @@ var tablesDBCreateCommand = tablesDB.command(`create`).description(`Create a new
147853
148002
  async ({ databaseId, name, enabled }) => parse3(await (await getTablesDBClient()).create(databaseId, name, enabled))
147854
148003
  )
147855
148004
  );
147856
- var tablesDBListTransactionsCommand = tablesDB.command(`list-transactions`).description(`List transactions across all databases.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries).`).action(
148005
+ var tablesDBListTransactionsCommand = tablesDB.command(`list-transactions`).description(`List transactions across all databases.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries).`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147857
148006
  actionRunner(
147858
- async ({ queries }) => parse3(await (await getTablesDBClient()).listTransactions(queries))
148007
+ async ({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTablesDBClient()).listTransactions(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
147859
148008
  )
147860
148009
  );
147861
148010
  var tablesDBCreateTransactionCommand = tablesDB.command(`create-transaction`).description(`Create a new transaction.`).option(`--ttl <ttl>`, `Seconds before the transaction expires.`, parseInteger).action(
@@ -147915,13 +148064,13 @@ var tablesDBDeleteCommand = tablesDB.command(`delete`).description(`Delete a dat
147915
148064
  async ({ databaseId }) => parse3(await (await getTablesDBClient()).delete(databaseId))
147916
148065
  )
147917
148066
  );
147918
- var tablesDBListTablesCommand = tablesDB.command(`list-tables`).description(`Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148067
+ var tablesDBListTablesCommand = tablesDB.command(`list-tables`).description(`Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
147919
148068
  `--total [value]`,
147920
148069
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147921
148070
  (value) => value === void 0 ? true : parseBool(value)
147922
- ).action(
148071
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147923
148072
  actionRunner(
147924
- async ({ databaseId, queries, search, total }) => parse3(await (await getTablesDBClient()).listTables(databaseId, queries, search, total))
148073
+ async ({ databaseId, queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTablesDBClient()).listTables(databaseId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
147925
148074
  )
147926
148075
  );
147927
148076
  var tablesDBCreateTableCommand = tablesDB.command(`create-table`).description(`Create a new Table. Before using this route, you should create a new database resource using either a server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Unique 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.`).requiredOption(`--name <name>`, `Table name. Max length: 128 chars.`).option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`).option(
@@ -147964,13 +148113,13 @@ var tablesDBDeleteTableCommand = tablesDB.command(`delete-table`).description(`D
147964
148113
  async ({ databaseId, tableId }) => parse3(await (await getTablesDBClient()).deleteTable(databaseId, tableId))
147965
148114
  )
147966
148115
  );
147967
- var tablesDBListColumnsCommand = tablesDB.command(`list-columns`).description(`List columns in the table.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error`).option(
148116
+ var tablesDBListColumnsCommand = tablesDB.command(`list-columns`).description(`List columns in the table.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error`).option(
147968
148117
  `--total [value]`,
147969
148118
  `When set to false, the total count returned will be 0 and will not be calculated.`,
147970
148119
  (value) => value === void 0 ? true : parseBool(value)
147971
- ).action(
148120
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
147972
148121
  actionRunner(
147973
- async ({ databaseId, tableId, queries, total }) => parse3(await (await getTablesDBClient()).listColumns(databaseId, tableId, queries, total))
148122
+ async ({ databaseId, tableId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTablesDBClient()).listColumns(databaseId, tableId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
147974
148123
  )
147975
148124
  );
147976
148125
  var tablesDBCreateBooleanColumnCommand = tablesDB.command(`create-boolean-column`).description(`Create a boolean column.
@@ -148257,13 +148406,13 @@ var tablesDBUpdateRelationshipColumnCommand = tablesDB.command(`update-relations
148257
148406
  async ({ databaseId, tableId, key, onDelete, newKey }) => parse3(await (await getTablesDBClient()).updateRelationshipColumn(databaseId, tableId, key, onDelete, newKey))
148258
148407
  )
148259
148408
  );
148260
- var tablesDBListIndexesCommand = tablesDB.command(`list-indexes`).description(`List indexes on the table.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error`).option(
148409
+ var tablesDBListIndexesCommand = tablesDB.command(`list-indexes`).description(`List indexes on the table.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error`).option(
148261
148410
  `--total [value]`,
148262
148411
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148263
148412
  (value) => value === void 0 ? true : parseBool(value)
148264
- ).action(
148413
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148265
148414
  actionRunner(
148266
- async ({ databaseId, tableId, queries, total }) => parse3(await (await getTablesDBClient()).listIndexes(databaseId, tableId, queries, total))
148415
+ async ({ databaseId, tableId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTablesDBClient()).listIndexes(databaseId, tableId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
148267
148416
  )
148268
148417
  );
148269
148418
  var tablesDBCreateIndexCommand = tablesDB.command(`create-index`).description(`Creates an index on the columns listed. Your index should include all the columns you will query in a single request.
@@ -148282,18 +148431,18 @@ var tablesDBDeleteIndexCommand = tablesDB.command(`delete-index`).description(`D
148282
148431
  async ({ databaseId, tableId, key }) => parse3(await (await getTablesDBClient()).deleteIndex(databaseId, tableId, key))
148283
148432
  )
148284
148433
  );
148285
- var tablesDBListTableLogsCommand = tablesDB.command(`list-table-logs`).description(`Get the table activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).action(
148434
+ var tablesDBListTableLogsCommand = tablesDB.command(`list-table-logs`).description(`Get the table activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
148286
148435
  actionRunner(
148287
- async ({ databaseId, tableId, queries }) => parse3(await (await getTablesDBClient()).listTableLogs(databaseId, tableId, queries))
148436
+ async ({ databaseId, tableId, queries, limit, offset }) => parse3(await (await getTablesDBClient()).listTableLogs(databaseId, tableId, buildQueries({ queries, limit, offset })))
148288
148437
  )
148289
148438
  );
148290
- var tablesDBListRowsCommand = tablesDB.command(`list-rows`).description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/products/databases/tables#create-table).`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).option(
148439
+ var tablesDBListRowsCommand = tablesDB.command(`list-rows`).description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/products/databases/tables#create-table).`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, pagination, and selection prefer --where, --sort-asc, --sort-desc, --limit, --offset, and --select. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).option(
148291
148440
  `--total [value]`,
148292
148441
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148293
148442
  (value) => value === void 0 ? true : parseBool(value)
148294
- ).option(`--ttl <ttl>`, `TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).`, parseInteger).action(
148443
+ ).option(`--ttl <ttl>`, `TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).`, parseInteger).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).option(`--select <attribute>`, `Attribute to include in the response. Repeat for multiple attributes.`, (value, previous) => collectQueryValue(value, previous)).action(
148295
148444
  actionRunner(
148296
- async ({ databaseId, tableId, queries, transactionId, total, ttl }) => parse3(await (await getTablesDBClient()).listRows(databaseId, tableId, queries, transactionId, total, ttl))
148445
+ async ({ databaseId, tableId, queries, transactionId, total, ttl, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset, select }) => parse3(await (await getTablesDBClient()).listRows(databaseId, tableId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset, select }), transactionId, total, ttl))
148297
148446
  )
148298
148447
  );
148299
148448
  var tablesDBCreateRowCommand = tablesDB.command(`create-row`).description(`Create a new Row. Before using this route, you should create a new table resource using either a server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.`).requiredOption(`--row-id <row-id>`, `Row 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.`).requiredOption(`--data <data>`, `Row data as JSON object.`).option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. Learn more about permissions (https://appwrite.io/docs/permissions).`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
@@ -148312,19 +148461,19 @@ var tablesDBUpsertRowsCommand = tablesDB.command(`upsert-rows`).description(`Cre
148312
148461
  async ({ databaseId, tableId, rows, transactionId }) => parse3(await (await getTablesDBClient()).upsertRows(databaseId, tableId, rows, transactionId))
148313
148462
  )
148314
148463
  );
148315
- var tablesDBUpdateRowsCommand = tablesDB.command(`update-rows`).description(`Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).option(`--data <data>`, `Row data as JSON object. Include only column and value pairs to be updated.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
148464
+ var tablesDBUpdateRowsCommand = tablesDB.command(`update-rows`).description(`Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).option(`--data <data>`, `Row data as JSON object. Include only column and value pairs to be updated.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148316
148465
  actionRunner(
148317
- async ({ databaseId, tableId, data, queries, transactionId }) => parse3(await (await getTablesDBClient()).updateRows(databaseId, tableId, JSON.parse(data), queries, transactionId))
148466
+ async ({ databaseId, tableId, data, queries, transactionId, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTablesDBClient()).updateRows(databaseId, tableId, JSON.parse(data), buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), transactionId))
148318
148467
  )
148319
148468
  );
148320
- var tablesDBDeleteRowsCommand = tablesDB.command(`delete-rows`).description(`Bulk delete rows using queries, if no queries are passed then all rows are deleted.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
148469
+ var tablesDBDeleteRowsCommand = tablesDB.command(`delete-rows`).description(`Bulk delete rows using queries, if no queries are passed then all rows are deleted.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148321
148470
  actionRunner(
148322
- async ({ databaseId, tableId, queries, transactionId }) => parse3(await (await getTablesDBClient()).deleteRows(databaseId, tableId, queries, transactionId))
148471
+ async ({ databaseId, tableId, queries, transactionId, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTablesDBClient()).deleteRows(databaseId, tableId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), transactionId))
148323
148472
  )
148324
148473
  );
148325
- var tablesDBGetRowCommand = tablesDB.command(`get-row`).description(`Get a row by its unique ID. This endpoint response returns a JSON object with the row data.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`).requiredOption(`--row-id <row-id>`, `Row ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).action(
148474
+ var tablesDBGetRowCommand = tablesDB.command(`get-row`).description(`Get a row by its unique ID. This endpoint response returns a JSON object with the row data.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).`).requiredOption(`--row-id <row-id>`, `Row ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for selecting returned attributes prefer --select. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).option(`--select <attribute>`, `Attribute to include in the response. Repeat for multiple attributes.`, (value, previous) => collectQueryValue(value, previous)).action(
148326
148475
  actionRunner(
148327
- async ({ databaseId, tableId, rowId, queries, transactionId }) => parse3(await (await getTablesDBClient()).getRow(databaseId, tableId, rowId, queries, transactionId))
148476
+ async ({ databaseId, tableId, rowId, queries, transactionId, select }) => parse3(await (await getTablesDBClient()).getRow(databaseId, tableId, rowId, buildQueries({ queries, select }), transactionId))
148328
148477
  )
148329
148478
  );
148330
148479
  var tablesDBUpsertRowCommand = tablesDB.command(`upsert-row`).description(`Create or update a Row. Before using this route, you should create a new table resource using either a server integration (https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).requiredOption(`--row-id <row-id>`, `Row ID.`).option(`--data <data>`, `Row data as JSON object. Include all required columns of the row to be created or updated.`).option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions (https://appwrite.io/docs/permissions).`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
@@ -148342,9 +148491,9 @@ var tablesDBDeleteRowCommand = tablesDB.command(`delete-row`).description(`Delet
148342
148491
  async ({ databaseId, tableId, rowId, transactionId }) => parse3(await (await getTablesDBClient()).deleteRow(databaseId, tableId, rowId, transactionId))
148343
148492
  )
148344
148493
  );
148345
- var tablesDBListRowLogsCommand = tablesDB.command(`list-row-logs`).description(`Get the row activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).requiredOption(`--row-id <row-id>`, `Row ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).action(
148494
+ var tablesDBListRowLogsCommand = tablesDB.command(`list-row-logs`).description(`Get the row activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).requiredOption(`--row-id <row-id>`, `Row ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
148346
148495
  actionRunner(
148347
- async ({ databaseId, tableId, rowId, queries }) => parse3(await (await getTablesDBClient()).listRowLogs(databaseId, tableId, rowId, queries))
148496
+ async ({ databaseId, tableId, rowId, queries, limit, offset }) => parse3(await (await getTablesDBClient()).listRowLogs(databaseId, tableId, rowId, buildQueries({ queries, limit, offset })))
148348
148497
  )
148349
148498
  );
148350
148499
  var tablesDBDecrementRowColumnCommand = tablesDB.command(`decrement-row-column`).description(`Decrement a specific column of a row by a given value.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).requiredOption(`--row-id <row-id>`, `Row ID.`).requiredOption(`--column <column>`, `Column key.`).option(`--value <value>`, `Value to increment the column by. The value must be a number.`, parseInteger).option(`--min <min>`, `Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.`, parseInteger).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
@@ -148388,13 +148537,13 @@ var getTeamsClient = async () => {
148388
148537
  var teams = new Command("teams").description(commandDescriptions["teams"] ?? "").configureHelp({
148389
148538
  helpWidth: process.stdout.columns || 80
148390
148539
  });
148391
- var teamsListCommand = teams.command(`list`).description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148540
+ var teamsListCommand = teams.command(`list`).description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148392
148541
  `--total [value]`,
148393
148542
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148394
148543
  (value) => value === void 0 ? true : parseBool(value)
148395
- ).action(
148544
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148396
148545
  actionRunner(
148397
- async ({ queries, search, total }) => parse3(await (await getTeamsClient()).list(queries, search, total))
148546
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTeamsClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
148398
148547
  )
148399
148548
  );
148400
148549
  var teamsCreateCommand = teams.command(`create`).description(`Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.`).requiredOption(`--team-id <team-id>`, `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.`).requiredOption(`--name <name>`, `Team name. Max length: 128 chars.`).option(`--roles [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.`).action(
@@ -148417,22 +148566,22 @@ var teamsDeleteCommand = teams.command(`delete`).description(`Delete a team usin
148417
148566
  async ({ teamId }) => parse3(await (await getTeamsClient()).delete(teamId))
148418
148567
  )
148419
148568
  );
148420
- var teamsListLogsCommand = teams.command(`list-logs`).description(`Get the team activity logs list by its unique ID.`).requiredOption(`--team-id <team-id>`, `Team ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
148569
+ var teamsListLogsCommand = teams.command(`list-logs`).description(`Get the team activity logs list by its unique ID.`).requiredOption(`--team-id <team-id>`, `Team ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
148421
148570
  `--total [value]`,
148422
148571
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148423
148572
  (value) => value === void 0 ? true : parseBool(value)
148424
- ).action(
148573
+ ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
148425
148574
  actionRunner(
148426
- async ({ teamId, queries, total }) => parse3(await (await getTeamsClient()).listLogs(teamId, queries, total))
148575
+ async ({ teamId, queries, total, limit, offset }) => parse3(await (await getTeamsClient()).listLogs(teamId, buildQueries({ queries, limit, offset }), total))
148427
148576
  )
148428
148577
  );
148429
- var teamsListMembershipsCommand = teams.command(`list-memberships`).description(`Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.`).requiredOption(`--team-id <team-id>`, `Team ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148578
+ var teamsListMembershipsCommand = teams.command(`list-memberships`).description(`Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.`).requiredOption(`--team-id <team-id>`, `Team ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148430
148579
  `--total [value]`,
148431
148580
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148432
148581
  (value) => value === void 0 ? true : parseBool(value)
148433
- ).action(
148582
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148434
148583
  actionRunner(
148435
- async ({ teamId, queries, search, total }) => parse3(await (await getTeamsClient()).listMemberships(teamId, queries, search, total))
148584
+ async ({ teamId, queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTeamsClient()).listMemberships(teamId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
148436
148585
  )
148437
148586
  );
148438
148587
  var teamsCreateMembershipCommand = teams.command(`create-membership`).description(`Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.
@@ -148494,13 +148643,13 @@ var getTokensClient = async () => {
148494
148643
  var tokens = new Command("tokens").description(commandDescriptions["tokens"] ?? "").configureHelp({
148495
148644
  helpWidth: process.stdout.columns || 80
148496
148645
  });
148497
- var tokensListCommand = tokens.command(`list`).description(`List all the tokens created for a specific file or bucket. You can use the query params to filter your results.`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration (https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File unique ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire`).option(
148646
+ var tokensListCommand = tokens.command(`list`).description(`List all the tokens created for a specific file or bucket. You can use the query params to filter your results.`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration (https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File unique ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire`).option(
148498
148647
  `--total [value]`,
148499
148648
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148500
148649
  (value) => value === void 0 ? true : parseBool(value)
148501
- ).action(
148650
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148502
148651
  actionRunner(
148503
- async ({ bucketId, fileId, queries, total }) => parse3(await (await getTokensClient()).list(bucketId, fileId, queries, total))
148652
+ async ({ bucketId, fileId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getTokensClient()).list(bucketId, fileId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
148504
148653
  )
148505
148654
  );
148506
148655
  var tokensCreateFileTokenCommand = tokens.command(`create-file-token`).description(`Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service server integration (https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File unique ID.`).option(`--expire <expire>`, `Token expiry date`).action(
@@ -148536,13 +148685,13 @@ var getUsersClient = async () => {
148536
148685
  var users = new Command("users").description(commandDescriptions["users"] ?? "").configureHelp({
148537
148686
  helpWidth: process.stdout.columns || 80
148538
148687
  });
148539
- var usersListCommand = users.command(`list`).description(`Get a list of all the project's users. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148688
+ var usersListCommand = users.command(`list`).description(`Get a list of all the project's users. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148540
148689
  `--total [value]`,
148541
148690
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148542
148691
  (value) => value === void 0 ? true : parseBool(value)
148543
- ).action(
148692
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148544
148693
  actionRunner(
148545
- async ({ queries, search, total }) => parse3(await (await getUsersClient()).list(queries, search, total))
148694
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getUsersClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
148546
148695
  )
148547
148696
  );
148548
148697
  var usersCreateCommand = users.command(`create`).description(`Create a new user.`).requiredOption(`--user-id <user-id>`, `User 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.`).option(`--email <email>`, `User email.`).option(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`).option(`--password <password>`, `Plain text user password. Must be at least 8 chars.`).option(`--name <name>`, `User name. Max length: 128 chars.`).action(
@@ -148560,13 +148709,13 @@ var usersCreateBcryptUserCommand = users.command(`create-bcrypt-user`).descripti
148560
148709
  async ({ userId, email: email3, password, name }) => parse3(await (await getUsersClient()).createBcryptUser(userId, email3, password, name))
148561
148710
  )
148562
148711
  );
148563
- var usersListIdentitiesCommand = users.command(`list-identities`).description(`Get identities for all users.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148712
+ var usersListIdentitiesCommand = users.command(`list-identities`).description(`Get identities for all users.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148564
148713
  `--total [value]`,
148565
148714
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148566
148715
  (value) => value === void 0 ? true : parseBool(value)
148567
- ).action(
148716
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148568
148717
  actionRunner(
148569
- async ({ queries, search, total }) => parse3(await (await getUsersClient()).listIdentities(queries, search, total))
148718
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getUsersClient()).listIdentities(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
148570
148719
  )
148571
148720
  );
148572
148721
  var usersDeleteIdentityCommand = users.command(`delete-identity`).description(`Delete an identity by its unique ID.`).requiredOption(`--identity-id <identity-id>`, `Identity ID.`).action(
@@ -148638,22 +148787,22 @@ Labels can be used to grant access to resources. While teams are a way for user'
148638
148787
  async ({ userId, labels }) => parse3(await (await getUsersClient()).updateLabels(userId, labels))
148639
148788
  )
148640
148789
  );
148641
- var usersListLogsCommand = users.command(`list-logs`).description(`Get the user activity logs list by its unique ID.`).requiredOption(`--user-id <user-id>`, `User ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
148790
+ var usersListLogsCommand = users.command(`list-logs`).description(`Get the user activity logs list by its unique ID.`).requiredOption(`--user-id <user-id>`, `User ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
148642
148791
  `--total [value]`,
148643
148792
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148644
148793
  (value) => value === void 0 ? true : parseBool(value)
148645
- ).action(
148794
+ ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
148646
148795
  actionRunner(
148647
- async ({ userId, queries, total }) => parse3(await (await getUsersClient()).listLogs(userId, queries, total))
148796
+ async ({ userId, queries, total, limit, offset }) => parse3(await (await getUsersClient()).listLogs(userId, buildQueries({ queries, limit, offset }), total))
148648
148797
  )
148649
148798
  );
148650
- var usersListMembershipsCommand = users.command(`list-memberships`).description(`Get the user membership list by its unique ID.`).requiredOption(`--user-id <user-id>`, `User ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148799
+ var usersListMembershipsCommand = users.command(`list-memberships`).description(`Get the user membership list by its unique ID.`).requiredOption(`--user-id <user-id>`, `User ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148651
148800
  `--total [value]`,
148652
148801
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148653
148802
  (value) => value === void 0 ? true : parseBool(value)
148654
- ).action(
148803
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148655
148804
  actionRunner(
148656
- async ({ userId, queries, search, total }) => parse3(await (await getUsersClient()).listMemberships(userId, queries, search, total))
148805
+ async ({ userId, queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getUsersClient()).listMemberships(userId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
148657
148806
  )
148658
148807
  );
148659
148808
  var usersUpdateMfaCommand = users.command(`update-mfa`).description(`Enable or disable MFA on a user account.`).requiredOption(`--user-id <user-id>`, `User ID.`).requiredOption(`--mfa <mfa>`, `Enable or disable MFA.`, parseBool).action(
@@ -148742,13 +148891,13 @@ var usersUpdateStatusCommand = users.command(`update-status`).description(`Updat
148742
148891
  async ({ userId, status }) => parse3(await (await getUsersClient()).updateStatus(userId, status))
148743
148892
  )
148744
148893
  );
148745
- var usersListTargetsCommand = users.command(`list-targets`).description(`List the messaging targets that are associated with a user.`).requiredOption(`--user-id <user-id>`, `User ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType`).option(
148894
+ var usersListTargetsCommand = users.command(`list-targets`).description(`List the messaging targets that are associated with a user.`).requiredOption(`--user-id <user-id>`, `User ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType`).option(
148746
148895
  `--total [value]`,
148747
148896
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148748
148897
  (value) => value === void 0 ? true : parseBool(value)
148749
- ).action(
148898
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148750
148899
  actionRunner(
148751
- async ({ userId, queries, total }) => parse3(await (await getUsersClient()).listTargets(userId, queries, total))
148900
+ async ({ userId, queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getUsersClient()).listTargets(userId, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
148752
148901
  )
148753
148902
  );
148754
148903
  var usersCreateTargetCommand = users.command(`create-target`).description(`Create a messaging target.`).requiredOption(`--user-id <user-id>`, `User ID.`).requiredOption(`--target-id <target-id>`, `Target 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.`).requiredOption(`--provider-type <provider-type>`, `The target provider type. Can be one of the following: \`email\`, \`sms\` or \`push\`.`).requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`).option(`--provider-id <provider-id>`, `Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`).option(`--name <name>`, `Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.`).action(
@@ -148805,9 +148954,9 @@ var vcsCreateRepositoryDetectionCommand = vcs.command(`create-repository-detecti
148805
148954
  async ({ installationId, providerRepositoryId, type, providerRootDirectory }) => parse3(await (await getVcsClient()).createRepositoryDetection(installationId, providerRepositoryId, type, providerRootDirectory))
148806
148955
  )
148807
148956
  );
148808
- var vcsListRepositoriesCommand = vcs.command(`list-repositories`).description(`Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.`).requiredOption(`--installation-id <installation-id>`, `Installation Id`).requiredOption(`--type <type>`, `Detector type. Must be one of the following: runtime, framework`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).action(
148957
+ var vcsListRepositoriesCommand = vcs.command(`list-repositories`).description(`Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.`).requiredOption(`--installation-id <installation-id>`, `Installation Id`).requiredOption(`--type <type>`, `Detector type. Must be one of the following: runtime, framework`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
148809
148958
  actionRunner(
148810
- async ({ installationId, type, search, queries }) => parse3(await (await getVcsClient()).listRepositories(installationId, type, search, queries))
148959
+ async ({ installationId, type, search, queries, limit, offset }) => parse3(await (await getVcsClient()).listRepositories(installationId, type, search, buildQueries({ queries, limit, offset })))
148811
148960
  )
148812
148961
  );
148813
148962
  var vcsCreateRepositoryCommand = vcs.command(`create-repository`).description(`Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.`).requiredOption(`--installation-id <installation-id>`, `Installation Id`).requiredOption(`--name <name>`, `Repository name (slug)`).requiredOption(`--xprivate <xprivate>`, `Mark repository public or private`, parseBool).action(
@@ -148837,13 +148986,13 @@ var vcsUpdateExternalDeploymentsCommand = vcs.command(`update-external-deploymen
148837
148986
  )
148838
148987
  );
148839
148988
  var vcsListInstallationsCommand = vcs.command(`list-installations`).description(`List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.
148840
- `).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148989
+ `).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
148841
148990
  `--total [value]`,
148842
148991
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148843
148992
  (value) => value === void 0 ? true : parseBool(value)
148844
- ).action(
148993
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148845
148994
  actionRunner(
148846
- async ({ queries, search, total }) => parse3(await (await getVcsClient()).listInstallations(queries, search, total))
148995
+ async ({ queries, search, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getVcsClient()).listInstallations(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
148847
148996
  )
148848
148997
  );
148849
148998
  var vcsGetInstallationCommand = vcs.command(`get-installation`).description(`Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. `).requiredOption(`--installation-id <installation-id>`, `Installation Id`).action(
@@ -148869,13 +149018,13 @@ var getWebhooksClient = async () => {
148869
149018
  var webhooks = new Command("webhooks").description(commandDescriptions["webhooks"] ?? "").configureHelp({
148870
149019
  helpWidth: process.stdout.columns || 80
148871
149020
  });
148872
- var webhooksListCommand = webhooks.command(`list`).description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts`).option(
149021
+ var webhooksListCommand = webhooks.command(`list`).description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --where, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts`).option(
148873
149022
  `--total [value]`,
148874
149023
  `When set to false, the total count returned will be 0 and will not be calculated.`,
148875
149024
  (value) => value === void 0 ? true : parseBool(value)
148876
- ).action(
149025
+ ).option(`--where <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
148877
149026
  actionRunner(
148878
- async ({ queries, total }) => parse3(await (await getWebhooksClient()).list(queries, total))
149027
+ async ({ queries, total, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getWebhooksClient()).list(buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
148879
149028
  )
148880
149029
  );
148881
149030
  var webhooksCreateCommand = webhooks.command(`create`).description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook 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.`).requiredOption(`--url <url>`, `Webhook URL.`).requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`).requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).option(