@arbol-ai/sdk 2.10.0 → 2.12.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.
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
2
+ import type { NuevaEpsLookupAffiliationBody, NuevaEpsLookupAffiliationResultResponse } from "./models.js";
3
3
  export interface ClientOptions extends BaseClientOptions {
4
4
  /**
5
5
  * The URL the paths of the API are relative to.
@@ -10,42 +10,16 @@ export interface Client {
10
10
  /**
11
11
  * Look up member affiliation
12
12
  *
13
- * Read affiliation and the provider capitation warning. A provider failure is
14
- * never an absent member. No clinical writes are performed.
13
+ * Read member affiliation and primary-provider warnings. Default: structured
14
+ * JSON. Set agentMode=true for concise Spanish text; fields selects top-level
15
+ * output properties. Request member explicitly for additional personal data
16
+ * and timings for measured durations. A provider failure is never an absent
17
+ * member; active affiliation never authorizes a procedure or confirms a
18
+ * clinic contract. No clinical writes are performed.
15
19
  */
16
20
  lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
17
21
  }
18
22
  export declare function createClient(options: ClientOptions): Client;
19
23
  export declare function bind(transport: Transport): Client;
20
- export interface LookupRequest {
21
- connectionId?: string;
22
- /**
23
- * Member document number as a string; preserve leading zeros. Never an
24
- * organization selector.
25
- */
26
- documentNumber: string;
27
- /**
28
- * Document type code accepted by Nueva EPS; provider-specific codes retain
29
- * their original meaning.
30
- */
31
- documentType: "AS" | "CC" | "CD" | "CE" | "CN" | "ME" | "NT" | "NU" | "PC" | "PE" | "PS" | "PT" | "RC" | "SC" | "TI";
32
- }
33
- export interface LookupResponse {
34
- data: {
35
- affiliated: boolean;
36
- callerIsPrimaryProvider: boolean;
37
- category?: string;
38
- documentNumber: string;
39
- documentType: "AS" | "CC" | "CD" | "CE" | "CN" | "ME" | "NT" | "NU" | "PC" | "PE" | "PS" | "PT" | "RC" | "SC" | "TI";
40
- kind?: string;
41
- messages: {
42
- level: "error" | "info";
43
- text: string;
44
- }[];
45
- primaryProvider?: string;
46
- state?: string;
47
- };
48
- error: null;
49
- metadata: ResponseMetadata;
50
- success: true;
51
- }
24
+ export type LookupRequest = NuevaEpsLookupAffiliationBody;
25
+ export type LookupResponse = NuevaEpsLookupAffiliationResultResponse;
@@ -14,5 +14,5 @@ const LookupOperation = {
14
14
  route: "/v1/nueva-eps/affiliations/lookup",
15
15
  body: "flat",
16
16
  response: null,
17
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
17
+ errors: { "400": true, "401": true, "403": true, "409": true, "413": true, "415": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
18
18
  };
@@ -2,3 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
+ export type { NuevaEpsLookupAffiliationBadGatewayError, NuevaEpsLookupAffiliationBadGatewayFailure, NuevaEpsLookupAffiliationBody, NuevaEpsLookupAffiliationConflictError, NuevaEpsLookupAffiliationConflictFailure, NuevaEpsLookupAffiliationForbiddenError, NuevaEpsLookupAffiliationForbiddenFailure, NuevaEpsLookupAffiliationResult, NuevaEpsLookupAffiliationResultResponse, NuevaEpsLookupAffiliationServiceUnavailableError, NuevaEpsLookupAffiliationServiceUnavailableFailure, NuevaEpsLookupAffiliationTooManyRequestsError, NuevaEpsLookupAffiliationTooManyRequestsFailure, } from "./models.js";
@@ -0,0 +1,146 @@
1
+ import type { NuevaEpsForbiddenFailure, NuevaEpsLoginCooldownFailure, NuevaEpsLoginRejectedFailure, NuevaEpsNotConfiguredFailure, NuevaEpsOutcomeUnknownFailure, NuevaEpsPortalChangedFailure, NuevaEpsPortalUnavailableFailure, NuevaEpsRateLimitedFailure, NuevaEpsRegionBlockedFailure, NuevaEpsResponseMetadata, NuevaEpsSessionBusyFailure, NuevaEpsSessionRequiredFailure, NuevaEpsUpstreamUnavailableFailure } from "../models.js";
2
+ /**
3
+ * A failed answer.
4
+ */
5
+ export interface NuevaEpsLookupAffiliationBadGatewayError {
6
+ data: null;
7
+ error: NuevaEpsLookupAffiliationBadGatewayFailure;
8
+ /**
9
+ * What every answer carries besides its data or error.
10
+ */
11
+ metadata: NuevaEpsResponseMetadata;
12
+ success: false;
13
+ }
14
+ export type NuevaEpsLookupAffiliationBadGatewayFailure = NuevaEpsOutcomeUnknownFailure | NuevaEpsPortalChangedFailure;
15
+ export interface NuevaEpsLookupAffiliationBody {
16
+ /**
17
+ * True: concise Spanish text in data.text (HTTP) and MCP text content. False
18
+ * or omitted: structured JSON. Presentation never changes tenant, coverage or
19
+ * provider admission.
20
+ */
21
+ agentMode?: boolean;
22
+ connectionId?: string;
23
+ /**
24
+ * Member document number as a string; preserve leading zeros. Never an
25
+ * organization selector.
26
+ */
27
+ documentNumber: string;
28
+ /**
29
+ * Document type code accepted by Nueva EPS; provider-specific codes retain
30
+ * their original meaning.
31
+ */
32
+ documentType: "AS" | "CC" | "CD" | "CE" | "CN" | "ME" | "NT" | "NU" | "PC" | "PE" | "PS" | "PT" | "RC" | "SC" | "TI";
33
+ /**
34
+ * Return only these top-level fields. member opts into additional personal
35
+ * data; timings opts into measured durations. Omit for the standard
36
+ * affiliation record. Agent text always retains affiliation and
37
+ * primary-provider warnings.
38
+ */
39
+ fields?: ("documentType" | "documentNumber" | "affiliated" | "callerIsPrimaryProvider" | "state" | "kind" | "category" | "primaryProvider" | "messages" | "member" | "timings")[];
40
+ /**
41
+ * Include measured operation durations; equivalent to requesting timings in
42
+ * fields. Durations overlap as documented and are observations, not latency
43
+ * guarantees.
44
+ */
45
+ includeTimings?: boolean;
46
+ }
47
+ /**
48
+ * A failed answer.
49
+ */
50
+ export interface NuevaEpsLookupAffiliationConflictError {
51
+ data: null;
52
+ error: NuevaEpsLookupAffiliationConflictFailure;
53
+ /**
54
+ * What every answer carries besides its data or error.
55
+ */
56
+ metadata: NuevaEpsResponseMetadata;
57
+ success: false;
58
+ }
59
+ export type NuevaEpsLookupAffiliationConflictFailure = NuevaEpsNotConfiguredFailure | NuevaEpsSessionRequiredFailure | NuevaEpsSessionBusyFailure;
60
+ /**
61
+ * A failed answer.
62
+ */
63
+ export interface NuevaEpsLookupAffiliationForbiddenError {
64
+ data: null;
65
+ error: NuevaEpsLookupAffiliationForbiddenFailure;
66
+ /**
67
+ * What every answer carries besides its data or error.
68
+ */
69
+ metadata: NuevaEpsResponseMetadata;
70
+ success: false;
71
+ }
72
+ export type NuevaEpsLookupAffiliationForbiddenFailure = NuevaEpsForbiddenFailure | NuevaEpsLoginRejectedFailure;
73
+ export type NuevaEpsLookupAffiliationResult = {
74
+ affiliated?: boolean;
75
+ callerIsPrimaryProvider?: boolean;
76
+ category?: string;
77
+ documentNumber?: string;
78
+ documentType?: "AS" | "CC" | "CD" | "CE" | "CN" | "ME" | "NT" | "NU" | "PC" | "PE" | "PS" | "PT" | "RC" | "SC" | "TI";
79
+ kind?: string;
80
+ member?: {
81
+ address: string | null;
82
+ age: number | null;
83
+ birthDate: string | null;
84
+ city: string | null;
85
+ contributedWeeks: number | null;
86
+ queriedAt: string | null;
87
+ sex: string | null;
88
+ stateProvince: string | null;
89
+ telephone: string | null;
90
+ };
91
+ messages?: {
92
+ level: "error" | "info";
93
+ text: string;
94
+ }[];
95
+ primaryProvider?: string;
96
+ state?: string;
97
+ timings?: {
98
+ accountMs: number;
99
+ connectionMs: number;
100
+ lookupMs: number | null;
101
+ mappingMs: number;
102
+ sessionMs: number | null;
103
+ sessionReused: boolean | null;
104
+ totalMs: number;
105
+ };
106
+ } | {
107
+ text: string;
108
+ };
109
+ /**
110
+ * A successful answer.
111
+ */
112
+ export interface NuevaEpsLookupAffiliationResultResponse {
113
+ data: NuevaEpsLookupAffiliationResult;
114
+ error: null;
115
+ /**
116
+ * What every answer carries besides its data or error.
117
+ */
118
+ metadata: NuevaEpsResponseMetadata;
119
+ success: true;
120
+ }
121
+ /**
122
+ * A failed answer.
123
+ */
124
+ export interface NuevaEpsLookupAffiliationServiceUnavailableError {
125
+ data: null;
126
+ error: NuevaEpsLookupAffiliationServiceUnavailableFailure;
127
+ /**
128
+ * What every answer carries besides its data or error.
129
+ */
130
+ metadata: NuevaEpsResponseMetadata;
131
+ success: false;
132
+ }
133
+ export type NuevaEpsLookupAffiliationServiceUnavailableFailure = NuevaEpsUpstreamUnavailableFailure | NuevaEpsPortalUnavailableFailure | NuevaEpsRegionBlockedFailure;
134
+ /**
135
+ * A failed answer.
136
+ */
137
+ export interface NuevaEpsLookupAffiliationTooManyRequestsError {
138
+ data: null;
139
+ error: NuevaEpsLookupAffiliationTooManyRequestsFailure;
140
+ /**
141
+ * What every answer carries besides its data or error.
142
+ */
143
+ metadata: NuevaEpsResponseMetadata;
144
+ success: false;
145
+ }
146
+ export type NuevaEpsLookupAffiliationTooManyRequestsFailure = NuevaEpsRateLimitedFailure | NuevaEpsLoginCooldownFailure;
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import { type Connection, type ConnectionPage, type DeletedObject, type ResponseMetadata } from "../../models.js";
2
+ import { type NuevaEpsConnectionPageResponse, type NuevaEpsConnectionResponse, type NuevaEpsDeletedObjectResponse, type NuevaEpsVerifyConnectionBody, type NuevaEpsVerifyConnectionResultResponse } from "./models.js";
3
3
  export interface ClientOptions extends BaseClientOptions {
4
4
  /**
5
5
  * The URL the paths of the API are relative to.
@@ -40,26 +40,19 @@ export interface Client {
40
40
  export declare function createClient(options: ClientOptions): Client;
41
41
  export declare function bind(transport: Transport): Client;
42
42
  export interface DeleteRequest {
43
+ /**
44
+ * The id.
45
+ */
43
46
  id: string;
44
- body: {
45
- [key: string]: unknown;
46
- };
47
- }
48
- export interface DeleteResponse {
49
- data: DeletedObject;
50
- error: null;
51
- metadata: ResponseMetadata;
52
- success: true;
53
47
  }
48
+ export type DeleteResponse = NuevaEpsDeletedObjectResponse;
54
49
  export interface GetRequest {
50
+ /**
51
+ * The id.
52
+ */
55
53
  id: string;
56
54
  }
57
- export interface GetResponse {
58
- data: Connection;
59
- error: null;
60
- metadata: ResponseMetadata;
61
- success: true;
62
- }
55
+ export type GetResponse = NuevaEpsConnectionResponse;
63
56
  export interface ListRequest {
64
57
  /**
65
58
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -75,37 +68,11 @@ export interface ListRequest {
75
68
  */
76
69
  limit?: number;
77
70
  }
78
- export interface ListResponse {
79
- data: ConnectionPage;
80
- error: null;
81
- metadata: ResponseMetadata;
82
- success: true;
83
- }
84
- export interface VerifyRequest {
85
- connectionId: string;
86
- /**
87
- * Document type code accepted by Nueva EPS; provider-specific codes retain
88
- * their original meaning.
89
- */
90
- documentType: "AS" | "CC" | "CD" | "CE" | "CN" | "ME" | "NT" | "NU" | "PC" | "PE" | "PS" | "PT" | "RC" | "SC" | "TI";
91
- name: string;
92
- password: string;
71
+ export type ListResponse = NuevaEpsConnectionPageResponse;
72
+ export type VerifyRequest = {
93
73
  /**
94
- * Provider portal login identifier; separate from the member document being
95
- * queried.
74
+ * The connection id.
96
75
  */
97
- username: string;
98
- }
99
- export interface VerifyResponse {
100
- data: {
101
- stateRef: string;
102
- status: "active";
103
- summary: string;
104
- } | {
105
- errorCode: string;
106
- status: "rejected";
107
- };
108
- error: null;
109
- metadata: ResponseMetadata;
110
- success: true;
111
- }
76
+ connectionId: string;
77
+ } & NuevaEpsVerifyConnectionBody;
78
+ export type VerifyResponse = NuevaEpsVerifyConnectionResultResponse;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, object, } from "../../_/index.js";
4
- import { ConnectionCodec, ConnectionPageCodec, } from "../../models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { NuevaEpsConnectionPageResponseCodec, NuevaEpsConnectionResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -16,27 +16,26 @@ export function bind(transport) {
16
16
  const DeleteOperation = {
17
17
  method: "DELETE",
18
18
  route: "/v1/nueva-eps/connections/{id}",
19
- body: "nested",
20
19
  response: null,
21
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
20
+ errors: { "400": true, "401": true, "403": true, "409": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
22
21
  };
23
22
  const GetOperation = {
24
23
  method: "GET",
25
24
  route: "/v1/nueva-eps/connections/{id}",
26
- response: object([["data", null, () => ConnectionCodec]]),
27
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
25
+ response: NuevaEpsConnectionResponseCodec,
26
+ errors: { "400": true, "401": true, "403": true, "409": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
28
27
  };
29
28
  const ListOperation = {
30
29
  method: "GET",
31
30
  route: "/v1/nueva-eps/connections",
32
31
  query: { cursor: "cursor", direction: "direction", limit: "limit" },
33
- response: object([["data", null, () => ConnectionPageCodec]]),
34
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
32
+ response: NuevaEpsConnectionPageResponseCodec,
33
+ errors: { "400": true, "401": true, "403": true, "409": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
35
34
  };
36
35
  const VerifyOperation = {
37
36
  method: "POST",
38
37
  route: "/v1/nueva-eps/connections/{connectionId}/verify",
39
38
  body: "flat",
40
39
  response: null,
41
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
40
+ errors: { "400": true, "401": true, "403": true, "409": true, "413": true, "415": true, "429": true, "500": true, "501": true, "502": true, "503": true, "504": true },
42
41
  };
@@ -2,3 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, VerifyRequest, VerifyResponse, } from "./client.js";
5
+ export type { NuevaEpsConnectionPageResponse, NuevaEpsConnectionResponse, NuevaEpsDeleteConnectionBadGatewayError, NuevaEpsDeleteConnectionBadGatewayFailure, NuevaEpsDeleteConnectionConflictError, NuevaEpsDeleteConnectionConflictFailure, NuevaEpsDeleteConnectionForbiddenError, NuevaEpsDeleteConnectionForbiddenFailure, NuevaEpsDeleteConnectionServiceUnavailableError, NuevaEpsDeleteConnectionServiceUnavailableFailure, NuevaEpsDeleteConnectionTooManyRequestsError, NuevaEpsDeleteConnectionTooManyRequestsFailure, NuevaEpsDeletedObjectResponse, NuevaEpsGetConnectionBadGatewayError, NuevaEpsGetConnectionBadGatewayFailure, NuevaEpsGetConnectionConflictError, NuevaEpsGetConnectionConflictFailure, NuevaEpsGetConnectionForbiddenError, NuevaEpsGetConnectionForbiddenFailure, NuevaEpsGetConnectionServiceUnavailableError, NuevaEpsGetConnectionServiceUnavailableFailure, NuevaEpsGetConnectionTooManyRequestsError, NuevaEpsGetConnectionTooManyRequestsFailure, NuevaEpsListConnectionsBadGatewayError, NuevaEpsListConnectionsBadGatewayFailure, NuevaEpsListConnectionsConflictError, NuevaEpsListConnectionsConflictFailure, NuevaEpsListConnectionsForbiddenError, NuevaEpsListConnectionsForbiddenFailure, NuevaEpsListConnectionsServiceUnavailableError, NuevaEpsListConnectionsServiceUnavailableFailure, NuevaEpsListConnectionsTooManyRequestsError, NuevaEpsListConnectionsTooManyRequestsFailure, NuevaEpsVerifyConnectionBadGatewayError, NuevaEpsVerifyConnectionBadGatewayFailure, NuevaEpsVerifyConnectionBody, NuevaEpsVerifyConnectionConflictError, NuevaEpsVerifyConnectionConflictFailure, NuevaEpsVerifyConnectionForbiddenError, NuevaEpsVerifyConnectionForbiddenFailure, NuevaEpsVerifyConnectionResult, NuevaEpsVerifyConnectionResultResponse, NuevaEpsVerifyConnectionServiceUnavailableError, NuevaEpsVerifyConnectionServiceUnavailableFailure, NuevaEpsVerifyConnectionTooManyRequestsError, NuevaEpsVerifyConnectionTooManyRequestsFailure, } from "./models.js";