@arbol-ai/sdk 5.33.0 → 5.35.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/sura/availability/client.d.ts +10 -5
- package/dist/sura/availability/models.d.ts +3 -3
- 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 +72 -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 +3 -3
|
@@ -10,11 +10,16 @@ export interface Client {
|
|
|
10
10
|
/**
|
|
11
11
|
* Find availability
|
|
12
12
|
*
|
|
13
|
-
* Find the free appointment times for one patient and one service. With
|
|
14
|
-
* date it answers
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
13
|
+
* Find the free appointment times for one patient and one service. With a
|
|
14
|
+
* date it answers for that day. With no date it answers for the
|
|
15
|
+
* professional's next day with an agenda, which can be full. times[] are the
|
|
16
|
+
* hours you may book, and only free ones are ever listed; otherDates[] are
|
|
17
|
+
* other days that month with room; days[] says how every day of that month
|
|
18
|
+
* stands (available, full or no_agenda); reserved says the day's only free
|
|
19
|
+
* slot is held back; and otherProfessionals[] are the other doctors who see
|
|
20
|
+
* this service. An empty times[] does not mean the whole agenda is full:
|
|
21
|
+
* prepare_appointment searches other months. Offer two or three times, never
|
|
22
|
+
* the whole list.
|
|
18
23
|
*/
|
|
19
24
|
lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
|
|
20
25
|
}
|
|
@@ -39,9 +39,9 @@ export interface SuraFindAvailabilityBody {
|
|
|
39
39
|
*/
|
|
40
40
|
connectionId?: string;
|
|
41
41
|
/**
|
|
42
|
-
* A day to look at, as YYYY-MM-DD. Omit it
|
|
43
|
-
* Resolve relative dates like "mañana" against the
|
|
44
|
-
* before calling.
|
|
42
|
+
* A day to look at, as YYYY-MM-DD. Omit it to start from the professional's
|
|
43
|
+
* next day with an agenda. Resolve relative dates like "mañana" against the
|
|
44
|
+
* clinic's own timezone before calling.
|
|
45
45
|
*/
|
|
46
46
|
date?: string | null;
|
|
47
47
|
/**
|
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, SuraCalendarDay, 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
|
@@ -109,6 +109,12 @@ export interface SuraAvailability {
|
|
|
109
109
|
*/
|
|
110
110
|
aiHint: string;
|
|
111
111
|
date: string | null;
|
|
112
|
+
/**
|
|
113
|
+
* Every day of that month for this professional, so a day with no hours says
|
|
114
|
+
* why. Empty only when SURA's calendar could not be read. Absent on older
|
|
115
|
+
* saved results; absence does not establish a day state.
|
|
116
|
+
*/
|
|
117
|
+
days?: SuraCalendarDay[];
|
|
112
118
|
ok: true;
|
|
113
119
|
/**
|
|
114
120
|
* Other days that month with room.
|
|
@@ -121,6 +127,12 @@ export interface SuraAvailability {
|
|
|
121
127
|
patient: SuraAvailabilityPatient;
|
|
122
128
|
plan: string | null;
|
|
123
129
|
professional: string | null;
|
|
130
|
+
/**
|
|
131
|
+
* True when the day's only free slot is held for the primary-care IPS until
|
|
132
|
+
* 24 hours before it; times leaves it out. Absent on older saved results;
|
|
133
|
+
* absence does not mean false.
|
|
134
|
+
*/
|
|
135
|
+
reserved?: boolean;
|
|
124
136
|
service: string | null;
|
|
125
137
|
/**
|
|
126
138
|
* The hours that may be booked that day, HH:MM.
|
|
@@ -168,6 +180,17 @@ export interface SuraBookedAppointment {
|
|
|
168
180
|
*/
|
|
169
181
|
time: string;
|
|
170
182
|
}
|
|
183
|
+
export interface SuraCalendarDay {
|
|
184
|
+
/**
|
|
185
|
+
* YYYY-MM-DD.
|
|
186
|
+
*/
|
|
187
|
+
date: string;
|
|
188
|
+
/**
|
|
189
|
+
* available: it has free slots. full: it has an agenda with none free.
|
|
190
|
+
* no_agenda: the professional has no agenda that day.
|
|
191
|
+
*/
|
|
192
|
+
status: "available" | "full" | "no_agenda";
|
|
193
|
+
}
|
|
171
194
|
export interface SuraCancelledAppointment {
|
|
172
195
|
/**
|
|
173
196
|
* Spanish guidance for the model: what to do next.
|
|
@@ -566,6 +589,10 @@ export interface SuraRefusal {
|
|
|
566
589
|
ok: false;
|
|
567
590
|
options?: SuraAppointment[];
|
|
568
591
|
place?: string;
|
|
592
|
+
/**
|
|
593
|
+
* The plan a refusal about coverage was judged on.
|
|
594
|
+
*/
|
|
595
|
+
plan?: string;
|
|
569
596
|
professionals?: string[];
|
|
570
597
|
service?: string | null;
|
|
571
598
|
serviceId?: string;
|
|
@@ -573,6 +600,36 @@ export interface SuraRefusal {
|
|
|
573
600
|
times?: string[];
|
|
574
601
|
today?: string;
|
|
575
602
|
}
|
|
603
|
+
export interface SuraSchedule {
|
|
604
|
+
/**
|
|
605
|
+
* Spanish guidance for the model: what to do next.
|
|
606
|
+
*/
|
|
607
|
+
aiHint: string;
|
|
608
|
+
capacity: SuraScheduleCapacity;
|
|
609
|
+
date: Temporal.PlainDate;
|
|
610
|
+
institutionId: string;
|
|
611
|
+
observedAt: Temporal.Instant;
|
|
612
|
+
ok: true;
|
|
613
|
+
professional: string;
|
|
614
|
+
services: SuraServiceSchedule[];
|
|
615
|
+
status: SuraScheduleStatus;
|
|
616
|
+
}
|
|
617
|
+
export interface SuraScheduleCapacity {
|
|
618
|
+
assignedCount: number;
|
|
619
|
+
availableCount: number;
|
|
620
|
+
blockedCount: number;
|
|
621
|
+
createdCount: number;
|
|
622
|
+
offeredCount: number;
|
|
623
|
+
}
|
|
624
|
+
export interface SuraScheduleHours {
|
|
625
|
+
dayOfWeek: number;
|
|
626
|
+
durationMinutes: number;
|
|
627
|
+
generated: boolean;
|
|
628
|
+
patientsPerSlot: number;
|
|
629
|
+
timeFrom: string;
|
|
630
|
+
timeUntil: string;
|
|
631
|
+
}
|
|
632
|
+
export type SuraScheduleStatus = "available" | "full" | "blocked" | "not_scheduled" | "not_generated" | "not_offered";
|
|
576
633
|
export interface SuraSearchedDay {
|
|
577
634
|
date: string | null;
|
|
578
635
|
professional: string | null;
|
|
@@ -597,6 +654,19 @@ export interface SuraServicePage {
|
|
|
597
654
|
*/
|
|
598
655
|
pageInfo: PageInfo;
|
|
599
656
|
}
|
|
657
|
+
export interface SuraServiceSchedule {
|
|
658
|
+
capacity: SuraScheduleCapacity;
|
|
659
|
+
periods: {
|
|
660
|
+
fromDate: Temporal.PlainDate;
|
|
661
|
+
generated: boolean;
|
|
662
|
+
generationStatus: "generated" | "not_generated" | "partially_generated";
|
|
663
|
+
hours: SuraScheduleHours[];
|
|
664
|
+
untilDate: Temporal.PlainDate;
|
|
665
|
+
}[];
|
|
666
|
+
serviceId: string;
|
|
667
|
+
serviceName: string;
|
|
668
|
+
status: SuraScheduleStatus;
|
|
669
|
+
}
|
|
600
670
|
/**
|
|
601
671
|
* A failed answer.
|
|
602
672
|
*/
|
|
@@ -676,3 +746,5 @@ export declare const SuraPreparationExistingAppointmentCodec: import("../_/codec
|
|
|
676
746
|
export declare const SuraPreparationNoSlotsCodec: import("../_/codec.js").Codec;
|
|
677
747
|
export declare const SuraPreparationPatientNotFoundCodec: import("../_/codec.js").Codec;
|
|
678
748
|
export declare const SuraRefusalCodec: import("../_/codec.js").Codec;
|
|
749
|
+
export declare const SuraScheduleCodec: import("../_/codec.js").Codec;
|
|
750
|
+
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.35.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.20261105.
|
|
62
|
-
"sha256": "
|
|
61
|
+
"release": "1.20261105.41647",
|
|
62
|
+
"sha256": "9f4c514a6aa7f95ada90b3e20fcdd34835193d5190e350bad35061dac279115c"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|