@arbol-ai/sdk 5.32.0 → 5.34.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/account/permissions/models.d.ts +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.js +5 -0
- package/dist/comfachoco/affiliations/client.d.ts +24 -0
- package/dist/comfachoco/affiliations/client.js +19 -0
- package/dist/comfachoco/affiliations/index.d.ts +5 -0
- package/dist/comfachoco/affiliations/index.js +4 -0
- package/dist/comfachoco/affiliations/models.d.ts +97 -0
- package/dist/comfachoco/affiliations/models.js +13 -0
- package/dist/comfachoco/client.d.ts +15 -0
- package/dist/comfachoco/client.js +20 -0
- package/dist/comfachoco/connections/client.d.ts +55 -0
- package/dist/comfachoco/connections/client.js +33 -0
- package/dist/comfachoco/connections/index.d.ts +5 -0
- package/dist/comfachoco/connections/index.js +4 -0
- package/dist/comfachoco/connections/models.d.ts +204 -0
- package/dist/comfachoco/connections/models.js +9 -0
- package/dist/comfachoco/index.d.ts +5 -0
- package/dist/comfachoco/index.js +4 -0
- package/dist/comfachoco/models.d.ts +220 -0
- package/dist/comfachoco/models.js +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +12 -0
- package/dist/models.js +3 -0
- package/dist/nuevaEps/affiliations/models.d.ts +2 -2
- package/dist/nuevaEps/client.d.ts +6 -0
- package/dist/nuevaEps/client.js +15 -0
- package/dist/nuevaEps/connections/models.d.ts +6 -5
- package/dist/nuevaEps/index.d.ts +1 -1
- package/dist/nuevaEps/ingestionErrorReports/client.d.ts +33 -0
- package/dist/nuevaEps/ingestionErrorReports/client.js +19 -0
- package/dist/nuevaEps/ingestionErrorReports/index.d.ts +5 -0
- package/dist/nuevaEps/ingestionErrorReports/index.js +4 -0
- package/dist/nuevaEps/ingestionErrorReports/models.d.ts +87 -0
- package/dist/nuevaEps/ingestionErrorReports/models.js +10 -0
- package/dist/nuevaEps/ingestions/client.d.ts +68 -0
- package/dist/nuevaEps/ingestions/client.js +26 -0
- package/dist/nuevaEps/ingestions/index.d.ts +5 -0
- package/dist/nuevaEps/ingestions/index.js +4 -0
- package/dist/nuevaEps/ingestions/models.d.ts +182 -0
- package/dist/nuevaEps/ingestions/models.js +3 -0
- package/dist/nuevaEps/models.d.ts +65 -0
- package/dist/nuevaEps/precursoras/client.d.ts +27 -0
- package/dist/nuevaEps/precursoras/client.js +18 -0
- package/dist/nuevaEps/precursoras/index.d.ts +5 -0
- package/dist/nuevaEps/precursoras/index.js +4 -0
- package/dist/nuevaEps/precursoras/models.d.ts +94 -0
- package/dist/nuevaEps/precursoras/models.js +3 -0
- package/dist/raiz/channels/models.d.ts +10 -10
- package/dist/raiz/channels/models.js +1 -1
- package/dist/raiz/conversations/client.d.ts +24 -9
- package/dist/raiz/conversations/index.d.ts +1 -1
- package/dist/raiz/conversations/models.d.ts +3 -14
- package/dist/raiz/conversations/models.js +2 -4
- package/dist/raiz/index.d.ts +1 -1
- package/dist/raiz/knowledge/client.d.ts +4 -3
- package/dist/raiz/models.d.ts +8 -2
- package/dist/raiz/reports/client.d.ts +35 -20
- package/dist/raiz/reports/client.js +1 -1
- package/dist/raiz/reports/models.d.ts +21 -0
- package/dist/raiz/reports/models.js +1 -1
- package/dist/sura/client.d.ts +2 -0
- package/dist/sura/client.js +5 -0
- package/dist/sura/index.d.ts +1 -1
- package/dist/sura/models.d.ts +45 -0
- package/dist/sura/models.js +10 -1
- package/dist/sura/operations/models.d.ts +2 -2
- package/dist/sura/operations/models.js +2 -2
- package/dist/sura/schedules/client.d.ts +29 -0
- package/dist/sura/schedules/client.js +20 -0
- package/dist/sura/schedules/index.d.ts +5 -0
- package/dist/sura/schedules/index.js +4 -0
- package/dist/sura/schedules/models.d.ts +79 -0
- package/dist/sura/schedules/models.js +11 -0
- package/package.json +5 -4
package/dist/raiz/models.d.ts
CHANGED
|
@@ -807,7 +807,14 @@ export interface RaizFailureResponse {
|
|
|
807
807
|
data: {
|
|
808
808
|
[key: string]: unknown;
|
|
809
809
|
};
|
|
810
|
-
message: "No voice line can place this call.
|
|
810
|
+
message: "No voice line can place this call. Name an active outbound line of the organization with `from` or `channelId`, or assign one to the Agent.";
|
|
811
|
+
retryable: false;
|
|
812
|
+
} | {
|
|
813
|
+
code: "VOICE_NOT_AVAILABLE";
|
|
814
|
+
data: {
|
|
815
|
+
[key: string]: unknown;
|
|
816
|
+
};
|
|
817
|
+
message: "This voice is not available. Choose one from `listVoices`.";
|
|
811
818
|
retryable: false;
|
|
812
819
|
} | {
|
|
813
820
|
code: "VOICE_NUMBER_IN_USE";
|
|
@@ -1047,7 +1054,6 @@ export interface RaizFailureResponse {
|
|
|
1047
1054
|
metadata: RaizResponseMetadata;
|
|
1048
1055
|
success: false;
|
|
1049
1056
|
}
|
|
1050
|
-
export type RaizHttpsUrl = string;
|
|
1051
1057
|
export interface RaizOutsideHoursTemplate {
|
|
1052
1058
|
/**
|
|
1053
1059
|
* The template's language in WhatsApp's code, for example `es` or `es_MX`.
|
|
@@ -12,10 +12,13 @@ export interface Client {
|
|
|
12
12
|
* Get a report
|
|
13
13
|
*
|
|
14
14
|
* Get the numbers behind a question. `name`: `conversations_daily`
|
|
15
|
-
* (conversations the AI took part in, per day), `
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* (conversations the AI took part in, per day), `booking_details` (verified
|
|
16
|
+
* individual creation receipts with patient, specialty, appointments and
|
|
17
|
+
* later recorded cancellations; also requires conversation read/write
|
|
18
|
+
* permission; filter specialty by its recorded code), `booking_outcomes`
|
|
19
|
+
* (verified saved booking receipts by completion day and integration,
|
|
20
|
+
* excluding tests, imports and deleted conversations; createdCount counts new
|
|
21
|
+
* appointments created by the AI, not confirmations of existing appointments;
|
|
19
22
|
* confirmedCount is its compatibility alias and must not be added again;
|
|
20
23
|
* reschedules, cancellations, failures, pending and unverified results
|
|
21
24
|
* separately), `tool_calls_daily` (Agent tool calls per day), `tool_calls`
|
|
@@ -37,6 +40,11 @@ export interface Client {
|
|
|
37
40
|
export declare function createClient(options: ClientOptions): Client;
|
|
38
41
|
export declare function bind(transport: Transport): Client;
|
|
39
42
|
export interface GetRequest {
|
|
43
|
+
/**
|
|
44
|
+
* Only booking_details: exact specialty code recorded in the booking
|
|
45
|
+
* (case-insensitive). Omit to read all specialties.
|
|
46
|
+
*/
|
|
47
|
+
specialty?: string;
|
|
40
48
|
/**
|
|
41
49
|
* Agent id.
|
|
42
50
|
*/
|
|
@@ -58,23 +66,30 @@ export interface GetRequest {
|
|
|
58
66
|
/**
|
|
59
67
|
* `conversations_daily`: conversations the AI took part in per day, Agent,
|
|
60
68
|
* channel type and direction, with outcomes and escalations (filters
|
|
61
|
-
* `agentId`, `channelType`). `
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* cancellations
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
69
|
+
* `agentId`, `channelType`). `booking_details`: individual patients and
|
|
70
|
+
* appointments from explicit successful creation receipts, including
|
|
71
|
+
* specialty, paired exams, deduplication, matched patient names and later
|
|
72
|
+
* recorded cancellations; filters agentId and specialty; requires
|
|
73
|
+
* conversation read/write permission too. Historical receipts with
|
|
74
|
+
* created=true, not current provider status or all provider protocols.
|
|
75
|
+
* unverifiedCount covers explicit creations missing a stable patient/slot.
|
|
76
|
+
* `booking_outcomes`: verified saved booking receipts per completion day,
|
|
77
|
+
* Agent and integration, excluding test/import/deleted conversations;
|
|
78
|
+
* confirmed new bookings, reschedules, cancellations, failed, pending,
|
|
79
|
+
* unverified and duplicate receipts separately (filter `agentId`). Historical
|
|
80
|
+
* evidence, not current appointment status; hasMore requires splitting the
|
|
81
|
+
* range and returns no partial totals. `tool_calls_daily`: tool calls per
|
|
82
|
+
* day, Agent and tool with failures/durations (filter `agentId`).
|
|
83
|
+
* `tool_calls`: individual calls, never inputs/outputs (filter `agentId`).
|
|
84
|
+
* `assessment_results_daily`: assessments per day/definition (filter
|
|
85
|
+
* `definitionId`). `pqrsf_daily`: classification, confirmed resolution and
|
|
86
|
+
* referral-link counts from the pqrsf_* definitions, including
|
|
87
|
+
* pending/unclassified conversations, excluding tests/imports/deleted records
|
|
88
|
+
* (filters `agentId`, `channelType`); no measured filing reduction is
|
|
89
|
+
* inferred. `campaign_progress`: recipients by status (filter `campaignId`;
|
|
90
|
+
* no dates).
|
|
76
91
|
*/
|
|
77
|
-
name: "conversations_daily" | "pqrsf_daily" | "tool_calls_daily" | "tool_calls" | "booking_outcomes" | "assessment_results_daily" | "campaign_progress";
|
|
92
|
+
name: "conversations_daily" | "pqrsf_daily" | "tool_calls_daily" | "tool_calls" | "booking_outcomes" | "booking_details" | "assessment_results_daily" | "campaign_progress";
|
|
78
93
|
/**
|
|
79
94
|
* Last day (`YYYY-MM-DD`), inclusive, of a daily report. Default: today in
|
|
80
95
|
* the organization's time zone.
|
|
@@ -13,7 +13,7 @@ export function bind(transport) {
|
|
|
13
13
|
const GetOperation = {
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/raiz/reports",
|
|
16
|
-
query: { agentId: "agentId", campaignId: "campaignId", channelType: "channelType", definitionId: "definitionId", from: "from", name: "name", to: "to" },
|
|
16
|
+
query: { specialty: "specialty", agentId: "agentId", campaignId: "campaignId", channelType: "channelType", definitionId: "definitionId", from: "from", name: "name", to: "to" },
|
|
17
17
|
response: object([["data", null, () => RaizReportCodec]]),
|
|
18
18
|
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 },
|
|
19
19
|
};
|
|
@@ -92,6 +92,27 @@ export type RaizReport = {
|
|
|
92
92
|
unverifiedCount: number;
|
|
93
93
|
}[];
|
|
94
94
|
to: Temporal.PlainDate;
|
|
95
|
+
} | {
|
|
96
|
+
from: Temporal.PlainDate;
|
|
97
|
+
hasMore: boolean;
|
|
98
|
+
name: "booking_details";
|
|
99
|
+
rows: {
|
|
100
|
+
appointmentDate: Temporal.PlainDate;
|
|
101
|
+
appointmentTime: string;
|
|
102
|
+
cancelledAt: Temporal.Instant | null;
|
|
103
|
+
conversationId: string;
|
|
104
|
+
createdAt: Temporal.Instant;
|
|
105
|
+
day: Temporal.PlainDate;
|
|
106
|
+
exam: string | null;
|
|
107
|
+
messageId: string;
|
|
108
|
+
patientDocument: string;
|
|
109
|
+
patientName: string | null;
|
|
110
|
+
professionalName: string | null;
|
|
111
|
+
specialty: string | null;
|
|
112
|
+
}[];
|
|
113
|
+
snapshotAt: Temporal.Instant;
|
|
114
|
+
to: Temporal.PlainDate;
|
|
115
|
+
unverifiedCount: number;
|
|
95
116
|
} | {
|
|
96
117
|
from: Temporal.PlainDate;
|
|
97
118
|
hasMore: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
import { array, date, instant, object, union } from "../../_/index.js";
|
|
4
|
-
export const RaizReportCodec = union([object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["occurredAt", null, instant]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]])]);
|
|
4
|
+
export const RaizReportCodec = union([object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["occurredAt", null, instant]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["appointmentDate", null, date], ["cancelledAt", null, instant], ["createdAt", null, instant], ["day", null, date]]))], ["snapshotAt", null, instant], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]])]);
|
package/dist/sura/client.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { type Client as CopaysClient } from "./copays/client.js";
|
|
|
9
9
|
import { type Client as OperationsClient } from "./operations/client.js";
|
|
10
10
|
import { type Client as PatientsClient } from "./patients/client.js";
|
|
11
11
|
import { type Client as ProfessionalsClient } from "./professionals/client.js";
|
|
12
|
+
import { type Client as SchedulesClient } from "./schedules/client.js";
|
|
12
13
|
import { type Client as ServicesClient } from "./services/client.js";
|
|
13
14
|
export interface ClientOptions extends BaseClientOptions {
|
|
14
15
|
/**
|
|
@@ -27,6 +28,7 @@ export interface Client {
|
|
|
27
28
|
readonly operations: OperationsClient;
|
|
28
29
|
readonly patients: PatientsClient;
|
|
29
30
|
readonly professionals: ProfessionalsClient;
|
|
31
|
+
readonly schedules: SchedulesClient;
|
|
30
32
|
readonly services: ServicesClient;
|
|
31
33
|
}
|
|
32
34
|
export declare function createClient(options: ClientOptions): Client;
|
package/dist/sura/client.js
CHANGED
|
@@ -11,6 +11,7 @@ import { bind as bindCopays, } from "./copays/client.js";
|
|
|
11
11
|
import { bind as bindOperations, } from "./operations/client.js";
|
|
12
12
|
import { bind as bindPatients, } from "./patients/client.js";
|
|
13
13
|
import { bind as bindProfessionals, } from "./professionals/client.js";
|
|
14
|
+
import { bind as bindSchedules, } from "./schedules/client.js";
|
|
14
15
|
import { bind as bindServices, } from "./services/client.js";
|
|
15
16
|
export function createClient(options) {
|
|
16
17
|
return bind(new Transport(options));
|
|
@@ -26,6 +27,7 @@ export function bind(transport) {
|
|
|
26
27
|
let operationsClient;
|
|
27
28
|
let patientsClient;
|
|
28
29
|
let professionalsClient;
|
|
30
|
+
let schedulesClient;
|
|
29
31
|
let servicesClient;
|
|
30
32
|
return {
|
|
31
33
|
get affiliations() {
|
|
@@ -58,6 +60,9 @@ export function bind(transport) {
|
|
|
58
60
|
get professionals() {
|
|
59
61
|
return (professionalsClient ??= bindProfessionals(transport));
|
|
60
62
|
},
|
|
63
|
+
get schedules() {
|
|
64
|
+
return (schedulesClient ??= bindSchedules(transport));
|
|
65
|
+
},
|
|
61
66
|
get services() {
|
|
62
67
|
return (servicesClient ??= bindServices(transport));
|
|
63
68
|
},
|
package/dist/sura/index.d.ts
CHANGED
|
@@ -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 { SuraAffiliation, SuraAppointment, SuraAppointmentPage, SuraAuthorization, SuraAvailability, SuraAvailabilityPatient, SuraAvailableDay, SuraBookedAppointment, SuraCancelledAppointment, SuraConnectionNotConfiguredFailure, SuraCopayEntry, SuraCopayHistory, SuraNoContract, SuraNoCopayHistory, SuraOpening, SuraPatient, SuraPatientFound, SuraPatientNotFound, SuraPendingResult, SuraPortalCredentialsRejectedFailure, SuraPortalSessionConflictFailure, SuraPortalUnavailableFailure, SuraPreparationAvailable, SuraPreparationExistingAppointment, SuraPreparationNoSlots, SuraPreparationPatientNotFound, SuraRefusal, SuraSearchedDay, SuraService, SuraServicePage, SuraToolRefusedError, SuraToolRefusedFailure, SuraToolRefusedFailureData, } from "./models.js";
|
|
5
|
+
export type { SuraAffiliation, SuraAppointment, SuraAppointmentPage, SuraAuthorization, SuraAvailability, SuraAvailabilityPatient, SuraAvailableDay, SuraBookedAppointment, SuraCancelledAppointment, SuraConnectionNotConfiguredFailure, SuraCopayEntry, SuraCopayHistory, SuraNoContract, SuraNoCopayHistory, SuraOpening, SuraPatient, SuraPatientFound, SuraPatientNotFound, SuraPendingResult, SuraPortalCredentialsRejectedFailure, SuraPortalSessionConflictFailure, SuraPortalUnavailableFailure, SuraPreparationAvailable, SuraPreparationExistingAppointment, SuraPreparationNoSlots, SuraPreparationPatientNotFound, SuraRefusal, SuraSchedule, SuraScheduleCapacity, SuraScheduleHours, SuraScheduleStatus, SuraSearchedDay, SuraService, SuraServicePage, SuraServiceSchedule, SuraToolRefusedError, SuraToolRefusedFailure, SuraToolRefusedFailureData, } from "./models.js";
|
package/dist/sura/models.d.ts
CHANGED
|
@@ -573,6 +573,36 @@ export interface SuraRefusal {
|
|
|
573
573
|
times?: string[];
|
|
574
574
|
today?: string;
|
|
575
575
|
}
|
|
576
|
+
export interface SuraSchedule {
|
|
577
|
+
/**
|
|
578
|
+
* Spanish guidance for the model: what to do next.
|
|
579
|
+
*/
|
|
580
|
+
aiHint: string;
|
|
581
|
+
capacity: SuraScheduleCapacity;
|
|
582
|
+
date: Temporal.PlainDate;
|
|
583
|
+
institutionId: string;
|
|
584
|
+
observedAt: Temporal.Instant;
|
|
585
|
+
ok: true;
|
|
586
|
+
professional: string;
|
|
587
|
+
services: SuraServiceSchedule[];
|
|
588
|
+
status: SuraScheduleStatus;
|
|
589
|
+
}
|
|
590
|
+
export interface SuraScheduleCapacity {
|
|
591
|
+
assignedCount: number;
|
|
592
|
+
availableCount: number;
|
|
593
|
+
blockedCount: number;
|
|
594
|
+
createdCount: number;
|
|
595
|
+
offeredCount: number;
|
|
596
|
+
}
|
|
597
|
+
export interface SuraScheduleHours {
|
|
598
|
+
dayOfWeek: number;
|
|
599
|
+
durationMinutes: number;
|
|
600
|
+
generated: boolean;
|
|
601
|
+
patientsPerSlot: number;
|
|
602
|
+
timeFrom: string;
|
|
603
|
+
timeUntil: string;
|
|
604
|
+
}
|
|
605
|
+
export type SuraScheduleStatus = "available" | "full" | "blocked" | "not_scheduled" | "not_generated" | "not_offered";
|
|
576
606
|
export interface SuraSearchedDay {
|
|
577
607
|
date: string | null;
|
|
578
608
|
professional: string | null;
|
|
@@ -597,6 +627,19 @@ export interface SuraServicePage {
|
|
|
597
627
|
*/
|
|
598
628
|
pageInfo: PageInfo;
|
|
599
629
|
}
|
|
630
|
+
export interface SuraServiceSchedule {
|
|
631
|
+
capacity: SuraScheduleCapacity;
|
|
632
|
+
periods: {
|
|
633
|
+
fromDate: Temporal.PlainDate;
|
|
634
|
+
generated: boolean;
|
|
635
|
+
generationStatus: "generated" | "not_generated" | "partially_generated";
|
|
636
|
+
hours: SuraScheduleHours[];
|
|
637
|
+
untilDate: Temporal.PlainDate;
|
|
638
|
+
}[];
|
|
639
|
+
serviceId: string;
|
|
640
|
+
serviceName: string;
|
|
641
|
+
status: SuraScheduleStatus;
|
|
642
|
+
}
|
|
600
643
|
/**
|
|
601
644
|
* A failed answer.
|
|
602
645
|
*/
|
|
@@ -676,3 +719,5 @@ export declare const SuraPreparationExistingAppointmentCodec: import("../_/codec
|
|
|
676
719
|
export declare const SuraPreparationNoSlotsCodec: import("../_/codec.js").Codec;
|
|
677
720
|
export declare const SuraPreparationPatientNotFoundCodec: import("../_/codec.js").Codec;
|
|
678
721
|
export declare const SuraRefusalCodec: import("../_/codec.js").Codec;
|
|
722
|
+
export declare const SuraScheduleCodec: import("../_/codec.js").Codec;
|
|
723
|
+
export declare const SuraServiceScheduleCodec: import("../_/codec.js").Codec;
|
package/dist/sura/models.js
CHANGED
|
@@ -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, date, instant, object } from "../_/index.js";
|
|
4
4
|
export const SuraAffiliationCodec = object([
|
|
5
5
|
["ai_hint", "aiHint"],
|
|
6
6
|
]);
|
|
@@ -68,3 +68,12 @@ export const SuraRefusalCodec = object([
|
|
|
68
68
|
["appointments", null, array(() => SuraAppointmentCodec)],
|
|
69
69
|
["options", null, array(() => SuraAppointmentCodec)],
|
|
70
70
|
]);
|
|
71
|
+
export const SuraScheduleCodec = object([
|
|
72
|
+
["ai_hint", "aiHint"],
|
|
73
|
+
["date", null, date],
|
|
74
|
+
["observedAt", null, instant],
|
|
75
|
+
["services", null, array(() => SuraServiceScheduleCodec)],
|
|
76
|
+
]);
|
|
77
|
+
export const SuraServiceScheduleCodec = object([
|
|
78
|
+
["periods", null, array(object([["fromDate", null, date], ["untilDate", null, date]]))],
|
|
79
|
+
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OutcomeUnknownFailure, ResponseMetadata } from "../../models.js";
|
|
2
|
-
import { type SuraAffiliation, type SuraAppointmentPage, type SuraAuthorization, type SuraAvailability, type SuraBookedAppointment, type SuraCancelledAppointment, type SuraConnectionNotConfiguredFailure, type SuraCopayHistory, type SuraNoContract, type SuraNoCopayHistory, type SuraPatientFound, type SuraPatientNotFound, type SuraPendingResult, type SuraPortalCredentialsRejectedFailure, type SuraPortalSessionConflictFailure, type SuraPortalUnavailableFailure, type SuraPreparationAvailable, type SuraPreparationExistingAppointment, type SuraPreparationNoSlots, type SuraPreparationPatientNotFound, type SuraRefusal, type SuraServicePage } from "../models.js";
|
|
2
|
+
import { type SuraAffiliation, type SuraAppointmentPage, type SuraAuthorization, type SuraAvailability, type SuraBookedAppointment, type SuraCancelledAppointment, type SuraConnectionNotConfiguredFailure, type SuraCopayHistory, type SuraNoContract, type SuraNoCopayHistory, type SuraPatientFound, type SuraPatientNotFound, type SuraPendingResult, type SuraPortalCredentialsRejectedFailure, type SuraPortalSessionConflictFailure, type SuraPortalUnavailableFailure, type SuraPreparationAvailable, type SuraPreparationExistingAppointment, type SuraPreparationNoSlots, type SuraPreparationPatientNotFound, type SuraRefusal, type SuraSchedule, type SuraServicePage } from "../models.js";
|
|
3
3
|
/**
|
|
4
4
|
* A failed answer.
|
|
5
5
|
*/
|
|
@@ -26,7 +26,7 @@ export interface SuraGetOperationConflictError {
|
|
|
26
26
|
success: false;
|
|
27
27
|
}
|
|
28
28
|
export type SuraGetOperationConflictFailure = SuraPortalSessionConflictFailure | SuraConnectionNotConfiguredFailure;
|
|
29
|
-
export type SuraGetOperationResult = SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraPreparationPatientNotFound | SuraPatientFound | SuraServicePage | SuraAvailability | SuraPreparationExistingAppointment | SuraPreparationAvailable | SuraPreparationNoSlots | SuraBookedAppointment | SuraAppointmentPage | SuraCancelledAppointment | SuraAffiliation | SuraNoContract | SuraAuthorization | SuraCopayHistory | SuraNoCopayHistory;
|
|
29
|
+
export type SuraGetOperationResult = SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraPreparationPatientNotFound | SuraPatientFound | SuraServicePage | SuraAvailability | SuraSchedule | SuraPreparationExistingAppointment | SuraPreparationAvailable | SuraPreparationNoSlots | SuraBookedAppointment | SuraAppointmentPage | SuraCancelledAppointment | SuraAffiliation | SuraNoContract | SuraAuthorization | SuraCopayHistory | SuraNoCopayHistory;
|
|
30
30
|
/**
|
|
31
31
|
* A successful answer.
|
|
32
32
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
import { object, union } from "../../_/index.js";
|
|
4
|
-
import { SuraAffiliationCodec, SuraAppointmentPageCodec, SuraAuthorizationCodec, SuraAvailabilityCodec, SuraBookedAppointmentCodec, SuraCancelledAppointmentCodec, SuraCopayHistoryCodec, SuraNoContractCodec, SuraNoCopayHistoryCodec, SuraPatientFoundCodec, SuraPatientNotFoundCodec, SuraPendingResultCodec, SuraPreparationAvailableCodec, SuraPreparationExistingAppointmentCodec, SuraPreparationNoSlotsCodec, SuraPreparationPatientNotFoundCodec, SuraRefusalCodec, } from "../models.js";
|
|
5
|
-
export const SuraGetOperationResultCodec = union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraPreparationPatientNotFoundCodec, () => SuraPatientFoundCodec, () => SuraAvailabilityCodec, () => SuraPreparationExistingAppointmentCodec, () => SuraPreparationAvailableCodec, () => SuraPreparationNoSlotsCodec, () => SuraBookedAppointmentCodec, () => SuraAppointmentPageCodec, () => SuraCancelledAppointmentCodec, () => SuraAffiliationCodec, () => SuraNoContractCodec, () => SuraAuthorizationCodec, () => SuraCopayHistoryCodec, () => SuraNoCopayHistoryCodec]);
|
|
4
|
+
import { SuraAffiliationCodec, SuraAppointmentPageCodec, SuraAuthorizationCodec, SuraAvailabilityCodec, SuraBookedAppointmentCodec, SuraCancelledAppointmentCodec, SuraCopayHistoryCodec, SuraNoContractCodec, SuraNoCopayHistoryCodec, SuraPatientFoundCodec, SuraPatientNotFoundCodec, SuraPendingResultCodec, SuraPreparationAvailableCodec, SuraPreparationExistingAppointmentCodec, SuraPreparationNoSlotsCodec, SuraPreparationPatientNotFoundCodec, SuraRefusalCodec, SuraScheduleCodec, } from "../models.js";
|
|
5
|
+
export const SuraGetOperationResultCodec = union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraPreparationPatientNotFoundCodec, () => SuraPatientFoundCodec, () => SuraAvailabilityCodec, () => SuraScheduleCodec, () => SuraPreparationExistingAppointmentCodec, () => SuraPreparationAvailableCodec, () => SuraPreparationNoSlotsCodec, () => SuraBookedAppointmentCodec, () => SuraAppointmentPageCodec, () => SuraCancelledAppointmentCodec, () => SuraAffiliationCodec, () => SuraNoContractCodec, () => SuraAuthorizationCodec, () => SuraCopayHistoryCodec, () => SuraNoCopayHistoryCodec]);
|
|
6
6
|
export const SuraGetOperationResultResponseCodec = object([
|
|
7
7
|
["data", null, () => SuraGetOperationResultCodec],
|
|
8
8
|
]);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import { type SuraLookupScheduleBody, type SuraLookupScheduleResultResponse } 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 a professional schedule
|
|
12
|
+
*
|
|
13
|
+
* Read a professional’s generated schedule and capacity on one date without a
|
|
14
|
+
* patient document. Omit serviceId to inspect all their registered services
|
|
15
|
+
* at the connection’s institution. Distinguishes a full day from no schedule,
|
|
16
|
+
* an ungenerated period, blocked capacity and a generated period not offered.
|
|
17
|
+
* Returns real configured hours and created, offered, assigned, available and
|
|
18
|
+
* blocked counts. Counts are administrative capacity, never patient
|
|
19
|
+
* eligibility or a booking proposal. Does not create periods, change hours,
|
|
20
|
+
* book or cancel appointments. Use bookingOptions.lookup with the patient
|
|
21
|
+
* before offering a bookable slot. A technical failure never means no
|
|
22
|
+
* schedule.
|
|
23
|
+
*/
|
|
24
|
+
lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
|
|
25
|
+
}
|
|
26
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
27
|
+
export declare function bind(transport: Transport): Client;
|
|
28
|
+
export type LookupRequest = SuraLookupScheduleBody;
|
|
29
|
+
export type LookupResponse = SuraLookupScheduleResultResponse;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Transport, } from "../../_/index.js";
|
|
4
|
+
import { SuraLookupScheduleBodyCodec, SuraLookupScheduleResultResponseCodec, } 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/sura/schedules/lookup",
|
|
16
|
+
body: "flat",
|
|
17
|
+
request: SuraLookupScheduleBodyCodec,
|
|
18
|
+
response: SuraLookupScheduleResultResponseCodec,
|
|
19
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
20
|
+
};
|
|
@@ -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 { SuraLookupScheduleBadGatewayError, SuraLookupScheduleBadGatewayFailure, SuraLookupScheduleBody, SuraLookupScheduleConflictError, SuraLookupScheduleConflictFailure, SuraLookupScheduleResult, SuraLookupScheduleResultResponse, } from "./models.js";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { OutcomeUnknownFailure, ResponseMetadata } from "../../models.js";
|
|
2
|
+
import { type SuraConnectionNotConfiguredFailure, type SuraPendingResult, type SuraPortalCredentialsRejectedFailure, type SuraPortalSessionConflictFailure, type SuraPortalUnavailableFailure, type SuraRefusal, type SuraSchedule } from "../models.js";
|
|
3
|
+
/**
|
|
4
|
+
* A failed answer.
|
|
5
|
+
*/
|
|
6
|
+
export interface SuraLookupScheduleBadGatewayError {
|
|
7
|
+
data: null;
|
|
8
|
+
error: SuraLookupScheduleBadGatewayFailure;
|
|
9
|
+
/**
|
|
10
|
+
* What every answer carries besides its data or error.
|
|
11
|
+
*/
|
|
12
|
+
metadata: ResponseMetadata;
|
|
13
|
+
success: false;
|
|
14
|
+
}
|
|
15
|
+
export type SuraLookupScheduleBadGatewayFailure = OutcomeUnknownFailure | SuraPortalCredentialsRejectedFailure | SuraPortalUnavailableFailure;
|
|
16
|
+
export interface SuraLookupScheduleBody {
|
|
17
|
+
/**
|
|
18
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
19
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
20
|
+
* This changes presentation only, never authorization, consent or
|
|
21
|
+
* idempotency.
|
|
22
|
+
*/
|
|
23
|
+
agentMode?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The channel the caller is waiting on, which sets how long it waits before
|
|
26
|
+
* an answer comes back pending, and puts a phone call's reads ahead of
|
|
27
|
+
* others. Defaults to web.
|
|
28
|
+
*/
|
|
29
|
+
channel?: "voice" | "whatsapp" | "web";
|
|
30
|
+
/**
|
|
31
|
+
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
32
|
+
* while the organization has one; required when it has several.
|
|
33
|
+
*/
|
|
34
|
+
connectionId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The calendar day to inspect, YYYY-MM-DD, in the clinic’s timezone.
|
|
37
|
+
*/
|
|
38
|
+
date: Temporal.PlainDate;
|
|
39
|
+
/**
|
|
40
|
+
* The professional name or an unambiguous part of it. Resolved against this
|
|
41
|
+
* connection’s registered directory; never a patient identity.
|
|
42
|
+
*/
|
|
43
|
+
professional: string;
|
|
44
|
+
/**
|
|
45
|
+
* Optional exact service id or unambiguous service name. Omit to inspect
|
|
46
|
+
* every service in which this professional is registered at this connection’s
|
|
47
|
+
* institution.
|
|
48
|
+
*/
|
|
49
|
+
serviceId?: string | null;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A failed answer.
|
|
53
|
+
*/
|
|
54
|
+
export interface SuraLookupScheduleConflictError {
|
|
55
|
+
data: null;
|
|
56
|
+
error: SuraLookupScheduleConflictFailure;
|
|
57
|
+
/**
|
|
58
|
+
* What every answer carries besides its data or error.
|
|
59
|
+
*/
|
|
60
|
+
metadata: ResponseMetadata;
|
|
61
|
+
success: false;
|
|
62
|
+
}
|
|
63
|
+
export type SuraLookupScheduleConflictFailure = SuraPortalSessionConflictFailure | SuraConnectionNotConfiguredFailure;
|
|
64
|
+
export type SuraLookupScheduleResult = SuraPendingResult | SuraRefusal | SuraSchedule;
|
|
65
|
+
/**
|
|
66
|
+
* A successful answer.
|
|
67
|
+
*/
|
|
68
|
+
export interface SuraLookupScheduleResultResponse {
|
|
69
|
+
data: SuraLookupScheduleResult;
|
|
70
|
+
error: null;
|
|
71
|
+
/**
|
|
72
|
+
* What every answer carries besides its data or error.
|
|
73
|
+
*/
|
|
74
|
+
metadata: ResponseMetadata;
|
|
75
|
+
success: true;
|
|
76
|
+
}
|
|
77
|
+
export declare const SuraLookupScheduleBodyCodec: import("../../_/codec.js").Codec;
|
|
78
|
+
export declare const SuraLookupScheduleResultCodec: import("../../_/codec.js").Codec;
|
|
79
|
+
export declare const SuraLookupScheduleResultResponseCodec: import("../../_/codec.js").Codec;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { date, object, union } from "../../_/index.js";
|
|
4
|
+
import { SuraPendingResultCodec, SuraRefusalCodec, SuraScheduleCodec, } from "../models.js";
|
|
5
|
+
export const SuraLookupScheduleBodyCodec = object([
|
|
6
|
+
["date", null, date],
|
|
7
|
+
]);
|
|
8
|
+
export const SuraLookupScheduleResultCodec = union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraScheduleCodec]);
|
|
9
|
+
export const SuraLookupScheduleResultResponseCodec = object([
|
|
10
|
+
["data", null, () => SuraLookupScheduleResultCodec],
|
|
11
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbol-ai/sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.34.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",
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
50
50
|
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
51
51
|
"test": "bun test ./tests",
|
|
52
|
-
"verify": "bun run typecheck && bun run
|
|
52
|
+
"verify": "bun run typecheck && bun run build",
|
|
53
|
+
"verify:with-tests": "bun run typecheck && bun run test && bun run build"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"typescript": "7.0.2"
|
|
@@ -57,8 +58,8 @@
|
|
|
57
58
|
"packageManager": "bun@1.4.3",
|
|
58
59
|
"arbol": {
|
|
59
60
|
"openapi": {
|
|
60
|
-
"release": "1.
|
|
61
|
-
"sha256": "
|
|
61
|
+
"release": "1.20261105.15838",
|
|
62
|
+
"sha256": "046bba468060514045acd14deae2d0628d28870dbc10b41c400dfb619bd8b28b"
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
}
|