@sippulse/niva-sdk 0.1.0-rc.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dts/src/generated/client.d.ts +17 -3
- package/dts/src/generated/meta.d.ts +1 -1
- package/dts/src/generated/operations.d.ts +799 -189
- package/dts/src/generated/webhooks.d.ts +24 -1
- package/index.bun.js +243 -209
- package/index.default.js +243 -209
- package/index.deno.js +243 -209
- package/index.node.js +243 -209
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { NivaJsonValue } from "../types.js";
|
|
6
6
|
/** Registry literals mirrored from WEBHOOK_EVENT_TYPES; runtime const for the registry gate. */
|
|
7
|
-
export declare const NIVA_WEBHOOK_EVENT_TYPES: readonly ["alert.fired", "alert.resolved", "call.amd_completed", "call.analysis_completed", "call.answered", "call.hangup", "call.intent_matched", "call.node_entered", "call.node_error", "call.node_warning", "call.recording_available", "call.rejected", "call.signal_triggered", "call.started", "call.transcribed", "call.transferred", "dialer.attempt.finished", "message.sent", "plan.published", "service.down", "service.up"];
|
|
7
|
+
export declare const NIVA_WEBHOOK_EVENT_TYPES: readonly ["alert.fired", "alert.resolved", "call.amd_completed", "call.analysis_completed", "call.answered", "call.hangup", "call.intent_matched", "call.node_entered", "call.node_error", "call.node_warning", "call.recording_available", "call.rejected", "call.signal_triggered", "call.started", "call.transcribed", "call.transcription_failed", "call.transferred", "dialer.attempt.finished", "message.sent", "plan.published", "service.down", "service.up", "webhook.test"];
|
|
8
8
|
/** Union of the registry event literals. */
|
|
9
9
|
export type NivaWebhookEventType = (typeof NIVA_WEBHOOK_EVENT_TYPES)[number];
|
|
10
10
|
/** Per-event data payloads of the external delivery envelope (no org_id). */
|
|
@@ -394,6 +394,19 @@ export interface NivaWebhookEventMap {
|
|
|
394
394
|
is_anonymized: boolean;
|
|
395
395
|
metadata: Record<string, string>;
|
|
396
396
|
};
|
|
397
|
+
"call.transcription_failed": {
|
|
398
|
+
/**
|
|
399
|
+
* minLength: 1
|
|
400
|
+
*/
|
|
401
|
+
call_record_id: `call_${string}`;
|
|
402
|
+
/**
|
|
403
|
+
* minLength: 1
|
|
404
|
+
*/
|
|
405
|
+
transcription_id: `ctr_${string}`;
|
|
406
|
+
metadata: Record<string, string>;
|
|
407
|
+
error_code: "ASR_REJECTED" | "RETRIES_EXHAUSTED" | "RANGE_TRANSCRIPTION_FAILED" | "PROCESSING_TIMEOUT";
|
|
408
|
+
error_message: string;
|
|
409
|
+
};
|
|
397
410
|
"call.transferred": {
|
|
398
411
|
/**
|
|
399
412
|
* minLength: 1
|
|
@@ -488,6 +501,16 @@ export interface NivaWebhookEventMap {
|
|
|
488
501
|
downtime_seconds: number | null;
|
|
489
502
|
recovered_at: string;
|
|
490
503
|
};
|
|
504
|
+
"webhook.test": {
|
|
505
|
+
/**
|
|
506
|
+
* minLength: 1
|
|
507
|
+
*/
|
|
508
|
+
webhook_endpoint_id: string;
|
|
509
|
+
/**
|
|
510
|
+
* minLength: 1
|
|
511
|
+
*/
|
|
512
|
+
message: string;
|
|
513
|
+
};
|
|
491
514
|
}
|
|
492
515
|
/** One delivery: event, event_id, timestamp plus data narrowed by K. */
|
|
493
516
|
export type NivaWebhookEvent<K extends NivaWebhookEventType = NivaWebhookEventType> = {
|