@arbol-ai/sdk 2.5.0 → 2.6.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.
@@ -92,6 +92,13 @@ export interface GmedicFailureResponse {
92
92
  };
93
93
  message: "This organization has no verified gMedic connection.";
94
94
  retryable: false;
95
+ } | {
96
+ code: "CATALOG_SEARCH_INCOMPLETE";
97
+ data: {
98
+ [key: string]: unknown;
99
+ };
100
+ message: "The service catalog search could not be completed within its limits. Service absence cannot be concluded.";
101
+ retryable: false;
95
102
  } | {
96
103
  code: "PROVIDER_ACCESS_REJECTED";
97
104
  data: {
@@ -1,6 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
2
  import type { ResponseMetadata } from "../../models.js";
3
- import type { GmedicServicesPage } from "./models.js";
3
+ import type { GmedicAgentServicesText, GmedicServicesPage } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
6
6
  * The URL the paths of the API are relative to.
@@ -11,8 +11,15 @@ export interface Client {
11
11
  /**
12
12
  * List services
13
13
  *
14
- * Use the organization gMedic account. Read-only request; provider failures
15
- * are never empty results.
14
+ * For voice/AI agents set agentMode=true: concise Spanish text, up to 10
15
+ * matches and a complete catalog cache of at most 60 seconds. Use q
16
+ * (name/code, accent-insensitive), active and kind filters; use a short
17
+ * distinctive term and limit 5 for a caller question. Filtered searches
18
+ * inspect all provider pages before returning matching entries. Incomplete
19
+ * scans fail explicitly. Without filters, returns one catalog page: follow
20
+ * pageInfo.nextCursor while hasNextPage is true before concluding an entry is
21
+ * absent. A generic procedure or missing price does not establish the
22
+ * requested service or tariff.
16
23
  */
17
24
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
18
25
  }
@@ -32,11 +39,39 @@ export interface ListRequest {
32
39
  * another cursor.
33
40
  */
34
41
  limit?: number;
42
+ /**
43
+ * Set true for voice/AI agents: compact Spanish text, at most 10 matches,
44
+ * complete catalog search and a tenant-isolated catalog cache of at most 60
45
+ * seconds.
46
+ */
47
+ agentMode?: boolean;
48
+ /**
49
+ * Bypass the agent catalog cache and read the provider now.
50
+ */
51
+ refresh?: boolean;
52
+ /**
53
+ * Exact catalog id. Use q for a service name or code.
54
+ */
35
55
  id?: string;
56
+ /**
57
+ * Search name, code and description across the catalog, ignoring accents and
58
+ * case. Use a distinctive word such as lavado. An empty completed search
59
+ * means no matching catalog entry, not that the clinic cannot perform the
60
+ * procedure.
61
+ */
62
+ q?: string;
63
+ /**
64
+ * Filter by the explicit catalog active flag. Omit to include unknown states.
65
+ */
66
+ active?: boolean;
67
+ /**
68
+ * Filter services or products. Use SERVICE for clinical service information.
69
+ */
70
+ kind?: "SERVICE" | "PRODUCT";
36
71
  connectionId?: string;
37
72
  }
38
73
  export interface ListResponse {
39
- data: GmedicServicesPage;
74
+ data: GmedicServicesPage | GmedicAgentServicesText;
40
75
  error: null;
41
76
  metadata: ResponseMetadata;
42
77
  success: true;
@@ -12,7 +12,7 @@ export function bind(transport) {
12
12
  const ListOperation = {
13
13
  method: "GET",
14
14
  route: "/v1/gmedic/services",
15
- query: { cursor: "cursor", direction: "direction", limit: "limit", id: "id", connectionId: "connectionId" },
15
+ query: { cursor: "cursor", direction: "direction", limit: "limit", agentMode: "agentMode", refresh: "refresh", id: "id", q: "q", active: "active", kind: "kind", connectionId: "connectionId" },
16
16
  response: null,
17
17
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
18
  };
@@ -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, ListRequest, ListResponse, } from "./client.js";
5
- export type { GmedicServicesPage } from "./models.js";
5
+ export type { GmedicAgentServicesText, GmedicServicesPage, } from "./models.js";
@@ -1,4 +1,7 @@
1
1
  import type { PageInfo } from "../../models.js";
2
+ export interface GmedicAgentServicesText {
3
+ text: string;
4
+ }
2
5
  export interface GmedicServicesPage {
3
6
  /**
4
7
  * Items admitted by this resource contract within the verified organization.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "2.5.0",
3
+ "version": "2.6.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",
@@ -50,8 +50,8 @@
50
50
  "packageManager": "bun@1.4.3",
51
51
  "arbol": {
52
52
  "openapi": {
53
- "release": "1.20261021.53505",
54
- "sha256": "3dbd465d9ddac7ecd1b00c5694419214ef02e6aa3925085dabaea80077fbfcca"
53
+ "release": "1.20261021.142621",
54
+ "sha256": "38b2a1f8990668b3b55c4da7ee4ecc6b906464cb5fd58e3dd448889b6145fd36"
55
55
  }
56
56
  }
57
57
  }