@arbol-ai/sdk 5.36.0 → 5.37.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 (69) hide show
  1. package/dist/client.d.ts +4 -0
  2. package/dist/client.js +10 -0
  3. package/dist/comfachoco/affiliations/models.d.ts +5 -5
  4. package/dist/comfachoco/connections/models.d.ts +11 -11
  5. package/dist/comfachoco/index.d.ts +1 -1
  6. package/dist/comfachoco/models.d.ts +0 -63
  7. package/dist/index.d.ts +1 -1
  8. package/dist/models.d.ts +63 -0
  9. package/dist/oficlinic/appointments/client.d.ts +27 -0
  10. package/dist/oficlinic/appointments/client.js +18 -0
  11. package/dist/oficlinic/appointments/index.d.ts +5 -0
  12. package/dist/oficlinic/appointments/index.js +4 -0
  13. package/dist/oficlinic/appointments/models.d.ts +191 -0
  14. package/dist/oficlinic/appointments/models.js +3 -0
  15. package/dist/oficlinic/client.d.ts +23 -0
  16. package/dist/oficlinic/client.js +40 -0
  17. package/dist/oficlinic/connections/client.d.ts +45 -0
  18. package/dist/oficlinic/connections/client.js +25 -0
  19. package/dist/oficlinic/connections/index.d.ts +5 -0
  20. package/dist/oficlinic/connections/index.js +4 -0
  21. package/dist/oficlinic/connections/models.d.ts +40 -0
  22. package/dist/oficlinic/connections/models.js +10 -0
  23. package/dist/oficlinic/index.d.ts +5 -0
  24. package/dist/oficlinic/index.js +4 -0
  25. package/dist/oficlinic/models.d.ts +249 -0
  26. package/dist/oficlinic/models.js +3 -0
  27. package/dist/oficlinic/patients/client.d.ts +26 -0
  28. package/dist/oficlinic/patients/client.js +19 -0
  29. package/dist/oficlinic/patients/index.d.ts +5 -0
  30. package/dist/oficlinic/patients/index.js +4 -0
  31. package/dist/oficlinic/patients/models.d.ts +128 -0
  32. package/dist/oficlinic/patients/models.js +13 -0
  33. package/dist/oficlinic/payers/client.d.ts +43 -0
  34. package/dist/oficlinic/payers/client.js +18 -0
  35. package/dist/oficlinic/payers/index.d.ts +5 -0
  36. package/dist/oficlinic/payers/index.js +4 -0
  37. package/dist/oficlinic/payers/models.d.ts +138 -0
  38. package/dist/oficlinic/payers/models.js +3 -0
  39. package/dist/oficlinic/professionals/client.d.ts +43 -0
  40. package/dist/oficlinic/professionals/client.js +18 -0
  41. package/dist/oficlinic/professionals/index.d.ts +5 -0
  42. package/dist/oficlinic/professionals/index.js +4 -0
  43. package/dist/oficlinic/professionals/models.d.ts +124 -0
  44. package/dist/oficlinic/professionals/models.js +3 -0
  45. package/dist/oficlinic/services/client.d.ts +43 -0
  46. package/dist/oficlinic/services/client.js +18 -0
  47. package/dist/oficlinic/services/index.d.ts +5 -0
  48. package/dist/oficlinic/services/index.js +4 -0
  49. package/dist/oficlinic/services/models.d.ts +140 -0
  50. package/dist/oficlinic/services/models.js +3 -0
  51. package/dist/sanitas/affiliations/client.d.ts +22 -0
  52. package/dist/sanitas/affiliations/client.js +19 -0
  53. package/dist/sanitas/affiliations/index.d.ts +5 -0
  54. package/dist/sanitas/affiliations/index.js +4 -0
  55. package/dist/sanitas/affiliations/models.d.ts +86 -0
  56. package/dist/sanitas/affiliations/models.js +9 -0
  57. package/dist/sanitas/client.d.ts +15 -0
  58. package/dist/sanitas/client.js +20 -0
  59. package/dist/sanitas/connections/client.d.ts +25 -0
  60. package/dist/sanitas/connections/client.js +18 -0
  61. package/dist/sanitas/connections/index.d.ts +5 -0
  62. package/dist/sanitas/connections/index.js +4 -0
  63. package/dist/sanitas/connections/models.d.ts +74 -0
  64. package/dist/sanitas/connections/models.js +9 -0
  65. package/dist/sanitas/index.d.ts +5 -0
  66. package/dist/sanitas/index.js +4 -0
  67. package/dist/sanitas/models.d.ts +220 -0
  68. package/dist/sanitas/models.js +3 -0
  69. package/package.json +3 -3
@@ -0,0 +1,40 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport } from "../_/index.js";
4
+ import { bind as bindAppointments, } from "./appointments/client.js";
5
+ import { bind as bindConnections, } from "./connections/client.js";
6
+ import { bind as bindPatients, } from "./patients/client.js";
7
+ import { bind as bindPayers, } from "./payers/client.js";
8
+ import { bind as bindProfessionals, } from "./professionals/client.js";
9
+ import { bind as bindServices, } from "./services/client.js";
10
+ export function createClient(options) {
11
+ return bind(new Transport(options));
12
+ }
13
+ export function bind(transport) {
14
+ let appointmentsClient;
15
+ let connectionsClient;
16
+ let patientsClient;
17
+ let payersClient;
18
+ let professionalsClient;
19
+ let servicesClient;
20
+ return {
21
+ get appointments() {
22
+ return (appointmentsClient ??= bindAppointments(transport));
23
+ },
24
+ get connections() {
25
+ return (connectionsClient ??= bindConnections(transport));
26
+ },
27
+ get patients() {
28
+ return (patientsClient ??= bindPatients(transport));
29
+ },
30
+ get payers() {
31
+ return (payersClient ??= bindPayers(transport));
32
+ },
33
+ get professionals() {
34
+ return (professionalsClient ??= bindProfessionals(transport));
35
+ },
36
+ get services() {
37
+ return (servicesClient ??= bindServices(transport));
38
+ },
39
+ };
40
+ }
@@ -0,0 +1,45 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { DeletedObjectResponse } from "../../models.js";
3
+ import { type OficlinicConnectionViewResponse } 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
+ * Invalidate the provider session of an e-Oficlinic connection of the
15
+ * caller's organization: its cookies and session state are forgotten at once,
16
+ * even during a read. Account retires the sealed credentials separately.
17
+ * Repeating the call answers the same.
18
+ */
19
+ delete(request: DeleteRequest, options?: RequestOptions): Promise<DeleteResponse>;
20
+ /**
21
+ * Get a connection
22
+ *
23
+ * Read an e-Oficlinic connection of the caller's organization: Account's name
24
+ * and status, the provider session's state and why it stopped, the selected
25
+ * company, site and IPS, and when it was verified and last used. It never
26
+ * contacts the provider and never returns credentials or cookies.
27
+ */
28
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
29
+ }
30
+ export declare function createClient(options: ClientOptions): Client;
31
+ export declare function bind(transport: Transport): Client;
32
+ export interface DeleteRequest {
33
+ /**
34
+ * An Account connection id of the caller's organization.
35
+ */
36
+ connectionId: string;
37
+ }
38
+ export type DeleteResponse = DeletedObjectResponse;
39
+ export interface GetRequest {
40
+ /**
41
+ * An Account connection id of the caller's organization.
42
+ */
43
+ connectionId: string;
44
+ }
45
+ export type GetResponse = OficlinicConnectionViewResponse;
@@ -0,0 +1,25 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { OficlinicConnectionViewResponseCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ delete: (request, options) => transport.send(DeleteOperation, request, options),
11
+ get: (request, options) => transport.send(GetOperation, request, options),
12
+ };
13
+ }
14
+ const DeleteOperation = {
15
+ method: "DELETE",
16
+ route: "/v1/oficlinic/connections/{connectionId}",
17
+ response: null,
18
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
+ };
20
+ const GetOperation = {
21
+ method: "GET",
22
+ route: "/v1/oficlinic/connections/{connectionId}",
23
+ response: OficlinicConnectionViewResponseCodec,
24
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
25
+ };
@@ -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, DeleteRequest, DeleteResponse, GetRequest, GetResponse, } from "./client.js";
5
+ export type { OficlinicConnectionView, OficlinicConnectionViewResponse, } 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,40 @@
1
+ import type { ResponseMetadata } from "../../models.js";
2
+ export interface OficlinicConnectionView {
3
+ context: {
4
+ companyId: string;
5
+ ipsId: string;
6
+ siteId: string;
7
+ } | null;
8
+ /**
9
+ * An Account connection id of the caller's organization.
10
+ */
11
+ id: string;
12
+ lastUsedAt: Temporal.Instant | null;
13
+ name: string;
14
+ /**
15
+ * ready serves reads; expired renews once from Account on the next read;
16
+ * signing_in is an interrupted sign-in the next read resumes; stopped needs a
17
+ * new verification; none has no local session.
18
+ */
19
+ session: "ready" | "expired" | "signing_in" | "stopped" | "none";
20
+ /**
21
+ * Account's status of the connection; only an active one serves reads.
22
+ */
23
+ status: "active" | "disabled" | "failed";
24
+ stopReason: "credentials_rejected" | "sign_in_unconfirmed" | "identity_mismatch" | "session_rejected" | "provider_changed" | null;
25
+ verifiedAt: Temporal.Instant | null;
26
+ }
27
+ /**
28
+ * A successful answer.
29
+ */
30
+ export interface OficlinicConnectionViewResponse {
31
+ data: OficlinicConnectionView;
32
+ error: null;
33
+ /**
34
+ * What every answer carries besides its data or error.
35
+ */
36
+ metadata: ResponseMetadata;
37
+ success: true;
38
+ }
39
+ export declare const OficlinicConnectionViewCodec: import("../../_/codec.js").Codec;
40
+ export declare const OficlinicConnectionViewResponseCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,10 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { instant, object } from "../../_/index.js";
4
+ export const OficlinicConnectionViewCodec = object([
5
+ ["lastUsedAt", null, instant],
6
+ ["verifiedAt", null, instant],
7
+ ]);
8
+ export const OficlinicConnectionViewResponseCodec = object([
9
+ ["data", null, () => OficlinicConnectionViewCodec],
10
+ ]);
@@ -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, } from "./client.js";
5
+ export type { OficlinicConnectionBusyFailure, OficlinicConnectionNotActiveFailure, OficlinicConnectionNotFoundError, OficlinicConnectionNotFoundFailure, OficlinicConnectionRequiredFailure, OficlinicContextNotAvailableFailure, OficlinicInvalidCursorFailure, OficlinicLoginCoolingDownFailure, OficlinicPatientRecordMismatchFailure, OficlinicProviderIdentityMismatchFailure, OficlinicReauthenticationRequiredFailure, OficlinicSignInOutcomeUnknownFailure, } 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,249 @@
1
+ import type { Empty, ResponseMetadata } from "../models.js";
2
+ /**
3
+ * Another operation is using this connection or signing in for the
4
+ * organization.
5
+ */
6
+ export interface OficlinicConnectionBusyFailure {
7
+ /**
8
+ * The failure code, stable across releases.
9
+ */
10
+ code: "CONNECTION_BUSY";
11
+ /**
12
+ * No fields.
13
+ */
14
+ data: Empty;
15
+ /**
16
+ * What went wrong, for people; it never contains input values.
17
+ */
18
+ message: string;
19
+ /**
20
+ * Whether repeating the same request may succeed.
21
+ */
22
+ retryable: true;
23
+ }
24
+ /**
25
+ * The connection is not active.
26
+ */
27
+ export interface OficlinicConnectionNotActiveFailure {
28
+ /**
29
+ * The failure code, stable across releases.
30
+ */
31
+ code: "CONNECTION_NOT_ACTIVE";
32
+ /**
33
+ * No fields.
34
+ */
35
+ data: Empty;
36
+ /**
37
+ * What went wrong, for people; it never contains input values.
38
+ */
39
+ message: string;
40
+ /**
41
+ * Whether repeating the same request may succeed.
42
+ */
43
+ retryable: false;
44
+ }
45
+ /**
46
+ * A failed answer.
47
+ */
48
+ export interface OficlinicConnectionNotFoundError {
49
+ data: null;
50
+ /**
51
+ * The connection does not exist in this organization.
52
+ */
53
+ error: OficlinicConnectionNotFoundFailure;
54
+ /**
55
+ * What every answer carries besides its data or error.
56
+ */
57
+ metadata: ResponseMetadata;
58
+ success: false;
59
+ }
60
+ /**
61
+ * The connection does not exist in this organization.
62
+ */
63
+ export interface OficlinicConnectionNotFoundFailure {
64
+ /**
65
+ * The failure code, stable across releases.
66
+ */
67
+ code: "CONNECTION_NOT_FOUND";
68
+ /**
69
+ * No fields.
70
+ */
71
+ data: Empty;
72
+ /**
73
+ * What went wrong, for people; it never contains input values.
74
+ */
75
+ message: string;
76
+ /**
77
+ * Whether repeating the same request may succeed.
78
+ */
79
+ retryable: false;
80
+ }
81
+ /**
82
+ * The organization has several active connections: select one.
83
+ */
84
+ export interface OficlinicConnectionRequiredFailure {
85
+ /**
86
+ * The failure code, stable across releases.
87
+ */
88
+ code: "CONNECTION_REQUIRED";
89
+ /**
90
+ * No fields.
91
+ */
92
+ data: Empty;
93
+ /**
94
+ * What went wrong, for people; it never contains input values.
95
+ */
96
+ message: string;
97
+ /**
98
+ * Whether repeating the same request may succeed.
99
+ */
100
+ retryable: false;
101
+ }
102
+ /**
103
+ * The selected company, site or IPS is not available to the provider account.
104
+ */
105
+ export interface OficlinicContextNotAvailableFailure {
106
+ /**
107
+ * The failure code, stable across releases.
108
+ */
109
+ code: "CONTEXT_NOT_AVAILABLE";
110
+ /**
111
+ * No fields.
112
+ */
113
+ data: Empty;
114
+ /**
115
+ * What went wrong, for people; it never contains input values.
116
+ */
117
+ message: string;
118
+ /**
119
+ * Whether repeating the same request may succeed.
120
+ */
121
+ retryable: false;
122
+ }
123
+ /**
124
+ * The cursor is invalid or belongs to another list.
125
+ */
126
+ export interface OficlinicInvalidCursorFailure {
127
+ /**
128
+ * The failure code, stable across releases.
129
+ */
130
+ code: "INVALID_CURSOR";
131
+ /**
132
+ * No fields.
133
+ */
134
+ data: Empty;
135
+ /**
136
+ * What went wrong, for people; it never contains input values.
137
+ */
138
+ message: string;
139
+ /**
140
+ * Whether repeating the same request may succeed.
141
+ */
142
+ retryable: false;
143
+ }
144
+ /**
145
+ * Provider sign-in is cooling down for this organization.
146
+ */
147
+ export interface OficlinicLoginCoolingDownFailure {
148
+ /**
149
+ * The failure code, stable across releases.
150
+ */
151
+ code: "LOGIN_COOLING_DOWN";
152
+ /**
153
+ * No fields.
154
+ */
155
+ data: Empty;
156
+ /**
157
+ * What went wrong, for people; it never contains input values.
158
+ */
159
+ message: string;
160
+ /**
161
+ * Whether repeating the same request may succeed.
162
+ */
163
+ retryable: true;
164
+ }
165
+ /**
166
+ * The provider answered a record that does not match the request.
167
+ */
168
+ export interface OficlinicPatientRecordMismatchFailure {
169
+ /**
170
+ * The failure code, stable across releases.
171
+ */
172
+ code: "PATIENT_RECORD_MISMATCH";
173
+ /**
174
+ * No fields.
175
+ */
176
+ data: Empty;
177
+ /**
178
+ * What went wrong, for people; it never contains input values.
179
+ */
180
+ message: string;
181
+ /**
182
+ * Whether repeating the same request may succeed.
183
+ */
184
+ retryable: false;
185
+ }
186
+ /**
187
+ * The provider session does not belong to the connection's user and selected
188
+ * context.
189
+ */
190
+ export interface OficlinicProviderIdentityMismatchFailure {
191
+ /**
192
+ * The failure code, stable across releases.
193
+ */
194
+ code: "PROVIDER_IDENTITY_MISMATCH";
195
+ /**
196
+ * No fields.
197
+ */
198
+ data: Empty;
199
+ /**
200
+ * What went wrong, for people; it never contains input values.
201
+ */
202
+ message: string;
203
+ /**
204
+ * Whether repeating the same request may succeed.
205
+ */
206
+ retryable: false;
207
+ }
208
+ /**
209
+ * Provider sign-in is stopped for this connection. Verify the connection again.
210
+ */
211
+ export interface OficlinicReauthenticationRequiredFailure {
212
+ /**
213
+ * The failure code, stable across releases.
214
+ */
215
+ code: "REAUTHENTICATION_REQUIRED";
216
+ /**
217
+ * No fields.
218
+ */
219
+ data: Empty;
220
+ /**
221
+ * What went wrong, for people; it never contains input values.
222
+ */
223
+ message: string;
224
+ /**
225
+ * Whether repeating the same request may succeed.
226
+ */
227
+ retryable: false;
228
+ }
229
+ /**
230
+ * The provider did not confirm a sign-in. It is not repeated automatically.
231
+ */
232
+ export interface OficlinicSignInOutcomeUnknownFailure {
233
+ /**
234
+ * The failure code, stable across releases.
235
+ */
236
+ code: "SIGN_IN_OUTCOME_UNKNOWN";
237
+ /**
238
+ * No fields.
239
+ */
240
+ data: Empty;
241
+ /**
242
+ * What went wrong, for people; it never contains input values.
243
+ */
244
+ message: string;
245
+ /**
246
+ * Whether repeating the same request may succeed.
247
+ */
248
+ retryable: false;
249
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -0,0 +1,26 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import { type OficlinicLookupPatientBody, type OficlinicLookupPatientResultResponse } from "./models.js";
3
+ export interface ClientOptions extends BaseClientOptions {
4
+ /**
5
+ * The URL the paths of the API are relative to.
6
+ */
7
+ baseUrl: string;
8
+ }
9
+ export interface Client {
10
+ /**
11
+ * Look up a patient by document
12
+ *
13
+ * Look up one patient in e-Oficlinic by citizenship card (CC) number, sent in
14
+ * the body and never in a URL. found answers a deliberately projected record
15
+ * (provider id, names, birth date, sex, address, phones, email, municipality)
16
+ * only when the provider returned a record with the requested document;
17
+ * not_found answers only the provider explicit negative. Any failure is not
18
+ * evidence that the patient is absent. This does not verify payer rights or
19
+ * the identity of the person presenting the document.
20
+ */
21
+ lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
22
+ }
23
+ export declare function createClient(options: ClientOptions): Client;
24
+ export declare function bind(transport: Transport): Client;
25
+ export type LookupRequest = OficlinicLookupPatientBody;
26
+ export type LookupResponse = OficlinicLookupPatientResultResponse;
@@ -0,0 +1,19 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { OficlinicLookupPatientResultResponseCodec, } 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/oficlinic/patients/lookup",
16
+ body: "flat",
17
+ response: OficlinicLookupPatientResultResponseCodec,
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 { OficlinicLookupPatientBadGatewayError, OficlinicLookupPatientBadGatewayFailure, OficlinicLookupPatientBody, OficlinicLookupPatientConflictError, OficlinicLookupPatientConflictFailure, OficlinicLookupPatientResult, OficlinicLookupPatientResultResponse, OficlinicLookupPatientServiceUnavailableError, OficlinicLookupPatientServiceUnavailableFailure, OficlinicLookupPatientTooManyRequestsError, OficlinicLookupPatientTooManyRequestsFailure, OficlinicLookupPatientUnprocessableContentError, OficlinicLookupPatientUnprocessableContentFailure, OficlinicPatient, OficlinicPatientFound, OficlinicPatientNotFound, } 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,128 @@
1
+ import type { CredentialsRejectedFailure, OutcomeUnknownFailure, ProviderProtocolChangedFailure, ProviderUnavailableFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { OficlinicConnectionBusyFailure, OficlinicConnectionNotActiveFailure, OficlinicConnectionRequiredFailure, OficlinicContextNotAvailableFailure, OficlinicLoginCoolingDownFailure, OficlinicPatientRecordMismatchFailure, OficlinicProviderIdentityMismatchFailure, OficlinicReauthenticationRequiredFailure, OficlinicSignInOutcomeUnknownFailure } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface OficlinicLookupPatientBadGatewayError {
7
+ data: null;
8
+ error: OficlinicLookupPatientBadGatewayFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: ResponseMetadata;
13
+ success: false;
14
+ }
15
+ export type OficlinicLookupPatientBadGatewayFailure = OutcomeUnknownFailure | OficlinicSignInOutcomeUnknownFailure | ProviderProtocolChangedFailure | OficlinicPatientRecordMismatchFailure;
16
+ export interface OficlinicLookupPatientBody {
17
+ /**
18
+ * An Account connection id of the caller's organization.
19
+ */
20
+ connectionId?: string;
21
+ /**
22
+ * The document number, digits only.
23
+ */
24
+ documentNumber: string;
25
+ /**
26
+ * Colombian citizenship card. Other document types are not verified against
27
+ * the provider yet.
28
+ */
29
+ documentType: "CC";
30
+ }
31
+ /**
32
+ * A failed answer.
33
+ */
34
+ export interface OficlinicLookupPatientConflictError {
35
+ data: null;
36
+ error: OficlinicLookupPatientConflictFailure;
37
+ /**
38
+ * What every answer carries besides its data or error.
39
+ */
40
+ metadata: ResponseMetadata;
41
+ success: false;
42
+ }
43
+ export type OficlinicLookupPatientConflictFailure = OficlinicConnectionRequiredFailure | OficlinicConnectionNotActiveFailure | OficlinicConnectionBusyFailure | OficlinicReauthenticationRequiredFailure;
44
+ export type OficlinicLookupPatientResult = OficlinicPatientFound | OficlinicPatientNotFound;
45
+ /**
46
+ * A successful answer.
47
+ */
48
+ export interface OficlinicLookupPatientResultResponse {
49
+ data: OficlinicLookupPatientResult;
50
+ error: null;
51
+ /**
52
+ * What every answer carries besides its data or error.
53
+ */
54
+ metadata: ResponseMetadata;
55
+ success: true;
56
+ }
57
+ /**
58
+ * A failed answer.
59
+ */
60
+ export interface OficlinicLookupPatientServiceUnavailableError {
61
+ data: null;
62
+ error: OficlinicLookupPatientServiceUnavailableFailure;
63
+ /**
64
+ * What every answer carries besides its data or error.
65
+ */
66
+ metadata: ResponseMetadata;
67
+ success: false;
68
+ }
69
+ export type OficlinicLookupPatientServiceUnavailableFailure = UpstreamUnavailableFailure | ProviderUnavailableFailure;
70
+ /**
71
+ * A failed answer.
72
+ */
73
+ export interface OficlinicLookupPatientTooManyRequestsError {
74
+ data: null;
75
+ error: OficlinicLookupPatientTooManyRequestsFailure;
76
+ /**
77
+ * What every answer carries besides its data or error.
78
+ */
79
+ metadata: ResponseMetadata;
80
+ success: false;
81
+ }
82
+ export type OficlinicLookupPatientTooManyRequestsFailure = RateLimitedFailure | OficlinicLoginCoolingDownFailure;
83
+ /**
84
+ * A failed answer.
85
+ */
86
+ export interface OficlinicLookupPatientUnprocessableContentError {
87
+ data: null;
88
+ error: OficlinicLookupPatientUnprocessableContentFailure;
89
+ /**
90
+ * What every answer carries besides its data or error.
91
+ */
92
+ metadata: ResponseMetadata;
93
+ success: false;
94
+ }
95
+ export type OficlinicLookupPatientUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure;
96
+ export interface OficlinicPatient {
97
+ address: string | null;
98
+ birthDate: string | null;
99
+ documentNumber: string;
100
+ documentType: string;
101
+ email: string | null;
102
+ familyName: string | null;
103
+ fullName: string | null;
104
+ givenName: string | null;
105
+ /**
106
+ * The provider's internal patient id, which appointment history refers to.
107
+ */
108
+ id: string;
109
+ mobilePhone: string | null;
110
+ municipalityCode: string | null;
111
+ phone: string | null;
112
+ sex: string | null;
113
+ zone: string | null;
114
+ }
115
+ export interface OficlinicPatientFound {
116
+ observedAt: Temporal.Instant;
117
+ patient: OficlinicPatient;
118
+ status: "found";
119
+ }
120
+ export interface OficlinicPatientNotFound {
121
+ observedAt: Temporal.Instant;
122
+ patient: null;
123
+ status: "not_found";
124
+ }
125
+ export declare const OficlinicLookupPatientResultCodec: import("../../_/codec.js").Codec;
126
+ export declare const OficlinicLookupPatientResultResponseCodec: import("../../_/codec.js").Codec;
127
+ export declare const OficlinicPatientFoundCodec: import("../../_/codec.js").Codec;
128
+ export declare const OficlinicPatientNotFoundCodec: 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 OficlinicLookupPatientResultCodec = union([() => OficlinicPatientFoundCodec, () => OficlinicPatientNotFoundCodec]);
5
+ export const OficlinicLookupPatientResultResponseCodec = object([
6
+ ["data", null, () => OficlinicLookupPatientResultCodec],
7
+ ]);
8
+ export const OficlinicPatientFoundCodec = object([
9
+ ["observedAt", null, instant],
10
+ ]);
11
+ export const OficlinicPatientNotFoundCodec = object([
12
+ ["observedAt", null, instant],
13
+ ]);