@amigo-ai/platform-sdk 0.26.0 → 0.29.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/README.md +62 -0
- package/api.md +170 -1
- package/dist/index.cjs +1081 -5
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +78 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1081 -5
- package/dist/index.mjs.map +4 -4
- package/dist/resources/analytics.js +20 -0
- package/dist/resources/analytics.js.map +1 -1
- package/dist/resources/briefs.js +34 -0
- package/dist/resources/briefs.js.map +1 -0
- package/dist/resources/calls.js +22 -0
- package/dist/resources/calls.js.map +1 -1
- package/dist/resources/command-center.js +17 -0
- package/dist/resources/command-center.js.map +1 -0
- package/dist/resources/crm.js +52 -0
- package/dist/resources/crm.js.map +1 -0
- package/dist/resources/data-query.js +22 -0
- package/dist/resources/data-query.js.map +1 -0
- package/dist/resources/desktop-sessions.js +43 -0
- package/dist/resources/desktop-sessions.js.map +1 -0
- package/dist/resources/fhir.js +130 -0
- package/dist/resources/fhir.js.map +1 -0
- package/dist/resources/insights.js +53 -0
- package/dist/resources/insights.js.map +1 -0
- package/dist/resources/intake.js +42 -0
- package/dist/resources/intake.js.map +1 -0
- package/dist/resources/me.js +46 -0
- package/dist/resources/me.js.map +1 -0
- package/dist/resources/monitor-concepts.js +47 -0
- package/dist/resources/monitor-concepts.js.map +1 -0
- package/dist/resources/network.js +17 -0
- package/dist/resources/network.js.map +1 -0
- package/dist/resources/pipeline.js +69 -0
- package/dist/resources/pipeline.js.map +1 -0
- package/dist/resources/sensorium.js +25 -0
- package/dist/resources/sensorium.js.map +1 -0
- package/dist/resources/sessions.js +29 -0
- package/dist/resources/sessions.js.map +1 -0
- package/dist/resources/settings.js +17 -0
- package/dist/resources/settings.js.map +1 -1
- package/dist/resources/simulations.js +75 -0
- package/dist/resources/simulations.js.map +1 -1
- package/dist/resources/surfaces.js +85 -0
- package/dist/resources/surfaces.js.map +1 -0
- package/dist/resources/tasks.js +23 -0
- package/dist/resources/tasks.js.map +1 -0
- package/dist/resources/tools.js +24 -0
- package/dist/resources/tools.js.map +1 -0
- package/dist/resources/unification-rules.js +46 -0
- package/dist/resources/unification-rules.js.map +1 -0
- package/dist/resources/workspaces.js +33 -10
- package/dist/resources/workspaces.js.map +1 -1
- package/dist/types/generated/api.d.ts +172 -118
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.cts +53 -0
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +53 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/analytics.d.ts +26 -0
- package/dist/types/resources/analytics.d.ts.map +1 -1
- package/dist/types/resources/briefs.d.ts +79 -0
- package/dist/types/resources/briefs.d.ts.map +1 -0
- package/dist/types/resources/calls.d.ts +93 -9
- package/dist/types/resources/calls.d.ts.map +1 -1
- package/dist/types/resources/command-center.d.ts +55 -0
- package/dist/types/resources/command-center.d.ts.map +1 -0
- package/dist/types/resources/crm.d.ts +207 -0
- package/dist/types/resources/crm.d.ts.map +1 -0
- package/dist/types/resources/data-query.d.ts +23 -0
- package/dist/types/resources/data-query.d.ts.map +1 -0
- package/dist/types/resources/desktop-sessions.d.ts +38 -0
- package/dist/types/resources/desktop-sessions.d.ts.map +1 -0
- package/dist/types/resources/fhir.d.ts +350 -0
- package/dist/types/resources/fhir.d.ts.map +1 -0
- package/dist/types/resources/functions.d.ts.map +1 -1
- package/dist/types/resources/insights.d.ts +56 -0
- package/dist/types/resources/insights.d.ts.map +1 -0
- package/dist/types/resources/intake.d.ts +59 -0
- package/dist/types/resources/intake.d.ts.map +1 -0
- package/dist/types/resources/me.d.ts +54 -0
- package/dist/types/resources/me.d.ts.map +1 -0
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/monitor-concepts.d.ts +115 -0
- package/dist/types/resources/monitor-concepts.d.ts.map +1 -0
- package/dist/types/resources/network.d.ts +17 -0
- package/dist/types/resources/network.d.ts.map +1 -0
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/pipeline.d.ts +183 -0
- package/dist/types/resources/pipeline.d.ts.map +1 -0
- package/dist/types/resources/sensorium.d.ts +40 -0
- package/dist/types/resources/sensorium.d.ts.map +1 -0
- package/dist/types/resources/sessions.d.ts +33 -0
- package/dist/types/resources/sessions.d.ts.map +1 -0
- package/dist/types/resources/settings.d.ts +16 -0
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/simulations.d.ts +186 -3
- package/dist/types/resources/simulations.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts +240 -0
- package/dist/types/resources/surfaces.d.ts.map +1 -0
- package/dist/types/resources/tasks.d.ts +55 -0
- package/dist/types/resources/tasks.d.ts.map +1 -0
- package/dist/types/resources/tools.d.ts +53 -0
- package/dist/types/resources/tools.d.ts.map +1 -0
- package/dist/types/resources/unification-rules.d.ts +129 -0
- package/dist/types/resources/unification-rules.d.ts.map +1 -0
- package/dist/types/resources/workspaces.d.ts +32 -17
- package/dist/types/resources/workspaces.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import type { components, paths } from '../generated/api.js';
|
|
2
|
+
import { WorkspaceScopedResource } from './base.js';
|
|
3
|
+
export type ListSurfacesParams = NonNullable<paths['/v1/{workspace_id}/surfaces']['get']['parameters']['query']>;
|
|
4
|
+
/** `/surfaces/review` is a narrower paged feed without the workspace-list filters. */
|
|
5
|
+
export type ListSurfacesForReviewParams = NonNullable<paths['/v1/{workspace_id}/surfaces/review']['get']['parameters']['query']>;
|
|
6
|
+
/**
|
|
7
|
+
* Surfaces — short-lived form/intake experiences the platform delivers via
|
|
8
|
+
* SMS / email / web. The full lifecycle is exposed: create, deliver, monitor
|
|
9
|
+
* progress, gate for review, approve / reject / reshape, and archive.
|
|
10
|
+
*
|
|
11
|
+
* @beta New in this release; surface may evolve as the operator review flow
|
|
12
|
+
* stabilizes.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SurfacesResource extends WorkspaceScopedResource {
|
|
15
|
+
/** List surfaces in the workspace */
|
|
16
|
+
list(params?: ListSurfacesParams): Promise<{
|
|
17
|
+
continuation_token?: number | null | undefined;
|
|
18
|
+
has_more: boolean;
|
|
19
|
+
items: {
|
|
20
|
+
channel?: (components["schemas"]["ChannelType"] | null) | undefined;
|
|
21
|
+
context?: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
} | undefined;
|
|
24
|
+
created_at?: string | null | undefined;
|
|
25
|
+
delivered_at?: string | null | undefined;
|
|
26
|
+
delivery_metadata?: {
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
description?: string | null | undefined;
|
|
30
|
+
entity_id?: string | null | undefined;
|
|
31
|
+
event_id: string;
|
|
32
|
+
expires_at?: string | null | undefined;
|
|
33
|
+
fields?: {
|
|
34
|
+
[x: string]: unknown;
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
fields_count: number;
|
|
37
|
+
id: string;
|
|
38
|
+
opened_at?: string | null | undefined;
|
|
39
|
+
resource_type?: string | null | undefined;
|
|
40
|
+
status: components["schemas"]["SurfaceStatus"];
|
|
41
|
+
submitted_at?: string | null | undefined;
|
|
42
|
+
submitted_data?: {
|
|
43
|
+
[x: string]: unknown;
|
|
44
|
+
} | null | undefined;
|
|
45
|
+
title?: string | null | undefined;
|
|
46
|
+
}[];
|
|
47
|
+
total?: number | null | undefined;
|
|
48
|
+
} & import("../index.js").ResponseMetadata>;
|
|
49
|
+
listAutoPaging(params?: ListSurfacesParams): AsyncGenerator<{
|
|
50
|
+
channel?: (components["schemas"]["ChannelType"] | null) | undefined;
|
|
51
|
+
context?: {
|
|
52
|
+
[x: string]: unknown;
|
|
53
|
+
} | undefined;
|
|
54
|
+
created_at?: string | null | undefined;
|
|
55
|
+
delivered_at?: string | null | undefined;
|
|
56
|
+
delivery_metadata?: {
|
|
57
|
+
[x: string]: unknown;
|
|
58
|
+
} | null | undefined;
|
|
59
|
+
description?: string | null | undefined;
|
|
60
|
+
entity_id?: string | null | undefined;
|
|
61
|
+
event_id: string;
|
|
62
|
+
expires_at?: string | null | undefined;
|
|
63
|
+
fields?: {
|
|
64
|
+
[x: string]: unknown;
|
|
65
|
+
}[] | undefined;
|
|
66
|
+
fields_count: number;
|
|
67
|
+
id: string;
|
|
68
|
+
opened_at?: string | null | undefined;
|
|
69
|
+
resource_type?: string | null | undefined;
|
|
70
|
+
status: components["schemas"]["SurfaceStatus"];
|
|
71
|
+
submitted_at?: string | null | undefined;
|
|
72
|
+
submitted_data?: {
|
|
73
|
+
[x: string]: unknown;
|
|
74
|
+
} | null | undefined;
|
|
75
|
+
title?: string | null | undefined;
|
|
76
|
+
}, any, any>;
|
|
77
|
+
/** Surfaces awaiting review (pending approval / rejection) */
|
|
78
|
+
listForReview(params?: ListSurfacesForReviewParams): Promise<{
|
|
79
|
+
continuation_token?: number | null | undefined;
|
|
80
|
+
has_more: boolean;
|
|
81
|
+
items: {
|
|
82
|
+
channel?: (components["schemas"]["ChannelType"] | null) | undefined;
|
|
83
|
+
context?: {
|
|
84
|
+
[x: string]: unknown;
|
|
85
|
+
} | undefined;
|
|
86
|
+
created_at?: string | null | undefined;
|
|
87
|
+
delivered_at?: string | null | undefined;
|
|
88
|
+
delivery_metadata?: {
|
|
89
|
+
[x: string]: unknown;
|
|
90
|
+
} | null | undefined;
|
|
91
|
+
description?: string | null | undefined;
|
|
92
|
+
entity_id?: string | null | undefined;
|
|
93
|
+
event_id: string;
|
|
94
|
+
expires_at?: string | null | undefined;
|
|
95
|
+
fields?: {
|
|
96
|
+
[x: string]: unknown;
|
|
97
|
+
}[] | undefined;
|
|
98
|
+
fields_count: number;
|
|
99
|
+
id: string;
|
|
100
|
+
opened_at?: string | null | undefined;
|
|
101
|
+
resource_type?: string | null | undefined;
|
|
102
|
+
status: components["schemas"]["SurfaceStatus"];
|
|
103
|
+
submitted_at?: string | null | undefined;
|
|
104
|
+
submitted_data?: {
|
|
105
|
+
[x: string]: unknown;
|
|
106
|
+
} | null | undefined;
|
|
107
|
+
title?: string | null | undefined;
|
|
108
|
+
}[];
|
|
109
|
+
total?: number | null | undefined;
|
|
110
|
+
} & import("../index.js").ResponseMetadata>;
|
|
111
|
+
/** Create a surface (form definition + delivery config) */
|
|
112
|
+
create(body: components['schemas']['CreateSurfaceRequest']): Promise<{
|
|
113
|
+
channel: components["schemas"]["ChannelType"];
|
|
114
|
+
created_at: string;
|
|
115
|
+
description?: string | null | undefined;
|
|
116
|
+
entity_id: string;
|
|
117
|
+
event_id: string;
|
|
118
|
+
expires_at: string;
|
|
119
|
+
fields_count: number;
|
|
120
|
+
id: string;
|
|
121
|
+
status: components["schemas"]["SurfaceStatus"];
|
|
122
|
+
title: string;
|
|
123
|
+
token?: string | null | undefined;
|
|
124
|
+
url?: string | null | undefined;
|
|
125
|
+
} & import("../index.js").ResponseMetadata>;
|
|
126
|
+
/** Get a single surface */
|
|
127
|
+
get(surfaceId: string): Promise<{
|
|
128
|
+
channel?: (components["schemas"]["ChannelType"] | null) | undefined;
|
|
129
|
+
context?: {
|
|
130
|
+
[x: string]: unknown;
|
|
131
|
+
} | undefined;
|
|
132
|
+
created_at?: string | null | undefined;
|
|
133
|
+
delivered_at?: string | null | undefined;
|
|
134
|
+
delivery_metadata?: {
|
|
135
|
+
[x: string]: unknown;
|
|
136
|
+
} | null | undefined;
|
|
137
|
+
description?: string | null | undefined;
|
|
138
|
+
entity_id?: string | null | undefined;
|
|
139
|
+
event_id: string;
|
|
140
|
+
expires_at?: string | null | undefined;
|
|
141
|
+
fields?: {
|
|
142
|
+
[x: string]: unknown;
|
|
143
|
+
}[] | undefined;
|
|
144
|
+
fields_count: number;
|
|
145
|
+
id: string;
|
|
146
|
+
opened_at?: string | null | undefined;
|
|
147
|
+
resource_type?: string | null | undefined;
|
|
148
|
+
status: components["schemas"]["SurfaceStatus"];
|
|
149
|
+
submitted_at?: string | null | undefined;
|
|
150
|
+
submitted_data?: {
|
|
151
|
+
[x: string]: unknown;
|
|
152
|
+
} | null | undefined;
|
|
153
|
+
title?: string | null | undefined;
|
|
154
|
+
} & import("../index.js").ResponseMetadata>;
|
|
155
|
+
/** Update surface metadata or fields */
|
|
156
|
+
update(surfaceId: string, body: components['schemas']['UpdateSurfaceRequest']): Promise<{
|
|
157
|
+
channel?: (components["schemas"]["ChannelType"] | null) | undefined;
|
|
158
|
+
context?: {
|
|
159
|
+
[x: string]: unknown;
|
|
160
|
+
} | undefined;
|
|
161
|
+
created_at?: string | null | undefined;
|
|
162
|
+
delivered_at?: string | null | undefined;
|
|
163
|
+
delivery_metadata?: {
|
|
164
|
+
[x: string]: unknown;
|
|
165
|
+
} | null | undefined;
|
|
166
|
+
description?: string | null | undefined;
|
|
167
|
+
entity_id?: string | null | undefined;
|
|
168
|
+
event_id: string;
|
|
169
|
+
expires_at?: string | null | undefined;
|
|
170
|
+
fields?: {
|
|
171
|
+
[x: string]: unknown;
|
|
172
|
+
}[] | undefined;
|
|
173
|
+
fields_count: number;
|
|
174
|
+
id: string;
|
|
175
|
+
opened_at?: string | null | undefined;
|
|
176
|
+
resource_type?: string | null | undefined;
|
|
177
|
+
status: components["schemas"]["SurfaceStatus"];
|
|
178
|
+
submitted_at?: string | null | undefined;
|
|
179
|
+
submitted_data?: {
|
|
180
|
+
[x: string]: unknown;
|
|
181
|
+
} | null | undefined;
|
|
182
|
+
title?: string | null | undefined;
|
|
183
|
+
} & import("../index.js").ResponseMetadata>;
|
|
184
|
+
/** Archive (soft-delete) a surface */
|
|
185
|
+
archive(surfaceId: string): Promise<{
|
|
186
|
+
status: "archived";
|
|
187
|
+
surface_id: string;
|
|
188
|
+
} & import("../index.js").ResponseMetadata>;
|
|
189
|
+
/** Deliver the surface to the recipient (SMS/email/etc.) */
|
|
190
|
+
deliver(surfaceId: string, body: components['schemas']['DeliverSurfaceRequest']): Promise<{
|
|
191
|
+
channel?: (components["schemas"]["ChannelType"] | null) | undefined;
|
|
192
|
+
channel_address: string;
|
|
193
|
+
delivered_at?: string | null | undefined;
|
|
194
|
+
delivery_provider?: string | null | undefined;
|
|
195
|
+
from_address?: string | null | undefined;
|
|
196
|
+
from_number?: string | null | undefined;
|
|
197
|
+
message_id?: string | null | undefined;
|
|
198
|
+
status: "delivered" | "pending_review";
|
|
199
|
+
surface_id: string;
|
|
200
|
+
url?: string | null | undefined;
|
|
201
|
+
} & import("../index.js").ResponseMetadata>;
|
|
202
|
+
/** Get fill / completion progress for a surface */
|
|
203
|
+
getProgress(surfaceId: string): Promise<{
|
|
204
|
+
empty_count: number;
|
|
205
|
+
empty_keys: string[];
|
|
206
|
+
filled_count: number;
|
|
207
|
+
filled_keys: string[];
|
|
208
|
+
required_empty_keys: string[];
|
|
209
|
+
surface_id: string;
|
|
210
|
+
total_fields: number;
|
|
211
|
+
} & import("../index.js").ResponseMetadata>;
|
|
212
|
+
/** Approve a pending-review surface */
|
|
213
|
+
approve(surfaceId: string): Promise<{
|
|
214
|
+
action: "approved" | "rejected";
|
|
215
|
+
status: components["schemas"]["SurfaceStatus"];
|
|
216
|
+
surface_id: string;
|
|
217
|
+
} & import("../index.js").ResponseMetadata>;
|
|
218
|
+
/** Reject a pending-review surface */
|
|
219
|
+
reject(surfaceId: string, body: components['schemas']['RejectSurfaceRequest']): Promise<{
|
|
220
|
+
action: "approved" | "rejected";
|
|
221
|
+
status: components["schemas"]["SurfaceStatus"];
|
|
222
|
+
surface_id: string;
|
|
223
|
+
} & import("../index.js").ResponseMetadata>;
|
|
224
|
+
/** Reshape — clone the surface with refined fields (review redirect) */
|
|
225
|
+
reshape(surfaceId: string): Promise<{
|
|
226
|
+
channel: components["schemas"]["ChannelType"];
|
|
227
|
+
created_at: string;
|
|
228
|
+
description?: string | null | undefined;
|
|
229
|
+
entity_id: string;
|
|
230
|
+
event_id: string;
|
|
231
|
+
expires_at: string;
|
|
232
|
+
fields_count: number;
|
|
233
|
+
id: string;
|
|
234
|
+
status: components["schemas"]["SurfaceStatus"];
|
|
235
|
+
title: string;
|
|
236
|
+
token?: string | null | undefined;
|
|
237
|
+
url?: string | null | undefined;
|
|
238
|
+
} & import("../index.js").ResponseMetadata>;
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=surfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../src/resources/surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAC1C,KAAK,CAAC,6BAA6B,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CACnE,CAAA;AACD,sFAAsF;AACtF,MAAM,MAAM,2BAA2B,GAAG,WAAW,CACnD,KAAK,CAAC,oCAAoC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAC1E,CAAA;AAED;;;;;;;GAOG;AACH,qBAAa,gBAAiB,SAAQ,uBAAuB;IAC3D,qCAAqC;IAC/B,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB;;;;uBA0Gwr4sB,qBAAsB;;;;;;;;;;;;;;;;;;;;oBAA8vC,qBAAsB;;;;;;;;;IAlGxg7sB,cAAc,CAAC,MAAM,CAAC,EAAE,kBAAkB;mBAkGor4sB,qBAAsB;;;;;;;;;;;;;;;;;;;;gBAA8vC,qBAAsB;;;;;;;IA9Fxg7sB,8DAA8D;IACxD,aAAa,CAAC,MAAM,CAAC,EAAE,2BAA2B;;;;uBA6Fsq4sB,qBAAsB;;;;;;;;;;;;;;;;;;;;oBAA8vC,qBAAsB;;;;;;;;;IArFxg7sB,2DAA2D;IACrD,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,sBAAsB,CAAC;iBAoFw9rX,qBAAsB;;;;;;;;gBAAsnB,qBAAsB;;;;;IA3E1rtX,2BAA2B;IACrB,GAAG,CAAC,SAAS,EAAE,MAAM;mBA0Ems4sB,qBAAsB;;;;;;;;;;;;;;;;;;;;gBAA8vC,qBAAsB;;;;;;;IAlExg7sB,wCAAwC;IAClC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,sBAAsB,CAAC;mBAiE2o4sB,qBAAsB;;;;;;;;;;;;;;;;;;;;gBAA8vC,qBAAsB;;;;;;;IAxDxg7sB,sCAAsC;IAChC,OAAO,CAAC,SAAS,EAAE,MAAM;;;;IAQ/B,4DAA4D;IACtD,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,uBAAuB,CAAC;mBA8C60yZ,qBAAsB;;;;;;;;;;;IArCx7yZ,mDAAmD;IAC7C,WAAW,CAAC,SAAS,EAAE,MAAM;;;;;;;;;IAQnC,uCAAuC;IACjC,OAAO,CAAC,SAAS,EAAE,MAAM;;gBA2B04loB,qBAAsB;;;IAnB/7loB,sCAAsC;IAChC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,sBAAsB,CAAC;;gBAkBs1loB,qBAAsB;;;IAT/7loB,wEAAwE;IAClE,OAAO,CAAC,SAAS,EAAE,MAAM;iBAQy/rX,qBAAsB;;;;;;;;gBAAsnB,qBAAsB;;;;;CAD3rtX"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { WorkspaceScopedResource } from './base.js';
|
|
2
|
+
/**
|
|
3
|
+
* Tasks — long-running async jobs the platform spawns (intake processing,
|
|
4
|
+
* tool executions, voice imports). The SDK exposes get-by-id and a
|
|
5
|
+
* by-call lookup for retrieving every task tied to a specific call.
|
|
6
|
+
*
|
|
7
|
+
* @beta New in this release; surface may evolve.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TasksResource extends WorkspaceScopedResource {
|
|
10
|
+
/** Get the current state of a single task */
|
|
11
|
+
get(taskId: string): Promise<{
|
|
12
|
+
cached_tokens?: number | undefined;
|
|
13
|
+
call_sid: string;
|
|
14
|
+
completed_at?: string | null | undefined;
|
|
15
|
+
dispatched_at?: string | null | undefined;
|
|
16
|
+
duration_ms?: number | null | undefined;
|
|
17
|
+
error?: string | null | undefined;
|
|
18
|
+
error_type?: string | null | undefined;
|
|
19
|
+
input_tokens?: number | undefined;
|
|
20
|
+
output_tokens?: number | undefined;
|
|
21
|
+
progress_message?: string | null | undefined;
|
|
22
|
+
progress_step?: number | null | undefined;
|
|
23
|
+
result?: string | null | undefined;
|
|
24
|
+
skill: string;
|
|
25
|
+
status: "pending" | "dispatched" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
26
|
+
sub_tool_count?: number | undefined;
|
|
27
|
+
task_id: string;
|
|
28
|
+
tier: "direct" | "companion" | "desktop" | "computer_use";
|
|
29
|
+
workspace_id: string;
|
|
30
|
+
} & import("../index.js").ResponseMetadata>;
|
|
31
|
+
/** List every task associated with a call (by Twilio call sid) */
|
|
32
|
+
listByCall(callSid: string): Promise<{
|
|
33
|
+
tasks: {
|
|
34
|
+
cached_tokens?: number | undefined;
|
|
35
|
+
call_sid: string;
|
|
36
|
+
completed_at?: string | null | undefined;
|
|
37
|
+
dispatched_at?: string | null | undefined;
|
|
38
|
+
duration_ms?: number | null | undefined;
|
|
39
|
+
error?: string | null | undefined;
|
|
40
|
+
error_type?: string | null | undefined;
|
|
41
|
+
input_tokens?: number | undefined;
|
|
42
|
+
output_tokens?: number | undefined;
|
|
43
|
+
progress_message?: string | null | undefined;
|
|
44
|
+
progress_step?: number | null | undefined;
|
|
45
|
+
result?: string | null | undefined;
|
|
46
|
+
skill: string;
|
|
47
|
+
status: "pending" | "dispatched" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
48
|
+
sub_tool_count?: number | undefined;
|
|
49
|
+
task_id: string;
|
|
50
|
+
tier: "direct" | "companion" | "desktop" | "computer_use";
|
|
51
|
+
workspace_id: string;
|
|
52
|
+
}[];
|
|
53
|
+
} & import("../index.js").ResponseMetadata>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../../src/resources/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,uBAAuB;IACxD,6CAA6C;IACvC,GAAG,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IAQxB,kEAAkE;IAC5D,UAAU,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;CAOjC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { components } from '../generated/api.js';
|
|
2
|
+
import type { ServiceId } from '../core/branded-types.js';
|
|
3
|
+
import { WorkspaceScopedResource } from './base.js';
|
|
4
|
+
/**
|
|
5
|
+
* Tools — manual execution of integration-backed tool calls (used by the
|
|
6
|
+
* tool-testing surface in the developer console) and per-service resolution
|
|
7
|
+
* of which concrete tool implementations bind to a service's tool slots.
|
|
8
|
+
*
|
|
9
|
+
* @beta New in this release; surface may evolve.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ToolsResource extends WorkspaceScopedResource {
|
|
12
|
+
/** Manually execute a tool call against the workspace's integrations */
|
|
13
|
+
execute(body: components['schemas']['ToolExecuteRequest']): Promise<{
|
|
14
|
+
blocked_side_effects?: string[] | undefined;
|
|
15
|
+
dry_run?: boolean | undefined;
|
|
16
|
+
duration_ms?: number | undefined;
|
|
17
|
+
error?: string | null | undefined;
|
|
18
|
+
is_write?: boolean | undefined;
|
|
19
|
+
result?: unknown;
|
|
20
|
+
source?: string | undefined;
|
|
21
|
+
sub_tool_logs?: {
|
|
22
|
+
duration_ms?: number | undefined;
|
|
23
|
+
input?: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
} | undefined;
|
|
26
|
+
output?: string | undefined;
|
|
27
|
+
succeeded?: boolean | undefined;
|
|
28
|
+
tool_name?: string | undefined;
|
|
29
|
+
}[] | undefined;
|
|
30
|
+
tier?: string | undefined;
|
|
31
|
+
tool_type?: string | undefined;
|
|
32
|
+
} & import("../index.js").ResponseMetadata>;
|
|
33
|
+
/** Resolve the bound tool implementations for a service */
|
|
34
|
+
resolveForService(serviceId: ServiceId | string): Promise<{
|
|
35
|
+
service_id: string;
|
|
36
|
+
tools: {
|
|
37
|
+
additional_instructions?: {
|
|
38
|
+
[x: string]: string;
|
|
39
|
+
} | undefined;
|
|
40
|
+
description?: string | undefined;
|
|
41
|
+
input_schema?: {
|
|
42
|
+
[x: string]: unknown;
|
|
43
|
+
} | undefined;
|
|
44
|
+
is_write?: boolean | undefined;
|
|
45
|
+
states?: string[] | undefined;
|
|
46
|
+
tier?: string | undefined;
|
|
47
|
+
tool_name: string;
|
|
48
|
+
tool_type: string;
|
|
49
|
+
}[];
|
|
50
|
+
workspace_id: string;
|
|
51
|
+
} & import("../index.js").ResponseMetadata>;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/resources/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,uBAAuB;IACxD,wEAAwE;IAClE,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;IAS/D,2DAA2D;IACrD,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM;;;;;;;;;;;;;;;;;;CAOtD"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { components, paths } from '../generated/api.js';
|
|
2
|
+
import { WorkspaceScopedResource } from './base.js';
|
|
3
|
+
export type ListUnificationRulesParams = NonNullable<paths['/v1/{workspace_id}/unification-rules']['get']['parameters']['query']>;
|
|
4
|
+
/**
|
|
5
|
+
* Manage entity unification rules — declarative joins that fold duplicate
|
|
6
|
+
* world-model entities into a single canonical record. Rules are evaluated
|
|
7
|
+
* on ingest; the surviving entity inherits properties from its merge sources.
|
|
8
|
+
*
|
|
9
|
+
* @beta New in this release; surface may evolve.
|
|
10
|
+
*/
|
|
11
|
+
export declare class UnificationRulesResource extends WorkspaceScopedResource {
|
|
12
|
+
/** Create a new unification rule */
|
|
13
|
+
create(body: components['schemas']['CreateUnificationRuleRequest']): Promise<{
|
|
14
|
+
accuracy: number | null;
|
|
15
|
+
agent_task_id: string | null;
|
|
16
|
+
created_at: string;
|
|
17
|
+
created_by: string | null;
|
|
18
|
+
data_source_id: string | null;
|
|
19
|
+
description: string | null;
|
|
20
|
+
events_processed: number;
|
|
21
|
+
id: string;
|
|
22
|
+
is_active: boolean;
|
|
23
|
+
last_applied_at: string | null;
|
|
24
|
+
name: string;
|
|
25
|
+
rule_config: {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
rule_type: string;
|
|
29
|
+
source_event_type: string | null;
|
|
30
|
+
target_entity_type: string | null;
|
|
31
|
+
updated_at: string;
|
|
32
|
+
workspace_id: string;
|
|
33
|
+
} & import("../index.js").ResponseMetadata>;
|
|
34
|
+
/** List unification rules in the workspace */
|
|
35
|
+
list(params?: ListUnificationRulesParams): Promise<{
|
|
36
|
+
continuation_token?: number | null | undefined;
|
|
37
|
+
has_more: boolean;
|
|
38
|
+
items: {
|
|
39
|
+
accuracy: number | null;
|
|
40
|
+
agent_task_id: string | null;
|
|
41
|
+
created_at: string;
|
|
42
|
+
created_by: string | null;
|
|
43
|
+
data_source_id: string | null;
|
|
44
|
+
description: string | null;
|
|
45
|
+
events_processed: number;
|
|
46
|
+
id: string;
|
|
47
|
+
is_active: boolean;
|
|
48
|
+
last_applied_at: string | null;
|
|
49
|
+
name: string;
|
|
50
|
+
rule_config: {
|
|
51
|
+
[x: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
rule_type: string;
|
|
54
|
+
source_event_type: string | null;
|
|
55
|
+
target_entity_type: string | null;
|
|
56
|
+
updated_at: string;
|
|
57
|
+
workspace_id: string;
|
|
58
|
+
}[];
|
|
59
|
+
total?: number | null | undefined;
|
|
60
|
+
} & import("../index.js").ResponseMetadata>;
|
|
61
|
+
listAutoPaging(params?: ListUnificationRulesParams): AsyncGenerator<{
|
|
62
|
+
accuracy: number | null;
|
|
63
|
+
agent_task_id: string | null;
|
|
64
|
+
created_at: string;
|
|
65
|
+
created_by: string | null;
|
|
66
|
+
data_source_id: string | null;
|
|
67
|
+
description: string | null;
|
|
68
|
+
events_processed: number;
|
|
69
|
+
id: string;
|
|
70
|
+
is_active: boolean;
|
|
71
|
+
last_applied_at: string | null;
|
|
72
|
+
name: string;
|
|
73
|
+
rule_config: {
|
|
74
|
+
[x: string]: unknown;
|
|
75
|
+
};
|
|
76
|
+
rule_type: string;
|
|
77
|
+
source_event_type: string | null;
|
|
78
|
+
target_entity_type: string | null;
|
|
79
|
+
updated_at: string;
|
|
80
|
+
workspace_id: string;
|
|
81
|
+
}, any, any>;
|
|
82
|
+
/** Get a single unification rule */
|
|
83
|
+
get(ruleId: string): Promise<{
|
|
84
|
+
accuracy: number | null;
|
|
85
|
+
agent_task_id: string | null;
|
|
86
|
+
created_at: string;
|
|
87
|
+
created_by: string | null;
|
|
88
|
+
data_source_id: string | null;
|
|
89
|
+
description: string | null;
|
|
90
|
+
events_processed: number;
|
|
91
|
+
id: string;
|
|
92
|
+
is_active: boolean;
|
|
93
|
+
last_applied_at: string | null;
|
|
94
|
+
name: string;
|
|
95
|
+
rule_config: {
|
|
96
|
+
[x: string]: unknown;
|
|
97
|
+
};
|
|
98
|
+
rule_type: string;
|
|
99
|
+
source_event_type: string | null;
|
|
100
|
+
target_entity_type: string | null;
|
|
101
|
+
updated_at: string;
|
|
102
|
+
workspace_id: string;
|
|
103
|
+
} & import("../index.js").ResponseMetadata>;
|
|
104
|
+
/** Update a unification rule */
|
|
105
|
+
update(ruleId: string, body: components['schemas']['UpdateUnificationRuleRequest']): Promise<{
|
|
106
|
+
accuracy: number | null;
|
|
107
|
+
agent_task_id: string | null;
|
|
108
|
+
created_at: string;
|
|
109
|
+
created_by: string | null;
|
|
110
|
+
data_source_id: string | null;
|
|
111
|
+
description: string | null;
|
|
112
|
+
events_processed: number;
|
|
113
|
+
id: string;
|
|
114
|
+
is_active: boolean;
|
|
115
|
+
last_applied_at: string | null;
|
|
116
|
+
name: string;
|
|
117
|
+
rule_config: {
|
|
118
|
+
[x: string]: unknown;
|
|
119
|
+
};
|
|
120
|
+
rule_type: string;
|
|
121
|
+
source_event_type: string | null;
|
|
122
|
+
target_entity_type: string | null;
|
|
123
|
+
updated_at: string;
|
|
124
|
+
workspace_id: string;
|
|
125
|
+
} & import("../index.js").ResponseMetadata>;
|
|
126
|
+
/** Delete a unification rule */
|
|
127
|
+
delete(ruleId: string): Promise<undefined>;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=unification-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unification-rules.d.ts","sourceRoot":"","sources":["../../../src/resources/unification-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAClD,KAAK,CAAC,sCAAsC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAC5E,CAAA;AAED;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,uBAAuB;IACnE,oCAAoC;IAC9B,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC;;;;;;;;;;;;;;;;;;;;;IASxE,8CAA8C;IACxC,IAAI,CAAC,MAAM,CAAC,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;IAQ9C,cAAc,CAAC,MAAM,CAAC,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;IAIlD,oCAAoC;IAC9B,GAAG,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;IAQxB,gCAAgC;IAC1B,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC;;;;;;;;;;;;;;;;;;;;;IASxF,gCAAgC;IAC1B,MAAM,CAAC,MAAM,EAAE,MAAM;CAO5B"}
|
|
@@ -6,25 +6,16 @@ import type { ListParams } from '../core/utils.js';
|
|
|
6
6
|
* Manage Amigo Platform workspaces.
|
|
7
7
|
* Workspaces are the top-level tenancy boundary for all resources.
|
|
8
8
|
*
|
|
9
|
-
* Note: list operates at account level (
|
|
10
|
-
*
|
|
11
|
-
* ``
|
|
12
|
-
*
|
|
9
|
+
* Note: ``list`` operates at account level (``/v1/workspaces``).
|
|
10
|
+
* Creation lives at ``/v1/me/workspaces`` — see ``MeResource``
|
|
11
|
+
* (``client.me.createWorkspace``). The legacy
|
|
12
|
+
* ``POST /v1/workspaces/self-service`` was removed in platform-api
|
|
13
|
+
* PR #2472; ``/v1/workspaces/<x>`` paths now exclusively operate on
|
|
14
|
+
* a specific workspace, so URL-parsing consumers can never confuse
|
|
15
|
+
* an account-level operation with a workspace-scoped one.
|
|
16
|
+
* Get/update/archive/provision operate on a specific workspace.
|
|
13
17
|
*/
|
|
14
18
|
export declare class WorkspacesResource extends WorkspaceScopedResource {
|
|
15
|
-
/** Create a workspace for the authenticated user and attach owner access */
|
|
16
|
-
createSelfService(body: components['schemas']['CreateWorkspaceRequest']): Promise<{
|
|
17
|
-
backend_org_id: string | null;
|
|
18
|
-
connector_type: string | null;
|
|
19
|
-
created_at: string;
|
|
20
|
-
environment: string;
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
provisioned_at: string | null;
|
|
24
|
-
region: string;
|
|
25
|
-
slug: string;
|
|
26
|
-
updated_at: string;
|
|
27
|
-
} & import("../index.js").ResponseMetadata>;
|
|
28
19
|
/** List workspaces accessible to the current API key */
|
|
29
20
|
list(params?: ListParams): Promise<{
|
|
30
21
|
continuation_token?: number | null | undefined;
|
|
@@ -128,5 +119,29 @@ export declare class WorkspacesResource extends WorkspaceScopedResource {
|
|
|
128
119
|
slug: string;
|
|
129
120
|
updated_at: string;
|
|
130
121
|
} & import("../index.js").ResponseMetadata>;
|
|
122
|
+
/**
|
|
123
|
+
* Workspace-allowlisted phone numbers that can place test calls into voice
|
|
124
|
+
* agents. The list is read-mostly; writes overwrite the entire allowlist.
|
|
125
|
+
*
|
|
126
|
+
* Always operates on the bound workspace. Use `client.withOptions(...)` or
|
|
127
|
+
* construct a second `AmigoClient` if you need to act on a different
|
|
128
|
+
* workspace.
|
|
129
|
+
*/
|
|
130
|
+
readonly testCallerNumbers: {
|
|
131
|
+
/** Get the workspace's test caller allowlist */
|
|
132
|
+
get: () => Promise<{
|
|
133
|
+
numbers: string[];
|
|
134
|
+
} & import("../index.js").ResponseMetadata>;
|
|
135
|
+
/**
|
|
136
|
+
* Replace the workspace's test caller allowlist.
|
|
137
|
+
*
|
|
138
|
+
* **Replace-all semantics:** the request body fully replaces the existing
|
|
139
|
+
* allowlist; numbers omitted from `body` are removed. Read first, mutate,
|
|
140
|
+
* then write to add/remove individual entries safely.
|
|
141
|
+
*/
|
|
142
|
+
update: (body: components["schemas"]["TestCallerNumbersRequest"]) => Promise<{
|
|
143
|
+
numbers: string[];
|
|
144
|
+
} & import("../index.js").ResponseMetadata>;
|
|
145
|
+
};
|
|
131
146
|
}
|
|
132
147
|
//# sourceMappingURL=workspaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../src/resources/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD
|
|
1
|
+
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../src/resources/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD;;;;;;;;;;;;GAYG;AACH,qBAAa,kBAAmB,SAAQ,uBAAuB;IAC7D,wDAAwD;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU;;;;;;;;;;;;;;;;;IAQ9B,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU;;;;;;;;;;;;IAIlC,mCAAmC;IAC7B,GAAG,CAAC,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM;;;;;;;;;;;;IAQnC,gCAAgC;IAC1B,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,wBAAwB,CAAC,EAAE,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM;;;;;;;;;;;;IAS7F,wCAAwC;IAClC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,EAAE,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM;;;;;;;;;;;;IAS/F,qEAAqE;IAC/D,SAAS,CAAC,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM;;;;;;;;;;;;;;IAQzC,gDAAgD;IAC1C,gBAAgB,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,EAAE,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM;;;;;IAWnF,uDAAuD;IACjD,kBAAkB,CACtB,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,2BAA2B,CAAC,EACxD,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM;;;;;;;;;;;;IAU3B;;;;;;;OAOG;IACH,QAAQ,CAAC,iBAAiB;QACxB,gDAAgD;;;;QAQhD;;;;;;WAMG;uBACkB,UAAU,CAAC,SAAS,CAAC,CAAC,0BAA0B,CAAC;;;MAOvE;CACF"}
|