@arbol-ai/sdk 5.37.0 → 5.38.1

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 (112) hide show
  1. package/dist/comfachoco/affiliations/client.d.ts +3 -1
  2. package/dist/comfachoco/affiliations/index.d.ts +1 -1
  3. package/dist/comfachoco/affiliations/models.d.ts +8 -1
  4. package/dist/oficlinic/affiliateTypes/client.d.ts +55 -0
  5. package/dist/oficlinic/affiliateTypes/client.js +18 -0
  6. package/dist/oficlinic/affiliateTypes/index.d.ts +5 -0
  7. package/dist/oficlinic/affiliateTypes/index.js +4 -0
  8. package/dist/oficlinic/affiliateTypes/models.d.ts +135 -0
  9. package/dist/oficlinic/affiliateTypes/models.js +3 -0
  10. package/dist/oficlinic/appointments/client.d.ts +69 -5
  11. package/dist/oficlinic/appointments/client.js +17 -0
  12. package/dist/oficlinic/appointments/index.d.ts +2 -2
  13. package/dist/oficlinic/appointments/models.d.ts +591 -5
  14. package/dist/oficlinic/appointments/models.js +13 -1
  15. package/dist/oficlinic/bookingDays/client.d.ts +64 -0
  16. package/dist/oficlinic/bookingDays/client.js +18 -0
  17. package/dist/oficlinic/bookingDays/index.d.ts +5 -0
  18. package/dist/oficlinic/bookingDays/index.js +4 -0
  19. package/dist/oficlinic/bookingDays/models.d.ts +142 -0
  20. package/dist/oficlinic/bookingDays/models.js +3 -0
  21. package/dist/oficlinic/bookingProfessionals/client.d.ts +76 -0
  22. package/dist/oficlinic/bookingProfessionals/client.js +19 -0
  23. package/dist/oficlinic/bookingProfessionals/index.d.ts +5 -0
  24. package/dist/oficlinic/bookingProfessionals/index.js +4 -0
  25. package/dist/oficlinic/bookingProfessionals/models.d.ts +159 -0
  26. package/dist/oficlinic/bookingProfessionals/models.js +12 -0
  27. package/dist/oficlinic/bookingRooms/client.d.ts +60 -0
  28. package/dist/oficlinic/bookingRooms/client.js +18 -0
  29. package/dist/oficlinic/bookingRooms/index.d.ts +5 -0
  30. package/dist/oficlinic/bookingRooms/index.js +4 -0
  31. package/dist/oficlinic/bookingRooms/models.d.ts +136 -0
  32. package/dist/oficlinic/bookingRooms/models.js +3 -0
  33. package/dist/oficlinic/bookingSlots/client.d.ts +63 -0
  34. package/dist/oficlinic/bookingSlots/client.js +19 -0
  35. package/dist/oficlinic/bookingSlots/index.d.ts +5 -0
  36. package/dist/oficlinic/bookingSlots/index.js +4 -0
  37. package/dist/oficlinic/bookingSlots/models.d.ts +167 -0
  38. package/dist/oficlinic/bookingSlots/models.js +13 -0
  39. package/dist/oficlinic/cancellationReasons/client.d.ts +49 -0
  40. package/dist/oficlinic/cancellationReasons/client.js +18 -0
  41. package/dist/oficlinic/cancellationReasons/index.d.ts +5 -0
  42. package/dist/oficlinic/cancellationReasons/index.js +4 -0
  43. package/dist/oficlinic/cancellationReasons/models.d.ts +114 -0
  44. package/dist/oficlinic/cancellationReasons/models.js +3 -0
  45. package/dist/oficlinic/client.d.ts +26 -0
  46. package/dist/oficlinic/client.js +65 -0
  47. package/dist/oficlinic/index.d.ts +1 -1
  48. package/dist/oficlinic/models.d.ts +154 -0
  49. package/dist/oficlinic/patients/client.d.ts +2 -1
  50. package/dist/oficlinic/patients/models.d.ts +8 -2
  51. package/dist/oficlinic/payerContracts/client.d.ts +55 -0
  52. package/dist/oficlinic/payerContracts/client.js +18 -0
  53. package/dist/oficlinic/payerContracts/index.d.ts +5 -0
  54. package/dist/oficlinic/payerContracts/index.js +4 -0
  55. package/dist/oficlinic/payerContracts/models.d.ts +154 -0
  56. package/dist/oficlinic/payerContracts/models.js +3 -0
  57. package/dist/oficlinic/payerPlans/client.d.ts +54 -0
  58. package/dist/oficlinic/payerPlans/client.js +18 -0
  59. package/dist/oficlinic/payerPlans/index.d.ts +5 -0
  60. package/dist/oficlinic/payerPlans/index.js +4 -0
  61. package/dist/oficlinic/payerPlans/models.d.ts +138 -0
  62. package/dist/oficlinic/payerPlans/models.js +3 -0
  63. package/dist/oficlinic/payerSubplans/client.d.ts +58 -0
  64. package/dist/oficlinic/payerSubplans/client.js +18 -0
  65. package/dist/oficlinic/payerSubplans/index.d.ts +5 -0
  66. package/dist/oficlinic/payerSubplans/index.js +4 -0
  67. package/dist/oficlinic/payerSubplans/models.d.ts +150 -0
  68. package/dist/oficlinic/payerSubplans/models.js +3 -0
  69. package/dist/oficlinic/payers/client.d.ts +10 -3
  70. package/dist/oficlinic/payers/client.js +1 -1
  71. package/dist/oficlinic/payers/index.d.ts +1 -1
  72. package/dist/oficlinic/payers/models.d.ts +14 -13
  73. package/dist/oficlinic/professionals/client.d.ts +12 -4
  74. package/dist/oficlinic/professionals/client.js +1 -1
  75. package/dist/oficlinic/professionals/index.d.ts +1 -1
  76. package/dist/oficlinic/professionals/models.d.ts +14 -13
  77. package/dist/oficlinic/programs/client.d.ts +54 -0
  78. package/dist/oficlinic/programs/client.js +18 -0
  79. package/dist/oficlinic/programs/index.d.ts +5 -0
  80. package/dist/oficlinic/programs/index.js +4 -0
  81. package/dist/oficlinic/programs/models.d.ts +133 -0
  82. package/dist/oficlinic/programs/models.js +3 -0
  83. package/dist/oficlinic/regimes/client.d.ts +50 -0
  84. package/dist/oficlinic/regimes/client.js +18 -0
  85. package/dist/oficlinic/regimes/index.d.ts +5 -0
  86. package/dist/oficlinic/regimes/index.js +4 -0
  87. package/dist/oficlinic/regimes/models.d.ts +117 -0
  88. package/dist/oficlinic/regimes/models.js +3 -0
  89. package/dist/oficlinic/relationships/client.d.ts +49 -0
  90. package/dist/oficlinic/relationships/client.js +18 -0
  91. package/dist/oficlinic/relationships/index.d.ts +5 -0
  92. package/dist/oficlinic/relationships/index.js +4 -0
  93. package/dist/oficlinic/relationships/models.d.ts +118 -0
  94. package/dist/oficlinic/relationships/models.js +3 -0
  95. package/dist/oficlinic/serviceCatalog/client.d.ts +50 -0
  96. package/dist/oficlinic/serviceCatalog/client.js +27 -0
  97. package/dist/oficlinic/serviceCatalog/index.d.ts +5 -0
  98. package/dist/oficlinic/serviceCatalog/index.js +4 -0
  99. package/dist/oficlinic/serviceCatalog/models.d.ts +126 -0
  100. package/dist/oficlinic/serviceCatalog/models.js +13 -0
  101. package/dist/oficlinic/services/client.d.ts +44 -3
  102. package/dist/oficlinic/services/client.js +10 -1
  103. package/dist/oficlinic/services/index.d.ts +2 -2
  104. package/dist/oficlinic/services/models.d.ts +311 -14
  105. package/dist/oficlinic/services/models.js +10 -1
  106. package/dist/sanitas/affiliations/models.d.ts +7 -2
  107. package/dist/sanitas/connections/client.d.ts +6 -1
  108. package/dist/sanitas/connections/client.js +1 -0
  109. package/dist/sanitas/connections/models.d.ts +7 -2
  110. package/dist/sanitas/index.d.ts +1 -1
  111. package/dist/sanitas/models.d.ts +22 -0
  112. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import type { CredentialsRejectedFailure, Empty, InvalidInputFailure, OutcomeUnknownFailure, PageInfo, ProviderProtocolChangedFailure, ProviderUnavailableFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import type { OficlinicConnectionBusyFailure, OficlinicConnectionNotActiveFailure, OficlinicConnectionNotFoundFailure, OficlinicConnectionRequiredFailure, OficlinicContextNotAvailableFailure, OficlinicInvalidCursorFailure, OficlinicLoginCoolingDownFailure, OficlinicPatientRecordMismatchFailure, OficlinicProviderIdentityMismatchFailure, OficlinicReauthenticationRequiredFailure, OficlinicSignInOutcomeUnknownFailure } from "../models.js";
2
+ import type { OficlinicAgentText, OficlinicBookingOptionNotFoundFailure, OficlinicConnectionBusyFailure, OficlinicConnectionNotActiveFailure, OficlinicConnectionNotFoundFailure, OficlinicConnectionRequiredFailure, OficlinicContextNotAvailableFailure, OficlinicInvalidCursorFailure, OficlinicLoginCoolingDownFailure, OficlinicPatientRecordMismatchFailure, OficlinicPayerNotFoundFailure, OficlinicPayerOptionNotFoundFailure, OficlinicProgramUnitsNotSupportedFailure, OficlinicProviderIdentityMismatchFailure, OficlinicReauthenticationRequiredFailure, OficlinicSelectionNotAvailableFailure, OficlinicSignInOutcomeUnknownFailure } from "../models.js";
3
3
  export interface OficlinicAppointment {
4
4
  assignedAt: string | null;
5
5
  cancellationReason: string | null;
@@ -13,10 +13,102 @@ export interface OficlinicAppointment {
13
13
  payer: string | null;
14
14
  procedure: string | null;
15
15
  professional: string | null;
16
+ /**
17
+ * The provider's CAS number of the appointment. For an assigned appointment,
18
+ * it is the appointmentId a reschedule takes.
19
+ */
16
20
  serviceNumber: string | null;
17
21
  status: string | null;
18
22
  timeLabel: string | null;
19
23
  }
24
+ export interface OficlinicAppointmentBooking {
25
+ acknowledgedAt: Temporal.Instant;
26
+ attentionTypeId: string;
27
+ contractId: string | null;
28
+ date: string | null;
29
+ idempotencyKey: string;
30
+ payer: {
31
+ id: string;
32
+ name: string;
33
+ };
34
+ planId: string;
35
+ professional: {
36
+ id: string;
37
+ name: string;
38
+ };
39
+ programId: string;
40
+ /**
41
+ * The appointment number the provider answered. Its relation to the CAS that
42
+ * appointment history shows is not verified.
43
+ */
44
+ providerReference: string;
45
+ room: {
46
+ id: string;
47
+ name: string;
48
+ };
49
+ service: {
50
+ code: string;
51
+ id: string;
52
+ name: string;
53
+ };
54
+ slotId: string;
55
+ slotLabel: string | null;
56
+ /**
57
+ * The provider answered a strictly positive appointment number, which its own
58
+ * booking screen treats as created.
59
+ */
60
+ status: "acknowledged";
61
+ subplanId: string;
62
+ /**
63
+ * The only evidence is the provider's acknowledgement, mapped from its
64
+ * source; no read has verified the appointment, and this booking path has no
65
+ * live receipt yet.
66
+ */
67
+ verification: "provider_acknowledgement";
68
+ }
69
+ /**
70
+ * The appointment is not among the patient's assigned appointments.
71
+ */
72
+ export interface OficlinicAppointmentNotFoundFailure {
73
+ /**
74
+ * The failure code, stable across releases.
75
+ */
76
+ code: "APPOINTMENT_NOT_FOUND";
77
+ /**
78
+ * No fields.
79
+ */
80
+ data: Empty;
81
+ /**
82
+ * What went wrong, for people; it never contains input values.
83
+ */
84
+ message: string;
85
+ /**
86
+ * Whether repeating the same request may succeed.
87
+ */
88
+ retryable: false;
89
+ }
90
+ /**
91
+ * The appointment's day has passed or is unknown, so it is not rescheduled
92
+ * here.
93
+ */
94
+ export interface OficlinicAppointmentNotReschedulableFailure {
95
+ /**
96
+ * The failure code, stable across releases.
97
+ */
98
+ code: "APPOINTMENT_NOT_RESCHEDULABLE";
99
+ /**
100
+ * No fields.
101
+ */
102
+ data: Empty;
103
+ /**
104
+ * What went wrong, for people; it never contains input values.
105
+ */
106
+ message: string;
107
+ /**
108
+ * Whether repeating the same request may succeed.
109
+ */
110
+ retryable: false;
111
+ }
20
112
  export interface OficlinicAppointmentPage {
21
113
  /**
22
114
  * Items admitted by this resource contract within the verified organization.
@@ -31,11 +123,164 @@ export interface OficlinicAppointmentPage {
31
123
  */
32
124
  pageInfo: PageInfo;
33
125
  }
126
+ export interface OficlinicAppointmentReschedule {
127
+ idempotencyKey: string;
128
+ newAppointment: OficlinicAppointmentBooking;
129
+ previousAppointment: {
130
+ cancellation: "confirmed" | "pending" | "unknown" | "not_cancellable";
131
+ id: string;
132
+ };
133
+ /**
134
+ * completed: the new booking and the original's cancellation were both
135
+ * acknowledged by the provider. partial: the new booking was acknowledged and
136
+ * the original's cancellation is pending, unknown or not possible; the
137
+ * patient may hold both appointments.
138
+ */
139
+ status: "completed" | "partial";
140
+ }
141
+ /**
142
+ * A failed answer.
143
+ */
144
+ export interface OficlinicCreateAppointmentBadGatewayError {
145
+ data: null;
146
+ error: OficlinicCreateAppointmentBadGatewayFailure;
147
+ /**
148
+ * What every answer carries besides its data or error.
149
+ */
150
+ metadata: ResponseMetadata;
151
+ success: false;
152
+ }
153
+ export type OficlinicCreateAppointmentBadGatewayFailure = OutcomeUnknownFailure | OficlinicSignInOutcomeUnknownFailure | ProviderProtocolChangedFailure | OficlinicPatientRecordMismatchFailure;
154
+ export interface OficlinicCreateAppointmentBody {
155
+ /**
156
+ * true answers { text }: concise Spanish facts for a messaging or voice
157
+ * agent, with the short ids and the cursor needed to continue. false, the
158
+ * default, answers the structured object.
159
+ */
160
+ agentMode?: boolean;
161
+ /**
162
+ * Billing values of the clinic's tariff matrix. Never guessed: the caller
163
+ * supplies them as the clinic's workflow defines them.
164
+ */
165
+ billing: {
166
+ billCopayments: string | null;
167
+ billPrivately: string | null;
168
+ copaymentPercentage: string | null;
169
+ courtOrder: string | null;
170
+ enteredCopayment: string | null;
171
+ exempt: string | null;
172
+ indicatedModeratorFee: string | null;
173
+ markExempt: boolean;
174
+ maxCopayment: string | null;
175
+ tariff: string;
176
+ };
177
+ /**
178
+ * Coverage and clinical classification codes, as the clinic's own provider
179
+ * catalogs define them. Never guessed: the caller supplies them.
180
+ */
181
+ classification: {
182
+ affiliateType: string;
183
+ attentionTypeId: string;
184
+ listStatus?: string | null;
185
+ programId: string;
186
+ purposeId: string;
187
+ regime: string;
188
+ relationship?: string | null;
189
+ salaryRange?: string | null;
190
+ };
191
+ /**
192
+ * Must be true: the patient or staff confirmed this exact booking. Without it
193
+ * nothing is written.
194
+ */
195
+ confirm: true;
196
+ /**
197
+ * An Account connection id of the caller's organization.
198
+ */
199
+ connectionId?: string;
200
+ /**
201
+ * A contract of the payer from list_payer_contracts, which must not be
202
+ * inactive; null (the default) sends none.
203
+ */
204
+ contractId?: string | null;
205
+ /**
206
+ * The document number, digits only.
207
+ */
208
+ documentNumber: string;
209
+ /**
210
+ * Colombian citizenship card. Other document types are not verified against
211
+ * the provider yet.
212
+ */
213
+ documentType: "CC";
214
+ /**
215
+ * The availability flow id every booking list item carries (flowId). It
216
+ * expires 30 minutes after the first list.
217
+ */
218
+ flowId: string;
219
+ /**
220
+ * A key the caller chooses once per intended write, such as a UUID. Repeating
221
+ * it with the same request answers the recorded outcome and never writes
222
+ * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
223
+ */
224
+ idempotencyKey: string;
225
+ /**
226
+ * Observations sent as pObservaciones, accents removed and uppercased; null
227
+ * (the default) sends none.
228
+ */
229
+ observations?: string | null;
230
+ /**
231
+ * The flow's payer, repeated as a check.
232
+ */
233
+ payerId: string;
234
+ /**
235
+ * A plan of the payer, from list_payer_plans.
236
+ */
237
+ planId: string;
238
+ referral: {
239
+ authorizationNumber?: string | null;
240
+ requestedByUser?: boolean;
241
+ requestingProfessionalId?: string | null;
242
+ };
243
+ /**
244
+ * A slot id from list_booking_slots in the same flow.
245
+ */
246
+ slotId: string;
247
+ /**
248
+ * A subplan of the plan, from list_payer_subplans.
249
+ */
250
+ subplanId: string;
251
+ }
252
+ /**
253
+ * A failed answer.
254
+ */
255
+ export interface OficlinicCreateAppointmentConflictError {
256
+ data: null;
257
+ error: OficlinicCreateAppointmentConflictFailure;
258
+ /**
259
+ * What every answer carries besides its data or error.
260
+ */
261
+ metadata: ResponseMetadata;
262
+ success: false;
263
+ }
264
+ export type OficlinicCreateAppointmentConflictFailure = OficlinicConnectionRequiredFailure | OficlinicConnectionNotActiveFailure | OficlinicConnectionBusyFailure | OficlinicReauthenticationRequiredFailure | OficlinicServiceNotAvailableFailure | OficlinicSelectionNotAvailableFailure | OficlinicIdempotencyKeyReusedFailure | OficlinicWriteTargetUnresolvedFailure;
265
+ /**
266
+ * A failed answer.
267
+ */
268
+ export interface OficlinicCreateAppointmentNotFoundError {
269
+ data: null;
270
+ error: OficlinicCreateAppointmentNotFoundFailure;
271
+ /**
272
+ * What every answer carries besides its data or error.
273
+ */
274
+ metadata: ResponseMetadata;
275
+ success: false;
276
+ }
277
+ export type OficlinicCreateAppointmentNotFoundFailure = OficlinicConnectionNotFoundFailure | OficlinicPatientNotFoundFailure | OficlinicPayerNotFoundFailure | OficlinicPayerOptionNotFoundFailure | OficlinicBookingOptionNotFoundFailure;
278
+ export type OficlinicCreateAppointmentResult = OficlinicAppointmentBooking | OficlinicAgentText;
34
279
  /**
35
280
  * A successful answer.
36
281
  */
37
- export interface OficlinicAppointmentPageResponse {
38
- data: OficlinicAppointmentPage;
282
+ export interface OficlinicCreateAppointmentResultResponse {
283
+ data: OficlinicCreateAppointmentResult;
39
284
  error: null;
40
285
  /**
41
286
  * What every answer carries besides its data or error.
@@ -43,6 +288,66 @@ export interface OficlinicAppointmentPageResponse {
43
288
  metadata: ResponseMetadata;
44
289
  success: true;
45
290
  }
291
+ /**
292
+ * A failed answer.
293
+ */
294
+ export interface OficlinicCreateAppointmentServiceUnavailableError {
295
+ data: null;
296
+ error: OficlinicCreateAppointmentServiceUnavailableFailure;
297
+ /**
298
+ * What every answer carries besides its data or error.
299
+ */
300
+ metadata: ResponseMetadata;
301
+ success: false;
302
+ }
303
+ export type OficlinicCreateAppointmentServiceUnavailableFailure = UpstreamUnavailableFailure | ProviderUnavailableFailure | OficlinicWriteLedgerFullFailure;
304
+ /**
305
+ * A failed answer.
306
+ */
307
+ export interface OficlinicCreateAppointmentTooManyRequestsError {
308
+ data: null;
309
+ error: OficlinicCreateAppointmentTooManyRequestsFailure;
310
+ /**
311
+ * What every answer carries besides its data or error.
312
+ */
313
+ metadata: ResponseMetadata;
314
+ success: false;
315
+ }
316
+ export type OficlinicCreateAppointmentTooManyRequestsFailure = RateLimitedFailure | OficlinicLoginCoolingDownFailure;
317
+ /**
318
+ * A failed answer.
319
+ */
320
+ export interface OficlinicCreateAppointmentUnprocessableContentError {
321
+ data: null;
322
+ error: OficlinicCreateAppointmentUnprocessableContentFailure;
323
+ /**
324
+ * What every answer carries besides its data or error.
325
+ */
326
+ metadata: ResponseMetadata;
327
+ success: false;
328
+ }
329
+ export type OficlinicCreateAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicProgramUnitsNotSupportedFailure;
330
+ /**
331
+ * The idempotency key was already used for a different request.
332
+ */
333
+ export interface OficlinicIdempotencyKeyReusedFailure {
334
+ /**
335
+ * The failure code, stable across releases.
336
+ */
337
+ code: "IDEMPOTENCY_KEY_REUSED";
338
+ /**
339
+ * No fields.
340
+ */
341
+ data: Empty;
342
+ /**
343
+ * What went wrong, for people; it never contains input values.
344
+ */
345
+ message: string;
346
+ /**
347
+ * Whether repeating the same request may succeed.
348
+ */
349
+ retryable: false;
350
+ }
46
351
  /**
47
352
  * A failed answer.
48
353
  */
@@ -70,6 +375,12 @@ export interface OficlinicLookupAppointmentsBadRequestError {
70
375
  }
71
376
  export type OficlinicLookupAppointmentsBadRequestFailure = InvalidInputFailure | OficlinicInvalidCursorFailure;
72
377
  export interface OficlinicLookupAppointmentsBody {
378
+ /**
379
+ * true answers { text }: concise Spanish facts for a messaging or voice
380
+ * agent, with the short ids and the cursor needed to continue. false, the
381
+ * default, answers the structured object.
382
+ */
383
+ agentMode?: boolean;
73
384
  /**
74
385
  * An Account connection id of the caller's organization.
75
386
  */
@@ -98,8 +409,8 @@ export interface OficlinicLookupAppointmentsBody {
98
409
  */
99
410
  limit?: number;
100
411
  /**
101
- * assigned, cancelled, absence (no-show) or legalized (attendance
102
- * registered).
412
+ * assigned, cancelled, absence (no-show), or the provider's legalized
413
+ * workflow category.
103
414
  */
104
415
  status: "assigned" | "cancelled" | "absence" | "legalized";
105
416
  }
@@ -129,6 +440,19 @@ export interface OficlinicLookupAppointmentsNotFoundError {
129
440
  success: false;
130
441
  }
131
442
  export type OficlinicLookupAppointmentsNotFoundFailure = OficlinicConnectionNotFoundFailure | OficlinicPatientNotFoundFailure;
443
+ export type OficlinicLookupAppointmentsResult = OficlinicAppointmentPage | OficlinicAgentText;
444
+ /**
445
+ * A successful answer.
446
+ */
447
+ export interface OficlinicLookupAppointmentsResultResponse {
448
+ data: OficlinicLookupAppointmentsResult;
449
+ error: null;
450
+ /**
451
+ * What every answer carries besides its data or error.
452
+ */
453
+ metadata: ResponseMetadata;
454
+ success: true;
455
+ }
132
456
  /**
133
457
  * A failed answer.
134
458
  */
@@ -189,3 +513,265 @@ export interface OficlinicPatientNotFoundFailure {
189
513
  */
190
514
  retryable: false;
191
515
  }
516
+ /**
517
+ * A failed answer.
518
+ */
519
+ export interface OficlinicRescheduleAppointmentBadGatewayError {
520
+ data: null;
521
+ error: OficlinicRescheduleAppointmentBadGatewayFailure;
522
+ /**
523
+ * What every answer carries besides its data or error.
524
+ */
525
+ metadata: ResponseMetadata;
526
+ success: false;
527
+ }
528
+ export type OficlinicRescheduleAppointmentBadGatewayFailure = OutcomeUnknownFailure | OficlinicSignInOutcomeUnknownFailure | ProviderProtocolChangedFailure | OficlinicPatientRecordMismatchFailure;
529
+ export interface OficlinicRescheduleAppointmentBody {
530
+ /**
531
+ * true answers { text }: concise Spanish facts for a messaging or voice
532
+ * agent, with the short ids and the cursor needed to continue. false, the
533
+ * default, answers the structured object.
534
+ */
535
+ agentMode?: boolean;
536
+ /**
537
+ * Billing values of the clinic's tariff matrix. Never guessed: the caller
538
+ * supplies them as the clinic's workflow defines them.
539
+ */
540
+ billing: {
541
+ billCopayments: string | null;
542
+ billPrivately: string | null;
543
+ copaymentPercentage: string | null;
544
+ courtOrder: string | null;
545
+ enteredCopayment: string | null;
546
+ exempt: string | null;
547
+ indicatedModeratorFee: string | null;
548
+ markExempt: boolean;
549
+ maxCopayment: string | null;
550
+ tariff: string;
551
+ };
552
+ cancellation: {
553
+ observations: string;
554
+ reason: string;
555
+ };
556
+ /**
557
+ * Coverage and clinical classification codes, as the clinic's own provider
558
+ * catalogs define them. Never guessed: the caller supplies them.
559
+ */
560
+ classification: {
561
+ affiliateType: string;
562
+ attentionTypeId: string;
563
+ listStatus?: string | null;
564
+ programId: string;
565
+ purposeId: string;
566
+ regime: string;
567
+ relationship?: string | null;
568
+ salaryRange?: string | null;
569
+ };
570
+ /**
571
+ * Must be true: the patient or staff confirmed this exact booking. Without it
572
+ * nothing is written.
573
+ */
574
+ confirm: true;
575
+ /**
576
+ * An Account connection id of the caller's organization.
577
+ */
578
+ connectionId?: string;
579
+ /**
580
+ * A contract of the payer from list_payer_contracts, which must not be
581
+ * inactive; null (the default) sends none.
582
+ */
583
+ contractId?: string | null;
584
+ /**
585
+ * The document number, digits only.
586
+ */
587
+ documentNumber: string;
588
+ /**
589
+ * Colombian citizenship card. Other document types are not verified against
590
+ * the provider yet.
591
+ */
592
+ documentType: "CC";
593
+ /**
594
+ * The availability flow id every booking list item carries (flowId). It
595
+ * expires 30 minutes after the first list.
596
+ */
597
+ flowId: string;
598
+ /**
599
+ * A key the caller chooses once per intended write, such as a UUID. Repeating
600
+ * it with the same request answers the recorded outcome and never writes
601
+ * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
602
+ */
603
+ idempotencyKey: string;
604
+ /**
605
+ * Observations sent as pObservaciones, accents removed and uppercased; null
606
+ * (the default) sends none.
607
+ */
608
+ observations?: string | null;
609
+ /**
610
+ * The flow's payer, repeated as a check.
611
+ */
612
+ payerId: string;
613
+ /**
614
+ * A plan of the payer, from list_payer_plans.
615
+ */
616
+ planId: string;
617
+ referral: {
618
+ authorizationNumber?: string | null;
619
+ requestedByUser?: boolean;
620
+ requestingProfessionalId?: string | null;
621
+ };
622
+ /**
623
+ * A slot id from list_booking_slots in the same flow.
624
+ */
625
+ slotId: string;
626
+ /**
627
+ * A subplan of the plan, from list_payer_subplans.
628
+ */
629
+ subplanId: string;
630
+ }
631
+ /**
632
+ * A failed answer.
633
+ */
634
+ export interface OficlinicRescheduleAppointmentConflictError {
635
+ data: null;
636
+ error: OficlinicRescheduleAppointmentConflictFailure;
637
+ /**
638
+ * What every answer carries besides its data or error.
639
+ */
640
+ metadata: ResponseMetadata;
641
+ success: false;
642
+ }
643
+ export type OficlinicRescheduleAppointmentConflictFailure = OficlinicConnectionRequiredFailure | OficlinicConnectionNotActiveFailure | OficlinicConnectionBusyFailure | OficlinicReauthenticationRequiredFailure | OficlinicServiceNotAvailableFailure | OficlinicSelectionNotAvailableFailure | OficlinicAppointmentNotReschedulableFailure | OficlinicIdempotencyKeyReusedFailure | OficlinicWriteTargetUnresolvedFailure;
644
+ /**
645
+ * A failed answer.
646
+ */
647
+ export interface OficlinicRescheduleAppointmentNotFoundError {
648
+ data: null;
649
+ error: OficlinicRescheduleAppointmentNotFoundFailure;
650
+ /**
651
+ * What every answer carries besides its data or error.
652
+ */
653
+ metadata: ResponseMetadata;
654
+ success: false;
655
+ }
656
+ export type OficlinicRescheduleAppointmentNotFoundFailure = OficlinicConnectionNotFoundFailure | OficlinicPatientNotFoundFailure | OficlinicPayerNotFoundFailure | OficlinicPayerOptionNotFoundFailure | OficlinicAppointmentNotFoundFailure | OficlinicBookingOptionNotFoundFailure;
657
+ export type OficlinicRescheduleAppointmentResult = OficlinicAppointmentReschedule | OficlinicAgentText;
658
+ /**
659
+ * A successful answer.
660
+ */
661
+ export interface OficlinicRescheduleAppointmentResultResponse {
662
+ data: OficlinicRescheduleAppointmentResult;
663
+ error: null;
664
+ /**
665
+ * What every answer carries besides its data or error.
666
+ */
667
+ metadata: ResponseMetadata;
668
+ success: true;
669
+ }
670
+ /**
671
+ * A failed answer.
672
+ */
673
+ export interface OficlinicRescheduleAppointmentServiceUnavailableError {
674
+ data: null;
675
+ error: OficlinicRescheduleAppointmentServiceUnavailableFailure;
676
+ /**
677
+ * What every answer carries besides its data or error.
678
+ */
679
+ metadata: ResponseMetadata;
680
+ success: false;
681
+ }
682
+ export type OficlinicRescheduleAppointmentServiceUnavailableFailure = UpstreamUnavailableFailure | ProviderUnavailableFailure | OficlinicWriteLedgerFullFailure;
683
+ /**
684
+ * A failed answer.
685
+ */
686
+ export interface OficlinicRescheduleAppointmentTooManyRequestsError {
687
+ data: null;
688
+ error: OficlinicRescheduleAppointmentTooManyRequestsFailure;
689
+ /**
690
+ * What every answer carries besides its data or error.
691
+ */
692
+ metadata: ResponseMetadata;
693
+ success: false;
694
+ }
695
+ export type OficlinicRescheduleAppointmentTooManyRequestsFailure = RateLimitedFailure | OficlinicLoginCoolingDownFailure;
696
+ /**
697
+ * A failed answer.
698
+ */
699
+ export interface OficlinicRescheduleAppointmentUnprocessableContentError {
700
+ data: null;
701
+ error: OficlinicRescheduleAppointmentUnprocessableContentFailure;
702
+ /**
703
+ * What every answer carries besides its data or error.
704
+ */
705
+ metadata: ResponseMetadata;
706
+ success: false;
707
+ }
708
+ export type OficlinicRescheduleAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicProgramUnitsNotSupportedFailure;
709
+ /**
710
+ * The service is not configured for the selected professional.
711
+ */
712
+ export interface OficlinicServiceNotAvailableFailure {
713
+ /**
714
+ * The failure code, stable across releases.
715
+ */
716
+ code: "SERVICE_NOT_AVAILABLE";
717
+ /**
718
+ * No fields.
719
+ */
720
+ data: Empty;
721
+ /**
722
+ * What went wrong, for people; it never contains input values.
723
+ */
724
+ message: string;
725
+ /**
726
+ * Whether repeating the same request may succeed.
727
+ */
728
+ retryable: false;
729
+ }
730
+ /**
731
+ * The connection's write ledger is at capacity, so no new write was sent.
732
+ * Recorded writes stay answerable; staff must look.
733
+ */
734
+ export interface OficlinicWriteLedgerFullFailure {
735
+ /**
736
+ * The failure code, stable across releases.
737
+ */
738
+ code: "WRITE_LEDGER_FULL";
739
+ /**
740
+ * No fields.
741
+ */
742
+ data: Empty;
743
+ /**
744
+ * What went wrong, for people; it never contains input values.
745
+ */
746
+ message: string;
747
+ /**
748
+ * Whether repeating the same request may succeed.
749
+ */
750
+ retryable: false;
751
+ }
752
+ /**
753
+ * An earlier write to this slot or appointment has no final outcome, so no
754
+ * other write to it is sent. Staff must check the provider's appointments.
755
+ */
756
+ export interface OficlinicWriteTargetUnresolvedFailure {
757
+ /**
758
+ * The failure code, stable across releases.
759
+ */
760
+ code: "WRITE_TARGET_UNRESOLVED";
761
+ /**
762
+ * No fields.
763
+ */
764
+ data: Empty;
765
+ /**
766
+ * What went wrong, for people; it never contains input values.
767
+ */
768
+ message: string;
769
+ /**
770
+ * Whether repeating the same request may succeed.
771
+ */
772
+ retryable: false;
773
+ }
774
+ export declare const OficlinicAppointmentBookingCodec: import("../../_/codec.js").Codec;
775
+ export declare const OficlinicAppointmentRescheduleCodec: import("../../_/codec.js").Codec;
776
+ export declare const OficlinicCreateAppointmentResultResponseCodec: import("../../_/codec.js").Codec;
777
+ export declare const OficlinicRescheduleAppointmentResultResponseCodec: import("../../_/codec.js").Codec;
@@ -1,3 +1,15 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- export {};
3
+ import { instant, object } from "../../_/index.js";
4
+ export const OficlinicAppointmentBookingCodec = object([
5
+ ["acknowledgedAt", null, instant],
6
+ ]);
7
+ export const OficlinicAppointmentRescheduleCodec = object([
8
+ ["newAppointment", null, () => OficlinicAppointmentBookingCodec],
9
+ ]);
10
+ export const OficlinicCreateAppointmentResultResponseCodec = object([
11
+ ["data", null, () => OficlinicAppointmentBookingCodec],
12
+ ]);
13
+ export const OficlinicRescheduleAppointmentResultResponseCodec = object([
14
+ ["data", null, () => OficlinicAppointmentRescheduleCodec],
15
+ ]);