rivet-sdk
Zoom Rivet SDK 參考:驗證、webhook、API wrapper 與 Lambda 模式
中文翻譯
--- name: rivet-sdk description: "Zoom Rivet SDK 的參考 skill。在導向以 Rivet 為基礎的伺服器端工作流程之後,實作驗證處理、webhook consumer、API wrapper、多模組組合或 Lambda receiver 模式時使用。" user-invocable: false triggers: - "rivet" - "zoom rivet" - "@zoom/rivet" - "rivet javascript" - "rivet sdk" - "rivet webhook" - "rivet oauth" - "rivet lambda" - "rivet team chat" - "rivet chatbot" --- # Zoom Rivet SDK Zoom Rivet 的背景參考:它是用於 Zoom 整合的 JavaScript 與 TypeScript 伺服器端框架。 Zoom Rivet(JavaScript/TypeScript)作為伺服器端框架的實作指引,用於: - OAuth 與 token 處理 - Webhook 事件消費 - 有型別的 REST API endpoint wrapper - 多模組的伺服器組合 官方文件: - https://developers.zoom.us/docs/rivet/ - https://developers.zoom.us/docs/rivet/javascript/ - https://zoom.github.io/rivet-javascript/ 參考範例: - https://github.com/zoom/rivet-javascript-sample - https://github.com/zoom/isv-rivet-starter - https://github.com/zoom/Rivet-Server-Sample - https://github.com/zoom/rivet-javascript ## 路由守則 - Rivet SDK 是一個 Node.js 框架,內建 Zoom 驗證處理、webhook receiver 和有型別的 API wrapper。 - Rivet 建議用在更快建出伺服器端骨架,但不是必要的。 - 規劃一開始,先確認偏好: - `Do you want Rivet SDK, or direct OAuth + REST without Rivet?` - 當使用者想要一個結合 Zoom 驗證 + webhook + API 呼叫、且膠水程式碼最少的 Node.js 伺服器時,用 Rivet。 - 如果使用者只需要從既有後端直接呼叫 API,就串接 [../rest-api/SKILL.md](../rest-api/SKILL.md)。 - 如果使用者專注在 Zoom Team Chat 的 app card/指令行為,就串接 [../team-chat/SKILL.md](../team-chat/SKILL.md)。 - 如果使用者需要 SDK 嵌入(Meeting SDK/Video SDK 的 client 執行環境),就導向 [../meeting-sdk/SKILL.md](../meeting-sdk/SKILL.md) 或 [../video-sdk/SKILL.md](../video-sdk/SKILL.md)。 ## 快速連結 從這裡開始: 1. [concepts/architecture-and-lifecycle.md](concepts/architecture-and-lifecycle.md) 2. [scenarios/high-level-scenarios.md](scenarios/high-level-scenarios.md) 3. [examples/getting-started-pattern.md](examples/getting-started-pattern.md) 4. [examples/multi-client-pattern.md](examples/multi-client-pattern.md) 5. [references/rivet-reference-map.md](references/rivet-reference-map.md) 6. [references/versioning-and-compatibility.md](references/versioning-and-compatibility.md) 7. [references/samples-validation.md](references/samples-validation.md) 8. [references/source-map.md](references/source-map.md) 9. [references/environment-variables.md](references/environment-variables.md) 10. [troubleshooting/common-issues.md](troubleshooting/common-issues.md) 11. [RUNBOOK.md](RUNBOOK.md) 12. [rivet-sdk.md](rivet-sdk.md) ## 常見的生命週期模式 1. 為每個模組選擇模組和驗證模型(Client Credentials、User OAuth、S2S OAuth、Video SDK JWT)。 2. 用憑證、webhook secret 和每個模組各自的 port 建立 client。 3. 註冊事件 handler(`webEventConsumer.event(...)` 或捷徑)。 4. 透過 `client.endpoints.*` 實作 API 呼叫。 5. 啟動 receiver,並把 webhook endpoint(`/zoom/events`)暴露給 Zoom。 6. 替 OAuth 的工作負載持久化 token/狀態,並強制做簽章驗證。 7. 監控各模組特有的失敗,並依 changelog 的節奏輪替 secret/版本。 ## 高階情境 - Team Chat slash-command bot + Team Chat 資料 API 的資料補強。 - 多模組後端(Users + Meetings + Team Chat + Phone)共用同一個 process。 - 使用 `videosdk` 模組事件串流 + API 介面的 Video SDK 遙測後端。 - 具備 tenant 感知的 token 儲存和各模組 webhook 的 ISV 編排層。 - 使用 Rivet `AwsLambdaReceiver` 的 AWS Lambda webhook 處理器。 詳情見 [scenarios/high-level-scenarios.md](scenarios/high-level-scenarios.md)。 ## 串接 - OAuth 架構與 grant 選擇:[../oauth/SKILL.md](../oauth/SKILL.md) - API endpoint 語意與 request payload 細節:[../rest-api/SKILL.md](../rest-api/SKILL.md) - Team Chat 的 app card、指令與 bot 的使用體驗:[../team-chat/SKILL.md](../team-chat/SKILL.md) - Video SDK 的 API 專屬行為與 BYOS 脈絡:[../video-sdk/SKILL.md](../video-sdk/SKILL.md) ## 環境變數 - 標準化的 `.env` key 以及各個值要去哪裡取得,見 [references/environment-variables.md](references/environment-variables.md)。 ## 營運 - [RUNBOOK.md](RUNBOOK.md):5 分鐘的 preflight 與除錯檢查表。
英文原文
--- name: rivet-sdk description: "Reference skill for Zoom Rivet SDK. Use after routing to a Rivet-based server workflow when implementing auth handling, webhook consumers, API wrappers, multi-module composition, or Lambda receiver patterns." user-invocable: false triggers: - "rivet" - "zoom rivet" - "@zoom/rivet" - "rivet javascript" - "rivet sdk" - "rivet webhook" - "rivet oauth" - "rivet lambda" - "rivet team chat" - "rivet chatbot" --- # Zoom Rivet SDK Background reference for Zoom Rivet as a JavaScript and TypeScript server framework for Zoom integrations. Implementation guidance for Zoom Rivet (JavaScript/TypeScript) as a server-side framework for: - OAuth and token handling - Webhook event consumption - Typed REST API endpoint wrappers - Multi-module server composition Official docs: - https://developers.zoom.us/docs/rivet/ - https://developers.zoom.us/docs/rivet/javascript/ - https://zoom.github.io/rivet-javascript/ Reference samples: - https://github.com/zoom/rivet-javascript-sample - https://github.com/zoom/isv-rivet-starter - https://github.com/zoom/Rivet-Server-Sample - https://github.com/zoom/rivet-javascript ## Routing Guardrail - Rivet SDK is a Node.js framework that bundles Zoom auth handling, webhook receivers, and typed API wrappers. - Rivet is recommended for faster server-side scaffolding, but it is not mandatory. - At planning start, confirm preference: - `Do you want Rivet SDK, or direct OAuth + REST without Rivet?` - Use Rivet when the user wants a Node.js server that combines Zoom auth + webhooks + API calls with minimal glue code. - If the user only needs direct API calls from an existing backend, chain with [../rest-api/SKILL.md](../rest-api/SKILL.md). - If the user is focused on Zoom Team Chat app cards/commands behavior, chain with [../team-chat/SKILL.md](../team-chat/SKILL.md). - If the user needs SDK embed (Meeting SDK/Video SDK client runtime), route to [../meeting-sdk/SKILL.md](../meeting-sdk/SKILL.md) or [../video-sdk/SKILL.md](../video-sdk/SKILL.md). ## Quick Links Start here: 1. [concepts/architecture-and-lifecycle.md](concepts/architecture-and-lifecycle.md) 2. [scenarios/high-level-scenarios.md](scenarios/high-level-scenarios.md) 3. [examples/getting-started-pattern.md](examples/getting-started-pattern.md) 4. [examples/multi-client-pattern.md](examples/multi-client-pattern.md) 5. [references/rivet-reference-map.md](references/rivet-reference-map.md) 6. [references/versioning-and-compatibility.md](references/versioning-and-compatibility.md) 7. [references/samples-validation.md](references/samples-validation.md) 8. [references/source-map.md](references/source-map.md) 9. [references/environment-variables.md](references/environment-variables.md) 10. [troubleshooting/common-issues.md](troubleshooting/common-issues.md) 11. [RUNBOOK.md](RUNBOOK.md) 12. [rivet-sdk.md](rivet-sdk.md) ## Common Lifecycle Pattern 1. Choose modules and auth model per module (Client Credentials, User OAuth, S2S OAuth, Video SDK JWT). 2. Instantiate client(s) with credentials, webhook secret, and per-module port. 3. Register event handlers (`webEventConsumer.event(...)` or shortcuts). 4. Implement API calls through `client.endpoints.*`. 5. Start receiver(s) and expose webhook endpoint(s) (`/zoom/events`) to Zoom. 6. Persist tokens/state for OAuth workloads and enforce signature verification. 7. Monitor module-specific failures and rotate secrets/version with changelog cadence. ## High-Level Scenarios - Team Chat slash-command bot + Team Chat data API enrichment. - Multi-module backend (Users + Meetings + Team Chat + Phone) sharing one process. - Video SDK telemetry backend using `videosdk` module event stream + API surfaces. - ISV orchestration layer with tenant-aware token storage and per-module webhooks. - AWS Lambda webhook processor with Rivet `AwsLambdaReceiver`. See [scenarios/high-level-scenarios.md](scenarios/high-level-scenarios.md) for details. ## Chaining - OAuth architecture and grant selection: [../oauth/SKILL.md](../oauth/SKILL.md) - API endpoint semantics and request payload details: [../rest-api/SKILL.md](../rest-api/SKILL.md) - Team Chat app cards, command and bot UX: [../team-chat/SKILL.md](../team-chat/SKILL.md) - Video SDK API-specific behavior and BYOS context: [../video-sdk/SKILL.md](../video-sdk/SKILL.md) ## Environment Variables - See [references/environment-variables.md](references/environment-variables.md) for standardized `.env` keys and where to find each value. ## Operations - [RUNBOOK.md](RUNBOOK.md) - 5-minute preflight and debugging checklist.