@arbol-ai/sdk 5.31.0 → 5.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/permissions/models.d.ts +1 -1
- package/dist/agenda/models.d.ts +21 -0
- package/dist/agenda/waitlist/client.d.ts +205 -20
- package/dist/agenda/waitlist/client.js +18 -0
- package/dist/agenda/waitlist/index.d.ts +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.js +5 -0
- package/dist/comfachoco/affiliations/client.d.ts +24 -0
- package/dist/comfachoco/affiliations/client.js +19 -0
- package/dist/comfachoco/affiliations/index.d.ts +5 -0
- package/dist/comfachoco/affiliations/index.js +4 -0
- package/dist/comfachoco/affiliations/models.d.ts +97 -0
- package/dist/comfachoco/affiliations/models.js +13 -0
- package/dist/comfachoco/client.d.ts +15 -0
- package/dist/comfachoco/client.js +20 -0
- package/dist/comfachoco/connections/client.d.ts +55 -0
- package/dist/comfachoco/connections/client.js +33 -0
- package/dist/comfachoco/connections/index.d.ts +5 -0
- package/dist/comfachoco/connections/index.js +4 -0
- package/dist/comfachoco/connections/models.d.ts +204 -0
- package/dist/comfachoco/connections/models.js +9 -0
- package/dist/comfachoco/index.d.ts +5 -0
- package/dist/comfachoco/index.js +4 -0
- package/dist/comfachoco/models.d.ts +220 -0
- package/dist/comfachoco/models.js +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +12 -0
- package/dist/models.js +3 -0
- package/dist/nuevaEps/affiliations/models.d.ts +2 -2
- package/dist/nuevaEps/client.d.ts +6 -0
- package/dist/nuevaEps/client.js +15 -0
- package/dist/nuevaEps/connections/models.d.ts +6 -5
- package/dist/nuevaEps/index.d.ts +1 -1
- package/dist/nuevaEps/ingestionErrorReports/client.d.ts +33 -0
- package/dist/nuevaEps/ingestionErrorReports/client.js +19 -0
- package/dist/nuevaEps/ingestionErrorReports/index.d.ts +5 -0
- package/dist/nuevaEps/ingestionErrorReports/index.js +4 -0
- package/dist/nuevaEps/ingestionErrorReports/models.d.ts +87 -0
- package/dist/nuevaEps/ingestionErrorReports/models.js +10 -0
- package/dist/nuevaEps/ingestions/client.d.ts +68 -0
- package/dist/nuevaEps/ingestions/client.js +26 -0
- package/dist/nuevaEps/ingestions/index.d.ts +5 -0
- package/dist/nuevaEps/ingestions/index.js +4 -0
- package/dist/nuevaEps/ingestions/models.d.ts +182 -0
- package/dist/nuevaEps/ingestions/models.js +3 -0
- package/dist/nuevaEps/models.d.ts +65 -0
- package/dist/nuevaEps/precursoras/client.d.ts +27 -0
- package/dist/nuevaEps/precursoras/client.js +18 -0
- package/dist/nuevaEps/precursoras/index.d.ts +5 -0
- package/dist/nuevaEps/precursoras/index.js +4 -0
- package/dist/nuevaEps/precursoras/models.d.ts +94 -0
- package/dist/nuevaEps/precursoras/models.js +3 -0
- package/dist/raiz/channels/models.d.ts +10 -10
- package/dist/raiz/channels/models.js +1 -1
- package/dist/raiz/conversations/client.d.ts +24 -9
- package/dist/raiz/conversations/index.d.ts +1 -1
- package/dist/raiz/conversations/models.d.ts +3 -14
- package/dist/raiz/conversations/models.js +2 -4
- package/dist/raiz/index.d.ts +1 -1
- package/dist/raiz/knowledge/client.d.ts +4 -3
- package/dist/raiz/models.d.ts +8 -2
- package/dist/raiz/organization/models.d.ts +1 -1
- package/dist/raiz/reports/client.d.ts +35 -20
- package/dist/raiz/reports/client.js +1 -1
- package/dist/raiz/reports/models.d.ts +21 -0
- package/dist/raiz/reports/models.js +1 -1
- package/package.json +5 -4
|
@@ -22,7 +22,7 @@ export interface AccountPermission {
|
|
|
22
22
|
/**
|
|
23
23
|
* The product or integration the permission belongs to.
|
|
24
24
|
*/
|
|
25
|
-
group: "raiz" | "agenda" | "ambar" | "sura" | "visoft" | "salud-total" | "nueva-eps" | "account";
|
|
25
|
+
group: "raiz" | "agenda" | "ambar" | "sura" | "visoft" | "salud-total" | "nueva-eps" | "comfachoco" | "account";
|
|
26
26
|
value: string;
|
|
27
27
|
}
|
|
28
28
|
export interface AccountPermissionPage {
|
package/dist/agenda/models.d.ts
CHANGED
|
@@ -301,6 +301,27 @@ export interface AgendaFailureResponse {
|
|
|
301
301
|
};
|
|
302
302
|
message: "The operation may have been applied; check its result before repeating it.";
|
|
303
303
|
retryable: false;
|
|
304
|
+
} | {
|
|
305
|
+
code: "WAITLIST_SERVICE_UNAVAILABLE";
|
|
306
|
+
data: {
|
|
307
|
+
[key: string]: unknown;
|
|
308
|
+
};
|
|
309
|
+
message: "Correct serviceId using serviceId from bookingOfferings.list. Search a short service term such as neurología, then inspect the matching service name. Never invent an ID. No waiting-list entry was changed; correct this field and retry with the same consent.";
|
|
310
|
+
retryable: false;
|
|
311
|
+
} | {
|
|
312
|
+
code: "WAITLIST_RESOURCE_UNAVAILABLE";
|
|
313
|
+
data: {
|
|
314
|
+
[key: string]: unknown;
|
|
315
|
+
};
|
|
316
|
+
message: "The requested professional is not an active agenda for this service. Use resourceName for the requested professional or copy agendas[].id from bookingOfferings.list, never the offering id. If both are supplied, they must agree. No waiting-list entry was changed. Correct the reference with the same consent. If a verified provider professional is absent from Agenda, omit resourceName, clear resourceId and explicitly restrict the manual request to that professional in note.";
|
|
317
|
+
retryable: false;
|
|
318
|
+
} | {
|
|
319
|
+
code: "WAITLIST_RESOURCE_AMBIGUOUS";
|
|
320
|
+
data: {
|
|
321
|
+
[key: string]: unknown;
|
|
322
|
+
};
|
|
323
|
+
message: "More than one active agenda matches resourceName for this service. Read bookingOfferings.list and provide the complete requested professional name or its agendas[].id. No waiting-list entry was changed.";
|
|
324
|
+
retryable: false;
|
|
304
325
|
} | {
|
|
305
326
|
code: "INVALID_APPOINTMENT_INTAKE";
|
|
306
327
|
data: {
|
|
@@ -8,6 +8,18 @@ export interface ClientOptions extends BaseClientOptions {
|
|
|
8
8
|
baseUrl: string;
|
|
9
9
|
}
|
|
10
10
|
export interface Client {
|
|
11
|
+
/**
|
|
12
|
+
* Create Waitlist Entry
|
|
13
|
+
*
|
|
14
|
+
* An authenticated staff user records a consented waitlist request without
|
|
15
|
+
* sending or queuing messages, emails, offers or patient follow-ups. A repeat
|
|
16
|
+
* for the same patient, service and reason returns the existing open entry
|
|
17
|
+
* without changing it; use update with expectedVersion to amend it. Read the
|
|
18
|
+
* returned entry before claiming any preference was saved. This operation
|
|
19
|
+
* never books an appointment. Requires a user login with
|
|
20
|
+
* agenda:waitlist:write; service tokens and native agents cannot call it.
|
|
21
|
+
*/
|
|
22
|
+
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
11
23
|
/**
|
|
12
24
|
* Add a patient to the waiting list
|
|
13
25
|
*
|
|
@@ -22,23 +34,37 @@ export interface Client {
|
|
|
22
34
|
* from the invoking conversation; omit that field. Direct callers may supply
|
|
23
35
|
* the referring conversation link so the team can reopen it. Pass the
|
|
24
36
|
* patient's name, documentNumber and documentType, phone, serviceId and the
|
|
25
|
-
* payer as the patient said it. Use
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
37
|
+
* payer as the patient said it. Use resourceName for the requested
|
|
38
|
+
* professional when the Agenda id is unknown. It resolves a unique active
|
|
39
|
+
* agenda for serviceId. If using resourceId, copy agendas[].id from
|
|
40
|
+
* bookingOfferings.list verbatim; its top-level id identifies an offering.
|
|
41
|
+
* Never rewrite a prefix. Search the catalog with a short clinical term, such
|
|
42
|
+
* as neurología, then select the exact serviceId. A
|
|
43
|
+
* WAITLIST_SERVICE_UNAVAILABLE, WAITLIST_RESOURCE_UNAVAILABLE or
|
|
44
|
+
* WAITLIST_RESOURCE_AMBIGUOUS refusal changes no waiting-list entry: correct
|
|
45
|
+
* the reference and retry using the existing consent. For a professional
|
|
46
|
+
* documented in the provider system but absent from Agenda, retain the
|
|
47
|
+
* restriction explicitly in note, omit resourceName and use resourceId:null
|
|
48
|
+
* on the same manual request. This is a manual preference for the team, never
|
|
49
|
+
* permission to offer any other doctor. If the person accepts several named
|
|
50
|
+
* professionals, preserve their names and the complete time window in note
|
|
51
|
+
* rather than inventing one resource ID. Calling again for the same patient,
|
|
52
|
+
* service and reason returns the same open entry. Only a request from the
|
|
53
|
+
* same verified Raíz conversation may reconcile manual and priority as one
|
|
54
|
+
* entry; payer_review stays separate. A consented reason priority request
|
|
55
|
+
* from the same verified Raíz conversation promotes a manual entry created in
|
|
56
|
+
* that same native conversation in place to priority urgent, preserving its
|
|
57
|
+
* ID, open status and queue date. For an Agenda booking include its verified
|
|
58
|
+
* appointmentId; for an external booking omit that ID and retain the verified
|
|
59
|
+
* booking in note. Historical entries, another conversation and explicit desk
|
|
60
|
+
* priority decisions are preserved; inspect the returned priority and never
|
|
61
|
+
* claim an upgrade unless it is urgent. A later manual join never lowers or
|
|
62
|
+
* duplicates that priority request. Supplied consented preferences, note,
|
|
63
|
+
* payer, conversation and appointment association can be reconciled; omit
|
|
64
|
+
* unchanged fields to retain them. A supplied confirmed phone replaces the
|
|
65
|
+
* patient contact phone; omitted or null phone preserves it. Omitted fields
|
|
66
|
+
* preserve their values; resourceId:null clears the Agenda resource filter,
|
|
67
|
+
* but never clears a named-professional restriction recorded in note. When
|
|
42
68
|
* supplying preferences, send the complete consented date/time window; null
|
|
43
69
|
* fields clear those limits. Identical repeats do not change the version.
|
|
44
70
|
* Staff status, explicit desk priority and original queue position are
|
|
@@ -57,9 +83,100 @@ export interface Client {
|
|
|
57
83
|
* services and agendas were chosen separately.
|
|
58
84
|
*/
|
|
59
85
|
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* Update Waitlist Entry
|
|
88
|
+
*
|
|
89
|
+
* An authenticated staff user amends one existing waitlist entry with
|
|
90
|
+
* expectedVersion, preserving its ID, patient, service and queue position.
|
|
91
|
+
* Omitted preferences, professional, priority and appointment association are
|
|
92
|
+
* preserved. Send the complete consented date/time window when replacing
|
|
93
|
+
* preferences. Use resourceId:null only to clear the Agenda resource filter
|
|
94
|
+
* and retain any external or multiple-professional restriction explicitly in
|
|
95
|
+
* note. Sends and queues no messages, emails, offers or patient follow-ups
|
|
96
|
+
* and never changes a booking. Requires a user login with
|
|
97
|
+
* agenda:waitlist:write; service tokens and native agents cannot call it.
|
|
98
|
+
*/
|
|
99
|
+
update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
|
|
60
100
|
}
|
|
61
101
|
export declare function createClient(options: ClientOptions): Client;
|
|
62
102
|
export declare function bind(transport: Transport): Client;
|
|
103
|
+
export interface CreateRequest {
|
|
104
|
+
/**
|
|
105
|
+
* The appointment it relates to: a priority to bring forward.
|
|
106
|
+
*/
|
|
107
|
+
appointmentId?: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* Agent conversation URL retained so the scheduling team can reopen the
|
|
110
|
+
* referring conversation.
|
|
111
|
+
*/
|
|
112
|
+
conversationUrl?: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Desk note attached to the waiting-list entry; null means no note is
|
|
115
|
+
* recorded.
|
|
116
|
+
*/
|
|
117
|
+
note?: string | null;
|
|
118
|
+
patient: {
|
|
119
|
+
document?: string | null;
|
|
120
|
+
documentNumber?: string | null;
|
|
121
|
+
documentType?: string | null;
|
|
122
|
+
name: string;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Registered patient selected by the desk; document resolution remains
|
|
126
|
+
* authoritative for patient identity.
|
|
127
|
+
*/
|
|
128
|
+
patientId?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The payer the patient named, as said.
|
|
131
|
+
*/
|
|
132
|
+
payer?: string | null;
|
|
133
|
+
/**
|
|
134
|
+
* Patient contact telephone number; null when no number was recorded.
|
|
135
|
+
*/
|
|
136
|
+
phone?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* Patient availability preferences retained with the waiting-list entry.
|
|
139
|
+
*/
|
|
140
|
+
preferences?: {
|
|
141
|
+
from?: Temporal.PlainDate | null;
|
|
142
|
+
times?: string | null;
|
|
143
|
+
to?: Temporal.PlainDate | null;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Whether the waiting-list entry requests normal handling or an urgent
|
|
147
|
+
* appointment.
|
|
148
|
+
*/
|
|
149
|
+
priority?: "normal" | "urgent";
|
|
150
|
+
/**
|
|
151
|
+
* Why: by hand, a payer only the team books, or a priority to bring forward.
|
|
152
|
+
*/
|
|
153
|
+
reason?: "manual" | "payer_review" | "priority";
|
|
154
|
+
/**
|
|
155
|
+
* One professional or agenda: copy agendas[].id from bookingOfferings.list,
|
|
156
|
+
* never the offering id or a rewritten prefix. Null means no Agenda resource
|
|
157
|
+
* filter; retain any external professional restriction explicitly in note.
|
|
158
|
+
*/
|
|
159
|
+
resourceId?: string | null;
|
|
160
|
+
/**
|
|
161
|
+
* The requested professional or agenda name. Resolves only one active agenda
|
|
162
|
+
* offering this service, ignoring accents and professional titles. If
|
|
163
|
+
* resourceId is supplied too, it must identify the same agenda. For a
|
|
164
|
+
* documented external professional absent from Agenda, omit
|
|
165
|
+
* resourceName/resourceId and explicitly restrict the manual request to that
|
|
166
|
+
* professional in note.
|
|
167
|
+
*/
|
|
168
|
+
resourceName?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Service identifier within the authenticated organization.
|
|
171
|
+
*/
|
|
172
|
+
serviceId: string;
|
|
173
|
+
}
|
|
174
|
+
export interface CreateResponse {
|
|
175
|
+
data: AgendaWaitlistEntry;
|
|
176
|
+
error: null;
|
|
177
|
+
metadata: AgendaResponseMetadata;
|
|
178
|
+
success: true;
|
|
179
|
+
}
|
|
63
180
|
export interface JoinRequest {
|
|
64
181
|
/**
|
|
65
182
|
* The appointment it relates to: a priority to bring forward.
|
|
@@ -115,9 +232,20 @@ export interface JoinRequest {
|
|
|
115
232
|
*/
|
|
116
233
|
reason: "manual" | "payer_review" | "priority";
|
|
117
234
|
/**
|
|
118
|
-
* One professional or agenda
|
|
235
|
+
* One professional or agenda: copy agendas[].id from bookingOfferings.list,
|
|
236
|
+
* never the offering id or a rewritten prefix. Null means no Agenda resource
|
|
237
|
+
* filter; retain any external professional restriction explicitly in note.
|
|
119
238
|
*/
|
|
120
239
|
resourceId?: string | null;
|
|
240
|
+
/**
|
|
241
|
+
* The requested professional or agenda name. Resolves only one active agenda
|
|
242
|
+
* offering this service, ignoring accents and professional titles. If
|
|
243
|
+
* resourceId is supplied too, it must identify the same agenda. For a
|
|
244
|
+
* documented external professional absent from Agenda, omit
|
|
245
|
+
* resourceName/resourceId and explicitly restrict the manual request to that
|
|
246
|
+
* professional in note.
|
|
247
|
+
*/
|
|
248
|
+
resourceName?: string;
|
|
121
249
|
/**
|
|
122
250
|
* Service identifier within the authenticated organization.
|
|
123
251
|
*/
|
|
@@ -150,8 +278,9 @@ export interface ListRequest {
|
|
|
150
278
|
*/
|
|
151
279
|
offeringId?: string;
|
|
152
280
|
/**
|
|
153
|
-
* Only entries that asked for this professional or agenda; entries
|
|
154
|
-
*
|
|
281
|
+
* Only entries that asked for this professional or agenda; entries with no
|
|
282
|
+
* Agenda resource filter (resourceId null, including manual professional
|
|
283
|
+
* restrictions in note) are left out.
|
|
155
284
|
*/
|
|
156
285
|
resourceId?: string;
|
|
157
286
|
/**
|
|
@@ -165,3 +294,59 @@ export interface ListResponse {
|
|
|
165
294
|
metadata: AgendaResponseMetadata;
|
|
166
295
|
success: true;
|
|
167
296
|
}
|
|
297
|
+
export interface UpdateRequest {
|
|
298
|
+
/**
|
|
299
|
+
* Organization-owned waiting-list entry identifier.
|
|
300
|
+
*/
|
|
301
|
+
waitlistEntryId: string;
|
|
302
|
+
/**
|
|
303
|
+
* Appointment associated with this waiting-list entry; null clears the
|
|
304
|
+
* association.
|
|
305
|
+
*/
|
|
306
|
+
appointmentId?: string | null;
|
|
307
|
+
/**
|
|
308
|
+
* HTTPS link to the originating Arbol conversation on an admitted product
|
|
309
|
+
* hostname; null when absent.
|
|
310
|
+
*/
|
|
311
|
+
conversationUrl?: string | null;
|
|
312
|
+
/**
|
|
313
|
+
* Version last read by the caller. The mutation fails if another writer has
|
|
314
|
+
* changed this record.
|
|
315
|
+
*/
|
|
316
|
+
expectedVersion: number;
|
|
317
|
+
/**
|
|
318
|
+
* Desk note attached to the waiting-list entry; null means no note is
|
|
319
|
+
* recorded.
|
|
320
|
+
*/
|
|
321
|
+
note?: string | null;
|
|
322
|
+
preferences?: {
|
|
323
|
+
from?: Temporal.PlainDate | null;
|
|
324
|
+
times?: string | null;
|
|
325
|
+
to?: Temporal.PlainDate | null;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* Whether the waiting-list entry requests normal handling or an urgent
|
|
329
|
+
* appointment.
|
|
330
|
+
*/
|
|
331
|
+
priority?: "normal" | "urgent";
|
|
332
|
+
resourceId?: string | null;
|
|
333
|
+
/**
|
|
334
|
+
* The requested professional or agenda name. Resolves only one active agenda
|
|
335
|
+
* offering this service, ignoring accents and professional titles. If
|
|
336
|
+
* resourceId is supplied too, it must identify the same agenda. For a
|
|
337
|
+
* documented external professional absent from Agenda, omit
|
|
338
|
+
* resourceName/resourceId and explicitly restrict the manual request to that
|
|
339
|
+
* professional in note.
|
|
340
|
+
*/
|
|
341
|
+
resourceName?: string;
|
|
342
|
+
/**
|
|
343
|
+
* Current waiting-list state: waiting, contacted, booked, expired or removed.
|
|
344
|
+
*/
|
|
345
|
+
status?: "waiting" | "offered" | "booked" | "cancelled";
|
|
346
|
+
}
|
|
347
|
+
export interface UpdateResponse {
|
|
348
|
+
data: AgendaWaitlistEntry;
|
|
349
|
+
error: null;
|
|
350
|
+
metadata: AgendaResponseMetadata;
|
|
351
|
+
success: true;
|
|
352
|
+
}
|
|
@@ -7,10 +7,20 @@ export function createClient(options) {
|
|
|
7
7
|
}
|
|
8
8
|
export function bind(transport) {
|
|
9
9
|
return {
|
|
10
|
+
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
10
11
|
join: (request, options) => transport.send(JoinOperation, request, options),
|
|
11
12
|
list: (request, options) => transport.send(ListOperation, request, options),
|
|
13
|
+
update: (request, options) => transport.send(UpdateOperation, request, options),
|
|
12
14
|
};
|
|
13
15
|
}
|
|
16
|
+
const CreateOperation = {
|
|
17
|
+
method: "POST",
|
|
18
|
+
route: "/v1/agenda/waitlist",
|
|
19
|
+
body: "flat",
|
|
20
|
+
request: object([["preferences", null, object([["from", null, date], ["to", null, date]])]]),
|
|
21
|
+
response: object([["data", null, () => AgendaWaitlistEntryCodec]]),
|
|
22
|
+
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 },
|
|
23
|
+
};
|
|
14
24
|
const JoinOperation = {
|
|
15
25
|
method: "POST",
|
|
16
26
|
route: "/v1/agenda/waitlist/join",
|
|
@@ -26,3 +36,11 @@ const ListOperation = {
|
|
|
26
36
|
response: object([["data", null, () => AgendaWaitlistEntryPageCodec]]),
|
|
27
37
|
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 },
|
|
28
38
|
};
|
|
39
|
+
const UpdateOperation = {
|
|
40
|
+
method: "PATCH",
|
|
41
|
+
route: "/v1/agenda/waitlist/{waitlistEntryId}",
|
|
42
|
+
body: "flat",
|
|
43
|
+
request: object([["preferences", null, object([["from", null, date], ["to", null, date]])]]),
|
|
44
|
+
response: object([["data", null, () => AgendaWaitlistEntryCodec]]),
|
|
45
|
+
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 },
|
|
46
|
+
};
|
|
@@ -1,5 +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, JoinRequest, JoinResponse, ListRequest, ListResponse, } from "./client.js";
|
|
4
|
+
export type { Client, ClientOptions, CreateRequest, CreateResponse, JoinRequest, JoinResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
|
|
5
5
|
export type { AgendaWaitlistEntry, AgendaWaitlistEntryPage, } from "./models.js";
|
package/dist/client.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { type Client as AccountClient } from "./account/client.js";
|
|
|
3
3
|
import { type Client as AdresClient } from "./adres/client.js";
|
|
4
4
|
import { type Client as AgendaClient } from "./agenda/client.js";
|
|
5
5
|
import { type Client as AxxaClient } from "./axxa/client.js";
|
|
6
|
+
import { type Client as ComfachocoClient } from "./comfachoco/client.js";
|
|
6
7
|
import { type Client as GmedicClient } from "./gmedic/client.js";
|
|
7
8
|
import { type Client as NuevaEpsClient } from "./nuevaEps/client.js";
|
|
8
9
|
import { type Client as PoliciaColombiaClient } from "./policiaColombia/client.js";
|
|
@@ -22,6 +23,7 @@ export interface Client {
|
|
|
22
23
|
readonly adres: AdresClient;
|
|
23
24
|
readonly agenda: AgendaClient;
|
|
24
25
|
readonly axxa: AxxaClient;
|
|
26
|
+
readonly comfachoco: ComfachocoClient;
|
|
25
27
|
readonly gmedic: GmedicClient;
|
|
26
28
|
readonly nuevaEps: NuevaEpsClient;
|
|
27
29
|
readonly policiaColombia: PoliciaColombiaClient;
|
package/dist/client.js
CHANGED
|
@@ -5,6 +5,7 @@ import { bind as bindAccount, } from "./account/client.js";
|
|
|
5
5
|
import { bind as bindAdres, } from "./adres/client.js";
|
|
6
6
|
import { bind as bindAgenda, } from "./agenda/client.js";
|
|
7
7
|
import { bind as bindAxxa } from "./axxa/client.js";
|
|
8
|
+
import { bind as bindComfachoco, } from "./comfachoco/client.js";
|
|
8
9
|
import { bind as bindGmedic, } from "./gmedic/client.js";
|
|
9
10
|
import { bind as bindNuevaEps, } from "./nuevaEps/client.js";
|
|
10
11
|
import { bind as bindPoliciaColombia, } from "./policiaColombia/client.js";
|
|
@@ -21,6 +22,7 @@ export function bind(transport) {
|
|
|
21
22
|
let adresClient;
|
|
22
23
|
let agendaClient;
|
|
23
24
|
let axxaClient;
|
|
25
|
+
let comfachocoClient;
|
|
24
26
|
let gmedicClient;
|
|
25
27
|
let nuevaEpsClient;
|
|
26
28
|
let policiaColombiaClient;
|
|
@@ -42,6 +44,9 @@ export function bind(transport) {
|
|
|
42
44
|
get axxa() {
|
|
43
45
|
return (axxaClient ??= bindAxxa(transport));
|
|
44
46
|
},
|
|
47
|
+
get comfachoco() {
|
|
48
|
+
return (comfachocoClient ??= bindComfachoco(transport));
|
|
49
|
+
},
|
|
45
50
|
get gmedic() {
|
|
46
51
|
return (gmedicClient ??= bindGmedic(transport));
|
|
47
52
|
},
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import { type ComfachocoLookupAffiliationBody, type ComfachocoLookupAffiliationResultResponse } from "./models.js";
|
|
3
|
+
export interface ClientOptions extends BaseClientOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The URL the paths of the API are relative to.
|
|
6
|
+
*/
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Client {
|
|
10
|
+
/**
|
|
11
|
+
* Lookup affiliations
|
|
12
|
+
*
|
|
13
|
+
* Look up a citizen document in Comfachocó through an active organization
|
|
14
|
+
* connection. Returns found only for an exact source identity and not_found
|
|
15
|
+
* only for an explicit source negative. Provider failures are never evidence
|
|
16
|
+
* of non-affiliation. This does not verify the identity of the person
|
|
17
|
+
* presenting the document or determine eligibility.
|
|
18
|
+
*/
|
|
19
|
+
lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
|
|
20
|
+
}
|
|
21
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
22
|
+
export declare function bind(transport: Transport): Client;
|
|
23
|
+
export type LookupRequest = ComfachocoLookupAffiliationBody;
|
|
24
|
+
export type LookupResponse = ComfachocoLookupAffiliationResultResponse;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Transport, } from "../../_/index.js";
|
|
4
|
+
import { ComfachocoLookupAffiliationResultResponseCodec, } from "./models.js";
|
|
5
|
+
export function createClient(options) {
|
|
6
|
+
return bind(new Transport(options));
|
|
7
|
+
}
|
|
8
|
+
export function bind(transport) {
|
|
9
|
+
return {
|
|
10
|
+
lookup: (request, options) => transport.send(LookupOperation, request, options),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const LookupOperation = {
|
|
14
|
+
method: "POST",
|
|
15
|
+
route: "/v1/comfachoco/affiliations/lookup",
|
|
16
|
+
body: "flat",
|
|
17
|
+
response: ComfachocoLookupAffiliationResultResponseCodec,
|
|
18
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": 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, LookupRequest, LookupResponse, } from "./client.js";
|
|
5
|
+
export type { ComfachocoComfachocoAffiliationFound, ComfachocoComfachocoAffiliationNotFound, ComfachocoComfachocoMember, ComfachocoLookupAffiliationBadGatewayError, ComfachocoLookupAffiliationBadGatewayFailure, ComfachocoLookupAffiliationBody, ComfachocoLookupAffiliationResult, ComfachocoLookupAffiliationResultResponse, ComfachocoLookupAffiliationServiceUnavailableError, ComfachocoLookupAffiliationServiceUnavailableFailure, ComfachocoLookupAffiliationTooManyRequestsError, ComfachocoLookupAffiliationTooManyRequestsFailure, ComfachocoLookupAffiliationUnprocessableContentError, ComfachocoLookupAffiliationUnprocessableContentFailure, } from "./models.js";
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { OutcomeUnknownFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
+
import type { ComfachocoCredentialsRejectedFailure, ComfachocoLoginCoolingDownFailure, ComfachocoMemberIdentityMismatchFailure, ComfachocoProviderAccountInactiveFailure, ComfachocoProviderProtocolChangedFailure, ComfachocoProviderSessionExpiredFailure, ComfachocoProviderUnavailableFailure } from "../models.js";
|
|
3
|
+
export interface ComfachocoComfachocoAffiliationFound {
|
|
4
|
+
member: ComfachocoComfachocoMember;
|
|
5
|
+
observedAt: Temporal.Instant;
|
|
6
|
+
status: "found";
|
|
7
|
+
}
|
|
8
|
+
export interface ComfachocoComfachocoAffiliationNotFound {
|
|
9
|
+
member: null;
|
|
10
|
+
observedAt: Temporal.Instant;
|
|
11
|
+
status: "not_found";
|
|
12
|
+
}
|
|
13
|
+
export interface ComfachocoComfachocoMember {
|
|
14
|
+
affiliationStatus: string;
|
|
15
|
+
documentNumber: string;
|
|
16
|
+
documentType: string;
|
|
17
|
+
fullName: string;
|
|
18
|
+
primaryProvider: string | null;
|
|
19
|
+
regime: string | null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A failed answer.
|
|
23
|
+
*/
|
|
24
|
+
export interface ComfachocoLookupAffiliationBadGatewayError {
|
|
25
|
+
data: null;
|
|
26
|
+
error: ComfachocoLookupAffiliationBadGatewayFailure;
|
|
27
|
+
/**
|
|
28
|
+
* What every answer carries besides its data or error.
|
|
29
|
+
*/
|
|
30
|
+
metadata: ResponseMetadata;
|
|
31
|
+
success: false;
|
|
32
|
+
}
|
|
33
|
+
export type ComfachocoLookupAffiliationBadGatewayFailure = OutcomeUnknownFailure | ComfachocoProviderProtocolChangedFailure | ComfachocoMemberIdentityMismatchFailure;
|
|
34
|
+
export interface ComfachocoLookupAffiliationBody {
|
|
35
|
+
connectionId?: string;
|
|
36
|
+
documentNumber: string;
|
|
37
|
+
/**
|
|
38
|
+
* Citizen identification. Other document types have not been verified.
|
|
39
|
+
*/
|
|
40
|
+
documentType: "CC";
|
|
41
|
+
}
|
|
42
|
+
export type ComfachocoLookupAffiliationResult = ComfachocoComfachocoAffiliationNotFound | ComfachocoComfachocoAffiliationFound;
|
|
43
|
+
/**
|
|
44
|
+
* A successful answer.
|
|
45
|
+
*/
|
|
46
|
+
export interface ComfachocoLookupAffiliationResultResponse {
|
|
47
|
+
data: ComfachocoLookupAffiliationResult;
|
|
48
|
+
error: null;
|
|
49
|
+
/**
|
|
50
|
+
* What every answer carries besides its data or error.
|
|
51
|
+
*/
|
|
52
|
+
metadata: ResponseMetadata;
|
|
53
|
+
success: true;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A failed answer.
|
|
57
|
+
*/
|
|
58
|
+
export interface ComfachocoLookupAffiliationServiceUnavailableError {
|
|
59
|
+
data: null;
|
|
60
|
+
error: ComfachocoLookupAffiliationServiceUnavailableFailure;
|
|
61
|
+
/**
|
|
62
|
+
* What every answer carries besides its data or error.
|
|
63
|
+
*/
|
|
64
|
+
metadata: ResponseMetadata;
|
|
65
|
+
success: false;
|
|
66
|
+
}
|
|
67
|
+
export type ComfachocoLookupAffiliationServiceUnavailableFailure = UpstreamUnavailableFailure | ComfachocoProviderUnavailableFailure | ComfachocoProviderSessionExpiredFailure;
|
|
68
|
+
/**
|
|
69
|
+
* A failed answer.
|
|
70
|
+
*/
|
|
71
|
+
export interface ComfachocoLookupAffiliationTooManyRequestsError {
|
|
72
|
+
data: null;
|
|
73
|
+
error: ComfachocoLookupAffiliationTooManyRequestsFailure;
|
|
74
|
+
/**
|
|
75
|
+
* What every answer carries besides its data or error.
|
|
76
|
+
*/
|
|
77
|
+
metadata: ResponseMetadata;
|
|
78
|
+
success: false;
|
|
79
|
+
}
|
|
80
|
+
export type ComfachocoLookupAffiliationTooManyRequestsFailure = RateLimitedFailure | ComfachocoLoginCoolingDownFailure;
|
|
81
|
+
/**
|
|
82
|
+
* A failed answer.
|
|
83
|
+
*/
|
|
84
|
+
export interface ComfachocoLookupAffiliationUnprocessableContentError {
|
|
85
|
+
data: null;
|
|
86
|
+
error: ComfachocoLookupAffiliationUnprocessableContentFailure;
|
|
87
|
+
/**
|
|
88
|
+
* What every answer carries besides its data or error.
|
|
89
|
+
*/
|
|
90
|
+
metadata: ResponseMetadata;
|
|
91
|
+
success: false;
|
|
92
|
+
}
|
|
93
|
+
export type ComfachocoLookupAffiliationUnprocessableContentFailure = ComfachocoProviderAccountInactiveFailure | ComfachocoCredentialsRejectedFailure;
|
|
94
|
+
export declare const ComfachocoComfachocoAffiliationFoundCodec: import("../../_/codec.js").Codec;
|
|
95
|
+
export declare const ComfachocoComfachocoAffiliationNotFoundCodec: import("../../_/codec.js").Codec;
|
|
96
|
+
export declare const ComfachocoLookupAffiliationResultCodec: import("../../_/codec.js").Codec;
|
|
97
|
+
export declare const ComfachocoLookupAffiliationResultResponseCodec: import("../../_/codec.js").Codec;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { instant, object, union } from "../../_/index.js";
|
|
4
|
+
export const ComfachocoComfachocoAffiliationFoundCodec = object([
|
|
5
|
+
["observedAt", null, instant],
|
|
6
|
+
]);
|
|
7
|
+
export const ComfachocoComfachocoAffiliationNotFoundCodec = object([
|
|
8
|
+
["observedAt", null, instant],
|
|
9
|
+
]);
|
|
10
|
+
export const ComfachocoLookupAffiliationResultCodec = union([() => ComfachocoComfachocoAffiliationNotFoundCodec, () => ComfachocoComfachocoAffiliationFoundCodec]);
|
|
11
|
+
export const ComfachocoLookupAffiliationResultResponseCodec = object([
|
|
12
|
+
["data", null, () => ComfachocoLookupAffiliationResultCodec],
|
|
13
|
+
]);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type BaseClientOptions, Transport } from "../_/index.js";
|
|
2
|
+
import { type Client as AffiliationsClient } from "./affiliations/client.js";
|
|
3
|
+
import { type Client as ConnectionsClient } from "./connections/client.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
|
+
readonly affiliations: AffiliationsClient;
|
|
12
|
+
readonly connections: ConnectionsClient;
|
|
13
|
+
}
|
|
14
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
15
|
+
export declare function bind(transport: Transport): Client;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Transport } from "../_/index.js";
|
|
4
|
+
import { bind as bindAffiliations, } from "./affiliations/client.js";
|
|
5
|
+
import { bind as bindConnections, } from "./connections/client.js";
|
|
6
|
+
export function createClient(options) {
|
|
7
|
+
return bind(new Transport(options));
|
|
8
|
+
}
|
|
9
|
+
export function bind(transport) {
|
|
10
|
+
let affiliationsClient;
|
|
11
|
+
let connectionsClient;
|
|
12
|
+
return {
|
|
13
|
+
get affiliations() {
|
|
14
|
+
return (affiliationsClient ??= bindAffiliations(transport));
|
|
15
|
+
},
|
|
16
|
+
get connections() {
|
|
17
|
+
return (connectionsClient ??= bindConnections(transport));
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import type { DeletedObjectResponse } from "../../models.js";
|
|
3
|
+
import { type ComfachocoComfachocoConnectionResponse, type ComfachocoVerifyConnectionBody, type ComfachocoVerifyConnectionResultResponse } 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
|
+
* Delete a connection
|
|
13
|
+
*
|
|
14
|
+
* Remove the provider session for this organization-owned connection. Account
|
|
15
|
+
* retires the credential separately.
|
|
16
|
+
*/
|
|
17
|
+
delete(request: DeleteRequest, options?: RequestOptions): Promise<DeleteResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Get a connection
|
|
20
|
+
*
|
|
21
|
+
* Read safe metadata for a Comfachocó connection owned by the caller’s
|
|
22
|
+
* organization.
|
|
23
|
+
*/
|
|
24
|
+
get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Verify a connection
|
|
27
|
+
*
|
|
28
|
+
* Verify a provider login once before Account seals its credentials. A
|
|
29
|
+
* refused login leaves existing connections unchanged.
|
|
30
|
+
*/
|
|
31
|
+
verify(request: VerifyRequest, options?: RequestOptions): Promise<VerifyResponse>;
|
|
32
|
+
}
|
|
33
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
34
|
+
export declare function bind(transport: Transport): Client;
|
|
35
|
+
export interface DeleteRequest {
|
|
36
|
+
/**
|
|
37
|
+
* The connection id.
|
|
38
|
+
*/
|
|
39
|
+
connectionId: string;
|
|
40
|
+
}
|
|
41
|
+
export type DeleteResponse = DeletedObjectResponse;
|
|
42
|
+
export interface GetRequest {
|
|
43
|
+
/**
|
|
44
|
+
* The connection id.
|
|
45
|
+
*/
|
|
46
|
+
connectionId: string;
|
|
47
|
+
}
|
|
48
|
+
export type GetResponse = ComfachocoComfachocoConnectionResponse;
|
|
49
|
+
export type VerifyRequest = {
|
|
50
|
+
/**
|
|
51
|
+
* The connection id.
|
|
52
|
+
*/
|
|
53
|
+
connectionId: string;
|
|
54
|
+
} & ComfachocoVerifyConnectionBody;
|
|
55
|
+
export type VerifyResponse = ComfachocoVerifyConnectionResultResponse;
|