@arbol-ai/sdk 5.42.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.
- package/dist/raiz/campaigns/client.d.ts +44 -5
- package/dist/raiz/campaigns/client.js +12 -4
- package/dist/raiz/campaigns/index.d.ts +2 -2
- package/dist/raiz/campaigns/models.d.ts +30 -2
- package/dist/raiz/campaigns/models.js +7 -1
- package/dist/raiz/models.d.ts +14 -0
- package/dist/visoft/appointmentReceipts/client.d.ts +25 -0
- package/dist/visoft/appointmentReceipts/client.js +19 -0
- package/dist/visoft/appointmentReceipts/index.d.ts +5 -0
- package/dist/visoft/appointmentReceipts/index.js +4 -0
- package/dist/visoft/appointmentReceipts/models.d.ts +110 -0
- package/dist/visoft/appointmentReceipts/models.js +9 -0
- package/dist/visoft/appointments/client.d.ts +5 -4
- package/dist/visoft/appointments/models.d.ts +5 -0
- package/dist/visoft/client.d.ts +2 -0
- package/dist/visoft/client.js +5 -0
- package/dist/visoft/patients/models.d.ts +5 -0
- package/package.json +3 -3
|
@@ -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}}`)
|
|
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
|
|
@@ -54,6 +55,26 @@ export interface Client {
|
|
|
54
55
|
* with `name: campaign_progress`.
|
|
55
56
|
*/
|
|
56
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>;
|
|
57
78
|
/**
|
|
58
79
|
* Update a campaign
|
|
59
80
|
*
|
|
@@ -63,10 +84,13 @@ export interface Client {
|
|
|
63
84
|
* start, `recipients` is the complete set, replacing whoever was there; once
|
|
64
85
|
* started it only adds. `addRecipients` adds at any moment, which is how a
|
|
65
86
|
* list longer than one request arrives: a number the campaign already has is
|
|
66
|
-
* skipped, so repeating a part reaches nobody twice
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
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.
|
|
70
94
|
*/
|
|
71
95
|
update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
|
|
72
96
|
}
|
|
@@ -198,6 +222,21 @@ export interface ListResponse {
|
|
|
198
222
|
metadata: RaizResponseMetadata;
|
|
199
223
|
success: true;
|
|
200
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
|
+
}
|
|
201
240
|
export interface UpdateRequest {
|
|
202
241
|
/**
|
|
203
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,7 +18,7 @@ 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
|
};
|
|
@@ -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, RaizCampaignResult, 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";
|
|
@@ -166,6 +166,15 @@ export interface RaizCampaignRecipientInput {
|
|
|
166
166
|
familyName?: string | null;
|
|
167
167
|
firstMessage?: string | null;
|
|
168
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;
|
|
169
178
|
instructions?: string | null;
|
|
170
179
|
/**
|
|
171
180
|
* Values for the `{{name}}` variables a WhatsApp template's parameters, or
|
|
@@ -248,7 +257,8 @@ export interface RaizCampaignTemplate {
|
|
|
248
257
|
language: string;
|
|
249
258
|
/**
|
|
250
259
|
* An approved template of the line's WhatsApp Business Account. Its body may
|
|
251
|
-
* have variables;
|
|
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
|
|
252
262
|
* in a campaign.
|
|
253
263
|
*/
|
|
254
264
|
name: string;
|
|
@@ -267,7 +277,8 @@ export interface RaizCampaignTemplateInput {
|
|
|
267
277
|
language: string;
|
|
268
278
|
/**
|
|
269
279
|
* An approved template of the line's WhatsApp Business Account. Its body may
|
|
270
|
-
* have variables;
|
|
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
|
|
271
282
|
* in a campaign.
|
|
272
283
|
*/
|
|
273
284
|
name: string;
|
|
@@ -278,6 +289,23 @@ export interface RaizCampaignTemplateInput {
|
|
|
278
289
|
*/
|
|
279
290
|
parameters?: string[];
|
|
280
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
|
+
}
|
|
281
307
|
export declare const RaizCampaignCodec: import("../../_/codec.js").Codec;
|
|
282
308
|
export declare const RaizCampaignPageCodec: import("../../_/codec.js").Codec;
|
|
309
|
+
export declare const RaizCampaignRecipientInputCodec: import("../../_/codec.js").Codec;
|
|
283
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
|
+
]);
|
package/dist/raiz/models.d.ts
CHANGED
|
@@ -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,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
|
|
40
|
-
* upstream page that cannot prove completeness
|
|
41
|
-
* narrow by professionalId rather than treating a
|
|
42
|
-
* This operation changes no appointment and sends
|
|
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
|
/**
|
package/dist/visoft/client.d.ts
CHANGED
|
@@ -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;
|
package/dist/visoft/client.js
CHANGED
|
@@ -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.
|
|
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.
|
|
62
|
-
"sha256": "
|
|
61
|
+
"release": "1.20261106.211734",
|
|
62
|
+
"sha256": "ef2bacbc6bbda25bcbb2bb78972e717f3a5d4e7efef6d308b1f5718f2c08a2ff"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|