@amigo-ai/platform-sdk 0.1.0 → 0.3.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.
Files changed (149) hide show
  1. package/README.md +126 -8
  2. package/dist/core/branded-types.js +1 -0
  3. package/dist/core/branded-types.js.map +1 -1
  4. package/dist/core/errors.js +43 -3
  5. package/dist/core/errors.js.map +1 -1
  6. package/dist/core/openapi-client.js +60 -48
  7. package/dist/core/openapi-client.js.map +1 -1
  8. package/dist/core/rate-limit.js +13 -0
  9. package/dist/core/rate-limit.js.map +1 -0
  10. package/dist/core/webhooks.js +17 -0
  11. package/dist/core/webhooks.js.map +1 -0
  12. package/dist/generated/api.js +2 -0
  13. package/dist/{types → generated}/api.js.map +1 -1
  14. package/dist/index.cjs +1668 -371
  15. package/dist/index.cjs.map +4 -4
  16. package/dist/index.js +59 -43
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +1658 -371
  19. package/dist/index.mjs.map +4 -4
  20. package/dist/resources/actions.js +52 -0
  21. package/dist/resources/actions.js.map +1 -0
  22. package/dist/resources/agents.js +30 -30
  23. package/dist/resources/agents.js.map +1 -1
  24. package/dist/resources/analytics.js +34 -15
  25. package/dist/resources/analytics.js.map +1 -1
  26. package/dist/resources/api-keys.js +17 -19
  27. package/dist/resources/api-keys.js.map +1 -1
  28. package/dist/resources/audit.js +35 -0
  29. package/dist/resources/audit.js.map +1 -0
  30. package/dist/resources/base.js +12 -44
  31. package/dist/resources/base.js.map +1 -1
  32. package/dist/resources/billing.js +35 -7
  33. package/dist/resources/billing.js.map +1 -1
  34. package/dist/resources/calls.js +25 -9
  35. package/dist/resources/calls.js.map +1 -1
  36. package/dist/resources/compliance.js +19 -0
  37. package/dist/resources/compliance.js.map +1 -0
  38. package/dist/resources/context-graphs.js +46 -18
  39. package/dist/resources/context-graphs.js.map +1 -1
  40. package/dist/resources/data-sources.js +30 -12
  41. package/dist/resources/data-sources.js.map +1 -1
  42. package/dist/resources/functions.js +42 -0
  43. package/dist/resources/functions.js.map +1 -0
  44. package/dist/resources/integrations.js +32 -15
  45. package/dist/resources/integrations.js.map +1 -1
  46. package/dist/resources/memory.js +13 -4
  47. package/dist/resources/memory.js.map +1 -1
  48. package/dist/resources/operators.js +102 -0
  49. package/dist/resources/operators.js.map +1 -0
  50. package/dist/resources/personas.js +31 -0
  51. package/dist/resources/personas.js.map +1 -0
  52. package/dist/resources/phone-numbers.js +31 -16
  53. package/dist/resources/phone-numbers.js.map +1 -1
  54. package/dist/resources/recordings.js +19 -0
  55. package/dist/resources/recordings.js.map +1 -0
  56. package/dist/resources/review-queue.js +94 -0
  57. package/dist/resources/review-queue.js.map +1 -0
  58. package/dist/resources/safety.js +31 -0
  59. package/dist/resources/safety.js.map +1 -0
  60. package/dist/resources/services.js +18 -12
  61. package/dist/resources/services.js.map +1 -1
  62. package/dist/resources/settings.js +50 -24
  63. package/dist/resources/settings.js.map +1 -1
  64. package/dist/resources/simulations.js +23 -17
  65. package/dist/resources/simulations.js.map +1 -1
  66. package/dist/resources/skills.js +22 -16
  67. package/dist/resources/skills.js.map +1 -1
  68. package/dist/resources/triggers.js +51 -0
  69. package/dist/resources/triggers.js.map +1 -0
  70. package/dist/resources/webhook-destinations.js +44 -0
  71. package/dist/resources/webhook-destinations.js.map +1 -0
  72. package/dist/resources/workspaces.js +24 -38
  73. package/dist/resources/workspaces.js.map +1 -1
  74. package/dist/resources/world.js +58 -60
  75. package/dist/resources/world.js.map +1 -1
  76. package/dist/types/core/branded-types.d.ts +3 -0
  77. package/dist/types/core/branded-types.d.ts.map +1 -1
  78. package/dist/types/core/errors.d.ts +3 -0
  79. package/dist/types/core/errors.d.ts.map +1 -1
  80. package/dist/types/core/openapi-client.d.ts +13 -5
  81. package/dist/types/core/openapi-client.d.ts.map +1 -1
  82. package/dist/types/core/rate-limit.d.ts +8 -0
  83. package/dist/types/core/rate-limit.d.ts.map +1 -0
  84. package/dist/types/core/webhooks.d.ts +9 -0
  85. package/dist/types/core/webhooks.d.ts.map +1 -0
  86. package/dist/types/generated/api.d.ts +35120 -0
  87. package/dist/types/generated/api.d.ts.map +1 -0
  88. package/dist/types/index.d.ts +45 -43
  89. package/dist/types/index.d.ts.map +1 -1
  90. package/dist/types/resources/actions.d.ts +158 -0
  91. package/dist/types/resources/actions.d.ts.map +1 -0
  92. package/dist/types/resources/agents.d.ts +70 -22
  93. package/dist/types/resources/agents.d.ts.map +1 -1
  94. package/dist/types/resources/analytics.d.ts +100 -118
  95. package/dist/types/resources/analytics.d.ts.map +1 -1
  96. package/dist/types/resources/api-keys.d.ts +36 -7
  97. package/dist/types/resources/api-keys.d.ts.map +1 -1
  98. package/dist/types/resources/audit.d.ts +70 -0
  99. package/dist/types/resources/audit.d.ts.map +1 -0
  100. package/dist/types/resources/base.d.ts +13 -13
  101. package/dist/types/resources/base.d.ts.map +1 -1
  102. package/dist/types/resources/billing.d.ts +52 -12
  103. package/dist/types/resources/billing.d.ts.map +1 -1
  104. package/dist/types/resources/calls.d.ts +89 -35
  105. package/dist/types/resources/calls.d.ts.map +1 -1
  106. package/dist/types/resources/compliance.d.ts +45 -0
  107. package/dist/types/resources/compliance.d.ts.map +1 -0
  108. package/dist/types/resources/context-graphs.d.ts +77 -14
  109. package/dist/types/resources/context-graphs.d.ts.map +1 -1
  110. package/dist/types/resources/data-sources.d.ts +105 -9
  111. package/dist/types/resources/data-sources.d.ts.map +1 -1
  112. package/dist/types/resources/functions.d.ts +46 -0
  113. package/dist/types/resources/functions.d.ts.map +1 -0
  114. package/dist/types/resources/integrations.d.ts +83 -12
  115. package/dist/types/resources/integrations.d.ts.map +1 -1
  116. package/dist/types/resources/memory.d.ts +26 -73
  117. package/dist/types/resources/memory.d.ts.map +1 -1
  118. package/dist/types/resources/operators.d.ts +157 -0
  119. package/dist/types/resources/operators.d.ts.map +1 -0
  120. package/dist/types/resources/personas.d.ts +60 -0
  121. package/dist/types/resources/personas.d.ts.map +1 -0
  122. package/dist/types/resources/phone-numbers.d.ts +70 -10
  123. package/dist/types/resources/phone-numbers.d.ts.map +1 -1
  124. package/dist/types/resources/recordings.d.ts +29 -0
  125. package/dist/types/resources/recordings.d.ts.map +1 -0
  126. package/dist/types/resources/review-queue.d.ts +184 -0
  127. package/dist/types/resources/review-queue.d.ts.map +1 -0
  128. package/dist/types/resources/safety.d.ts +57 -0
  129. package/dist/types/resources/safety.d.ts.map +1 -0
  130. package/dist/types/resources/services.d.ts +85 -5
  131. package/dist/types/resources/services.d.ts.map +1 -1
  132. package/dist/types/resources/settings.d.ts +79 -78
  133. package/dist/types/resources/settings.d.ts.map +1 -1
  134. package/dist/types/resources/simulations.d.ts +41 -12
  135. package/dist/types/resources/simulations.d.ts.map +1 -1
  136. package/dist/types/resources/skills.d.ts +131 -6
  137. package/dist/types/resources/skills.d.ts.map +1 -1
  138. package/dist/types/resources/triggers.d.ts +129 -0
  139. package/dist/types/resources/triggers.d.ts.map +1 -0
  140. package/dist/types/resources/webhook-destinations.d.ts +75 -0
  141. package/dist/types/resources/webhook-destinations.d.ts.map +1 -0
  142. package/dist/types/resources/workspaces.d.ts +60 -15
  143. package/dist/types/resources/workspaces.d.ts.map +1 -1
  144. package/dist/types/resources/world.d.ts +152 -143
  145. package/dist/types/resources/world.d.ts.map +1 -1
  146. package/package.json +13 -5
  147. package/dist/types/api.js +0 -12
  148. package/dist/types/types/api.d.ts +0 -739
  149. package/dist/types/types/api.d.ts.map +0 -1
@@ -1,739 +0,0 @@
1
- /**
2
- * Amigo Platform API types.
3
- *
4
- * These types define the shape of all API requests and responses.
5
- * They are organized to match the platform-api OpenAPI schema at:
6
- * GET https://api.platform.amigo.ai/v1/openapi.json
7
- *
8
- * TODO: Auto-generate this file by running:
9
- * npx openapi-typescript https://api.platform.amigo.ai/v1/openapi.json -o src/types/api.ts
10
- */
11
- export interface PaginatedResponse<T> {
12
- items: T[];
13
- has_more: boolean;
14
- continuation_token: number | null;
15
- }
16
- export interface ErrorResponse {
17
- error_code: string;
18
- message: string;
19
- detail: string;
20
- request_id: string;
21
- }
22
- export interface Workspace {
23
- id: string;
24
- name: string;
25
- slug: string;
26
- plan: string;
27
- created_at: string;
28
- updated_at: string;
29
- }
30
- export interface CreateWorkspaceRequest {
31
- name: string;
32
- slug: string;
33
- }
34
- export interface UpdateWorkspaceRequest {
35
- name?: string;
36
- }
37
- export type ApiKeyRole = 'owner' | 'admin' | 'member' | 'operator' | 'viewer';
38
- export interface ApiKey {
39
- id: string;
40
- workspace_id: string;
41
- key_id: string;
42
- name: string | null;
43
- role: ApiKeyRole;
44
- permissions: string[];
45
- expires_at: string;
46
- last_used_at: string | null;
47
- created_at: string;
48
- updated_at: string;
49
- }
50
- export interface CreateApiKeyRequest {
51
- name?: string;
52
- duration_days: number;
53
- role: ApiKeyRole;
54
- permissions?: string[];
55
- }
56
- export interface CreateApiKeyResponse extends ApiKey {
57
- /** The raw API key value — only returned at creation time */
58
- api_key: string;
59
- }
60
- export interface RotateApiKeyResponse {
61
- key_id: string;
62
- api_key: string;
63
- expires_at: string;
64
- }
65
- export interface AuthMeResponse {
66
- workspace_id: string;
67
- key_id: string;
68
- name: string | null;
69
- expires_at: string;
70
- expires_in_seconds: number;
71
- }
72
- export interface Agent {
73
- id: string;
74
- workspace_id: string;
75
- name: string;
76
- description: string;
77
- latest_version: number | null;
78
- created_at: string;
79
- updated_at: string;
80
- }
81
- export interface CreateAgentRequest {
82
- name: string;
83
- description?: string;
84
- }
85
- export interface UpdateAgentRequest {
86
- name?: string | null;
87
- description?: string | null;
88
- }
89
- export interface AgentIdentity {
90
- name: string;
91
- role: string;
92
- developed_by: string;
93
- default_spoken_language: string;
94
- relationship_to_developer: {
95
- ownership: string;
96
- type: string;
97
- conversation_visibility: string;
98
- thought_visibility: string;
99
- };
100
- }
101
- export interface AgentVoiceConfig {
102
- voice_id: string;
103
- stability?: number;
104
- similarity_boost?: number;
105
- style?: number;
106
- }
107
- export interface AgentVersion {
108
- id: string;
109
- workspace_id: string;
110
- agent_id: string;
111
- version: number;
112
- name: string;
113
- initials: string;
114
- identity: AgentIdentity;
115
- voice_config: AgentVoiceConfig | null;
116
- background: string;
117
- behaviors: string[];
118
- communication_patterns: string[];
119
- created_at: string;
120
- updated_at: string;
121
- }
122
- export interface CreateAgentVersionRequest {
123
- name: string;
124
- initials?: string;
125
- identity: AgentIdentity;
126
- voice_config?: AgentVoiceConfig | null;
127
- background?: string;
128
- behaviors?: string[];
129
- communication_patterns?: string[];
130
- }
131
- export interface Persona {
132
- id: string;
133
- workspace_id: string;
134
- name: string;
135
- description: string | null;
136
- voice_id: string | null;
137
- system_prompt: string | null;
138
- created_at: string;
139
- updated_at: string;
140
- }
141
- export interface CreatePersonaRequest {
142
- name: string;
143
- description?: string;
144
- voice_id?: string;
145
- system_prompt?: string;
146
- }
147
- export interface UpdatePersonaRequest {
148
- name?: string;
149
- description?: string;
150
- voice_id?: string;
151
- system_prompt?: string;
152
- }
153
- export type ExecutionTier = 'direct' | 'orchestrated' | 'autonomous' | 'browser' | 'computer_use';
154
- export interface IntegrationTool {
155
- integration: string;
156
- endpoint: string;
157
- }
158
- export interface StaticTool {
159
- name: string;
160
- description: string;
161
- input_schema: Record<string, unknown>;
162
- }
163
- export interface Skill {
164
- id: string;
165
- workspace_id: string;
166
- slug: string;
167
- name: string;
168
- description: string;
169
- system_prompt: string | null;
170
- input_schema: Record<string, unknown>;
171
- result_schema: Record<string, unknown> | null;
172
- model: string;
173
- execution_tier: ExecutionTier;
174
- integration_tools: IntegrationTool[];
175
- static_tools: StaticTool[];
176
- version: number;
177
- enabled: boolean;
178
- created_at: string;
179
- updated_at: string;
180
- }
181
- export interface CreateSkillRequest {
182
- slug: string;
183
- name: string;
184
- description: string;
185
- system_prompt?: string;
186
- input_schema: Record<string, unknown>;
187
- result_schema?: Record<string, unknown>;
188
- model?: string;
189
- execution_tier?: ExecutionTier;
190
- integration_tools?: IntegrationTool[];
191
- static_tools?: StaticTool[];
192
- enabled?: boolean;
193
- }
194
- export interface UpdateSkillRequest {
195
- name?: string;
196
- description?: string;
197
- system_prompt?: string;
198
- input_schema?: Record<string, unknown>;
199
- result_schema?: Record<string, unknown>;
200
- model?: string;
201
- execution_tier?: ExecutionTier;
202
- integration_tools?: IntegrationTool[];
203
- static_tools?: StaticTool[];
204
- enabled?: boolean;
205
- }
206
- export interface SkillTestRequest {
207
- input: Record<string, unknown>;
208
- }
209
- export interface SkillTestResponse {
210
- success: boolean;
211
- output: Record<string, unknown> | null;
212
- error: string | null;
213
- duration_ms: number;
214
- }
215
- export interface ServiceVersionSet {
216
- agent_version_number: number;
217
- context_graph_version_number: number;
218
- llm_model_preferences: Record<string, unknown>;
219
- }
220
- export interface ServiceTag {
221
- key: string;
222
- value: string;
223
- }
224
- export interface ServiceVoiceConfig {
225
- tts_model: string | null;
226
- max_buffer_delay_ms: number | null;
227
- eager_eot_threshold: number | null;
228
- eot_timeout_ms: number | null;
229
- filler_style: string | null;
230
- filler_vocabulary: string[] | null;
231
- backchannel_delay_ms: number | null;
232
- max_response_sentences: number | null;
233
- max_response_words: number | null;
234
- barge_in_min_speech_s: number | null;
235
- barge_in_cooldown_s: number | null;
236
- forward_call_enabled: boolean;
237
- }
238
- export interface Service {
239
- id: string;
240
- workspace_id: string;
241
- name: string;
242
- description: string | null;
243
- agent_id: string | null;
244
- agent_name: string | null;
245
- context_graph_id: string | null;
246
- context_graph_name: string | null;
247
- persona_id: string | null;
248
- persona_name: string | null;
249
- channel_type: string;
250
- environment: string;
251
- keyterms: string[];
252
- tags: ServiceTag[];
253
- is_active: boolean;
254
- is_system: boolean;
255
- safety_filters_enabled: boolean;
256
- tool_capacity: number;
257
- version_sets: Record<string, ServiceVersionSet>;
258
- voice_config: ServiceVoiceConfig | null;
259
- created_at: string;
260
- updated_at: string;
261
- }
262
- export interface CreateServiceRequest {
263
- name: string;
264
- description?: string;
265
- agent_id?: string;
266
- context_graph_id?: string;
267
- channel_type?: string;
268
- keyterms?: string[];
269
- }
270
- export interface UpdateServiceRequest {
271
- name?: string;
272
- description?: string;
273
- agent_id?: string;
274
- context_graph_id?: string;
275
- is_active?: boolean;
276
- keyterms?: string[];
277
- voice_config?: Partial<ServiceVoiceConfig>;
278
- }
279
- export interface ContextGraph {
280
- id: string;
281
- workspace_id: string;
282
- name: string;
283
- description: string | null;
284
- latest_version: number | null;
285
- state_count: number;
286
- created_at: string;
287
- updated_at: string;
288
- }
289
- export interface CreateContextGraphRequest {
290
- name: string;
291
- description?: string;
292
- }
293
- export interface UpdateContextGraphRequest {
294
- name?: string;
295
- description?: string;
296
- }
297
- export interface Trigger {
298
- id: string;
299
- workspace_id: string;
300
- name: string;
301
- description: string | null;
302
- event_type: string | null;
303
- event_filter: Record<string, unknown> | null;
304
- action_id: string;
305
- input_template: Record<string, unknown>;
306
- schedule: string | null;
307
- timezone: string;
308
- is_active: boolean;
309
- next_fire_at: string | null;
310
- last_fired_at: string | null;
311
- created_at: string;
312
- updated_at: string;
313
- }
314
- export interface CreateTriggerRequest {
315
- name: string;
316
- description?: string;
317
- event_type?: string;
318
- event_filter?: Record<string, unknown>;
319
- action_id: string;
320
- input_template?: Record<string, unknown>;
321
- schedule?: string;
322
- timezone?: string;
323
- }
324
- export interface UpdateTriggerRequest {
325
- name?: string;
326
- description?: string;
327
- event_filter?: Record<string, unknown>;
328
- input_template?: Record<string, unknown>;
329
- schedule?: string;
330
- timezone?: string;
331
- }
332
- export interface TriggerRun {
333
- id: string;
334
- trigger_id: string;
335
- status: 'pending' | 'running' | 'completed' | 'failed';
336
- input: Record<string, unknown>;
337
- output: Record<string, unknown> | null;
338
- error: string | null;
339
- started_at: string;
340
- completed_at: string | null;
341
- }
342
- export type EntityType = 'patient' | 'contact' | 'lead' | 'provider' | 'organization' | 'call' | 'appointment' | string;
343
- export interface Entity {
344
- id: string;
345
- workspace_id: string;
346
- entity_type: EntityType;
347
- display_name: string | null;
348
- canonical_id: string | null;
349
- external_ids: Record<string, string>;
350
- state: Record<string, unknown>;
351
- tags: string[];
352
- source: string | null;
353
- confidence: number;
354
- event_count: number;
355
- has_projection: boolean;
356
- first_seen_at: string | null;
357
- last_event_at: string | null;
358
- created_at: string;
359
- updated_at: string;
360
- name: string | null;
361
- phone: string | null;
362
- email: string | null;
363
- mrn: string | null;
364
- birth_date: string | null;
365
- gender: string | null;
366
- call_sid: string | null;
367
- direction: string | null;
368
- status: string | null;
369
- duration_seconds: number | null;
370
- appointment_start: string | null;
371
- appointment_end: string | null;
372
- appointment_status: string | null;
373
- appointment_type: string | null;
374
- deal_stage: string | null;
375
- deal_amount: number | null;
376
- domain: string | null;
377
- industry: string | null;
378
- }
379
- export interface CreateEntityRequest {
380
- entity_type: EntityType;
381
- canonical_id?: string;
382
- display_name?: string;
383
- external_ids?: Record<string, string>;
384
- state?: Record<string, unknown>;
385
- }
386
- export interface UpdateEntityRequest {
387
- display_name?: string;
388
- state?: Record<string, unknown>;
389
- tags?: string[];
390
- }
391
- export interface WorldEvent {
392
- id: string;
393
- workspace_id: string;
394
- entity_id: string;
395
- event_type: string;
396
- source: string;
397
- data: Record<string, unknown>;
398
- confidence: number;
399
- derived_from: string | null;
400
- created_at: string;
401
- }
402
- export interface EmitEventRequest {
403
- entity_id: string;
404
- event_type: string;
405
- source?: string;
406
- data?: Record<string, unknown>;
407
- confidence?: number;
408
- derived_from?: string;
409
- }
410
- export interface TimelineEntry {
411
- event: WorldEvent;
412
- entity_snapshot: Entity;
413
- }
414
- export interface SimilarEntitiesResponse {
415
- entities: Array<{
416
- entity: Entity;
417
- score: number;
418
- }>;
419
- }
420
- export interface MergeEntitiesRequest {
421
- primary_entity_id: string;
422
- secondary_entity_ids: string[];
423
- }
424
- export type CallDirection = 'inbound' | 'outbound';
425
- export interface Call {
426
- call_sid: string;
427
- entity_id: string | null;
428
- direction: CallDirection;
429
- /** Phone number involved in the call */
430
- phone_number: string | null;
431
- /** Caller's phone number or identifier */
432
- caller_id: string | null;
433
- started_at: string;
434
- duration_seconds: number | null;
435
- /** Call lifecycle status — includes engine-specific values like "engage" */
436
- status: string;
437
- escalation_status: string | null;
438
- turns: number | null;
439
- has_recording: boolean | null;
440
- quality_score: number | null;
441
- final_state: string | null;
442
- completion_reason: string | null;
443
- service_id: string | null;
444
- source: string | null;
445
- run_id: string | null;
446
- parent_session_id: string | null;
447
- fork_turn_index: number | null;
448
- }
449
- export interface TranscriptSegment {
450
- speaker: 'agent' | 'customer';
451
- text: string;
452
- start_seconds: number;
453
- end_seconds: number;
454
- }
455
- export interface ListCallsParams {
456
- limit?: number;
457
- continuation_token?: number;
458
- status?: string;
459
- direction?: CallDirection;
460
- service_id?: string;
461
- /** Include test/simulation calls */
462
- include_simulated?: boolean;
463
- }
464
- export interface PhoneNumberForwarding {
465
- enabled: boolean;
466
- forward_to: string | null;
467
- should_disconnect: boolean;
468
- }
469
- export interface PhoneNumber {
470
- id: string;
471
- workspace_id: string;
472
- phone_number: string;
473
- display_name: string | null;
474
- provider: string;
475
- capabilities: string[];
476
- status: string;
477
- inbound_service_id: string | null;
478
- provider_phone_sid: string | null;
479
- notes: string | null;
480
- forwarding: PhoneNumberForwarding | null;
481
- created_at: string;
482
- updated_at: string;
483
- }
484
- export interface ProvisionPhoneNumberRequest {
485
- area_code?: string;
486
- phone_number?: string;
487
- display_name?: string;
488
- inbound_service_id?: string;
489
- }
490
- export interface UpdatePhoneNumberRequest {
491
- display_name?: string;
492
- inbound_service_id?: string | null;
493
- notes?: string;
494
- forwarding?: Partial<PhoneNumberForwarding>;
495
- }
496
- export interface IntegrationEndpoint {
497
- name: string;
498
- description: string;
499
- method: string;
500
- path: string;
501
- base_url: string | null;
502
- input_schema: Record<string, unknown>;
503
- result_delivery: string | null;
504
- headers: Record<string, string> | null;
505
- body_format: string | null;
506
- }
507
- export interface Integration {
508
- id: string;
509
- workspace_id: string;
510
- name: string;
511
- display_name: string | null;
512
- protocol: string;
513
- base_url: string | null;
514
- auth: Record<string, unknown> | null;
515
- endpoints: IntegrationEndpoint[];
516
- enabled: boolean;
517
- builtin: boolean;
518
- created_at: string;
519
- updated_at: string;
520
- }
521
- export interface CreateIntegrationRequest {
522
- name: string;
523
- display_name?: string;
524
- protocol: string;
525
- base_url?: string;
526
- auth?: Record<string, unknown>;
527
- endpoints?: Partial<IntegrationEndpoint>[];
528
- }
529
- export interface UpdateIntegrationRequest {
530
- display_name?: string;
531
- base_url?: string;
532
- auth?: Record<string, unknown>;
533
- enabled?: boolean;
534
- }
535
- export interface AgentPerformance {
536
- agent_id: string;
537
- agent_name: string;
538
- total_calls: number;
539
- completed_calls: number;
540
- avg_duration_seconds: number;
541
- completion_rate: number;
542
- }
543
- export interface Surface {
544
- id: string;
545
- workspace_id: string;
546
- name: string;
547
- slug: string;
548
- type: 'form' | 'calendar' | 'chat' | 'survey';
549
- config: Record<string, unknown>;
550
- is_active: boolean;
551
- created_at: string;
552
- updated_at: string;
553
- }
554
- export interface CreateSurfaceRequest {
555
- name: string;
556
- slug: string;
557
- type: 'form' | 'calendar' | 'chat' | 'survey';
558
- config?: Record<string, unknown>;
559
- }
560
- export interface UpdateSurfaceRequest {
561
- name?: string;
562
- config?: Record<string, unknown>;
563
- is_active?: boolean;
564
- }
565
- export interface Operator {
566
- id: string;
567
- workspace_id: string;
568
- name: string;
569
- email: string;
570
- role: string;
571
- status: 'available' | 'busy' | 'offline';
572
- created_at: string;
573
- updated_at: string;
574
- }
575
- export interface CreateOperatorRequest {
576
- name: string;
577
- email: string;
578
- role?: string;
579
- }
580
- export interface UpdateOperatorRequest {
581
- name?: string;
582
- email?: string;
583
- role?: string;
584
- status?: 'available' | 'busy' | 'offline';
585
- }
586
- export interface OperatorDashboard {
587
- active_calls: number;
588
- queue_depth: number;
589
- avg_wait_seconds: number;
590
- operators_available: number;
591
- }
592
- export interface SimulationConversationTurn {
593
- role: string;
594
- text: string;
595
- emotion: string | null;
596
- }
597
- export interface SimulationState {
598
- name: string;
599
- type: string;
600
- objective: string;
601
- actions: Record<string, unknown>[];
602
- exit_conditions: Record<string, unknown>[];
603
- action_guidelines: string[];
604
- boundary_constraints: string[];
605
- guardrails: Record<string, unknown>[];
606
- tools: string[];
607
- }
608
- export interface SimulationSnapshot {
609
- current_state: SimulationState;
610
- reachable_states: Record<string, unknown>[];
611
- conversation_history: SimulationConversationTurn[];
612
- states_visited: string[];
613
- state_transitions: string[][];
614
- total_turns: number;
615
- tools_called: string[];
616
- terminal_reached: boolean;
617
- terminal_state: string | null;
618
- }
619
- export interface SimulationSession {
620
- session_id: string;
621
- greeting: string;
622
- is_terminal: boolean;
623
- snapshot: SimulationSnapshot;
624
- }
625
- export interface SimulationStepObservation {
626
- state_before: string;
627
- state_after: string;
628
- state_changed: boolean;
629
- agent_text: string;
630
- is_terminal: boolean;
631
- tools_called: string[];
632
- empathy_tier: number;
633
- has_pause: boolean;
634
- }
635
- export interface SimulationStepResponse {
636
- observation: SimulationStepObservation;
637
- snapshot: SimulationSnapshot;
638
- }
639
- export interface CreateSimulationSessionRequest {
640
- service_id: string;
641
- branch_name?: string;
642
- }
643
- export interface StepSimulationSessionRequest {
644
- session_id: string;
645
- caller_text: string;
646
- emotion?: string;
647
- valence?: number;
648
- }
649
- export type ScribeSessionStatus = 'recording' | 'processing' | 'completed' | 'failed';
650
- export interface ScribeSession {
651
- id: string;
652
- workspace_id: string;
653
- status: ScribeSessionStatus;
654
- transcript: string | null;
655
- summary: string | null;
656
- note: string | null;
657
- duration_seconds: number | null;
658
- started_at: string;
659
- ended_at: string | null;
660
- created_at: string;
661
- }
662
- export interface CreateScribeSessionRequest {
663
- provider_id?: string;
664
- patient_id?: string;
665
- metadata?: Record<string, unknown>;
666
- }
667
- export interface UsageMeter {
668
- name: string;
669
- value: number;
670
- unit: string;
671
- }
672
- export interface UsageSummary {
673
- workspace_id: string;
674
- period_start: string | null;
675
- period_end: string | null;
676
- meters: UsageMeter[];
677
- total_events: number;
678
- }
679
- export interface Invoice {
680
- id: string;
681
- workspace_id: string;
682
- amount_cents: number;
683
- currency: string;
684
- status: 'draft' | 'open' | 'paid' | 'void';
685
- period_start: string;
686
- period_end: string;
687
- created_at: string;
688
- paid_at: string | null;
689
- }
690
- export interface DataSource {
691
- id: string;
692
- workspace_id: string;
693
- name: string;
694
- display_name: string | null;
695
- source_type: string;
696
- connection_config: Record<string, unknown>;
697
- entity_types: string[];
698
- field_mappings: Record<string, unknown>;
699
- sync_strategy: string;
700
- sync_schedule: string | null;
701
- last_sync_at: string | null;
702
- last_sync_status: string | null;
703
- last_sync_event_count: number;
704
- is_active: boolean;
705
- is_stale: boolean;
706
- health_status: string;
707
- last_health_check: string | null;
708
- discovered_by: string | null;
709
- created_at: string;
710
- updated_at: string;
711
- }
712
- export interface CreateDataSourceRequest {
713
- name: string;
714
- source_type: string;
715
- connection_config: Record<string, unknown>;
716
- entity_types?: string[];
717
- sync_strategy?: string;
718
- sync_schedule?: string;
719
- }
720
- export interface PlatformFunction {
721
- id: string;
722
- workspace_id: string;
723
- name: string;
724
- description: string;
725
- input_schema: Record<string, unknown>;
726
- implementation: string;
727
- version: number;
728
- created_at: string;
729
- updated_at: string;
730
- }
731
- export interface CreateFunctionRequest {
732
- name: string;
733
- description: string;
734
- input_schema: Record<string, unknown>;
735
- implementation: string;
736
- }
737
- export interface paths {
738
- }
739
- //# sourceMappingURL=api.d.ts.map