{"_id":"@dexpal-analytics/rewards-api-types","_rev":"3-0868b4dda714be13912fa2d5b62013a5","name":"@dexpal-analytics/rewards-api-types","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@dexpal-analytics/rewards-api-types","version":"0.1.0","author":{"url":"https://dexpal.ai","name":"Josef Leventon","email":"josef@dexpal.ai"},"license":"UNLICENSED","_id":"@dexpal-analytics/rewards-api-types@0.1.0","maintainers":[{"name":"josefleventon","email":"josef.leventon@gmail.com"}],"dist":{"shasum":"ddd7358c5d9bfb48ecd20cfb02df68e4d7df3094","tarball":"https://registry.npmjs.org/@dexpal-analytics/rewards-api-types/-/rewards-api-types-0.1.0.tgz","fileCount":14,"integrity":"sha512-HshnFLIT2tPSwL/RSAep5y1+UKTe1M+n8XE8EqX9ZUOV4SZm0uG+E9yLL48OdkFlGzA18awEiKanmr3QEL0cCg==","signatures":[{"sig":"MEYCIQDL6H8mUDUxzFxZyamOFCdJex8Y8XyRChd145QjpeQQxwIhAMZI2RbCO6pmeZdF0u7BPGAx8w+lbWyvMfYFCBLzWTD3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9824},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"fdad44f67ee0cd05b8007ce5026490dbee1e0010","scripts":{"build":"tsc","clean":"rm -rf dist","type-check":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"josefleventon","email":"josef.leventon@gmail.com"},"_npmVersion":"11.3.0","description":"TypeScript types for DexPal Rewards API","directories":{},"_nodeVersion":"24.2.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/express":"^4.17.21"},"peerDependencies":{"express":"^4.18.0"},"_npmOperationalInternal":{"tmp":"tmp/rewards-api-types_0.1.0_1755741833217_0.2974271237718362","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dexpal-analytics/rewards-api-types","version":"0.1.1","author":{"url":"https://dexpal.ai","name":"Josef Leventon","email":"josef@dexpal.ai"},"license":"UNLICENSED","_id":"@dexpal-analytics/rewards-api-types@0.1.1","maintainers":[{"name":"josefleventon","email":"josef.leventon@gmail.com"}],"dist":{"shasum":"2ff4ece6cbb464430bfb1f03fa07890e107466a0","tarball":"https://registry.npmjs.org/@dexpal-analytics/rewards-api-types/-/rewards-api-types-0.1.1.tgz","fileCount":14,"integrity":"sha512-CQsycnHVLGH5wSh1IvIWgeW6CTgnaw/THll/TKBboL0gTghufXmA+ls/VaiAi0rQNdr40zrGHe0y0dGQlBSOsA==","signatures":[{"sig":"MEYCIQDCKp1R4YpUZP731h2GN13ZCY89TobN+0cHSbqLFAe1fAIhANQw1uVUkmdTQYsY/Z0Y7n2CaVz+ZqwX1KSWNq1QRZPU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9824},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"fdad44f67ee0cd05b8007ce5026490dbee1e0010","scripts":{"build":"tsc","clean":"rm -rf dist","type-check":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"josefleventon","email":"josef.leventon@gmail.com"},"_npmVersion":"11.3.0","description":"TypeScript types for DexPal Rewards API","directories":{},"_nodeVersion":"24.2.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/express":"^4.17.21"},"peerDependencies":{"express":"^4.18.0"},"_npmOperationalInternal":{"tmp":"tmp/rewards-api-types_0.1.1_1755741871101_0.37026220132249876","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@dexpal-analytics/rewards-api-types","version":"0.1.2","description":"TypeScript types for DexPal Rewards API","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build","type-check":"tsc --noEmit"},"author":{"name":"Josef Leventon","email":"josef@dexpal.ai","url":"https://dexpal.ai"},"license":"UNLICENSED","publishConfig":{"access":"public"},"devDependencies":{"@types/express":"^4.17.21","typescript":"^5.3.3"},"peerDependencies":{"express":"^4.18.0"},"engines":{"node":">=18.0.0"},"_id":"@dexpal-analytics/rewards-api-types@0.1.2","gitHead":"fdad44f67ee0cd05b8007ce5026490dbee1e0010","_nodeVersion":"24.2.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-HV5It5Yw5NeLiCdHl7F+ZWh1HjcTmFaBFtSk/paYfLfZ9SW2dEQzl2nNL97f2UCwtIJ1NXs1peO9ERGJ0M8scA==","shasum":"d4654cc36a82b5d943691c72377c2f6cc65fc93e","tarball":"https://registry.npmjs.org/@dexpal-analytics/rewards-api-types/-/rewards-api-types-0.1.2.tgz","fileCount":14,"unpackedSize":9850,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCJTpmWNbbMksp5YsvcGNXpm6lm/a88gZk5wYyK6amDrAIgBfBUYUsSQFv8LoQg/Fylvndlk5NqlyQ7FucK/8IS370="}]},"_npmUser":{"name":"josefleventon","email":"josef.leventon@gmail.com"},"directories":{},"maintainers":[{"name":"josefleventon","email":"josef.leventon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rewards-api-types_0.1.2_1755741890824_0.19927217191036406"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-21T02:03:53.154Z","modified":"2025-08-21T02:04:51.284Z","0.1.0":"2025-08-21T02:03:53.428Z","0.1.1":"2025-08-21T02:04:31.297Z","0.1.2":"2025-08-21T02:04:51.011Z"},"author":{"name":"Josef Leventon","email":"josef@dexpal.ai","url":"https://dexpal.ai"},"license":"UNLICENSED","description":"TypeScript types for DexPal Rewards API","maintainers":[{"name":"josefleventon","email":"josef.leventon@gmail.com"}],"readme":"# @dexpal-analytics/rewards-api-types\n\nTypeScript types for DexPal Rewards API.\n\n## Installation\n\n```bash\nnpm install @dexpal-analytics/rewards-api-types\n# or\nyarn add @dexpal-analytics/rewards-api-types\n```\n\n## Usage\n\n```typescript\nimport {\n  VolumeReportRequest,\n  VolumeReportResponse,\n  ExchangeApiKey,\n  VolumeReport,\n  AuthenticatedRequest,\n  ApiResponse,\n} from '@dexpal-analytics/rewards-api-types';\n\n// Use in your exchange integration\nconst volumeReport: VolumeReportRequest = {\n  reports: [\n    {\n      wallet_address: '0x742d35Cc6634C0532925a3b844Bc9e7595f6E123',\n      date: '2025-07-30',\n      volume_usd: 150000.5,\n      fees_usd: 375.25,\n      transaction_count: 45,\n      metadata: {\n        pairs_traded: ['ETH/USDT', 'BTC/USDT'],\n        exchange_user_id: 'user123',\n      },\n    },\n  ],\n};\n\n// Type-safe API responses\nconst response: VolumeReportResponse = {\n  success: true,\n  processed: 1,\n  reports: [\n    {\n      wallet_address: '0x742d35Cc6634C0532925a3b844Bc9e7595f6E123',\n      status: 'success',\n      report_id: '123e4567-e89b-12d3-a456-426614174000',\n    },\n  ],\n};\n```\n\n## Available Types\n\n### Exchange Types\n\n- `ExchangeApiKey` - Exchange API key configuration\n- `VolumeReport` - Volume report database entity\n- `VolumeReportInput` - Input data for volume reports\n- `VolumeReportRequest` - Webhook request payload\n- `VolumeReportResponse` - Webhook response payload\n\n### API Types\n\n- `ApiResponse<T>` - Generic API response wrapper\n- `AuthenticatedRequest` - Express request with exchange authentication\n- `ApiHandler` - Generic API handler function type\n- `AuthenticatedApiHandler` - Authenticated API handler function type\n- `ErrorResponse` - Error response structure\n- `PaginationParams` - Pagination parameters\n\n## Express Integration\n\nIf you're building Express middleware or handlers that work with the DexPal Rewards API:\n\n```typescript\nimport { Request, Response } from 'express';\nimport {\n  AuthenticatedRequest,\n  VolumeReportRequest,\n} from '@dexpal-analytics/rewards-api-types';\n\n// Middleware that adds exchange authentication\nexport const authenticateExchange = (\n  req: Request,\n  res: Response,\n  next: NextFunction\n): void => {\n  // Your authentication logic\n  const authenticatedReq = req as AuthenticatedRequest;\n  authenticatedReq.exchangeId = 'exchange-id';\n  authenticatedReq.exchangeName = 'exchange-name';\n  next();\n};\n\n// Type-safe route handler\nexport const handleVolumeReport = (\n  req: AuthenticatedRequest,\n  res: Response\n): void => {\n  const { reports }: VolumeReportRequest = req.body;\n  // Your handler logic with full type safety\n};\n```\n\n## Peer Dependencies\n\nThis package requires Express types as a peer dependency:\n\n```bash\nnpm install --save-dev @types/express\n```\n\n## License\n\nISC\n\n## Repository\n\n[https://github.com/dexpal-analytics/rewards-api](https://github.com/dexpal-analytics/rewards-api)\n","readmeFilename":"README.md"}