@arbol-ai/sdk 5.41.0 → 5.43.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.
@@ -15,7 +15,8 @@ export interface Client {
15
15
  * an optional `contactId` and `variables`. A call campaign (the default) has
16
16
  * a voice Agent call each one. With `channelType: whatsapp` and an approved
17
17
  * `template`, each one is sent the template, its `parameters` filled from
18
- * their `variables` (`{{name}}`), and its text Agent answers whoever replies.
18
+ * their `variables` (`{{name}}`) and, when its header is a document, image or
19
+ * video, their own `header` file; its text Agent answers whoever replies.
19
20
  * Nobody is reached until it is started. A list adds nobody to the
20
21
  * organization's contacts: a recipient becomes the contact it names, or the
21
22
  * owner of its number (created when none exists), when the campaign first
@@ -38,7 +39,9 @@ export interface Client {
38
39
  * attempt, error and latest call or message; continue with `recipientsCursor`
39
40
  * (`recipientsDirection` reads the other way). `expand=readiness` says
40
41
  * whether it can start and lists what has to be fixed first, without reaching
41
- * anyone. Read it before `update_campaign` and send `expectedVersion`.
42
+ * anyone. `expand=results` counts what people answered, by the Agent's data
43
+ * definitions with options; each recipient also says their own. Read it
44
+ * before `update_campaign` and send `expectedVersion`.
42
45
  */
43
46
  get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
44
47
  /**
@@ -52,6 +55,26 @@ export interface Client {
52
55
  * with `name: campaign_progress`.
53
56
  */
54
57
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
58
+ /**
59
+ * Start a campaign
60
+ *
61
+ * Start reaching people: from now on the campaign's due recipients are
62
+ * called, at most `settings.channels.maxConcurrentOutboundCalls` (five by
63
+ * default) at once across the organization, or sent their message, one after
64
+ * another, about 30 a minute. A call campaign needs an active, published
65
+ * voice Agent (VOICE_AGENT_NOT_READY). A WhatsApp campaign needs an active
66
+ * text Agent (CAMPAIGN_AGENT_NOT_READY), a line that can send
67
+ * (CHANNEL_NOT_READY), an approved template whose parameters fit (a
68
+ * `TEMPLATE_*` code), a value for every variable (CAMPAIGN_VARIABLE_MISSING)
69
+ * and, when the template's header is a document, image or video, the first
70
+ * pending recipient's own `header` file (CAMPAIGN_HEADER_MISSING). A
71
+ * recipient must be pending (CAMPAIGN_NO_RECIPIENTS). `get_campaign` with
72
+ * `expand=readiness` lists all of this beforehand. A campaign starts once:
73
+ * starting a running one changes nothing, and a paused one resumes with
74
+ * `update_campaign` and `paused: false`. Not an AI tool: it reaches real
75
+ * people.
76
+ */
77
+ start(request: StartRequest, options?: RequestOptions): Promise<StartResponse>;
55
78
  /**
56
79
  * Update a campaign
57
80
  *
@@ -61,10 +84,13 @@ export interface Client {
61
84
  * start, `recipients` is the complete set, replacing whoever was there; once
62
85
  * started it only adds. `addRecipients` adds at any moment, which is how a
63
86
  * list longer than one request arrives: a number the campaign already has is
64
- * skipped, so repeating a part reaches nobody twice. The Agent changes only
65
- * before the start, and a completed campaign accepts only its name and
66
- * metadata. A change lifts the wait of a campaign held by `errorCode`: fixing
67
- * a template and sending it here tries again at once.
87
+ * skipped, so repeating a part reaches nobody twice, and a recipient's
88
+ * `header` file is stored only when its row has none
89
+ * (CAMPAIGN_HEADER_NOT_STORED says some were not: send those recipients
90
+ * again). The Agent changes only before the start, and a completed campaign
91
+ * accepts only its name and metadata. A change lifts the wait of a campaign
92
+ * held by `errorCode`: fixing a template and sending it here tries again at
93
+ * once.
68
94
  */
69
95
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
70
96
  }
@@ -119,7 +145,8 @@ export interface GetRequest {
119
145
  */
120
146
  campaignId: string;
121
147
  /**
122
- * Related data to include, comma-separated: `recipients`, `readiness`.
148
+ * Related data to include, comma-separated: `recipients`, `readiness`,
149
+ * `results`.
123
150
  */
124
151
  expand?: string;
125
152
  /**
@@ -140,6 +167,12 @@ export interface GetRequest {
140
167
  * whose name contains this text.
141
168
  */
142
169
  recipientsQ?: string;
170
+ /**
171
+ * With `expand=recipients`: `definitionKey=optionKey`, only those whose
172
+ * latest answer is that option; `definitionKey=`, only those with no answer
173
+ * yet.
174
+ */
175
+ recipientsResult?: string;
143
176
  /**
144
177
  * `pending`: waiting for its (next) call or message. `in_progress`: being
145
178
  * called, or on WhatsApp waiting for a reply until a reminder is due.
@@ -189,6 +222,21 @@ export interface ListResponse {
189
222
  metadata: RaizResponseMetadata;
190
223
  success: true;
191
224
  }
225
+ export interface StartRequest {
226
+ /**
227
+ * Campaign id.
228
+ */
229
+ campaignId: string;
230
+ body: {
231
+ [key: string]: unknown;
232
+ };
233
+ }
234
+ export interface StartResponse {
235
+ data: RaizCampaign;
236
+ error: null;
237
+ metadata: RaizResponseMetadata;
238
+ success: true;
239
+ }
192
240
  export interface UpdateRequest {
193
241
  /**
194
242
  * Campaign id.
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, instant, object, union, } from "../../_/index.js";
4
- import { RaizCampaignCodec, RaizCampaignPageCodec, } from "./models.js";
3
+ import { Transport, array, instant, object, union, } from "../../_/index.js";
4
+ import { RaizCampaignCodec, RaizCampaignPageCodec, RaizCampaignRecipientInputCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -10,6 +10,7 @@ export function bind(transport) {
10
10
  create: (request, options) => transport.send(CreateOperation, request, options),
11
11
  get: (request, options) => transport.send(GetOperation, request, options),
12
12
  list: (request, options) => transport.send(ListOperation, request, options),
13
+ start: (request, options) => transport.send(StartOperation, request, options),
13
14
  update: (request, options) => transport.send(UpdateOperation, request, options),
14
15
  };
15
16
  }
@@ -17,14 +18,14 @@ const CreateOperation = {
17
18
  method: "POST",
18
19
  route: "/v1/raiz/campaigns",
19
20
  body: "flat",
20
- request: union([object([["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]]), object([["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]])]),
21
+ request: union([object([["recipients", null, array(() => RaizCampaignRecipientInputCodec)], ["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]]), object([["recipients", null, array(() => RaizCampaignRecipientInputCodec)], ["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]])]),
21
22
  response: object([["data", null, () => RaizCampaignCodec]]),
22
23
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
23
24
  };
24
25
  const GetOperation = {
25
26
  method: "GET",
26
27
  route: "/v1/raiz/campaigns/{campaignId}",
27
- query: { expand: "expand", recipientsCursor: "recipientsCursor", recipientsDirection: "recipientsDirection", recipientsLimit: "recipientsLimit", recipientsQ: "recipientsQ", recipientsStatus: "recipientsStatus" },
28
+ query: { expand: "expand", recipientsCursor: "recipientsCursor", recipientsDirection: "recipientsDirection", recipientsLimit: "recipientsLimit", recipientsQ: "recipientsQ", recipientsResult: "recipientsResult", recipientsStatus: "recipientsStatus" },
28
29
  response: object([["data", null, () => RaizCampaignCodec]]),
29
30
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
30
31
  };
@@ -35,11 +36,18 @@ const ListOperation = {
35
36
  response: object([["data", null, () => RaizCampaignPageCodec]]),
36
37
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
37
38
  };
39
+ const StartOperation = {
40
+ method: "POST",
41
+ route: "/v1/raiz/campaigns/{campaignId}/start",
42
+ body: "nested",
43
+ response: object([["data", null, () => RaizCampaignCodec]]),
44
+ errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
45
+ };
38
46
  const UpdateOperation = {
39
47
  method: "PATCH",
40
48
  route: "/v1/raiz/campaigns/{campaignId}",
41
49
  body: "flat",
42
- request: object([["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]]),
50
+ request: object([["addRecipients", null, array(() => RaizCampaignRecipientInputCodec)], ["recipients", null, array(() => RaizCampaignRecipientInputCodec)], ["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]]),
43
51
  response: object([["data", null, () => RaizCampaignCodec]]),
44
52
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
45
53
  };
@@ -1,5 +1,5 @@
1
1
  export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
- export type { Client, ClientOptions, CreateRequest, CreateResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizCampaign, RaizCampaignBlocker, RaizCampaignPage, RaizCampaignProgress, RaizCampaignReadiness, RaizCampaignRecipientInput, RaizCampaignRecipientPage, RaizCampaignTemplate, RaizCampaignTemplateInput, } from "./models.js";
4
+ export type { Client, ClientOptions, CreateRequest, CreateResponse, GetRequest, GetResponse, ListRequest, ListResponse, StartRequest, StartResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
+ export type { RaizCampaign, RaizCampaignBlocker, RaizCampaignPage, RaizCampaignProgress, RaizCampaignReadiness, RaizCampaignRecipientInput, RaizCampaignRecipientPage, RaizCampaignResult, RaizCampaignTemplate, RaizCampaignTemplateInput, RaizTemplateHeaderFile, } from "./models.js";
@@ -52,6 +52,12 @@ export interface RaizCampaign {
52
52
  * latest attempt. Present only when expanded.
53
53
  */
54
54
  recipients?: RaizCampaignRecipientPage;
55
+ /**
56
+ * What people answered, for each data definition with options their Agent
57
+ * collects that has an answer yet. Answers arrive when a conversation closes
58
+ * and is analyzed, so they can keep arriving after the campaign ends.
59
+ */
60
+ results?: RaizCampaignResult[];
55
61
  retryAfterMinutes: number;
56
62
  retryOn: ("no_answer" | "failure" | "not_delivered")[];
57
63
  scheduledEndAt: Temporal.Instant | null;
@@ -160,14 +166,24 @@ export interface RaizCampaignRecipientInput {
160
166
  familyName?: string | null;
161
167
  firstMessage?: string | null;
162
168
  givenName?: string | null;
169
+ /**
170
+ * WhatsApp only: this recipient's file for a template whose header is a
171
+ * document, image or video (an appointment's receipts, a ticket), shown above
172
+ * its text. Kept privately with the campaign and sent with this recipient's
173
+ * message; a number the campaign already has keeps its first file, and
174
+ * replacing the whole list replaces them. A request carries at most 2 MiB:
175
+ * send a long list with files in parts with `addRecipients`.
176
+ */
177
+ header?: RaizTemplateHeaderFile;
163
178
  instructions?: string | null;
164
179
  /**
165
180
  * Values for the `{{name}}` variables a WhatsApp template's parameters, or
166
181
  * the Agent's instructions, first message or this campaign's texts on a call,
167
- * reference. Raíz always provides `contact_name`, `contact_given_name` and
168
- * `contact_phone`, and on a call also `contact_id`, `conversation_id` and
169
- * `bulletins` (the business bulletins in force); a recipient's values never
170
- * replace them.
182
+ * reference. A reference means the variable that is the same word, whatever
183
+ * its accents and case: `{{País}}` reads `pais`, and an exact name wins. Raíz
184
+ * always provides `contact_name`, `contact_given_name` and `contact_phone`,
185
+ * and on a call also `contact_id`, `conversation_id` and `bulletins` (the
186
+ * business bulletins in force); a recipient's values never replace them.
171
187
  */
172
188
  variables?: {
173
189
  [key: string]: unknown;
@@ -180,6 +196,10 @@ export interface RaizCampaignRecipientPage {
180
196
  data: {
181
197
  address: string;
182
198
  attemptCount: number;
199
+ contact: {
200
+ id: string;
201
+ name: string | null;
202
+ } | null;
183
203
  contactId: string | null;
184
204
  createdAt: Temporal.Instant;
185
205
  deliveredAt: Temporal.Instant | null;
@@ -198,6 +218,11 @@ export interface RaizCampaignRecipientPage {
198
218
  nextAttemptAt: Temporal.Instant | null;
199
219
  readAt: Temporal.Instant | null;
200
220
  repliedAt: Temporal.Instant | null;
221
+ results: {
222
+ definitionKey: string;
223
+ label: string;
224
+ value: string;
225
+ }[];
201
226
  status: "pending" | "in_progress" | "completed" | "failed" | "cancelled";
202
227
  updatedAt: Temporal.Instant;
203
228
  variables: {
@@ -213,6 +238,17 @@ export interface RaizCampaignRecipientPage {
213
238
  */
214
239
  pageInfo: PageInfo;
215
240
  }
241
+ export interface RaizCampaignResult {
242
+ definition: {
243
+ key: string;
244
+ name: string;
245
+ };
246
+ values: {
247
+ key: string;
248
+ label: string;
249
+ people: number;
250
+ }[];
251
+ }
216
252
  export interface RaizCampaignTemplate {
217
253
  /**
218
254
  * The template's language: WhatsApp's code (`es`, `es_MX`) or a BCP 47 tag
@@ -221,7 +257,8 @@ export interface RaizCampaignTemplate {
221
257
  language: string;
222
258
  /**
223
259
  * An approved template of the line's WhatsApp Business Account. Its body may
224
- * have variables; a file in its header and button parameters cannot be used
260
+ * have variables; when its header is a document, image or video, each
261
+ * recipient brings its own file (`header`). Button parameters cannot be used
225
262
  * in a campaign.
226
263
  */
227
264
  name: string;
@@ -240,7 +277,8 @@ export interface RaizCampaignTemplateInput {
240
277
  language: string;
241
278
  /**
242
279
  * An approved template of the line's WhatsApp Business Account. Its body may
243
- * have variables; a file in its header and button parameters cannot be used
280
+ * have variables; when its header is a document, image or video, each
281
+ * recipient brings its own file (`header`). Button parameters cannot be used
244
282
  * in a campaign.
245
283
  */
246
284
  name: string;
@@ -251,6 +289,23 @@ export interface RaizCampaignTemplateInput {
251
289
  */
252
290
  parameters?: string[];
253
291
  }
292
+ export interface RaizTemplateHeaderFile {
293
+ /**
294
+ * The file's bytes in base64, at most 5242880 bytes decoded.
295
+ */
296
+ data: Uint8Array;
297
+ /**
298
+ * The name the contact sees for a document.
299
+ */
300
+ fileName?: string;
301
+ /**
302
+ * It must fit the template's header: a PDF for `document`, JPEG or PNG for
303
+ * `image`, MP4 for `video`.
304
+ */
305
+ mediaType: "application/pdf" | "image/jpeg" | "image/png" | "video/mp4";
306
+ }
254
307
  export declare const RaizCampaignCodec: import("../../_/codec.js").Codec;
255
308
  export declare const RaizCampaignPageCodec: import("../../_/codec.js").Codec;
309
+ export declare const RaizCampaignRecipientInputCodec: import("../../_/codec.js").Codec;
256
310
  export declare const RaizCampaignRecipientPageCodec: import("../../_/codec.js").Codec;
311
+ export declare const RaizTemplateHeaderFileCodec: import("../../_/codec.js").Codec;
@@ -1,6 +1,6 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { array, instant, object } from "../../_/index.js";
3
+ import { array, bytes, instant, object } from "../../_/index.js";
4
4
  export const RaizCampaignCodec = object([
5
5
  ["createdAt", null, instant],
6
6
  ["endedAt", null, instant],
@@ -15,6 +15,12 @@ export const RaizCampaignCodec = object([
15
15
  export const RaizCampaignPageCodec = object([
16
16
  ["data", null, array(() => RaizCampaignCodec)],
17
17
  ]);
18
+ export const RaizCampaignRecipientInputCodec = object([
19
+ ["header", null, () => RaizTemplateHeaderFileCodec],
20
+ ]);
18
21
  export const RaizCampaignRecipientPageCodec = object([
19
22
  ["data", null, array(object([["createdAt", null, instant], ["deliveredAt", null, instant], ["lastAttempt", null, object([["startedAt", null, instant]])], ["nextAttemptAt", null, instant], ["readAt", null, instant], ["repliedAt", null, instant], ["updatedAt", null, instant]]))],
20
23
  ]);
24
+ export const RaizTemplateHeaderFileCodec = object([
25
+ ["data", null, bytes],
26
+ ]);
@@ -578,6 +578,20 @@ export interface RaizFailureResponse {
578
578
  };
579
579
  message: "The campaign's Agent must be an active text Agent: it answers whoever replies to the message.";
580
580
  retryable: false;
581
+ } | {
582
+ code: "CAMPAIGN_HEADER_MISSING";
583
+ data: {
584
+ [key: string]: unknown;
585
+ };
586
+ message: "A recipient has no file that fits the template's header (a PDF for a document, JPEG or PNG for an image, MP4 for a video). Each recipient brings its own as `header`.";
587
+ retryable: false;
588
+ } | {
589
+ code: "CAMPAIGN_HEADER_NOT_STORED";
590
+ data: {
591
+ campaignId: string;
592
+ };
593
+ message: "The campaign and its recipients were saved, but some recipients' files were not. Send those recipients again with `addRecipients` on this campaign: their numbers are kept and their files stored. Do not create the campaign again.";
594
+ retryable: false;
581
595
  } | {
582
596
  code: "CAMPAIGN_NO_RECIPIENTS";
583
597
  data: {
@@ -0,0 +1,25 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import { type VisoftAppointmentReceiptResponse, type VisoftLookupAppointmentReceiptBody } 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
+ * Look up an appointment receipt
12
+ *
13
+ * SIIPS's own printed receipt (ticket) of one assigned appointment, by the
14
+ * reference visoft.appointments.list answered: the PDF SIIPS's print action
15
+ * serves, unchanged, base64. It is answered only when its text names the
16
+ * appointment's day, hour and patient; otherwise
17
+ * APPOINTMENT_RECEIPT_UNAVAILABLE. Never cached. Printing changes no
18
+ * appointment and sends nothing to the patient.
19
+ */
20
+ lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
21
+ }
22
+ export declare function createClient(options: ClientOptions): Client;
23
+ export declare function bind(transport: Transport): Client;
24
+ export type LookupRequest = VisoftLookupAppointmentReceiptBody;
25
+ export type LookupResponse = VisoftAppointmentReceiptResponse;
@@ -0,0 +1,19 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { VisoftAppointmentReceiptResponseCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ lookup: (request, options) => transport.send(LookupOperation, request, options),
11
+ };
12
+ }
13
+ const LookupOperation = {
14
+ method: "POST",
15
+ route: "/v1/visoft/appointment-receipts/lookup",
16
+ body: "flat",
17
+ response: VisoftAppointmentReceiptResponseCodec,
18
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
+ export type { VisoftAppointmentReceipt, VisoftAppointmentReceiptResponse, VisoftAppointmentReceiptUnavailableFailure, VisoftLookupAppointmentReceiptBadGatewayError, VisoftLookupAppointmentReceiptBadGatewayFailure, VisoftLookupAppointmentReceiptBody, VisoftLookupAppointmentReceiptNotFoundError, VisoftLookupAppointmentReceiptNotFoundFailure, VisoftLookupAppointmentReceiptUnprocessableContentError, VisoftLookupAppointmentReceiptUnprocessableContentFailure, } from "./models.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../../_/index.js";
4
+ export { createClient } from "./client.js";
@@ -0,0 +1,110 @@
1
+ import type { ConnectionNotFoundFailure, Empty, OutcomeUnknownFailure, ResponseMetadata } from "../../models.js";
2
+ import type { VisoftAgencyNotServedFailure, VisoftCredentialsRejectedFailure, VisoftProviderUnavailableFailure } from "../models.js";
3
+ export interface VisoftAppointmentReceipt {
4
+ /**
5
+ * The PDF, unchanged, base64.
6
+ */
7
+ data: Uint8Array;
8
+ /**
9
+ * A file name made of the appointment's day and hour; never the patient's.
10
+ */
11
+ fileName: string;
12
+ mediaType: "application/pdf";
13
+ /**
14
+ * The reference the receipt was printed for.
15
+ */
16
+ reference: string;
17
+ /**
18
+ * The SHA-256 of the bytes, hexadecimal.
19
+ */
20
+ sha256: string;
21
+ sizeBytes: number;
22
+ }
23
+ /**
24
+ * A successful answer.
25
+ */
26
+ export interface VisoftAppointmentReceiptResponse {
27
+ data: VisoftAppointmentReceipt;
28
+ error: null;
29
+ /**
30
+ * What every answer carries besides its data or error.
31
+ */
32
+ metadata: ResponseMetadata;
33
+ success: true;
34
+ }
35
+ /**
36
+ * SIIPS printed no receipt naming this appointment's day, hour and patient.
37
+ * Read the day's appointments again for a current reference.
38
+ */
39
+ export interface VisoftAppointmentReceiptUnavailableFailure {
40
+ /**
41
+ * The failure code, stable across releases.
42
+ */
43
+ code: "APPOINTMENT_RECEIPT_UNAVAILABLE";
44
+ /**
45
+ * No fields.
46
+ */
47
+ data: Empty;
48
+ /**
49
+ * What went wrong, for people; it never contains input values.
50
+ */
51
+ message: string;
52
+ /**
53
+ * Whether repeating the same request may succeed.
54
+ */
55
+ retryable: false;
56
+ }
57
+ /**
58
+ * A failed answer.
59
+ */
60
+ export interface VisoftLookupAppointmentReceiptBadGatewayError {
61
+ data: null;
62
+ error: VisoftLookupAppointmentReceiptBadGatewayFailure;
63
+ /**
64
+ * What every answer carries besides its data or error.
65
+ */
66
+ metadata: ResponseMetadata;
67
+ success: false;
68
+ }
69
+ export type VisoftLookupAppointmentReceiptBadGatewayFailure = OutcomeUnknownFailure | VisoftProviderUnavailableFailure;
70
+ export interface VisoftLookupAppointmentReceiptBody {
71
+ /**
72
+ * The connection to run on. Optional when the organization has one Visoft
73
+ * connection; required when it has several. Another organization's connection
74
+ * is CONNECTION_NOT_FOUND.
75
+ */
76
+ connectionId?: string;
77
+ /**
78
+ * The appointment's opaque reference, as visoft.appointments.list answered
79
+ * it.
80
+ */
81
+ reference: string;
82
+ }
83
+ /**
84
+ * A failed answer.
85
+ */
86
+ export interface VisoftLookupAppointmentReceiptNotFoundError {
87
+ data: null;
88
+ error: VisoftLookupAppointmentReceiptNotFoundFailure;
89
+ /**
90
+ * What every answer carries besides its data or error.
91
+ */
92
+ metadata: ResponseMetadata;
93
+ success: false;
94
+ }
95
+ export type VisoftLookupAppointmentReceiptNotFoundFailure = ConnectionNotFoundFailure | VisoftAppointmentReceiptUnavailableFailure;
96
+ /**
97
+ * A failed answer.
98
+ */
99
+ export interface VisoftLookupAppointmentReceiptUnprocessableContentError {
100
+ data: null;
101
+ error: VisoftLookupAppointmentReceiptUnprocessableContentFailure;
102
+ /**
103
+ * What every answer carries besides its data or error.
104
+ */
105
+ metadata: ResponseMetadata;
106
+ success: false;
107
+ }
108
+ export type VisoftLookupAppointmentReceiptUnprocessableContentFailure = VisoftCredentialsRejectedFailure | VisoftAgencyNotServedFailure;
109
+ export declare const VisoftAppointmentReceiptCodec: import("../../_/codec.js").Codec;
110
+ export declare const VisoftAppointmentReceiptResponseCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,9 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { bytes, object } from "../../_/index.js";
4
+ export const VisoftAppointmentReceiptCodec = object([
5
+ ["data", null, bytes],
6
+ ]);
7
+ export const VisoftAppointmentReceiptResponseCodec = object([
8
+ ["data", null, () => VisoftAppointmentReceiptCodec],
9
+ ]);
@@ -36,10 +36,11 @@ export interface Client {
36
36
  * List assigned appointments
37
37
  *
38
38
  * Read assigned appointments for one day at a cost centre, ordered by moment
39
- * and reference, with the contact phone SIIPS records. Never cached. A full
40
- * upstream page that cannot prove completeness is PROVIDER_UNAVAILABLE;
41
- * narrow by professionalId rather than treating a partial agenda as complete.
42
- * This operation changes no appointment and sends no message.
39
+ * and reference, with the contact phone and the state (`status`) SIIPS
40
+ * records. Never cached. A full upstream page that cannot prove completeness
41
+ * is PROVIDER_UNAVAILABLE; narrow by professionalId rather than treating a
42
+ * partial agenda as complete. This operation changes no appointment and sends
43
+ * no message.
43
44
  */
44
45
  list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
45
46
  }
@@ -95,6 +95,11 @@ export interface VisoftAssignedAppointment {
95
95
  * clinic's day and the next eight its hour.
96
96
  */
97
97
  startsAt: Temporal.Instant;
98
+ /**
99
+ * SIIPS's state of the appointment (its agenda's Estado), as stored: `S` for
100
+ * one requested and still to be attended.
101
+ */
102
+ status: string;
98
103
  }
99
104
  export interface VisoftAssignedAppointmentPage {
100
105
  /**
@@ -1,4 +1,5 @@
1
1
  import { type BaseClientOptions, Transport } from "../_/index.js";
2
+ import { type Client as AppointmentReceiptsClient } from "./appointmentReceipts/client.js";
2
3
  import { type Client as AppointmentsClient } from "./appointments/client.js";
3
4
  import { type Client as AvailabilityClient } from "./availability/client.js";
4
5
  import { type Client as ClinicClient } from "./clinic/client.js";
@@ -16,6 +17,7 @@ export interface ClientOptions extends BaseClientOptions {
16
17
  baseUrl: string;
17
18
  }
18
19
  export interface Client {
20
+ readonly appointmentReceipts: AppointmentReceiptsClient;
19
21
  readonly appointments: AppointmentsClient;
20
22
  readonly availability: AvailabilityClient;
21
23
  readonly clinic: ClinicClient;
@@ -1,6 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { Transport } from "../_/index.js";
4
+ import { bind as bindAppointmentReceipts, } from "./appointmentReceipts/client.js";
4
5
  import { bind as bindAppointments, } from "./appointments/client.js";
5
6
  import { bind as bindAvailability, } from "./availability/client.js";
6
7
  import { bind as bindClinic, } from "./clinic/client.js";
@@ -15,6 +16,7 @@ export function createClient(options) {
15
16
  return bind(new Transport(options));
16
17
  }
17
18
  export function bind(transport) {
19
+ let appointmentReceiptsClient;
18
20
  let appointmentsClient;
19
21
  let availabilityClient;
20
22
  let clinicClient;
@@ -26,6 +28,9 @@ export function bind(transport) {
26
28
  let serviceCatalogsClient;
27
29
  let servicesClient;
28
30
  return {
31
+ get appointmentReceipts() {
32
+ return (appointmentReceiptsClient ??= bindAppointmentReceipts(transport));
33
+ },
29
34
  get appointments() {
30
35
  return (appointmentsClient ??= bindAppointments(transport));
31
36
  },
@@ -89,6 +89,11 @@ export interface VisoftAppointment {
89
89
  * readable day and hour.
90
90
  */
91
91
  startsAt: Temporal.Instant | null;
92
+ /**
93
+ * SIIPS's state of the appointment (its agenda's Estado), as stored: `S` for
94
+ * one requested.
95
+ */
96
+ status: string;
92
97
  /**
93
98
  * The sub cost centre.
94
99
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "5.41.0",
3
+ "version": "5.43.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",
@@ -58,8 +58,8 @@
58
58
  "packageManager": "bun@1.4.3",
59
59
  "arbol": {
60
60
  "openapi": {
61
- "release": "1.20261106.171439",
62
- "sha256": "e7c2c8058a6f848070f1d5933ea788446ac39acb99aa97b4f6eed2f83162f71f"
61
+ "release": "1.20261106.211734",
62
+ "sha256": "ef2bacbc6bbda25bcbb2bb78972e717f3a5d4e7efef6d308b1f5718f2c08a2ff"
63
63
  }
64
64
  }
65
65
  }