@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.
Files changed (250) hide show
  1. package/README.md +15 -3
  2. package/dist/agenda/appointments/client.d.ts +165 -52
  3. package/dist/agenda/appointments/client.js +19 -11
  4. package/dist/agenda/appointments/index.d.ts +1 -1
  5. package/dist/agenda/availability/client.d.ts +11 -72
  6. package/dist/agenda/availability/client.js +5 -14
  7. package/dist/agenda/availability/index.d.ts +1 -1
  8. package/dist/agenda/bookingLocations/client.d.ts +51 -0
  9. package/dist/agenda/bookingLocations/client.js +19 -0
  10. package/dist/agenda/bookingLocations/index.d.ts +4 -0
  11. package/dist/agenda/bookingLocations/index.js +4 -0
  12. package/dist/agenda/bookingOfferings/client.d.ts +82 -0
  13. package/dist/agenda/bookingOfferings/client.js +18 -0
  14. package/dist/agenda/bookingOfferings/index.d.ts +5 -0
  15. package/dist/agenda/bookingOfferings/index.js +4 -0
  16. package/dist/agenda/bookingOfferings/models.d.ts +92 -0
  17. package/dist/agenda/bookingOfferings/models.js +3 -0
  18. package/dist/agenda/bookingRequirements/client.d.ts +118 -0
  19. package/dist/agenda/bookingRequirements/client.js +18 -0
  20. package/dist/agenda/bookingRequirements/index.d.ts +4 -0
  21. package/dist/agenda/bookingRequirements/index.js +4 -0
  22. package/dist/agenda/bookingSlots/client.d.ts +78 -0
  23. package/dist/agenda/bookingSlots/client.js +19 -0
  24. package/dist/agenda/bookingSlots/index.d.ts +4 -0
  25. package/dist/agenda/bookingSlots/index.js +4 -0
  26. package/dist/agenda/bookings/client.d.ts +44 -375
  27. package/dist/agenda/bookings/client.js +10 -52
  28. package/dist/agenda/bookings/index.d.ts +2 -2
  29. package/dist/agenda/bookings/models.d.ts +0 -92
  30. package/dist/agenda/client.d.ts +14 -0
  31. package/dist/agenda/client.js +35 -0
  32. package/dist/agenda/firstAvailability/client.d.ts +74 -0
  33. package/dist/agenda/firstAvailability/client.js +19 -0
  34. package/dist/agenda/firstAvailability/index.d.ts +5 -0
  35. package/dist/agenda/firstAvailability/index.js +4 -0
  36. package/dist/agenda/firstAvailability/models.d.ts +31 -0
  37. package/dist/agenda/firstAvailability/models.js +7 -0
  38. package/dist/agenda/index.d.ts +1 -1
  39. package/dist/agenda/models.d.ts +19 -94
  40. package/dist/agenda/models.js +0 -3
  41. package/dist/agenda/nearestBookingSlots/client.d.ts +93 -0
  42. package/dist/agenda/nearestBookingSlots/client.js +19 -0
  43. package/dist/agenda/nearestBookingSlots/index.d.ts +5 -0
  44. package/dist/agenda/nearestBookingSlots/index.js +4 -0
  45. package/dist/agenda/nearestBookingSlots/models.d.ts +38 -0
  46. package/dist/agenda/nearestBookingSlots/models.js +7 -0
  47. package/dist/agenda/offerings/client.d.ts +2 -2
  48. package/dist/agenda/offerings/client.js +1 -1
  49. package/dist/agenda/resourceSchedules/client.d.ts +75 -0
  50. package/dist/agenda/resourceSchedules/client.js +19 -0
  51. package/dist/agenda/resourceSchedules/index.d.ts +4 -0
  52. package/dist/agenda/resourceSchedules/index.js +4 -0
  53. package/dist/agenda/resources/client.d.ts +2 -2
  54. package/dist/agenda/resources/client.js +1 -1
  55. package/dist/agenda/scheduleRules/client.d.ts +125 -85
  56. package/dist/agenda/scheduleRules/client.js +17 -16
  57. package/dist/agenda/scheduleRules/index.d.ts +2 -1
  58. package/dist/agenda/scheduleRules/models.d.ts +33 -0
  59. package/dist/agenda/scheduleRules/models.js +6 -0
  60. package/dist/agenda/services/client.d.ts +2 -2
  61. package/dist/agenda/services/client.js +1 -1
  62. package/dist/agenda/waitlist/client.d.ts +40 -29
  63. package/dist/agenda/waitlist/client.js +4 -4
  64. package/dist/agenda/waitlist/index.d.ts +1 -1
  65. package/dist/agenda/waitlist/models.d.ts +17 -0
  66. package/dist/agenda/waitlist/models.js +4 -1
  67. package/dist/axxa/authorizations/client.d.ts +3 -35
  68. package/dist/axxa/authorizations/client.js +1 -1
  69. package/dist/axxa/authorizations/index.d.ts +1 -0
  70. package/dist/axxa/authorizations/models.d.ts +112 -0
  71. package/dist/axxa/authorizations/models.js +3 -0
  72. package/dist/axxa/connections/client.d.ts +19 -45
  73. package/dist/axxa/connections/client.js +10 -11
  74. package/dist/axxa/connections/index.d.ts +1 -0
  75. package/dist/axxa/connections/models.d.ts +269 -0
  76. package/dist/axxa/connections/models.js +3 -0
  77. package/dist/axxa/eligibility/client.d.ts +3 -25
  78. package/dist/axxa/eligibility/client.js +1 -1
  79. package/dist/axxa/eligibility/index.d.ts +1 -0
  80. package/dist/axxa/eligibility/models.d.ts +102 -0
  81. package/dist/axxa/eligibility/models.js +3 -0
  82. package/dist/axxa/index.d.ts +1 -1
  83. package/dist/axxa/models.d.ts +243 -168
  84. package/dist/axxa/provider/client.d.ts +5 -11
  85. package/dist/axxa/provider/client.js +1 -1
  86. package/dist/axxa/provider/index.d.ts +1 -0
  87. package/dist/axxa/provider/models.d.ts +87 -0
  88. package/dist/axxa/provider/models.js +3 -0
  89. package/dist/client.d.ts +2 -0
  90. package/dist/client.js +5 -0
  91. package/dist/gmedic/agendaServices/client.d.ts +13 -9
  92. package/dist/gmedic/agendaServices/client.js +2 -2
  93. package/dist/gmedic/agendaServices/index.d.ts +1 -1
  94. package/dist/gmedic/agendaServices/models.d.ts +53 -1
  95. package/dist/gmedic/agendas/client.d.ts +16 -9
  96. package/dist/gmedic/agendas/client.js +2 -2
  97. package/dist/gmedic/agendas/index.d.ts +1 -1
  98. package/dist/gmedic/agendas/models.d.ts +53 -1
  99. package/dist/gmedic/appointments/client.d.ts +34 -241
  100. package/dist/gmedic/appointments/client.js +12 -10
  101. package/dist/gmedic/appointments/index.d.ts +1 -1
  102. package/dist/gmedic/appointments/models.d.ts +518 -1
  103. package/dist/gmedic/appointments/models.js +28 -2
  104. package/dist/gmedic/availability/client.d.ts +24 -10
  105. package/dist/gmedic/availability/client.js +4 -3
  106. package/dist/gmedic/availability/index.d.ts +1 -1
  107. package/dist/gmedic/availability/models.d.ts +57 -1
  108. package/dist/gmedic/availability/models.js +7 -1
  109. package/dist/gmedic/availableDays/client.d.ts +11 -8
  110. package/dist/gmedic/availableDays/client.js +1 -1
  111. package/dist/gmedic/availableDays/index.d.ts +1 -1
  112. package/dist/gmedic/availableDays/models.d.ts +53 -1
  113. package/dist/gmedic/branchOffices/client.d.ts +13 -9
  114. package/dist/gmedic/branchOffices/client.js +2 -2
  115. package/dist/gmedic/branchOffices/index.d.ts +1 -1
  116. package/dist/gmedic/branchOffices/models.d.ts +58 -1
  117. package/dist/gmedic/connections/client.d.ts +19 -42
  118. package/dist/gmedic/connections/client.js +10 -11
  119. package/dist/gmedic/connections/index.d.ts +1 -0
  120. package/dist/gmedic/connections/models.d.ts +162 -0
  121. package/dist/gmedic/connections/models.js +3 -0
  122. package/dist/gmedic/dictionaryEntries/client.d.ts +20 -10
  123. package/dist/gmedic/dictionaryEntries/client.js +2 -2
  124. package/dist/gmedic/dictionaryEntries/index.d.ts +1 -1
  125. package/dist/gmedic/dictionaryEntries/models.d.ts +53 -1
  126. package/dist/gmedic/healthPartners/client.d.ts +19 -9
  127. package/dist/gmedic/healthPartners/client.js +2 -2
  128. package/dist/gmedic/healthPartners/index.d.ts +1 -1
  129. package/dist/gmedic/healthPartners/models.d.ts +53 -1
  130. package/dist/gmedic/healthPromotionEntities/client.d.ts +20 -10
  131. package/dist/gmedic/healthPromotionEntities/client.js +2 -2
  132. package/dist/gmedic/healthPromotionEntities/index.d.ts +1 -1
  133. package/dist/gmedic/healthPromotionEntities/models.d.ts +53 -1
  134. package/dist/gmedic/index.d.ts +1 -1
  135. package/dist/gmedic/laboralRiskManagers/client.d.ts +20 -10
  136. package/dist/gmedic/laboralRiskManagers/client.js +2 -2
  137. package/dist/gmedic/laboralRiskManagers/index.d.ts +1 -1
  138. package/dist/gmedic/laboralRiskManagers/models.d.ts +53 -1
  139. package/dist/gmedic/models.d.ts +194 -133
  140. package/dist/gmedic/occupations/client.d.ts +19 -9
  141. package/dist/gmedic/occupations/client.js +2 -2
  142. package/dist/gmedic/occupations/index.d.ts +1 -1
  143. package/dist/gmedic/occupations/models.d.ts +53 -1
  144. package/dist/gmedic/patientNotes/client.d.ts +25 -55
  145. package/dist/gmedic/patientNotes/client.js +5 -5
  146. package/dist/gmedic/patientNotes/index.d.ts +1 -1
  147. package/dist/gmedic/patientNotes/models.d.ts +232 -1
  148. package/dist/gmedic/patients/client.d.ts +40 -359
  149. package/dist/gmedic/patients/client.js +13 -5
  150. package/dist/gmedic/patients/index.d.ts +2 -2
  151. package/dist/gmedic/patients/models.d.ts +795 -1
  152. package/dist/gmedic/services/client.d.ts +22 -16
  153. package/dist/gmedic/services/client.js +2 -2
  154. package/dist/gmedic/services/index.d.ts +1 -1
  155. package/dist/gmedic/services/models.d.ts +53 -3
  156. package/dist/gmedic/sessionPackages/client.d.ts +21 -58
  157. package/dist/gmedic/sessionPackages/client.js +5 -5
  158. package/dist/gmedic/sessionPackages/index.d.ts +1 -1
  159. package/dist/gmedic/sessionPackages/models.d.ts +183 -1
  160. package/dist/index.d.ts +1 -1
  161. package/dist/models.d.ts +61 -0
  162. package/dist/models.js +6 -0
  163. package/dist/nuevaEps/affiliations/client.js +1 -1
  164. package/dist/nuevaEps/affiliations/models.d.ts +3 -1
  165. package/dist/nuevaEps/connections/client.d.ts +9 -9
  166. package/dist/nuevaEps/connections/client.js +9 -9
  167. package/dist/nuevaEps/connections/index.d.ts +1 -1
  168. package/dist/nuevaEps/connections/models.d.ts +1 -47
  169. package/dist/nuevaEps/connections/models.js +1 -8
  170. package/dist/saludTotal/client.d.ts +15 -0
  171. package/dist/saludTotal/client.js +20 -0
  172. package/dist/saludTotal/connections/client.d.ts +53 -0
  173. package/dist/saludTotal/connections/client.js +33 -0
  174. package/dist/saludTotal/connections/index.d.ts +5 -0
  175. package/dist/saludTotal/connections/index.js +4 -0
  176. package/dist/saludTotal/connections/models.d.ts +62 -0
  177. package/dist/saludTotal/connections/models.js +9 -0
  178. package/dist/saludTotal/index.d.ts +5 -0
  179. package/dist/saludTotal/index.js +4 -0
  180. package/dist/saludTotal/models.d.ts +37 -0
  181. package/dist/saludTotal/models.js +3 -0
  182. package/dist/saludTotal/portals/client.d.ts +35 -0
  183. package/dist/saludTotal/portals/client.js +18 -0
  184. package/dist/saludTotal/portals/index.d.ts +5 -0
  185. package/dist/saludTotal/portals/index.js +4 -0
  186. package/dist/saludTotal/portals/models.d.ts +30 -0
  187. package/dist/saludTotal/portals/models.js +3 -0
  188. package/dist/sura/affiliations/client.d.ts +3 -35
  189. package/dist/sura/affiliations/client.js +6 -6
  190. package/dist/sura/affiliations/index.d.ts +1 -0
  191. package/dist/sura/affiliations/models.d.ts +71 -0
  192. package/dist/sura/affiliations/models.js +8 -0
  193. package/dist/sura/appointments/client.d.ts +27 -327
  194. package/dist/sura/appointments/client.js +15 -21
  195. package/dist/sura/appointments/index.d.ts +2 -1
  196. package/dist/sura/appointments/models.d.ts +310 -0
  197. package/dist/sura/appointments/models.js +22 -0
  198. package/dist/sura/authorizations/client.d.ts +3 -43
  199. package/dist/sura/authorizations/client.js +6 -6
  200. package/dist/sura/authorizations/index.d.ts +1 -0
  201. package/dist/sura/authorizations/models.d.ts +79 -0
  202. package/dist/sura/authorizations/models.js +8 -0
  203. package/dist/sura/availability/client.d.ts +4 -68
  204. package/dist/sura/availability/client.js +9 -9
  205. package/dist/sura/availability/index.d.ts +2 -1
  206. package/dist/sura/availability/models.d.ts +103 -0
  207. package/dist/sura/availability/models.js +8 -0
  208. package/dist/sura/bookingOptions/client.d.ts +35 -0
  209. package/dist/sura/bookingOptions/client.js +19 -0
  210. package/dist/sura/bookingOptions/index.d.ts +5 -0
  211. package/dist/sura/bookingOptions/index.js +4 -0
  212. package/dist/sura/bookingOptions/models.d.ts +143 -0
  213. package/dist/sura/bookingOptions/models.js +8 -0
  214. package/dist/sura/client.d.ts +2 -0
  215. package/dist/sura/client.js +5 -0
  216. package/dist/sura/connections/client.d.ts +20 -98
  217. package/dist/sura/connections/client.js +10 -10
  218. package/dist/sura/connections/index.d.ts +1 -1
  219. package/dist/sura/connections/models.d.ts +102 -1
  220. package/dist/sura/connections/models.js +6 -0
  221. package/dist/sura/copays/client.d.ts +4 -40
  222. package/dist/sura/copays/client.js +9 -9
  223. package/dist/sura/copays/index.d.ts +2 -1
  224. package/dist/sura/copays/models.d.ts +75 -0
  225. package/dist/sura/copays/models.js +8 -0
  226. package/dist/sura/index.d.ts +1 -1
  227. package/dist/sura/models.d.ts +204 -148
  228. package/dist/sura/models.js +20 -1
  229. package/dist/sura/operations/client.d.ts +2 -7
  230. package/dist/sura/operations/client.js +4 -4
  231. package/dist/sura/operations/index.d.ts +1 -0
  232. package/dist/sura/operations/models.d.ts +43 -0
  233. package/dist/sura/operations/models.js +8 -0
  234. package/dist/sura/patients/client.d.ts +3 -40
  235. package/dist/sura/patients/client.js +6 -6
  236. package/dist/sura/patients/index.d.ts +1 -0
  237. package/dist/sura/patients/models.d.ts +76 -0
  238. package/dist/sura/patients/models.js +8 -0
  239. package/dist/sura/professionals/client.d.ts +7 -9
  240. package/dist/sura/professionals/client.js +3 -4
  241. package/dist/sura/professionals/index.d.ts +1 -1
  242. package/dist/sura/professionals/models.d.ts +40 -1
  243. package/dist/sura/services/client.d.ts +7 -8
  244. package/dist/sura/services/client.js +3 -4
  245. package/dist/sura/services/index.d.ts +1 -0
  246. package/dist/sura/services/models.d.ts +40 -0
  247. package/dist/sura/services/models.js +3 -0
  248. package/dist/visoft/index.d.ts +1 -1
  249. package/dist/visoft/models.d.ts +1 -16
  250. package/package.json +3 -3
@@ -1,4 +1,3 @@
1
- import type { PageInfo } from "../../models.js";
2
1
  import { type AgendaAppointmentIntake, type AgendaAppointmentStatusChange, type AgendaPatientIdentity } from "../models.js";
3
2
  export interface AgendaAppointmentGuidance {
4
3
  /**
@@ -29,97 +28,6 @@ export interface AgendaAppointmentGuidance {
29
28
  */
30
29
  serviceName: string | null;
31
30
  }
32
- export interface AgendaBookableOffering {
33
- /**
34
- * Bounded agenda projection for this offering; truncatedAgendas indicates
35
- * that more agendas exist.
36
- */
37
- agendas: {
38
- id: string;
39
- kind: "practitioner" | "assistant" | "room" | "chair" | "equipment" | "location" | "team" | "generic";
40
- locationId: string | null;
41
- name: string;
42
- }[];
43
- /**
44
- * Booked appointment duration in minutes for this offering.
45
- */
46
- durationMinutes: number;
47
- /**
48
- * Bookable offering identifier used when requesting signed availability
49
- * slots.
50
- */
51
- id: string;
52
- /**
53
- * Sites applicable to the offering’s agendas, including addresses for patient
54
- * arrival.
55
- */
56
- locations: {
57
- address: string | null;
58
- city: string | null;
59
- id: string;
60
- name: string;
61
- timezone: string;
62
- }[];
63
- /**
64
- * Offering display name combining the service and its bookable agenda
65
- * configuration.
66
- */
67
- name: string;
68
- /**
69
- * Patient occupation in minutes when it differs from the appointment
70
- * duration; null means no separate duration.
71
- */
72
- occupationMinutes: number | null;
73
- /**
74
- * Human-readable service hours and closures. Availability remains
75
- * authoritative.
76
- */
77
- scheduleSummary: string;
78
- /**
79
- * IANA timezones of the agendas in this bounded projection; hours are
80
- * interpreted locally.
81
- */
82
- scheduleTimezones: string[];
83
- /**
84
- * Current service policy and patient instructions; this projection does not
85
- * establish payer coverage.
86
- */
87
- service: {
88
- arrivalOrder: boolean;
89
- bookingChecklist: string[];
90
- description: string | null;
91
- eligibility: {
92
- maxAgeYears?: number | null;
93
- minAgeYears?: number | null;
94
- } | null;
95
- id: string;
96
- name: string;
97
- patientInstructions: string | null;
98
- };
99
- /**
100
- * Service identifier associated with this offering.
101
- */
102
- serviceId: string;
103
- /**
104
- * Whether the bounded agenda projection omits additional agendas for this
105
- * offering.
106
- */
107
- truncatedAgendas: boolean;
108
- }
109
- export interface AgendaBookableOfferingPage {
110
- /**
111
- * Items admitted by this resource contract within the verified organization.
112
- */
113
- data: AgendaBookableOffering[];
114
- /**
115
- * Discriminator for a resource list response.
116
- */
117
- object: "list";
118
- /**
119
- * Opaque navigation cursors for this page’s stable keyset order.
120
- */
121
- pageInfo: PageInfo;
122
- }
123
31
  export interface AgendaBooking {
124
32
  /**
125
33
  * Booking source recorded on the appointment; null when no channel was
@@ -1,9 +1,16 @@
1
1
  import { type BaseClientOptions, Transport } from "../_/index.js";
2
2
  import { type Client as AppointmentsClient } from "./appointments/client.js";
3
3
  import { type Client as AvailabilityClient } from "./availability/client.js";
4
+ import { type Client as BookingLocationsClient } from "./bookingLocations/client.js";
5
+ import { type Client as BookingOfferingsClient } from "./bookingOfferings/client.js";
6
+ import { type Client as BookingRequirementsClient } from "./bookingRequirements/client.js";
7
+ import { type Client as BookingSlotsClient } from "./bookingSlots/client.js";
4
8
  import { type Client as BookingsClient } from "./bookings/client.js";
9
+ import { type Client as FirstAvailabilityClient } from "./firstAvailability/client.js";
5
10
  import { type Client as LocationsClient } from "./locations/client.js";
11
+ import { type Client as NearestBookingSlotsClient } from "./nearestBookingSlots/client.js";
6
12
  import { type Client as OfferingsClient } from "./offerings/client.js";
13
+ import { type Client as ResourceSchedulesClient } from "./resourceSchedules/client.js";
7
14
  import { type Client as ResourcesClient } from "./resources/client.js";
8
15
  import { type Client as ScheduleRulesClient } from "./scheduleRules/client.js";
9
16
  import { type Client as ServicesClient } from "./services/client.js";
@@ -17,9 +24,16 @@ export interface ClientOptions extends BaseClientOptions {
17
24
  export interface Client {
18
25
  readonly appointments: AppointmentsClient;
19
26
  readonly availability: AvailabilityClient;
27
+ readonly bookingLocations: BookingLocationsClient;
28
+ readonly bookingOfferings: BookingOfferingsClient;
29
+ readonly bookingRequirements: BookingRequirementsClient;
30
+ readonly bookingSlots: BookingSlotsClient;
20
31
  readonly bookings: BookingsClient;
32
+ readonly firstAvailability: FirstAvailabilityClient;
21
33
  readonly locations: LocationsClient;
34
+ readonly nearestBookingSlots: NearestBookingSlotsClient;
22
35
  readonly offerings: OfferingsClient;
36
+ readonly resourceSchedules: ResourceSchedulesClient;
23
37
  readonly resources: ResourcesClient;
24
38
  readonly scheduleRules: ScheduleRulesClient;
25
39
  readonly services: ServicesClient;
@@ -3,9 +3,16 @@
3
3
  import { Transport } from "../_/index.js";
4
4
  import { bind as bindAppointments, } from "./appointments/client.js";
5
5
  import { bind as bindAvailability, } from "./availability/client.js";
6
+ import { bind as bindBookingLocations, } from "./bookingLocations/client.js";
7
+ import { bind as bindBookingOfferings, } from "./bookingOfferings/client.js";
8
+ import { bind as bindBookingRequirements, } from "./bookingRequirements/client.js";
9
+ import { bind as bindBookingSlots, } from "./bookingSlots/client.js";
6
10
  import { bind as bindBookings, } from "./bookings/client.js";
11
+ import { bind as bindFirstAvailability, } from "./firstAvailability/client.js";
7
12
  import { bind as bindLocations, } from "./locations/client.js";
13
+ import { bind as bindNearestBookingSlots, } from "./nearestBookingSlots/client.js";
8
14
  import { bind as bindOfferings, } from "./offerings/client.js";
15
+ import { bind as bindResourceSchedules, } from "./resourceSchedules/client.js";
9
16
  import { bind as bindResources, } from "./resources/client.js";
10
17
  import { bind as bindScheduleRules, } from "./scheduleRules/client.js";
11
18
  import { bind as bindServices, } from "./services/client.js";
@@ -16,9 +23,16 @@ export function createClient(options) {
16
23
  export function bind(transport) {
17
24
  let appointmentsClient;
18
25
  let availabilityClient;
26
+ let bookingLocationsClient;
27
+ let bookingOfferingsClient;
28
+ let bookingRequirementsClient;
29
+ let bookingSlotsClient;
19
30
  let bookingsClient;
31
+ let firstAvailabilityClient;
20
32
  let locationsClient;
33
+ let nearestBookingSlotsClient;
21
34
  let offeringsClient;
35
+ let resourceSchedulesClient;
22
36
  let resourcesClient;
23
37
  let scheduleRulesClient;
24
38
  let servicesClient;
@@ -30,15 +44,36 @@ export function bind(transport) {
30
44
  get availability() {
31
45
  return (availabilityClient ??= bindAvailability(transport));
32
46
  },
47
+ get bookingLocations() {
48
+ return (bookingLocationsClient ??= bindBookingLocations(transport));
49
+ },
50
+ get bookingOfferings() {
51
+ return (bookingOfferingsClient ??= bindBookingOfferings(transport));
52
+ },
53
+ get bookingRequirements() {
54
+ return (bookingRequirementsClient ??= bindBookingRequirements(transport));
55
+ },
56
+ get bookingSlots() {
57
+ return (bookingSlotsClient ??= bindBookingSlots(transport));
58
+ },
33
59
  get bookings() {
34
60
  return (bookingsClient ??= bindBookings(transport));
35
61
  },
62
+ get firstAvailability() {
63
+ return (firstAvailabilityClient ??= bindFirstAvailability(transport));
64
+ },
36
65
  get locations() {
37
66
  return (locationsClient ??= bindLocations(transport));
38
67
  },
68
+ get nearestBookingSlots() {
69
+ return (nearestBookingSlotsClient ??= bindNearestBookingSlots(transport));
70
+ },
39
71
  get offerings() {
40
72
  return (offeringsClient ??= bindOfferings(transport));
41
73
  },
74
+ get resourceSchedules() {
75
+ return (resourceSchedulesClient ??= bindResourceSchedules(transport));
76
+ },
42
77
  get resources() {
43
78
  return (resourcesClient ??= bindResources(transport));
44
79
  },
@@ -0,0 +1,74 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { AgendaResponseMetadata } from "../models.js";
3
+ import { type AgendaFirstAvailability } from "./models.js";
4
+ export interface ClientOptions extends BaseClientOptions {
5
+ /**
6
+ * The URL the paths of the API are relative to.
7
+ */
8
+ baseUrl: string;
9
+ }
10
+ export interface Client {
11
+ /**
12
+ * Get First Available
13
+ *
14
+ * Find the earliest bookable slots for a service across eligible agendas,
15
+ * with a bounded search horizon and continuation.
16
+ */
17
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
18
+ }
19
+ export declare function createClient(options: ClientOptions): Client;
20
+ export declare function bind(transport: Transport): Client;
21
+ export interface GetRequest {
22
+ /**
23
+ * Service identifier within the authenticated organization.
24
+ */
25
+ serviceId: string;
26
+ /**
27
+ * Maximum number of days to search; omission uses the service booking
28
+ * horizon.
29
+ */
30
+ days?: string;
31
+ /**
32
+ * Requested visible appointment duration in minutes; admitted only when the
33
+ * organization permits the override.
34
+ */
35
+ durationMinutes?: string;
36
+ /**
37
+ * Earliest instant to examine; omission starts the availability search at the
38
+ * current time.
39
+ */
40
+ from?: Temporal.Instant;
41
+ /**
42
+ * A study length in minutes among those its agendas offer; only agendas
43
+ * offering it are searched, at that length.
44
+ */
45
+ occupationMinutes?: string;
46
+ /**
47
+ * Group first availability globally by time or return a separate
48
+ * earliest-slot set for each offering.
49
+ */
50
+ group?: "time" | "offering";
51
+ /**
52
+ * Maximum returned slots overall or per offering according to group; defaults
53
+ * to 20 and cannot exceed 50.
54
+ */
55
+ limit?: number;
56
+ /**
57
+ * Limit appointments to agendas associated with the selected site.
58
+ */
59
+ locationId?: string;
60
+ /**
61
+ * Agenda identifier within the authenticated organization.
62
+ */
63
+ resourceId?: string;
64
+ /**
65
+ * IANA timezone used to interpret local dates and agenda working hours.
66
+ */
67
+ timezone: string;
68
+ }
69
+ export interface GetResponse {
70
+ data: AgendaFirstAvailability;
71
+ error: null;
72
+ metadata: AgendaResponseMetadata;
73
+ success: true;
74
+ }
@@ -0,0 +1,19 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, object, } from "../../_/index.js";
4
+ import { AgendaFirstAvailabilityCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ get: (request, options) => transport.send(GetOperation, request, options),
11
+ };
12
+ }
13
+ const GetOperation = {
14
+ method: "GET",
15
+ route: "/v1/agenda/first-availability/{serviceId}",
16
+ query: { days: "days", durationMinutes: "durationMinutes", from: "from", occupationMinutes: "occupationMinutes", group: "group", limit: "limit", locationId: "locationId", resourceId: "resourceId", timezone: "timezone" },
17
+ response: object([["data", null, () => AgendaFirstAvailabilityCodec]]),
18
+ errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, GetRequest, GetResponse, } from "./client.js";
5
+ export type { AgendaFirstAvailability } from "./models.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../../_/index.js";
4
+ export { createClient } from "./client.js";
@@ -0,0 +1,31 @@
1
+ import { type AgendaSlot } from "../models.js";
2
+ export interface AgendaFirstAvailability {
3
+ /**
4
+ * Earliest signed slots in global time order or grouped by offering,
5
+ * according to the requested grouping.
6
+ */
7
+ data: AgendaSlot[];
8
+ /**
9
+ * Instant when this response was assembled; not a validity guarantee for
10
+ * returned capacity.
11
+ */
12
+ generatedAt: string;
13
+ /**
14
+ * Continue first-availability search from this instant; null when the
15
+ * returned search has no continuation.
16
+ */
17
+ nextFrom: string | null;
18
+ /**
19
+ * Stable discriminator identifying the shape of this scheduling response.
20
+ */
21
+ object: "list";
22
+ /**
23
+ * End instant of the availability window actually examined by this request.
24
+ */
25
+ searchedUntil: string;
26
+ /**
27
+ * True when the bounded search left eligible offerings or agendas unexamined.
28
+ */
29
+ truncatedOfferings: boolean;
30
+ }
31
+ export declare const AgendaFirstAvailabilityCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,7 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { array, object } from "../../_/index.js";
4
+ import { AgendaSlotCodec } from "../models.js";
5
+ export const AgendaFirstAvailabilityCodec = object([
6
+ ["data", null, array(() => AgendaSlotCodec)],
7
+ ]);
@@ -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 { AgendaAppointment, AgendaAppointmentIntake, AgendaAppointmentIntakeInput, AgendaAppointmentStatusChange, AgendaFailureResponse, AgendaFirstAvailability, AgendaLocation, AgendaLocationPage, AgendaPatientIdentity, AgendaPatientIdentityInput, AgendaResponseMetadata, AgendaSlot, AgendaSlotPage, } from "./models.js";
5
+ export type { AgendaAppointment, AgendaAppointmentIntake, AgendaAppointmentIntakeInput, AgendaAppointmentStatusChange, AgendaFailureResponse, AgendaLocation, AgendaLocationPage, AgendaPatientIdentity, AgendaResponseMetadata, AgendaSlot, AgendaSlotPage, } from "./models.js";
@@ -447,13 +447,6 @@ export interface AgendaFailureResponse {
447
447
  };
448
448
  message: "Provide a positive time window within the supported range.";
449
449
  retryable: false;
450
- } | {
451
- code: "LAST_ADMIN";
452
- data: {
453
- [key: string]: unknown;
454
- };
455
- message: "Keep at least one organization administrator.";
456
- retryable: false;
457
450
  } | {
458
451
  code: "UPGRADE_REQUIRED";
459
452
  data: {
@@ -482,34 +475,6 @@ export interface AgendaFailureResponse {
482
475
  };
483
476
  message: "This request origin is not allowed.";
484
477
  retryable: false;
485
- } | {
486
- code: "ROLE_MISSING";
487
- data: {
488
- [key: string]: unknown;
489
- };
490
- message: "Configure the required organization role before inviting a member.";
491
- retryable: false;
492
- } | {
493
- code: "SELF_DEMOTION";
494
- data: {
495
- [key: string]: unknown;
496
- };
497
- message: "Ask another administrator to change your administrator role.";
498
- retryable: false;
499
- } | {
500
- code: "TEAM_MEMBER_EXISTS";
501
- data: {
502
- [key: string]: unknown;
503
- };
504
- message: "This person is already a team member.";
505
- retryable: false;
506
- } | {
507
- code: "TEAM_NOT_CONFIGURED";
508
- data: {
509
- [key: string]: unknown;
510
- };
511
- message: "Team management is not configured for this organization.";
512
- retryable: false;
513
478
  } | {
514
479
  code: "UNEXPECTED_QUERY_PARAMETERS";
515
480
  data: {
@@ -636,6 +601,13 @@ export interface AgendaFailureResponse {
636
601
  };
637
602
  message: "No active agenda can take this appointment.";
638
603
  retryable: false;
604
+ } | {
605
+ code: "STUDY_OVERBOOKING_NOT_ALLOWED";
606
+ data: {
607
+ [key: string]: unknown;
608
+ };
609
+ message: "This study has an explicit capacity limit and requires an available ordinary slot.";
610
+ retryable: false;
639
611
  } | {
640
612
  code: "INVALID_SLOT_TOKEN";
641
613
  data: {
@@ -713,6 +685,13 @@ export interface AgendaFailureResponse {
713
685
  };
714
686
  message: "The resource changed after it was loaded.";
715
687
  retryable: false;
688
+ } | {
689
+ code: "SCHEDULE_RULE_AGENDA_MISMATCH";
690
+ data: {
691
+ [key: string]: unknown;
692
+ };
693
+ message: "The schedule rule belongs to another agenda.";
694
+ retryable: false;
716
695
  } | {
717
696
  code: "SCHEDULE_RULE_EXPECTED_VERSION_REQUIRED";
718
697
  data: {
@@ -860,53 +839,10 @@ export interface AgendaFailureResponse {
860
839
  };
861
840
  message: "The integration service rejected this request. Review its configuration.";
862
841
  retryable: false;
863
- } | {
864
- code: "IDENTITY_UNAVAILABLE";
865
- data: {
866
- [key: string]: unknown;
867
- };
868
- message: "The identity provider is temporarily unavailable. Retry later.";
869
- retryable: true;
870
- } | {
871
- code: "IDENTITY_REJECTED";
872
- data: {
873
- [key: string]: unknown;
874
- };
875
- message: "The identity provider rejected this team change. Refresh the team before retrying.";
876
- retryable: false;
877
842
  });
878
843
  metadata: AgendaResponseMetadata;
879
844
  success: false;
880
845
  }
881
- export interface AgendaFirstAvailability {
882
- /**
883
- * Earliest signed slots in global time order or grouped by offering,
884
- * according to the requested grouping.
885
- */
886
- data: AgendaSlot[];
887
- /**
888
- * Instant when this response was assembled; not a validity guarantee for
889
- * returned capacity.
890
- */
891
- generatedAt: string;
892
- /**
893
- * Continue first-availability search from this instant; null when the
894
- * returned search has no continuation.
895
- */
896
- nextFrom: string | null;
897
- /**
898
- * Stable discriminator identifying the shape of this scheduling response.
899
- */
900
- object: "list";
901
- /**
902
- * End instant of the availability window actually examined by this request.
903
- */
904
- searchedUntil: string;
905
- /**
906
- * True when the bounded search left eligible offerings or agendas unexamined.
907
- */
908
- truncatedOfferings: boolean;
909
- }
910
846
  export interface AgendaLocation {
911
847
  /**
912
848
  * Street address displayed with this clinic site; null when not configured.
@@ -972,31 +908,21 @@ export interface AgendaLocationPage {
972
908
  }
973
909
  export interface AgendaPatientIdentity {
974
910
  /**
975
- * Normalized patient document number; null when no document is recorded.
976
- * Identity combines its type and number.
911
+ * Deprecated: use `documentNumber`. Answered until 2027-01-28.
912
+ *
913
+ * @deprecated
977
914
  */
978
915
  document: string | null;
979
- /**
980
- * Organization-configured document type code. A number without a supplied
981
- * type uses the configured first type; no number means no stored type.
982
- */
983
- documentType: string | null;
984
- /**
985
- * Patient display name with surrounding whitespace removed.
986
- */
987
- name: string;
988
- }
989
- export interface AgendaPatientIdentityInput {
990
916
  /**
991
917
  * Normalized patient document number; null when no document is recorded.
992
918
  * Identity combines its type and number.
993
919
  */
994
- document: string | null;
920
+ documentNumber: string | null;
995
921
  /**
996
922
  * Organization-configured document type code. A number without a supplied
997
923
  * type uses the configured first type; no number means no stored type.
998
924
  */
999
- documentType?: string | null;
925
+ documentType: string | null;
1000
926
  /**
1001
927
  * Patient display name with surrounding whitespace removed.
1002
928
  */
@@ -1059,7 +985,6 @@ export interface AgendaSlotPage {
1059
985
  }
1060
986
  export declare const AgendaAppointmentCodec: import("../_/codec.js").Codec;
1061
987
  export declare const AgendaAppointmentStatusChangeCodec: import("../_/codec.js").Codec;
1062
- export declare const AgendaFirstAvailabilityCodec: import("../_/codec.js").Codec;
1063
988
  export declare const AgendaLocationCodec: import("../_/codec.js").Codec;
1064
989
  export declare const AgendaLocationPageCodec: import("../_/codec.js").Codec;
1065
990
  export declare const AgendaSlotCodec: import("../_/codec.js").Codec;
@@ -11,9 +11,6 @@ export const AgendaAppointmentCodec = object([
11
11
  export const AgendaAppointmentStatusChangeCodec = object([
12
12
  ["at", null, instant],
13
13
  ]);
14
- export const AgendaFirstAvailabilityCodec = object([
15
- ["data", null, array(() => AgendaSlotCodec)],
16
- ]);
17
14
  export const AgendaLocationCodec = object([
18
15
  ["updatedAt", null, instant],
19
16
  ]);
@@ -0,0 +1,93 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { AgendaResponseMetadata } from "../models.js";
3
+ import { type AgendaNearestSlotPage } from "./models.js";
4
+ export interface ClientOptions extends BaseClientOptions {
5
+ /**
6
+ * The URL the paths of the API are relative to.
7
+ */
8
+ baseUrl: string;
9
+ }
10
+ export interface Client {
11
+ /**
12
+ * Find the first available times for a service
13
+ *
14
+ * Find the truly nearest bookable times for one service, in ONE call, across
15
+ * every professional, room or equipment that offers it (up to 50 agendas).
16
+ * Leave days out: the search then reaches as far as the service can be booked
17
+ * (its booking horizon, up to a year) and stops at the first `limit` slots,
18
+ * so an opening months away is found at once. Do not page week by week. An
19
+ * empty data list means there is no opening within that reach (searchedUntil
20
+ * says how far it looked); offer the waitlist instead. Pass days only to look
21
+ * at a shorter stretch. group 'time' (default) returns the earliest slots
22
+ * overall, a page at a time: pageInfo.nextCursor reads the slots after these,
23
+ * and pageInfo.previousCursor with direction backward the ones before; group
24
+ * 'offering' returns each agenda's first slots as one page. Use limit 1–3 to
25
+ * quote the nearest time. Each slotToken books with create_appointment.
26
+ */
27
+ list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
28
+ }
29
+ export declare function createClient(options: ClientOptions): Client;
30
+ export declare function bind(transport: Transport): Client;
31
+ export interface ListRequest {
32
+ /**
33
+ * Days to search; absent: as far as the service can be booked.
34
+ */
35
+ days?: number;
36
+ /**
37
+ * Start of the search; defaults to now.
38
+ */
39
+ from?: Temporal.Instant;
40
+ /**
41
+ * Group first availability globally by time or return a separate
42
+ * earliest-slot set for each offering.
43
+ */
44
+ group?: "time" | "offering";
45
+ /**
46
+ * Maximum returned slots overall or per offering according to group; defaults
47
+ * to 20 and cannot exceed 50.
48
+ */
49
+ limit?: number;
50
+ /**
51
+ * Only agendas at this site (and those not tied to any site).
52
+ */
53
+ locationId?: string;
54
+ /**
55
+ * Only agendas that can use this professional, room or equipment.
56
+ */
57
+ resourceId?: string;
58
+ /**
59
+ * Service identifier within the authenticated organization.
60
+ */
61
+ serviceId: string;
62
+ /**
63
+ * IANA timezone used to interpret local dates and agenda working hours.
64
+ */
65
+ timezone: string;
66
+ /**
67
+ * A slot's place in the nearest times' order, from pageInfo. Omit it for the
68
+ * first page, or with direction backward for the last page within the
69
+ * search's reach.
70
+ */
71
+ cursor?: string;
72
+ /**
73
+ * forward reads the slots after the cursor; backward reads the ones before
74
+ * it.
75
+ */
76
+ direction?: "forward" | "backward";
77
+ /**
78
+ * The conversation's channel, set by the platform. It changes nothing in
79
+ * Agenda; omit it.
80
+ */
81
+ channel?: "voice" | "whatsapp" | "web";
82
+ /**
83
+ * The platform's id for the organization's Agenda, set by the platform. An
84
+ * organization has one Agenda, so it selects nothing; omit it.
85
+ */
86
+ connectionId?: string;
87
+ }
88
+ export interface ListResponse {
89
+ data: AgendaNearestSlotPage;
90
+ error: null;
91
+ metadata: AgendaResponseMetadata;
92
+ success: true;
93
+ }
@@ -0,0 +1,19 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, object, } from "../../_/index.js";
4
+ import { AgendaNearestSlotPageCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ list: (request, options) => transport.send(ListOperation, request, options),
11
+ };
12
+ }
13
+ const ListOperation = {
14
+ method: "GET",
15
+ route: "/v1/agenda/nearest-booking-slots",
16
+ query: { days: "days", from: "from", group: "group", limit: "limit", locationId: "locationId", resourceId: "resourceId", serviceId: "serviceId", timezone: "timezone", cursor: "cursor", direction: "direction", channel: "channel", connectionId: "connectionId" },
17
+ response: object([["data", null, () => AgendaNearestSlotPageCodec]]),
18
+ errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
5
+ export type { AgendaNearestSlotPage } from "./models.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../../_/index.js";
4
+ export { createClient } from "./client.js";