@arbol-ai/sdk 5.39.0 → 5.41.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 (41) hide show
  1. package/dist/client.d.ts +2 -0
  2. package/dist/client.js +5 -0
  3. package/dist/insights/client.d.ts +13 -0
  4. package/dist/insights/client.js +15 -0
  5. package/dist/insights/index.d.ts +4 -0
  6. package/dist/insights/index.js +4 -0
  7. package/dist/insights/reports/client.d.ts +57 -0
  8. package/dist/insights/reports/client.js +27 -0
  9. package/dist/insights/reports/index.d.ts +5 -0
  10. package/dist/insights/reports/index.js +4 -0
  11. package/dist/insights/reports/models.d.ts +166 -0
  12. package/dist/insights/reports/models.js +10 -0
  13. package/dist/raiz/conversations/client.d.ts +20 -17
  14. package/dist/raiz/conversations/models.d.ts +10 -0
  15. package/dist/raiz/conversations/models.js +1 -0
  16. package/dist/raiz/models.d.ts +1 -1
  17. package/dist/saludTotal/affiliations/client.js +1 -1
  18. package/dist/saludTotal/affiliations/models.d.ts +3 -3
  19. package/dist/saludTotal/authorizations/client.d.ts +38 -9
  20. package/dist/saludTotal/authorizations/client.js +12 -4
  21. package/dist/saludTotal/authorizations/index.d.ts +2 -2
  22. package/dist/saludTotal/authorizations/models.d.ts +167 -4
  23. package/dist/saludTotal/authorizations/models.js +18 -1
  24. package/dist/saludTotal/filings/client.d.ts +1 -1
  25. package/dist/saludTotal/filings/client.js +2 -2
  26. package/dist/saludTotal/filings/index.d.ts +1 -1
  27. package/dist/saludTotal/filings/models.d.ts +50 -3
  28. package/dist/saludTotal/filings/models.js +4 -1
  29. package/dist/saludTotal/index.d.ts +1 -1
  30. package/dist/saludTotal/invoices/client.js +1 -1
  31. package/dist/saludTotal/invoices/models.d.ts +3 -3
  32. package/dist/saludTotal/models.d.ts +79 -48
  33. package/dist/saludTotal/models.js +1 -4
  34. package/dist/saludTotal/notices/client.js +1 -1
  35. package/dist/saludTotal/notices/models.d.ts +3 -3
  36. package/dist/visoft/appointments/client.d.ts +46 -1
  37. package/dist/visoft/appointments/client.js +9 -1
  38. package/dist/visoft/appointments/index.d.ts +2 -2
  39. package/dist/visoft/appointments/models.d.ts +82 -1
  40. package/dist/visoft/appointments/models.js +10 -1
  41. package/package.json +3 -3
package/dist/client.d.ts CHANGED
@@ -5,6 +5,7 @@ import { type Client as AgendaClient } from "./agenda/client.js";
5
5
  import { type Client as AxxaClient } from "./axxa/client.js";
6
6
  import { type Client as ComfachocoClient } from "./comfachoco/client.js";
7
7
  import { type Client as GmedicClient } from "./gmedic/client.js";
8
+ import { type Client as InsightsClient } from "./insights/client.js";
8
9
  import { type Client as NuevaEpsClient } from "./nuevaEps/client.js";
9
10
  import { type Client as OficlinicClient } from "./oficlinic/client.js";
10
11
  import { type Client as PoliciaColombiaClient } from "./policiaColombia/client.js";
@@ -27,6 +28,7 @@ export interface Client {
27
28
  readonly axxa: AxxaClient;
28
29
  readonly comfachoco: ComfachocoClient;
29
30
  readonly gmedic: GmedicClient;
31
+ readonly insights: InsightsClient;
30
32
  readonly nuevaEps: NuevaEpsClient;
31
33
  readonly oficlinic: OficlinicClient;
32
34
  readonly policiaColombia: PoliciaColombiaClient;
package/dist/client.js CHANGED
@@ -7,6 +7,7 @@ import { bind as bindAgenda, } from "./agenda/client.js";
7
7
  import { bind as bindAxxa } from "./axxa/client.js";
8
8
  import { bind as bindComfachoco, } from "./comfachoco/client.js";
9
9
  import { bind as bindGmedic, } from "./gmedic/client.js";
10
+ import { bind as bindInsights, } from "./insights/client.js";
10
11
  import { bind as bindNuevaEps, } from "./nuevaEps/client.js";
11
12
  import { bind as bindOficlinic, } from "./oficlinic/client.js";
12
13
  import { bind as bindPoliciaColombia, } from "./policiaColombia/client.js";
@@ -26,6 +27,7 @@ export function bind(transport) {
26
27
  let axxaClient;
27
28
  let comfachocoClient;
28
29
  let gmedicClient;
30
+ let insightsClient;
29
31
  let nuevaEpsClient;
30
32
  let oficlinicClient;
31
33
  let policiaColombiaClient;
@@ -54,6 +56,9 @@ export function bind(transport) {
54
56
  get gmedic() {
55
57
  return (gmedicClient ??= bindGmedic(transport));
56
58
  },
59
+ get insights() {
60
+ return (insightsClient ??= bindInsights(transport));
61
+ },
57
62
  get nuevaEps() {
58
63
  return (nuevaEpsClient ??= bindNuevaEps(transport));
59
64
  },
@@ -0,0 +1,13 @@
1
+ import { type BaseClientOptions, Transport } from "../_/index.js";
2
+ import { type Client as ReportsClient } from "./reports/client.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
+ readonly reports: ReportsClient;
11
+ }
12
+ export declare function createClient(options: ClientOptions): Client;
13
+ export declare function bind(transport: Transport): Client;
@@ -0,0 +1,15 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport } from "../_/index.js";
4
+ import { bind as bindReports, } from "./reports/client.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ let reportsClient;
10
+ return {
11
+ get reports() {
12
+ return (reportsClient ??= bindReports(transport));
13
+ },
14
+ };
15
+ }
@@ -0,0 +1,4 @@
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";
@@ -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,57 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import { type InsightsGetReportResultResponse, type InsightsReportPageResponse } 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
+ * Read a report
12
+ *
13
+ * One report over a date range, for the caller's own organization. Figures
14
+ * refresh within 30 minutes.
15
+ */
16
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
17
+ /**
18
+ * List the available reports
19
+ *
20
+ * The reports this organization can read, a page at a time. Pass
21
+ * pageInfo.nextCursor as cursor for more.
22
+ */
23
+ list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
24
+ }
25
+ export declare function createClient(options: ClientOptions): Client;
26
+ export declare function bind(transport: Transport): Client;
27
+ export interface GetRequest {
28
+ /**
29
+ * The report id.
30
+ */
31
+ reportId: string;
32
+ /**
33
+ * A day, as YYYY-MM-DD.
34
+ */
35
+ from: Temporal.PlainDate;
36
+ /**
37
+ * A day, as YYYY-MM-DD.
38
+ */
39
+ to: Temporal.PlainDate;
40
+ }
41
+ export type GetResponse = InsightsGetReportResultResponse;
42
+ export interface ListRequest {
43
+ /**
44
+ * Opaque cursor returned by pageInfo; omit it to request the first page.
45
+ */
46
+ cursor?: string;
47
+ /**
48
+ * Direction to traverse the stable keyset ordering from the supplied cursor.
49
+ */
50
+ direction?: "forward" | "backward";
51
+ /**
52
+ * Maximum items returned in one page. Defaults to 25; larger reads require
53
+ * another cursor.
54
+ */
55
+ limit?: number;
56
+ }
57
+ export type ListResponse = InsightsReportPageResponse;
@@ -0,0 +1,27 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { InsightsGetReportResultResponseCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ get: (request, options) => transport.send(GetOperation, request, options),
11
+ list: (request, options) => transport.send(ListOperation, request, options),
12
+ };
13
+ }
14
+ const GetOperation = {
15
+ method: "GET",
16
+ route: "/v1/insights/reports/{reportId}",
17
+ query: { from: "from", to: "to" },
18
+ response: InsightsGetReportResultResponseCodec,
19
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
20
+ };
21
+ const ListOperation = {
22
+ method: "GET",
23
+ route: "/v1/insights/reports",
24
+ query: { cursor: "cursor", direction: "direction", limit: "limit" },
25
+ response: null,
26
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
27
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, GetRequest, GetResponse, ListRequest, ListResponse, } from "./client.js";
5
+ export type { InsightsGetReportResult, InsightsGetReportResultResponse, InsightsGetReportServiceUnavailableError, InsightsGetReportServiceUnavailableFailure, InsightsInvalidCursorFailure, InsightsListReportsBadRequestError, InsightsListReportsBadRequestFailure, InsightsReportNotFoundError, InsightsReportNotFoundFailure, InsightsReportPage, InsightsReportPageResponse, InsightsReportSummary, InsightsReportUnavailableFailure, } 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,166 @@
1
+ import type { Empty, InvalidInputFailure, PageInfo, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
+ export interface InsightsGetReportResult {
3
+ /**
4
+ * A day, as YYYY-MM-DD.
5
+ */
6
+ from: Temporal.PlainDate;
7
+ reportId: string;
8
+ /**
9
+ * One row per day and dimension, with the report's figures.
10
+ */
11
+ rows: {
12
+ [key: string]: unknown;
13
+ }[];
14
+ /**
15
+ * A day, as YYYY-MM-DD.
16
+ */
17
+ to: Temporal.PlainDate;
18
+ }
19
+ /**
20
+ * A successful answer.
21
+ */
22
+ export interface InsightsGetReportResultResponse {
23
+ data: InsightsGetReportResult;
24
+ error: null;
25
+ /**
26
+ * What every answer carries besides its data or error.
27
+ */
28
+ metadata: ResponseMetadata;
29
+ success: true;
30
+ }
31
+ /**
32
+ * A failed answer.
33
+ */
34
+ export interface InsightsGetReportServiceUnavailableError {
35
+ data: null;
36
+ error: InsightsGetReportServiceUnavailableFailure;
37
+ /**
38
+ * What every answer carries besides its data or error.
39
+ */
40
+ metadata: ResponseMetadata;
41
+ success: false;
42
+ }
43
+ export type InsightsGetReportServiceUnavailableFailure = UpstreamUnavailableFailure | InsightsReportUnavailableFailure;
44
+ /**
45
+ * The cursor does not name a page of this list.
46
+ */
47
+ export interface InsightsInvalidCursorFailure {
48
+ /**
49
+ * The failure code, stable across releases.
50
+ */
51
+ code: "INVALID_CURSOR";
52
+ /**
53
+ * No fields.
54
+ */
55
+ data: Empty;
56
+ /**
57
+ * What went wrong, for people; it never contains input values.
58
+ */
59
+ message: string;
60
+ /**
61
+ * Whether repeating the same request may succeed.
62
+ */
63
+ retryable: false;
64
+ }
65
+ /**
66
+ * A failed answer.
67
+ */
68
+ export interface InsightsListReportsBadRequestError {
69
+ data: null;
70
+ error: InsightsListReportsBadRequestFailure;
71
+ /**
72
+ * What every answer carries besides its data or error.
73
+ */
74
+ metadata: ResponseMetadata;
75
+ success: false;
76
+ }
77
+ export type InsightsListReportsBadRequestFailure = InvalidInputFailure | InsightsInvalidCursorFailure;
78
+ /**
79
+ * A failed answer.
80
+ */
81
+ export interface InsightsReportNotFoundError {
82
+ data: null;
83
+ /**
84
+ * There is no such report.
85
+ */
86
+ error: InsightsReportNotFoundFailure;
87
+ /**
88
+ * What every answer carries besides its data or error.
89
+ */
90
+ metadata: ResponseMetadata;
91
+ success: false;
92
+ }
93
+ /**
94
+ * There is no such report.
95
+ */
96
+ export interface InsightsReportNotFoundFailure {
97
+ /**
98
+ * The failure code, stable across releases.
99
+ */
100
+ code: "REPORT_NOT_FOUND";
101
+ /**
102
+ * No fields.
103
+ */
104
+ data: Empty;
105
+ /**
106
+ * What went wrong, for people; it never contains input values.
107
+ */
108
+ message: string;
109
+ /**
110
+ * Whether repeating the same request may succeed.
111
+ */
112
+ retryable: false;
113
+ }
114
+ export interface InsightsReportPage {
115
+ /**
116
+ * Items admitted by this resource contract within the verified organization.
117
+ */
118
+ data: InsightsReportSummary[];
119
+ /**
120
+ * Discriminator for a resource list response.
121
+ */
122
+ object: "list";
123
+ /**
124
+ * Opaque navigation cursors for this page’s stable keyset order.
125
+ */
126
+ pageInfo: PageInfo;
127
+ }
128
+ /**
129
+ * A successful answer.
130
+ */
131
+ export interface InsightsReportPageResponse {
132
+ data: InsightsReportPage;
133
+ error: null;
134
+ /**
135
+ * What every answer carries besides its data or error.
136
+ */
137
+ metadata: ResponseMetadata;
138
+ success: true;
139
+ }
140
+ export interface InsightsReportSummary {
141
+ description: string;
142
+ reportId: string;
143
+ }
144
+ /**
145
+ * The report cannot be read right now. Try again in a few minutes.
146
+ */
147
+ export interface InsightsReportUnavailableFailure {
148
+ /**
149
+ * The failure code, stable across releases.
150
+ */
151
+ code: "REPORT_UNAVAILABLE";
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: false;
164
+ }
165
+ export declare const InsightsGetReportResultCodec: import("../../_/codec.js").Codec;
166
+ export declare const InsightsGetReportResultResponseCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,10 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { date, object } from "../../_/index.js";
4
+ export const InsightsGetReportResultCodec = object([
5
+ ["from", null, date],
6
+ ["to", null, date],
7
+ ]);
8
+ export const InsightsGetReportResultResponseCodec = object([
9
+ ["data", null, () => InsightsGetReportResultCodec],
10
+ ]);
@@ -71,19 +71,20 @@ export interface Client {
71
71
  * the AI), `worker` (`ai` or `team`: who answers it now), the Agent's tools
72
72
  * (`toolName`, `toolStatus`: which tool it called and how the call ended), a
73
73
  * captured fact (`factDefinition`, `factValue`), `assessment` (`failed` or
74
- * `passed`), `toReview` (what needs a person's look: not resolved, or handed
75
- * to the team), length (`messagesMin`, `messagesMax`, `durationMin`,
76
- * `durationMax`), `campaignId`, `profileId`, `requestedBy` and start time
77
- * (`startedAfter`, `startedBefore`); `q` searches participant identities
78
- * (names, profile names, usernames, phones, emails and documents), visible
79
- * messages, titles, summaries and exact conversation references;
80
- * `count_conversations` counts every match. Each item already carries its
81
- * title, summary, outcome, sentiment, workers and tool calls (how many, how
82
- * many failed, the latest failure), often enough to answer. `sort`: `started`
83
- * (newest first), `last_message` (latest activity first) or `changed`, the
84
- * feed of status, outcome and analysis changes, oldest first, that systems
85
- * poll from a saved `pageInfo.nextCursor` (a deleted conversation appears
86
- * once with `deletedAt`). Next: `get_conversation` for a transcript.
74
+ * `passed`), `toReview` (evaluated failures or unresolved handoffs;
75
+ * explicitly resolved successes leave this queue), length (`messagesMin`,
76
+ * `messagesMax`, `durationMin`, `durationMax`), `campaignId`, `profileId`,
77
+ * `requestedBy` and start time (`startedAfter`, `startedBefore`); `q`
78
+ * searches participant identities (names, profile names, usernames, phones,
79
+ * emails and documents), visible messages, titles, summaries and exact
80
+ * conversation references; `count_conversations` counts every match. Each
81
+ * item already carries its title, summary, outcome, sentiment, workers and
82
+ * tool calls (how many, how many failed, the latest failure), often enough to
83
+ * answer. `sort`: `started` (newest first), `last_message` (latest activity
84
+ * first) or `changed`, the feed of status, outcome and analysis changes,
85
+ * oldest first, that systems poll from a saved `pageInfo.nextCursor` (a
86
+ * deleted conversation appears once with `deletedAt`). Next:
87
+ * `get_conversation` for a transcript.
87
88
  */
88
89
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
89
90
  /**
@@ -265,8 +266,9 @@ export interface CountRequest {
265
266
  assessment?: "failed" | "passed";
266
267
  /**
267
268
  * `true`: conversations to review, as `get_report` counts them in
268
- * `toReviewCount`: the analysis says the request was not resolved, or the AI
269
- * handed the conversation to the team. `false`: the others.
269
+ * `toReviewCount`: evaluated failures or unresolved escalations. A success
270
+ * explicitly resolved by the team leaves this queue without erasing its
271
+ * escalation history. `false`: the others.
270
272
  */
271
273
  toReview?: boolean;
272
274
  /**
@@ -487,8 +489,9 @@ export interface ListRequest {
487
489
  assessment?: "failed" | "passed";
488
490
  /**
489
491
  * `true`: conversations to review, as `get_report` counts them in
490
- * `toReviewCount`: the analysis says the request was not resolved, or the AI
491
- * handed the conversation to the team. `false`: the others.
492
+ * `toReviewCount`: evaluated failures or unresolved escalations. A success
493
+ * explicitly resolved by the team leaves this queue without erasing its
494
+ * escalation history. `false`: the others.
492
495
  */
493
496
  toReview?: boolean;
494
497
  /**
@@ -85,6 +85,16 @@ export interface RaizConversation {
85
85
  */
86
86
  origin: "inbound" | "manual" | "api" | "campaign" | "import" | "test";
87
87
  outcome: "success" | "failure" | "unknown" | null;
88
+ outcomeReview?: {
89
+ basis?: "business_completion" | "policy_referral";
90
+ confirmationMessageId: string | null;
91
+ evidence: string;
92
+ outcome: "success" | "failure" | "unknown";
93
+ policyMessageId?: string | null;
94
+ reason: string;
95
+ reviewedAt: Temporal.Instant;
96
+ reviewedBy: string;
97
+ } | null;
88
98
  profileId: string | null;
89
99
  recording?: SignedUrl | null;
90
100
  recordingAvailable: boolean;
@@ -11,6 +11,7 @@ export const RaizConversationCodec = object([
11
11
  ["facts", null, array(() => RaizFactCodec)],
12
12
  ["lastMessageAt", null, instant],
13
13
  ["messages", null, () => RaizMessagePageCodec],
14
+ ["outcomeReview", null, object([["reviewedAt", null, instant]])],
14
15
  ["recording", null, () => SignedUrlCodec],
15
16
  ["startedAt", null, instant],
16
17
  ["updatedAt", null, instant],
@@ -310,7 +310,7 @@ export interface RaizFailureResponse {
310
310
  data: {
311
311
  [key: string]: unknown;
312
312
  };
313
- message: "The requested operation does not exist.";
313
+ message: "The requested resource does not exist.";
314
314
  retryable: false;
315
315
  } | {
316
316
  code: "HTTP_METHOD_NOT_ALLOWED";
@@ -14,5 +14,5 @@ const LookupOperation = {
14
14
  route: "/v1/salud-total/affiliations/lookup",
15
15
  body: "flat",
16
16
  response: null,
17
- errors: { "400": true, "401": true, "403": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
17
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
18
  };
@@ -1,5 +1,5 @@
1
1
  import type { ForbiddenFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import type { SaludTotalAccountUnavailableFailure, SaludTotalConnectionUnavailableFailure, SaludTotalCredentialsRejectedFailure, SaludTotalInteractiveVerificationRequiredFailure, SaludTotalIpsIdentityMismatchFailure, SaludTotalLoginCoolingDownFailure, SaludTotalModuleForbiddenFailure, SaludTotalPortalAccessUnverifiedFailure, SaludTotalProviderUnavailableFailure, SaludTotalSessionClosedFailure, SaludTotalSessionExpiredFailure, SaludTotalSiteUnavailableFailure } from "../models.js";
2
+ import type { SaludTotalAccountUnavailableFailure, SaludTotalAuthorizationDocumentUnavailableFailure, SaludTotalAuthorizationStoreUnavailableFailure, SaludTotalConnectionUnavailableFailure, SaludTotalCredentialsRejectedFailure, SaludTotalInteractiveVerificationRequiredFailure, SaludTotalIpsIdentityMismatchFailure, SaludTotalLoginCoolingDownFailure, SaludTotalModuleForbiddenFailure, SaludTotalPortalAccessUnverifiedFailure, SaludTotalProviderUnavailableFailure, SaludTotalSessionClosedFailure, SaludTotalSessionExpiredFailure, SaludTotalSiteUnavailableFailure } from "../models.js";
3
3
  export interface SaludTotalAffiliationLookup {
4
4
  providerStatus: string | null;
5
5
  status: "matched" | "no_match" | "ambiguous";
@@ -36,7 +36,7 @@ export interface SaludTotalLookupAffiliationConflictError {
36
36
  metadata: ResponseMetadata;
37
37
  success: false;
38
38
  }
39
- export type SaludTotalLookupAffiliationConflictFailure = SaludTotalConnectionUnavailableFailure | SaludTotalSessionClosedFailure | SaludTotalInteractiveVerificationRequiredFailure | SaludTotalCredentialsRejectedFailure | SaludTotalIpsIdentityMismatchFailure;
39
+ export type SaludTotalLookupAffiliationConflictFailure = SaludTotalAuthorizationDocumentUnavailableFailure | SaludTotalConnectionUnavailableFailure | SaludTotalSessionClosedFailure | SaludTotalInteractiveVerificationRequiredFailure | SaludTotalCredentialsRejectedFailure | SaludTotalIpsIdentityMismatchFailure;
40
40
  /**
41
41
  * A failed answer.
42
42
  */
@@ -62,7 +62,7 @@ export interface SaludTotalLookupAffiliationServiceUnavailableError {
62
62
  metadata: ResponseMetadata;
63
63
  success: false;
64
64
  }
65
- export type SaludTotalLookupAffiliationServiceUnavailableFailure = UpstreamUnavailableFailure | SaludTotalAccountUnavailableFailure | SaludTotalSessionExpiredFailure | SaludTotalProviderUnavailableFailure;
65
+ export type SaludTotalLookupAffiliationServiceUnavailableFailure = UpstreamUnavailableFailure | SaludTotalAuthorizationStoreUnavailableFailure | SaludTotalAccountUnavailableFailure | SaludTotalSessionExpiredFailure | SaludTotalProviderUnavailableFailure;
66
66
  /**
67
67
  * A failed answer.
68
68
  */
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import { type SaludTotalRecordAvailabilityResponse, type SaludTotalScopedDayLookup } from "../models.js";
2
+ import { type SaludTotalAuthorizationPageResponse, type SaludTotalLookupAuthorizationsBody, type SaludTotalLookupAuthorizationsResultResponse } from "./models.js";
3
3
  export interface ClientOptions extends BaseClientOptions {
4
4
  /**
5
5
  * The URL the paths of the API are relative to.
@@ -8,17 +8,46 @@ export interface ClientOptions extends BaseClientOptions {
8
8
  }
9
9
  export interface Client {
10
10
  /**
11
- * Look up authorization records for one member, site and day
11
+ * List stored authorizations
12
12
  *
13
- * Availability of authorization records for the matched member and selected
14
- * site on one calendar day. A missing row is not a denial. Returns a count or
15
- * location_required with permitted choices. Start without branchId or siteId.
16
- * For location_required, repeat with the chosen ID in field, or pass
17
- * nextChoiceCursor as choiceCursor for more choices.
13
+ * Page the authorizations already observed for an active IPS connection. Each
14
+ * record retains its source timestamp. This does not refresh the provider.
15
+ * Follow pageInfo.nextCursor for all records.
16
+ */
17
+ list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
18
+ /**
19
+ * Consult and store authorizations from the IPS report
20
+ *
21
+ * Pass from/to and a permitted site to query the IPS report without a member
22
+ * filter, store each authorization and return one page with its number,
23
+ * provider status, validity and document state. The source permits at most 30
24
+ * days. Location choices are returned when needed. The legacy member/day
25
+ * input still returns a count. A provider status is preserved verbatim; a
26
+ * filing number is not approval.
18
27
  */
19
28
  lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
20
29
  }
21
30
  export declare function createClient(options: ClientOptions): Client;
22
31
  export declare function bind(transport: Transport): Client;
23
- export type LookupRequest = SaludTotalScopedDayLookup;
24
- export type LookupResponse = SaludTotalRecordAvailabilityResponse;
32
+ export interface ListRequest {
33
+ /**
34
+ * The connection id.
35
+ */
36
+ connectionId: string;
37
+ /**
38
+ * Opaque cursor returned by pageInfo; omit it to request the first page.
39
+ */
40
+ cursor?: string;
41
+ /**
42
+ * Direction to traverse the stable keyset ordering from the supplied cursor.
43
+ */
44
+ direction?: "forward" | "backward";
45
+ /**
46
+ * Maximum items returned in one page. Defaults to 25; larger reads require
47
+ * another cursor.
48
+ */
49
+ limit?: number;
50
+ }
51
+ export type ListResponse = SaludTotalAuthorizationPageResponse;
52
+ export type LookupRequest = SaludTotalLookupAuthorizationsBody;
53
+ export type LookupResponse = SaludTotalLookupAuthorizationsResultResponse;
@@ -1,20 +1,28 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { Transport, } from "../../_/index.js";
4
- import { SaludTotalScopedDayLookupCodec, } from "../models.js";
4
+ import { SaludTotalAuthorizationPageResponseCodec, SaludTotalLookupAuthorizationsBodyCodec, SaludTotalLookupAuthorizationsResultResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
8
8
  export function bind(transport) {
9
9
  return {
10
+ list: (request, options) => transport.send(ListOperation, request, options),
10
11
  lookup: (request, options) => transport.send(LookupOperation, request, options),
11
12
  };
12
13
  }
14
+ const ListOperation = {
15
+ method: "GET",
16
+ route: "/v1/salud-total/authorizations",
17
+ query: { connectionId: "connectionId", cursor: "cursor", direction: "direction", limit: "limit" },
18
+ response: SaludTotalAuthorizationPageResponseCodec,
19
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "429": true, "500": true, "502": true, "503": true, "504": true },
20
+ };
13
21
  const LookupOperation = {
14
22
  method: "POST",
15
23
  route: "/v1/salud-total/authorizations/lookup",
16
24
  body: "flat",
17
- request: SaludTotalScopedDayLookupCodec,
18
- response: null,
19
- errors: { "400": true, "401": true, "403": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
25
+ request: SaludTotalLookupAuthorizationsBodyCodec,
26
+ response: SaludTotalLookupAuthorizationsResultResponseCodec,
27
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
20
28
  };
@@ -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, LookupRequest, LookupResponse, } from "./client.js";
5
- export type { SaludTotalLookupAuthorizationsConflictError, SaludTotalLookupAuthorizationsConflictFailure, SaludTotalLookupAuthorizationsForbiddenError, SaludTotalLookupAuthorizationsForbiddenFailure, SaludTotalLookupAuthorizationsServiceUnavailableError, SaludTotalLookupAuthorizationsServiceUnavailableFailure, SaludTotalLookupAuthorizationsTooManyRequestsError, SaludTotalLookupAuthorizationsTooManyRequestsFailure, } from "./models.js";
4
+ export type { Client, ClientOptions, ListRequest, ListResponse, LookupRequest, LookupResponse, } from "./client.js";
5
+ export type { SaludTotalAuthorization, SaludTotalAuthorizationPage, SaludTotalAuthorizationPageResponse, SaludTotalListAuthorizationsConflictError, SaludTotalListAuthorizationsConflictFailure, SaludTotalListAuthorizationsForbiddenError, SaludTotalListAuthorizationsForbiddenFailure, SaludTotalListAuthorizationsServiceUnavailableError, SaludTotalListAuthorizationsServiceUnavailableFailure, SaludTotalListAuthorizationsTooManyRequestsError, SaludTotalListAuthorizationsTooManyRequestsFailure, SaludTotalLookupAuthorizationsBody, SaludTotalLookupAuthorizationsConflictError, SaludTotalLookupAuthorizationsConflictFailure, SaludTotalLookupAuthorizationsForbiddenError, SaludTotalLookupAuthorizationsForbiddenFailure, SaludTotalLookupAuthorizationsResult, SaludTotalLookupAuthorizationsResultResponse, SaludTotalLookupAuthorizationsServiceUnavailableError, SaludTotalLookupAuthorizationsServiceUnavailableFailure, SaludTotalLookupAuthorizationsTooManyRequestsError, SaludTotalLookupAuthorizationsTooManyRequestsFailure, } from "./models.js";