@arbol-ai/sdk 2.2.0 → 2.4.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
@@ -82,7 +82,8 @@ Releases of a new OpenAPI are automatic, from the API down to the CLI:
82
82
  regenerates `src/` with Forge, records the OpenAPI in `arbol.openapi`, and takes the highest version
83
83
  on npm with the minor raised and the patch at 0 (2.1.0, 2.2.0, 2.3.0, …). It verifies the result,
84
84
  commits `Release <version>` to `main` as Arbol, and publishes `@arbol-ai/sdk` to npm with
85
- [Publish](.github/workflows/publish.yml), with a provenance statement.
85
+ [Publish](.github/workflows/publish.yml). Package access stays public while the source repository is
86
+ private. Provenance is disabled because npm does not support it for private source repositories.
86
87
  3. **CLI.** After publishing, Publish sends
87
88
  [project-arbol-cli](https://github.com/getarbol/project-arbol-cli) a `repository_dispatch`
88
89
  `sdk-release` with `{ "version": "<published version>", "openapi": { "release": "…", "sha256": "…" } }`,
@@ -123,6 +123,16 @@ export interface ListRequest {
123
123
  * channel was never recorded.
124
124
  */
125
125
  bookingChannel?: string | null;
126
+ /**
127
+ * Inclusive creation instant, independent of the appointment date. Pair with
128
+ * createdBefore; at most 93 days.
129
+ */
130
+ createdAfter?: Temporal.Instant;
131
+ /**
132
+ * Exclusive creation instant. Use for appointments generated during a period,
133
+ * including future appointments.
134
+ */
135
+ createdBefore?: Temporal.Instant;
126
136
  /**
127
137
  * Principal reference of whoever booked it.
128
138
  */
@@ -33,7 +33,7 @@ const ListOperation = {
33
33
  method: "POST",
34
34
  route: "/v1/agenda/appointments/search",
35
35
  body: "flat",
36
- request: object([["from", null, instant], ["to", null, instant]]),
36
+ request: object([["createdAfter", null, instant], ["createdBefore", null, instant], ["from", null, instant], ["to", null, instant]]),
37
37
  response: object([["data", null, () => AgendaAppointmentPageCodec]]),
38
38
  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 },
39
39
  };
@@ -5,6 +5,7 @@ import { type Client as BookingsClient } from "./bookings/client.js";
5
5
  import { type Client as LocationsClient } from "./locations/client.js";
6
6
  import { type Client as OfferingsClient } from "./offerings/client.js";
7
7
  import { type Client as ResourcesClient } from "./resources/client.js";
8
+ import { type Client as ScheduleRulesClient } from "./scheduleRules/client.js";
8
9
  import { type Client as ServicesClient } from "./services/client.js";
9
10
  import { type Client as WaitlistClient } from "./waitlist/client.js";
10
11
  export interface ClientOptions extends BaseClientOptions {
@@ -20,6 +21,7 @@ export interface Client {
20
21
  readonly locations: LocationsClient;
21
22
  readonly offerings: OfferingsClient;
22
23
  readonly resources: ResourcesClient;
24
+ readonly scheduleRules: ScheduleRulesClient;
23
25
  readonly services: ServicesClient;
24
26
  readonly waitlist: WaitlistClient;
25
27
  }
@@ -7,6 +7,7 @@ import { bind as bindBookings, } from "./bookings/client.js";
7
7
  import { bind as bindLocations, } from "./locations/client.js";
8
8
  import { bind as bindOfferings, } from "./offerings/client.js";
9
9
  import { bind as bindResources, } from "./resources/client.js";
10
+ import { bind as bindScheduleRules, } from "./scheduleRules/client.js";
10
11
  import { bind as bindServices, } from "./services/client.js";
11
12
  import { bind as bindWaitlist, } from "./waitlist/client.js";
12
13
  export function createClient(options) {
@@ -19,6 +20,7 @@ export function bind(transport) {
19
20
  let locationsClient;
20
21
  let offeringsClient;
21
22
  let resourcesClient;
23
+ let scheduleRulesClient;
22
24
  let servicesClient;
23
25
  let waitlistClient;
24
26
  return {
@@ -40,6 +42,9 @@ export function bind(transport) {
40
42
  get resources() {
41
43
  return (resourcesClient ??= bindResources(transport));
42
44
  },
45
+ get scheduleRules() {
46
+ return (scheduleRulesClient ??= bindScheduleRules(transport));
47
+ },
43
48
  get services() {
44
49
  return (servicesClient ??= bindServices(transport));
45
50
  },
@@ -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 AgendaOfferingPage } from "./models.js";
3
+ import { type AgendaOffering, type AgendaOfferingPage } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
6
6
  * The URL the paths of the API are relative to.
@@ -8,6 +8,13 @@ export interface ClientOptions extends BaseClientOptions {
8
8
  baseUrl: string;
9
9
  }
10
10
  export interface Client {
11
+ /**
12
+ * Create Offering
13
+ *
14
+ * Attach a service to an agenda with its scheduling requirements, duration,
15
+ * eligibility and intake policy.
16
+ */
17
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
11
18
  /**
12
19
  * List Offerings
13
20
  *
@@ -15,9 +22,83 @@ export interface Client {
15
22
  * active-state filters.
16
23
  */
17
24
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
25
+ /**
26
+ * Update Offering
27
+ *
28
+ * Update the offering named in the path using its expected version.
29
+ */
30
+ update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
18
31
  }
19
32
  export declare function createClient(options: ClientOptions): Client;
20
33
  export declare function bind(transport: Transport): Client;
34
+ export interface CreateRequest {
35
+ /**
36
+ * Farthest number of days ahead that this offering can be booked.
37
+ */
38
+ bookingHorizonDays?: number;
39
+ /**
40
+ * Resource occupation added after the visible appointment, in minutes.
41
+ */
42
+ bufferAfterMinutes?: number;
43
+ /**
44
+ * Resource occupation added before the visible appointment, in minutes.
45
+ */
46
+ bufferBeforeMinutes?: number;
47
+ /**
48
+ * Maximum concurrent units this resource or offering can accept.
49
+ */
50
+ capacity?: number;
51
+ /**
52
+ * Bounded JSON configuration owned by this catalog record, including
53
+ * supported domain settings.
54
+ */
55
+ details?: {
56
+ [key: string]: unknown;
57
+ };
58
+ /**
59
+ * Visible appointment duration for this offering, in minutes; resource
60
+ * buffers apply separately.
61
+ */
62
+ durationMinutes: number;
63
+ /**
64
+ * Minimum advance notice in minutes before this offering can be booked.
65
+ */
66
+ minNoticeMinutes?: number;
67
+ /**
68
+ * Display name of this catalog or configuration record.
69
+ */
70
+ name: string;
71
+ /**
72
+ * Resource kinds, quantities and explicit alternatives needed by this
73
+ * offering.
74
+ */
75
+ resourceRequirements?: {
76
+ alternatives?: string[];
77
+ kind: "practitioner" | "assistant" | "room" | "chair" | "equipment" | "location" | "team" | "generic";
78
+ quantity?: number;
79
+ required?: boolean;
80
+ }[];
81
+ /**
82
+ * Stable svc-prefixed Scheduling record identifier; ownership is checked in
83
+ * the authenticated organization.
84
+ */
85
+ serviceId: string;
86
+ /**
87
+ * Minute spacing between candidate appointment start times.
88
+ */
89
+ slotIntervalMinutes?: number;
90
+ /**
91
+ * Lifecycle state controlling whether this record remains available to its
92
+ * domain consumers.
93
+ */
94
+ status?: "active" | "inactive";
95
+ }
96
+ export interface CreateResponse {
97
+ data: AgendaOffering;
98
+ error: null;
99
+ metadata: ResponseMetadata;
100
+ success: true;
101
+ }
21
102
  export interface ListRequest {
22
103
  /**
23
104
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -49,3 +130,66 @@ export interface ListResponse {
49
130
  metadata: ResponseMetadata;
50
131
  success: true;
51
132
  }
133
+ export interface UpdateRequest {
134
+ /**
135
+ * Stable off-prefixed Scheduling record identifier; ownership is checked in
136
+ * the authenticated organization.
137
+ */
138
+ id: string;
139
+ /**
140
+ * Farthest number of days ahead that this offering can be booked.
141
+ */
142
+ bookingHorizonDays?: number;
143
+ /**
144
+ * Resource occupation added after the visible appointment, in minutes.
145
+ */
146
+ bufferAfterMinutes?: number;
147
+ /**
148
+ * Resource occupation added before the visible appointment, in minutes.
149
+ */
150
+ bufferBeforeMinutes?: number;
151
+ /**
152
+ * Maximum concurrent units this resource or offering can accept.
153
+ */
154
+ capacity?: number;
155
+ /**
156
+ * Bounded JSON configuration owned by this catalog record, including
157
+ * supported domain settings.
158
+ */
159
+ details?: {
160
+ [key: string]: unknown;
161
+ };
162
+ /**
163
+ * Visible appointment duration for this offering, in minutes; resource
164
+ * buffers apply separately.
165
+ */
166
+ durationMinutes?: number;
167
+ /**
168
+ * Version last read by the caller. The mutation fails if another writer has
169
+ * changed this record.
170
+ */
171
+ expectedVersion: number;
172
+ /**
173
+ * Minimum advance notice in minutes before this offering can be booked.
174
+ */
175
+ minNoticeMinutes?: number;
176
+ /**
177
+ * Display name of this catalog or configuration record.
178
+ */
179
+ name?: string;
180
+ /**
181
+ * Minute spacing between candidate appointment start times.
182
+ */
183
+ slotIntervalMinutes?: number;
184
+ /**
185
+ * Lifecycle state controlling whether this record remains available to its
186
+ * domain consumers.
187
+ */
188
+ status?: "active" | "inactive";
189
+ }
190
+ export interface UpdateResponse {
191
+ data: AgendaOffering;
192
+ error: null;
193
+ metadata: ResponseMetadata;
194
+ success: true;
195
+ }
@@ -1,15 +1,24 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { Transport, object, } from "../../_/index.js";
4
- import { AgendaOfferingPageCodec } from "./models.js";
4
+ import { AgendaOfferingCodec, AgendaOfferingPageCodec, } 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
+ create: (request, options) => transport.send(CreateOperation, request, options),
10
11
  list: (request, options) => transport.send(ListOperation, request, options),
12
+ update: (request, options) => transport.send(UpdateOperation, request, options),
11
13
  };
12
14
  }
15
+ const CreateOperation = {
16
+ method: "POST",
17
+ route: "/v1/agenda/offerings",
18
+ body: "flat",
19
+ response: object([["data", null, () => AgendaOfferingCodec]]),
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 },
21
+ };
13
22
  const ListOperation = {
14
23
  method: "GET",
15
24
  route: "/v1/agenda/offerings",
@@ -17,3 +26,10 @@ const ListOperation = {
17
26
  response: object([["data", null, () => AgendaOfferingPageCodec]]),
18
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 },
19
28
  };
29
+ const UpdateOperation = {
30
+ method: "PATCH",
31
+ route: "/v1/agenda/offerings/{id}",
32
+ body: "flat",
33
+ response: object([["data", null, () => AgendaOfferingCodec]]),
34
+ 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 },
35
+ };
@@ -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, ListRequest, ListResponse, } from "./client.js";
4
+ export type { Client, ClientOptions, CreateRequest, CreateResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
5
  export type { AgendaOffering, AgendaOfferingPage, } from "./models.js";
@@ -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 AgendaResourcePage } from "./models.js";
3
+ import { type AgendaResource, type AgendaResourcePage } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
6
6
  * The URL the paths of the API are relative to.
@@ -8,6 +8,13 @@ export interface ClientOptions extends BaseClientOptions {
8
8
  baseUrl: string;
9
9
  }
10
10
  export interface Client {
11
+ /**
12
+ * Create Resource
13
+ *
14
+ * Create a professional, room or equipment agenda with its capacity and
15
+ * booking policy.
16
+ */
17
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
11
18
  /**
12
19
  * List Resources
13
20
  *
@@ -15,9 +22,58 @@ export interface Client {
15
22
  * pagination.
16
23
  */
17
24
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
25
+ /**
26
+ * Update Resource
27
+ *
28
+ * Update the agenda named in the path using its expected version.
29
+ */
30
+ update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
18
31
  }
19
32
  export declare function createClient(options: ClientOptions): Client;
20
33
  export declare function bind(transport: Transport): Client;
34
+ export interface CreateRequest {
35
+ /**
36
+ * Maximum simultaneous capacity units available on this resource; each
37
+ * booking consumes its declared share.
38
+ */
39
+ capacity?: number;
40
+ /**
41
+ * Bounded JSON configuration owned by this catalog record, including
42
+ * supported domain settings.
43
+ */
44
+ details?: {
45
+ [key: string]: unknown;
46
+ };
47
+ /**
48
+ * Resource category used to match booking requirements, such as practitioner,
49
+ * room or equipment.
50
+ */
51
+ kind: "practitioner" | "assistant" | "room" | "chair" | "equipment" | "location" | "team" | "generic";
52
+ /**
53
+ * Clinic site associated with this record; null means it is not tied to a
54
+ * site.
55
+ */
56
+ locationId?: string | null;
57
+ /**
58
+ * Display name of this catalog or configuration record.
59
+ */
60
+ name: string;
61
+ /**
62
+ * Lifecycle state controlling whether this record remains available to its
63
+ * domain consumers.
64
+ */
65
+ status?: "active" | "inactive";
66
+ /**
67
+ * IANA timezone used to interpret the record’s local dates and time bands.
68
+ */
69
+ timezone: string;
70
+ }
71
+ export interface CreateResponse {
72
+ data: AgendaResource;
73
+ error: null;
74
+ metadata: ResponseMetadata;
75
+ success: true;
76
+ }
21
77
  export interface ListRequest {
22
78
  /**
23
79
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -48,3 +104,56 @@ export interface ListResponse {
48
104
  metadata: ResponseMetadata;
49
105
  success: true;
50
106
  }
107
+ export interface UpdateRequest {
108
+ /**
109
+ * Stable srs-prefixed Scheduling record identifier; ownership is checked in
110
+ * the authenticated organization.
111
+ */
112
+ id: string;
113
+ /**
114
+ * Maximum simultaneous capacity units available on this resource; each
115
+ * booking consumes its declared share.
116
+ */
117
+ capacity?: number;
118
+ /**
119
+ * Bounded JSON configuration owned by this catalog record, including
120
+ * supported domain settings.
121
+ */
122
+ details?: {
123
+ [key: string]: unknown;
124
+ };
125
+ /**
126
+ * Version last read by the caller. The mutation fails if another writer has
127
+ * changed this record.
128
+ */
129
+ expectedVersion: number;
130
+ /**
131
+ * Resource category used to match booking requirements, such as practitioner,
132
+ * room or equipment.
133
+ */
134
+ kind?: "practitioner" | "assistant" | "room" | "chair" | "equipment" | "location" | "team" | "generic";
135
+ /**
136
+ * Clinic site associated with this record; null means it is not tied to a
137
+ * site.
138
+ */
139
+ locationId?: string | null;
140
+ /**
141
+ * Display name of this catalog or configuration record.
142
+ */
143
+ name?: string;
144
+ /**
145
+ * Lifecycle state controlling whether this record remains available to its
146
+ * domain consumers.
147
+ */
148
+ status?: "active" | "inactive";
149
+ /**
150
+ * IANA timezone used to interpret the record’s local dates and time bands.
151
+ */
152
+ timezone?: string;
153
+ }
154
+ export interface UpdateResponse {
155
+ data: AgendaResource;
156
+ error: null;
157
+ metadata: ResponseMetadata;
158
+ success: true;
159
+ }
@@ -1,15 +1,24 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { Transport, object, } from "../../_/index.js";
4
- import { AgendaResourcePageCodec } from "./models.js";
4
+ import { AgendaResourceCodec, AgendaResourcePageCodec, } 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
+ create: (request, options) => transport.send(CreateOperation, request, options),
10
11
  list: (request, options) => transport.send(ListOperation, request, options),
12
+ update: (request, options) => transport.send(UpdateOperation, request, options),
11
13
  };
12
14
  }
15
+ const CreateOperation = {
16
+ method: "POST",
17
+ route: "/v1/agenda/resources",
18
+ body: "flat",
19
+ response: object([["data", null, () => AgendaResourceCodec]]),
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 },
21
+ };
13
22
  const ListOperation = {
14
23
  method: "GET",
15
24
  route: "/v1/agenda/resources",
@@ -17,3 +26,10 @@ const ListOperation = {
17
26
  response: object([["data", null, () => AgendaResourcePageCodec]]),
18
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 },
19
28
  };
29
+ const UpdateOperation = {
30
+ method: "PATCH",
31
+ route: "/v1/agenda/resources/{id}",
32
+ body: "flat",
33
+ response: object([["data", null, () => AgendaResourceCodec]]),
34
+ 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 },
35
+ };
@@ -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, ListRequest, ListResponse, } from "./client.js";
4
+ export type { Client, ClientOptions, CreateRequest, CreateResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
5
  export type { AgendaResource, AgendaResourcePage, } from "./models.js";
@@ -0,0 +1,188 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { ResponseMetadata } 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
+ * List Schedule Rules
12
+ *
13
+ * Read the agenda’s weekly bands and dated overrides in its local timezone.
14
+ */
15
+ list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
16
+ /**
17
+ * Replace Schedule Rules
18
+ *
19
+ * Replace the agenda’s complete working-rule set atomically using its
20
+ * expected resource version.
21
+ */
22
+ replace(request: ReplaceRequest, options?: RequestOptions): Promise<ReplaceResponse>;
23
+ /**
24
+ * Upsert Schedule Rule
25
+ *
26
+ * Write one working rule for the agenda using the expected resource version.
27
+ */
28
+ upsert(request: UpsertRequest, options?: RequestOptions): Promise<UpsertResponse>;
29
+ }
30
+ export declare function createClient(options: ClientOptions): Client;
31
+ export declare function bind(transport: Transport): Client;
32
+ export interface ListRequest {
33
+ /**
34
+ * Scheduling resource addressed by this request or associated with this
35
+ * record.
36
+ */
37
+ resourceId?: string;
38
+ }
39
+ export interface ListResponse {
40
+ data: {
41
+ data: {
42
+ date: Temporal.PlainDate | null;
43
+ effectiveFrom: Temporal.PlainDate | null;
44
+ effectiveTo: Temporal.PlainDate | null;
45
+ endTime: string;
46
+ id: string;
47
+ kind: "weekly" | "date_override" | "time_off" | "block";
48
+ object: "scheduling.schedule_rule";
49
+ resourceId: string;
50
+ schemaVersion: 1;
51
+ startTime: string;
52
+ timezone: string;
53
+ updatedAt: Temporal.Instant;
54
+ version: number;
55
+ weekdays: number[];
56
+ }[];
57
+ object: "list";
58
+ };
59
+ error: null;
60
+ metadata: ResponseMetadata;
61
+ success: true;
62
+ }
63
+ export interface ReplaceRequest {
64
+ /**
65
+ * Stable srs-prefixed Scheduling record identifier; ownership is checked in
66
+ * the authenticated organization.
67
+ */
68
+ resourceId: string;
69
+ /**
70
+ * Identifiers and versions of the complete schedule loaded by the editor;
71
+ * concurrent changes reject the replacement.
72
+ */
73
+ expectedRules: {
74
+ id: string;
75
+ version: number;
76
+ }[];
77
+ /**
78
+ * Schedule bands or profile policy rules owned by this configuration.
79
+ */
80
+ rules: {
81
+ date?: Temporal.PlainDate | null;
82
+ effectiveFrom?: Temporal.PlainDate | null;
83
+ effectiveTo?: Temporal.PlainDate | null;
84
+ endTime: string;
85
+ kind: "weekly" | "date_override" | "time_off" | "block";
86
+ startTime: string;
87
+ weekdays?: number[];
88
+ }[];
89
+ }
90
+ export interface ReplaceResponse {
91
+ data: {
92
+ data: {
93
+ date: Temporal.PlainDate | null;
94
+ effectiveFrom: Temporal.PlainDate | null;
95
+ effectiveTo: Temporal.PlainDate | null;
96
+ endTime: string;
97
+ id: string;
98
+ kind: "weekly" | "date_override" | "time_off" | "block";
99
+ object: "scheduling.schedule_rule";
100
+ resourceId: string;
101
+ schemaVersion: 1;
102
+ startTime: string;
103
+ timezone: string;
104
+ updatedAt: Temporal.Instant;
105
+ version: number;
106
+ weekdays: number[];
107
+ }[];
108
+ object: "list";
109
+ };
110
+ error: null;
111
+ metadata: ResponseMetadata;
112
+ success: true;
113
+ }
114
+ export interface UpsertRequest {
115
+ /**
116
+ * Scheduling resource addressed by this request or associated with this
117
+ * record.
118
+ */
119
+ resourceId: string;
120
+ /**
121
+ * Specific local calendar date for a dated band or closure; null for a weekly
122
+ * band.
123
+ */
124
+ date?: Temporal.PlainDate | null;
125
+ /**
126
+ * First local date on which this weekly band applies; null means no lower
127
+ * date bound.
128
+ */
129
+ effectiveFrom?: Temporal.PlainDate | null;
130
+ /**
131
+ * Last local date on which this weekly band applies; null means no upper date
132
+ * bound.
133
+ */
134
+ effectiveTo?: Temporal.PlainDate | null;
135
+ /**
136
+ * End of this local time band in HH:MM, interpreted in its resource’s
137
+ * timezone.
138
+ */
139
+ endTime: string;
140
+ /**
141
+ * Version last read by the caller. The mutation fails if another writer has
142
+ * changed this record.
143
+ */
144
+ expectedVersion?: number;
145
+ /**
146
+ * Identifier of the record addressed or returned by this schema.
147
+ */
148
+ id?: string;
149
+ /**
150
+ * Declared domain kind of this record or configuration element.
151
+ */
152
+ kind: "weekly" | "date_override" | "time_off" | "block";
153
+ /**
154
+ * Start of this local time band in HH:MM, interpreted in its resource’s
155
+ * timezone.
156
+ */
157
+ startTime: string;
158
+ /**
159
+ * IANA timezone used to interpret the record’s local dates and time bands.
160
+ */
161
+ timezone: string;
162
+ /**
163
+ * Local weekdays on which a weekly band applies, numbered Sunday 0 through
164
+ * Saturday 6.
165
+ */
166
+ weekdays?: number[];
167
+ }
168
+ export interface UpsertResponse {
169
+ data: {
170
+ date: Temporal.PlainDate | null;
171
+ effectiveFrom: Temporal.PlainDate | null;
172
+ effectiveTo: Temporal.PlainDate | null;
173
+ endTime: string;
174
+ id: string;
175
+ kind: "weekly" | "date_override" | "time_off" | "block";
176
+ object: "scheduling.schedule_rule";
177
+ resourceId: string;
178
+ schemaVersion: 1;
179
+ startTime: string;
180
+ timezone: string;
181
+ updatedAt: Temporal.Instant;
182
+ version: number;
183
+ weekdays: number[];
184
+ };
185
+ error: null;
186
+ metadata: ResponseMetadata;
187
+ success: true;
188
+ }
@@ -0,0 +1,36 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, array, date, instant, object, } from "../../_/index.js";
4
+ export function createClient(options) {
5
+ return bind(new Transport(options));
6
+ }
7
+ export function bind(transport) {
8
+ return {
9
+ list: (request, options) => transport.send(ListOperation, request, options),
10
+ replace: (request, options) => transport.send(ReplaceOperation, request, options),
11
+ upsert: (request, options) => transport.send(UpsertOperation, request, options),
12
+ };
13
+ }
14
+ const ListOperation = {
15
+ method: "GET",
16
+ route: "/v1/agenda/schedule-rules",
17
+ query: { resourceId: "resourceId" },
18
+ response: object([["data", null, object([["data", null, array(object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date], ["updatedAt", null, instant]]))]])]]),
19
+ 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 },
20
+ };
21
+ const ReplaceOperation = {
22
+ method: "POST",
23
+ route: "/v1/agenda/resources/{resourceId}/schedule-rules/replace",
24
+ body: "flat",
25
+ request: object([["rules", null, array(object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date]]))]]),
26
+ response: object([["data", null, object([["data", null, array(object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date], ["updatedAt", null, instant]]))]])]]),
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
+ };
29
+ const UpsertOperation = {
30
+ method: "POST",
31
+ route: "/v1/agenda/resources/{resourceId}/schedule-rules",
32
+ body: "flat",
33
+ request: object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date]]),
34
+ response: object([["data", null, object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date], ["updatedAt", null, instant]])]]),
35
+ 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 },
36
+ };
@@ -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, ListRequest, ListResponse, ReplaceRequest, ReplaceResponse, UpsertRequest, UpsertResponse, } 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";
@@ -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 AgendaServicePage } from "./models.js";
3
+ import { type AgendaService, type AgendaServicePage } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
6
6
  * The URL the paths of the API are relative to.
@@ -8,15 +8,56 @@ export interface ClientOptions extends BaseClientOptions {
8
8
  baseUrl: string;
9
9
  }
10
10
  export interface Client {
11
+ /**
12
+ * Create Service
13
+ *
14
+ * Create a bookable service with its intake, eligibility and duration policy.
15
+ */
16
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
11
17
  /**
12
18
  * List Services
13
19
  *
14
20
  * List services using tenant-qualified filters and stable keyset pagination.
15
21
  */
16
22
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
23
+ /**
24
+ * Update Service
25
+ *
26
+ * Update the service named in the path using its expected version.
27
+ */
28
+ update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
17
29
  }
18
30
  export declare function createClient(options: ClientOptions): Client;
19
31
  export declare function bind(transport: Transport): Client;
32
+ export interface CreateRequest {
33
+ /**
34
+ * Default appointment duration for this service, in minutes. Each offering
35
+ * can specify its own duration.
36
+ */
37
+ defaultDurationMinutes: number;
38
+ /**
39
+ * Bounded JSON configuration owned by this catalog record, including
40
+ * supported domain settings.
41
+ */
42
+ details?: {
43
+ [key: string]: unknown;
44
+ };
45
+ /**
46
+ * Display name of this catalog or configuration record.
47
+ */
48
+ name: string;
49
+ /**
50
+ * Lifecycle state controlling whether this record remains available to its
51
+ * domain consumers.
52
+ */
53
+ status?: "active" | "inactive";
54
+ }
55
+ export interface CreateResponse {
56
+ data: AgendaService;
57
+ error: null;
58
+ metadata: ResponseMetadata;
59
+ success: true;
60
+ }
20
61
  export interface ListRequest {
21
62
  /**
22
63
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -43,3 +84,42 @@ export interface ListResponse {
43
84
  metadata: ResponseMetadata;
44
85
  success: true;
45
86
  }
87
+ export interface UpdateRequest {
88
+ /**
89
+ * Stable svc-prefixed Scheduling record identifier; ownership is checked in
90
+ * the authenticated organization.
91
+ */
92
+ id: string;
93
+ /**
94
+ * Default appointment duration for this service, in minutes. Each offering
95
+ * can specify its own duration.
96
+ */
97
+ defaultDurationMinutes?: number;
98
+ /**
99
+ * Bounded JSON configuration owned by this catalog record, including
100
+ * supported domain settings.
101
+ */
102
+ details?: {
103
+ [key: string]: unknown;
104
+ };
105
+ /**
106
+ * Version last read by the caller. The mutation fails if another writer has
107
+ * changed this record.
108
+ */
109
+ expectedVersion: number;
110
+ /**
111
+ * Display name of this catalog or configuration record.
112
+ */
113
+ name?: string;
114
+ /**
115
+ * Lifecycle state controlling whether this record remains available to its
116
+ * domain consumers.
117
+ */
118
+ status?: "active" | "inactive";
119
+ }
120
+ export interface UpdateResponse {
121
+ data: AgendaService;
122
+ error: null;
123
+ metadata: ResponseMetadata;
124
+ success: true;
125
+ }
@@ -1,15 +1,24 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { Transport, object, } from "../../_/index.js";
4
- import { AgendaServicePageCodec } from "./models.js";
4
+ import { AgendaServiceCodec, AgendaServicePageCodec, } 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
+ create: (request, options) => transport.send(CreateOperation, request, options),
10
11
  list: (request, options) => transport.send(ListOperation, request, options),
12
+ update: (request, options) => transport.send(UpdateOperation, request, options),
11
13
  };
12
14
  }
15
+ const CreateOperation = {
16
+ method: "POST",
17
+ route: "/v1/agenda/services",
18
+ body: "flat",
19
+ response: object([["data", null, () => AgendaServiceCodec]]),
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 },
21
+ };
13
22
  const ListOperation = {
14
23
  method: "GET",
15
24
  route: "/v1/agenda/services",
@@ -17,3 +26,10 @@ const ListOperation = {
17
26
  response: object([["data", null, () => AgendaServicePageCodec]]),
18
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 },
19
28
  };
29
+ const UpdateOperation = {
30
+ method: "PATCH",
31
+ route: "/v1/agenda/services/{id}",
32
+ body: "flat",
33
+ response: object([["data", null, () => AgendaServiceCodec]]),
34
+ 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 },
35
+ };
@@ -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, ListRequest, ListResponse, } from "./client.js";
4
+ export type { Client, ClientOptions, CreateRequest, CreateResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
5
  export type { AgendaService, AgendaServicePage, } from "./models.js";
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
2
+ import type { DeletedObject, ResponseMetadata } from "../../models.js";
3
3
  import { type RaizBusinessHours, type RaizPhoneNumber } from "../models.js";
4
4
  import { type RaizChannel, type RaizChannelPage, type RaizWidgetSettingsInput } from "./models.js";
5
5
  export interface ClientOptions extends BaseClientOptions {
@@ -9,6 +9,28 @@ export interface ClientOptions extends BaseClientOptions {
9
9
  baseUrl: string;
10
10
  }
11
11
  export interface Client {
12
+ /**
13
+ * Add a channel
14
+ *
15
+ * Add a channel. `whatsapp` creates a pending channel and a setup link
16
+ * (`setup.url`) where the business connects its WhatsApp number; call
17
+ * `verify_channel` once that is done. `voice` connects a platform phone
18
+ * number (`platform_number`) or the organization's own carrier over SIP
19
+ * (`sip_trunk`) at once (SIP credentials are passed on once and never
20
+ * stored). `web` creates the chat widget with its configuration. With an
21
+ * Agent, traffic is on by default. Done in Settings → Channels or the REST
22
+ * API; not an AI tool.
23
+ */
24
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
25
+ /**
26
+ * Delete a channel
27
+ *
28
+ * Remove a channel; its conversations remain. A phone number stops receiving
29
+ * and placing calls (the number stays in the platform account, where Arbol
30
+ * staff can release it); a WhatsApp number stops sending messages to Raíz. To
31
+ * pause traffic instead, switch it off with `update_channel`. Not an AI tool.
32
+ */
33
+ delete(request: DeleteRequest, options?: RequestOptions): Promise<DeleteResponse>;
12
34
  /**
13
35
  * Get a channel
14
36
  *
@@ -34,6 +56,17 @@ export interface Client {
34
56
  * and assignment.
35
57
  */
36
58
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
59
+ /**
60
+ * Renew a WhatsApp setup link
61
+ *
62
+ * Issue a new setup link for a pending WhatsApp channel, returned in `setup`,
63
+ * when the previous one was lost or must go to someone else; the previous
64
+ * link stops working. The setup is checked first: if the business already
65
+ * connected its number, the channel is completed as `verify_channel` does and
66
+ * no link is returned. A channel that is not a pending WhatsApp number fails
67
+ * with INVALID_STATE or CHANNEL_TYPE_MISMATCH. Not an AI tool.
68
+ */
69
+ renewSetup(request: RenewSetupRequest, options?: RequestOptions): Promise<RenewSetupResponse>;
37
70
  /**
38
71
  * Update a channel
39
72
  *
@@ -61,6 +94,58 @@ export interface Client {
61
94
  }
62
95
  export declare function createClient(options: ClientOptions): Client;
63
96
  export declare function bind(transport: Transport): Client;
97
+ export type CreateRequest = {
98
+ agentId?: string;
99
+ channelType: "whatsapp";
100
+ inboundEnabled?: boolean;
101
+ name?: string;
102
+ outboundEnabled?: boolean;
103
+ } | {
104
+ agentId?: string;
105
+ channelType: "voice";
106
+ endpoint: {
107
+ kind: "platform_number";
108
+ label?: string;
109
+ phoneNumber: RaizPhoneNumber;
110
+ } | {
111
+ address: string;
112
+ kind: "sip_trunk";
113
+ label?: string;
114
+ mediaEncryption?: "disabled" | "allowed" | "required";
115
+ password?: string;
116
+ phoneNumber: RaizPhoneNumber;
117
+ transport?: "auto" | "udp" | "tcp" | "tls";
118
+ username?: string;
119
+ };
120
+ inboundEnabled?: boolean;
121
+ name?: string;
122
+ outboundEnabled?: boolean;
123
+ } | {
124
+ agentId?: string;
125
+ channelType: "web";
126
+ inboundEnabled?: boolean;
127
+ name?: string;
128
+ outboundEnabled?: boolean;
129
+ widget: RaizWidgetSettingsInput;
130
+ };
131
+ export interface CreateResponse {
132
+ data: RaizChannel;
133
+ error: null;
134
+ metadata: ResponseMetadata;
135
+ success: true;
136
+ }
137
+ export interface DeleteRequest {
138
+ /**
139
+ * Channel id.
140
+ */
141
+ channelId: string;
142
+ }
143
+ export interface DeleteResponse {
144
+ data: DeletedObject;
145
+ error: null;
146
+ metadata: ResponseMetadata;
147
+ success: true;
148
+ }
64
149
  export interface GetRequest {
65
150
  /**
66
151
  * Channel id.
@@ -114,6 +199,18 @@ export interface ListResponse {
114
199
  metadata: ResponseMetadata;
115
200
  success: true;
116
201
  }
202
+ export interface RenewSetupRequest {
203
+ /**
204
+ * Channel id.
205
+ */
206
+ channelId: string;
207
+ }
208
+ export interface RenewSetupResponse {
209
+ data: RaizChannel;
210
+ error: null;
211
+ metadata: ResponseMetadata;
212
+ success: true;
213
+ }
117
214
  export interface UpdateRequest {
118
215
  agentId?: string | null;
119
216
  aiCoveragePercent?: number;
@@ -8,12 +8,29 @@ export function createClient(options) {
8
8
  }
9
9
  export function bind(transport) {
10
10
  return {
11
+ create: (request, options) => transport.send(CreateOperation, request, options),
12
+ delete: (request, options) => transport.send(DeleteOperation, request, options),
11
13
  get: (request, options) => transport.send(GetOperation, request, options),
12
14
  list: (request, options) => transport.send(ListOperation, request, options),
15
+ renewSetup: (request, options) => transport.send(RenewSetupOperation, request, options),
13
16
  update: (request, options) => transport.send(UpdateOperation, request, options),
14
17
  verify: (request, options) => transport.send(VerifyOperation, request, options),
15
18
  };
16
19
  }
20
+ const CreateOperation = {
21
+ method: "POST",
22
+ route: "/v1/raiz/channels/create",
23
+ body: "flat",
24
+ response: object([["data", null, () => RaizChannelCodec]]),
25
+ 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 },
26
+ };
27
+ const DeleteOperation = {
28
+ method: "DELETE",
29
+ route: "/v1/raiz/channels/delete",
30
+ body: "flat",
31
+ response: null,
32
+ 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 },
33
+ };
17
34
  const GetOperation = {
18
35
  method: "GET",
19
36
  route: "/v1/raiz/channels/get",
@@ -28,6 +45,13 @@ const ListOperation = {
28
45
  response: object([["data", null, () => RaizChannelPageCodec]]),
29
46
  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
47
  };
48
+ const RenewSetupOperation = {
49
+ method: "POST",
50
+ route: "/v1/raiz/channels/renew-setup",
51
+ body: "flat",
52
+ response: object([["data", null, () => RaizChannelCodec]]),
53
+ 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 },
54
+ };
31
55
  const UpdateOperation = {
32
56
  method: "PATCH",
33
57
  route: "/v1/raiz/channels/update",
@@ -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, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, VerifyRequest, VerifyResponse, } from "./client.js";
4
+ export type { Client, ClientOptions, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, RenewSetupRequest, RenewSetupResponse, UpdateRequest, UpdateResponse, VerifyRequest, VerifyResponse, } from "./client.js";
5
5
  export type { RaizChannel, RaizChannelAgent, RaizChannelPage, RaizWidgetAgentChoice, RaizWidgetClientTool, RaizWidgetCopy, RaizWidgetField, RaizWidgetSettings, RaizWidgetSettingsInput, RaizWidgetTranslations, } from "./models.js";
@@ -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, ConfigureRequest, ConfigureResponse, CurrentRequest, CurrentResponse, SendDailyReportRequest, SendDailyReportResponse, } from "./client.js";
5
- export type { RaizOrganization, RaizOrganizationId, } from "./models.js";
5
+ export type { OrganizationId, RaizOrganization, } from "./models.js";
@@ -1,4 +1,5 @@
1
1
  import type { RaizEmailAddress } from "../models.js";
2
+ export type OrganizationId = string;
2
3
  export interface RaizOrganization {
3
4
  /**
4
5
  * With `expand=applications`: Arbol's applications and whether you open each
@@ -20,7 +21,7 @@ export interface RaizOrganization {
20
21
  /**
21
22
  * Verified organization identifier.
22
23
  */
23
- id: RaizOrganizationId;
24
+ id: OrganizationId;
24
25
  /**
25
26
  * Default language of the organization's Agents (BCP 47).
26
27
  */
@@ -56,5 +57,4 @@ export interface RaizOrganization {
56
57
  */
57
58
  updatedAt: Temporal.Instant;
58
59
  }
59
- export type RaizOrganizationId = string;
60
60
  export declare const RaizOrganizationCodec: import("../../_/codec.js").Codec;
@@ -12,14 +12,20 @@ export interface Client {
12
12
  * Get a report
13
13
  *
14
14
  * Get the numbers behind a question. `name`: `conversations_daily`
15
- * (conversations the AI took part in, per day), `tool_calls_daily` (Agent
16
- * tool calls per day), `tool_calls` (each call, newest first),
17
- * `assessment_results_daily` (assessment results per day), each over days in
18
- * the organization's time zone (`from`, `to`; the last 30 days by default),
19
- * or `campaign_progress`. Narrow with `agentId`, `channelType`, `campaignId`
20
- * or `definitionId`; a filter that does not apply to the report fails with
21
- * REPORT_FILTER_UNSUPPORTED. At most 1000 rows: `hasMore` means narrow the
22
- * range. The `reports-and-charts` skill turns results into a chart or table.
15
+ * (conversations the AI took part in, per day), `booking_outcomes` (verified
16
+ * saved booking receipts by completion day and integration, excluding tests,
17
+ * imports and deleted conversations; new bookings, reschedules,
18
+ * cancellations, failures, pending and unverified results separately),
19
+ * `tool_calls_daily` (Agent tool calls per day), `tool_calls` (each call,
20
+ * newest first), `assessment_results_daily` (assessment results per day),
21
+ * each over days in the organization's time zone (`from`, `to`; the last 30
22
+ * days by default), or `campaign_progress`. Narrow with `agentId`,
23
+ * `channelType`, `campaignId` or `definitionId`; unsupported filters fail. At
24
+ * most 1000 rows: `hasMore` means split the range or filter. Booking outcomes
25
+ * return no partial totals when their evidence scan exceeds its bound.
26
+ * Conversation success and completed tool calls never establish a booking;
27
+ * these are historical receipts, not the provider's current appointment
28
+ * status.
23
29
  */
24
30
  current(request: CurrentRequest, options?: RequestOptions): Promise<CurrentResponse>;
25
31
  }
@@ -46,18 +52,20 @@ export interface CurrentRequest {
46
52
  from?: Temporal.PlainDate;
47
53
  /**
48
54
  * `conversations_daily`: conversations the AI took part in per day, Agent,
49
- * channel type and direction, with outcomes, escalations to the team and the
50
- * conversations to review (filters `agentId`, `channelType`); WhatsApp
51
- * conversations the organization's people handled on their own are left out.
52
- * `tool_calls_daily`: AI tool calls per day, Agent and tool, with failures
53
- * and durations (filter `agentId`). `tool_calls`: the same calls one by one,
54
- * newest first, each with its conversation, status, duration and error code,
55
- * never its input or output (filter `agentId`). `assessment_results_daily`:
56
- * yes/no assessments per day and definition (filter `definitionId`).
57
- * `campaign_progress`: recipients per campaign by status (filter
58
- * `campaignId`; no date range).
55
+ * channel type and direction, with outcomes and escalations (filters
56
+ * `agentId`, `channelType`). `booking_outcomes`: verified saved booking
57
+ * receipts per completion day, Agent and integration, excluding
58
+ * test/import/deleted conversations; confirmed new bookings, reschedules,
59
+ * cancellations, failed, pending, unverified and duplicate receipts
60
+ * separately (filter `agentId`). Historical evidence, not current appointment
61
+ * status; hasMore requires splitting the range and returns no partial totals.
62
+ * `tool_calls_daily`: tool calls per day, Agent and tool with
63
+ * failures/durations (filter `agentId`). `tool_calls`: individual calls,
64
+ * never inputs/outputs (filter `agentId`). `assessment_results_daily`:
65
+ * assessments per day/definition (filter `definitionId`).
66
+ * `campaign_progress`: recipients by status (filter `campaignId`; no dates).
59
67
  */
60
- name: "conversations_daily" | "tool_calls_daily" | "tool_calls" | "assessment_results_daily" | "campaign_progress";
68
+ name: "conversations_daily" | "tool_calls_daily" | "tool_calls" | "booking_outcomes" | "assessment_results_daily" | "campaign_progress";
61
69
  /**
62
70
  * Last day (`YYYY-MM-DD`), inclusive, of a daily report. Default: today in
63
71
  * the organization's time zone.
@@ -54,6 +54,24 @@ export type RaizReport = {
54
54
  toolkit: string | null;
55
55
  }[];
56
56
  to: Temporal.PlainDate;
57
+ } | {
58
+ from: Temporal.PlainDate;
59
+ hasMore: boolean;
60
+ name: "booking_outcomes";
61
+ rows: {
62
+ agentId: string | null;
63
+ agentName: string | null;
64
+ cancelledCount: number;
65
+ confirmedCount: number;
66
+ day: Temporal.PlainDate;
67
+ duplicateCount: number;
68
+ failedCount: number;
69
+ pendingCount: number;
70
+ rescheduledCount: number;
71
+ source: string;
72
+ unverifiedCount: number;
73
+ }[];
74
+ to: Temporal.PlainDate;
57
75
  } | {
58
76
  from: Temporal.PlainDate;
59
77
  hasMore: boolean;
@@ -1,4 +1,4 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { array, date, instant, object, union } from "../../_/index.js";
4
- export const RaizReportCodec = union([object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["occurredAt", null, instant]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]])]);
4
+ export const RaizReportCodec = union([object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["occurredAt", null, instant]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]])]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "2.2.0",
3
+ "version": "2.4.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",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public",
36
- "provenance": true
36
+ "provenance": false
37
37
  },
38
38
  "scripts": {
39
39
  "forge": "cargo install --quiet --locked --git https://github.com/cloudflare/forge --rev 7f86447210b7bea3779bfdab3cd5655eade0eadb --root .forge forge",
@@ -50,8 +50,8 @@
50
50
  "packageManager": "bun@1.4.3",
51
51
  "arbol": {
52
52
  "openapi": {
53
- "release": "1.20261019.214511",
54
- "sha256": "84dc23076d7f8fcdd9fc8ff13bb53ba4093f93613e32d3097f43fecf50e4f0d3"
53
+ "release": "1.20261020.162831",
54
+ "sha256": "3c0996ddbfb92924b8d8bc8f0ccaef401eb19e2f6168ec412558a37cf0709240"
55
55
  }
56
56
  }
57
57
  }