@arbol-ai/sdk 2.3.0 → 2.5.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/dist/agenda/appointments/client.d.ts +10 -0
- package/dist/agenda/appointments/client.js +1 -1
- package/dist/agenda/client.d.ts +2 -0
- package/dist/agenda/client.js +5 -0
- package/dist/agenda/offerings/client.d.ts +145 -1
- package/dist/agenda/offerings/client.js +17 -1
- package/dist/agenda/offerings/index.d.ts +1 -1
- package/dist/agenda/resources/client.d.ts +110 -1
- package/dist/agenda/resources/client.js +17 -1
- package/dist/agenda/resources/index.d.ts +1 -1
- package/dist/agenda/scheduleRules/client.d.ts +188 -0
- package/dist/agenda/scheduleRules/client.js +36 -0
- package/dist/agenda/scheduleRules/index.d.ts +4 -0
- package/dist/agenda/scheduleRules/index.js +4 -0
- package/dist/agenda/services/client.d.ts +81 -1
- package/dist/agenda/services/client.js +17 -1
- package/dist/agenda/services/index.d.ts +1 -1
- package/dist/raiz/channels/client.d.ts +14 -8
- package/dist/raiz/channels/index.d.ts +1 -1
- package/dist/raiz/channels/models.d.ts +179 -7
- package/dist/raiz/models.d.ts +14 -0
- package/dist/raiz/organization/index.d.ts +1 -1
- package/dist/raiz/organization/models.d.ts +2 -2
- package/dist/raiz/reports/client.d.ts +29 -19
- package/dist/raiz/reports/models.d.ts +19 -0
- package/dist/raiz/reports/models.js +1 -1
- package/package.json +3 -3
|
@@ -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";
|
|
@@ -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";
|
|
@@ -12,14 +12,20 @@ export interface Client {
|
|
|
12
12
|
/**
|
|
13
13
|
* Add a channel
|
|
14
14
|
*
|
|
15
|
-
* Add a channel. `
|
|
16
|
-
* (`
|
|
17
|
-
* `
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
15
|
+
* Add a channel. `web` creates a website chat or form (the widget) from its
|
|
16
|
+
* complete configuration (`widget`: mode, texts, fields, colors and fonts,
|
|
17
|
+
* allowed origins, `publicLink` for its own hosted page); it is the one kind
|
|
18
|
+
* an AI tool creates. Create it with `inboundEnabled: false` to review it
|
|
19
|
+
* before publishing, then publish or pause it with `update_channel`;
|
|
20
|
+
* `publication` says whether visitors can reach it and where. `whatsapp`
|
|
21
|
+
* creates a pending channel and a setup link (`setup.url`) where the business
|
|
22
|
+
* connects its WhatsApp number; call `verify_channel` once that is done.
|
|
23
|
+
* `voice` connects a platform phone number (`platform_number`) or the
|
|
24
|
+
* organization's own carrier over SIP (`sip_trunk`) at once (SIP credentials
|
|
25
|
+
* are passed on once and never stored). A person adds WhatsApp and voice
|
|
26
|
+
* channels in Settings → Channels or with the REST API: over MCP they fail
|
|
27
|
+
* with CHANNEL_CREATION_IN_APP. With an Agent, traffic is on by default. Not
|
|
28
|
+
* idempotent: after an unknown outcome, `list_channels` before trying again.
|
|
23
29
|
*/
|
|
24
30
|
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
25
31
|
/**
|
|
@@ -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, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, RenewSetupRequest, RenewSetupResponse, UpdateRequest, UpdateResponse, VerifyRequest, VerifyResponse, } from "./client.js";
|
|
5
|
-
export type { RaizChannel, RaizChannelAgent, RaizChannelPage, RaizWidgetAgentChoice, RaizWidgetClientTool, RaizWidgetCopy, RaizWidgetField, RaizWidgetSettings, RaizWidgetSettingsInput, RaizWidgetTranslations, } from "./models.js";
|
|
5
|
+
export type { RaizChannel, RaizChannelAgent, RaizChannelPage, RaizWidgetAgentChoice, RaizWidgetClientTool, RaizWidgetCopy, RaizWidgetField, RaizWidgetPublication, RaizWidgetSettings, RaizWidgetSettingsInput, RaizWidgetTranslations, } from "./models.js";
|
|
@@ -52,6 +52,7 @@ export interface RaizChannel {
|
|
|
52
52
|
*/
|
|
53
53
|
provider: "phone" | "sip" | "whatsapp" | "web";
|
|
54
54
|
providerAccountId: string | null;
|
|
55
|
+
publication: RaizWidgetPublication | null;
|
|
55
56
|
/**
|
|
56
57
|
* Active with enabled traffic; WhatsApp outbound notifications do not need an
|
|
57
58
|
* Agent.
|
|
@@ -132,12 +133,35 @@ export interface RaizWidgetCopy {
|
|
|
132
133
|
welcomeTitle?: string;
|
|
133
134
|
}
|
|
134
135
|
export interface RaizWidgetField {
|
|
136
|
+
/**
|
|
137
|
+
* Help shown under the label.
|
|
138
|
+
*/
|
|
139
|
+
description?: string;
|
|
135
140
|
label: string;
|
|
136
141
|
name: string;
|
|
137
142
|
options?: string[];
|
|
138
143
|
placeholder?: string;
|
|
139
144
|
required: boolean;
|
|
140
|
-
type: "text" | "textarea" | "email" | "tel" | "number" | "date" | "select" | "checkbox";
|
|
145
|
+
type: "text" | "textarea" | "email" | "tel" | "number" | "date" | "select" | "radio" | "checkbox" | "url";
|
|
146
|
+
/**
|
|
147
|
+
* `half` sets two consecutive half fields side by side on wide screens.
|
|
148
|
+
*/
|
|
149
|
+
width?: "full" | "half";
|
|
150
|
+
}
|
|
151
|
+
export interface RaizWidgetPublication {
|
|
152
|
+
/**
|
|
153
|
+
* Visitors can start now: no `problems`. The hosted page answers at `url`,
|
|
154
|
+
* and the widget runs on its `allowedOrigins`.
|
|
155
|
+
*/
|
|
156
|
+
live: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Why it is not live: `CHANNEL_INACTIVE` (the channel is not active),
|
|
159
|
+
* `PAUSED` (`inboundEnabled` is off), `AGENT_REQUIRED` (no Agent assigned),
|
|
160
|
+
* `AGENT_PAUSED` (its Agent is paused), `NOT_PLACED` (no hosted page and no
|
|
161
|
+
* https site may embed it).
|
|
162
|
+
*/
|
|
163
|
+
problems: ("CHANNEL_INACTIVE" | "PAUSED" | "AGENT_REQUIRED" | "AGENT_PAUSED" | "NOT_PLACED")[];
|
|
164
|
+
url: string | null;
|
|
141
165
|
}
|
|
142
166
|
export interface RaizWidgetSettings {
|
|
143
167
|
/**
|
|
@@ -160,9 +184,15 @@ export interface RaizWidgetSettings {
|
|
|
160
184
|
*/
|
|
161
185
|
askFirstMessage?: boolean;
|
|
162
186
|
/**
|
|
163
|
-
*
|
|
187
|
+
* Background behind the Agent's messages; the background color shows them as
|
|
188
|
+
* plain text. A color in `#RRGGBB` form.
|
|
164
189
|
*/
|
|
165
190
|
assistantColor?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Text of the Agent's messages; null: `textColor`. A color in `#RRGGBB` form,
|
|
193
|
+
* or null to derive it.
|
|
194
|
+
*/
|
|
195
|
+
assistantTextColor?: string | null;
|
|
166
196
|
attachmentTypes?: ("image/png" | "image/jpeg" | "application/pdf" | "text/plain")[];
|
|
167
197
|
attachmentsEnabled?: boolean;
|
|
168
198
|
avatarUrl?: RaizHttpsUrl | null;
|
|
@@ -180,17 +210,35 @@ export interface RaizWidgetSettings {
|
|
|
180
210
|
*/
|
|
181
211
|
clientTools?: RaizWidgetClientTool[];
|
|
182
212
|
consentText?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Corner radius of fields and buttons, in pixels; 24 makes pill-shaped
|
|
215
|
+
* buttons. Null: derived from `radius`.
|
|
216
|
+
*/
|
|
217
|
+
controlRadius?: number | null;
|
|
183
218
|
/**
|
|
184
219
|
* A stylesheet applied inside the panel only; the launcher uses the style
|
|
185
220
|
* fields.
|
|
186
221
|
*/
|
|
187
222
|
customCss?: string;
|
|
188
223
|
/**
|
|
189
|
-
*
|
|
224
|
+
* Field errors and failures the visitor must see. A color in `#RRGGBB` form.
|
|
225
|
+
*/
|
|
226
|
+
errorColor?: string;
|
|
227
|
+
/**
|
|
228
|
+
* Up to 40 form fields with unique names, asked before the conversation (or
|
|
229
|
+
* alone, in `form` mode).
|
|
190
230
|
*/
|
|
191
231
|
fields?: RaizWidgetField[];
|
|
192
232
|
firstMessageLabel?: string;
|
|
233
|
+
/**
|
|
234
|
+
* The text typeface: `arbol` (bundled), `system` (the device's), `serif`,
|
|
235
|
+
* `rounded`, `page` (the embedding page's) or `custom` (`fontFamily`, with an
|
|
236
|
+
* optional `fontUrl`).
|
|
237
|
+
*/
|
|
193
238
|
font?: "arbol" | "system" | "serif" | "rounded" | "page" | "custom";
|
|
239
|
+
/**
|
|
240
|
+
* The CSS font-family of `font: custom`.
|
|
241
|
+
*/
|
|
194
242
|
fontFamily?: string;
|
|
195
243
|
fontSize?: number;
|
|
196
244
|
fontUrl?: RaizHttpsUrl | null;
|
|
@@ -204,6 +252,30 @@ export interface RaizWidgetSettings {
|
|
|
204
252
|
* A color in `#RRGGBB` form.
|
|
205
253
|
*/
|
|
206
254
|
headerTextColor?: string;
|
|
255
|
+
/**
|
|
256
|
+
* The headings' typeface: `text` (the same as `font`) or one of `font`'s
|
|
257
|
+
* choices, with `headingFontFamily` and `headingFontUrl` for `custom`.
|
|
258
|
+
*/
|
|
259
|
+
headingFont?: "text" | "arbol" | "system" | "serif" | "rounded" | "page" | "custom";
|
|
260
|
+
/**
|
|
261
|
+
* The CSS font-family of `headingFont: custom`.
|
|
262
|
+
*/
|
|
263
|
+
headingFontFamily?: string;
|
|
264
|
+
headingFontUrl?: RaizHttpsUrl | null;
|
|
265
|
+
/**
|
|
266
|
+
* The headings' weight, from 300 (light) to 800 (heavy).
|
|
267
|
+
*/
|
|
268
|
+
headingWeight?: number;
|
|
269
|
+
/**
|
|
270
|
+
* The border of form fields and of the message box. A color in `#RRGGBB`
|
|
271
|
+
* form, or null to derive it.
|
|
272
|
+
*/
|
|
273
|
+
inputBorderColor?: string | null;
|
|
274
|
+
/**
|
|
275
|
+
* The background of form fields and of the message box. A color in `#RRGGBB`
|
|
276
|
+
* form, or null to derive it.
|
|
277
|
+
*/
|
|
278
|
+
inputColor?: string | null;
|
|
207
279
|
/**
|
|
208
280
|
* The visitor interface language when the browser asks for none of the
|
|
209
281
|
* translated ones.
|
|
@@ -216,6 +288,11 @@ export interface RaizWidgetSettings {
|
|
|
216
288
|
* accessible name.
|
|
217
289
|
*/
|
|
218
290
|
launcherStyle?: "icon" | "label";
|
|
291
|
+
/**
|
|
292
|
+
* Links; null: `primaryColor`. A color in `#RRGGBB` form, or null to derive
|
|
293
|
+
* it.
|
|
294
|
+
*/
|
|
295
|
+
linkColor?: string | null;
|
|
219
296
|
logoObjectKey?: string | null;
|
|
220
297
|
/**
|
|
221
298
|
* Visitor messages per session.
|
|
@@ -227,6 +304,11 @@ export interface RaizWidgetSettings {
|
|
|
227
304
|
* `form-chat`: the form, then the conversation.
|
|
228
305
|
*/
|
|
229
306
|
mode?: "chat" | "form" | "form-chat";
|
|
307
|
+
/**
|
|
308
|
+
* Secondary text: descriptions, hints and times. A color in `#RRGGBB` form,
|
|
309
|
+
* or null to derive it.
|
|
310
|
+
*/
|
|
311
|
+
mutedTextColor?: string | null;
|
|
230
312
|
/**
|
|
231
313
|
* Increases when a policy field, the channel's Agent or its inbound switch
|
|
232
314
|
* changes; sessions opened under an older revision end.
|
|
@@ -275,9 +357,25 @@ export interface RaizWidgetSettings {
|
|
|
275
357
|
translations?: RaizWidgetTranslations;
|
|
276
358
|
turnsPerDay?: number;
|
|
277
359
|
/**
|
|
278
|
-
* A color in `#RRGGBB`
|
|
360
|
+
* Text on `primaryColor`: buttons and the launcher. A color in `#RRGGBB`
|
|
361
|
+
* form.
|
|
279
362
|
*/
|
|
280
363
|
userTextColor?: string;
|
|
364
|
+
/**
|
|
365
|
+
* Background of the visitor's own messages; null: a light tint of
|
|
366
|
+
* `textColor`. A color in `#RRGGBB` form, or null to derive it.
|
|
367
|
+
*/
|
|
368
|
+
visitorColor?: string | null;
|
|
369
|
+
/**
|
|
370
|
+
* Text of the visitor's own messages; null: `textColor`. A color in `#RRGGBB`
|
|
371
|
+
* form, or null to derive it.
|
|
372
|
+
*/
|
|
373
|
+
visitorTextColor?: string | null;
|
|
374
|
+
/**
|
|
375
|
+
* Let visitors record a voice message; Raíz transcribes it and the Agent
|
|
376
|
+
* answers the transcript.
|
|
377
|
+
*/
|
|
378
|
+
voiceMessages?: boolean;
|
|
281
379
|
welcomeText?: string;
|
|
282
380
|
welcomeTitle?: string;
|
|
283
381
|
}
|
|
@@ -302,9 +400,15 @@ export interface RaizWidgetSettingsInput {
|
|
|
302
400
|
*/
|
|
303
401
|
askFirstMessage?: boolean;
|
|
304
402
|
/**
|
|
305
|
-
*
|
|
403
|
+
* Background behind the Agent's messages; the background color shows them as
|
|
404
|
+
* plain text. A color in `#RRGGBB` form.
|
|
306
405
|
*/
|
|
307
406
|
assistantColor?: string;
|
|
407
|
+
/**
|
|
408
|
+
* Text of the Agent's messages; null: `textColor`. A color in `#RRGGBB` form,
|
|
409
|
+
* or null to derive it.
|
|
410
|
+
*/
|
|
411
|
+
assistantTextColor?: string | null;
|
|
308
412
|
attachmentTypes?: ("image/png" | "image/jpeg" | "application/pdf" | "text/plain")[];
|
|
309
413
|
attachmentsEnabled?: boolean;
|
|
310
414
|
avatarUrl?: RaizHttpsUrl | null;
|
|
@@ -322,17 +426,35 @@ export interface RaizWidgetSettingsInput {
|
|
|
322
426
|
*/
|
|
323
427
|
clientTools?: RaizWidgetClientTool[];
|
|
324
428
|
consentText?: string;
|
|
429
|
+
/**
|
|
430
|
+
* Corner radius of fields and buttons, in pixels; 24 makes pill-shaped
|
|
431
|
+
* buttons. Null: derived from `radius`.
|
|
432
|
+
*/
|
|
433
|
+
controlRadius?: number | null;
|
|
325
434
|
/**
|
|
326
435
|
* A stylesheet applied inside the panel only; the launcher uses the style
|
|
327
436
|
* fields.
|
|
328
437
|
*/
|
|
329
438
|
customCss?: string;
|
|
330
439
|
/**
|
|
331
|
-
*
|
|
440
|
+
* Field errors and failures the visitor must see. A color in `#RRGGBB` form.
|
|
441
|
+
*/
|
|
442
|
+
errorColor?: string;
|
|
443
|
+
/**
|
|
444
|
+
* Up to 40 form fields with unique names, asked before the conversation (or
|
|
445
|
+
* alone, in `form` mode).
|
|
332
446
|
*/
|
|
333
447
|
fields?: RaizWidgetField[];
|
|
334
448
|
firstMessageLabel?: string;
|
|
449
|
+
/**
|
|
450
|
+
* The text typeface: `arbol` (bundled), `system` (the device's), `serif`,
|
|
451
|
+
* `rounded`, `page` (the embedding page's) or `custom` (`fontFamily`, with an
|
|
452
|
+
* optional `fontUrl`).
|
|
453
|
+
*/
|
|
335
454
|
font?: "arbol" | "system" | "serif" | "rounded" | "page" | "custom";
|
|
455
|
+
/**
|
|
456
|
+
* The CSS font-family of `font: custom`.
|
|
457
|
+
*/
|
|
336
458
|
fontFamily?: string;
|
|
337
459
|
fontSize?: number;
|
|
338
460
|
fontUrl?: RaizHttpsUrl | null;
|
|
@@ -346,6 +468,30 @@ export interface RaizWidgetSettingsInput {
|
|
|
346
468
|
* A color in `#RRGGBB` form.
|
|
347
469
|
*/
|
|
348
470
|
headerTextColor?: string;
|
|
471
|
+
/**
|
|
472
|
+
* The headings' typeface: `text` (the same as `font`) or one of `font`'s
|
|
473
|
+
* choices, with `headingFontFamily` and `headingFontUrl` for `custom`.
|
|
474
|
+
*/
|
|
475
|
+
headingFont?: "text" | "arbol" | "system" | "serif" | "rounded" | "page" | "custom";
|
|
476
|
+
/**
|
|
477
|
+
* The CSS font-family of `headingFont: custom`.
|
|
478
|
+
*/
|
|
479
|
+
headingFontFamily?: string;
|
|
480
|
+
headingFontUrl?: RaizHttpsUrl | null;
|
|
481
|
+
/**
|
|
482
|
+
* The headings' weight, from 300 (light) to 800 (heavy).
|
|
483
|
+
*/
|
|
484
|
+
headingWeight?: number;
|
|
485
|
+
/**
|
|
486
|
+
* The border of form fields and of the message box. A color in `#RRGGBB`
|
|
487
|
+
* form, or null to derive it.
|
|
488
|
+
*/
|
|
489
|
+
inputBorderColor?: string | null;
|
|
490
|
+
/**
|
|
491
|
+
* The background of form fields and of the message box. A color in `#RRGGBB`
|
|
492
|
+
* form, or null to derive it.
|
|
493
|
+
*/
|
|
494
|
+
inputColor?: string | null;
|
|
349
495
|
/**
|
|
350
496
|
* The visitor interface language when the browser asks for none of the
|
|
351
497
|
* translated ones.
|
|
@@ -358,6 +504,11 @@ export interface RaizWidgetSettingsInput {
|
|
|
358
504
|
* accessible name.
|
|
359
505
|
*/
|
|
360
506
|
launcherStyle?: "icon" | "label";
|
|
507
|
+
/**
|
|
508
|
+
* Links; null: `primaryColor`. A color in `#RRGGBB` form, or null to derive
|
|
509
|
+
* it.
|
|
510
|
+
*/
|
|
511
|
+
linkColor?: string | null;
|
|
361
512
|
logoObjectKey?: string | null;
|
|
362
513
|
/**
|
|
363
514
|
* Visitor messages per session.
|
|
@@ -369,6 +520,11 @@ export interface RaizWidgetSettingsInput {
|
|
|
369
520
|
* `form-chat`: the form, then the conversation.
|
|
370
521
|
*/
|
|
371
522
|
mode?: "chat" | "form" | "form-chat";
|
|
523
|
+
/**
|
|
524
|
+
* Secondary text: descriptions, hints and times. A color in `#RRGGBB` form,
|
|
525
|
+
* or null to derive it.
|
|
526
|
+
*/
|
|
527
|
+
mutedTextColor?: string | null;
|
|
372
528
|
position?: "left" | "right";
|
|
373
529
|
/**
|
|
374
530
|
* A color in `#RRGGBB` form.
|
|
@@ -412,9 +568,25 @@ export interface RaizWidgetSettingsInput {
|
|
|
412
568
|
translations?: RaizWidgetTranslations;
|
|
413
569
|
turnsPerDay?: number;
|
|
414
570
|
/**
|
|
415
|
-
* A color in `#RRGGBB`
|
|
571
|
+
* Text on `primaryColor`: buttons and the launcher. A color in `#RRGGBB`
|
|
572
|
+
* form.
|
|
416
573
|
*/
|
|
417
574
|
userTextColor?: string;
|
|
575
|
+
/**
|
|
576
|
+
* Background of the visitor's own messages; null: a light tint of
|
|
577
|
+
* `textColor`. A color in `#RRGGBB` form, or null to derive it.
|
|
578
|
+
*/
|
|
579
|
+
visitorColor?: string | null;
|
|
580
|
+
/**
|
|
581
|
+
* Text of the visitor's own messages; null: `textColor`. A color in `#RRGGBB`
|
|
582
|
+
* form, or null to derive it.
|
|
583
|
+
*/
|
|
584
|
+
visitorTextColor?: string | null;
|
|
585
|
+
/**
|
|
586
|
+
* Let visitors record a voice message; Raíz transcribes it and the Agent
|
|
587
|
+
* answers the transcript.
|
|
588
|
+
*/
|
|
589
|
+
voiceMessages?: boolean;
|
|
418
590
|
welcomeText?: string;
|
|
419
591
|
welcomeTitle?: string;
|
|
420
592
|
}
|
package/dist/raiz/models.d.ts
CHANGED
|
@@ -456,6 +456,13 @@ export interface RaizFailureResponse {
|
|
|
456
456
|
};
|
|
457
457
|
message: "This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.";
|
|
458
458
|
retryable: false;
|
|
459
|
+
} | {
|
|
460
|
+
code: "CHANNEL_CREATION_IN_APP";
|
|
461
|
+
data: {
|
|
462
|
+
[key: string]: unknown;
|
|
463
|
+
};
|
|
464
|
+
message: "An AI tool creates website chats and forms only. A person adds WhatsApp numbers and phone numbers in Settings → Channels, or through the REST API.";
|
|
465
|
+
retryable: false;
|
|
459
466
|
} | {
|
|
460
467
|
code: "CHANNEL_AGENT_REQUIRED";
|
|
461
468
|
data: {
|
|
@@ -813,6 +820,13 @@ export interface RaizFailureResponse {
|
|
|
813
820
|
};
|
|
814
821
|
message: "This widget session is unavailable.";
|
|
815
822
|
retryable: false;
|
|
823
|
+
} | {
|
|
824
|
+
code: "WIDGET_VOICE_UNHEARD";
|
|
825
|
+
data: {
|
|
826
|
+
[key: string]: unknown;
|
|
827
|
+
};
|
|
828
|
+
message: "The voice message could not be understood. Record it again or write the message.";
|
|
829
|
+
retryable: false;
|
|
816
830
|
} | {
|
|
817
831
|
code: "ADDRESS_IN_USE";
|
|
818
832
|
data: {
|
|
@@ -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 {
|
|
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:
|
|
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;
|