@arbol-ai/sdk 5.54.0 → 5.55.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.
@@ -10,9 +10,10 @@ export interface Client {
10
10
  /**
11
11
  * Look up eligibility
12
12
  *
13
- * Look up affiliate rights by exact document. Eligible coverage does not
14
- * authorize a procedure or determine patient charges. A noContract outcome is
15
- * distinct from inactive or unavailable.
13
+ * Look up affiliate rights by exact document. Verified results for the same
14
+ * document and connection are reused for seven days. Eligible coverage does
15
+ * not authorize a procedure or determine patient charges. A noContract
16
+ * outcome is distinct from inactive or unavailable.
16
17
  */
17
18
  lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
18
19
  }
@@ -37,10 +37,11 @@ export interface SuraLookupEligibilityBody {
37
37
  */
38
38
  documentNumber: string;
39
39
  /**
40
- * Document type. Defaults to CC. CE, RC and TI are read through the same
41
- * form.
40
+ * The patient's document type. Send CC (cédula de ciudadanía) when the person
41
+ * gives only a number; send CE (cédula de extranjería), RC (registro civil)
42
+ * or TI (tarjeta de identidad) when the person or the document names it.
42
43
  */
43
- documentType?: "CC" | "CE" | "RC" | "TI" | null;
44
+ documentType: "CC" | "CE" | "RC" | "TI";
44
45
  }
45
46
  /**
46
47
  * A failed answer.
@@ -41,10 +41,11 @@ export interface SuraLookupAuthorizationBody {
41
41
  */
42
42
  documentNumber: string;
43
43
  /**
44
- * Document type. Defaults to CC. CE, RC and TI are read through the same
45
- * form.
44
+ * The patient's document type. Send CC (cédula de ciudadanía) when the person
45
+ * gives only a number; send CE (cédula de extranjería), RC (registro civil)
46
+ * or TI (tarjeta de identidad) when the person or the document names it.
46
47
  */
47
- documentType?: "CC" | "CE" | "RC" | "TI" | null;
48
+ documentType: "CC" | "CE" | "RC" | "TI";
48
49
  /**
49
50
  * Issuer code before the hyphen in the authorization identifier.
50
51
  */
@@ -6,6 +6,7 @@ import { type Client as AvailabilityClient } from "./availability/client.js";
6
6
  import { type Client as BookingOptionsClient } from "./bookingOptions/client.js";
7
7
  import { type Client as ConnectionsClient } from "./connections/client.js";
8
8
  import { type Client as CopaysClient } from "./copays/client.js";
9
+ import { type Client as OperationTasksClient } from "./operationTasks/client.js";
9
10
  import { type Client as OperationsClient } from "./operations/client.js";
10
11
  import { type Client as PatientsClient } from "./patients/client.js";
11
12
  import { type Client as ProfessionalsClient } from "./professionals/client.js";
@@ -25,6 +26,7 @@ export interface Client {
25
26
  readonly bookingOptions: BookingOptionsClient;
26
27
  readonly connections: ConnectionsClient;
27
28
  readonly copays: CopaysClient;
29
+ readonly operationTasks: OperationTasksClient;
28
30
  readonly operations: OperationsClient;
29
31
  readonly patients: PatientsClient;
30
32
  readonly professionals: ProfessionalsClient;
@@ -8,6 +8,7 @@ import { bind as bindAvailability, } from "./availability/client.js";
8
8
  import { bind as bindBookingOptions, } from "./bookingOptions/client.js";
9
9
  import { bind as bindConnections, } from "./connections/client.js";
10
10
  import { bind as bindCopays, } from "./copays/client.js";
11
+ import { bind as bindOperationTasks, } from "./operationTasks/client.js";
11
12
  import { bind as bindOperations, } from "./operations/client.js";
12
13
  import { bind as bindPatients, } from "./patients/client.js";
13
14
  import { bind as bindProfessionals, } from "./professionals/client.js";
@@ -24,6 +25,7 @@ export function bind(transport) {
24
25
  let bookingOptionsClient;
25
26
  let connectionsClient;
26
27
  let copaysClient;
28
+ let operationTasksClient;
27
29
  let operationsClient;
28
30
  let patientsClient;
29
31
  let professionalsClient;
@@ -51,6 +53,9 @@ export function bind(transport) {
51
53
  get copays() {
52
54
  return (copaysClient ??= bindCopays(transport));
53
55
  },
56
+ get operationTasks() {
57
+ return (operationTasksClient ??= bindOperationTasks(transport));
58
+ },
54
59
  get operations() {
55
60
  return (operationsClient ??= bindOperations(transport));
56
61
  },
@@ -111,8 +111,8 @@ export interface SuraAuthorization {
111
111
  }[] | null;
112
112
  providerCode: string;
113
113
  /**
114
- * ENTREGADA, POR CONVENIO or ANULADA. An ANULADA authorization no longer
115
- * serves.
114
+ * ENTREGADA, POR CONVENIO, ANULADA or PAGADA. An ANULADA authorization no
115
+ * longer serves.
116
116
  */
117
117
  providerStatus: string;
118
118
  receivingProvider: {
@@ -0,0 +1,42 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { Empty } from "../../models.js";
3
+ import { type SuraOperationTaskResponse } 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
+ * Cancel a task
13
+ *
14
+ * Cancel a task you started that has not started running; one that has runs
15
+ * to its end.
16
+ */
17
+ cancel(request: CancelRequest, options?: RequestOptions): Promise<CancelResponse>;
18
+ /**
19
+ * Read a task
20
+ *
21
+ * Read a task you started: whether it still works, then the operation's value
22
+ * or failure.
23
+ */
24
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
25
+ }
26
+ export declare function createClient(options: ClientOptions): Client;
27
+ export declare function bind(transport: Transport): Client;
28
+ export interface CancelRequest {
29
+ /**
30
+ * The task id.
31
+ */
32
+ taskId: string;
33
+ body: Empty;
34
+ }
35
+ export type CancelResponse = SuraOperationTaskResponse;
36
+ export interface GetRequest {
37
+ /**
38
+ * The task id.
39
+ */
40
+ taskId: string;
41
+ }
42
+ export type GetResponse = SuraOperationTaskResponse;
@@ -0,0 +1,26 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { SuraOperationTaskResponseCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ cancel: (request, options) => transport.send(CancelOperation, request, options),
11
+ get: (request, options) => transport.send(GetOperation, request, options),
12
+ };
13
+ }
14
+ const CancelOperation = {
15
+ method: "POST",
16
+ route: "/v1/sura/operation-tasks/{taskId}/cancel",
17
+ body: "nested",
18
+ response: SuraOperationTaskResponseCodec,
19
+ errors: { "400": true, "401": true, "403": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
20
+ };
21
+ const GetOperation = {
22
+ method: "GET",
23
+ route: "/v1/sura/operation-tasks/{taskId}",
24
+ response: SuraOperationTaskResponseCodec,
25
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
26
+ };
@@ -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, CancelRequest, CancelResponse, GetRequest, GetResponse, } from "./client.js";
5
+ export type { SuraFailure, SuraOperationTask, SuraOperationTaskResponse, } 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,54 @@
1
+ import type { ResponseMetadata } from "../../models.js";
2
+ export interface SuraFailure {
3
+ /**
4
+ * The failure code, stable across releases.
5
+ */
6
+ code: string;
7
+ /**
8
+ * Diagnostics the code declares; empty for most codes.
9
+ */
10
+ data: {
11
+ [key: string]: unknown;
12
+ };
13
+ /**
14
+ * What went wrong, for people; it never contains input values.
15
+ */
16
+ message: string;
17
+ /**
18
+ * Whether repeating the same request may succeed.
19
+ */
20
+ retryable: boolean;
21
+ }
22
+ export interface SuraOperationTask {
23
+ createdAt: Temporal.Instant;
24
+ /**
25
+ * The operation's failure, once failed.
26
+ */
27
+ error?: SuraFailure;
28
+ lastUpdatedAt: Temporal.Instant;
29
+ pollIntervalMs: number;
30
+ /**
31
+ * The operation's value, once completed.
32
+ */
33
+ result?: unknown;
34
+ status: "working" | "completed" | "failed" | "cancelled";
35
+ taskId: string;
36
+ ttlMs: number;
37
+ }
38
+ /**
39
+ * A successful answer.
40
+ */
41
+ export interface SuraOperationTaskResponse {
42
+ /**
43
+ * A call that goes on after it was answered.
44
+ */
45
+ data: SuraOperationTask;
46
+ error: null;
47
+ /**
48
+ * What every answer carries besides its data or error.
49
+ */
50
+ metadata: ResponseMetadata;
51
+ success: true;
52
+ }
53
+ export declare const SuraOperationTaskCodec: import("../../_/codec.js").Codec;
54
+ export declare const SuraOperationTaskResponseCodec: 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 SuraOperationTaskCodec = object([
5
+ ["createdAt", null, instant],
6
+ ["lastUpdatedAt", null, instant],
7
+ ]);
8
+ export const SuraOperationTaskResponseCodec = object([
9
+ ["data", null, () => SuraOperationTaskCodec],
10
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "5.54.0",
3
+ "version": "5.55.0",
4
4
  "description": "The Arbol API for TypeScript and JavaScript, generated by Cloudflare Forge from the platform's public OpenAPI.",
5
5
  "keywords": [
6
6
  "arbol",
@@ -58,8 +58,8 @@
58
58
  "packageManager": "bun@1.4.3",
59
59
  "arbol": {
60
60
  "openapi": {
61
- "release": "1.20261111.205940",
62
- "sha256": "97756a7305948ba3086f980b2109847a2733b03f0245b151dff3aea1e0a6f334"
61
+ "release": "1.20261112.173149",
62
+ "sha256": "65ea07f7d13d4676ad71c33b8aacc2ee3205bc106d2fa42b9248c1caa96e6c64"
63
63
  }
64
64
  }
65
65
  }