{"_id":"@bison.digital/youtube-sdk","_rev":"9-29853d45d9d90c691abc2ea7cd6fcc5d","name":"@bison.digital/youtube-sdk","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"@bison.digital/youtube-sdk","version":"0.1.0","keywords":["youtube","api","sdk","live-chat","typescript","openapi","generated"],"author":{"name":"Zach Bimson"},"license":"MIT","_id":"@bison.digital/youtube-sdk@0.1.0","maintainers":[{"name":"zach.bison","email":"zach@bison.digital"}],"homepage":"https://github.com/bison-digital/youtube-sdk#readme","bugs":{"url":"https://github.com/bison-digital/youtube-sdk/issues"},"dist":{"shasum":"75cf4b71db838cbb6bcb869fe6140d8d46294f97","tarball":"https://registry.npmjs.org/@bison.digital/youtube-sdk/-/youtube-sdk-0.1.0.tgz","fileCount":114,"integrity":"sha512-426z4T5GWBv9rabna5HjJEZw9kpspCPRHwST96rRr2IhUCXkHKYjTUwogE/xHQ9CfOwBaEPeyKRJGO+j5JOyhA==","signatures":[{"sig":"MEYCIQDjFZQ9YZl9aOPw94eT17hlwuFJX9O0oh7+chP1/A0KZQIhAM4Z+IlL2asMgfKqalvvaVR5hj6XYIFmFl0PF++19067","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191361},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.mjs","require":"./dist/types/index.js"}},"gitHead":"fd7f2ec4f1c5fd03a5afd6cfe06b9d9811baf9d7","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"npm run compile","clean":"rimraf dist/","format":"prettier --write src/**/*.ts","compile":"tsc && rollup -c","generate":"deno run -A --unstable-kv jsr:@skmtc/cli@^0.0.153 generators:generate pregnant-tuna-704 .","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"zach.bison","email":"zach@bison.digital"},"repository":{"url":"git+https://github.com/bison-digital/youtube-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"Generated TypeScript SDK for YouTube Data API v3 with Live Chat support","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","rimraf":"^5.0.0","rollup":"^4.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","rollup-plugin-typescript2":"^0.36.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"node-fetch":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/youtube-sdk_0.1.0_1756145103078_0.8125871185166167","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bison.digital/youtube-sdk","version":"0.1.1","keywords":["youtube","api","sdk","live-chat","typescript","openapi","generated"],"author":{"name":"Zach Bimson"},"license":"MIT","_id":"@bison.digital/youtube-sdk@0.1.1","maintainers":[{"name":"zach.bison","email":"zach@bison.digital"}],"homepage":"https://github.com/bison-digital/youtube-sdk#readme","bugs":{"url":"https://github.com/bison-digital/youtube-sdk/issues"},"dist":{"shasum":"d4aa2fd392862a943ef8ffb8a2daf0d931bb6e94","tarball":"https://registry.npmjs.org/@bison.digital/youtube-sdk/-/youtube-sdk-0.1.1.tgz","fileCount":114,"integrity":"sha512-I/4uHrlce+sTmyzb1Td/JijbTDyi1B4NJnkTfGMvjf2gWH0uMaSDtZPjoi/0FdVwKP2j0qS2kCv8X10oYh1Kjg==","signatures":[{"sig":"MEUCIQDVxYNNmG8+X5GIKbponBrsBFxyYBImQpaQmtO0fKiTgwIgeEMNLO4XM40UcDn5HVP11Phc5LrtD7YzgELpRnzxpME=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191361},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.mjs","require":"./dist/types/index.js"}},"gitHead":"ba7d6137e4278b0ddfa7a23b269133634389f064","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"npm run compile","clean":"rimraf dist/","format":"prettier --write src/**/*.ts","compile":"tsc && rollup -c","generate":"deno run -A --unstable-kv jsr:@skmtc/cli@^0.0.153 generators:generate pregnant-tuna-704 .","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"zach.bison","email":"zach@bison.digital"},"repository":{"url":"git+https://github.com/bison-digital/youtube-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"Generated TypeScript SDK for YouTube Data API v3 with Live Chat support","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","rimraf":"^5.0.0","rollup":"^4.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","rollup-plugin-typescript2":"^0.36.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"node-fetch":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/youtube-sdk_0.1.1_1756146066904_0.7653687088444268","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bison.digital/youtube-sdk","version":"0.1.2","keywords":["youtube","api","sdk","live-chat","typescript","openapi","generated"],"author":{"name":"Zach Bimson"},"license":"MIT","_id":"@bison.digital/youtube-sdk@0.1.2","maintainers":[{"name":"zach.bison","email":"zach@bison.digital"}],"homepage":"https://github.com/bison-digital/youtube-sdk#readme","bugs":{"url":"https://github.com/bison-digital/youtube-sdk/issues"},"dist":{"shasum":"bfd26a64b24b6945c64afaddfd7608be6822f070","tarball":"https://registry.npmjs.org/@bison.digital/youtube-sdk/-/youtube-sdk-0.1.2.tgz","fileCount":114,"integrity":"sha512-RSfEqvKb6ay/T1/PoTR95lRp/pBwrQTxwt/msPfIzH5cnAtxXKbWgAmkYHhhS3+Zv21IatsljV8s0yJRZzEXYw==","signatures":[{"sig":"MEUCIDRDteg2u5M6WusaaALTdfWtrqeWINFQJoezfQ9s7BjrAiEA6NzQdwwyHUfaa1zuNNCStUCHVpTzX/9cFCoeB+Mteh8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":192101},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.mjs","require":"./dist/types/index.js"}},"gitHead":"404f740ad388ffb398f24426d8f4281ff8db0687","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"npm run compile","clean":"rimraf dist/","format":"prettier --write src/**/*.ts","compile":"tsc && rollup -c","generate":"deno run -A --unstable-kv jsr:@skmtc/cli@^0.0.153 generators:generate pregnant-tuna-704 .","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"zach.bison","email":"zach@bison.digital"},"repository":{"url":"git+https://github.com/bison-digital/youtube-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"Generated TypeScript SDK for YouTube Data API v3 with Live Chat support","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","rimraf":"^5.0.0","rollup":"^4.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","rollup-plugin-typescript2":"^0.36.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"node-fetch":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/youtube-sdk_0.1.2_1756234993286_0.7469948288306139","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bison.digital/youtube-sdk","version":"0.1.3","keywords":["youtube","api","sdk","live-chat","typescript","openapi","generated"],"author":{"name":"Zach Bimson"},"license":"MIT","_id":"@bison.digital/youtube-sdk@0.1.3","maintainers":[{"name":"zach.bison","email":"zach@bison.digital"}],"homepage":"https://github.com/bison-digital/youtube-sdk#readme","bugs":{"url":"https://github.com/bison-digital/youtube-sdk/issues"},"dist":{"shasum":"19483bce804628c2a9643a6e119bcb93e6ca0741","tarball":"https://registry.npmjs.org/@bison.digital/youtube-sdk/-/youtube-sdk-0.1.3.tgz","fileCount":114,"integrity":"sha512-LODRFXuRuGEGeR45E1rgBBqUTUl81JWDKc5g0d6UfKu89SvqNsbUCA8NxVTP3TP8Fb0sKp3hZa6XUL3rbktdNw==","signatures":[{"sig":"MEUCIGOyAYTL2/551dYWlA8jNbG4oUjU5tf6IaUj8n0EhD3mAiEAuCxPnutkMOYUD4+UZya7v09GVEBFB1Bg11QvfxiBLdU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":192101},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.mjs","require":"./dist/types/index.js"}},"gitHead":"180ce5d83d67b57e7488c4c6da81c58fd35c375d","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"npm run compile","clean":"rimraf dist/","format":"prettier --write src/**/*.ts","compile":"tsc && rollup -c","generate":"deno run -A --unstable-kv jsr:@skmtc/cli@^0.0.153 generators:generate pregnant-tuna-704 .","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"zach.bison","email":"zach@bison.digital"},"repository":{"url":"git+https://github.com/bison-digital/youtube-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"Generated TypeScript SDK for YouTube Data API v3 with Live Chat support","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","rimraf":"^5.0.0","rollup":"^4.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","rollup-plugin-typescript2":"^0.36.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"node-fetch":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/youtube-sdk_0.1.3_1756235394387_0.8816908428848185","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@bison.digital/youtube-sdk","version":"0.1.4","keywords":["youtube","api","sdk","live-chat","typescript","openapi","generated"],"author":{"name":"Zach Bimson"},"license":"MIT","_id":"@bison.digital/youtube-sdk@0.1.4","maintainers":[{"name":"zach.bison","email":"zach@bison.digital"}],"homepage":"https://github.com/bison-digital/youtube-sdk#readme","bugs":{"url":"https://github.com/bison-digital/youtube-sdk/issues"},"dist":{"shasum":"fe046eabc83e2c31668fd34f27fcdf2ae2255aac","tarball":"https://registry.npmjs.org/@bison.digital/youtube-sdk/-/youtube-sdk-0.1.4.tgz","fileCount":114,"integrity":"sha512-iWeM1rg5xjHCxX69WbTtaje8Bb2dTZTrhq9hVK+dI5y4Uom9gGiYTKdM/GUR852cuHojD2jDfZPoF7V1OMO1yA==","signatures":[{"sig":"MEQCIEYzrRdwDnp/u6OyIDOnVn1L+Z1Ok9wEkdOqrmRFNZFgAiAX83PEUq633d+MISTQlmQzs2btkDwWRrUqG/cTN0DSJw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191747},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.mjs","require":"./dist/types/index.js"}},"gitHead":"18df5dd0b353314c62784e5d24b64961ee794c6a","scripts":{"lint":"eslint src/**/*.ts","test":"jest","build":"npm run compile","clean":"rimraf dist/","format":"prettier --write src/**/*.ts","compile":"tsc && rollup -c","generate":"deno run -A --unstable-kv jsr:@skmtc/cli@^0.0.153 generators:generate pregnant-tuna-704 .","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"zach.bison","email":"zach@bison.digital"},"repository":{"url":"git+https://github.com/bison-digital/youtube-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"Generated TypeScript SDK for YouTube Data API v3 with Live Chat support","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","rimraf":"^5.0.0","rollup":"^4.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","rollup-plugin-typescript2":"^0.36.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"node-fetch":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/youtube-sdk_0.1.4_1756298752650_0.6622864329167428","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bison.digital/youtube-sdk","version":"1.0.1","type":"module","description":"Generated TypeScript SDK for YouTube Data API v3 with Live Chat support","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts"},"./types":{"import":"./dist/types/index.mjs","require":"./dist/types/index.js","types":"./dist/types/index.d.ts"}},"scripts":{"build":"npm run compile","generate":"deno run -A --unstable-kv jsr:@skmtc/cli@^0.0.153 generators:generate pregnant-tuna-704 .","compile":"node fix-imports.js && node generate-types-index.js && tsc && rollup -c","test":"vitest","test:run":"vitest run","test:ui":"vitest --ui","test:spec":"vitest run tests/spec-validation.test.ts","test:integration":"vitest run tests/integration.test.ts","lint":"eslint src/**/*.ts","format":"prettier --write src/**/*.ts","clean":"rimraf dist/","prepublishOnly":"npm run clean && npm run build"},"keywords":["youtube","api","sdk","live-chat","typescript","openapi","generated"],"author":{"name":"Zach Bimson"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bison-digital/youtube-sdk.git"},"bugs":{"url":"https://github.com/bison-digital/youtube-sdk/issues"},"homepage":"https://github.com/bison-digital/youtube-sdk#readme","dependencies":{"zod":"^3.24.1"},"devDependencies":{"@types/js-yaml":"^4.0.9","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","@vitest/ui":"^3.2.4","dotenv":"^17.2.1","eslint":"^8.0.0","jest":"^29.0.0","js-yaml":"^4.1.0","prettier":"^3.0.0","rimraf":"^5.0.0","rollup":"^4.0.0","rollup-plugin-typescript2":"^0.36.0","typescript":"^5.0.0","vitest":"^3.2.4","yaml":"^2.8.1"},"peerDependencies":{"node-fetch":"^3.0.0"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public"},"_id":"@bison.digital/youtube-sdk@1.0.1","gitHead":"3edc5df8cfe89a4fea1f45f287a80189db09630e","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-1L/QrlhL3p23A7BygAzN+pzhhPW6E4wJFo+P41coEr7xxcnrUmf4jrD+omvwr6j5hXDNBD7HJUgkGQ4EuexkqQ==","shasum":"88cb527ce3532ffb5dc5a2bbf6c2e4e4cf3a0b24","tarball":"https://registry.npmjs.org/@bison.digital/youtube-sdk/-/youtube-sdk-1.0.1.tgz","fileCount":774,"unpackedSize":2175399,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDbqM5CtJSuZQnzYSeKq2qf0alz8/2kI2lboxGYxHGd4gIgCNRmFm+1xb/0Z/Qw9wRC1xpRJ9SunW3C7Sdn48HlzSw="}]},"_npmUser":{"name":"zach.bison","email":"zach@bison.digital"},"directories":{},"maintainers":[{"name":"zach.bison","email":"zach@bison.digital"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/youtube-sdk_1.0.1_1756317801465_0.5297388025361345"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-25T18:05:02.696Z","modified":"2025-08-27T18:03:21.996Z","1.0.0":"2025-08-25T17:21:06.619Z","0.1.0":"2025-08-25T18:05:03.308Z","0.1.1":"2025-08-25T18:21:07.109Z","0.1.2":"2025-08-26T19:03:13.482Z","0.1.3":"2025-08-26T19:09:54.608Z","0.1.4":"2025-08-27T12:45:52.839Z","1.0.1":"2025-08-27T18:03:21.725Z"},"bugs":{"url":"https://github.com/bison-digital/youtube-sdk/issues"},"author":{"name":"Zach Bimson"},"license":"MIT","homepage":"https://github.com/bison-digital/youtube-sdk#readme","keywords":["youtube","api","sdk","live-chat","typescript","openapi","generated"],"repository":{"type":"git","url":"git+https://github.com/bison-digital/youtube-sdk.git"},"description":"Generated TypeScript SDK for YouTube Data API v3 with Live Chat support","maintainers":[{"name":"zach.bison","email":"zach@bison.digital"}],"readme":"# YouTube SDK\n\nA TypeScript SDK for the YouTube Data API v3 with comprehensive Live Chat support. This package is **automatically generated from the OpenAPI specification using [skm.tc](https://skm.tc)** and published via GitHub Actions.\n\n## Features\n\n- 🔄 **Auto-generated with [skm.tc](https://skm.tc)** - Always up-to-date with the latest API spec\n- 🚀 **TypeScript-first** - Full type safety and IntelliSense support\n- 📺 **YouTube Live Chat** - Complete support for live chat operations\n- 🌐 **Universal** - Works in Node.js, browsers, and Cloudflare Workers\n- 📦 **Tree-shakeable** - Import only what you need\n\n## Installation\n\n```bash\nnpm install @bison.digital/youtube-sdk\n```\n\n## Quick Start\n\n```typescript\nimport { YouTubeClient } from '@bison.digital/youtube-sdk';\n\n// Initialize the client\nconst youtube = new YouTubeClient({\n  apiKey: 'your-api-key',\n  baseUrl: 'https://www.googleapis.com/youtube/v3'\n});\n\n// Get live chat messages\nconst messages = await youtube.getLiveChatMessagesApi({\n  params: {\n    liveChatId: 'your-live-chat-id',\n    part: 'snippet,authorDetails'\n  }\n});\n\nconsole.log('Live chat messages:', messages.items);\n```\n\n## API Reference\n\n### YouTubeClient\n\nThe main client class for interacting with the YouTube API.\n\n#### Constructor\n\n```typescript\nnew YouTubeClient(options: {\n  apiKey: string;\n  baseUrl?: string;\n})\n```\n\n#### Methods\n\n##### Live Chat Messages\n\n```typescript\n// Get live chat messages\nawait youtube.getLiveChatMessagesApi({\n  params: {\n    liveChatId: string;\n    part: string;\n    hl?: string;\n    maxResults?: number;\n    pageToken?: string;\n    profileImageSize?: number;\n  }\n});\n\n// Send a live chat message\nawait youtube.createLiveChatMessagesApi({\n  params: { part: 'snippet' },\n  body: {\n    snippet: {\n      liveChatId: string;\n      type: 'textMessageEvent';\n      textMessageDetails: {\n        messageText: string;\n      };\n    };\n  }\n});\n\n// Delete a live chat message\nawait youtube.deleteLiveChatMessagesIdApi({\n  params: { id: string }\n});\n\n// Moderate live chat messages\nawait youtube.createLiveChatMessagesTransitionApi({\n  params: {\n    id: string;\n    status: 'held' | 'approved' | 'rejected';\n  }\n});\n```\n\n### Types\n\nThe SDK exports comprehensive TypeScript types for all API responses:\n\n```typescript\nimport type {\n  LiveChatMessage,\n  LiveChatMessageListResponse,\n  LiveChatMessageAuthorDetails,\n  LiveChatTextMessageDetails,\n  LiveChatSuperChatDetails,\n  LiveChatSuperStickerDetails,\n  // ... and many more\n} from '@bison.digital/youtube-sdk';\n```\n\n### Common Types\n\n#### LiveChatMessage\n\n```typescript\ninterface LiveChatMessage {\n  kind: string;\n  etag: string;\n  id: string;\n  snippet: LiveChatMessageSnippet;\n  authorDetails: LiveChatMessageAuthorDetails;\n}\n```\n\n#### LiveChatMessageListResponse\n\n```typescript\ninterface LiveChatMessageListResponse {\n  kind: string;\n  etag: string;\n  nextPageToken?: string;\n  pollingIntervalMillis: number;\n  pageInfo: PageInfo;\n  items: LiveChatMessage[];\n}\n```\n\n## Usage Examples\n\n### Real-time Chat Monitoring\n\n```typescript\nimport { YouTubeClient } from '@bison.digital/youtube-sdk';\n\nclass LiveChatMonitor {\n  private client: YouTubeClient;\n  private liveChatId: string;\n  private pageToken?: string;\n\n  constructor(apiKey: string, liveChatId: string) {\n    this.client = new YouTubeClient({ apiKey });\n    this.liveChatId = liveChatId;\n  }\n\n  async startMonitoring() {\n    while (true) {\n      try {\n        const response = await this.client.getLiveChatMessagesApi({\n          params: {\n            liveChatId: this.liveChatId,\n            part: 'snippet,authorDetails',\n            pageToken: this.pageToken\n          }\n        });\n\n        // Process new messages\n        for (const message of response.items) {\n          this.handleMessage(message);\n        }\n\n        // Update page token for next request\n        this.pageToken = response.nextPageToken;\n\n        // Wait for the recommended polling interval\n        await this.sleep(response.pollingIntervalMillis);\n      } catch (error) {\n        console.error('Error fetching messages:', error);\n        await this.sleep(5000); // Wait 5 seconds on error\n      }\n    }\n  }\n\n  private handleMessage(message: LiveChatMessage) {\n    const author = message.authorDetails.displayName;\n    const text = message.snippet.textMessageDetails?.messageText;\n    \n    console.log(`${author}: ${text}`);\n  }\n\n  private sleep(ms: number): Promise<void> {\n    return new Promise(resolve => setTimeout(resolve, ms));\n  }\n}\n\n// Usage\nconst monitor = new LiveChatMonitor('your-api-key', 'live-chat-id');\nmonitor.startMonitoring();\n```\n\n### Chat Moderation\n\n```typescript\nimport { YouTubeClient } from '@bison.digital/youtube-sdk';\n\nclass ChatModerator {\n  private client: YouTubeClient;\n\n  constructor(apiKey: string) {\n    this.client = new YouTubeClient({ apiKey });\n  }\n\n  async moderateMessage(messageId: string, action: 'approve' | 'reject') {\n    const status = action === 'approve' ? 'approved' : 'rejected';\n    \n    await this.client.createLiveChatMessagesTransitionApi({\n      params: { id: messageId, status }\n    });\n  }\n\n  async deleteSpamMessage(messageId: string) {\n    await this.client.deleteLiveChatMessagesIdApi({\n      params: { id: messageId }\n    });\n  }\n}\n```\n\n### Super Chat Handling\n\n```typescript\nimport { YouTubeClient, LiveChatMessage } from '@bison.digital/youtube-sdk';\n\nfunction handleSuperChat(message: LiveChatMessage) {\n  if (message.snippet.type === 'superChatEvent') {\n    const superChat = message.snippet.superChatDetails;\n    const author = message.authorDetails.displayName;\n    const amount = superChat?.amountDisplayString;\n    const text = superChat?.userComment;\n\n    console.log(`💰 Super Chat from ${author}: ${amount} - ${text}`);\n    \n    // Handle super chat logic here\n    handleHighValueDonation(author, amount, text);\n  }\n}\n\nfunction handleHighValueDonation(author: string, amount: string, message: string) {\n  // Your super chat handling logic\n  console.log(`Processing high value donation from ${author}`);\n}\n```\n\n## Error Handling\n\nThe SDK includes comprehensive error types:\n\n```typescript\nimport { YouTubeClient } from '@bison.digital/youtube-sdk';\n\ntry {\n  const messages = await youtube.getLiveChatMessagesApi({\n    params: {\n      liveChatId: 'invalid-id',\n      part: 'snippet'\n    }\n  });\n} catch (error) {\n  if (error.status === 404) {\n    console.error('Live chat not found');\n  } else if (error.status === 403) {\n    console.error('Access forbidden - check your API key and permissions');\n  } else {\n    console.error('API error:', error.message);\n  }\n}\n```\n\n## Environment Support\n\nThis SDK works in multiple environments:\n\n- **Node.js** (18+)\n- **Browsers** (modern browsers with ES2022 support)\n- **Cloudflare Workers**\n- **Deno** (with npm: specifier)\n\n## Authentication\n\n### API Key Authentication\n\n```typescript\nconst youtube = new YouTubeClient({\n  apiKey: process.env.YOUTUBE_API_KEY\n});\n```\n\n### OAuth2 Authentication\n\nFor operations requiring user authentication, you'll need to extend the base client:\n\n```typescript\nimport { SdkClientBase } from '@bison.digital/youtube-sdk';\n\nclass AuthenticatedYouTubeClient extends SdkClientBase {\n  constructor(accessToken: string) {\n    super({\n      baseUrl: 'https://www.googleapis.com/youtube/v3',\n      headers: {\n        'Authorization': `Bearer ${accessToken}`\n      }\n    });\n  }\n}\n```\n\n## Testing\n\nThis SDK includes a comprehensive test harness to validate both the OpenAPI spec compliance and real API functionality.\n\n### Setup Test Environment\n\n1. **Install dependencies:**\n   ```bash\n   pnpm install\n   ```\n\n2. **Create environment file:**\n   ```bash\n   cp .env.example .env\n   ```\n\n3. **Configure your YouTube API credentials in `.env`:**\n   ```env\n   YOUTUBE_CLIENT_ID=your_client_id_here\n   YOUTUBE_CLIENT_SECRET=your_client_secret_here\n   YOUTUBE_ACCESS_TOKEN=your_access_token_here\n   YOUTUBE_REFRESH_TOKEN=your_refresh_token_here\n   YOUTUBE_TOKEN_EXPIRES_AT=1234567890000\n   YOUTUBE_LIVE_CHAT_ID=your_test_live_chat_id_here\n   ```\n\n### Running Tests\n\n```bash\n# Run all tests\npnpm test\n\n# Run spec validation tests only\npnpm test:spec\n\n# Run integration tests only (requires credentials)\npnpm test:integration\n\n# Interactive test UI\npnpm test:ui\n\n# Single test run\npnpm test:run\n```\n\n### Test Coverage\n\nThe test harness covers:\n\n- **SDK Completeness**: Ensures all OpenAPI operations are implemented\n- **Method Signatures**: Validates correct parameter structures  \n- **Real API Calls**: Tests actual YouTube API integration\n- **Error Handling**: Tests API error responses and recovery\n- **Token Management**: Tests OAuth token refresh functionality\n- **Rate Limiting**: Tests graceful handling of API rate limits\n\nIntegration tests are automatically skipped if credentials are missing - only spec validation tests will run.\n\n## Contributing\n\nThis package is auto-generated from the OpenAPI specification. To contribute:\n\n1. Fork the repository\n2. Make changes to the OpenAPI spec in `.skmtc/openapi.yaml`\n3. Submit a pull request\n\nThe GitHub Actions workflow will automatically regenerate and publish the package.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for version history and changes.","readmeFilename":"README.md"}