@arbol-ai/sdk 5.16.0 → 5.18.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.
package/README.md CHANGED
@@ -16,7 +16,7 @@ import { ApiError, createClient } from '@arbol-ai/sdk';
16
16
 
17
17
  const arbol = createClient({ baseUrl: 'https://api.getarbol.com', token });
18
18
 
19
- const { data } = await arbol.agenda.appointments.get({ id: 'eng_…' });
19
+ const { data } = await arbol.agenda.appointments.get({ appointmentId: 'eng_…' });
20
20
  data.startsAt; // Temporal.Instant
21
21
  ```
22
22
 
@@ -176,4 +176,6 @@ response envelope, `ApiError` and Temporal values keep their existing behavior.
176
176
 
177
177
  The Publish workflow accepts an existing main-branch `ref` to publish without creating
178
178
  a release commit. Set `announce` to false when coordinating the CLI release separately.
179
- This path uses the existing npm publisher and static verification; it does not run tests.
179
+ Generation applies `scripts/forge-path-segments.patch` to the pinned Forge transport so a path identifier of `.` or `..` fails before a request can reach a different route. The generation step fails if a future Forge version changes the patched code.
180
+
181
+ Publication runs the same type checks, SDK unit tests and build as pull requests. Run `bun test ./tests` to exercise the generated public client independently.
@@ -168,7 +168,11 @@ export class Transport {
168
168
  if (value === undefined || value === null || value === '') {
169
169
  throw new TypeError(`${field} is required: set it in the request or the client options`);
170
170
  }
171
- return encodeURIComponent(toParam(value));
171
+ const segment = toParam(value);
172
+ if (segment === '.' || segment === '..') {
173
+ throw new TypeError(`${field} cannot be a dot path segment`);
174
+ }
175
+ return encodeURIComponent(segment);
172
176
  });
173
177
  const url = new URL(this.#baseUrl + path);
174
178
  const query = url.searchParams;
@@ -13,6 +13,7 @@ import { type Client as OrganizationsClient } from "./organizations/client.js";
13
13
  import { type Client as PaymentsClient } from "./payments/client.js";
14
14
  import { type Client as PermissionsClient } from "./permissions/client.js";
15
15
  import { type Client as PersonalConsentsClient } from "./personalConsents/client.js";
16
+ import { type Client as RegistryInstallationsClient } from "./registryInstallations/client.js";
16
17
  import { type Client as RolesClient } from "./roles/client.js";
17
18
  import { type Client as UsageClient } from "./usage/client.js";
18
19
  import { type Client as UsageSummaryClient } from "./usageSummary/client.js";
@@ -38,6 +39,7 @@ export interface Client {
38
39
  readonly payments: PaymentsClient;
39
40
  readonly permissions: PermissionsClient;
40
41
  readonly personalConsents: PersonalConsentsClient;
42
+ readonly registryInstallations: RegistryInstallationsClient;
41
43
  readonly roles: RolesClient;
42
44
  readonly usage: UsageClient;
43
45
  readonly usageSummary: UsageSummaryClient;
@@ -15,6 +15,7 @@ import { bind as bindOrganizations, } from "./organizations/client.js";
15
15
  import { bind as bindPayments, } from "./payments/client.js";
16
16
  import { bind as bindPermissions, } from "./permissions/client.js";
17
17
  import { bind as bindPersonalConsents, } from "./personalConsents/client.js";
18
+ import { bind as bindRegistryInstallations, } from "./registryInstallations/client.js";
18
19
  import { bind as bindRoles, } from "./roles/client.js";
19
20
  import { bind as bindUsage, } from "./usage/client.js";
20
21
  import { bind as bindUsageSummary, } from "./usageSummary/client.js";
@@ -37,6 +38,7 @@ export function bind(transport) {
37
38
  let paymentsClient;
38
39
  let permissionsClient;
39
40
  let personalConsentsClient;
41
+ let registryInstallationsClient;
40
42
  let rolesClient;
41
43
  let usageClient;
42
44
  let usageSummaryClient;
@@ -84,6 +86,9 @@ export function bind(transport) {
84
86
  get personalConsents() {
85
87
  return (personalConsentsClient ??= bindPersonalConsents(transport));
86
88
  },
89
+ get registryInstallations() {
90
+ return (registryInstallationsClient ??= bindRegistryInstallations(transport));
91
+ },
87
92
  get roles() {
88
93
  return (rolesClient ??= bindRoles(transport));
89
94
  },
@@ -11,7 +11,8 @@ export interface Client {
11
11
  /**
12
12
  * Consult an included Colombian source
13
13
  *
14
- * Run one included consultation in the signed-in organization.
14
+ * Look up one authorized person by document type and number. ADRES returns
15
+ * their name when reported. Sisbén returns the official classification.
15
16
  */
16
17
  lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
17
18
  }
@@ -0,0 +1,21 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { AccountRegistryInstallationResponse, AccountUpdateRegistryInstallationBody } 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
+ * Set the installation of a Colombian registry
12
+ *
13
+ * Install or disable one Colombian registry in your organization. Agents also
14
+ * need an assignment to its tool.
15
+ */
16
+ update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
17
+ }
18
+ export declare function createClient(options: ClientOptions): Client;
19
+ export declare function bind(transport: Transport): Client;
20
+ export type UpdateRequest = AccountUpdateRegistryInstallationBody;
21
+ export type UpdateResponse = AccountRegistryInstallationResponse;
@@ -0,0 +1,18 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ export function createClient(options) {
5
+ return bind(new Transport(options));
6
+ }
7
+ export function bind(transport) {
8
+ return {
9
+ update: (request, options) => transport.send(UpdateOperation, request, options),
10
+ };
11
+ }
12
+ const UpdateOperation = {
13
+ method: "PATCH",
14
+ route: "/v1/account/registry-installations",
15
+ body: "flat",
16
+ response: null,
17
+ errors: { "400": true, "401": true, "403": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
+ };
@@ -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, UpdateRequest, UpdateResponse, } from "./client.js";
5
+ export type { AccountRegistryInstallation, AccountRegistryInstallationResponse, AccountUpdateRegistryInstallationBody, } 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,21 @@
1
+ import type { ResponseMetadata } from "../../models.js";
2
+ export interface AccountRegistryInstallation {
3
+ installed: boolean;
4
+ integration: string;
5
+ }
6
+ /**
7
+ * A successful answer.
8
+ */
9
+ export interface AccountRegistryInstallationResponse {
10
+ data: AccountRegistryInstallation;
11
+ error: null;
12
+ /**
13
+ * What every answer carries besides its data or error.
14
+ */
15
+ metadata: ResponseMetadata;
16
+ success: true;
17
+ }
18
+ export interface AccountUpdateRegistryInstallationBody {
19
+ installed: boolean;
20
+ integration: string;
21
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -9,6 +9,7 @@ export interface RaizAgent {
9
9
  address: string | null;
10
10
  channelType: "voice" | "whatsapp" | "web";
11
11
  id: string;
12
+ lastBusinessAppGreetingAt?: Temporal.Instant | null;
12
13
  name: string | null;
13
14
  status: "pending" | "active" | "degraded";
14
15
  }[];
@@ -3,6 +3,7 @@
3
3
  import { array, instant, object } from "../../_/index.js";
4
4
  import { RaizBusinessHoursCodec } from "../models.js";
5
5
  export const RaizAgentCodec = object([
6
+ ["channels", null, array(object([["lastBusinessAppGreetingAt", null, instant]]))],
6
7
  ["createdAt", null, instant],
7
8
  ["updatedAt", null, instant],
8
9
  ]);
@@ -14,10 +14,10 @@ export interface Client {
14
14
  * order; with q, only those whose code or name contains it. When none does,
15
15
  * the search is TOOL_REFUSED (SERVICE_SEARCH_NOT_FOUND), and
16
16
  * data.details.didYouMean holds up to three of the contract's services,
17
- * within the same filters, that Cloudflare AI Search finds closest in
18
- * meaning: suggestions to confirm, never substitutes. A contract without the
19
- * service asked for is TOOL_REFUSED (SERVICE_NOT_IN_CONTRACT), whose guidance
20
- * names the contract that has it. Catalog items that cannot be booked are not
17
+ * within the same filters, that the catalog search finds closest in meaning:
18
+ * suggestions to confirm, never substitutes. A contract without the service
19
+ * asked for is TOOL_REFUSED (SERVICE_NOT_IN_CONTRACT), whose guidance names
20
+ * the contract that has it. Catalog items that cannot be booked are not
21
21
  * appointment availability. A refusal is TOOL_REFUSED: data.reason says why,
22
22
  * data.guidance what to do next and data.details what it offers instead; it
23
23
  * is never an outage. Somos Salud's tool pack sets this tool's rules,
@@ -29,15 +29,14 @@ export interface Client {
29
29
  * Look up a contract's services
30
30
  *
31
31
  * The services of one of the clinic's contracts closest to a query: first
32
- * those whose code or name contains it (match words, score 1), then those
33
- * Cloudflare AI Search finds close in meaning (match meaning), at most limit
34
- * (5 by default). Every answer is one of the contract's current services,
35
- * within specialty when it is named; a match by meaning is a suggestion to
36
- * confirm with the person or the order, never a substitute for the service
37
- * ordered. An empty answer says nothing about coverage. CONTRACT_NOT_FOUND
38
- * when the clinic has no such contract; SERVICES_SEARCH_UNAVAILABLE when AI
39
- * Search cannot answer and no service matched by words. Contains no patient
40
- * data.
32
+ * those whose code or name contains it (match words, score 1), then those the
33
+ * catalog search finds close in meaning (match meaning), at most limit (5 by
34
+ * default). Every answer is one of the contract's current services, within
35
+ * specialty when it is named; a match by meaning is a suggestion to confirm
36
+ * with the person or the order, never a substitute for the service ordered.
37
+ * An empty answer says nothing about coverage. CONTRACT_NOT_FOUND when the
38
+ * clinic has no such contract; SERVICES_SEARCH_UNAVAILABLE when AI Search
39
+ * cannot answer and no service matched by words. Contains no patient data.
41
40
  */
42
41
  lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
43
42
  }
@@ -222,9 +222,9 @@ export interface SomosServiceMatch {
222
222
  */
223
223
  code: string;
224
224
  /**
225
- * words: the code or the name contains the query. meaning: Cloudflare AI
226
- * Search found it close to the query in meaning; confirm it with the person
227
- * or the order before using it.
225
+ * words: the code or the name contains the query. meaning: the catalog search
226
+ * found it close to the query in meaning; confirm it with the person or the
227
+ * order before using it.
228
228
  */
229
229
  match: "words" | "meaning";
230
230
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "5.16.0",
3
+ "version": "5.18.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",
@@ -45,10 +45,11 @@
45
45
  "forge": "cargo install --quiet --locked --git https://github.com/cloudflare/forge --rev 7f86447210b7bea3779bfdab3cd5655eade0eadb --root .forge forge",
46
46
  "openapi": "curl -fsS --proto =https --max-redirs 0 --max-filesize 33554432 -o openapi.json https://api.getarbol.com/openapi.json",
47
47
  "hash": "bun scripts/release.ts hash",
48
- "generate": "rm -rf src && .forge/bin/forge --target ts --out src openapi.json && bun scripts/release.ts record",
48
+ "generate": "rm -rf src && .forge/bin/forge --target ts --out src openapi.json && git apply scripts/forge-path-segments.patch && bun scripts/release.ts record",
49
49
  "typecheck": "tsc -p tsconfig.json --noEmit",
50
50
  "build": "rm -rf dist && tsc -p tsconfig.json",
51
- "verify": "bun run typecheck && bun run build"
51
+ "test": "bun test ./tests",
52
+ "verify": "bun run typecheck && bun run test && bun run build"
52
53
  },
53
54
  "devDependencies": {
54
55
  "typescript": "7.0.2"
@@ -56,8 +57,8 @@
56
57
  "packageManager": "bun@1.4.3",
57
58
  "arbol": {
58
59
  "openapi": {
59
- "release": "1.20261101.1558",
60
- "sha256": "0d5a89264ff219b7d1db9bb0c8c207ae0c2a5681f32ac5f9b1e6d9c0c0f12382"
60
+ "release": "1.20261101.15904",
61
+ "sha256": "9ec8c82f592d4e3c280d94c39ae5a578e8982bdd3fca4567a27e5848b70076e9"
61
62
  }
62
63
  }
63
64
  }