@arbol-ai/sdk 2.13.0 → 2.15.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
@@ -118,3 +118,9 @@ repository and project-arbol-cli. npm publishing uses the organization secret `N
118
118
  ## License
119
119
 
120
120
  [Apache License 2.0](LICENSE)
121
+
122
+ ### Publishing a prepared source commit
123
+
124
+ The Publish workflow accepts an existing main-branch `ref` to publish without creating
125
+ a release commit. Set `announce` to false when coordinating the CLI release separately.
126
+ This path uses the existing npm publisher and static verification; it does not run tests.
@@ -70,6 +70,16 @@ export interface AgendaBookableOffering {
70
70
  * duration; null means no separate duration.
71
71
  */
72
72
  occupationMinutes: number | null;
73
+ /**
74
+ * Human-readable service hours and closures. Availability remains
75
+ * authoritative.
76
+ */
77
+ scheduleSummary: string;
78
+ /**
79
+ * IANA timezones of the agendas in this bounded projection; hours are
80
+ * interpreted locally.
81
+ */
82
+ scheduleTimezones: string[];
73
83
  /**
74
84
  * Current service policy and patient instructions; this projection does not
75
85
  * establish payer coverage.
@@ -243,7 +243,7 @@ export interface AgendaFailureResponse {
243
243
  data: {
244
244
  [key: string]: unknown;
245
245
  };
246
- message: "The requested operation does not exist.";
246
+ message: "The requested resource does not exist.";
247
247
  retryable: false;
248
248
  } | {
249
249
  code: "HTTP_METHOD_NOT_ALLOWED";
@@ -377,13 +377,6 @@ export interface AgendaFailureResponse {
377
377
  };
378
378
  message: "The integration service is temporarily unavailable. Retry later.";
379
379
  retryable: true;
380
- } | {
381
- code: "AUTHORIZATION_FAILED";
382
- data: {
383
- [key: string]: unknown;
384
- };
385
- message: "The identity provider could not authorize this action.";
386
- retryable: false;
387
380
  } | {
388
381
  code: "DURATION_CHANGE_OFF";
389
382
  data: {
@@ -496,13 +489,6 @@ export interface AgendaFailureResponse {
496
489
  };
497
490
  message: "Configure the required organization role before inviting a member.";
498
491
  retryable: false;
499
- } | {
500
- code: "SCHEDULING_CONFLICT";
501
- data: {
502
- [key: string]: unknown;
503
- };
504
- message: "The schedule changed or this action conflicts with its current state. Refresh before retrying.";
505
- retryable: false;
506
492
  } | {
507
493
  code: "SELF_DEMOTION";
508
494
  data: {
@@ -846,6 +832,20 @@ export interface AgendaFailureResponse {
846
832
  };
847
833
  message: "The waitlist entry changed; reload before saving.";
848
834
  retryable: false;
835
+ } | {
836
+ code: "REMOVAL_WORKFLOW_UNAVAILABLE";
837
+ data: {
838
+ [key: string]: unknown;
839
+ };
840
+ message: "Durable removal is unavailable here; use the bounded manual removal operations.";
841
+ retryable: false;
842
+ } | {
843
+ code: "REMOVAL_JOB_CONFLICT";
844
+ data: {
845
+ [key: string]: unknown;
846
+ };
847
+ message: "A removal is already active, or this idempotency key belongs to another decision.";
848
+ retryable: false;
849
849
  } | {
850
850
  code: "INVALID_BODY";
851
851
  data: {
@@ -45,7 +45,8 @@ export interface CreateRequest {
45
45
  */
46
46
  bufferBeforeMinutes?: number;
47
47
  /**
48
- * Maximum concurrent units this resource or offering can accept.
48
+ * Legacy concurrent-session limit above 1; details.maxConcurrent takes
49
+ * precedence. The historical default 1 delegates to resource capacity.
49
50
  */
50
51
  capacity?: number;
51
52
  /**
@@ -149,7 +150,8 @@ export interface UpdateRequest {
149
150
  */
150
151
  bufferBeforeMinutes?: number;
151
152
  /**
152
- * Maximum concurrent units this resource or offering can accept.
153
+ * Legacy concurrent-session limit above 1; details.maxConcurrent takes
154
+ * precedence. The historical default 1 delegates to resource capacity.
153
155
  */
154
156
  capacity?: number;
155
157
  /**
@@ -177,6 +179,16 @@ export interface UpdateRequest {
177
179
  * Display name of this catalog or configuration record.
178
180
  */
179
181
  name?: string;
182
+ /**
183
+ * Complete replacement for future bookings. Existing appointment and hold
184
+ * allocations stay unchanged.
185
+ */
186
+ resourceRequirements?: {
187
+ alternatives?: string[];
188
+ kind: "practitioner" | "assistant" | "room" | "chair" | "equipment" | "location" | "team" | "generic";
189
+ quantity?: number;
190
+ required?: boolean;
191
+ }[];
180
192
  /**
181
193
  * Minute spacing between candidate appointment start times.
182
194
  */
@@ -13,7 +13,8 @@ export interface AgendaOffering {
13
13
  */
14
14
  bufferBeforeMinutes: number;
15
15
  /**
16
- * Maximum concurrent units this resource or offering can accept.
16
+ * Legacy offering concurrency limit when above one and details.maxConcurrent
17
+ * is absent; one defers to resource capacity.
17
18
  */
18
19
  capacity: number;
19
20
  /**
@@ -12,22 +12,40 @@ export interface Client {
12
12
  /**
13
13
  * Add a patient to the waiting list
14
14
  *
15
- * Put a patient on the clinic's waiting list for the team to act on. Use
16
- * reason 'payer_review' instead of booking when the patient's payer (EPS) has
17
- * bookingPolicy 'staff_only' in get_intake_settings (create_appointment
18
- * refuses them): the team coordinates with the doctor and books it. Use
19
- * reason 'priority' right after create_appointment when the patient asked for
20
- * a priority (urgent) appointment: pass that appointment's id as
21
- * appointmentId so the team can bring it forward. Always pass
22
- * conversationUrl: this conversation's link in Arbol's Contactabilidad
23
- * (https://raiz.getarbol.com/conversations/…), so the team opens it there.
24
- * Pass the patient's name, document and documentType, phone, serviceId (and
25
- * resourceId only when the patient asked for one professional) and the payer
26
- * as the patient said it. Calling again for the same patient, service and
27
- * reason returns the same entry. Then tell the patient the clinic's team will
28
- * contact them.
15
+ * Put a patient on the clinic's waiting list for the team to act on, only
16
+ * with the person's consent. Use reason 'payer_review' instead of booking
17
+ * when the patient's payer (EPS) has bookingPolicy 'staff_only' in
18
+ * get_intake_settings (create_appointment refuses them): the team coordinates
19
+ * with the doctor and books it. Use reason 'priority' right after
20
+ * create_appointment when the patient asked for a priority (urgent)
21
+ * appointment: pass that appointment's id as appointmentId so the team can
22
+ * bring it forward. Always pass conversationUrl: this conversation's link in
23
+ * Arbol's Contactabilidad (https://raiz.getarbol.com/conversations/…), so the
24
+ * team opens it there. Pass the patient's name, document and documentType,
25
+ * phone, serviceId and the payer as the patient said it. Use resourceId only
26
+ * for the professional the person requested. Calling again for the same
27
+ * patient, service and reason returns the same open entry and updates
28
+ * supplied consented preferences, note, payer, conversation or appointment
29
+ * association. A supplied confirmed phone replaces the patient contact phone;
30
+ * omitted or null phone preserves it. Omitted fields preserve their values;
31
+ * resourceId:null explicitly accepts any professional. When supplying
32
+ * preferences, send the complete consented date/time window; null fields
33
+ * clear those limits. Identical repeats do not change the version. Staff
34
+ * status, priority and original queue position are preserved. A closed entry
35
+ * is not reopened. This registers a waiting-list request, never an
36
+ * appointment. Then tell the patient the clinic's team will contact them.
29
37
  */
30
38
  join(request: JoinRequest, options?: RequestOptions): Promise<JoinResponse>;
39
+ /**
40
+ * List Waitlist
41
+ *
42
+ * List the organization’s waitlist entries: open ones first (urgent, then the
43
+ * longest waiting), then closed ones, most recently changed first, up to 500.
44
+ * Narrow them by serviceId and resourceId (the agenda an entry asked for);
45
+ * offeringId finds only entries from before services and agendas were chosen
46
+ * separately.
47
+ */
48
+ list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
31
49
  }
32
50
  export declare function createClient(options: ClientOptions): Client;
33
51
  export declare function bind(transport: Transport): Client;
@@ -66,9 +84,18 @@ export interface JoinRequest {
66
84
  */
67
85
  payer?: string | null;
68
86
  /**
69
- * Patient contact telephone number; null when no number was recorded.
87
+ * The contact phone supplied or confirmed by the person for this request.
88
+ * Replaces their stored contact phone; omitted or null preserves it.
70
89
  */
71
90
  phone?: string | null;
91
+ /**
92
+ * Patient availability preferences retained with the waiting-list entry.
93
+ */
94
+ preferences?: {
95
+ from?: Temporal.PlainDate | null;
96
+ times?: string | null;
97
+ to?: Temporal.PlainDate | null;
98
+ };
72
99
  /**
73
100
  * manual records a consented waitlist request after no suitable availability;
74
101
  * payer_review asks staff to coordinate a restricted payer; priority asks
@@ -90,3 +117,29 @@ export interface JoinResponse {
90
117
  metadata: ResponseMetadata;
91
118
  success: true;
92
119
  }
120
+ export interface ListRequest {
121
+ /**
122
+ * Only entries recorded for this exact offering, which only entries from
123
+ * before services and agendas were chosen separately have; newer entries
124
+ * carry serviceId and resourceId instead.
125
+ */
126
+ offeringId?: string;
127
+ /**
128
+ * Only entries that asked for this professional or agenda; entries open to
129
+ * any agenda (resourceId null) are left out.
130
+ */
131
+ resourceId?: string;
132
+ /**
133
+ * Only entries for this service, whichever agenda they asked for.
134
+ */
135
+ serviceId?: string;
136
+ }
137
+ export interface ListResponse {
138
+ data: {
139
+ data: AgendaWaitlistEntry[];
140
+ object: "list";
141
+ };
142
+ error: null;
143
+ metadata: ResponseMetadata;
144
+ success: true;
145
+ }
@@ -1,6 +1,6 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, object, } from "../../_/index.js";
3
+ import { Transport, array, date, object, } from "../../_/index.js";
4
4
  import { AgendaWaitlistEntryCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
@@ -8,12 +8,21 @@ export function createClient(options) {
8
8
  export function bind(transport) {
9
9
  return {
10
10
  join: (request, options) => transport.send(JoinOperation, request, options),
11
+ list: (request, options) => transport.send(ListOperation, request, options),
11
12
  };
12
13
  }
13
14
  const JoinOperation = {
14
15
  method: "POST",
15
16
  route: "/v1/agenda/waitlist/join",
16
17
  body: "flat",
18
+ request: object([["preferences", null, object([["from", null, date], ["to", null, date]])]]),
17
19
  response: object([["data", null, () => AgendaWaitlistEntryCodec]]),
18
20
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
21
  };
22
+ const ListOperation = {
23
+ method: "GET",
24
+ route: "/v1/agenda/waitlist",
25
+ query: { offeringId: "offeringId", resourceId: "resourceId", serviceId: "serviceId" },
26
+ response: object([["data", null, object([["data", null, array(() => AgendaWaitlistEntryCodec)]])]]),
27
+ errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
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, JoinRequest, JoinResponse, } from "./client.js";
4
+ export type { Client, ClientOptions, JoinRequest, JoinResponse, ListRequest, ListResponse, } from "./client.js";
5
5
  export type { AgendaWaitlistEntry } from "./models.js";
@@ -145,6 +145,7 @@ export interface RaizAgentSettings {
145
145
  followUpAfterMinutes: number | null;
146
146
  followUpMessage: string | null;
147
147
  greeting: RaizAgentGreeting | null;
148
+ handoffMessage: string | null;
148
149
  humanEscalation: {
149
150
  instructions: string | null;
150
151
  } | null;
@@ -186,6 +187,7 @@ export interface RaizAgentSettingsInput {
186
187
  followUpAfterMinutes?: number | null;
187
188
  followUpMessage?: string | null;
188
189
  greeting?: RaizAgentGreeting | null;
190
+ handoffMessage?: string | null;
189
191
  humanEscalation?: {
190
192
  instructions: string | null;
191
193
  } | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "2.13.0",
3
+ "version": "2.15.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.20261028.150906",
54
- "sha256": "3d0ebf02604003a5c7ecc8ee62b01bf6f3370dbeff24255b54b67189168ed1f8"
53
+ "release": "1.20261028.202015",
54
+ "sha256": "268d85ea2cea9f6a0cc5de011c11912128724fb1e1a101e2b12cb628a5e2c13d"
55
55
  }
56
56
  }
57
57
  }