@arbol-ai/sdk 4.0.0 → 5.1.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/README.md +15 -3
- package/dist/agenda/appointments/client.d.ts +165 -52
- package/dist/agenda/appointments/client.js +19 -11
- package/dist/agenda/appointments/index.d.ts +1 -1
- package/dist/agenda/availability/client.d.ts +11 -72
- package/dist/agenda/availability/client.js +5 -14
- package/dist/agenda/availability/index.d.ts +1 -1
- package/dist/agenda/bookingLocations/client.d.ts +51 -0
- package/dist/agenda/bookingLocations/client.js +19 -0
- package/dist/agenda/bookingLocations/index.d.ts +4 -0
- package/dist/agenda/bookingLocations/index.js +4 -0
- package/dist/agenda/bookingOfferings/client.d.ts +82 -0
- package/dist/agenda/bookingOfferings/client.js +18 -0
- package/dist/agenda/bookingOfferings/index.d.ts +5 -0
- package/dist/agenda/bookingOfferings/index.js +4 -0
- package/dist/agenda/bookingOfferings/models.d.ts +92 -0
- package/dist/agenda/bookingOfferings/models.js +3 -0
- package/dist/agenda/bookingRequirements/client.d.ts +118 -0
- package/dist/agenda/bookingRequirements/client.js +18 -0
- package/dist/agenda/bookingRequirements/index.d.ts +4 -0
- package/dist/agenda/bookingRequirements/index.js +4 -0
- package/dist/agenda/bookingSlots/client.d.ts +78 -0
- package/dist/agenda/bookingSlots/client.js +19 -0
- package/dist/agenda/bookingSlots/index.d.ts +4 -0
- package/dist/agenda/bookingSlots/index.js +4 -0
- package/dist/agenda/bookings/client.d.ts +44 -375
- package/dist/agenda/bookings/client.js +10 -52
- package/dist/agenda/bookings/index.d.ts +2 -2
- package/dist/agenda/bookings/models.d.ts +0 -92
- package/dist/agenda/client.d.ts +14 -0
- package/dist/agenda/client.js +35 -0
- package/dist/agenda/firstAvailability/client.d.ts +74 -0
- package/dist/agenda/firstAvailability/client.js +19 -0
- package/dist/agenda/firstAvailability/index.d.ts +5 -0
- package/dist/agenda/firstAvailability/index.js +4 -0
- package/dist/agenda/firstAvailability/models.d.ts +31 -0
- package/dist/agenda/firstAvailability/models.js +7 -0
- package/dist/agenda/index.d.ts +1 -1
- package/dist/agenda/models.d.ts +19 -94
- package/dist/agenda/models.js +0 -3
- package/dist/agenda/nearestBookingSlots/client.d.ts +93 -0
- package/dist/agenda/nearestBookingSlots/client.js +19 -0
- package/dist/agenda/nearestBookingSlots/index.d.ts +5 -0
- package/dist/agenda/nearestBookingSlots/index.js +4 -0
- package/dist/agenda/nearestBookingSlots/models.d.ts +38 -0
- package/dist/agenda/nearestBookingSlots/models.js +7 -0
- package/dist/agenda/offerings/client.d.ts +2 -2
- package/dist/agenda/offerings/client.js +1 -1
- package/dist/agenda/resourceSchedules/client.d.ts +75 -0
- package/dist/agenda/resourceSchedules/client.js +19 -0
- package/dist/agenda/resourceSchedules/index.d.ts +4 -0
- package/dist/agenda/resourceSchedules/index.js +4 -0
- package/dist/agenda/resources/client.d.ts +2 -2
- package/dist/agenda/resources/client.js +1 -1
- package/dist/agenda/scheduleRules/client.d.ts +125 -85
- package/dist/agenda/scheduleRules/client.js +17 -16
- package/dist/agenda/scheduleRules/index.d.ts +2 -1
- package/dist/agenda/scheduleRules/models.d.ts +33 -0
- package/dist/agenda/scheduleRules/models.js +6 -0
- package/dist/agenda/services/client.d.ts +2 -2
- package/dist/agenda/services/client.js +1 -1
- package/dist/agenda/waitlist/client.d.ts +40 -29
- package/dist/agenda/waitlist/client.js +4 -4
- package/dist/agenda/waitlist/index.d.ts +1 -1
- package/dist/agenda/waitlist/models.d.ts +17 -0
- package/dist/agenda/waitlist/models.js +4 -1
- package/dist/axxa/authorizations/client.d.ts +3 -35
- package/dist/axxa/authorizations/client.js +1 -1
- package/dist/axxa/authorizations/index.d.ts +1 -0
- package/dist/axxa/authorizations/models.d.ts +112 -0
- package/dist/axxa/authorizations/models.js +3 -0
- package/dist/axxa/connections/client.d.ts +19 -45
- package/dist/axxa/connections/client.js +10 -11
- package/dist/axxa/connections/index.d.ts +1 -0
- package/dist/axxa/connections/models.d.ts +269 -0
- package/dist/axxa/connections/models.js +3 -0
- package/dist/axxa/eligibility/client.d.ts +3 -25
- package/dist/axxa/eligibility/client.js +1 -1
- package/dist/axxa/eligibility/index.d.ts +1 -0
- package/dist/axxa/eligibility/models.d.ts +102 -0
- package/dist/axxa/eligibility/models.js +3 -0
- package/dist/axxa/index.d.ts +1 -1
- package/dist/axxa/models.d.ts +243 -168
- package/dist/axxa/provider/client.d.ts +5 -11
- package/dist/axxa/provider/client.js +1 -1
- package/dist/axxa/provider/index.d.ts +1 -0
- package/dist/axxa/provider/models.d.ts +87 -0
- package/dist/axxa/provider/models.js +3 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +5 -0
- package/dist/gmedic/agendaServices/client.d.ts +13 -9
- package/dist/gmedic/agendaServices/client.js +2 -2
- package/dist/gmedic/agendaServices/index.d.ts +1 -1
- package/dist/gmedic/agendaServices/models.d.ts +53 -1
- package/dist/gmedic/agendas/client.d.ts +16 -9
- package/dist/gmedic/agendas/client.js +2 -2
- package/dist/gmedic/agendas/index.d.ts +1 -1
- package/dist/gmedic/agendas/models.d.ts +53 -1
- package/dist/gmedic/appointments/client.d.ts +34 -241
- package/dist/gmedic/appointments/client.js +12 -10
- package/dist/gmedic/appointments/index.d.ts +1 -1
- package/dist/gmedic/appointments/models.d.ts +518 -1
- package/dist/gmedic/appointments/models.js +28 -2
- package/dist/gmedic/availability/client.d.ts +24 -10
- package/dist/gmedic/availability/client.js +4 -3
- package/dist/gmedic/availability/index.d.ts +1 -1
- package/dist/gmedic/availability/models.d.ts +57 -1
- package/dist/gmedic/availability/models.js +7 -1
- package/dist/gmedic/availableDays/client.d.ts +11 -8
- package/dist/gmedic/availableDays/client.js +1 -1
- package/dist/gmedic/availableDays/index.d.ts +1 -1
- package/dist/gmedic/availableDays/models.d.ts +53 -1
- package/dist/gmedic/branchOffices/client.d.ts +13 -9
- package/dist/gmedic/branchOffices/client.js +2 -2
- package/dist/gmedic/branchOffices/index.d.ts +1 -1
- package/dist/gmedic/branchOffices/models.d.ts +58 -1
- package/dist/gmedic/connections/client.d.ts +19 -42
- package/dist/gmedic/connections/client.js +10 -11
- package/dist/gmedic/connections/index.d.ts +1 -0
- package/dist/gmedic/connections/models.d.ts +162 -0
- package/dist/gmedic/connections/models.js +3 -0
- package/dist/gmedic/dictionaryEntries/client.d.ts +20 -10
- package/dist/gmedic/dictionaryEntries/client.js +2 -2
- package/dist/gmedic/dictionaryEntries/index.d.ts +1 -1
- package/dist/gmedic/dictionaryEntries/models.d.ts +53 -1
- package/dist/gmedic/healthPartners/client.d.ts +19 -9
- package/dist/gmedic/healthPartners/client.js +2 -2
- package/dist/gmedic/healthPartners/index.d.ts +1 -1
- package/dist/gmedic/healthPartners/models.d.ts +53 -1
- package/dist/gmedic/healthPromotionEntities/client.d.ts +20 -10
- package/dist/gmedic/healthPromotionEntities/client.js +2 -2
- package/dist/gmedic/healthPromotionEntities/index.d.ts +1 -1
- package/dist/gmedic/healthPromotionEntities/models.d.ts +53 -1
- package/dist/gmedic/index.d.ts +1 -1
- package/dist/gmedic/laboralRiskManagers/client.d.ts +20 -10
- package/dist/gmedic/laboralRiskManagers/client.js +2 -2
- package/dist/gmedic/laboralRiskManagers/index.d.ts +1 -1
- package/dist/gmedic/laboralRiskManagers/models.d.ts +53 -1
- package/dist/gmedic/models.d.ts +194 -133
- package/dist/gmedic/occupations/client.d.ts +19 -9
- package/dist/gmedic/occupations/client.js +2 -2
- package/dist/gmedic/occupations/index.d.ts +1 -1
- package/dist/gmedic/occupations/models.d.ts +53 -1
- package/dist/gmedic/patientNotes/client.d.ts +25 -55
- package/dist/gmedic/patientNotes/client.js +5 -5
- package/dist/gmedic/patientNotes/index.d.ts +1 -1
- package/dist/gmedic/patientNotes/models.d.ts +232 -1
- package/dist/gmedic/patients/client.d.ts +40 -359
- package/dist/gmedic/patients/client.js +13 -5
- package/dist/gmedic/patients/index.d.ts +2 -2
- package/dist/gmedic/patients/models.d.ts +795 -1
- package/dist/gmedic/services/client.d.ts +22 -16
- package/dist/gmedic/services/client.js +2 -2
- package/dist/gmedic/services/index.d.ts +1 -1
- package/dist/gmedic/services/models.d.ts +53 -3
- package/dist/gmedic/sessionPackages/client.d.ts +21 -58
- package/dist/gmedic/sessionPackages/client.js +5 -5
- package/dist/gmedic/sessionPackages/index.d.ts +1 -1
- package/dist/gmedic/sessionPackages/models.d.ts +183 -1
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +61 -0
- package/dist/models.js +6 -0
- package/dist/nuevaEps/affiliations/client.js +1 -1
- package/dist/nuevaEps/affiliations/models.d.ts +3 -1
- package/dist/nuevaEps/connections/client.d.ts +9 -9
- package/dist/nuevaEps/connections/client.js +9 -9
- package/dist/nuevaEps/connections/index.d.ts +1 -1
- package/dist/nuevaEps/connections/models.d.ts +1 -47
- package/dist/nuevaEps/connections/models.js +1 -8
- package/dist/saludTotal/client.d.ts +15 -0
- package/dist/saludTotal/client.js +20 -0
- package/dist/saludTotal/connections/client.d.ts +53 -0
- package/dist/saludTotal/connections/client.js +33 -0
- package/dist/saludTotal/connections/index.d.ts +5 -0
- package/dist/saludTotal/connections/index.js +4 -0
- package/dist/saludTotal/connections/models.d.ts +62 -0
- package/dist/saludTotal/connections/models.js +9 -0
- package/dist/saludTotal/index.d.ts +5 -0
- package/dist/saludTotal/index.js +4 -0
- package/dist/saludTotal/models.d.ts +37 -0
- package/dist/saludTotal/models.js +3 -0
- package/dist/saludTotal/portals/client.d.ts +35 -0
- package/dist/saludTotal/portals/client.js +18 -0
- package/dist/saludTotal/portals/index.d.ts +5 -0
- package/dist/saludTotal/portals/index.js +4 -0
- package/dist/saludTotal/portals/models.d.ts +30 -0
- package/dist/saludTotal/portals/models.js +3 -0
- package/dist/sura/affiliations/client.d.ts +3 -35
- package/dist/sura/affiliations/client.js +6 -6
- package/dist/sura/affiliations/index.d.ts +1 -0
- package/dist/sura/affiliations/models.d.ts +71 -0
- package/dist/sura/affiliations/models.js +8 -0
- package/dist/sura/appointments/client.d.ts +27 -327
- package/dist/sura/appointments/client.js +15 -21
- package/dist/sura/appointments/index.d.ts +2 -1
- package/dist/sura/appointments/models.d.ts +310 -0
- package/dist/sura/appointments/models.js +22 -0
- package/dist/sura/authorizations/client.d.ts +3 -43
- package/dist/sura/authorizations/client.js +6 -6
- package/dist/sura/authorizations/index.d.ts +1 -0
- package/dist/sura/authorizations/models.d.ts +79 -0
- package/dist/sura/authorizations/models.js +8 -0
- package/dist/sura/availability/client.d.ts +4 -68
- package/dist/sura/availability/client.js +9 -9
- package/dist/sura/availability/index.d.ts +2 -1
- package/dist/sura/availability/models.d.ts +103 -0
- package/dist/sura/availability/models.js +8 -0
- package/dist/sura/bookingOptions/client.d.ts +35 -0
- package/dist/sura/bookingOptions/client.js +19 -0
- package/dist/sura/bookingOptions/index.d.ts +5 -0
- package/dist/sura/bookingOptions/index.js +4 -0
- package/dist/sura/bookingOptions/models.d.ts +143 -0
- package/dist/sura/bookingOptions/models.js +8 -0
- package/dist/sura/client.d.ts +2 -0
- package/dist/sura/client.js +5 -0
- package/dist/sura/connections/client.d.ts +20 -98
- package/dist/sura/connections/client.js +10 -10
- package/dist/sura/connections/index.d.ts +1 -1
- package/dist/sura/connections/models.d.ts +102 -1
- package/dist/sura/connections/models.js +6 -0
- package/dist/sura/copays/client.d.ts +4 -40
- package/dist/sura/copays/client.js +9 -9
- package/dist/sura/copays/index.d.ts +2 -1
- package/dist/sura/copays/models.d.ts +75 -0
- package/dist/sura/copays/models.js +8 -0
- package/dist/sura/index.d.ts +1 -1
- package/dist/sura/models.d.ts +204 -148
- package/dist/sura/models.js +20 -1
- package/dist/sura/operations/client.d.ts +2 -7
- package/dist/sura/operations/client.js +4 -4
- package/dist/sura/operations/index.d.ts +1 -0
- package/dist/sura/operations/models.d.ts +43 -0
- package/dist/sura/operations/models.js +8 -0
- package/dist/sura/patients/client.d.ts +3 -40
- package/dist/sura/patients/client.js +6 -6
- package/dist/sura/patients/index.d.ts +1 -0
- package/dist/sura/patients/models.d.ts +76 -0
- package/dist/sura/patients/models.js +8 -0
- package/dist/sura/professionals/client.d.ts +7 -9
- package/dist/sura/professionals/client.js +3 -4
- package/dist/sura/professionals/index.d.ts +1 -1
- package/dist/sura/professionals/models.d.ts +40 -1
- package/dist/sura/services/client.d.ts +7 -8
- package/dist/sura/services/client.js +3 -4
- package/dist/sura/services/index.d.ts +1 -0
- package/dist/sura/services/models.d.ts +40 -0
- package/dist/sura/services/models.js +3 -0
- package/dist/visoft/index.d.ts +1 -1
- package/dist/visoft/models.d.ts +1 -16
- package/package.json +3 -3
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { OutcomeUnknownFailure, ResponseMetadata } from "../../models.js";
|
|
2
|
+
import { type SuraAffiliation, type SuraConnectionNotConfiguredFailure, type SuraNoContract, type SuraPendingResult, type SuraPortalCredentialsRejectedFailure, type SuraPortalSessionConflictFailure, type SuraPortalUnavailableFailure, type SuraRefusal } from "../models.js";
|
|
3
|
+
/**
|
|
4
|
+
* A failed answer.
|
|
5
|
+
*/
|
|
6
|
+
export interface SuraLookupEligibilityBadGatewayError {
|
|
7
|
+
data: null;
|
|
8
|
+
error: SuraLookupEligibilityBadGatewayFailure;
|
|
9
|
+
/**
|
|
10
|
+
* What every answer carries besides its data or error.
|
|
11
|
+
*/
|
|
12
|
+
metadata: ResponseMetadata;
|
|
13
|
+
success: false;
|
|
14
|
+
}
|
|
15
|
+
export type SuraLookupEligibilityBadGatewayFailure = OutcomeUnknownFailure | SuraPortalCredentialsRejectedFailure | SuraPortalUnavailableFailure;
|
|
16
|
+
export interface SuraLookupEligibilityBody {
|
|
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
|
+
* Exact document number.
|
|
37
|
+
*/
|
|
38
|
+
documentNumber: string;
|
|
39
|
+
/**
|
|
40
|
+
* Document type. Defaults to CC.
|
|
41
|
+
*/
|
|
42
|
+
documentType?: "CC" | null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A failed answer.
|
|
46
|
+
*/
|
|
47
|
+
export interface SuraLookupEligibilityConflictError {
|
|
48
|
+
data: null;
|
|
49
|
+
error: SuraLookupEligibilityConflictFailure;
|
|
50
|
+
/**
|
|
51
|
+
* What every answer carries besides its data or error.
|
|
52
|
+
*/
|
|
53
|
+
metadata: ResponseMetadata;
|
|
54
|
+
success: false;
|
|
55
|
+
}
|
|
56
|
+
export type SuraLookupEligibilityConflictFailure = SuraPortalSessionConflictFailure | SuraConnectionNotConfiguredFailure;
|
|
57
|
+
export type SuraLookupEligibilityResult = SuraPendingResult | SuraRefusal | SuraAffiliation | SuraNoContract;
|
|
58
|
+
/**
|
|
59
|
+
* A successful answer.
|
|
60
|
+
*/
|
|
61
|
+
export interface SuraLookupEligibilityResultResponse {
|
|
62
|
+
data: SuraLookupEligibilityResult;
|
|
63
|
+
error: null;
|
|
64
|
+
/**
|
|
65
|
+
* What every answer carries besides its data or error.
|
|
66
|
+
*/
|
|
67
|
+
metadata: ResponseMetadata;
|
|
68
|
+
success: true;
|
|
69
|
+
}
|
|
70
|
+
export declare const SuraLookupEligibilityResultCodec: import("../../_/codec.js").Codec;
|
|
71
|
+
export declare const SuraLookupEligibilityResultResponseCodec: import("../../_/codec.js").Codec;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { object, union } from "../../_/index.js";
|
|
4
|
+
import { SuraAffiliationCodec, SuraNoContractCodec, SuraPendingResultCodec, SuraRefusalCodec, } from "../models.js";
|
|
5
|
+
export const SuraLookupEligibilityResultCodec = union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraAffiliationCodec, () => SuraNoContractCodec]);
|
|
6
|
+
export const SuraLookupEligibilityResultResponseCodec = object([
|
|
7
|
+
["data", null, () => SuraLookupEligibilityResultCodec],
|
|
8
|
+
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type SuraBookAppointmentBody, type SuraBookAppointmentResultResponse, type SuraCancelAppointmentBody, type SuraCancelAppointmentResultResponse, type SuraListAppointmentsBody, type SuraListAppointmentsResultResponse } from "./models.js";
|
|
3
3
|
export interface ClientOptions extends BaseClientOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The URL the paths of the API are relative to.
|
|
@@ -10,21 +10,24 @@ export interface Client {
|
|
|
10
10
|
/**
|
|
11
11
|
* Cancel an appointment
|
|
12
12
|
*
|
|
13
|
-
* Cancel one appointment the patient already has, identified by its
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
13
|
+
* Cancel one appointment the patient already has, identified by its moment:
|
|
14
|
+
* startsAt, exactly as list_appointments answered it (or the former date and
|
|
15
|
+
* time). Confirm with the caller which appointment, in their own words,
|
|
16
|
+
* before calling. Only appointments at this clinic can be cancelled here.
|
|
17
|
+
* ok:true with cancelled:true means it is gone; anything else means it is
|
|
18
|
+
* not, so never tell the caller it was cancelled without that.
|
|
18
19
|
*/
|
|
19
20
|
cancel(request: CancelRequest, options?: RequestOptions): Promise<CancelResponse>;
|
|
20
21
|
/**
|
|
21
22
|
* Book an appointment
|
|
22
23
|
*
|
|
23
|
-
* Book one appointment at an exact
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
24
|
+
* Book one appointment at an exact moment for one patient: startsAt, exactly
|
|
25
|
+
* as an option or the ready booking arguments answered it (or the former date
|
|
26
|
+
* and time). Only call it after the caller has confirmed the day, the hour
|
|
27
|
+
* and the service out loud. The moment must be one that find_availability
|
|
28
|
+
* just returned; the tool re-checks it against the live agenda and refuses if
|
|
29
|
+
* it was taken in the meantime. ok:true with booked:true means the
|
|
30
|
+
* appointment exists.
|
|
28
31
|
*/
|
|
29
32
|
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
30
33
|
/**
|
|
@@ -36,323 +39,20 @@ export interface Client {
|
|
|
36
39
|
* pageInfo.nextCursor to read the rest before telling the caller what they
|
|
37
40
|
* have. Use it before cancelling, and whenever the caller asks what they
|
|
38
41
|
* have. Read out only the date, the hour and the service; to cancel one, pass
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
42
|
+
* its startsAt to cancel_appointment. Entries with cancellable:false belong
|
|
43
|
+
* to a different clinic and cannot be cancelled from this line — read them
|
|
44
|
+
* out, but send the caller to that clinic to change them. An empty page means
|
|
45
|
+
* the patient has nothing pending (offer to book: ask which service and use
|
|
46
|
+
* find_availability); a document the portal does not know answers found:false
|
|
47
|
+
* instead, never an empty page.
|
|
45
48
|
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Prepare an appointment
|
|
49
|
-
*
|
|
50
|
-
* Prepare a SURA appointment in ONE read-only call. With patient identity and
|
|
51
|
-
* the ordered service, first checks existing appointments; if one matches,
|
|
52
|
-
* returns it and stops. Otherwise resolves patient, live service/area and
|
|
53
|
-
* professional names internally and reads availability, checking bounded date
|
|
54
|
-
* and professional alternatives while preserving explicit doctor/date/expiry
|
|
55
|
-
* constraints. Returns patient.primaryIps, actual service/professional, times
|
|
56
|
-
* and ready booking arguments. Use after the required document review,
|
|
57
|
-
* instead of chaining list_appointments, lookup_patient, list_services and
|
|
58
|
-
* find_availability. It NEVER books, cancels, changes an appointment or
|
|
59
|
-
* verifies the documents for you. Apply clinic eligibility to the result,
|
|
60
|
-
* offer up to three chronological verified options from options; nextDates
|
|
61
|
-
* are calendar hints that require an hour lookup, never confirmed slots. Use
|
|
62
|
-
* fromDate for later alternatives and preserve explicit date, doctor and time
|
|
63
|
-
* preferences. Propose an actual slot and obtain one confirmation before the
|
|
64
|
-
* separate book_appointment call. Existing-appointment-only questions still
|
|
65
|
-
* use list_appointments.
|
|
66
|
-
*/
|
|
67
|
-
prepare(request: PrepareRequest, options?: RequestOptions): Promise<PrepareResponse>;
|
|
49
|
+
lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
|
|
68
50
|
}
|
|
69
51
|
export declare function createClient(options: ClientOptions): Client;
|
|
70
52
|
export declare function bind(transport: Transport): Client;
|
|
71
|
-
export
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*/
|
|
78
|
-
agentMode?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* The channel the caller is waiting on, which sets how long it waits before
|
|
81
|
-
* an answer comes back pending, and puts a phone call's reads ahead of
|
|
82
|
-
* others. Defaults to web.
|
|
83
|
-
*/
|
|
84
|
-
channel?: "voice" | "whatsapp" | "web";
|
|
85
|
-
/**
|
|
86
|
-
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
87
|
-
* while the organization has one; required when it has several.
|
|
88
|
-
*/
|
|
89
|
-
connectionId?: string;
|
|
90
|
-
/**
|
|
91
|
-
* The appointment's day as YYYY-MM-DD, exactly as list_appointments returned
|
|
92
|
-
* it.
|
|
93
|
-
*/
|
|
94
|
-
date: string;
|
|
95
|
-
/**
|
|
96
|
-
* Complete document number of the patient receiving care, from readable
|
|
97
|
-
* original evidence or their message. Normalize separators without changing
|
|
98
|
-
* digits. Request correction only for missing, illegible or conflicting
|
|
99
|
-
* identity; never guess digits.
|
|
100
|
-
*/
|
|
101
|
-
documentNumber: string;
|
|
102
|
-
/**
|
|
103
|
-
* Patient document type read legibly from the original or explicitly
|
|
104
|
-
* supplied. Ask only if unknown or genuinely conflicting; never infer it from
|
|
105
|
-
* age or number length.
|
|
106
|
-
*/
|
|
107
|
-
documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
|
|
108
|
-
/**
|
|
109
|
-
* Why it is being cancelled. Defaults to patient_request. Use reschedule when
|
|
110
|
-
* the caller wants a different time and you are about to book another one.
|
|
111
|
-
*/
|
|
112
|
-
reason?: "patient_request" | "reschedule" | "provider_request" | null;
|
|
113
|
-
/**
|
|
114
|
-
* Only needed when the patient has more than one appointment at that exact
|
|
115
|
-
* date and time, which the tool will tell you.
|
|
116
|
-
*/
|
|
117
|
-
serviceId?: string | null;
|
|
118
|
-
/**
|
|
119
|
-
* The appointment's hour as HH:MM, exactly as list_appointments returned it.
|
|
120
|
-
*/
|
|
121
|
-
time: string;
|
|
122
|
-
}
|
|
123
|
-
export interface CancelResponse {
|
|
124
|
-
data: SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraCancelledAppointment;
|
|
125
|
-
error: null;
|
|
126
|
-
metadata: SuraResponseMetadata;
|
|
127
|
-
success: true;
|
|
128
|
-
}
|
|
129
|
-
export interface CreateRequest {
|
|
130
|
-
/**
|
|
131
|
-
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
132
|
-
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
133
|
-
* This changes presentation only, never authorization, consent or
|
|
134
|
-
* idempotency.
|
|
135
|
-
*/
|
|
136
|
-
agentMode?: boolean;
|
|
137
|
-
/**
|
|
138
|
-
* The areaId list_services returned beside that service. Pass it with an
|
|
139
|
-
* exact serviceId to skip a catalog lookup; omit it whenever you are naming
|
|
140
|
-
* the service in words.
|
|
141
|
-
*/
|
|
142
|
-
areaId?: string | null;
|
|
143
|
-
/**
|
|
144
|
-
* The channel the caller is waiting on, which sets how long it waits before
|
|
145
|
-
* an answer comes back pending, and puts a phone call's reads ahead of
|
|
146
|
-
* others. Defaults to web.
|
|
147
|
-
*/
|
|
148
|
-
channel?: "voice" | "whatsapp" | "web";
|
|
149
|
-
/**
|
|
150
|
-
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
151
|
-
* while the organization has one; required when it has several.
|
|
152
|
-
*/
|
|
153
|
-
connectionId?: string;
|
|
154
|
-
/**
|
|
155
|
-
* The day the caller agreed to, as YYYY-MM-DD, exactly as find_availability
|
|
156
|
-
* returned it.
|
|
157
|
-
*/
|
|
158
|
-
date: string;
|
|
159
|
-
/**
|
|
160
|
-
* Complete document number of the patient receiving care, from readable
|
|
161
|
-
* original evidence or their message. Normalize separators without changing
|
|
162
|
-
* digits. Request correction only for missing, illegible or conflicting
|
|
163
|
-
* identity; never guess digits.
|
|
164
|
-
*/
|
|
165
|
-
documentNumber: string;
|
|
166
|
-
/**
|
|
167
|
-
* Patient document type read legibly from the original or explicitly
|
|
168
|
-
* supplied. Ask only if unknown or genuinely conflicting; never infer it from
|
|
169
|
-
* age or number length.
|
|
170
|
-
*/
|
|
171
|
-
documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
|
|
172
|
-
/**
|
|
173
|
-
* Stable 32-character lowercase hexadecimal command key supplied by a trusted
|
|
174
|
-
* coordinator. Reuse it only for the same accepted offer.
|
|
175
|
-
*/
|
|
176
|
-
idempotencyKey?: string | null;
|
|
177
|
-
/**
|
|
178
|
-
* Doctor's name when the caller chose one. Pass the same value used in
|
|
179
|
-
* find_availability, so the hour booked is that doctor's.
|
|
180
|
-
*/
|
|
181
|
-
professional?: string | null;
|
|
182
|
-
/**
|
|
183
|
-
* What the appointment is for: either an id from list_services or the
|
|
184
|
-
* service's own name, in the caller's words ("neurología", "control"). A name
|
|
185
|
-
* that matches more than one service is answered with the choices, so you can
|
|
186
|
-
* ask which one instead of guessing.
|
|
187
|
-
*/
|
|
188
|
-
serviceId: string;
|
|
189
|
-
/**
|
|
190
|
-
* The hour the caller agreed to, as HH:MM on a 24-hour clock, exactly as it
|
|
191
|
-
* appeared in find_availability's times[].
|
|
192
|
-
*/
|
|
193
|
-
time: string;
|
|
194
|
-
}
|
|
195
|
-
export interface CreateResponse {
|
|
196
|
-
data: SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraBookedAppointment;
|
|
197
|
-
error: null;
|
|
198
|
-
metadata: SuraResponseMetadata;
|
|
199
|
-
success: true;
|
|
200
|
-
}
|
|
201
|
-
export interface ListRequest {
|
|
202
|
-
/**
|
|
203
|
-
* Complete document number of the patient receiving care, from readable
|
|
204
|
-
* original evidence or their message. Normalize separators without changing
|
|
205
|
-
* digits. Request correction only for missing, illegible or conflicting
|
|
206
|
-
* identity; never guess digits.
|
|
207
|
-
*/
|
|
208
|
-
documentNumber: string;
|
|
209
|
-
/**
|
|
210
|
-
* Patient document type read legibly from the original or explicitly
|
|
211
|
-
* supplied. Ask only if unknown or genuinely conflicting; never infer it from
|
|
212
|
-
* age or number length.
|
|
213
|
-
*/
|
|
214
|
-
documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
|
|
215
|
-
/**
|
|
216
|
-
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
217
|
-
*/
|
|
218
|
-
cursor?: string;
|
|
219
|
-
/**
|
|
220
|
-
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
221
|
-
*/
|
|
222
|
-
direction?: "forward" | "backward";
|
|
223
|
-
/**
|
|
224
|
-
* Maximum items returned in one page. Defaults to 25; larger reads require
|
|
225
|
-
* another cursor.
|
|
226
|
-
*/
|
|
227
|
-
limit?: number;
|
|
228
|
-
/**
|
|
229
|
-
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
230
|
-
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
231
|
-
* This changes presentation only, never authorization, consent or
|
|
232
|
-
* idempotency.
|
|
233
|
-
*/
|
|
234
|
-
agentMode?: boolean;
|
|
235
|
-
/**
|
|
236
|
-
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
237
|
-
* while the organization has one; required when it has several.
|
|
238
|
-
*/
|
|
239
|
-
connectionId?: string;
|
|
240
|
-
/**
|
|
241
|
-
* The channel the caller is waiting on, which sets how long it waits before
|
|
242
|
-
* an answer comes back pending, and puts a phone call's reads ahead of
|
|
243
|
-
* others. Defaults to web.
|
|
244
|
-
*/
|
|
245
|
-
channel?: "voice" | "whatsapp" | "web";
|
|
246
|
-
}
|
|
247
|
-
export interface ListResponse {
|
|
248
|
-
data: SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraAppointmentPage;
|
|
249
|
-
error: null;
|
|
250
|
-
metadata: SuraResponseMetadata;
|
|
251
|
-
success: true;
|
|
252
|
-
}
|
|
253
|
-
export interface PrepareRequest {
|
|
254
|
-
/**
|
|
255
|
-
* The areaId list_services returned beside that service. Pass it with an
|
|
256
|
-
* exact serviceId to skip a catalog lookup; omit it whenever you are naming
|
|
257
|
-
* the service in words.
|
|
258
|
-
*/
|
|
259
|
-
areaId?: string | null;
|
|
260
|
-
/**
|
|
261
|
-
* A day the person asked for, as YYYY-MM-DD. Its openings come first; when it
|
|
262
|
-
* has none, the openings nearest to it on either side are offered instead and
|
|
263
|
-
* requestedDateAvailable is false. Omit it for the soonest openings. Resolve
|
|
264
|
-
* relative dates like "mañana" against the clinic's own timezone before
|
|
265
|
-
* calling.
|
|
266
|
-
*/
|
|
267
|
-
date?: string | null;
|
|
268
|
-
/**
|
|
269
|
-
* Complete document number of the patient receiving care, from readable
|
|
270
|
-
* original evidence or their message. Normalize separators without changing
|
|
271
|
-
* digits. Request correction only for missing, illegible or conflicting
|
|
272
|
-
* identity; never guess digits.
|
|
273
|
-
*/
|
|
274
|
-
documentNumber: string;
|
|
275
|
-
/**
|
|
276
|
-
* Patient document type read legibly from the original or explicitly
|
|
277
|
-
* supplied. Ask only if unknown or genuinely conflicting; never infer it from
|
|
278
|
-
* age or number length.
|
|
279
|
-
*/
|
|
280
|
-
documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
|
|
281
|
-
/**
|
|
282
|
-
* Whether other doctors of this service may be offered when the named doctor
|
|
283
|
-
* has no opening in the searched window. Defaults to true: the named doctor's
|
|
284
|
-
* openings come first, and only when that doctor has none are the other
|
|
285
|
-
* doctors' nearest openings returned, with requestedProfessionalAvailable
|
|
286
|
-
* false. Name the actual doctor of each option and obtain consent before
|
|
287
|
-
* booking. False keeps the named doctor as a strict filter.
|
|
288
|
-
*/
|
|
289
|
-
allowOtherProfessionals?: "true" | "false" | null;
|
|
290
|
-
/**
|
|
291
|
-
* Search from this day onward (YYYY-MM-DD), using the live calendar. Omit for
|
|
292
|
-
* today. Use date for a specific day.
|
|
293
|
-
*/
|
|
294
|
-
fromDate?: string | null;
|
|
295
|
-
/**
|
|
296
|
-
* Earliest acceptable time, HH:mm, inclusive.
|
|
297
|
-
*/
|
|
298
|
-
timeFrom?: string | null;
|
|
299
|
-
/**
|
|
300
|
-
* Latest acceptable time, HH:mm, inclusive.
|
|
301
|
-
*/
|
|
302
|
-
timeUntil?: string | null;
|
|
303
|
-
/**
|
|
304
|
-
* Number of chronological verified slots to return, defaults to 3. Proposals
|
|
305
|
-
* never hold capacity.
|
|
306
|
-
*/
|
|
307
|
-
limit?: "1" | "2" | "3" | null;
|
|
308
|
-
/**
|
|
309
|
-
* Explicit authorization expiry or latest date the person accepts,
|
|
310
|
-
* YYYY-MM-DD. Returned slots cannot exceed this date.
|
|
311
|
-
*/
|
|
312
|
-
latestDate?: string | null;
|
|
313
|
-
/**
|
|
314
|
-
* Defaults to schedule: stop if a matching appointment exists. Use reschedule
|
|
315
|
-
* only when the person explicitly requests another date; returns alternatives
|
|
316
|
-
* without changing the existing appointment.
|
|
317
|
-
*/
|
|
318
|
-
mode?: "schedule" | "reschedule" | null;
|
|
319
|
-
/**
|
|
320
|
-
* Doctor's name, or part of it, when the caller asked for someone specific.
|
|
321
|
-
* Use list_professionals to check the service's registered doctors
|
|
322
|
-
* independently of available slots; absence from an open-agenda selector does
|
|
323
|
-
* not mean the doctor does not exist. Omit it to see whoever has room
|
|
324
|
-
* soonest.
|
|
325
|
-
*/
|
|
326
|
-
professional?: string | null;
|
|
327
|
-
/**
|
|
328
|
-
* Exact service in the order or a previously returned service ID. Names are
|
|
329
|
-
* resolved internally against the live catalog; do not call list_services
|
|
330
|
-
* first or invent IDs. Preserve consultation/control and pediatric
|
|
331
|
-
* qualifiers.
|
|
332
|
-
*/
|
|
333
|
-
serviceId: string;
|
|
334
|
-
/**
|
|
335
|
-
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
336
|
-
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
337
|
-
* This changes presentation only, never authorization, consent or
|
|
338
|
-
* idempotency.
|
|
339
|
-
*/
|
|
340
|
-
agentMode?: boolean;
|
|
341
|
-
/**
|
|
342
|
-
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
343
|
-
* while the organization has one; required when it has several.
|
|
344
|
-
*/
|
|
345
|
-
connectionId?: string;
|
|
346
|
-
/**
|
|
347
|
-
* The channel the caller is waiting on, which sets how long it waits before
|
|
348
|
-
* an answer comes back pending, and puts a phone call's reads ahead of
|
|
349
|
-
* others. Defaults to web.
|
|
350
|
-
*/
|
|
351
|
-
channel?: "voice" | "whatsapp" | "web";
|
|
352
|
-
}
|
|
353
|
-
export interface PrepareResponse {
|
|
354
|
-
data: SuraPendingResult | SuraRefusal | SuraPreparationPatientNotFound | SuraPatientNotFound | SuraPreparationExistingAppointment | SuraPreparationAvailable | SuraPreparationNoSlots;
|
|
355
|
-
error: null;
|
|
356
|
-
metadata: SuraResponseMetadata;
|
|
357
|
-
success: true;
|
|
358
|
-
}
|
|
53
|
+
export type CancelRequest = SuraCancelAppointmentBody;
|
|
54
|
+
export type CancelResponse = SuraCancelAppointmentResultResponse;
|
|
55
|
+
export type CreateRequest = SuraBookAppointmentBody;
|
|
56
|
+
export type CreateResponse = SuraBookAppointmentResultResponse;
|
|
57
|
+
export type LookupRequest = SuraListAppointmentsBody;
|
|
58
|
+
export type LookupResponse = SuraListAppointmentsResultResponse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { Transport,
|
|
4
|
-
import {
|
|
3
|
+
import { Transport, } from "../../_/index.js";
|
|
4
|
+
import { SuraBookAppointmentBodyCodec, SuraBookAppointmentResultResponseCodec, SuraCancelAppointmentBodyCodec, SuraCancelAppointmentResultResponseCodec, SuraListAppointmentsResultResponseCodec, } from "./models.js";
|
|
5
5
|
export function createClient(options) {
|
|
6
6
|
return bind(new Transport(options));
|
|
7
7
|
}
|
|
@@ -9,35 +9,29 @@ export function bind(transport) {
|
|
|
9
9
|
return {
|
|
10
10
|
cancel: (request, options) => transport.send(CancelOperation, request, options),
|
|
11
11
|
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
12
|
-
|
|
13
|
-
prepare: (request, options) => transport.send(PrepareOperation, request, options),
|
|
12
|
+
lookup: (request, options) => transport.send(LookupOperation, request, options),
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
15
|
const CancelOperation = {
|
|
17
16
|
method: "POST",
|
|
18
17
|
route: "/v1/sura/appointments/cancel",
|
|
19
18
|
body: "flat",
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
request: SuraCancelAppointmentBodyCodec,
|
|
20
|
+
response: SuraCancelAppointmentResultResponseCodec,
|
|
21
|
+
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 },
|
|
22
22
|
};
|
|
23
23
|
const CreateOperation = {
|
|
24
24
|
method: "POST",
|
|
25
25
|
route: "/v1/sura/appointments",
|
|
26
26
|
body: "flat",
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
request: SuraBookAppointmentBodyCodec,
|
|
28
|
+
response: SuraBookAppointmentResultResponseCodec,
|
|
29
|
+
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 },
|
|
29
30
|
};
|
|
30
|
-
const
|
|
31
|
-
method: "
|
|
32
|
-
route: "/v1/sura/appointments",
|
|
33
|
-
|
|
34
|
-
response:
|
|
35
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "
|
|
36
|
-
};
|
|
37
|
-
const PrepareOperation = {
|
|
38
|
-
method: "GET",
|
|
39
|
-
route: "/v1/sura/appointments/prepare",
|
|
40
|
-
query: { areaId: "areaId", date: "date", documentNumber: "documentNumber", documentType: "documentType", allowOtherProfessionals: "allowOtherProfessionals", fromDate: "fromDate", timeFrom: "timeFrom", timeUntil: "timeUntil", limit: "limit", latestDate: "latestDate", mode: "mode", professional: "professional", serviceId: "serviceId", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
41
|
-
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPreparationPatientNotFoundCodec, () => SuraPatientNotFoundCodec, () => SuraPreparationExistingAppointmentCodec, () => SuraPreparationAvailableCodec, () => SuraPreparationNoSlotsCodec])]]),
|
|
42
|
-
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 },
|
|
31
|
+
const LookupOperation = {
|
|
32
|
+
method: "POST",
|
|
33
|
+
route: "/v1/sura/appointments/lookup",
|
|
34
|
+
body: "flat",
|
|
35
|
+
response: SuraListAppointmentsResultResponseCodec,
|
|
36
|
+
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 },
|
|
43
37
|
};
|
|
@@ -1,4 +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, CancelRequest, CancelResponse, CreateRequest, CreateResponse,
|
|
4
|
+
export type { Client, ClientOptions, CancelRequest, CancelResponse, CreateRequest, CreateResponse, LookupRequest, LookupResponse, } from "./client.js";
|
|
5
|
+
export type { SuraBookAppointmentBadGatewayError, SuraBookAppointmentBadGatewayFailure, SuraBookAppointmentBody, SuraBookAppointmentConflictError, SuraBookAppointmentConflictFailure, SuraBookAppointmentResult, SuraBookAppointmentResultResponse, SuraCancelAppointmentBadGatewayError, SuraCancelAppointmentBadGatewayFailure, SuraCancelAppointmentBody, SuraCancelAppointmentConflictError, SuraCancelAppointmentConflictFailure, SuraCancelAppointmentResult, SuraCancelAppointmentResultResponse, SuraListAppointmentsBadGatewayError, SuraListAppointmentsBadGatewayFailure, SuraListAppointmentsBody, SuraListAppointmentsConflictError, SuraListAppointmentsConflictFailure, SuraListAppointmentsResult, SuraListAppointmentsResultResponse, } from "./models.js";
|