@rymi/sdk-types 1.0.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/LICENSE +21 -0
- package/README.md +17 -0
- package/dist/index.d.ts +834 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rymi AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @rymi/sdk-types
|
|
2
|
+
|
|
3
|
+
Public TypeScript types for the [Rymi](https://rymi.live) SDKs and REST API.
|
|
4
|
+
|
|
5
|
+
This package is a dependency of [`@rymi/node`](https://www.npmjs.com/package/@rymi/node) — most users don't install it directly. It ships **types only** (no runtime code), so it adds nothing to your bundle.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @rymi/sdk-types
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import type { Agent, Call, Invoice, KnowledgeSource } from '@rymi/sdk-types';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## License
|
|
16
|
+
|
|
17
|
+
MIT © Rymi AI
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,834 @@
|
|
|
1
|
+
import { AgentAdvancedConfig } from './agent.js';
|
|
2
|
+
import { AgentFeatures as AgentFeatures_2 } from './agent.js';
|
|
3
|
+
import { AgentLlmProvider } from './agent.js';
|
|
4
|
+
import { AgentPayload as AgentPayload_2 } from './agent.js';
|
|
5
|
+
import { AgentPersona as AgentPersona_2 } from './agent.js';
|
|
6
|
+
import { AgentPlaybook as AgentPlaybook_2 } from './agent.js';
|
|
7
|
+
import { AgentToolBinding } from './agentTools.js';
|
|
8
|
+
|
|
9
|
+
export declare interface Agent {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
agent_role: AgentRole;
|
|
13
|
+
language?: string | null;
|
|
14
|
+
voice?: string;
|
|
15
|
+
persona?: AgentPersona_2;
|
|
16
|
+
playbook?: AgentPlaybook_2;
|
|
17
|
+
advanced?: AgentAdvancedConfig;
|
|
18
|
+
post_call?: AgentPayload_2['post_call'];
|
|
19
|
+
features?: AgentFeatures_2;
|
|
20
|
+
llm_provider?: AgentLlmProvider;
|
|
21
|
+
llm_model?: string;
|
|
22
|
+
stt_provider?: string;
|
|
23
|
+
stt_model?: string;
|
|
24
|
+
tts_provider?: string;
|
|
25
|
+
tts_model?: string;
|
|
26
|
+
provider_config?: any;
|
|
27
|
+
raw_system_prompt?: string | null;
|
|
28
|
+
compiled_prompt?: string;
|
|
29
|
+
created_at?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Runtime and speech configuration. */
|
|
33
|
+
declare interface AgentAdvancedConfig_2 {
|
|
34
|
+
offLimitsTopics?: string;
|
|
35
|
+
prohibitedClaims?: string;
|
|
36
|
+
maxTurnLength?: number;
|
|
37
|
+
silencePromptDelay?: number;
|
|
38
|
+
postSilenceHangup?: number;
|
|
39
|
+
maxCallDuration?: number;
|
|
40
|
+
startSpeakingThreshold?: number;
|
|
41
|
+
startSpeakingPhrasing?: 'agent_greets' | 'wait_for_user';
|
|
42
|
+
replyDelay?: number;
|
|
43
|
+
stopSpeakingThreshold?: number;
|
|
44
|
+
resumeAfterInterruption?: boolean;
|
|
45
|
+
smartEndpointing?: boolean;
|
|
46
|
+
waitAfterSentence?: number;
|
|
47
|
+
waitAfterNoPunctuation?: number;
|
|
48
|
+
waitAfterNumbers?: number;
|
|
49
|
+
stt_confidence_threshold?: number;
|
|
50
|
+
stt_numeral_formatting?: boolean;
|
|
51
|
+
stt_profanity_filter?: boolean;
|
|
52
|
+
stt_keywords?: string;
|
|
53
|
+
/** Server-side noise suppression on inbound audio (Deepgram). */
|
|
54
|
+
stt_background_denoising?: boolean;
|
|
55
|
+
/** LLM sampling temperature (0–2). 0.5 is balanced. */
|
|
56
|
+
temperature?: number;
|
|
57
|
+
/** Hard cap on LLM response tokens per turn. */
|
|
58
|
+
maxTokens?: number;
|
|
59
|
+
/** Pipecat-style LLM turn-completion gating: the reply's first token is a
|
|
60
|
+
* completion marker; incomplete markers suppress the spoken reply. Default off.
|
|
61
|
+
* Stored in `agents.advanced_config` JSONB — no migration. Independent of the
|
|
62
|
+
* agent's core-LLM choice (eval results are advisory; works best on gpt-4o-mini). */
|
|
63
|
+
turnCompletion?: {
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
markerSet?: 'unicode' | 'ascii';
|
|
66
|
+
incompleteShortMs?: number;
|
|
67
|
+
incompleteLongMs?: number;
|
|
68
|
+
};
|
|
69
|
+
prompt_mode?: 'builder' | 'raw';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export declare interface AgentCallerPersona {
|
|
73
|
+
type?: string;
|
|
74
|
+
approach?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export declare interface AgentConfig {
|
|
78
|
+
id?: string;
|
|
79
|
+
name: string;
|
|
80
|
+
companyName: string;
|
|
81
|
+
companyWebsite: string;
|
|
82
|
+
companyDescription: string;
|
|
83
|
+
knowledgeBase: string[];
|
|
84
|
+
role: string;
|
|
85
|
+
audienceDescription: string;
|
|
86
|
+
tone: string;
|
|
87
|
+
llm_provider: 'gemini' | 'openai' | 'anthropic' | 'sarvam';
|
|
88
|
+
llm_model: string | null;
|
|
89
|
+
llm_fallback_provider?: string | null;
|
|
90
|
+
llm_fallback_model?: string | null;
|
|
91
|
+
stt_provider?: string;
|
|
92
|
+
stt_model?: string | null;
|
|
93
|
+
stt_fallback_provider?: string | null;
|
|
94
|
+
stt_fallback_model?: string | null;
|
|
95
|
+
tts_provider?: string;
|
|
96
|
+
tts_model?: string | null;
|
|
97
|
+
tts_fallback_provider?: string | null;
|
|
98
|
+
tts_fallback_model?: string | null;
|
|
99
|
+
custom_llm_url?: string | null;
|
|
100
|
+
custom_voice_url?: string | null;
|
|
101
|
+
/** Wire shape used by the custom voice endpoint when tts_provider is 'custom-voice'. */
|
|
102
|
+
custom_voice_mode?: 'rymi' | 'openai-compat';
|
|
103
|
+
custom_transcriber_url?: string | null;
|
|
104
|
+
agent_role: 'operator' | 'specialist' | 'executive' | 'concierge';
|
|
105
|
+
language: string | null;
|
|
106
|
+
supported_languages: string[];
|
|
107
|
+
voice: string;
|
|
108
|
+
accent: string;
|
|
109
|
+
bargeInEnabled: boolean;
|
|
110
|
+
callerPersonas: any[];
|
|
111
|
+
opener: string;
|
|
112
|
+
qualificationFlow: AgentQualificationStep[];
|
|
113
|
+
requiredSlots: string[];
|
|
114
|
+
primaryCTA: string;
|
|
115
|
+
backupGoal?: string;
|
|
116
|
+
fallbackCTA: string;
|
|
117
|
+
escalationRule: string;
|
|
118
|
+
/** Final line the agent says right before hanging up a successful call. */
|
|
119
|
+
endCallMessage: string;
|
|
120
|
+
scripts: any[];
|
|
121
|
+
objections: any[];
|
|
122
|
+
successCriteria: any[];
|
|
123
|
+
extractionTags: any[];
|
|
124
|
+
postCallSchema: string[];
|
|
125
|
+
restrictedTopics: string[];
|
|
126
|
+
forbiddenPromises: string[];
|
|
127
|
+
offLimits: string;
|
|
128
|
+
prohibitedClaims: string;
|
|
129
|
+
maxTurnLength: number;
|
|
130
|
+
silencePromptDelay: number;
|
|
131
|
+
postSilenceHangup: number;
|
|
132
|
+
maxCallDuration: number;
|
|
133
|
+
startSpeakingThreshold: number;
|
|
134
|
+
startSpeakingPhrasing: 'agent_greets' | 'wait_for_user';
|
|
135
|
+
replyDelay: number;
|
|
136
|
+
stopSpeakingThreshold: number;
|
|
137
|
+
resumeAfterInterruption: boolean;
|
|
138
|
+
smartEndpointing: boolean;
|
|
139
|
+
waitAfterSentence: number;
|
|
140
|
+
waitAfterNoPunctuation: number;
|
|
141
|
+
waitAfterNumbers: number;
|
|
142
|
+
stt_confidence_threshold: number;
|
|
143
|
+
stt_numeral_formatting: boolean;
|
|
144
|
+
stt_profanity_filter: boolean;
|
|
145
|
+
stt_keywords: string;
|
|
146
|
+
stt_background_denoising: boolean;
|
|
147
|
+
/** LLM sampling temperature (0–2). Defaults to 0.5. */
|
|
148
|
+
temperature: number;
|
|
149
|
+
/** Hard cap on LLM response tokens per turn. Defaults to 250. */
|
|
150
|
+
maxTokens: number;
|
|
151
|
+
recordingEnabled: boolean;
|
|
152
|
+
transcriptionEnabled: boolean;
|
|
153
|
+
requireConsent: boolean;
|
|
154
|
+
postCallSummaryEnabled: boolean;
|
|
155
|
+
postCallSummaryPrompt: string;
|
|
156
|
+
postCallExtractionEnabled: boolean;
|
|
157
|
+
postCallExtractionFields: string[];
|
|
158
|
+
postCallEvaluationEnabled: boolean;
|
|
159
|
+
postCallEvaluationRubric: string;
|
|
160
|
+
postCallLlmProvider: 'gemini' | 'openai' | '';
|
|
161
|
+
postCallLlmModel: string;
|
|
162
|
+
transferNumber: string;
|
|
163
|
+
smsContinuationEnabled: boolean;
|
|
164
|
+
smsContinuationReconnectUrl: string;
|
|
165
|
+
voicemailBehavior: 'leave_message' | 'hangup';
|
|
166
|
+
voicemailScript: string;
|
|
167
|
+
disableCallerMemory: boolean;
|
|
168
|
+
provider_config?: any;
|
|
169
|
+
attached_numbers?: string[];
|
|
170
|
+
chat_summary?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Per-agent built-in tool bindings. v1 ships three vetted tools (calendar /
|
|
173
|
+
* ticket / customer lookup) — see BUILTIN_TOOL_CATALOG. Optional for back-
|
|
174
|
+
* compat: agents that pre-date this field default to "no tools enabled".
|
|
175
|
+
*/
|
|
176
|
+
tools?: AgentToolBinding[];
|
|
177
|
+
variables?: AgentVariable[];
|
|
178
|
+
promptMode?: 'builder' | 'raw';
|
|
179
|
+
rawSystemPrompt?: string | null;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** Feature flags for recording, transcription, and consent. */
|
|
183
|
+
export declare interface AgentFeatures {
|
|
184
|
+
recording_enabled?: boolean;
|
|
185
|
+
transcription_enabled?: boolean;
|
|
186
|
+
require_consent?: boolean;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Typed interfaces for the Rymi Agent configuration schema.
|
|
191
|
+
*
|
|
192
|
+
* These match the shape accepted by POST /v1/agents and PUT /v1/agents/:id.
|
|
193
|
+
* The canonical JSON Schema definitions live in agentRouteSchemas.ts (API).
|
|
194
|
+
*/
|
|
195
|
+
declare type AgentLlmProvider_2 = 'gemini' | 'openai' | 'anthropic' | 'sarvam';
|
|
196
|
+
|
|
197
|
+
declare interface AgentObjectionHandler {
|
|
198
|
+
trigger?: string;
|
|
199
|
+
response?: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The complete agent payload shape accepted by the REST API.
|
|
204
|
+
* Use this as the canonical "middle JSON" for serialisation, import/export, and cloning.
|
|
205
|
+
*/
|
|
206
|
+
export declare interface AgentPayload {
|
|
207
|
+
name: string;
|
|
208
|
+
voice?: string;
|
|
209
|
+
language?: string | null;
|
|
210
|
+
supported_languages?: string[];
|
|
211
|
+
agent_role?: 'operator' | 'specialist' | 'executive' | 'concierge';
|
|
212
|
+
llm_provider?: AgentLlmProvider_2;
|
|
213
|
+
llm_model?: string;
|
|
214
|
+
llm_fallback_provider?: string | null;
|
|
215
|
+
llm_fallback_model?: string | null;
|
|
216
|
+
stt_provider?: string;
|
|
217
|
+
stt_model?: string;
|
|
218
|
+
stt_fallback_provider?: string | null;
|
|
219
|
+
stt_fallback_model?: string | null;
|
|
220
|
+
tts_provider?: string;
|
|
221
|
+
tts_model?: string;
|
|
222
|
+
tts_fallback_provider?: string | null;
|
|
223
|
+
tts_fallback_model?: string | null;
|
|
224
|
+
persona?: AgentPersona;
|
|
225
|
+
playbook?: AgentPlaybook;
|
|
226
|
+
advanced?: AgentAdvancedConfig_2;
|
|
227
|
+
features?: AgentFeatures;
|
|
228
|
+
post_call?: {
|
|
229
|
+
summary?: {
|
|
230
|
+
enabled?: boolean;
|
|
231
|
+
prompt?: string | null;
|
|
232
|
+
};
|
|
233
|
+
evaluation?: {
|
|
234
|
+
rubric?: string | null;
|
|
235
|
+
};
|
|
236
|
+
structured_extraction?: {
|
|
237
|
+
prompt?: string | null;
|
|
238
|
+
json_schema?: Record<string, any> | null;
|
|
239
|
+
};
|
|
240
|
+
model?: {
|
|
241
|
+
provider?: AgentLlmProvider_2 | null;
|
|
242
|
+
model?: string | null;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/** Structured persona: who the agent is, who it talks to, and how it sounds. */
|
|
248
|
+
export declare interface AgentPersona {
|
|
249
|
+
role?: string;
|
|
250
|
+
audienceDescription?: string;
|
|
251
|
+
toneOverride?: string;
|
|
252
|
+
successCriteria?: string[];
|
|
253
|
+
voiceConfig?: AgentVoiceConfig;
|
|
254
|
+
callerPersonas?: AgentCallerPersona[];
|
|
255
|
+
/** Company context injected into the system prompt. */
|
|
256
|
+
companyName?: string;
|
|
257
|
+
companyWebsite?: string;
|
|
258
|
+
companyDescription?: string;
|
|
259
|
+
knowledgeBase?: string[];
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/** Structured playbook: conversation flow, objections, scripts, and CTAs. */
|
|
263
|
+
export declare interface AgentPlaybook {
|
|
264
|
+
opener?: string;
|
|
265
|
+
qualificationFlow?: AgentQualificationStep[];
|
|
266
|
+
requiredSlots?: AgentRequiredSlot[];
|
|
267
|
+
objectionHandlers?: AgentObjectionHandler[];
|
|
268
|
+
scripts?: AgentScript[];
|
|
269
|
+
closingCTA?: string;
|
|
270
|
+
fallbackCTA?: string;
|
|
271
|
+
escalationRule?: string;
|
|
272
|
+
/** Final line the agent says right before hanging up a successful call. */
|
|
273
|
+
endCallMessage?: string;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
declare interface AgentQualificationStep {
|
|
277
|
+
question?: string;
|
|
278
|
+
prompt?: string;
|
|
279
|
+
listensFor?: string;
|
|
280
|
+
listens_for?: string;
|
|
281
|
+
listenFor?: string;
|
|
282
|
+
slotName?: string;
|
|
283
|
+
slot_name?: string;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export declare interface AgentRequiredSlot {
|
|
287
|
+
name?: string;
|
|
288
|
+
description?: string;
|
|
289
|
+
required?: boolean;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export declare type AgentRole = 'operator' | 'specialist' | 'executive' | 'concierge';
|
|
293
|
+
|
|
294
|
+
export declare interface AgentScript {
|
|
295
|
+
title?: string;
|
|
296
|
+
when?: string;
|
|
297
|
+
content?: string;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export declare interface AgentTemplate {
|
|
301
|
+
id: string;
|
|
302
|
+
label: string;
|
|
303
|
+
icon: string;
|
|
304
|
+
description: string;
|
|
305
|
+
color: string;
|
|
306
|
+
defaults: AgentTemplateDefaults;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
declare interface AgentTemplateDefaults {
|
|
310
|
+
role: string;
|
|
311
|
+
audienceDescription: string;
|
|
312
|
+
tone: string;
|
|
313
|
+
opener: string;
|
|
314
|
+
qualificationFlow: Array<{
|
|
315
|
+
question: string;
|
|
316
|
+
listens_for: string;
|
|
317
|
+
}>;
|
|
318
|
+
requiredSlots: string[];
|
|
319
|
+
primaryCTA: string;
|
|
320
|
+
fallbackCTA: string;
|
|
321
|
+
escalationRule: string;
|
|
322
|
+
scripts: Array<{
|
|
323
|
+
title: string;
|
|
324
|
+
when_to_use: string;
|
|
325
|
+
content: string;
|
|
326
|
+
}>;
|
|
327
|
+
objections: Array<{
|
|
328
|
+
trigger: string;
|
|
329
|
+
response: string;
|
|
330
|
+
}>;
|
|
331
|
+
successCriteria: string[];
|
|
332
|
+
offLimits: string;
|
|
333
|
+
prohibitedClaims: string;
|
|
334
|
+
language?: string;
|
|
335
|
+
agentRole?: 'operator' | 'specialist' | 'executive' | 'concierge';
|
|
336
|
+
bargeInEnabled?: boolean;
|
|
337
|
+
maxCallDuration?: number;
|
|
338
|
+
knowledgeBaseHints?: string[];
|
|
339
|
+
extractionTags?: string[];
|
|
340
|
+
restrictedTopics?: string[];
|
|
341
|
+
forbiddenPromises?: string[];
|
|
342
|
+
recordingEnabled?: boolean;
|
|
343
|
+
transcriptionEnabled?: boolean;
|
|
344
|
+
requireConsent?: boolean;
|
|
345
|
+
postCallSummaryEnabled?: boolean;
|
|
346
|
+
postCallSummaryPrompt?: string;
|
|
347
|
+
postCallExtractionEnabled?: boolean;
|
|
348
|
+
postCallExtractionFields?: string[];
|
|
349
|
+
postCallEvaluationEnabled?: boolean;
|
|
350
|
+
postCallEvaluationRubric?: string;
|
|
351
|
+
stt_keywords?: string;
|
|
352
|
+
callerPersonas?: Array<{
|
|
353
|
+
type: string;
|
|
354
|
+
detectedWhen: string;
|
|
355
|
+
approach: string;
|
|
356
|
+
}>;
|
|
357
|
+
setupQuestions?: SetupQuestion[];
|
|
358
|
+
variables?: AgentVariable[];
|
|
359
|
+
matchKeywords?: string[];
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export declare type AgentTemplateStatus = 'draft' | 'submitted' | 'approved' | 'published' | 'rejected' | 'archived';
|
|
363
|
+
|
|
364
|
+
export declare type AgentTemplateVisibility = 'private' | 'tenant' | 'public';
|
|
365
|
+
|
|
366
|
+
export declare interface AgentVariable {
|
|
367
|
+
key: string;
|
|
368
|
+
description: string;
|
|
369
|
+
metadataKey?: string;
|
|
370
|
+
required: boolean;
|
|
371
|
+
default?: string;
|
|
372
|
+
/**
|
|
373
|
+
* Live METHOD when not satisfied by input/default. Optional on the wire for
|
|
374
|
+
* legacy rows; use `normalizeVariableAcquisition` to read a concrete value.
|
|
375
|
+
*/
|
|
376
|
+
acquisition?: VariableAcquisition;
|
|
377
|
+
origin?: VariableOrigin;
|
|
378
|
+
/**
|
|
379
|
+
* Value type used to validate incoming metadata. When omitted the variable
|
|
380
|
+
* behaves as a free-form string (legacy behavior, byte-identical resolution).
|
|
381
|
+
* A metadata value that does not satisfy this type is treated as missing.
|
|
382
|
+
*/
|
|
383
|
+
type?: AgentVariableType;
|
|
384
|
+
/**
|
|
385
|
+
* Allowed values when `type === 'enum'`. A metadata value not in this list is
|
|
386
|
+
* treated as missing. Ignored for non-enum types. An enum with no/empty
|
|
387
|
+
* `enumValues` falls back to lenient string passthrough.
|
|
388
|
+
*/
|
|
389
|
+
enumValues?: string[];
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/** Allowed value-type for a caller variable. Absent ⇒ treated as 'string'. */
|
|
393
|
+
declare type AgentVariableType = 'string' | 'number' | 'boolean' | 'enum';
|
|
394
|
+
|
|
395
|
+
export declare interface AgentVoiceConfig {
|
|
396
|
+
voiceId?: string;
|
|
397
|
+
language?: string;
|
|
398
|
+
accent?: string;
|
|
399
|
+
bargeInEnabled?: boolean;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export declare type BuiltinAgentToolId = 'handoff_to_human' | 'check_calendar_availability' | 'list_calendar_events' | 'create_calendar_event' | 'update_calendar_event' | 'delete_calendar_event' | 'lookup_customer' | 'send_whatsapp_message' | 'send_telegram_message' | 'send_asset';
|
|
403
|
+
|
|
404
|
+
export declare interface Call {
|
|
405
|
+
id: string;
|
|
406
|
+
room_name: string;
|
|
407
|
+
user_id?: string;
|
|
408
|
+
tenant_id?: string;
|
|
409
|
+
agent_id: string;
|
|
410
|
+
status: CallStatus;
|
|
411
|
+
recording_status: 'none' | 'requested' | 'active' | 'processing' | 'completed' | 'failed';
|
|
412
|
+
started_at: string | null;
|
|
413
|
+
ended_at: string | null;
|
|
414
|
+
end_reason?: string | null;
|
|
415
|
+
error_code?: string | null;
|
|
416
|
+
error_message?: string | null;
|
|
417
|
+
metadata: Record<string, any>;
|
|
418
|
+
created_at: string;
|
|
419
|
+
updated_at: string;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export declare interface CallEvaluationResult {
|
|
423
|
+
rubric: string;
|
|
424
|
+
passed: boolean | null;
|
|
425
|
+
score: number | null;
|
|
426
|
+
reasoning: string | null;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export declare type CallIntelligenceStatus = 'not_started' | 'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'dead_letter';
|
|
430
|
+
|
|
431
|
+
export declare interface CallParticipant {
|
|
432
|
+
id: string;
|
|
433
|
+
call_id: string;
|
|
434
|
+
user_id?: string | null;
|
|
435
|
+
role: CallParticipantRole;
|
|
436
|
+
transport: CallParticipantTransport;
|
|
437
|
+
identity: string;
|
|
438
|
+
status: CallParticipantStatus;
|
|
439
|
+
metadata: Record<string, any>;
|
|
440
|
+
joined_at: string;
|
|
441
|
+
left_at: string | null;
|
|
442
|
+
created_at: string;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export declare type CallParticipantRole = 'agent' | 'customer' | 'observer';
|
|
446
|
+
|
|
447
|
+
export declare type CallParticipantStatus = 'joining' | 'active' | 'left' | 'failed';
|
|
448
|
+
|
|
449
|
+
export declare type CallParticipantTransport = 'webrtc' | 'pstn' | 'sip' | 'internal';
|
|
450
|
+
|
|
451
|
+
export declare interface CallRecording {
|
|
452
|
+
id: string;
|
|
453
|
+
call_id: string;
|
|
454
|
+
participant_id?: string | null;
|
|
455
|
+
recording_url?: string | null;
|
|
456
|
+
provider_recording_id?: string | null;
|
|
457
|
+
format: string;
|
|
458
|
+
status: 'processing' | 'completed' | 'failed';
|
|
459
|
+
duration?: number | null;
|
|
460
|
+
size_bytes?: number | null;
|
|
461
|
+
metadata: Record<string, any>;
|
|
462
|
+
created_at: string;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export declare type CallSentiment = 'positive' | 'neutral' | 'negative' | 'unknown';
|
|
466
|
+
|
|
467
|
+
export declare type CallStatus = 'queued' | 'ringing' | 'in_progress' | 'completed' | 'failed' | 'no_answer' | 'busy' | 'canceled';
|
|
468
|
+
|
|
469
|
+
export declare interface CallStatusChangedEvent extends TelephonyBaseEvent {
|
|
470
|
+
type: 'call.status_changed';
|
|
471
|
+
status: TelephonyCallStatus;
|
|
472
|
+
callId: string;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export declare interface CallTranscriptEvent {
|
|
476
|
+
id: string;
|
|
477
|
+
call_id: string;
|
|
478
|
+
participant_id: string | null;
|
|
479
|
+
role: 'user' | 'agent';
|
|
480
|
+
text: string;
|
|
481
|
+
sequence: number;
|
|
482
|
+
source: 'runtime' | 'stt' | 'post_call';
|
|
483
|
+
started_at_ms: number | null;
|
|
484
|
+
ended_at_ms: number | null;
|
|
485
|
+
metadata: Record<string, any>;
|
|
486
|
+
created_at: string;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
declare type CallTranscriptSpeaker = 'user' | 'agent';
|
|
490
|
+
|
|
491
|
+
declare interface CapabilityUnsupportedEvent extends TelephonyBaseEvent {
|
|
492
|
+
type: 'capability.unsupported';
|
|
493
|
+
requestedType: TelephonyEventType;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
declare type ConnectorCategory = 'calendar' | 'crm' | 'ticketing' | 'messaging';
|
|
497
|
+
|
|
498
|
+
/** Safe view of a workspace connector connection. NEVER includes tokens. */
|
|
499
|
+
export declare interface ConnectorConnectionSafeView {
|
|
500
|
+
id: string;
|
|
501
|
+
provider: string;
|
|
502
|
+
category: ConnectorCategory;
|
|
503
|
+
displayName: string;
|
|
504
|
+
accountName: string;
|
|
505
|
+
status: 'connected' | 'expired' | 'error';
|
|
506
|
+
scopes: string[];
|
|
507
|
+
connectedAt: string;
|
|
508
|
+
expiresAt: string | null;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export declare type CreateKnowledgeSourceRequest = CreateKnowledgeSourceTextRequest | CreateKnowledgeSourceUrlRequest;
|
|
512
|
+
|
|
513
|
+
/** Request body for POST /agents/:id/knowledge-sources (text mode). */
|
|
514
|
+
export declare interface CreateKnowledgeSourceTextRequest {
|
|
515
|
+
kind: 'text';
|
|
516
|
+
title: string;
|
|
517
|
+
text: string;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/** Request body for POST /agents/:id/knowledge-sources (url mode). */
|
|
521
|
+
export declare interface CreateKnowledgeSourceUrlRequest {
|
|
522
|
+
kind: 'url';
|
|
523
|
+
title: string;
|
|
524
|
+
url: string;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
declare interface DtmfReceivedEvent extends TelephonyBaseEvent {
|
|
528
|
+
type: 'dtmf.received';
|
|
529
|
+
digit: string;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export declare interface Invoice {
|
|
533
|
+
id: string;
|
|
534
|
+
invoice_number: string;
|
|
535
|
+
tenant_id: string;
|
|
536
|
+
kind: InvoiceKind;
|
|
537
|
+
status: InvoiceStatus;
|
|
538
|
+
currency: string;
|
|
539
|
+
subtotal_minor: number;
|
|
540
|
+
tax_minor: number;
|
|
541
|
+
discount_minor: number;
|
|
542
|
+
total_minor: number;
|
|
543
|
+
gateway: InvoiceGateway;
|
|
544
|
+
gateway_invoice_id: string | null;
|
|
545
|
+
payment_event_id: string | null;
|
|
546
|
+
period_start: string | null;
|
|
547
|
+
period_end: string | null;
|
|
548
|
+
issued_at: string;
|
|
549
|
+
paid_at: string | null;
|
|
550
|
+
voided_at: string | null;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export declare interface InvoiceDetailResponse {
|
|
554
|
+
invoice: Invoice;
|
|
555
|
+
items: InvoiceItem[];
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export declare type InvoiceGateway = 'stripe' | 'razorpay';
|
|
559
|
+
|
|
560
|
+
export declare interface InvoiceItem {
|
|
561
|
+
id: string;
|
|
562
|
+
invoice_id: string;
|
|
563
|
+
kind: InvoiceItemKind;
|
|
564
|
+
description: string;
|
|
565
|
+
quantity: number;
|
|
566
|
+
unit_amount_minor: number;
|
|
567
|
+
amount_minor: number;
|
|
568
|
+
plan_id: string | null;
|
|
569
|
+
credit_transaction_id: string | null;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export declare type InvoiceItemKind = 'topup' | 'discount' | 'tax_line' | 'adjustment';
|
|
573
|
+
|
|
574
|
+
export declare type InvoiceKind = 'topup' | 'adjustment';
|
|
575
|
+
|
|
576
|
+
export declare interface InvoiceListResponse {
|
|
577
|
+
invoices: Invoice[];
|
|
578
|
+
next_cursor: string | null;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export declare type InvoiceStatus = 'paid' | 'failed' | 'pending' | 'void' | 'refunded';
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Single embedded chunk produced by the ingestion pipeline.
|
|
585
|
+
* Returned by the runtime knowledge_search tool with a similarity score.
|
|
586
|
+
*/
|
|
587
|
+
export declare interface KnowledgeChunk {
|
|
588
|
+
id: string;
|
|
589
|
+
source_id: string;
|
|
590
|
+
agent_id: string;
|
|
591
|
+
tenant_id: string;
|
|
592
|
+
chunk_index: number;
|
|
593
|
+
text: string;
|
|
594
|
+
/** Cosine similarity in [0, 1]. Only present on retrieval results. */
|
|
595
|
+
score?: number;
|
|
596
|
+
bytes: number;
|
|
597
|
+
created_at: string;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* A user-supplied knowledge unit attached to an agent. Chunked and
|
|
602
|
+
* embedded into KnowledgeChunk rows for retrieval.
|
|
603
|
+
*/
|
|
604
|
+
export declare interface KnowledgeSource {
|
|
605
|
+
id: string;
|
|
606
|
+
agent_id: string;
|
|
607
|
+
tenant_id: string;
|
|
608
|
+
kind: KnowledgeSourceKind;
|
|
609
|
+
title: string;
|
|
610
|
+
/** URL when kind='url', filename when kind='file', null for kind='text'. */
|
|
611
|
+
source_uri: string | null;
|
|
612
|
+
status: KnowledgeSourceStatus;
|
|
613
|
+
failure_reason: KnowledgeSourceFailureReason | string | null;
|
|
614
|
+
/** SHA-256 of the raw source content. Used to detect stale chunks. */
|
|
615
|
+
content_hash: string | null;
|
|
616
|
+
/** Incremented on each successful re-ingest. */
|
|
617
|
+
version: number;
|
|
618
|
+
chunk_count: number;
|
|
619
|
+
bytes: number;
|
|
620
|
+
created_at: string;
|
|
621
|
+
updated_at: string;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Stable reason codes for knowledge source failure and quota enforcement.
|
|
626
|
+
* UI copy lives separately; branch on these codes, not on message strings.
|
|
627
|
+
*/
|
|
628
|
+
declare type KnowledgeSourceFailureReason = 'fetch_failed' | 'extraction_failed' | 'embedding_failed' | 'quota_exceeded' | 'file_too_large' | 'unsupported_mime_type' | 'permission_denied' | 'storage_error' | 'unknown';
|
|
629
|
+
|
|
630
|
+
export declare type KnowledgeSourceKind = 'text' | 'url' | 'file';
|
|
631
|
+
|
|
632
|
+
/** Full lifecycle state for a knowledge source. */
|
|
633
|
+
export declare type KnowledgeSourceStatus = 'pending' | 'indexing' | 'ready' | 'failed';
|
|
634
|
+
|
|
635
|
+
export declare interface MachineDetectedEvent extends TelephonyBaseEvent {
|
|
636
|
+
type: 'machine.detected';
|
|
637
|
+
confidence: number;
|
|
638
|
+
/** Whether a voicemail beep was also detected. */
|
|
639
|
+
beepDetected: boolean;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
declare interface MediaConnectedEvent extends TelephonyBaseEvent {
|
|
643
|
+
type: 'media.connected';
|
|
644
|
+
sampleRate: number;
|
|
645
|
+
channels: number;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
declare interface MediaDisconnectedEvent extends TelephonyBaseEvent {
|
|
649
|
+
type: 'media.disconnected';
|
|
650
|
+
reason: string;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export declare interface PostCallStructuredExtractionConfig {
|
|
654
|
+
prompt: string | null;
|
|
655
|
+
json_schema: Record<string, any> | null;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export declare interface RecordingCompletedEvent extends TelephonyBaseEvent {
|
|
659
|
+
type: 'recording.completed';
|
|
660
|
+
recordingId: string;
|
|
661
|
+
durationMs: number;
|
|
662
|
+
url?: string;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
declare interface RecordingStartedEvent extends TelephonyBaseEvent {
|
|
666
|
+
type: 'recording.started';
|
|
667
|
+
recordingId: string;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Public-facing labels for runtime reason codes the backend emits on call
|
|
672
|
+
* records (`end_reason`, end-reason distributions, handoff metadata).
|
|
673
|
+
*
|
|
674
|
+
* The codes themselves are the source of truth in
|
|
675
|
+
* `@rymi/agents-core/src/reasonCodes.ts`. This module is the UI label layer:
|
|
676
|
+
* Studio, call detail, dashboards, and admin views map codes to copy here
|
|
677
|
+
* instead of de-snake-casing the wire format on the fly.
|
|
678
|
+
*
|
|
679
|
+
* Rules:
|
|
680
|
+
* - Adding/changing a public label is a UI copy change, never a contract
|
|
681
|
+
* change. The backend code remains untouched.
|
|
682
|
+
* - Unknown codes fall back to a Title Case of the snake_case so legacy
|
|
683
|
+
* call rows still render readably.
|
|
684
|
+
* - Labels stay short and declarative per `design.md` voice rules.
|
|
685
|
+
*/
|
|
686
|
+
/** Known session-close reasons rendered on call records. */
|
|
687
|
+
export declare type SessionEndReasonCode = 'end_call_tool' | 'handoff_to_human' | 'handoff_to_agent' | 'user_disconnect' | 'provider_disconnect' | 'error' | 'timeout' | 'closed';
|
|
688
|
+
|
|
689
|
+
export declare interface SetupQuestion {
|
|
690
|
+
id: string;
|
|
691
|
+
header: string;
|
|
692
|
+
question: string;
|
|
693
|
+
helper?: string;
|
|
694
|
+
options: SetupQuestionOption[];
|
|
695
|
+
multiSelect: boolean;
|
|
696
|
+
writes: SetupWrite[];
|
|
697
|
+
defaultValue?: string | string[];
|
|
698
|
+
allowFreeText?: boolean;
|
|
699
|
+
placeholder?: string;
|
|
700
|
+
required: boolean;
|
|
701
|
+
dependsOn?: {
|
|
702
|
+
id: string;
|
|
703
|
+
equals: string;
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
declare interface SetupQuestionOption {
|
|
708
|
+
label: string;
|
|
709
|
+
description: string;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
declare type SetupWrite = {
|
|
713
|
+
kind: 'set';
|
|
714
|
+
key: string;
|
|
715
|
+
} | {
|
|
716
|
+
kind: 'append';
|
|
717
|
+
key: string;
|
|
718
|
+
} | {
|
|
719
|
+
kind: 'replace';
|
|
720
|
+
key: string;
|
|
721
|
+
} | {
|
|
722
|
+
kind: 'append-csv';
|
|
723
|
+
key: string;
|
|
724
|
+
} | {
|
|
725
|
+
kind: 'opener-template';
|
|
726
|
+
token: string;
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
declare interface TelephonyBaseEvent {
|
|
730
|
+
type: TelephonyEventType;
|
|
731
|
+
timestampMs: number;
|
|
732
|
+
/** Provider-specific raw event — for debugging only, never branch on this. */
|
|
733
|
+
providerRaw?: unknown;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
declare type TelephonyCallStatus = 'ringing' | 'answered' | 'in_progress' | 'completed' | 'failed' | 'busy' | 'no_answer' | 'canceled';
|
|
737
|
+
|
|
738
|
+
export declare type TelephonyEvent = CallStatusChangedEvent | MediaConnectedEvent | MediaDisconnectedEvent | DtmfReceivedEvent | MachineDetectedEvent | VoicemailBeepEvent | RecordingStartedEvent | RecordingCompletedEvent | TransferInitiatedEvent | TransferCompletedEvent | TransferFailedEvent | CapabilityUnsupportedEvent;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Provider-neutral telephony event vocabulary.
|
|
742
|
+
*
|
|
743
|
+
* Transport packages (LiveKit, Twilio, browser, WebSocket) normalize their
|
|
744
|
+
* provider-specific callbacks into this shared event model. Future
|
|
745
|
+
* DTMF/voicemail/recording/machine-detection UI controls consume these
|
|
746
|
+
* events without knowing the underlying provider.
|
|
747
|
+
*
|
|
748
|
+
* Rules:
|
|
749
|
+
* - Use `TelephonyEventType` values in all transport adapters — never raw strings.
|
|
750
|
+
* - Unsupported event types on a transport should emit `'capability.unsupported'`
|
|
751
|
+
* rather than silently dropping.
|
|
752
|
+
* - `TelephonyCapabilityReport` lets callers discover what a transport can do
|
|
753
|
+
* without a runtime try/catch.
|
|
754
|
+
*/
|
|
755
|
+
export declare type TelephonyEventType = 'call.status_changed' | 'media.connected' | 'media.disconnected' | 'dtmf.received' | 'machine.detected' | 'voicemail.beep' | 'recording.started' | 'recording.completed' | 'transfer.initiated' | 'transfer.completed' | 'transfer.failed' | 'capability.unsupported';
|
|
756
|
+
|
|
757
|
+
export declare interface TelephonyLeg {
|
|
758
|
+
id: string;
|
|
759
|
+
call_id: string;
|
|
760
|
+
participant_id: string;
|
|
761
|
+
provider: 'plivo' | 'twilio' | 'vonage';
|
|
762
|
+
provider_call_id?: string | null;
|
|
763
|
+
direction: 'inbound' | 'outbound';
|
|
764
|
+
status: string;
|
|
765
|
+
from_number?: string | null;
|
|
766
|
+
to_number?: string | null;
|
|
767
|
+
cost: number;
|
|
768
|
+
duration: number;
|
|
769
|
+
metadata: Record<string, any>;
|
|
770
|
+
created_at: string;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Safe view of tool capability state for SDK/MCP responses.
|
|
775
|
+
* Omits internal fields that expose tenant credential structure.
|
|
776
|
+
*/
|
|
777
|
+
export declare interface ToolCapabilitySafeView {
|
|
778
|
+
toolId: string;
|
|
779
|
+
available: boolean;
|
|
780
|
+
unavailableReason: ToolUnavailableReason | null;
|
|
781
|
+
sideEffect: 'read' | 'write';
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/** Stable reason codes for why a tool is unavailable on a given call. */
|
|
785
|
+
declare type ToolUnavailableReason = 'agent_tool_disabled' | 'missing_credential' | 'missing_caller_phone' | 'missing_telegram_chat_id' | 'missing_transfer_number' | 'blocked_by_mvp_policy' | 'not_supported_in_runtime' | 'provider_not_configured' | 'auth_error' | 'credential_expired' | 'context_missing' | 'policy_blocked' | 'plan_gate' | 'runtime_not_initialized' | 'rate_limited';
|
|
786
|
+
|
|
787
|
+
export declare interface TranscriptionResult {
|
|
788
|
+
text: string;
|
|
789
|
+
confidence: number | null;
|
|
790
|
+
languageCode?: string | null;
|
|
791
|
+
isFinal?: boolean;
|
|
792
|
+
provider?: string | null;
|
|
793
|
+
model?: string | null;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
export declare interface TranscriptSegment {
|
|
797
|
+
id?: string;
|
|
798
|
+
speaker: CallTranscriptSpeaker;
|
|
799
|
+
text: string;
|
|
800
|
+
sequence: number;
|
|
801
|
+
started_at_ms: number;
|
|
802
|
+
ended_at_ms: number;
|
|
803
|
+
is_final: boolean;
|
|
804
|
+
source: string;
|
|
805
|
+
created_at?: string;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
export declare interface TransferCompletedEvent extends TelephonyBaseEvent {
|
|
809
|
+
type: 'transfer.completed';
|
|
810
|
+
target: string;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
declare interface TransferFailedEvent extends TelephonyBaseEvent {
|
|
814
|
+
type: 'transfer.failed';
|
|
815
|
+
target: string;
|
|
816
|
+
reason: string;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
declare interface TransferInitiatedEvent extends TelephonyBaseEvent {
|
|
820
|
+
type: 'transfer.initiated';
|
|
821
|
+
target: string;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
/** How the agent obtains a variable live when input/default did not satisfy it. */
|
|
825
|
+
declare type VariableAcquisition = 'ask' | 'extract' | 'none';
|
|
826
|
+
|
|
827
|
+
/** Where a variable was first authored (for Studio UX / badges). */
|
|
828
|
+
declare type VariableOrigin = 'caller' | 'playbook' | 'postcall' | 'prompt' | 'template';
|
|
829
|
+
|
|
830
|
+
declare interface VoicemailBeepEvent extends TelephonyBaseEvent {
|
|
831
|
+
type: 'voicemail.beep';
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export { }
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/index.ts
|
|
17
|
+
var index_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(index_exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @rymi/sdk-types — the ONLY public type surface for Rymi SDKs.\n//\n// Rule: every export here is named and reviewed. NEVER use `export *`.\n// Adding a symbol is a public API decision — check it against the denylist\n// in docs/launch/2026-06-23-sdk-mirror-publishing-plan.md and against the\n// leak-guard test in ./test/no-leak.test.ts before adding.\n\n// --- Agent definition ---\nexport type {\n Agent,\n AgentConfig,\n AgentPayload,\n AgentVoiceConfig,\n AgentPersona,\n AgentCallerPersona,\n AgentVariable,\n AgentRequiredSlot,\n AgentPlaybook,\n AgentScript,\n AgentFeatures\n} from '@rymi/shared-types';\n\n// --- Calls ---\nexport type {\n Call,\n CallParticipant,\n CallStatus,\n CallParticipantRole,\n CallParticipantTransport,\n CallParticipantStatus,\n CallRecording,\n TelephonyLeg,\n TranscriptionResult,\n AgentRole\n} from '@rymi/shared-types';\n\n// --- Billing (invoices) ---\nexport type {\n Invoice,\n InvoiceItem,\n InvoiceListResponse,\n InvoiceDetailResponse,\n InvoiceStatus,\n InvoiceKind,\n InvoiceItemKind,\n InvoiceGateway\n} from '@rymi/shared-types';\n\n// --- Knowledge base ---\nexport type {\n KnowledgeSource,\n KnowledgeChunk,\n KnowledgeSourceKind,\n KnowledgeSourceStatus,\n CreateKnowledgeSourceRequest,\n CreateKnowledgeSourceTextRequest,\n CreateKnowledgeSourceUrlRequest\n} from '@rymi/shared-types';\n\n// --- Telephony webhook events ---\nexport type {\n TelephonyEvent,\n TelephonyEventType,\n CallStatusChangedEvent,\n RecordingCompletedEvent,\n TransferCompletedEvent,\n MachineDetectedEvent\n} from '@rymi/shared-types';\n\n// --- Agent templates ---\nexport type {\n AgentTemplate,\n AgentTemplateStatus,\n AgentTemplateVisibility,\n SetupQuestion\n} from '@rymi/shared-types';\n\n// --- Tools (safe views only) ---\nexport type {\n ToolCapabilitySafeView,\n ConnectorConnectionSafeView,\n BuiltinAgentToolId\n} from '@rymi/shared-types';\n\n// --- Post-call intelligence ---\nexport type {\n CallEvaluationResult,\n TranscriptSegment,\n CallSentiment,\n CallIntelligenceStatus,\n PostCallStructuredExtractionConfig\n} from '@rymi/shared-types';\n\n// --- Transcript + end-reason labels ---\nexport type { CallTranscriptEvent } from '@rymi/shared-types';\nexport type { SessionEndReasonCode } from '@rymi/shared-types';\n\n// NOTE: This package is intentionally TYPE-ONLY. Runtime helpers are not\n// re-exported from @rymi/shared-types because doing so pulls its\n// side-effectful internal module graph (and business logic) into the public\n// bundle. If a safe runtime utility is ever needed publicly, copy its source\n// into this package deliberately and add a leak-guard assertion.\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rymi/sdk-types",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Public TypeScript types for the Rymi SDKs and REST API.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Rymi AI <engineering@rymi.live>",
|
|
7
|
+
"homepage": "https://rymi.live",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"rymi",
|
|
10
|
+
"voice-ai",
|
|
11
|
+
"types",
|
|
12
|
+
"sdk"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/rymi-live/rymi-sdk-types.git"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/rymi-live/rymi-sdk-types/issues"
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"module": "./dist/index.mjs",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.mjs",
|
|
28
|
+
"require": "./dist/index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md",
|
|
34
|
+
"LICENSE"
|
|
35
|
+
],
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public",
|
|
38
|
+
"provenance": true
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsup && tsc -p tsconfig.dts.json && api-extractor run --local && rm -rf temp",
|
|
42
|
+
"lint": "tsc --noEmit",
|
|
43
|
+
"test": "vitest run"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@microsoft/api-extractor": "^7.43.0",
|
|
47
|
+
"@rymi/shared-types": "workspace:*",
|
|
48
|
+
"tsup": "^8.0.0",
|
|
49
|
+
"typescript": "^5.0.0",
|
|
50
|
+
"vitest": "^4.0.18"
|
|
51
|
+
}
|
|
52
|
+
}
|