@amigo-ai/sdk 1.0.0 → 1.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.
Files changed (32) hide show
  1. package/README.md +50 -37
  2. package/dist/index.cjs.map +2 -2
  3. package/dist/index.mjs.map +2 -2
  4. package/dist/platform.cjs +1754 -0
  5. package/dist/platform.cjs.map +7 -0
  6. package/dist/platform.mjs +1723 -0
  7. package/dist/platform.mjs.map +7 -0
  8. package/dist/types/core/utils.d.ts +11 -0
  9. package/dist/types/generated/api-types.d.ts +1 -1
  10. package/dist/types/generated/platform-api-types.d.ts +45240 -0
  11. package/dist/types/platform/core/auth.d.ts +6 -0
  12. package/dist/types/platform/core/branded-types.d.ts +59 -0
  13. package/dist/types/platform/core/openapi-client.d.ts +6 -0
  14. package/dist/types/platform/core/websocket.d.ts +8 -0
  15. package/dist/types/platform/index.d.ts +59 -0
  16. package/dist/types/platform/resources/agents.d.ts +107 -0
  17. package/dist/types/platform/resources/api-keys.d.ts +57 -0
  18. package/dist/types/platform/resources/context-graphs.d.ts +114 -0
  19. package/dist/types/platform/resources/conversations.d.ts +154 -0
  20. package/dist/types/platform/resources/data-sources.d.ts +143 -0
  21. package/dist/types/platform/resources/events.d.ts +253 -0
  22. package/dist/types/platform/resources/fhir.d.ts +186 -0
  23. package/dist/types/platform/resources/integrations.d.ts +114 -0
  24. package/dist/types/platform/resources/phone-numbers.d.ts +170 -0
  25. package/dist/types/platform/resources/services.d.ts +133 -0
  26. package/dist/types/platform/resources/sessions.d.ts +61 -0
  27. package/dist/types/platform/resources/skills.d.ts +169 -0
  28. package/dist/types/platform/resources/workspaces.d.ts +187 -0
  29. package/package.json +15 -11
  30. package/assets/readme/amigo-banner.png +0 -0
  31. package/assets/readme/classic-ts-architecture.png +0 -0
  32. package/assets/readme/classic-ts-architecture.svg +0 -102
@@ -0,0 +1,143 @@
1
+ import type { PlatformFetch } from '../core/openapi-client';
2
+ import type { components, operations } from '../../generated/platform-api-types';
3
+ import type { WorkspaceId, DataSourceId } from '../core/branded-types';
4
+ /** Resource for managing data sources. */
5
+ export declare class DataSourceResource {
6
+ private c;
7
+ private workspaceId;
8
+ constructor(c: PlatformFetch, workspaceId: WorkspaceId);
9
+ /** List data sources in the workspace. */
10
+ list(options?: {
11
+ query?: operations['list-data-sources']['parameters']['query'];
12
+ }): Promise<{
13
+ continuation_token?: number | null;
14
+ has_more: boolean;
15
+ items: components["schemas"]["DataSourceResponse"][];
16
+ total?: number | null;
17
+ }>;
18
+ /** Get a data source by ID. */
19
+ get(options: {
20
+ dataSourceId: DataSourceId;
21
+ }): Promise<{
22
+ connection_config: {
23
+ [key: string]: unknown;
24
+ };
25
+ created_at: string;
26
+ discovered_by: string | null;
27
+ display_name: string | null;
28
+ entity_types: string[] | null;
29
+ field_mappings: {
30
+ [key: string]: unknown;
31
+ };
32
+ health_status: "unknown" | "healthy" | "degraded";
33
+ id: string;
34
+ is_active: boolean;
35
+ is_stale: boolean;
36
+ last_health_check: string | null;
37
+ last_sync_at: string | null;
38
+ last_sync_event_count: number;
39
+ last_sync_status: ("success" | "error") | null;
40
+ name: string;
41
+ source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
42
+ sync_schedule: string | null;
43
+ sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
44
+ updated_at: string;
45
+ workspace_id: string;
46
+ }>;
47
+ /** Create a new data source. */
48
+ create(options: {
49
+ body: components['schemas']['CreateDataSourceRequest'];
50
+ }): Promise<{
51
+ connection_config: {
52
+ [key: string]: unknown;
53
+ };
54
+ created_at: string;
55
+ discovered_by: string | null;
56
+ display_name: string | null;
57
+ entity_types: string[] | null;
58
+ field_mappings: {
59
+ [key: string]: unknown;
60
+ };
61
+ health_status: "unknown" | "healthy" | "degraded";
62
+ id: string;
63
+ is_active: boolean;
64
+ is_stale: boolean;
65
+ last_health_check: string | null;
66
+ last_sync_at: string | null;
67
+ last_sync_event_count: number;
68
+ last_sync_status: ("success" | "error") | null;
69
+ name: string;
70
+ source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
71
+ sync_schedule: string | null;
72
+ sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
73
+ updated_at: string;
74
+ workspace_id: string;
75
+ }>;
76
+ /** Update a data source. */
77
+ update(options: {
78
+ dataSourceId: DataSourceId;
79
+ body: components['schemas']['UpdateDataSourceRequest'];
80
+ }): Promise<{
81
+ connection_config: {
82
+ [key: string]: unknown;
83
+ };
84
+ created_at: string;
85
+ discovered_by: string | null;
86
+ display_name: string | null;
87
+ entity_types: string[] | null;
88
+ field_mappings: {
89
+ [key: string]: unknown;
90
+ };
91
+ health_status: "unknown" | "healthy" | "degraded";
92
+ id: string;
93
+ is_active: boolean;
94
+ is_stale: boolean;
95
+ last_health_check: string | null;
96
+ last_sync_at: string | null;
97
+ last_sync_event_count: number;
98
+ last_sync_status: ("success" | "error") | null;
99
+ name: string;
100
+ source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
101
+ sync_schedule: string | null;
102
+ sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
103
+ updated_at: string;
104
+ workspace_id: string;
105
+ }>;
106
+ /** Get data source status. */
107
+ getStatus(options: {
108
+ dataSourceId: DataSourceId;
109
+ }): Promise<{
110
+ data_source_id: string;
111
+ event_count: number;
112
+ failed_count: number;
113
+ health_status: "unknown" | "healthy" | "degraded";
114
+ is_active: boolean;
115
+ last_sync_at: string | null;
116
+ last_sync_event_count: number;
117
+ last_sync_status: ("success" | "error") | null;
118
+ name: string;
119
+ synced_count: number;
120
+ }>;
121
+ /** Get data source sync history. */
122
+ getSyncHistory(options: {
123
+ dataSourceId: DataSourceId;
124
+ query?: operations['data-source-sync-history']['parameters']['query'];
125
+ }): Promise<{
126
+ data_source_id: string;
127
+ name: string;
128
+ recent_failures: components["schemas"]["SyncFailureEntry"][];
129
+ timeline: components["schemas"]["SyncHistoryEntry"][];
130
+ }>;
131
+ /** Trigger a data source sync. */
132
+ triggerSync(options: {
133
+ dataSourceId: DataSourceId;
134
+ }): Promise<{
135
+ data_source_id: string;
136
+ status: "started";
137
+ triggered_at: string;
138
+ }>;
139
+ /** Delete a data source. */
140
+ delete(options: {
141
+ dataSourceId: DataSourceId;
142
+ }): Promise<void>;
143
+ }
@@ -0,0 +1,253 @@
1
+ import type { PlatformFetch } from '../core/openapi-client';
2
+ import type { WorkspaceId } from '../core/branded-types';
3
+ /** Resource for streaming workspace-level platform events. */
4
+ export declare class PlatformEventResource {
5
+ private c;
6
+ private workspaceId;
7
+ constructor(c: PlatformFetch, workspaceId: WorkspaceId);
8
+ /** Open the workspace Server-Sent Events stream. */
9
+ stream(options?: {
10
+ lastEventId?: string;
11
+ signal?: AbortSignal;
12
+ }): Promise<AsyncGenerator<import("..").ServerSentEvent<{
13
+ call_sid: string;
14
+ completion_reason: "completed" | "abandoned" | "escalated" | "transferred" | "timeout" | "error" | "voicemail" | "no_answer" | "caller_hangup" | "forwarded" | "terminal_state" | "warm_transfer_completed" | "no_inbound_audio" | "cancelled";
15
+ direction: "inbound" | "outbound" | "playground" | "simulated" | "test";
16
+ duration_seconds: number;
17
+ escalated?: boolean;
18
+ event_type: "call.ended";
19
+ } | {
20
+ call_sid: string;
21
+ escalation_id: string;
22
+ event_type: "call.escalated";
23
+ reason: string;
24
+ trigger: "caller" | "ai" | "operator";
25
+ } | {
26
+ call_sid: string;
27
+ caller_id?: string | null;
28
+ direction: "inbound" | "outbound" | "playground" | "simulated" | "test";
29
+ event_type: "call.started";
30
+ service_id: string;
31
+ } | {
32
+ bounce_subtype?: string | null;
33
+ bounce_type?: string | null;
34
+ email_id: string;
35
+ event_type: "channel.email_bounced";
36
+ from_address: string;
37
+ to_address: string;
38
+ } | {
39
+ email_id: string;
40
+ event_type: "channel.email_clicked";
41
+ to_address: string;
42
+ } | {
43
+ email_id: string;
44
+ event_type: "channel.email_complained";
45
+ from_address: string;
46
+ to_address: string;
47
+ } | {
48
+ email_id: string;
49
+ event_type: "channel.email_delayed";
50
+ from_address: string;
51
+ to_address: string;
52
+ } | {
53
+ email_id: string;
54
+ event_type: "channel.email_delivered";
55
+ from_address: string;
56
+ to_address: string;
57
+ } | {
58
+ email_id: string;
59
+ event_type: "channel.email_opened";
60
+ to_address: string;
61
+ } | {
62
+ event_type: "channel.email_received";
63
+ from_address: string;
64
+ in_reply_to_email_id: string;
65
+ inbound_email_id: string;
66
+ subject: string;
67
+ to_address: string;
68
+ } | {
69
+ email_id: string;
70
+ event_type: "channel.email_rejected";
71
+ from_address: string;
72
+ to_address: string;
73
+ } | {
74
+ event_type: "channel.voicemail_status";
75
+ recipient_phone_number: string;
76
+ status: "delivered" | "skipped" | "failed" | "not_delivered";
77
+ voicemail_id: string;
78
+ } | {
79
+ encounter_entity_id: string;
80
+ event_type: "encounter.updated";
81
+ session_id: string;
82
+ } | {
83
+ confidence: number;
84
+ event_count: number;
85
+ event_id: string;
86
+ event_type: "self_image.brief_generated";
87
+ target_entity_id: string;
88
+ target_entity_type: string;
89
+ version: string;
90
+ } | {
91
+ call_sid: string;
92
+ event_type: "operator.joined_call";
93
+ mode: "listen" | "takeover";
94
+ operator_id: string;
95
+ } | {
96
+ call_sid: string;
97
+ event_type: "operator.left_call";
98
+ human_segment_turn_count?: number | null;
99
+ operator_id: string;
100
+ } | {
101
+ call_sid: string;
102
+ event_type: "operator.mode_changed";
103
+ mode: "listen" | "takeover";
104
+ operator_id: string;
105
+ } | {
106
+ changes?: {
107
+ [key: string]: string | null;
108
+ } | null;
109
+ event_type: "operator.profile_updated";
110
+ operator_id: string;
111
+ } | {
112
+ event_type: "operator.registered";
113
+ operator_id: string;
114
+ timestamp?: string | null;
115
+ } | {
116
+ event_type: "operator.status_changed";
117
+ operator_id: string;
118
+ status: "online" | "busy" | "offline";
119
+ } | {
120
+ call_sid: string;
121
+ event_type: "operator.wrap_up";
122
+ wrap_up_reason?: string | null;
123
+ } | {
124
+ data_source_id: string;
125
+ error: string;
126
+ event_type: "pipeline.error";
127
+ } | {
128
+ data_source_id: string;
129
+ duration_ms: number;
130
+ event_count: number;
131
+ event_type: "pipeline.sync_completed";
132
+ } | {
133
+ action: "approve" | "reject" | "correct" | "batch_approve" | "batch_reject";
134
+ count?: number | null;
135
+ entity_id?: string | null;
136
+ entity_type?: string | null;
137
+ event_type: "review.submitted";
138
+ item_id?: string | null;
139
+ } | {
140
+ event_type: "simulation.turn_stored";
141
+ is_terminal: boolean;
142
+ run_id: string;
143
+ service_id: string;
144
+ session_id: string;
145
+ state_after: string;
146
+ state_before: string;
147
+ turn_index: number;
148
+ } | {
149
+ event_type: "surface.archived";
150
+ surface_id: string;
151
+ } | {
152
+ channel?: string | null;
153
+ entity_id: string;
154
+ event_type: "surface.created";
155
+ fields_count?: number | null;
156
+ form_template_id?: string | null;
157
+ review_required?: boolean | null;
158
+ source?: string | null;
159
+ surface_id: string;
160
+ } | {
161
+ channel: string;
162
+ channel_address?: string | null;
163
+ delivery_status?: string | null;
164
+ entity_id: string;
165
+ event_type: "surface.delivered";
166
+ message_id?: string | null;
167
+ short_url?: string | null;
168
+ surface_id: string;
169
+ } | {
170
+ entity_id: string;
171
+ event_type: "surface.field_saved";
172
+ field_key: string;
173
+ surface_id: string;
174
+ } | {
175
+ entity_id: string;
176
+ event_type: "surface.opened";
177
+ surface_id: string;
178
+ } | {
179
+ entity_id: string;
180
+ event_type: "surface.pending_review";
181
+ form_template_id?: string | null;
182
+ review_required?: boolean | null;
183
+ source?: string | null;
184
+ surface_id: string;
185
+ } | {
186
+ event_type: "surface.reshaped";
187
+ original_surface_id: string;
188
+ surface_id: string;
189
+ } | {
190
+ event_type: "surface.review_approved";
191
+ surface_id: string;
192
+ } | {
193
+ event_type: "surface.review_rejected";
194
+ reason?: string | null;
195
+ surface_id: string;
196
+ } | {
197
+ entity_id: string;
198
+ event_type: "surface.submitted";
199
+ fields_submitted?: string[] | null;
200
+ submitted_at?: string | null;
201
+ surface_id: string;
202
+ } | {
203
+ event_type: "surface.updated";
204
+ surface_id: string;
205
+ } | {
206
+ channel_kind: string;
207
+ completion_reason?: string | null;
208
+ duration_seconds: number;
209
+ event_type: "text.completed";
210
+ final_state: string;
211
+ session_id: string;
212
+ turn_count: number;
213
+ } | {
214
+ channel_kind: string;
215
+ entity_id?: string | null;
216
+ event_type: "text.started";
217
+ service_id: string;
218
+ session_id: string;
219
+ } | {
220
+ event_type: "trigger.completed";
221
+ status: string;
222
+ trigger_id: string;
223
+ trigger_name: string;
224
+ } | {
225
+ event_type: "trigger.failed";
226
+ status: string;
227
+ trigger_id: string;
228
+ trigger_name: string;
229
+ } | {
230
+ event_type: "trigger.fired";
231
+ manual?: boolean;
232
+ trigger_id: string;
233
+ trigger_name: string;
234
+ } | {
235
+ entity_id: string;
236
+ event_type: "workspace.invitation_accepted";
237
+ role: string;
238
+ } | {
239
+ event_type: "workspace.invitation_sent";
240
+ invitation_id: string;
241
+ resent?: boolean;
242
+ role: string;
243
+ } | {
244
+ entity_id: string;
245
+ event_type: "workspace.member_added";
246
+ role: string;
247
+ } | {
248
+ entity_id: string;
249
+ event_type: "workspace.member_role_updated";
250
+ previous_role: string;
251
+ role: string;
252
+ }>, any, any>>;
253
+ }
@@ -0,0 +1,186 @@
1
+ import type { PlatformFetch } from '../core/openapi-client';
2
+ import type { components, operations } from '../../generated/platform-api-types';
3
+ import type { WorkspaceId } from '../core/branded-types';
4
+ /** Resource for managing FHIR health data. */
5
+ export declare class FhirResource {
6
+ private c;
7
+ private workspaceId;
8
+ constructor(c: PlatformFetch, workspaceId: WorkspaceId);
9
+ /** Get FHIR store status for the workspace. */
10
+ status(): Promise<{
11
+ configured: boolean;
12
+ connector_type?: string | null;
13
+ entity_count: number;
14
+ entity_type_counts?: {
15
+ [key: string]: number;
16
+ };
17
+ event_count: number;
18
+ last_change_at?: string | null;
19
+ last_poll_at?: string | null;
20
+ resource_type_counts?: {
21
+ [key: string]: number;
22
+ };
23
+ sync_failure_count?: number;
24
+ sync_healthy?: boolean | null;
25
+ }>;
26
+ /** Search FHIR resources by type. */
27
+ searchResources(options: {
28
+ resourceType: string;
29
+ query?: operations['fhir-search-resources']['parameters']['query'];
30
+ }): Promise<{
31
+ entries: {
32
+ [key: string]: unknown;
33
+ }[];
34
+ next_url?: string | null;
35
+ resource_type: string;
36
+ total: number | null;
37
+ }>;
38
+ /** Get a specific FHIR resource by type and ID. */
39
+ getResource(options: {
40
+ resourceType: string;
41
+ resourceId: string;
42
+ }): Promise<{
43
+ data: {
44
+ [key: string]: unknown;
45
+ };
46
+ entity_id?: string | null;
47
+ resource_id: string;
48
+ resource_type: string;
49
+ }>;
50
+ /** Create a FHIR resource. */
51
+ createResource(options: {
52
+ resourceType: string;
53
+ body: Record<string, unknown>;
54
+ }): Promise<{
55
+ data: {
56
+ [key: string]: unknown;
57
+ };
58
+ entity_id?: string | null;
59
+ resource_id: string;
60
+ resource_type: string;
61
+ }>;
62
+ /** Update a FHIR resource. */
63
+ updateResource(options: {
64
+ resourceType: string;
65
+ resourceId: string;
66
+ body: Record<string, unknown>;
67
+ }): Promise<{
68
+ data: {
69
+ [key: string]: unknown;
70
+ };
71
+ entity_id?: string | null;
72
+ resource_id: string;
73
+ resource_type: string;
74
+ }>;
75
+ /** Get sync failures. */
76
+ syncFailures(options?: {
77
+ query?: operations['fhir-sync-failures']['parameters']['query'];
78
+ }): Promise<{
79
+ failures: components["schemas"]["SyncFailureItem"][];
80
+ total: number;
81
+ }>;
82
+ /** Import FHIR data. */
83
+ import(options: {
84
+ body: components['schemas']['FhirImportRequest'];
85
+ }): Promise<{
86
+ entities_created: number;
87
+ entities_updated: number;
88
+ errors?: string[];
89
+ events_created: number;
90
+ events_skipped?: number;
91
+ events_updated?: number;
92
+ }>;
93
+ /** Search patients. */
94
+ searchPatients(options?: {
95
+ query?: operations['fhir-patient-search']['parameters']['query'];
96
+ }): Promise<{
97
+ has_more?: boolean;
98
+ next_offset?: number | null;
99
+ patients: components["schemas"]["PatientListItem"][];
100
+ total: number;
101
+ }>;
102
+ /** Get patient timeline. */
103
+ getPatientTimeline(options: {
104
+ patientId: string;
105
+ query?: operations['fhir-patient-timeline']['parameters']['query'];
106
+ }): Promise<{
107
+ entity_id: string;
108
+ events: {
109
+ [key: string]: unknown;
110
+ }[];
111
+ total: number;
112
+ }>;
113
+ /** Get patient summary. */
114
+ getPatientSummary(options: {
115
+ patientId: string;
116
+ }): Promise<{
117
+ birth_date?: string | null;
118
+ display_name: string | null;
119
+ email?: string | null;
120
+ entity_id: string;
121
+ entity_type: string;
122
+ event_count: number;
123
+ gender?: string | null;
124
+ last_event_at: string | null;
125
+ mrn?: string | null;
126
+ name?: string | null;
127
+ phone?: string | null;
128
+ state?: {
129
+ [key: string]: unknown;
130
+ };
131
+ }>;
132
+ /** Get FHIR views — patients. */
133
+ viewPatients(options?: {
134
+ query?: operations['fhir-patients-view']['parameters']['query'];
135
+ }): Promise<{
136
+ has_more?: boolean;
137
+ next_offset?: number | null;
138
+ patients: components["schemas"]["FhirPatientView"][];
139
+ total: number;
140
+ }>;
141
+ /** Get FHIR views — practitioners. */
142
+ viewPractitioners(options?: {
143
+ query?: operations['fhir-practitioners-view']['parameters']['query'];
144
+ }): Promise<{
145
+ has_more?: boolean;
146
+ next_offset?: number | null;
147
+ practitioners: components["schemas"]["FhirPractitionerView"][];
148
+ total: number;
149
+ }>;
150
+ /** Get FHIR views — locations. */
151
+ viewLocations(options?: {
152
+ query?: operations['fhir-locations-view']['parameters']['query'];
153
+ }): Promise<{
154
+ has_more?: boolean;
155
+ locations: components["schemas"]["FhirLocationView"][];
156
+ next_offset?: number | null;
157
+ total: number;
158
+ }>;
159
+ /** Get FHIR views — appointments. */
160
+ viewAppointments(options?: {
161
+ query?: operations['fhir-appointments-view']['parameters']['query'];
162
+ }): Promise<{
163
+ appointments: components["schemas"]["FhirAppointmentView"][];
164
+ has_more?: boolean;
165
+ next_offset?: number | null;
166
+ total: number;
167
+ }>;
168
+ /** Get FHIR views — organizations. */
169
+ viewOrganizations(options?: {
170
+ query?: operations['fhir-organizations-view']['parameters']['query'];
171
+ }): Promise<{
172
+ has_more?: boolean;
173
+ next_offset?: number | null;
174
+ organizations: components["schemas"]["FhirOrganizationView"][];
175
+ total: number;
176
+ }>;
177
+ /** Get FHIR views — slots. */
178
+ viewSlots(options?: {
179
+ query?: operations['fhir-slots-view']['parameters']['query'];
180
+ }): Promise<{
181
+ has_more?: boolean;
182
+ next_offset?: number | null;
183
+ slots: components["schemas"]["FhirSlotView"][];
184
+ total: number;
185
+ }>;
186
+ }
@@ -0,0 +1,114 @@
1
+ import type { PlatformFetch } from '../core/openapi-client';
2
+ import type { components, operations } from '../../generated/platform-api-types';
3
+ import type { WorkspaceId, IntegrationId } from '../core/branded-types';
4
+ /** Resource for managing integrations. */
5
+ export declare class IntegrationResource {
6
+ private c;
7
+ private workspaceId;
8
+ constructor(c: PlatformFetch, workspaceId: WorkspaceId);
9
+ /** List integrations in the workspace. */
10
+ list(options?: {
11
+ query?: operations['list-integrations']['parameters']['query'];
12
+ }): Promise<{
13
+ continuation_token?: number | null;
14
+ has_more: boolean;
15
+ items: components["schemas"]["IntegrationResponse"][];
16
+ total?: number | null;
17
+ }>;
18
+ /** Get an integration by ID. */
19
+ get(options: {
20
+ integrationId: IntegrationId;
21
+ }): Promise<{
22
+ auth?: components["schemas"]["AuthConfig"] | null;
23
+ base_url?: string;
24
+ builtin?: boolean;
25
+ created_at: string;
26
+ display_name: string;
27
+ enabled: boolean;
28
+ endpoints?: components["schemas"]["EndpointConfig-Output"][];
29
+ id: string;
30
+ mcp_args?: string[] | null;
31
+ mcp_command?: string | null;
32
+ mcp_headers?: {
33
+ [key: string]: string;
34
+ } | null;
35
+ mcp_transport?: ("stdio" | "sse" | "http") | null;
36
+ mcp_url?: string | null;
37
+ name: string;
38
+ protocol: "rest" | "fhir" | "mcp" | "desktop";
39
+ updated_at: string;
40
+ workspace_id: string;
41
+ }>;
42
+ /** Create a new integration. */
43
+ create(options: {
44
+ body: components['schemas']['CreateIntegrationRequest'];
45
+ }): Promise<{
46
+ auth?: components["schemas"]["AuthConfig"] | null;
47
+ base_url?: string;
48
+ builtin?: boolean;
49
+ created_at: string;
50
+ display_name: string;
51
+ enabled: boolean;
52
+ endpoints?: components["schemas"]["EndpointConfig-Output"][];
53
+ id: string;
54
+ mcp_args?: string[] | null;
55
+ mcp_command?: string | null;
56
+ mcp_headers?: {
57
+ [key: string]: string;
58
+ } | null;
59
+ mcp_transport?: ("stdio" | "sse" | "http") | null;
60
+ mcp_url?: string | null;
61
+ name: string;
62
+ protocol: "rest" | "fhir" | "mcp" | "desktop";
63
+ updated_at: string;
64
+ workspace_id: string;
65
+ }>;
66
+ /** Update an integration. */
67
+ update(options: {
68
+ integrationId: IntegrationId;
69
+ body: components['schemas']['UpdateIntegrationRequest'];
70
+ }): Promise<{
71
+ auth?: components["schemas"]["AuthConfig"] | null;
72
+ base_url?: string;
73
+ builtin?: boolean;
74
+ created_at: string;
75
+ display_name: string;
76
+ enabled: boolean;
77
+ endpoints?: components["schemas"]["EndpointConfig-Output"][];
78
+ id: string;
79
+ mcp_args?: string[] | null;
80
+ mcp_command?: string | null;
81
+ mcp_headers?: {
82
+ [key: string]: string;
83
+ } | null;
84
+ mcp_transport?: ("stdio" | "sse" | "http") | null;
85
+ mcp_url?: string | null;
86
+ name: string;
87
+ protocol: "rest" | "fhir" | "mcp" | "desktop";
88
+ updated_at: string;
89
+ workspace_id: string;
90
+ }>;
91
+ /** Delete an integration. */
92
+ delete(options: {
93
+ integrationId: IntegrationId;
94
+ }): Promise<void>;
95
+ /** Test an integration endpoint. */
96
+ testEndpoint(options: {
97
+ integrationId: IntegrationId;
98
+ endpointName: string;
99
+ body: components['schemas']['TestEndpointRequest'];
100
+ }): Promise<{
101
+ after_filter?: unknown;
102
+ after_mapping?: unknown;
103
+ duration_ms?: number;
104
+ error?: string | null;
105
+ final_result?: string | null;
106
+ raw_response?: unknown;
107
+ retries?: number;
108
+ status_code?: number | null;
109
+ }>;
110
+ /** Check integration health for the workspace. */
111
+ healthCheck(): Promise<{
112
+ [key: string]: unknown;
113
+ }>;
114
+ }