{"_id":"@doralhw-org/zoho-coql-query-builder","_rev":"6-b8e47f631aec6c110918153f85ca52e2","name":"@doralhw-org/zoho-coql-query-builder","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@doralhw-org/zoho-coql-query-builder","version":"0.1.0","keywords":["zoho","crm","coql","query-builder","typescript","zoho-crm","query","builder"],"author":{"name":"doralhw-org"},"license":"MIT","_id":"@doralhw-org/zoho-coql-query-builder@0.1.0","maintainers":[{"name":"ahernandez-doralhw","email":"arturo.hernandez.work@gmail.com"}],"homepage":"https://github.com/doralhw-org/zoho-coql-query-builder#readme","bugs":{"url":"https://github.com/doralhw-org/zoho-coql-query-builder/issues"},"dist":{"shasum":"52a578b52c3e0b5b8c6580f60dd980303033c832","tarball":"https://registry.npmjs.org/@doralhw-org/zoho-coql-query-builder/-/zoho-coql-query-builder-0.1.0.tgz","fileCount":79,"integrity":"sha512-JokWUzfV64YQC/eFEVmPCP6RQXgq+zRfjuOlwc4C7wmU6DoroaIE0yYwxh8l42kP/0BZ23xZfvH88rPbDpT5Lw==","signatures":[{"sig":"MEQCID9Q2w5jWLZXo9I0XuudC+v1gjPzI4lHLiysvC7h1nCwAiBT1qiewBJRX1THPgBCdOH0UF3++9BMtxCC5r6l9ra80w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73290},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"0015846c2a608423bbe8ecc615b14893a11c8360","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"pnpm run clean && tsc -p tsconfig.build.json","clean":"rimraf dist","prepack":"pnpm run build","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build && pnpm test"},"_npmUser":{"name":"ahernandez-doralhw","email":"arturo.hernandez.work@gmail.com"},"repository":{"url":"git+https://github.com/doralhw-org/zoho-coql-query-builder.git","type":"git"},"_npmVersion":"9.5.1","description":"A lightweight query builder for Zoho CRM that abstracts the COQL queries and provides a fluent API for building them.","directories":{},"_nodeVersion":"18.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.0.5","eslint":"^9.32.0","rimraf":"^6.0.1","globals":"^16.3.0","ts-jest":"^29.4.0","@eslint/js":"^9.32.0","typescript":"^5.8.3","@types/jest":"^30.0.0 ","@types/node":"^24.1.0","typescript-eslint":"^8.38.0","@typescript-eslint/parser":"^8.38.0","@typescript-eslint/eslint-plugin":"^8.38.0"},"_npmOperationalInternal":{"tmp":"tmp/zoho-coql-query-builder_0.1.0_1753713684564_0.7443471766124561","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @doralhw-org/coql-query-builder. Please update your dependencies to use the new package name."},"0.1.1":{"name":"@doralhw-org/zoho-coql-query-builder","version":"0.1.1","keywords":["zoho","crm","coql","query-builder","typescript","zoho-crm","query","builder"],"author":{"name":"doralhw-org"},"license":"MIT","_id":"@doralhw-org/zoho-coql-query-builder@0.1.1","maintainers":[{"name":"ahernandez-doralhw","email":"arturo.hernandez.work@gmail.com"},{"name":"jverges-doral","email":"jverges@doralhw.org"}],"homepage":"https://github.com/doralhw-org/zoho-coql-query-builder#readme","bugs":{"url":"https://github.com/doralhw-org/zoho-coql-query-builder/issues"},"dist":{"shasum":"b9368dd8e67e92e411f41857884a8a7bfb26fbae","tarball":"https://registry.npmjs.org/@doralhw-org/zoho-coql-query-builder/-/zoho-coql-query-builder-0.1.1.tgz","fileCount":79,"integrity":"sha512-qVLW9DKEXI90kb4xJKJ7USKrLu1dWAK2iopqVY4xIQRzuPbEgH9LbUah2TWN9nmUl8e0t6gRpe4brIPukiCLoA==","signatures":[{"sig":"MEYCIQDoPWdBxB0CAm9yw7egB8LkGx2UBeeK6QmSRkLHJhiPPgIhAPZGEMnFDfsvD111LNN6LlJA2daN5LhzpZAqexL73y2T","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73406},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"abf8d5ebe3d8a6851c83b37f15dd6ab539c99c14","scripts":{"lint":"eslint lib --ext .ts","test":"jest","build":"pnpm run clean && tsc -p tsconfig.build.json","clean":"rimraf dist","prepack":"pnpm run build","lint:fix":"eslint lib --ext .ts --fix","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build && pnpm test"},"_npmUser":{"name":"ahernandez-doralhw","email":"arturo.hernandez.work@gmail.com"},"repository":{"url":"git+https://github.com/doralhw-org/zoho-coql-query-builder.git","type":"git"},"_npmVersion":"9.5.1","description":"A lightweight query builder for Zoho CRM that abstracts the COQL queries and provides a fluent API for building them.","directories":{},"_nodeVersion":"18.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.0.5","eslint":"^9.32.0","rimraf":"^6.0.1","globals":"^16.3.0","ts-jest":"^29.4.0","@eslint/js":"^9.32.0","typescript":"^5.8.3","@types/jest":"^30.0.0 ","@types/node":"^24.1.0","typescript-eslint":"^8.38.0","@typescript-eslint/parser":"^8.38.0","@typescript-eslint/eslint-plugin":"^8.38.0"},"_npmOperationalInternal":{"tmp":"tmp/zoho-coql-query-builder_0.1.1_1754421022929_0.35355020829807415","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @doralhw-org/coql-query-builder. Please update your dependencies to use the new package name."},"0.2.0":{"name":"@doralhw-org/zoho-coql-query-builder","version":"0.2.0","keywords":["zoho","crm","coql","query-builder","typescript","zoho-crm","query","builder"],"author":{"name":"doralhw-org"},"license":"MIT","_id":"@doralhw-org/zoho-coql-query-builder@0.2.0","maintainers":[{"name":"ahernandez-doralhw","email":"arturo.hernandez.work@gmail.com"},{"name":"jverges-doral","email":"jverges@doralhw.org"}],"homepage":"https://github.com/doralhw-org/zoho-coql-query-builder#readme","bugs":{"url":"https://github.com/doralhw-org/zoho-coql-query-builder/issues"},"dist":{"shasum":"7b26d03c840a5e628d46bce4874e1551e84a3616","tarball":"https://registry.npmjs.org/@doralhw-org/zoho-coql-query-builder/-/zoho-coql-query-builder-0.2.0.tgz","fileCount":87,"integrity":"sha512-hfyBXF43GuPYW+xYSDk4grU8qDCtf4lBKV5FS4mlgrrpMlcPGcPdkuIPvfq0fCoYeqCb5XXgWz4gXLtEhH2PHQ==","signatures":[{"sig":"MEYCIQDIale3DsmvlWP471rF443fR921+VRco4kSgplWsKHpjQIhAPuRfZJHQdbTA/gxS0LMpJAn031rx2AVY66QHZ8dfwq7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78597},"main":"dist/index.js","_from":"file:doralhw-org-zoho-coql-query-builder-0.2.0.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"eslint lib --ext .ts","test":"jest","build":"pnpm run clean && tsc -p tsconfig.build.json","clean":"rimraf dist","lint:fix":"eslint lib --ext .ts --fix","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"ahernandez-doralhw","email":"arturo.hernandez.work@gmail.com"},"_resolved":"/tmp/42681fac58cf0a66ac3e1d6bfccc798d/doralhw-org-zoho-coql-query-builder-0.2.0.tgz","_integrity":"sha512-hfyBXF43GuPYW+xYSDk4grU8qDCtf4lBKV5FS4mlgrrpMlcPGcPdkuIPvfq0fCoYeqCb5XXgWz4gXLtEhH2PHQ==","repository":{"url":"git+https://github.com/doralhw-org/zoho-coql-query-builder.git","type":"git"},"_npmVersion":"9.5.1","description":"A lightweight query builder for Zoho CRM that abstracts the COQL queries and provides a fluent API for building them.","directories":{},"_nodeVersion":"18.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.0.5","eslint":"^9.32.0","rimraf":"^6.0.1","globals":"^16.3.0","ts-jest":"^29.4.0","@eslint/js":"^9.32.0","typescript":"^5.8.3","@types/jest":"^30.0.0 ","@types/node":"^24.1.0","typescript-eslint":"^8.38.0","@typescript-eslint/parser":"^8.38.0","@typescript-eslint/eslint-plugin":"^8.38.0"},"_npmOperationalInternal":{"tmp":"tmp/zoho-coql-query-builder_0.2.0_1754517307015_0.6938456501554562","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @doralhw-org/coql-query-builder. Please update your dependencies to use the new package name."},"0.2.1":{"name":"@doralhw-org/zoho-coql-query-builder","version":"0.2.1","keywords":["zoho","crm","coql","query-builder","typescript","zoho-crm","query","builder"],"author":{"name":"doralhw-org"},"license":"MIT","_id":"@doralhw-org/zoho-coql-query-builder@0.2.1","maintainers":[{"name":"ahernandez-doralhw","email":"arturo.hernandez.work@gmail.com"},{"name":"jverges-doral","email":"jverges@doralhw.org"}],"homepage":"https://github.com/doralhw-org/zoho-coql-query-builder#readme","bugs":{"url":"https://github.com/doralhw-org/zoho-coql-query-builder/issues"},"dist":{"shasum":"b3289f34db0c12f5a20ff458ba3295af9724864b","tarball":"https://registry.npmjs.org/@doralhw-org/zoho-coql-query-builder/-/zoho-coql-query-builder-0.2.1.tgz","fileCount":87,"integrity":"sha512-LE411HsuIfm5YMkrCZM0UaxHnDFcNGr/wfBoOkt7LGBwYQHOA2evMLHLBgOT+VMVMRi77BT4eTxRKo8LNznF+A==","signatures":[{"sig":"MEQCIBH3hZPHFHxeZcdFvOcvuxAt08IxzRqH84z+CV32gvyHAiAuoitL3kwFsXm0mSzMTLiW5B0C9ePQM6YjiVrSw9WyuQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78587},"main":"dist/index.js","_from":"file:doralhw-org-zoho-coql-query-builder-0.2.1.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"eslint lib --ext .ts","test":"jest","build":"pnpm run clean && tsc -p tsconfig.build.json","clean":"rimraf dist","lint:fix":"eslint lib --ext .ts --fix","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"ahernandez-doralhw","email":"arturo.hernandez.work@gmail.com"},"_resolved":"/tmp/bb06788f4ab0c23309061b1119f049ed/doralhw-org-zoho-coql-query-builder-0.2.1.tgz","_integrity":"sha512-LE411HsuIfm5YMkrCZM0UaxHnDFcNGr/wfBoOkt7LGBwYQHOA2evMLHLBgOT+VMVMRi77BT4eTxRKo8LNznF+A==","repository":{"url":"git+https://github.com/doralhw-org/zoho-coql-query-builder.git","type":"git"},"_npmVersion":"9.5.1","description":"A lightweight query builder for Zoho CRM that abstracts the COQL queries and provides a fluent API for building them.","directories":{},"_nodeVersion":"18.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.0.5","eslint":"^9.32.0","rimraf":"^6.0.1","globals":"^16.3.0","ts-jest":"^29.4.0","@eslint/js":"^9.32.0","typescript":"^5.8.3","@types/jest":"^30.0.0 ","@types/node":"^24.1.0","typescript-eslint":"^8.38.0","@typescript-eslint/parser":"^8.38.0","@typescript-eslint/eslint-plugin":"^8.38.0"},"_npmOperationalInternal":{"tmp":"tmp/zoho-coql-query-builder_0.2.1_1754595099044_0.6424113073316675","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @doralhw-org/coql-query-builder. Please update your dependencies to use the new package name."}},"time":{"created":"2025-07-28T14:41:24.450Z","modified":"2025-08-11T21:26:33.998Z","0.1.0":"2025-07-28T14:41:24.742Z","0.1.1":"2025-08-05T19:10:23.160Z","0.2.0":"2025-08-06T21:55:07.189Z","0.2.1":"2025-08-07T19:31:39.228Z"},"bugs":{"url":"https://github.com/doralhw-org/zoho-coql-query-builder/issues"},"author":{"name":"doralhw-org"},"license":"MIT","homepage":"https://github.com/doralhw-org/zoho-coql-query-builder#readme","keywords":["zoho","crm","coql","query-builder","typescript","zoho-crm","query","builder"],"repository":{"url":"git+https://github.com/doralhw-org/zoho-coql-query-builder.git","type":"git"},"description":"A lightweight query builder for Zoho CRM that abstracts the COQL queries and provides a fluent API for building them.","maintainers":[{"name":"ahernandez-doralhw","email":"arturo.hernandez.work@gmail.com"},{"name":"jverges-doral","email":"jverges@doralhw.org"}],"readme":"# Zoho COQL Query Builder\n\nA lightweight query builder for Zoho CRM that abstracts the COQL queries and provides a fluent API for building them.\n\n## Installation\n\n```bash\nnpm install @doralhw-org/zoho-coql-query-builder\n```\n\n## Usage\n\nYou'll need to create a object of the query builder and pass it a function that can fetch the data with the provided query.\nThis function must return the data in the same format as the Zoho CRM API response.\n\n```ts\nimport { ZohoCoqlQueryBuilder } from \"@doralhw-org/zoho-coql-query-builder\";\n\nconst zohoCoqlQueryBuilder = new ZohoCoqlQueryBuilder({\n  queryFunction: queryZohoCrm,\n});\n```\n\n### Fetching data\n\nAfter creating the query builder object you can use the `select` method to fetch the data. The query passed will then be turned\nto one or more COQL queries and executed. The data will then be merged together and returned as an array of records.\n\n```ts\nconst records = await zohoCoqlQueryBuilder.select({\n  columns: [\n    \"id\",\n    \"Name\",\n    \"Age\",\n    \"Role\",\n    \"Email\",\n    { column: \"Address_Line_1\", alias: \"Address\" },\n  ],\n  from: \"Contacts\",\n  where: [{ equals: [{ column: \"id\" }, { value: \"123\" }] }],\n});\n```\n\nThis merge is performed based on the `id` column. If the `id` column is not added as a column to the query, it will be added\nto the queries generated. If the `id` column has a different name, or you want to group based on a different identifier\ncolumn, you may alias the column to `id` .\n\nAlternatively, you can use the static `buildQuery` method to build the query and then execute it on your own. The method will return one or more COQL queries depending on the workarounds required to obtain the data based on the limitations of the Zoho CRM API.\n\n```ts\nconst queries = ZohoCoqlQueryBuilder.buildQuery({\n  columns: [\n    \"id\",\n    \"Name\",\n    \"Age\",\n    \"Role\",\n    \"Email\",\n    { column: \"Address_Line_1\", alias: \"Address\" },\n  ],\n  from: \"Contacts\",\n  where: [{ equals: [{ column: \"id\" }, { value: \"123\" }] }],\n});\n```\n\n## Documentation\n\nFor comprehensive documentation including detailed usage patterns, limitations, and workarounds for each query clause, see the [Query Builder Documentation](./lib/query-builder/README.md).\n\n### Where Conditions\n\nThe available where conditions are:\n\n- `equals`\n- `greaterThan`\n- `lessThan`\n- `greaterThanOrEquals`\n- `lessThanOrEquals`\n- `between`\n- `in`\n- `like`\n\nThese can be negated by wrapping the condition object within a `not` attribute and combined with the `and` and `or` operators. The where clause array will join the conditions with the `and` operator by default.\n\n```ts\nwhere: [\n  { not: { equals: [{ column: \"id\" }, { value: \"123\" }] } },\n  {\n    and: [\n      { greaterThan: [{ column: \"Age\" }, { value: \"30\" }] },\n      { lessThan: [{ column: \"Age\" }, { value: \"40\" }] },\n    ],\n  },\n  {\n    or: [\n      { in: { column: \"Name\", valueSet: [\"John\", \"Jane\"] } },\n      { like: { column: \"Name\", pattern: \"John%\" } },\n    ],\n  },\n  {\n    like: { column: \"Email\", pattern: \"%@example.com\" },\n  },\n];\n```\n\nFor detailed information about where clause structure, limitations, and workarounds, see the [Where Clause section](./lib/query-builder/README.md#where-clause) in the full documentation.\n","readmeFilename":"README.md"}