@arbol-ai/sdk 5.12.0 → 5.14.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.
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { RaizAgentIntegrationSkillInput, RaizAgentSkill, RaizResponseMetadata } from "../models.js";
2
+ import type { RaizAgentIntegrationProcedureInput, RaizAgentProcedureInput, RaizResponseMetadata } from "../models.js";
3
3
  import { type RaizAgent, type RaizAgentIntegrationToolInput, type RaizAgentPage, type RaizAgentSettingsInput } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
@@ -17,12 +17,15 @@ export interface Client {
17
17
  * `firstMessage`, `language`, `timeZone`, `settings`, Knowledge
18
18
  * (`knowledgeDocumentIds` of ready documents from `list_knowledge_documents`)
19
19
  * and `integrationTools` (connection + tool pairs of the organization's
20
- * connections in Account, checked live: INTEGRATION_TOOL_UNAVAILABLE), and
21
- * for a text Agent `integrationSkills` (connection + skill pairs a connection
22
- * publishes, checked live: INTEGRATION_SKILL_UNAVAILABLE). Next: assign it to
23
- * a channel with `update_channel`; a voice Agent is published in the
24
- * background, so check `synced` with `get_agent`. Read the `create-agent`
25
- * skill (`get_skill`) first.
20
+ * connections in Account, checked live: INTEGRATION_TOOL_UNAVAILABLE),
21
+ * `procedures` (each a trigger plus free-form Markdown or structured steps,
22
+ * with inline references to the Agent's tools, Knowledge and other
23
+ * procedures: AGENT_PROCEDURES_INVALID says where one is wrong), and for a
24
+ * text Agent `integrationProcedures` (connection + procedure pairs a
25
+ * connection publishes, checked live: INTEGRATION_PROCEDURE_UNAVAILABLE).
26
+ * Next: assign it to a channel with `update_channel`; a voice Agent is
27
+ * published in the background, so check `synced` with `get_agent`. Read the
28
+ * `create-agent` skill (`get_skill`) first.
26
29
  */
27
30
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
28
31
  /**
@@ -30,11 +33,12 @@ export interface Client {
30
33
  *
31
34
  * Read one Agent's complete setup: instructions, first message, language,
32
35
  * time zone, settings, integration tools (each with its connection and
33
- * effect), Knowledge document ids, text-only skills and their references, and
34
- * channels. `ready` says whether it can hold conversations; for a voice
35
- * Agent, `synced` says whether its phone line already runs this version, and
36
- * `syncErrorCode` why not. Read it before `update_agent` and send its
37
- * `version` as `expectedVersion`.
36
+ * effect), Knowledge document ids, procedures (trigger plus free-form
37
+ * instructions or structured steps) and connection procedures, and channels.
38
+ * `ready` says whether it can hold conversations; for a voice Agent, `synced`
39
+ * says whether its phone line already runs this version, and `syncErrorCode`
40
+ * why not. Read it before `update_agent` and send its `version` as
41
+ * `expectedVersion`.
38
42
  */
39
43
  get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
40
44
  /**
@@ -53,15 +57,16 @@ export interface Client {
53
57
  * Update an Agent
54
58
  *
55
59
  * Change an Agent: instructions, first message, name, language, time zone,
56
- * settings, integration tools, Knowledge, text-only skills, connection skills
60
+ * settings, integration tools, Knowledge, procedures, connection procedures
57
61
  * or status. Omitted fields stay and `null` clears one; `settings`,
58
- * `integrationTools`, `integrationSkills`, `skills` and
59
- * `knowledgeDocumentIds` replace the whole value when given, so read the
60
- * Agent with `get_agent` first and send its `version` as `expectedVersion`
61
- * (VERSION_CONFLICT: read it again). `status: paused` stops it from answering
62
- * and calling. `modality` changes only while it has no channels and no
63
- * published voice line (AGENT_MODALITY_LOCKED). A voice Agent republishes in
64
- * the background: check `synced`.
62
+ * `integrationTools`, `integrationProcedures`, `procedures` and
63
+ * `knowledgeDocumentIds` replace the whole value when given (keep each
64
+ * existing procedure's `id`), so read the Agent with `get_agent` first and
65
+ * send its `version` as `expectedVersion` (VERSION_CONFLICT: read it again).
66
+ * `status: paused` stops it from answering and calling. `modality` changes
67
+ * only while it has no channels and no published voice line
68
+ * (AGENT_MODALITY_LOCKED). A voice Agent republishes in the background: check
69
+ * `synced`.
65
70
  */
66
71
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
67
72
  }
@@ -72,12 +77,11 @@ export interface CreateRequest {
72
77
  firstMessage?: string | null;
73
78
  instructions?: string | null;
74
79
  /**
75
- * Text Agents. Skills a connection publishes (`listConnections`, checked live
76
- * in Account), each saved with its current text and offered beside `skills`;
77
- * names must differ from the Agent's own skills. In an update, the complete
78
- * new set.
80
+ * Text Agents. Procedures a connection publishes (`listConnections`, checked
81
+ * live in Account), each saved with its current text and run as a free-form
82
+ * procedure beside `procedures`. In an update, the complete new set.
79
83
  */
80
- integrationSkills?: RaizAgentIntegrationSkillInput[];
84
+ integrationProcedures?: RaizAgentIntegrationProcedureInput[];
81
85
  /**
82
86
  * The integrations' tools the Agent may call, each on one of the
83
87
  * organization's connections (`listConnections`, checked live in Account).
@@ -99,19 +103,17 @@ export interface CreateRequest {
99
103
  */
100
104
  modality: "voice" | "text";
101
105
  name: string;
106
+ /**
107
+ * The Agent's procedures, as a complete set: a procedure left out is removed.
108
+ * Keep each existing procedure's `id`; a new one may omit it.
109
+ */
110
+ procedures?: RaizAgentProcedureInput[];
102
111
  /**
103
112
  * How the Agent behaves. In an update, the complete new settings: keys left
104
113
  * out return to their default. Text and voice settings apply only to Agents
105
114
  * of that modality.
106
115
  */
107
116
  settings?: RaizAgentSettingsInput;
108
- /**
109
- * Text-only procedures and references loaded on demand. Names and resource
110
- * paths must be unique; the complete set is limited to 256 KiB. In an update,
111
- * this replaces the whole set. Skills never grant additional business tools
112
- * or execute scripts.
113
- */
114
- skills?: RaizAgentSkill[];
115
117
  /**
116
118
  * A paused Agent answers nothing and places no calls.
117
119
  */
@@ -189,12 +191,11 @@ export interface UpdateRequest {
189
191
  firstMessage?: string | null;
190
192
  instructions?: string | null;
191
193
  /**
192
- * Text Agents. Skills a connection publishes (`listConnections`, checked live
193
- * in Account), each saved with its current text and offered beside `skills`;
194
- * names must differ from the Agent's own skills. In an update, the complete
195
- * new set.
194
+ * Text Agents. Procedures a connection publishes (`listConnections`, checked
195
+ * live in Account), each saved with its current text and run as a free-form
196
+ * procedure beside `procedures`. In an update, the complete new set.
196
197
  */
197
- integrationSkills?: RaizAgentIntegrationSkillInput[];
198
+ integrationProcedures?: RaizAgentIntegrationProcedureInput[];
198
199
  /**
199
200
  * The integrations' tools the Agent may call, each on one of the
200
201
  * organization's connections (`listConnections`, checked live in Account).
@@ -216,19 +217,17 @@ export interface UpdateRequest {
216
217
  */
217
218
  modality?: "voice" | "text";
218
219
  name?: string;
220
+ /**
221
+ * The Agent's procedures, as a complete set: a procedure left out is removed.
222
+ * Keep each existing procedure's `id`; a new one may omit it.
223
+ */
224
+ procedures?: RaizAgentProcedureInput[];
219
225
  /**
220
226
  * How the Agent behaves. In an update, the complete new settings: keys left
221
227
  * out return to their default. Text and voice settings apply only to Agents
222
228
  * of that modality.
223
229
  */
224
230
  settings?: RaizAgentSettingsInput;
225
- /**
226
- * Text-only procedures and references loaded on demand. Names and resource
227
- * paths must be unique; the complete set is limited to 256 KiB. In an update,
228
- * this replaces the whole set. Skills never grant additional business tools
229
- * or execute scripts.
230
- */
231
- skills?: RaizAgentSkill[];
232
231
  /**
233
232
  * A paused Agent answers nothing and places no calls.
234
233
  */
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, CreateRequest, CreateResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizAgent, RaizAgentGreeting, RaizAgentIntegrationToolInput, RaizAgentModelTrial, RaizAgentPage, RaizAgentSettings, RaizAgentSettingsInput, RaizAgentTurnPolicy, RaizAgentVoiceSettings, } from "./models.js";
5
+ export type { RaizAgent, RaizAgentGreeting, RaizAgentIntegrationToolInput, RaizAgentModelTrial, RaizAgentPage, RaizAgentProcedure, RaizAgentSettings, RaizAgentSettingsInput, RaizAgentTurnPolicy, RaizAgentVoiceSettings, } from "./models.js";
@@ -1,5 +1,5 @@
1
1
  import type { PageInfo } from "../../models.js";
2
- import { type RaizAgentSkill, type RaizBusinessHours } from "../models.js";
2
+ import { type RaizBusinessHours } from "../models.js";
3
3
  export interface RaizAgent {
4
4
  channelCount: number;
5
5
  /**
@@ -24,13 +24,14 @@ export interface RaizAgent {
24
24
  id: string;
25
25
  instructions: string | null;
26
26
  /**
27
- * The skills the Agent takes from its connections, each saved with the text
28
- * its connection published then. Offered beside `skills`.
27
+ * The procedures the Agent takes from its connections, each saved with the
28
+ * text its connection published then. They run as free-form procedures beside
29
+ * `procedures`.
29
30
  */
30
- integrationSkills: {
31
+ integrationProcedures: {
31
32
  connectionId: string;
32
33
  digest: string;
33
- skill: string;
34
+ procedure: string;
34
35
  }[];
35
36
  /**
36
37
  * The integrations' tools the Agent may call, each on the connection it runs
@@ -56,19 +57,18 @@ export interface RaizAgent {
56
57
  */
57
58
  modality: "voice" | "text";
58
59
  name: string;
60
+ /**
61
+ * The Agent's procedures. The model reads only the triggers until a
62
+ * conversation matches one, then loads that procedure. In an update, the
63
+ * complete new set.
64
+ */
65
+ procedures: RaizAgentProcedure[];
59
66
  /**
60
67
  * Whether the Agent can hold conversations: active, with instructions and,
61
68
  * for voice, published for calls.
62
69
  */
63
70
  ready: boolean;
64
71
  settings: RaizAgentSettings;
65
- /**
66
- * Text-only procedures and references loaded on demand. Names and resource
67
- * paths must be unique; the complete set is limited to 256 KiB. In an update,
68
- * this replaces the whole set. Skills never grant additional business tools
69
- * or execute scripts.
70
- */
71
- skills: RaizAgentSkill[];
72
72
  /**
73
73
  * A paused Agent answers nothing and places no calls.
74
74
  */
@@ -136,6 +136,184 @@ export interface RaizAgentPage {
136
136
  */
137
137
  pageInfo: PageInfo;
138
138
  }
139
+ export interface RaizAgentProcedure {
140
+ /**
141
+ * Free-form procedures: what to do, in Markdown, with inline references such
142
+ * as `[tool id="buscar_citas"]`, `[kb id="kdc_…"]`, `[procedure id="prc_…"]`,
143
+ * `[system_tool id="end_conversation"]` and `{{contact_name}}`. Empty for
144
+ * structured procedures.
145
+ */
146
+ content: string;
147
+ /**
148
+ * The procedure's id (`prc_…`), stable for the Agent's life.
149
+ */
150
+ id: string;
151
+ /**
152
+ * A short label for people. The model never reads it.
153
+ */
154
+ name: string;
155
+ /**
156
+ * A paused procedure runs on no channel.
157
+ */
158
+ status: "active" | "paused";
159
+ /**
160
+ * Structured procedures: the steps, in order. Empty for free-form procedures.
161
+ */
162
+ steps: ({
163
+ instruction: string;
164
+ type: "ask";
165
+ } | {
166
+ instruction: string;
167
+ type: "tell";
168
+ } | {
169
+ message: string;
170
+ translations?: {
171
+ [key: string]: unknown;
172
+ };
173
+ type: "say";
174
+ } | {
175
+ arguments?: {
176
+ [key: string]: unknown;
177
+ };
178
+ instruction?: string;
179
+ onFailure?: ({
180
+ instruction: string;
181
+ type: "ask";
182
+ } | {
183
+ instruction: string;
184
+ type: "tell";
185
+ } | {
186
+ message: string;
187
+ translations?: {
188
+ [key: string]: unknown;
189
+ };
190
+ type: "say";
191
+ } | {
192
+ procedureId: string;
193
+ type: "procedure";
194
+ } | {
195
+ type: "end";
196
+ } | {
197
+ maxRetries: number;
198
+ type: "retry";
199
+ })[];
200
+ tool: string;
201
+ type: "tool";
202
+ } | {
203
+ branches: {
204
+ steps: ({
205
+ instruction: string;
206
+ type: "ask";
207
+ } | {
208
+ instruction: string;
209
+ type: "tell";
210
+ } | {
211
+ message: string;
212
+ translations?: {
213
+ [key: string]: unknown;
214
+ };
215
+ type: "say";
216
+ } | {
217
+ arguments?: {
218
+ [key: string]: unknown;
219
+ };
220
+ instruction?: string;
221
+ onFailure?: ({
222
+ instruction: string;
223
+ type: "ask";
224
+ } | {
225
+ instruction: string;
226
+ type: "tell";
227
+ } | {
228
+ message: string;
229
+ translations?: {
230
+ [key: string]: unknown;
231
+ };
232
+ type: "say";
233
+ } | {
234
+ procedureId: string;
235
+ type: "procedure";
236
+ } | {
237
+ type: "end";
238
+ } | {
239
+ maxRetries: number;
240
+ type: "retry";
241
+ })[];
242
+ tool: string;
243
+ type: "tool";
244
+ } | {
245
+ procedureId: string;
246
+ type: "procedure";
247
+ } | {
248
+ type: "end";
249
+ })[];
250
+ when: string;
251
+ }[];
252
+ otherwise?: ({
253
+ instruction: string;
254
+ type: "ask";
255
+ } | {
256
+ instruction: string;
257
+ type: "tell";
258
+ } | {
259
+ message: string;
260
+ translations?: {
261
+ [key: string]: unknown;
262
+ };
263
+ type: "say";
264
+ } | {
265
+ arguments?: {
266
+ [key: string]: unknown;
267
+ };
268
+ instruction?: string;
269
+ onFailure?: ({
270
+ instruction: string;
271
+ type: "ask";
272
+ } | {
273
+ instruction: string;
274
+ type: "tell";
275
+ } | {
276
+ message: string;
277
+ translations?: {
278
+ [key: string]: unknown;
279
+ };
280
+ type: "say";
281
+ } | {
282
+ procedureId: string;
283
+ type: "procedure";
284
+ } | {
285
+ type: "end";
286
+ } | {
287
+ maxRetries: number;
288
+ type: "retry";
289
+ })[];
290
+ tool: string;
291
+ type: "tool";
292
+ } | {
293
+ procedureId: string;
294
+ type: "procedure";
295
+ } | {
296
+ type: "end";
297
+ })[];
298
+ type: "branch";
299
+ } | {
300
+ procedureId: string;
301
+ type: "procedure";
302
+ } | {
303
+ type: "end";
304
+ })[];
305
+ /**
306
+ * When it applies, from the contact's side: When the contact asks to book or
307
+ * move an appointment. Empty makes a sub-procedure, which only runs when
308
+ * another procedure references it.
309
+ */
310
+ trigger: string;
311
+ /**
312
+ * `free_form`: instructions the Agent adapts. `structured`: steps that run
313
+ * the same way every time. Fixed once created.
314
+ */
315
+ type: "free_form" | "structured";
316
+ }
139
317
  export interface RaizAgentSettings {
140
318
  attachmentReader: "vision" | "ocr" | null;
141
319
  automaticKnowledge: boolean | null;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { array, instant, object } from "../../_/index.js";
4
- import { RaizBusinessHoursCodec, } from "../models.js";
4
+ import { RaizBusinessHoursCodec } from "../models.js";
5
5
  export const RaizAgentCodec = object([
6
6
  ["createdAt", null, instant],
7
7
  ["updatedAt", null, instant],
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { RaizAgentIntegrationSkillInput, RaizAgentSkill, RaizResponseMetadata } from "../models.js";
2
+ import type { RaizAgentIntegrationProcedureInput, RaizAgentProcedureInput, RaizResponseMetadata } from "../models.js";
3
3
  import { type RaizEvalRun } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
@@ -20,7 +20,7 @@ export interface Client {
20
20
  * person must review its applicability to calls before approval. Otherwise
21
21
  * measure a candidate version on its kept evaluation cases before publishing
22
22
  * it: the WhatsApp Agent rewrites each case's reply with the candidate's
23
- * `instructions`, `skills`, `integrationSkills`, `model` and
23
+ * `instructions`, `procedures`, `integrationProcedures`, `model` and
24
24
  * `reasoningEffort` (omitted ones stay as the live Agent has them), without
25
25
  * running any integration tool (each answers with what it answered in the
26
26
  * original conversation) and without sending anything; then a judge model
@@ -52,15 +52,15 @@ export interface CreateRequest {
52
52
  agentId: string;
53
53
  /**
54
54
  * The candidate version: what changes in what the model reads. Omitted fields
55
- * keep the live Agent's; `integrationSkills` and `skills` are complete sets,
56
- * as in `updateAgent`.
55
+ * keep the live Agent's; `integrationProcedures` and `procedures` are
56
+ * complete sets, as in `updateAgent`.
57
57
  */
58
58
  candidate?: {
59
59
  instructions?: string | null;
60
- integrationSkills?: RaizAgentIntegrationSkillInput[];
60
+ integrationProcedures?: RaizAgentIntegrationProcedureInput[];
61
61
  model?: "arbolito/agile" | "arbolito/balanced" | "arbolito/advanced" | "arbolito/top" | null;
62
+ procedures?: RaizAgentProcedureInput[];
62
63
  reasoningEffort?: "none" | "low" | "medium" | "high" | "xhigh" | null;
63
- skills?: RaizAgentSkill[];
64
64
  };
65
65
  /**
66
66
  * The Agent's kept cases to replay. Omitted: its 50 newest kept cases.
@@ -7,9 +7,9 @@ export interface RaizEvalRun {
7
7
  baseVersionId: string | null;
8
8
  caseIds: string[];
9
9
  /**
10
- * SHA-256 of the candidate's content (instructions, skills, connection
11
- * skills, model, reasoning effort): what `settings.evalGate` compares with an
12
- * update's.
10
+ * SHA-256 of the candidate's content (instructions, procedures, connection
11
+ * procedures, model, reasoning effort): what `settings.evalGate` compares
12
+ * with an update's.
13
13
  */
14
14
  contentSha256: string;
15
15
  /**
@@ -2,4 +2,4 @@ export { ApiError } from "../_/index.js";
2
2
  export type { RequestOptions } from "../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, } from "./client.js";
5
- export type { RaizAgentIntegrationSkillInput, RaizAgentSkill, RaizBusinessHours, RaizBusinessHoursWindow, RaizContactHoursWindow, RaizCount, RaizEmailAddress, RaizFact, RaizFailureResponse, RaizHttpsUrl, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizResponseMetadata, RaizTask, } from "./models.js";
5
+ export type { RaizAgentIntegrationProcedureInput, RaizAgentProcedureInput, RaizBusinessHours, RaizBusinessHoursWindow, RaizContactHoursWindow, RaizCount, RaizEmailAddress, RaizFact, RaizFailureResponse, RaizHttpsUrl, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizResponseMetadata, RaizTask, } from "./models.js";
@@ -1,30 +1,191 @@
1
1
  import type { Failure, ValidationIssue } from "../models.js";
2
- export interface RaizAgentIntegrationSkillInput {
2
+ export interface RaizAgentIntegrationProcedureInput {
3
3
  /**
4
4
  * A connection's id in Account (`con_…`).
5
5
  */
6
6
  connectionId: string;
7
7
  /**
8
- * The skill's name, as its connection lists it.
8
+ * The procedure's name, as its connection lists it.
9
9
  */
10
- skill: string;
10
+ procedure: string;
11
11
  }
12
- export interface RaizAgentSkill {
13
- description: string;
14
- instructions: string;
12
+ export interface RaizAgentProcedureInput {
13
+ /**
14
+ * Free-form procedures: what to do, in Markdown, with inline references such
15
+ * as `[tool id="buscar_citas"]`, `[kb id="kdc_…"]`, `[procedure id="prc_…"]`,
16
+ * `[system_tool id="end_conversation"]` and `{{contact_name}}`. Empty for
17
+ * structured procedures.
18
+ */
19
+ content?: string;
20
+ /**
21
+ * The procedure's id (`prc_…`), stable for the Agent's life.
22
+ */
23
+ id?: string;
24
+ /**
25
+ * A short label for people. The model never reads it.
26
+ */
15
27
  name: string;
16
- resources: {
17
- content: string;
18
- path: string;
19
- }[];
20
- status: "active" | "paused";
21
- /**
22
- * WhatsApp: while this skill is active in a reply, the model is offered only
23
- * these tools plus Raíz's own (choices, attachments, skills, escalation).
24
- * Omitted: every tool stays offered. Narrowing changes the request's tool
25
- * list, so the provider's cached prefix restarts for that reply.
26
- */
27
- tools?: string[];
28
+ /**
29
+ * A paused procedure runs on no channel.
30
+ */
31
+ status?: "active" | "paused";
32
+ /**
33
+ * Structured procedures: the steps, in order. Empty for free-form procedures.
34
+ */
35
+ steps?: ({
36
+ instruction: string;
37
+ type: "ask";
38
+ } | {
39
+ instruction: string;
40
+ type: "tell";
41
+ } | {
42
+ message: string;
43
+ translations?: {
44
+ [key: string]: unknown;
45
+ };
46
+ type: "say";
47
+ } | {
48
+ arguments?: {
49
+ [key: string]: unknown;
50
+ };
51
+ instruction?: string;
52
+ onFailure?: ({
53
+ instruction: string;
54
+ type: "ask";
55
+ } | {
56
+ instruction: string;
57
+ type: "tell";
58
+ } | {
59
+ message: string;
60
+ translations?: {
61
+ [key: string]: unknown;
62
+ };
63
+ type: "say";
64
+ } | {
65
+ procedureId: string;
66
+ type: "procedure";
67
+ } | {
68
+ type: "end";
69
+ } | {
70
+ maxRetries: number;
71
+ type: "retry";
72
+ })[];
73
+ tool: string;
74
+ type: "tool";
75
+ } | {
76
+ branches: {
77
+ steps: ({
78
+ instruction: string;
79
+ type: "ask";
80
+ } | {
81
+ instruction: string;
82
+ type: "tell";
83
+ } | {
84
+ message: string;
85
+ translations?: {
86
+ [key: string]: unknown;
87
+ };
88
+ type: "say";
89
+ } | {
90
+ arguments?: {
91
+ [key: string]: unknown;
92
+ };
93
+ instruction?: string;
94
+ onFailure?: ({
95
+ instruction: string;
96
+ type: "ask";
97
+ } | {
98
+ instruction: string;
99
+ type: "tell";
100
+ } | {
101
+ message: string;
102
+ translations?: {
103
+ [key: string]: unknown;
104
+ };
105
+ type: "say";
106
+ } | {
107
+ procedureId: string;
108
+ type: "procedure";
109
+ } | {
110
+ type: "end";
111
+ } | {
112
+ maxRetries: number;
113
+ type: "retry";
114
+ })[];
115
+ tool: string;
116
+ type: "tool";
117
+ } | {
118
+ procedureId: string;
119
+ type: "procedure";
120
+ } | {
121
+ type: "end";
122
+ })[];
123
+ when: string;
124
+ }[];
125
+ otherwise?: ({
126
+ instruction: string;
127
+ type: "ask";
128
+ } | {
129
+ instruction: string;
130
+ type: "tell";
131
+ } | {
132
+ message: string;
133
+ translations?: {
134
+ [key: string]: unknown;
135
+ };
136
+ type: "say";
137
+ } | {
138
+ arguments?: {
139
+ [key: string]: unknown;
140
+ };
141
+ instruction?: string;
142
+ onFailure?: ({
143
+ instruction: string;
144
+ type: "ask";
145
+ } | {
146
+ instruction: string;
147
+ type: "tell";
148
+ } | {
149
+ message: string;
150
+ translations?: {
151
+ [key: string]: unknown;
152
+ };
153
+ type: "say";
154
+ } | {
155
+ procedureId: string;
156
+ type: "procedure";
157
+ } | {
158
+ type: "end";
159
+ } | {
160
+ maxRetries: number;
161
+ type: "retry";
162
+ })[];
163
+ tool: string;
164
+ type: "tool";
165
+ } | {
166
+ procedureId: string;
167
+ type: "procedure";
168
+ } | {
169
+ type: "end";
170
+ })[];
171
+ type: "branch";
172
+ } | {
173
+ procedureId: string;
174
+ type: "procedure";
175
+ } | {
176
+ type: "end";
177
+ })[];
178
+ /**
179
+ * When it applies, from the contact's side: When the contact asks to book or
180
+ * move an appointment. Empty makes a sub-procedure, which only runs when
181
+ * another procedure references it.
182
+ */
183
+ trigger?: string;
184
+ /**
185
+ * `free_form`: instructions the Agent adapts. `structured`: steps that run
186
+ * the same way every time. Fixed once created.
187
+ */
188
+ type: "free_form" | "structured";
28
189
  }
29
190
  export interface RaizBusinessHours {
30
191
  /**
@@ -658,11 +819,14 @@ export interface RaizFailureResponse {
658
819
  message: "Calls are unavailable right now. Try again in a few minutes.";
659
820
  retryable: true;
660
821
  } | {
661
- code: "AGENT_SKILLS_INVALID";
822
+ code: "AGENT_PROCEDURES_INVALID";
662
823
  data: {
663
- [key: string]: unknown;
824
+ issues: {
825
+ code: string;
826
+ path: string;
827
+ }[];
664
828
  };
665
- message: "Skills require a text Agent, unique names and resource paths, nonempty instructions, and at most 256 KiB in total.";
829
+ message: "A procedure is incomplete, references a tool, document or procedure the Agent does not have, or breaks the structured step rules. `issues` says where.";
666
830
  retryable: false;
667
831
  } | {
668
832
  code: "AGENT_IN_USE";
@@ -728,11 +892,11 @@ export interface RaizFailureResponse {
728
892
  message: "The organization's integrations cannot be read right now. Try again shortly.";
729
893
  retryable: true;
730
894
  } | {
731
- code: "INTEGRATION_SKILL_UNAVAILABLE";
895
+ code: "INTEGRATION_PROCEDURE_UNAVAILABLE";
732
896
  data: {
733
897
  [key: string]: unknown;
734
898
  };
735
- message: "A skill does not exist in this organization's connections, Raíz cannot run its connection, or its name repeats one of the Agent's skills.";
899
+ message: "A procedure does not exist in this organization's connections, Raíz cannot run its connection, or the Agent is not a text Agent.";
736
900
  retryable: false;
737
901
  } | {
738
902
  code: "INTEGRATION_TOOL_UNAVAILABLE";
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
- export type { SaludTotalAffiliationLookupResponse, SaludTotalLookupAffiliationBody, SaludTotalLookupAffiliationConflictError, SaludTotalLookupAffiliationConflictFailure, SaludTotalLookupAffiliationForbiddenError, SaludTotalLookupAffiliationForbiddenFailure, SaludTotalLookupAffiliationServiceUnavailableError, SaludTotalLookupAffiliationServiceUnavailableFailure, SaludTotalLookupAffiliationTooManyRequestsError, SaludTotalLookupAffiliationTooManyRequestsFailure, } from "./models.js";
5
+ export type { SaludTotalAffiliationLookup, SaludTotalAffiliationLookupResponse, SaludTotalLookupAffiliationBody, SaludTotalLookupAffiliationConflictError, SaludTotalLookupAffiliationConflictFailure, SaludTotalLookupAffiliationForbiddenError, SaludTotalLookupAffiliationForbiddenFailure, SaludTotalLookupAffiliationServiceUnavailableError, SaludTotalLookupAffiliationServiceUnavailableFailure, SaludTotalLookupAffiliationTooManyRequestsError, SaludTotalLookupAffiliationTooManyRequestsFailure, } from "./models.js";
@@ -1,5 +1,9 @@
1
1
  import type { ForbiddenFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import type { SaludTotalAccountUnavailableFailure, SaludTotalAffiliationLookup, SaludTotalConnectionUnavailableFailure, SaludTotalCredentialsRejectedFailure, SaludTotalInteractiveVerificationRequiredFailure, SaludTotalIpsIdentityMismatchFailure, SaludTotalLoginCoolingDownFailure, SaludTotalModuleForbiddenFailure, SaludTotalPortalAccessUnverifiedFailure, SaludTotalProviderUnavailableFailure, SaludTotalSessionClosedFailure, SaludTotalSessionExpiredFailure, SaludTotalSiteUnavailableFailure } from "../models.js";
2
+ import type { SaludTotalAccountUnavailableFailure, SaludTotalConnectionUnavailableFailure, SaludTotalCredentialsRejectedFailure, SaludTotalInteractiveVerificationRequiredFailure, SaludTotalIpsIdentityMismatchFailure, SaludTotalLoginCoolingDownFailure, SaludTotalModuleForbiddenFailure, SaludTotalPortalAccessUnverifiedFailure, SaludTotalProviderUnavailableFailure, SaludTotalSessionClosedFailure, SaludTotalSessionExpiredFailure, SaludTotalSiteUnavailableFailure } from "../models.js";
3
+ export interface SaludTotalAffiliationLookup {
4
+ providerStatus: string | null;
5
+ status: "matched" | "no_match" | "ambiguous";
6
+ }
3
7
  /**
4
8
  * A successful answer.
5
9
  */
@@ -4,8 +4,6 @@ import { type Client as AuthorizationsClient } from "./authorizations/client.js"
4
4
  import { type Client as FilingsClient } from "./filings/client.js";
5
5
  import { type Client as InvoicesClient } from "./invoices/client.js";
6
6
  import { type Client as NoticesClient } from "./notices/client.js";
7
- import { type Client as SamplesClient } from "./samples/client.js";
8
- import { type Client as WorkflowPreviewsClient } from "./workflowPreviews/client.js";
9
7
  export interface ClientOptions extends BaseClientOptions {
10
8
  /**
11
9
  * The URL the paths of the API are relative to.
@@ -18,8 +16,6 @@ export interface Client {
18
16
  readonly filings: FilingsClient;
19
17
  readonly invoices: InvoicesClient;
20
18
  readonly notices: NoticesClient;
21
- readonly samples: SamplesClient;
22
- readonly workflowPreviews: WorkflowPreviewsClient;
23
19
  }
24
20
  export declare function createClient(options: ClientOptions): Client;
25
21
  export declare function bind(transport: Transport): Client;
@@ -6,8 +6,6 @@ import { bind as bindAuthorizations, } from "./authorizations/client.js";
6
6
  import { bind as bindFilings, } from "./filings/client.js";
7
7
  import { bind as bindInvoices, } from "./invoices/client.js";
8
8
  import { bind as bindNotices, } from "./notices/client.js";
9
- import { bind as bindSamples, } from "./samples/client.js";
10
- import { bind as bindWorkflowPreviews, } from "./workflowPreviews/client.js";
11
9
  export function createClient(options) {
12
10
  return bind(new Transport(options));
13
11
  }
@@ -17,8 +15,6 @@ export function bind(transport) {
17
15
  let filingsClient;
18
16
  let invoicesClient;
19
17
  let noticesClient;
20
- let samplesClient;
21
- let workflowPreviewsClient;
22
18
  return {
23
19
  get affiliations() {
24
20
  return (affiliationsClient ??= bindAffiliations(transport));
@@ -35,11 +31,5 @@ export function bind(transport) {
35
31
  get notices() {
36
32
  return (noticesClient ??= bindNotices(transport));
37
33
  },
38
- get samples() {
39
- return (samplesClient ??= bindSamples(transport));
40
- },
41
- get workflowPreviews() {
42
- return (workflowPreviewsClient ??= bindWorkflowPreviews(transport));
43
- },
44
34
  };
45
35
  }
@@ -2,4 +2,4 @@ export { ApiError } from "../_/index.js";
2
2
  export type { RequestOptions } from "../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, } from "./client.js";
5
- export type { SaludTotalAccountUnavailableFailure, SaludTotalAffiliationLookup, SaludTotalConnectionUnavailableFailure, SaludTotalCredentialsRejectedFailure, SaludTotalInteractiveVerificationRequiredFailure, SaludTotalInvoiceLookupInput, SaludTotalInvoiceLookupResult, SaludTotalIpsIdentityMismatchFailure, SaludTotalLoginCoolingDownFailure, SaludTotalModuleForbiddenFailure, SaludTotalPortalAccessUnverifiedFailure, SaludTotalProviderUnavailableFailure, SaludTotalRecordAvailability, SaludTotalRecordAvailabilityResponse, SaludTotalScopedDayLookup, SaludTotalSessionClosedFailure, SaludTotalSessionExpiredFailure, SaludTotalSiteUnavailableFailure, } from "./models.js";
5
+ export type { SaludTotalAccountUnavailableFailure, SaludTotalConnectionUnavailableFailure, SaludTotalCredentialsRejectedFailure, SaludTotalInteractiveVerificationRequiredFailure, SaludTotalIpsIdentityMismatchFailure, SaludTotalLoginCoolingDownFailure, SaludTotalModuleForbiddenFailure, SaludTotalPortalAccessUnverifiedFailure, SaludTotalProviderUnavailableFailure, SaludTotalRecordAvailability, SaludTotalRecordAvailabilityResponse, SaludTotalScopedDayLookup, SaludTotalSessionClosedFailure, SaludTotalSessionExpiredFailure, SaludTotalSiteUnavailableFailure, } from "./models.js";
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { SaludTotalInvoiceLookupInput } from "../models.js";
3
- import type { SaludTotalInvoiceLookupResultResponse } from "./models.js";
2
+ import type { SaludTotalInvoiceLookupInput, SaludTotalInvoiceLookupResultResponse } from "./models.js";
4
3
  export interface ClientOptions extends BaseClientOptions {
5
4
  /**
6
5
  * The URL the paths of the API are relative to.
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
- export type { SaludTotalInvoiceLookupResultResponse, SaludTotalLookupInvoiceConflictError, SaludTotalLookupInvoiceConflictFailure, SaludTotalLookupInvoiceForbiddenError, SaludTotalLookupInvoiceForbiddenFailure, SaludTotalLookupInvoiceServiceUnavailableError, SaludTotalLookupInvoiceServiceUnavailableFailure, SaludTotalLookupInvoiceTooManyRequestsError, SaludTotalLookupInvoiceTooManyRequestsFailure, } from "./models.js";
5
+ export type { SaludTotalInvoiceLookupInput, SaludTotalInvoiceLookupResult, SaludTotalInvoiceLookupResultResponse, SaludTotalLookupInvoiceConflictError, SaludTotalLookupInvoiceConflictFailure, SaludTotalLookupInvoiceForbiddenError, SaludTotalLookupInvoiceForbiddenFailure, SaludTotalLookupInvoiceServiceUnavailableError, SaludTotalLookupInvoiceServiceUnavailableFailure, SaludTotalLookupInvoiceTooManyRequestsError, SaludTotalLookupInvoiceTooManyRequestsFailure, } from "./models.js";
@@ -1,5 +1,14 @@
1
1
  import type { ForbiddenFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import type { SaludTotalAccountUnavailableFailure, SaludTotalConnectionUnavailableFailure, SaludTotalCredentialsRejectedFailure, SaludTotalInteractiveVerificationRequiredFailure, SaludTotalInvoiceLookupResult, SaludTotalIpsIdentityMismatchFailure, SaludTotalLoginCoolingDownFailure, SaludTotalModuleForbiddenFailure, SaludTotalPortalAccessUnverifiedFailure, SaludTotalProviderUnavailableFailure, SaludTotalSessionClosedFailure, SaludTotalSessionExpiredFailure, SaludTotalSiteUnavailableFailure } from "../models.js";
2
+ import type { SaludTotalAccountUnavailableFailure, SaludTotalConnectionUnavailableFailure, SaludTotalCredentialsRejectedFailure, SaludTotalInteractiveVerificationRequiredFailure, SaludTotalIpsIdentityMismatchFailure, SaludTotalLoginCoolingDownFailure, SaludTotalModuleForbiddenFailure, SaludTotalPortalAccessUnverifiedFailure, SaludTotalProviderUnavailableFailure, SaludTotalSessionClosedFailure, SaludTotalSessionExpiredFailure, SaludTotalSiteUnavailableFailure } from "../models.js";
3
+ export interface SaludTotalInvoiceLookupInput {
4
+ connectionId: string;
5
+ invoiceNumber: string;
6
+ prefix: string;
7
+ }
8
+ export interface SaludTotalInvoiceLookupResult {
9
+ recordCount: number;
10
+ status: "no_match" | "records_found";
11
+ }
3
12
  /**
4
13
  * A successful answer.
5
14
  */
@@ -20,10 +20,6 @@ export interface SaludTotalAccountUnavailableFailure {
20
20
  */
21
21
  retryable: false;
22
22
  }
23
- export interface SaludTotalAffiliationLookup {
24
- providerStatus: string | null;
25
- status: "matched" | "no_match" | "ambiguous";
26
- }
27
23
  /**
28
24
  * This operation requires an active IPS connection in this organization with
29
25
  * the matching workflow tag.
@@ -88,15 +84,6 @@ export interface SaludTotalInteractiveVerificationRequiredFailure {
88
84
  */
89
85
  retryable: false;
90
86
  }
91
- export interface SaludTotalInvoiceLookupInput {
92
- connectionId: string;
93
- invoiceNumber: string;
94
- prefix: string;
95
- }
96
- export interface SaludTotalInvoiceLookupResult {
97
- recordCount: number;
98
- status: "no_match" | "records_found";
99
- }
100
87
  /**
101
88
  * The provider returned a different IPS identity.
102
89
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "5.12.0",
3
+ "version": "5.14.0",
4
4
  "description": "The Arbol API for TypeScript and JavaScript, generated by Cloudflare Forge from the platform's public OpenAPI.",
5
5
  "keywords": [
6
6
  "arbol",
@@ -56,8 +56,8 @@
56
56
  "packageManager": "bun@1.4.3",
57
57
  "arbol": {
58
58
  "openapi": {
59
- "release": "1.20261031.230532",
60
- "sha256": "f72c7d8c774ddc0ab035464dceb9bc8f11968114f4a6efd76d2205f271f76c4b"
59
+ "release": "1.20261031.232616",
60
+ "sha256": "c278178a1672b31209b7ed57864896029959c7988f99d6d3adfc5256fd2990a6"
61
61
  }
62
62
  }
63
63
  }
@@ -1,46 +0,0 @@
1
- import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import { type SaludTotalLookupSamplePageResponse } from "./models.js";
3
- export interface ClientOptions extends BaseClientOptions {
4
- /**
5
- * The URL the paths of the API are relative to.
6
- */
7
- baseUrl: string;
8
- }
9
- export interface Client {
10
- /**
11
- * Find a lookup request and sample response
12
- *
13
- * Return synthetic examples for the published IPS lookups, filtered by
14
- * resource or response status. Resolve each sample path against its baseUrl.
15
- * It includes the JSON request body and unwrapped response data. No provider
16
- * is contacted. Replace the example identifiers before making an authorized
17
- * live call.
18
- */
19
- list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
20
- }
21
- export declare function createClient(options: ClientOptions): Client;
22
- export declare function bind(transport: Transport): Client;
23
- export interface ListRequest {
24
- /**
25
- * Opaque cursor returned by pageInfo; omit it to request the first page.
26
- */
27
- cursor?: string;
28
- /**
29
- * Direction to traverse the stable keyset ordering from the supplied cursor.
30
- */
31
- direction?: "forward" | "backward";
32
- /**
33
- * Maximum items returned in one page. Defaults to 25; larger reads require
34
- * another cursor.
35
- */
36
- limit?: number;
37
- /**
38
- * The resource.
39
- */
40
- resource?: "affiliations" | "authorizations" | "filings" | "invoices";
41
- /**
42
- * Exact response status, for example no_match, member_no_match or no_records.
43
- */
44
- status?: string;
45
- }
46
- export type ListResponse = SaludTotalLookupSamplePageResponse;
@@ -1,19 +0,0 @@
1
- // Code generated by forge. DO NOT EDIT.
2
- /* eslint-disable */
3
- import { Transport, } from "../../_/index.js";
4
- import { SaludTotalLookupSamplePageResponseCodec, } from "./models.js";
5
- export function createClient(options) {
6
- return bind(new Transport(options));
7
- }
8
- export function bind(transport) {
9
- return {
10
- list: (request, options) => transport.send(ListOperation, request, options),
11
- };
12
- }
13
- const ListOperation = {
14
- method: "GET",
15
- route: "/v1/salud-total/samples",
16
- query: { cursor: "cursor", direction: "direction", limit: "limit", resource: "resource", status: "status" },
17
- response: SaludTotalLookupSamplePageResponseCodec,
18
- errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
- };
@@ -1,5 +0,0 @@
1
- export { ApiError } from "../../_/index.js";
2
- export type { RequestOptions } from "../../_/index.js";
3
- export { createClient } from "./client.js";
4
- export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
5
- export type { SaludTotalLookupSample, SaludTotalLookupSamplePage, SaludTotalLookupSamplePageResponse, } from "./models.js";
@@ -1,4 +0,0 @@
1
- // Code generated by forge. DO NOT EDIT.
2
- /* eslint-disable */
3
- export { ApiError } from "../../_/index.js";
4
- export { createClient } from "./client.js";
@@ -1,92 +0,0 @@
1
- import type { PageInfo, ResponseMetadata } from "../../models.js";
2
- import type { SaludTotalAffiliationLookup, SaludTotalInvoiceLookupInput, SaludTotalInvoiceLookupResult, SaludTotalRecordAvailability } from "../models.js";
3
- export type SaludTotalLookupSample = {
4
- baseUrl: "https://saludtotal.getarbol.app";
5
- evidence: "observed_shape" | "contract_only";
6
- id: string;
7
- method: "POST";
8
- path: "/v1/affiliations/lookup";
9
- requestBody: {
10
- connectionId: string;
11
- documentNumber: string;
12
- documentType: "CC";
13
- };
14
- resource: "affiliations";
15
- responseData: SaludTotalAffiliationLookup;
16
- synthetic: true;
17
- } | {
18
- baseUrl: "https://saludtotal.getarbol.app";
19
- evidence: "observed_shape" | "contract_only";
20
- id: string;
21
- method: "POST";
22
- path: "/v1/authorizations/lookup";
23
- requestBody: {
24
- branchId?: number;
25
- choiceCursor?: string;
26
- connectionId: string;
27
- day: Temporal.PlainDate;
28
- documentNumber: string;
29
- documentType: "CC";
30
- siteId?: number;
31
- };
32
- resource: "authorizations";
33
- responseData: SaludTotalRecordAvailability;
34
- synthetic: true;
35
- } | {
36
- baseUrl: "https://saludtotal.getarbol.app";
37
- evidence: "observed_shape" | "contract_only";
38
- id: string;
39
- method: "POST";
40
- path: "/v1/filings/lookup";
41
- requestBody: {
42
- branchId?: number;
43
- choiceCursor?: string;
44
- connectionId: string;
45
- day: Temporal.PlainDate;
46
- documentNumber: string;
47
- documentType: "CC";
48
- siteId?: number;
49
- };
50
- resource: "filings";
51
- responseData: SaludTotalRecordAvailability;
52
- synthetic: true;
53
- } | {
54
- baseUrl: "https://saludtotal.getarbol.app";
55
- evidence: "observed_shape" | "contract_only";
56
- id: string;
57
- method: "POST";
58
- path: "/v1/invoices/lookup";
59
- requestBody: SaludTotalInvoiceLookupInput;
60
- resource: "invoices";
61
- responseData: SaludTotalInvoiceLookupResult;
62
- synthetic: true;
63
- };
64
- export interface SaludTotalLookupSamplePage {
65
- /**
66
- * Items admitted by this resource contract within the verified organization.
67
- */
68
- data: SaludTotalLookupSample[];
69
- /**
70
- * Discriminator for a resource list response.
71
- */
72
- object: "list";
73
- /**
74
- * Opaque navigation cursors for this page’s stable keyset order.
75
- */
76
- pageInfo: PageInfo;
77
- }
78
- /**
79
- * A successful answer.
80
- */
81
- export interface SaludTotalLookupSamplePageResponse {
82
- data: SaludTotalLookupSamplePage;
83
- error: null;
84
- /**
85
- * What every answer carries besides its data or error.
86
- */
87
- metadata: ResponseMetadata;
88
- success: true;
89
- }
90
- export declare const SaludTotalLookupSampleCodec: import("../../_/codec.js").Codec;
91
- export declare const SaludTotalLookupSamplePageCodec: import("../../_/codec.js").Codec;
92
- export declare const SaludTotalLookupSamplePageResponseCodec: import("../../_/codec.js").Codec;
@@ -1,10 +0,0 @@
1
- // Code generated by forge. DO NOT EDIT.
2
- /* eslint-disable */
3
- import { array, date, object, union } from "../../_/index.js";
4
- export const SaludTotalLookupSampleCodec = union([object([["requestBody", null, object([["day", null, date]])]]), object([["requestBody", null, object([["day", null, date]])]])]);
5
- export const SaludTotalLookupSamplePageCodec = object([
6
- ["data", null, array(() => SaludTotalLookupSampleCodec)],
7
- ]);
8
- export const SaludTotalLookupSamplePageResponseCodec = object([
9
- ["data", null, () => SaludTotalLookupSamplePageCodec],
10
- ]);
@@ -1,45 +0,0 @@
1
- import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { SaludTotalPreviewWorkflowResultResponse } from "./models.js";
3
- export interface ClientOptions extends BaseClientOptions {
4
- /**
5
- * The URL the paths of the API are relative to.
6
- */
7
- baseUrl: string;
8
- }
9
- export interface Client {
10
- /**
11
- * Preview a synthetic IPS workflow
12
- *
13
- * Simulate an IPS workflow using only enums and local fixtures. One workflow
14
- * parameter returns one line in Spanish. Optional scenarios include missing
15
- * records, missing documents, ambiguous matches, permissions, expiry and
16
- * uncertain responses. For a lost filing response, stage selects the
17
- * interrupted attachment, creation or association. No connection or member is
18
- * contacted.
19
- */
20
- get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
21
- }
22
- export declare function createClient(options: ClientOptions): Client;
23
- export declare function bind(transport: Transport): Client;
24
- export interface GetRequest {
25
- /**
26
- * IPS workflow, for example affiliation, authorization, filing or billing.
27
- * Earlier Spanish identifiers are also accepted.
28
- */
29
- workflow: "affiliation" | "clarification" | "authorization" | "filing" | "tracking" | "billing" | "objections" | "routing" | "referrals" | "scheduling" | "rips" | "mipres" | "diagnostics" | "afiliacion" | "aclaracion" | "autorizacion" | "radicacion" | "seguimiento" | "facturacion" | "glosas" | "direccionamiento" | "remisiones" | "programaciones" | "diagnostico";
30
- /**
31
- * Synthetic outcome, for example no_match, missing_attachment,
32
- * session_expired or response_lost.
33
- */
34
- scenario?: "normal" | "no_match" | "ambiguous" | "forbidden" | "session_expired" | "missing_attachment" | "response_lost" | "interactive_challenge" | "connection_inactive" | "credentials_rejected" | "sin_registro" | "ambiguo" | "sin_permiso" | "sesion_expirada" | "falta_soporte" | "respuesta_perdida" | "desafio_interactivo" | "conexion_inactiva" | "credencial_rechazada";
35
- /**
36
- * Step that loses its response in a filing simulation. With filing and
37
- * response_lost, the default is association.
38
- */
39
- stage?: "first_attachment" | "next_attachment" | "request_creation" | "association";
40
- /**
41
- * The view.
42
- */
43
- view?: "brief" | "trace";
44
- }
45
- export type GetResponse = SaludTotalPreviewWorkflowResultResponse;
@@ -1,18 +0,0 @@
1
- // Code generated by forge. DO NOT EDIT.
2
- /* eslint-disable */
3
- import { Transport, } from "../../_/index.js";
4
- export function createClient(options) {
5
- return bind(new Transport(options));
6
- }
7
- export function bind(transport) {
8
- return {
9
- get: (request, options) => transport.send(GetOperation, request, options),
10
- };
11
- }
12
- const GetOperation = {
13
- method: "GET",
14
- route: "/v1/salud-total/workflow-previews",
15
- query: { workflow: "workflow", scenario: "scenario", stage: "stage", view: "view" },
16
- response: null,
17
- errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
- };
@@ -1,5 +0,0 @@
1
- export { ApiError } from "../../_/index.js";
2
- export type { RequestOptions } from "../../_/index.js";
3
- export { createClient } from "./client.js";
4
- export type { Client, ClientOptions, GetRequest, GetResponse, } from "./client.js";
5
- export type { SaludTotalPreviewWorkflowResult, SaludTotalPreviewWorkflowResultResponse, } from "./models.js";
@@ -1,4 +0,0 @@
1
- // Code generated by forge. DO NOT EDIT.
2
- /* eslint-disable */
3
- export { ApiError } from "../../_/index.js";
4
- export { createClient } from "./client.js";
@@ -1,16 +0,0 @@
1
- import type { ResponseMetadata } from "../../models.js";
2
- export interface SaludTotalPreviewWorkflowResult {
3
- text: string;
4
- }
5
- /**
6
- * A successful answer.
7
- */
8
- export interface SaludTotalPreviewWorkflowResultResponse {
9
- data: SaludTotalPreviewWorkflowResult;
10
- error: null;
11
- /**
12
- * What every answer carries besides its data or error.
13
- */
14
- metadata: ResponseMetadata;
15
- success: true;
16
- }
@@ -1,3 +0,0 @@
1
- // Code generated by forge. DO NOT EDIT.
2
- /* eslint-disable */
3
- export {};