{"_id":"@ai-workflow-pack/common","_rev":"2-ad505134965e96731a1f3f67bb57e68d","name":"@ai-workflow-pack/common","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@ai-workflow-pack/common","version":"1.0.0","keywords":["ai-workflow-pack","common","utilities","nestjs","decorators","guards"],"author":{"name":"AI Workflow Team"},"license":"MIT","_id":"@ai-workflow-pack/common@1.0.0","maintainers":[{"name":"sampath1983jan","email":"sampath1983jan@gmail.com"}],"homepage":"https://github.com/ai-workflow-platform/ai-workflow-shared-common#readme","bugs":{"url":"https://github.com/ai-workflow-platform/ai-workflow-shared-common/issues"},"dist":{"shasum":"63c3d5e9b3727a696c8831fb885132bf08dac035","tarball":"https://registry.npmjs.org/@ai-workflow-pack/common/-/common-1.0.0.tgz","fileCount":109,"integrity":"sha512-Y+u5PVv8IbteE/Yq/Z38Dhi+toibZV+Nvx/+YcUJPpljaoFMgOFpn9NrdCclTq34oSJZVt9bSJY3iR0YNrhLBw==","signatures":[{"sig":"MEQCIAU6QA3hc0QFSXPzATTZFGD0VWYSsLSQSNEZnn++bjkpAiBqZAiv7Aro4ZikJzw496XRd4HJ519RcRUBLIf6MDKtKA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":238436},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=9.0.0","node":">=18.0.0"},"gitHead":"7acef45499a7ad97d862ce663c2d80f88f574a67","scripts":{"lint":"eslint \"{src,tests}/**/*.ts\"","test":"jest","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","lint:fix":"eslint \"{src,tests}/**/*.ts\" --fix","test:cov":"jest --coverage","test:watch":"jest --watch","build:watch":"tsc --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"sampath1983jan","email":"sampath1983jan@gmail.com"},"repository":{"url":"git+https://github.com/ai-workflow-platform/ai-workflow-shared-common.git","type":"git"},"_npmVersion":"11.6.2","description":"Shared common utilities, decorators, guards, and interceptors for AI Workflow services","directories":{},"_nodeVersion":"24.11.1","dependencies":{"rxjs":"^7.8.1","@nestjs/jwt":"^10.0.0","@nestjs/core":"^10.0.0","@nestjs/common":"^10.0.0","class-validator":"^0.14.0","@nestjs/passport":"^10.0.0","class-transformer":"^0.5.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.42.0","ts-jest":"^29.1.0","prettier":"^3.0.0","typescript":"^5.1.3","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/express":"^4.17.17","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"@nestjs/core":"^10.0.0","@nestjs/common":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/common_1.0.0_1764964283425_0.6553455327686457","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ai-workflow-pack/common","version":"1.0.1","description":"Shared common utilities, decorators, guards, and interceptors for AI Workflow services","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","build:watch":"tsc --watch","test":"jest","test:watch":"jest --watch","test:cov":"jest --coverage","lint":"eslint \"{src,tests}/**/*.ts\"","lint:fix":"eslint \"{src,tests}/**/*.ts\" --fix","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","prepublishOnly":"npm run build"},"keywords":["ai-workflow-pack","common","utilities","nestjs","decorators","guards"],"author":{"name":"AI Workflow Team"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ai-workflow-platform/ai-workflow-shared-common.git"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"dependencies":{"@ai-workflow-pack/adapters":"^1.0.1","@nestjs/common":"^10.0.0","@nestjs/core":"^10.0.0","@nestjs/jwt":"^10.0.0","@nestjs/passport":"^10.0.0","class-transformer":"^0.5.1","class-validator":"^0.14.0","rxjs":"^7.8.1"},"devDependencies":{"@types/express":"^4.17.17","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.42.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","jest":"^29.5.0","prettier":"^3.0.0","ts-jest":"^29.1.0","typescript":"^5.1.3"},"peerDependencies":{"@nestjs/common":"^10.0.0","@nestjs/core":"^10.0.0"},"engines":{"node":">=18.0.0","npm":">=9.0.0"},"gitHead":"63812553ad4c26352c3dc07164d82679e1054637","_id":"@ai-workflow-pack/common@1.0.1","bugs":{"url":"https://github.com/ai-workflow-platform/ai-workflow-shared-common/issues"},"homepage":"https://github.com/ai-workflow-platform/ai-workflow-shared-common#readme","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-FqhzdBOVIs2clj2Zt3VGCIBklh61OoyJafv/0osMLL53wDPDLqHLDhOZHbIQI4GB6vbpM/nIOi2kF7p80Gjmag==","shasum":"466ec6827d88ceb4bdb767cfef1ff4a3f70a92ae","tarball":"https://registry.npmjs.org/@ai-workflow-pack/common/-/common-1.0.1.tgz","fileCount":118,"unpackedSize":573979,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHYA6zqn1ifmj8Uk4IHbgqSxIl492+an1VWcRDlXkFWXAiAnGO0S4BSoM/pfklEwOl8yorBnaqp4qt33y3i3sT+H7g=="}]},"_npmUser":{"name":"sampath1983jan","email":"sampath1983jan@gmail.com"},"directories":{},"maintainers":[{"name":"sampath1983jan","email":"sampath1983jan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/common_1.0.1_1765178212367_0.6308799081651766"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-05T19:51:23.223Z","modified":"2025-12-08T07:16:52.746Z","1.0.0":"2025-12-05T19:51:23.587Z","1.0.1":"2025-12-08T07:16:52.537Z"},"bugs":{"url":"https://github.com/ai-workflow-platform/ai-workflow-shared-common/issues"},"author":{"name":"AI Workflow Team"},"license":"MIT","homepage":"https://github.com/ai-workflow-platform/ai-workflow-shared-common#readme","keywords":["ai-workflow-pack","common","utilities","nestjs","decorators","guards"],"repository":{"type":"git","url":"git+https://github.com/ai-workflow-platform/ai-workflow-shared-common.git"},"description":"Shared common utilities, decorators, guards, and interceptors for AI Workflow services","maintainers":[{"name":"sampath1983jan","email":"sampath1983jan@gmail.com"}],"readme":"# @ai-workflow-pack/common\r\n\r\nShared common utilities, decorators, guards, interceptors, and filters for AI Workflow microservices.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @ai-workflow-pack/common\r\n```\r\n\r\n## Usage\r\n\r\n### Decorators\r\n\r\n```typescript\r\nimport { CurrentUser, TenantId, Roles } from '@ai-workflow-pack/common';\r\n\r\n@Controller('users')\r\nexport class UsersController {\r\n  @Get('me')\r\n  @Roles('user', 'admin')\r\n  getProfile(\r\n    @CurrentUser() user: User,\r\n    @TenantId() tenantId: number\r\n  ) {\r\n    return user;\r\n  }\r\n}\r\n```\r\n\r\n### Guards\r\n\r\n```typescript\r\nimport { JwtAuthGuard, RolesGuard, TenantGuard } from '@ai-workflow-pack/common';\r\n\r\n@Controller('workflows')\r\n@UseGuards(JwtAuthGuard, TenantGuard, RolesGuard)\r\nexport class WorkflowsController {\r\n  // Protected routes\r\n}\r\n```\r\n\r\n### Interceptors\r\n\r\n```typescript\r\nimport { LoggingInterceptor, TransformInterceptor } from '@ai-workflow-pack/common';\r\n\r\n@UseInterceptors(LoggingInterceptor, TransformInterceptor)\r\n@Controller('api')\r\nexport class ApiController {}\r\n```\r\n\r\n### Utilities\r\n\r\n```typescript\r\nimport { CryptoUtil, DateUtil, ValidationUtil } from '@ai-workflow-pack/common';\r\n\r\n// Encrypt/decrypt sensitive data\r\nconst encrypted = CryptoUtil.encrypt('secret-data');\r\nconst decrypted = CryptoUtil.decrypt(encrypted);\r\n\r\n// Date formatting\r\nconst formatted = DateUtil.format(new Date(), 'YYYY-MM-DD');\r\n\r\n// Validation\r\nconst isValid = ValidationUtil.isEmail('user@example.com');\r\n```\r\n\r\n## Features\r\n\r\n- 🔐 **Authentication Decorators**: `@CurrentUser()`, `@TenantId()`, `@ApiKey()`\r\n- 🛡️ **Guards**: JWT, Roles, Tenant isolation, API Key validation\r\n- 🔍 **Interceptors**: Logging, Response transformation, Timeout handling\r\n- 🚫 **Filters**: HTTP exceptions, Global error handling\r\n- 🔧 **Utilities**: Crypto, Date, String manipulation, Validation\r\n- 📝 **Constants**: Roles, Status codes, Error messages\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}