{"_id":"@clickizen/data","_rev":"3-d1af4e4a48bf97956ef25238e948776c","name":"@clickizen/data","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"@clickizen/data","version":"0.0.1","keywords":["clickizen","clickhouse"],"author":{"url":"keshav@clickizen.com","name":"Keshav Saharia"},"license":"MIT","_id":"@clickizen/data@0.0.1","maintainers":[{"name":"keshavsaharia","email":"keshav@keshavsaharia.com"}],"homepage":"https://github.com/clickizen/data#readme","bugs":{"url":"https://github.com/clickizen/data/issues"},"dist":{"shasum":"7bcf3b8ff1c308b0e54496757f4c298f510c8999","tarball":"https://registry.npmjs.org/@clickizen/data/-/data-0.0.1.tgz","fileCount":98,"integrity":"sha512-JyL18s+IhNQaUFlJTtR6VmApNZG85y/RbGutoSiS81ovreOIj6pq9FX9onmGYkJqID3IhPhFPn0XdznlY584ig==","signatures":[{"sig":"MEUCIH1CUFEFPY9cMA2J2kXONP0oL7xHZ+q7kpVrId4zbKXtAiEAyXmNucChkCDkFg6ybscwqUtHHiVt8sgdaKIa3pKIBb8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":148288},"main":"./dist/types/index.js","types":"./dist/types/index.d.ts","exports":{".":"./dist/types/index.js","./script":"./dist/script/index.js","./server":"./dist/server/index.js","./decorator":"./dist/decorator/namespace.js","./transform":"./dist/transform/index.js"},"gitHead":"3bff49803c4ed0030617239b7a5a1a9883c976c7","scripts":{"test":"npx jest"},"_npmUser":{"name":"keshavsaharia","email":"keshav@keshavsaharia.com"},"repository":{"url":"git+https://github.com/clickizen/data.git","type":"git"},"_npmVersion":"10.9.2","description":"Clickizen data types, definitions, and decorator bindings","directories":{},"_nodeVersion":"23.7.0","dependencies":{"ndjson":"^2.0.0","csv-parser":"^3.2.0","@clickhouse/client":"^1.10.1"},"typesVersions":{"*":{"script":["./dist/script/index.d.ts"],"server":["./dist/server/index.d.ts"],"decorator":["./dist/decorator/types.d.ts"],"transform":["./dist/transform/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.2.6","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/data_0.0.1_1742100638812_0.6404935545525698","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@clickizen/data","version":"0.0.2","keywords":["clickizen","clickhouse"],"author":{"url":"keshav@clickizen.com","name":"Keshav Saharia"},"license":"MIT","_id":"@clickizen/data@0.0.2","maintainers":[{"name":"keshavsaharia","email":"keshav@keshavsaharia.com"}],"homepage":"https://github.com/clickizen/data#readme","bugs":{"url":"https://github.com/clickizen/data/issues"},"dist":{"shasum":"b7a8f4d8a5fbfb05b2add60d3c316dc9de9939cd","tarball":"https://registry.npmjs.org/@clickizen/data/-/data-0.0.2.tgz","fileCount":396,"integrity":"sha512-GnjbYBXFRS3Y/G9LqCL09HpLeG8c9nQGj9QpjqaX5O/tuo2Kb0F111gUwyq+cyKbm6k1R1Md8H/W7AE6S5WmoQ==","signatures":[{"sig":"MEUCIQCtcl5W14aTXa+52kXRVBZ2RrFTYeXGmKZQwyLti8yA/AIgSh6yq5jKYQgFBcEyrNHzjxpAMS5d3fpuwpcq0Rm0BGU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":484794},"main":"./dist/types/index.js","types":"./dist/types/index.d.ts","exports":{".":"./dist/types/index.js","./script":"./dist/script/index.js","./server":"./dist/server/index.js","./decorator":"./dist/decorator/namespace.js","./transform":"./dist/transform/index.js"},"gitHead":"3bff49803c4ed0030617239b7a5a1a9883c976c7","scripts":{"test":"npx jest"},"_npmUser":{"name":"keshavsaharia","email":"keshav@keshavsaharia.com"},"repository":{"url":"git+https://github.com/clickizen/data.git","type":"git"},"_npmVersion":"10.9.2","description":"Clickizen data types, definitions, and decorator bindings","directories":{},"_nodeVersion":"23.7.0","dependencies":{"ndjson":"^2.0.0","csv-parser":"^3.2.0","@clickhouse/client":"^1.10.1"},"typesVersions":{"*":{"script":["./dist/script/index.d.ts"],"server":["./dist/server/index.d.ts"],"decorator":["./dist/decorator/types.d.ts"],"transform":["./dist/transform/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.2.6","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/data_0.0.2_1742100738952_0.31389294119824496","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@clickizen/data","version":"0.1.0","description":"Clickizen data types, definitions, and decorator bindings","main":"./dist/types/index.js","exports":{".":"./dist/types/index.js","./server":"./dist/server/index.js","./script":"./dist/script/index.js","./transform":"./dist/transform/index.js","./decorator":"./dist/decorator/namespace.js"},"types":"./dist/types/index.d.ts","typesVersions":{"*":{"server":["./dist/server/index.d.ts"],"script":["./dist/script/index.d.ts"],"transform":["./dist/transform/index.d.ts"],"decorator":["./dist/decorator/types.d.ts"]}},"scripts":{"test":"npx jest"},"repository":{"type":"git","url":"git+https://github.com/clickizen/data.git"},"keywords":["clickizen","clickhouse"],"author":{"name":"Keshav Saharia","url":"keshav@clickizen.com"},"license":"MIT","bugs":{"url":"https://github.com/clickizen/data/issues"},"homepage":"https://github.com/clickizen/data#readme","dependencies":{"@clickhouse/client":"^1.10.1","csv-parser":"^3.2.0","ndjson":"^2.0.0"},"devDependencies":{"@types/jest":"^29.5.14","jest":"^29.7.0","ts-jest":"^29.2.6"},"_id":"@clickizen/data@0.1.0","gitHead":"3bff49803c4ed0030617239b7a5a1a9883c976c7","_nodeVersion":"23.7.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-3t9x0obvg6xmb1yIigF+bvy8mdGXWdSpRHBECuedx1JH34k5s/3SUo1BtaTMtg0/FB178cpYsCte8qvvq82VeA==","shasum":"8f4f424ab3937b3bd5e37293a3e3b4257a3e4b76","tarball":"https://registry.npmjs.org/@clickizen/data/-/data-0.1.0.tgz","fileCount":396,"unpackedSize":484794,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDIW2BjQPoWpI1E98i1+k0+JupgGKv9uG1BqP98Lt/hWgIgVFYwR+i9ZrAnJjuYa5lP/6/7AJ6Dz/5Jo5OPibqlu+8="}]},"_npmUser":{"name":"keshavsaharia","email":"keshav@keshavsaharia.com"},"directories":{},"maintainers":[{"name":"keshavsaharia","email":"keshav@keshavsaharia.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/data_0.1.0_1742100786755_0.3417502840422091"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-16T04:50:38.707Z","modified":"2025-03-16T04:53:07.173Z","0.0.1":"2025-03-16T04:50:39.024Z","0.0.2":"2025-03-16T04:52:19.136Z","0.1.0":"2025-03-16T04:53:06.943Z"},"bugs":{"url":"https://github.com/clickizen/data/issues"},"author":{"name":"Keshav Saharia","url":"keshav@clickizen.com"},"license":"MIT","homepage":"https://github.com/clickizen/data#readme","keywords":["clickizen","clickhouse"],"repository":{"type":"git","url":"git+https://github.com/clickizen/data.git"},"description":"Clickizen data types, definitions, and decorator bindings","maintainers":[{"name":"keshavsaharia","email":"keshav@keshavsaharia.com"}],"readme":"# `@clickizen/data`\n\n**NOTE:** This is still in development.\n\nThis module contains all definitions and utility functions associated with data types. It aims to provide a complete\nimplementation of all [ClickHouse data types](https://clickhouse.com/docs/sql-reference/data-types) along with pure \nfunctions to work with these values, and an abstraction layer which makes it easy to pass sanitized queries between\nthe server and client.\n\n## Submodules\n\n- [database](./database/README.md) - abstraction layer for managing tables, data, and resources in a ClickHouse database\n\n## ROADMAP\n\n- Work with nested data declarations\n- Implement the main functions from ClickHouse\n\n## SPRINT\n\n- [ ] port VM execution environment for loading schemas into Database instance\n\n## Scripts\n\nProvide a similar runtime environment to the table/column decorators for running scripts. This would allow the\nUI interface and CLI application to both be able to handle longer-running data ingestion processes.\n\n- [ ] script runtime environment that uses decorators\n- [ ] script writes progress and errors to a ClickHouse table\n\n```typescript\n\n@script('download')\nclass PPP_Scripts {\n    \n    @script('loans')\n    async loans(\n        @dir('data') dir: string,\n        @version() version: string) {\n        \n    }\n}\n\nimport fecParse from 'fec-parser'\n\nclass FEC_Scripts {\n\n    @task('download')\n    async downloadFilings(\n        @param('UInt8') year: number, \n        @param('UInt8') month: number,\n        @param('UInt8') date: number) {\n        // automatically creates a ClickHouse row with the \n        // stream to fecParse()\n    }\n}\n```\n\n## Browser notes\n\nThe `react` packages consistently uses `import type` when referencing this module, to avoid pulling implementations into\nthe client bundle. \n\n## Data Types\n\n## Browser usage\n\n## Transforms\n\n### Parse string to native value\n\nThe `stringParser` mapping contains every\n\n- string parser - `(value: string) => native`\n\n- value parser - `(value: any) => native`\n\n- validator\n\n## Decorators\n\nThe `decorator` submodule adds two global functions `table` and `attr`. These schema definitions can be automatically generated\nfrom a reference data source using the `czdata` command line tool from the [main Clickizen repository](https://github.com/clickizen/clickizen).\n\n```\nimport '@clickizen/data/decorator'\n\n@table('my_table')\nclass MyRow {\n\n\t@attr('UInt8')\n\tid: number\n\n\t@attr('String')\n\tname: string\n\n}\n```\n","readmeFilename":"README.md"}