@arbol-ai/sdk 5.40.0 → 5.42.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 (43) 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/campaigns/client.d.ts +11 -2
  14. package/dist/raiz/campaigns/client.js +1 -1
  15. package/dist/raiz/campaigns/index.d.ts +1 -1
  16. package/dist/raiz/campaigns/models.d.ts +31 -4
  17. package/dist/raiz/conversations/models.d.ts +2 -0
  18. package/dist/raiz/models.d.ts +1 -1
  19. package/dist/saludTotal/affiliations/client.js +1 -1
  20. package/dist/saludTotal/affiliations/models.d.ts +3 -3
  21. package/dist/saludTotal/authorizations/client.d.ts +38 -9
  22. package/dist/saludTotal/authorizations/client.js +12 -4
  23. package/dist/saludTotal/authorizations/index.d.ts +2 -2
  24. package/dist/saludTotal/authorizations/models.d.ts +167 -4
  25. package/dist/saludTotal/authorizations/models.js +18 -1
  26. package/dist/saludTotal/filings/client.d.ts +1 -1
  27. package/dist/saludTotal/filings/client.js +2 -2
  28. package/dist/saludTotal/filings/index.d.ts +1 -1
  29. package/dist/saludTotal/filings/models.d.ts +50 -3
  30. package/dist/saludTotal/filings/models.js +4 -1
  31. package/dist/saludTotal/index.d.ts +1 -1
  32. package/dist/saludTotal/invoices/client.js +1 -1
  33. package/dist/saludTotal/invoices/models.d.ts +3 -3
  34. package/dist/saludTotal/models.d.ts +79 -48
  35. package/dist/saludTotal/models.js +1 -4
  36. package/dist/saludTotal/notices/client.js +1 -1
  37. package/dist/saludTotal/notices/models.d.ts +3 -3
  38. package/dist/visoft/appointments/client.d.ts +46 -1
  39. package/dist/visoft/appointments/client.js +9 -1
  40. package/dist/visoft/appointments/index.d.ts +2 -2
  41. package/dist/visoft/appointments/models.d.ts +82 -1
  42. package/dist/visoft/appointments/models.js +10 -1
  43. 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
+ ]);
@@ -38,7 +38,9 @@ export interface Client {
38
38
  * attempt, error and latest call or message; continue with `recipientsCursor`
39
39
  * (`recipientsDirection` reads the other way). `expand=readiness` says
40
40
  * whether it can start and lists what has to be fixed first, without reaching
41
- * anyone. Read it before `update_campaign` and send `expectedVersion`.
41
+ * anyone. `expand=results` counts what people answered, by the Agent's data
42
+ * definitions with options; each recipient also says their own. Read it
43
+ * before `update_campaign` and send `expectedVersion`.
42
44
  */
43
45
  get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
44
46
  /**
@@ -119,7 +121,8 @@ export interface GetRequest {
119
121
  */
120
122
  campaignId: string;
121
123
  /**
122
- * Related data to include, comma-separated: `recipients`, `readiness`.
124
+ * Related data to include, comma-separated: `recipients`, `readiness`,
125
+ * `results`.
123
126
  */
124
127
  expand?: string;
125
128
  /**
@@ -140,6 +143,12 @@ export interface GetRequest {
140
143
  * whose name contains this text.
141
144
  */
142
145
  recipientsQ?: string;
146
+ /**
147
+ * With `expand=recipients`: `definitionKey=optionKey`, only those whose
148
+ * latest answer is that option; `definitionKey=`, only those with no answer
149
+ * yet.
150
+ */
151
+ recipientsResult?: string;
143
152
  /**
144
153
  * `pending`: waiting for its (next) call or message. `in_progress`: being
145
154
  * called, or on WhatsApp waiting for a reply until a reminder is due.
@@ -24,7 +24,7 @@ const CreateOperation = {
24
24
  const GetOperation = {
25
25
  method: "GET",
26
26
  route: "/v1/raiz/campaigns/{campaignId}",
27
- query: { expand: "expand", recipientsCursor: "recipientsCursor", recipientsDirection: "recipientsDirection", recipientsLimit: "recipientsLimit", recipientsQ: "recipientsQ", recipientsStatus: "recipientsStatus" },
27
+ query: { expand: "expand", recipientsCursor: "recipientsCursor", recipientsDirection: "recipientsDirection", recipientsLimit: "recipientsLimit", recipientsQ: "recipientsQ", recipientsResult: "recipientsResult", recipientsStatus: "recipientsStatus" },
28
28
  response: object([["data", null, () => RaizCampaignCodec]]),
29
29
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
30
30
  };
@@ -2,4 +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, CreateRequest, CreateResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizCampaign, RaizCampaignBlocker, RaizCampaignPage, RaizCampaignProgress, RaizCampaignReadiness, RaizCampaignRecipientInput, RaizCampaignRecipientPage, RaizCampaignTemplate, RaizCampaignTemplateInput, } from "./models.js";
5
+ export type { RaizCampaign, RaizCampaignBlocker, RaizCampaignPage, RaizCampaignProgress, RaizCampaignReadiness, RaizCampaignRecipientInput, RaizCampaignRecipientPage, RaizCampaignResult, RaizCampaignTemplate, RaizCampaignTemplateInput, } from "./models.js";
@@ -52,6 +52,12 @@ export interface RaizCampaign {
52
52
  * latest attempt. Present only when expanded.
53
53
  */
54
54
  recipients?: RaizCampaignRecipientPage;
55
+ /**
56
+ * What people answered, for each data definition with options their Agent
57
+ * collects that has an answer yet. Answers arrive when a conversation closes
58
+ * and is analyzed, so they can keep arriving after the campaign ends.
59
+ */
60
+ results?: RaizCampaignResult[];
55
61
  retryAfterMinutes: number;
56
62
  retryOn: ("no_answer" | "failure" | "not_delivered")[];
57
63
  scheduledEndAt: Temporal.Instant | null;
@@ -164,10 +170,11 @@ export interface RaizCampaignRecipientInput {
164
170
  /**
165
171
  * Values for the `{{name}}` variables a WhatsApp template's parameters, or
166
172
  * the Agent's instructions, first message or this campaign's texts on a call,
167
- * reference. Raíz always provides `contact_name`, `contact_given_name` and
168
- * `contact_phone`, and on a call also `contact_id`, `conversation_id` and
169
- * `bulletins` (the business bulletins in force); a recipient's values never
170
- * replace them.
173
+ * reference. A reference means the variable that is the same word, whatever
174
+ * its accents and case: `{{País}}` reads `pais`, and an exact name wins. Raíz
175
+ * always provides `contact_name`, `contact_given_name` and `contact_phone`,
176
+ * and on a call also `contact_id`, `conversation_id` and `bulletins` (the
177
+ * business bulletins in force); a recipient's values never replace them.
171
178
  */
172
179
  variables?: {
173
180
  [key: string]: unknown;
@@ -180,6 +187,10 @@ export interface RaizCampaignRecipientPage {
180
187
  data: {
181
188
  address: string;
182
189
  attemptCount: number;
190
+ contact: {
191
+ id: string;
192
+ name: string | null;
193
+ } | null;
183
194
  contactId: string | null;
184
195
  createdAt: Temporal.Instant;
185
196
  deliveredAt: Temporal.Instant | null;
@@ -198,6 +209,11 @@ export interface RaizCampaignRecipientPage {
198
209
  nextAttemptAt: Temporal.Instant | null;
199
210
  readAt: Temporal.Instant | null;
200
211
  repliedAt: Temporal.Instant | null;
212
+ results: {
213
+ definitionKey: string;
214
+ label: string;
215
+ value: string;
216
+ }[];
201
217
  status: "pending" | "in_progress" | "completed" | "failed" | "cancelled";
202
218
  updatedAt: Temporal.Instant;
203
219
  variables: {
@@ -213,6 +229,17 @@ export interface RaizCampaignRecipientPage {
213
229
  */
214
230
  pageInfo: PageInfo;
215
231
  }
232
+ export interface RaizCampaignResult {
233
+ definition: {
234
+ key: string;
235
+ name: string;
236
+ };
237
+ values: {
238
+ key: string;
239
+ label: string;
240
+ people: number;
241
+ }[];
242
+ }
216
243
  export interface RaizCampaignTemplate {
217
244
  /**
218
245
  * The template's language: WhatsApp's code (`es`, `es_MX`) or a BCP 47 tag
@@ -86,9 +86,11 @@ export interface RaizConversation {
86
86
  origin: "inbound" | "manual" | "api" | "campaign" | "import" | "test";
87
87
  outcome: "success" | "failure" | "unknown" | null;
88
88
  outcomeReview?: {
89
+ basis?: "business_completion" | "policy_referral";
89
90
  confirmationMessageId: string | null;
90
91
  evidence: string;
91
92
  outcome: "success" | "failure" | "unknown";
93
+ policyMessageId?: string | null;
92
94
  reason: string;
93
95
  reviewedAt: Temporal.Instant;
94
96
  reviewedBy: string;
@@ -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";