/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
libs/internal-sdk/examples/trigger.example.ts
42 строки
778 B
Dima Grossman
chore(root): sdk gen version update for latest internal sdk changes (#10651)
10 апр 2026, 16:36
Не верифицирован
10 апр 2026, 16:36
b5e0674
Код
Авторство
О чём код?
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import dotenv from "dotenv"; dotenv.config(); /** * Example usage of the @novu/api SDK * * To run this example from the examples directory: * npm run build && npx tsx trigger.example.ts */ import { Novu } from "@novu/api"; const novu = new Novu({ security: { bearerAuth: "<YOUR_BEARER_TOKEN_HERE>", }, }); async function main() { const result = await novu.trigger({ workflowId: "workflow_identifier", payload: { "comment_id": "string", "post": { "text": "string", }, }, overrides: {}, to: "SUBSCRIBER_ID", actor: "<value>", context: { "key": "org-acme", }, }); console.log(result); } main().catch(console.error);