diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ffcb91b..ac162440 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 11.1.0 + +* Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance + ## 11.0.0 * Rename `create-csv-migration` to `create-csv-import` command to create a CSV import of a collection/table diff --git a/README.md b/README.md index 1aec53ab..c9251bad 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using ```sh $ appwrite -v -11.0.0 +11.1.0 ``` ### Install using prebuilt binaries @@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc Once the installation completes, you can verify your install using ``` $ appwrite -v -11.0.0 +11.1.0 ``` ## Getting Started diff --git a/install.ps1 b/install.ps1 index 9ca57c44..18f161bc 100644 --- a/install.ps1 +++ b/install.ps1 @@ -13,8 +13,8 @@ # You can use "View source" of this page to see the full script. # REPO -$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/11.0.0/appwrite-cli-win-x64.exe" -$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/11.0.0/appwrite-cli-win-arm64.exe" +$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/11.1.0/appwrite-cli-win-x64.exe" +$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/11.1.0/appwrite-cli-win-arm64.exe" $APPWRITE_BINARY_NAME = "appwrite.exe" diff --git a/install.sh b/install.sh index 25b56a5d..11f3e43d 100644 --- a/install.sh +++ b/install.sh @@ -97,7 +97,7 @@ printSuccess() { downloadBinary() { echo "[2/4] Downloading executable for $OS ($ARCH) ..." - GITHUB_LATEST_VERSION="11.0.0" + GITHUB_LATEST_VERSION="11.1.0" GITHUB_FILE="appwrite-cli-${OS}-${ARCH}" GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE" diff --git a/lib/client.js b/lib/client.js index 6f3e20b8..73a9ccb1 100644 --- a/lib/client.js +++ b/lib/client.js @@ -16,8 +16,8 @@ class Client { 'x-sdk-name': 'Command Line', 'x-sdk-platform': 'console', 'x-sdk-language': 'cli', - 'x-sdk-version': '11.0.0', - 'user-agent' : `AppwriteCLI/11.0.0 (${os.type()} ${os.version()}; ${os.arch()})`, + 'x-sdk-version': '11.1.0', + 'user-agent' : `AppwriteCLI/11.1.0 (${os.type()} ${os.version()}; ${os.arch()})`, 'X-Appwrite-Response-Format' : '1.8.0', }; } diff --git a/lib/commands/account.js b/lib/commands/account.js index 4f2100b2..315cf0a8 100644 --- a/lib/commands/account.js +++ b/lib/commands/account.js @@ -185,6 +185,7 @@ const accountUpdateEmail = async ({email,password,parseOutput = true, overrideFo /** * @typedef {Object} AccountListIdentitiesRequestParams * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -193,7 +194,7 @@ const accountUpdateEmail = async ({email,password,parseOutput = true, overrideFo /** * @param {AccountListIdentitiesRequestParams} params */ -const accountListIdentities = async ({queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const accountListIdentities = async ({queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/account/identities'; @@ -201,6 +202,9 @@ const accountListIdentities = async ({queries,parseOutput = true, overrideForCli if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -276,6 +280,7 @@ const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk /** * @typedef {Object} AccountListLogsRequestParams * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -284,7 +289,7 @@ const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk /** * @param {AccountListLogsRequestParams} params */ -const accountListLogs = async ({queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const accountListLogs = async ({queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/account/logs'; @@ -292,6 +297,9 @@ const accountListLogs = async ({queries,parseOutput = true, overrideForCli = fal if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1765,6 +1773,7 @@ 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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(accountListIdentities)) account @@ -1782,6 +1791,7 @@ 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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(accountListLogs)) account diff --git a/lib/commands/databases.js b/lib/commands/databases.js index 3fbbbe88..d1a12681 100644 --- a/lib/commands/databases.js +++ b/lib/commands/databases.js @@ -43,6 +43,7 @@ const databases = new Command("databases").description(commandDescriptions['data * @typedef {Object} DatabasesListRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const databases = new Command("databases").description(commandDescriptions['data /** * @param {DatabasesListRequestParams} params */ -const databasesList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const databasesList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/databases'; @@ -62,6 +63,9 @@ const databasesList = async ({queries,search,parseOutput = true, overrideForCli if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -467,6 +471,7 @@ const databasesDelete = async ({databaseId,parseOutput = true, overrideForCli = * @property {string} databaseId Database ID. * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -475,7 +480,7 @@ const databasesDelete = async ({databaseId,parseOutput = true, overrideForCli = /** * @param {DatabasesListCollectionsRequestParams} params */ -const databasesListCollections = async ({databaseId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const databasesListCollections = async ({databaseId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId); @@ -486,6 +491,9 @@ const databasesListCollections = async ({databaseId,queries,search,parseOutput = if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -672,6 +680,7 @@ const databasesDeleteCollection = async ({databaseId,collectionId,parseOutput = * @property {string} databaseId Database ID. * @property {string} collectionId Collection ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -680,7 +689,7 @@ const databasesDeleteCollection = async ({databaseId,collectionId,parseOutput = /** * @param {DatabasesListAttributesRequestParams} params */ -const databasesListAttributes = async ({databaseId,collectionId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const databasesListAttributes = async ({databaseId,collectionId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); @@ -688,6 +697,9 @@ const databasesListAttributes = async ({databaseId,collectionId,queries,parseOut if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2009,6 +2021,7 @@ const databasesUpdateRelationshipAttribute = async ({databaseId,collectionId,key * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @property {string[]} 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. * @property {string} transactionId Transaction ID to read uncommitted changes within the transaction. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2017,7 +2030,7 @@ const databasesUpdateRelationshipAttribute = async ({databaseId,collectionId,key /** * @param {DatabasesListDocumentsRequestParams} params */ -const databasesListDocuments = async ({databaseId,collectionId,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const databasesListDocuments = async ({databaseId,collectionId,queries,transactionId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); @@ -2028,6 +2041,9 @@ const databasesListDocuments = async ({databaseId,collectionId,queries,transacti if (typeof transactionId !== 'undefined') { payload['transactionId'] = transactionId; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2556,6 +2572,7 @@ const databasesIncrementDocumentAttribute = async ({databaseId,collectionId,docu * @property {string} databaseId Database ID. * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2564,7 +2581,7 @@ const databasesIncrementDocumentAttribute = async ({databaseId,collectionId,docu /** * @param {DatabasesListIndexesRequestParams} params */ -const databasesListIndexes = async ({databaseId,collectionId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const databasesListIndexes = async ({databaseId,collectionId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId); @@ -2572,6 +2589,9 @@ const databasesListIndexes = async ({databaseId,collectionId,queries,parseOutput if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2845,6 +2865,7 @@ databases .description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list' instead] 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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(databasesList)) @@ -2931,6 +2952,7 @@ databases .requiredOption(`--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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(databasesListCollections)) @@ -2977,6 +2999,7 @@ databases .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(databasesListAttributes)) @@ -3300,6 +3323,7 @@ databases .requiredOption(`--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 to read uncommitted changes within the transaction.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(databasesListDocuments)) @@ -3432,6 +3456,7 @@ databases .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(databasesListIndexes)) diff --git a/lib/commands/functions.js b/lib/commands/functions.js index 69ebeb88..94d72e8b 100644 --- a/lib/commands/functions.js +++ b/lib/commands/functions.js @@ -43,6 +43,7 @@ const functions = new Command("functions").description(commandDescriptions['func * @typedef {Object} FunctionsListRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const functions = new Command("functions").description(commandDescriptions['func /** * @param {FunctionsListRequestParams} params */ -const functionsList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const functionsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/functions'; @@ -62,6 +63,9 @@ const functionsList = async ({queries,search,parseOutput = true, overrideForCli if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -249,6 +253,7 @@ const functionsListSpecifications = async ({parseOutput = true, overrideForCli = * @property {string[]} useCases List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed. * @property {number} limit Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000. * @property {number} offset Offset the list of returned templates. Maximum offset is 5000. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -257,7 +262,7 @@ const functionsListSpecifications = async ({parseOutput = true, overrideForCli = /** * @param {FunctionsListTemplatesRequestParams} params */ -const functionsListTemplates = async ({runtimes,useCases,limit,offset,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const functionsListTemplates = async ({runtimes,useCases,limit,offset,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/functions/templates'; @@ -274,6 +279,9 @@ const functionsListTemplates = async ({runtimes,useCases,limit,offset,parseOutpu if (typeof offset !== 'undefined') { payload['offset'] = offset; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -563,6 +571,7 @@ const functionsUpdateFunctionDeployment = async ({functionId,deploymentId,parseO * @property {string} functionId Function ID. * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -571,7 +580,7 @@ const functionsUpdateFunctionDeployment = async ({functionId,deploymentId,parseO /** * @param {FunctionsListDeploymentsRequestParams} params */ -const functionsListDeployments = async ({functionId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const functionsListDeployments = async ({functionId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', functionId); @@ -582,6 +591,9 @@ const functionsListDeployments = async ({functionId,queries,search,parseOutput = if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1043,6 +1055,7 @@ const functionsUpdateDeploymentStatus = async ({functionId,deploymentId,parseOut * @typedef {Object} FunctionsListExecutionsRequestParams * @property {string} functionId Function ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1051,7 +1064,7 @@ const functionsUpdateDeploymentStatus = async ({functionId,deploymentId,parseOut /** * @param {FunctionsListExecutionsRequestParams} params */ -const functionsListExecutions = async ({functionId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const functionsListExecutions = async ({functionId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId); @@ -1059,6 +1072,9 @@ const functionsListExecutions = async ({functionId,queries,parseOutput = true, o if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1408,6 +1424,7 @@ functions .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(functionsList)) @@ -1452,6 +1469,7 @@ functions .option(`--use-cases [use-cases...]`, `List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.`) .option(`--limit `, `Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.`, parseInteger) .option(`--offset `, `Offset the list of returned templates. Maximum offset is 5000.`, parseInteger) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(functionsListTemplates)) @@ -1518,6 +1536,7 @@ functions .requiredOption(`--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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(functionsListDeployments)) @@ -1596,6 +1615,7 @@ functions .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.`) .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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(functionsListExecutions)) diff --git a/lib/commands/messaging.js b/lib/commands/messaging.js index 074825a3..fc4a400b 100644 --- a/lib/commands/messaging.js +++ b/lib/commands/messaging.js @@ -43,6 +43,7 @@ const messaging = new Command("messaging").description(commandDescriptions['mess * @typedef {Object} MessagingListMessagesRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const messaging = new Command("messaging").description(commandDescriptions['mess /** * @param {MessagingListMessagesRequestParams} params */ -const messagingListMessages = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const messagingListMessages = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/messages'; @@ -62,6 +63,9 @@ const messagingListMessages = async ({queries,search,parseOutput = true, overrid if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -639,6 +643,7 @@ const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = f * @typedef {Object} MessagingListMessageLogsRequestParams * @property {string} messageId Message ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -647,7 +652,7 @@ const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = f /** * @param {MessagingListMessageLogsRequestParams} params */ -const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const messagingListMessageLogs = async ({messageId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/messages/{messageId}/logs'.replace('{messageId}', messageId); @@ -655,6 +660,9 @@ const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, o if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -676,6 +684,7 @@ const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, o * @typedef {Object} MessagingListTargetsRequestParams * @property {string} messageId Message ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -684,7 +693,7 @@ const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, o /** * @param {MessagingListTargetsRequestParams} params */ -const messagingListTargets = async ({messageId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingListTargets = async ({messageId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/messages/{messageId}/targets'.replace('{messageId}', messageId); @@ -692,6 +701,9 @@ const messagingListTargets = async ({messageId,queries,parseOutput = true, overr if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -709,6 +721,7 @@ const messagingListTargets = async ({messageId,queries,parseOutput = true, overr * @typedef {Object} MessagingListProvidersRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -717,7 +730,7 @@ const messagingListTargets = async ({messageId,queries,parseOutput = true, overr /** * @param {MessagingListProvidersRequestParams} params */ -const messagingListProviders = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const messagingListProviders = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/providers'; @@ -728,6 +741,9 @@ const messagingListProviders = async ({queries,search,parseOutput = true, overri if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2073,6 +2089,7 @@ const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideF * @typedef {Object} MessagingListProviderLogsRequestParams * @property {string} providerId Provider ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2081,7 +2098,7 @@ const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideF /** * @param {MessagingListProviderLogsRequestParams} params */ -const messagingListProviderLogs = async ({providerId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingListProviderLogs = async ({providerId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/providers/{providerId}/logs'.replace('{providerId}', providerId); @@ -2089,6 +2106,9 @@ const messagingListProviderLogs = async ({providerId,queries,parseOutput = true, if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2106,6 +2126,7 @@ const messagingListProviderLogs = async ({providerId,queries,parseOutput = true, * @typedef {Object} MessagingListSubscriberLogsRequestParams * @property {string} subscriberId Subscriber ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2114,7 +2135,7 @@ const messagingListProviderLogs = async ({providerId,queries,parseOutput = true, /** * @param {MessagingListSubscriberLogsRequestParams} params */ -const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingListSubscriberLogs = async ({subscriberId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/subscribers/{subscriberId}/logs'.replace('{subscriberId}', subscriberId); @@ -2122,6 +2143,9 @@ const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = t if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2139,6 +2163,7 @@ const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = t * @typedef {Object} MessagingListTopicsRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2147,7 +2172,7 @@ const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = t /** * @param {MessagingListTopicsRequestParams} params */ -const messagingListTopics = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const messagingListTopics = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/topics'; @@ -2158,6 +2183,9 @@ const messagingListTopics = async ({queries,search,parseOutput = true, overrideF if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2323,6 +2351,7 @@ const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli * @typedef {Object} MessagingListTopicLogsRequestParams * @property {string} topicId Topic ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2331,7 +2360,7 @@ const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli /** * @param {MessagingListTopicLogsRequestParams} params */ -const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const messagingListTopicLogs = async ({topicId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/topics/{topicId}/logs'.replace('{topicId}', topicId); @@ -2339,6 +2368,9 @@ const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overr if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2357,6 +2389,7 @@ const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overr * @property {string} topicId Topic ID. The topic ID subscribed to. * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2365,7 +2398,7 @@ const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overr /** * @param {MessagingListSubscribersRequestParams} params */ -const messagingListSubscribers = async ({topicId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const messagingListSubscribers = async ({topicId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId); @@ -2376,6 +2409,9 @@ const messagingListSubscribers = async ({topicId,queries,search,parseOutput = tr if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2497,6 +2533,7 @@ messaging .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(messagingListMessages)) @@ -2624,6 +2661,7 @@ messaging .description(`Get the message activity logs listed by its unique ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(messagingListMessageLogs)) @@ -2632,6 +2670,7 @@ messaging .description(`Get a list of the targets associated with a message.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingListTargets)) messaging @@ -2639,6 +2678,7 @@ messaging .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(messagingListProviders)) @@ -2934,6 +2974,7 @@ messaging .description(`Get the provider activity logs listed by its unique ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingListProviderLogs)) messaging @@ -2941,6 +2982,7 @@ messaging .description(`Get the subscriber activity logs listed by its unique ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingListSubscriberLogs)) messaging @@ -2948,6 +2990,7 @@ messaging .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(messagingListTopics)) @@ -2985,6 +3028,7 @@ messaging .description(`Get the topic activity logs listed by its unique ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(messagingListTopicLogs)) messaging @@ -2993,6 +3037,7 @@ messaging .requiredOption(`--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: name, provider, type, enabled`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(messagingListSubscribers)) diff --git a/lib/commands/migrations.js b/lib/commands/migrations.js index e3d34829..9fba9f4d 100644 --- a/lib/commands/migrations.js +++ b/lib/commands/migrations.js @@ -43,6 +43,7 @@ const migrations = new Command("migrations").description(commandDescriptions['mi * @typedef {Object} MigrationsListRequestParams * @property {string[]} 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, statusCounters, resourceData, errors * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const migrations = new Command("migrations").description(commandDescriptions['mi /** * @param {MigrationsListRequestParams} params */ -const migrationsList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const migrationsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/migrations'; @@ -62,6 +63,9 @@ const migrationsList = async ({queries,search,parseOutput = true, overrideForCli if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -685,6 +689,7 @@ migrations .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, statusCounters, resourceData, errors`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(migrationsList)) migrations diff --git a/lib/commands/projects.js b/lib/commands/projects.js index 3ffc20a0..1af1213b 100644 --- a/lib/commands/projects.js +++ b/lib/commands/projects.js @@ -43,6 +43,7 @@ const projects = new Command("projects").description(commandDescriptions['projec * @typedef {Object} ProjectsListRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const projects = new Command("projects").description(commandDescriptions['projec /** * @param {ProjectsListRequestParams} params */ -const projectsList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const projectsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForConsole() : sdk; let apiPath = '/projects'; @@ -62,6 +63,9 @@ const projectsList = async ({queries,search,parseOutput = true, overrideForCli = if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -970,6 +974,7 @@ const projectsCreateJWT = async ({projectId,scopes,duration,parseOutput = true, /** * @typedef {Object} ProjectsListKeysRequestParams * @property {string} projectId Project unique ID. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -978,11 +983,14 @@ const projectsCreateJWT = async ({projectId,scopes,duration,parseOutput = true, /** * @param {ProjectsListKeysRequestParams} params */ -const projectsListKeys = async ({projectId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const projectsListKeys = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForConsole() : sdk; let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId); let payload = {}; + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1201,6 +1209,7 @@ const projectsUpdateOAuth2 = async ({projectId,provider,appId,secret,enabled,par /** * @typedef {Object} ProjectsListPlatformsRequestParams * @property {string} projectId Project unique ID. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1209,11 +1218,14 @@ const projectsUpdateOAuth2 = async ({projectId,provider,appId,secret,enabled,par /** * @param {ProjectsListPlatformsRequestParams} params */ -const projectsListPlatforms = async ({projectId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const projectsListPlatforms = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForConsole() : sdk; let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId); let payload = {}; + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1849,6 +1861,7 @@ const projectsDeleteSMSTemplate = async ({projectId,type,locale,parseOutput = tr /** * @typedef {Object} ProjectsListWebhooksRequestParams * @property {string} projectId Project unique ID. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1857,11 +1870,14 @@ const projectsDeleteSMSTemplate = async ({projectId,type,locale,parseOutput = tr /** * @param {ProjectsListWebhooksRequestParams} params */ -const projectsListWebhooks = async ({projectId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const projectsListWebhooks = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForConsole() : sdk; let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId); let payload = {}; + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2099,6 +2115,7 @@ projects .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`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(projectsList)) @@ -2296,6 +2313,7 @@ projects .command(`list-keys`) .description(`Get a list of all API keys from the current project. `) .requiredOption(`--project-id `, `Project unique ID.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(projectsListKeys)) @@ -2347,6 +2365,7 @@ projects .command(`list-platforms`) .description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `) .requiredOption(`--project-id `, `Project unique ID.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(projectsListPlatforms)) @@ -2497,6 +2516,7 @@ projects .command(`list-webhooks`) .description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `) .requiredOption(`--project-id `, `Project unique ID.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(projectsListWebhooks)) diff --git a/lib/commands/proxy.js b/lib/commands/proxy.js index c8339c91..dd864ffc 100644 --- a/lib/commands/proxy.js +++ b/lib/commands/proxy.js @@ -43,6 +43,7 @@ const proxy = new Command("proxy").description(commandDescriptions['proxy'] ?? ' * @typedef {Object} ProxyListRulesRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const proxy = new Command("proxy").description(commandDescriptions['proxy'] ?? ' /** * @param {ProxyListRulesRequestParams} params */ -const proxyListRules = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const proxyListRules = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/proxy/rules'; @@ -62,6 +63,9 @@ const proxyListRules = async ({queries,search,parseOutput = true, overrideForCli if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -333,6 +337,7 @@ proxy .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(proxyListRules)) proxy diff --git a/lib/commands/sites.js b/lib/commands/sites.js index 991c5134..464e44a6 100644 --- a/lib/commands/sites.js +++ b/lib/commands/sites.js @@ -43,6 +43,7 @@ const sites = new Command("sites").description(commandDescriptions['sites'] ?? ' * @typedef {Object} SitesListRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const sites = new Command("sites").description(commandDescriptions['sites'] ?? ' /** * @param {SitesListRequestParams} params */ -const sitesList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const sitesList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/sites'; @@ -62,6 +63,9 @@ const sitesList = async ({queries,search,parseOutput = true, overrideForCli = fa if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -561,6 +565,7 @@ const sitesUpdateSiteDeployment = async ({siteId,deploymentId,parseOutput = true * @property {string} siteId Site ID. * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -569,7 +574,7 @@ const sitesUpdateSiteDeployment = async ({siteId,deploymentId,parseOutput = true /** * @param {SitesListDeploymentsRequestParams} params */ -const sitesListDeployments = async ({siteId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const sitesListDeployments = async ({siteId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId); @@ -580,6 +585,9 @@ const sitesListDeployments = async ({siteId,queries,search,parseOutput = true, o if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1041,6 +1049,7 @@ const sitesUpdateDeploymentStatus = async ({siteId,deploymentId,parseOutput = tr * @typedef {Object} SitesListLogsRequestParams * @property {string} siteId Site ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1049,7 +1058,7 @@ const sitesUpdateDeploymentStatus = async ({siteId,deploymentId,parseOutput = tr /** * @param {SitesListLogsRequestParams} params */ -const sitesListLogs = async ({siteId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const sitesListLogs = async ({siteId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/sites/{siteId}/logs'.replace('{siteId}', siteId); @@ -1057,6 +1066,9 @@ const sitesListLogs = async ({siteId,queries,parseOutput = true, overrideForCli if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1348,6 +1360,7 @@ sites .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(sitesList)) @@ -1459,6 +1472,7 @@ sites .requiredOption(`--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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(sitesListDeployments)) @@ -1537,6 +1551,7 @@ sites .description(`Get a list of all site logs. You can use the query params to filter your results.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(sitesListLogs)) sites diff --git a/lib/commands/storage.js b/lib/commands/storage.js index 46c93aa4..19e6ed1a 100644 --- a/lib/commands/storage.js +++ b/lib/commands/storage.js @@ -43,6 +43,7 @@ const storage = new Command("storage").description(commandDescriptions['storage' * @typedef {Object} StorageListBucketsRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const storage = new Command("storage").description(commandDescriptions['storage' /** * @param {StorageListBucketsRequestParams} params */ -const storageListBuckets = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const storageListBuckets = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/storage/buckets'; @@ -62,6 +63,9 @@ const storageListBuckets = async ({queries,search,parseOutput = true, overrideFo if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -286,6 +290,7 @@ const storageDeleteBucket = async ({bucketId,parseOutput = true, overrideForCli * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -294,7 +299,7 @@ const storageDeleteBucket = async ({bucketId,parseOutput = true, overrideForCli /** * @param {StorageListFilesRequestParams} params */ -const storageListFiles = async ({bucketId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const storageListFiles = async ({bucketId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId); @@ -305,6 +310,9 @@ const storageListFiles = async ({bucketId,queries,search,parseOutput = true, ove if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -815,6 +823,7 @@ storage .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`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(storageListBuckets)) @@ -867,6 +876,7 @@ storage .requiredOption(`--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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(storageListFiles)) diff --git a/lib/commands/tables-db.js b/lib/commands/tables-db.js index 5ddf7096..b3770455 100644 --- a/lib/commands/tables-db.js +++ b/lib/commands/tables-db.js @@ -43,6 +43,7 @@ const tablesDB = new Command("tables-db").description(commandDescriptions['table * @typedef {Object} TablesDBListRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const tablesDB = new Command("tables-db").description(commandDescriptions['table /** * @param {TablesDBListRequestParams} params */ -const tablesDBList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb'; @@ -62,6 +63,9 @@ const tablesDBList = async ({queries,search,parseOutput = true, overrideForCli = if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -467,6 +471,7 @@ const tablesDBDelete = async ({databaseId,parseOutput = true, overrideForCli = f * @property {string} databaseId Database ID. * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -475,7 +480,7 @@ const tablesDBDelete = async ({databaseId,parseOutput = true, overrideForCli = f /** * @param {TablesDBListTablesRequestParams} params */ -const tablesDBListTables = async ({databaseId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListTables = async ({databaseId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables'.replace('{databaseId}', databaseId); @@ -486,6 +491,9 @@ const tablesDBListTables = async ({databaseId,queries,search,parseOutput = true, if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -672,6 +680,7 @@ const tablesDBDeleteTable = async ({databaseId,tableId,parseOutput = true, overr * @property {string} databaseId Database ID. * @property {string} tableId Table ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -680,7 +689,7 @@ const tablesDBDeleteTable = async ({databaseId,tableId,parseOutput = true, overr /** * @param {TablesDBListColumnsRequestParams} params */ -const tablesDBListColumns = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListColumns = async ({databaseId,tableId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -688,6 +697,9 @@ const tablesDBListColumns = async ({databaseId,tableId,queries,parseOutput = tru if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2012,6 +2024,7 @@ const tablesDBUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete * @property {string} databaseId Database ID. * @property {string} tableId Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2020,7 +2033,7 @@ const tablesDBUpdateRelationshipColumn = async ({databaseId,tableId,key,onDelete /** * @param {TablesDBListIndexesRequestParams} params */ -const tablesDBListIndexes = async ({databaseId,tableId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListIndexes = async ({databaseId,tableId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -2028,6 +2041,9 @@ const tablesDBListIndexes = async ({databaseId,tableId,queries,parseOutput = tru if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2206,6 +2222,7 @@ const tablesDBListTableLogs = async ({databaseId,tableId,queries,parseOutput = t * @property {string} tableId Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). * @property {string[]} 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. * @property {string} transactionId Transaction ID to read uncommitted changes within the transaction. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -2214,7 +2231,7 @@ const tablesDBListTableLogs = async ({databaseId,tableId,queries,parseOutput = t /** * @param {TablesDBListRowsRequestParams} params */ -const tablesDBListRows = async ({databaseId,tableId,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tablesDBListRows = async ({databaseId,tableId,queries,transactionId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows'.replace('{databaseId}', databaseId).replace('{tableId}', tableId); @@ -2225,6 +2242,9 @@ const tablesDBListRows = async ({databaseId,tableId,queries,transactionId,parseO if (typeof transactionId !== 'undefined') { payload['transactionId'] = transactionId; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -2828,6 +2848,7 @@ tablesDB .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesDBList)) @@ -2914,6 +2935,7 @@ tablesDB .requiredOption(`--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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesDBListTables)) @@ -2960,6 +2982,7 @@ tablesDB .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesDBListColumns)) @@ -3283,6 +3306,7 @@ tablesDB .requiredOption(`--database-id `, `Database ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesDBListIndexes)) @@ -3330,6 +3354,7 @@ tablesDB .requiredOption(`--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 to read uncommitted changes within the transaction.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(tablesDBListRows)) diff --git a/lib/commands/teams.js b/lib/commands/teams.js index 7d500ab1..9e3e3851 100644 --- a/lib/commands/teams.js +++ b/lib/commands/teams.js @@ -43,6 +43,7 @@ const teams = new Command("teams").description(commandDescriptions['teams'] ?? ' * @typedef {Object} TeamsListRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const teams = new Command("teams").description(commandDescriptions['teams'] ?? ' /** * @param {TeamsListRequestParams} params */ -const teamsList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const teamsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/teams'; @@ -62,6 +63,9 @@ const teamsList = async ({queries,search,parseOutput = true, overrideForCli = fa if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -222,6 +226,7 @@ const teamsDelete = async ({teamId,parseOutput = true, overrideForCli = false, s * @typedef {Object} TeamsListLogsRequestParams * @property {string} teamId Team ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -230,7 +235,7 @@ const teamsDelete = async ({teamId,parseOutput = true, overrideForCli = false, s /** * @param {TeamsListLogsRequestParams} params */ -const teamsListLogs = async ({teamId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const teamsListLogs = async ({teamId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/teams/{teamId}/logs'.replace('{teamId}', teamId); @@ -238,6 +243,9 @@ const teamsListLogs = async ({teamId,queries,parseOutput = true, overrideForCli if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -256,6 +264,7 @@ const teamsListLogs = async ({teamId,queries,parseOutput = true, overrideForCli * @property {string} teamId Team ID. * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -264,7 +273,7 @@ const teamsListLogs = async ({teamId,queries,parseOutput = true, overrideForCli /** * @param {TeamsListMembershipsRequestParams} params */ -const teamsListMemberships = async ({teamId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const teamsListMemberships = async ({teamId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId); @@ -275,6 +284,9 @@ const teamsListMemberships = async ({teamId,queries,search,parseOutput = true, o if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -547,6 +559,7 @@ teams .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(teamsList)) @@ -583,6 +596,7 @@ teams .description(`Get the team activity logs list by its unique ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(teamsListLogs)) teams @@ -591,6 +605,7 @@ teams .requiredOption(`--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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(teamsListMemberships)) teams diff --git a/lib/commands/tokens.js b/lib/commands/tokens.js index 5449327a..fa681a92 100644 --- a/lib/commands/tokens.js +++ b/lib/commands/tokens.js @@ -44,6 +44,7 @@ const tokens = new Command("tokens").description(commandDescriptions['tokens'] ? * @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). * @property {string} fileId File unique ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -52,7 +53,7 @@ const tokens = new Command("tokens").description(commandDescriptions['tokens'] ? /** * @param {TokensListRequestParams} params */ -const tokensList = async ({bucketId,fileId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const tokensList = async ({bucketId,fileId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId); @@ -60,6 +61,9 @@ const tokensList = async ({bucketId,fileId,queries,parseOutput = true, overrideF if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -215,6 +219,7 @@ tokens .requiredOption(`--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 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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(tokensList)) diff --git a/lib/commands/users.js b/lib/commands/users.js index 6fddf9fd..e28f6806 100644 --- a/lib/commands/users.js +++ b/lib/commands/users.js @@ -43,6 +43,7 @@ const users = new Command("users").description(commandDescriptions['users'] ?? ' * @typedef {Object} UsersListRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -51,7 +52,7 @@ const users = new Command("users").description(commandDescriptions['users'] ?? ' /** * @param {UsersListRequestParams} params */ -const usersList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const usersList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/users'; @@ -62,6 +63,9 @@ const usersList = async ({queries,search,parseOutput = true, overrideForCli = fa if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -222,6 +226,7 @@ const usersCreateBcryptUser = async ({userId,email,password,name,parseOutput = t * @typedef {Object} UsersListIdentitiesRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -230,7 +235,7 @@ const usersCreateBcryptUser = async ({userId,email,password,name,parseOutput = t /** * @param {UsersListIdentitiesRequestParams} params */ -const usersListIdentities = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const usersListIdentities = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/users/identities'; @@ -241,6 +246,9 @@ const usersListIdentities = async ({queries,search,parseOutput = true, overrideF if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -751,6 +759,7 @@ const usersUpdateLabels = async ({userId,labels,parseOutput = true, overrideForC * @typedef {Object} UsersListLogsRequestParams * @property {string} userId User ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -759,7 +768,7 @@ const usersUpdateLabels = async ({userId,labels,parseOutput = true, overrideForC /** * @param {UsersListLogsRequestParams} params */ -const usersListLogs = async ({userId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const usersListLogs = async ({userId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/users/{userId}/logs'.replace('{userId}', userId); @@ -767,6 +776,9 @@ const usersListLogs = async ({userId,queries,parseOutput = true, overrideForCli if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -785,6 +797,7 @@ const usersListLogs = async ({userId,queries,parseOutput = true, overrideForCli * @property {string} userId User ID. * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -793,7 +806,7 @@ const usersListLogs = async ({userId,queries,parseOutput = true, overrideForCli /** * @param {UsersListMembershipsRequestParams} params */ -const usersListMemberships = async ({userId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const usersListMemberships = async ({userId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/users/{userId}/memberships'.replace('{userId}', userId); @@ -804,6 +817,9 @@ const usersListMemberships = async ({userId,queries,search,parseOutput = true, o if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1168,6 +1184,7 @@ const usersUpdatePrefs = async ({userId,prefs,parseOutput = true, overrideForCli /** * @typedef {Object} UsersListSessionsRequestParams * @property {string} userId User ID. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1176,11 +1193,14 @@ const usersUpdatePrefs = async ({userId,prefs,parseOutput = true, overrideForCli /** * @param {UsersListSessionsRequestParams} params */ -const usersListSessions = async ({userId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { +const usersListSessions = async ({userId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/users/{userId}/sessions'.replace('{userId}', userId); let payload = {}; + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1327,6 +1347,7 @@ const usersUpdateStatus = async ({userId,status,parseOutput = true, overrideForC * @typedef {Object} UsersListTargetsRequestParams * @property {string} userId User ID. * @property {string[]} 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 + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -1335,7 +1356,7 @@ const usersUpdateStatus = async ({userId,status,parseOutput = true, overrideForC /** * @param {UsersListTargetsRequestParams} params */ -const usersListTargets = async ({userId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const usersListTargets = async ({userId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/users/{userId}/targets'.replace('{userId}', userId); @@ -1343,6 +1364,9 @@ const usersListTargets = async ({userId,queries,parseOutput = true, overrideForC if (typeof queries !== 'undefined') { payload['queries'] = queries; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -1621,6 +1645,7 @@ users .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`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(usersList)) @@ -1657,6 +1682,7 @@ users .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(usersListIdentities)) users @@ -1765,6 +1791,7 @@ users .description(`Get the user activity logs list by its unique ID.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(usersListLogs)) users @@ -1773,6 +1800,7 @@ users .requiredOption(`--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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(usersListMemberships)) users @@ -1851,6 +1879,7 @@ users .command(`list-sessions`) .description(`Get the user sessions list by its unique ID.`) .requiredOption(`--user-id `, `User ID.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .option(`--console`, `Get the resource console url`) .action(actionRunner(usersListSessions)) @@ -1885,6 +1914,7 @@ users .description(`List the messaging targets that are associated with a user.`) .requiredOption(`--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(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(usersListTargets)) users diff --git a/lib/commands/vcs.js b/lib/commands/vcs.js index b3aea2c1..a29cb403 100644 --- a/lib/commands/vcs.js +++ b/lib/commands/vcs.js @@ -293,6 +293,7 @@ const vcsUpdateExternalDeployments = async ({installationId,repositoryId,provide * @typedef {Object} VcsListInstallationsRequestParams * @property {string[]} 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 * @property {string} search Search term to filter your list results. Max length: 256 chars. + * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -301,7 +302,7 @@ const vcsUpdateExternalDeployments = async ({installationId,repositoryId,provide /** * @param {VcsListInstallationsRequestParams} params */ -const vcsListInstallations = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const vcsListInstallations = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/vcs/installations'; @@ -312,6 +313,9 @@ const vcsListInstallations = async ({queries,search,parseOutput = true, override if (typeof search !== 'undefined') { payload['search'] = search; } + if (typeof total !== 'undefined') { + payload['total'] = total; + } let response = undefined; @@ -445,6 +449,7 @@ vcs .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. `) .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 term to filter your list results. Max length: 256 chars.`) + .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value)) .action(actionRunner(vcsListInstallations)) vcs diff --git a/lib/parser.js b/lib/parser.js index 8f229b7b..86ecece1 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -122,7 +122,7 @@ const parseError = (err) => { } catch { } - const version = '11.0.0'; + const version = '11.1.0'; const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``; const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud()}`; diff --git a/package.json b/package.json index de6124ec..48abc56f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "appwrite-cli", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "11.0.0", + "version": "11.1.0", "license": "BSD-3-Clause", "main": "index.js", "bin": { diff --git a/scoop/appwrite.config.json b/scoop/appwrite.config.json index b79edc46..5a748508 100644 --- a/scoop/appwrite.config.json +++ b/scoop/appwrite.config.json @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json", - "version": "11.0.0", + "version": "11.1.0", "description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.", "homepage": "https://github.com/appwrite/sdk-for-cli", "license": "BSD-3-Clause", "architecture": { "64bit": { - "url": "https://github.com/appwrite/sdk-for-cli/releases/download/11.0.0/appwrite-cli-win-x64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/11.1.0/appwrite-cli-win-x64.exe", "bin": [ [ "appwrite-cli-win-x64.exe", @@ -15,7 +15,7 @@ ] }, "arm64": { - "url": "https://github.com/appwrite/sdk-for-cli/releases/download/11.0.0/appwrite-cli-win-arm64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/11.1.0/appwrite-cli-win-arm64.exe", "bin": [ [ "appwrite-cli-win-arm64.exe",