@arbol-ai/sdk 5.46.0 → 5.48.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/account/connections/models.d.ts +11 -1
- package/dist/account/permissions/models.d.ts +1 -1
- package/dist/gmedic/appointments/models.d.ts +3 -3
- package/dist/raiz/campaigns/client.d.ts +23 -13
- package/dist/raiz/campaigns/client.js +1 -1
- package/dist/raiz/campaigns/index.d.ts +1 -1
- package/dist/raiz/campaigns/models.d.ts +26 -17
- package/dist/raiz/campaigns/models.js +3 -5
- package/dist/raiz/channels/index.d.ts +1 -1
- package/dist/raiz/channels/models.d.ts +51 -156
- package/dist/raiz/conversations/client.d.ts +32 -6
- package/dist/raiz/conversations/client.js +12 -2
- package/dist/raiz/conversations/index.d.ts +2 -2
- package/dist/raiz/conversations/models.d.ts +167 -8
- package/dist/raiz/conversations/models.js +12 -2
- package/dist/raiz/index.d.ts +1 -1
- package/dist/raiz/models.d.ts +165 -0
- package/dist/raiz/models.js +4 -1
- package/dist/visoft/appointments/client.d.ts +5 -5
- package/dist/visoft/appointments/models.d.ts +6 -0
- package/package.json +3 -3
|
@@ -31,6 +31,16 @@ export interface AccountConnection {
|
|
|
31
31
|
* The independent portal this account connects to.
|
|
32
32
|
*/
|
|
33
33
|
portal?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Its WhatsApp appointment reminders, or null when its integration cannot
|
|
36
|
+
* feed them. Until someone changes them they are off, at 09:00, the day
|
|
37
|
+
* before.
|
|
38
|
+
*/
|
|
39
|
+
reminders: {
|
|
40
|
+
daysBefore: number;
|
|
41
|
+
mode: "off" | "review" | "automatic";
|
|
42
|
+
sendAt: string;
|
|
43
|
+
} | null;
|
|
34
44
|
server: {
|
|
35
45
|
authHeader: string | null;
|
|
36
46
|
fileArgument: string | null;
|
|
@@ -73,7 +83,7 @@ export interface AccountConnection {
|
|
|
73
83
|
path: string;
|
|
74
84
|
};
|
|
75
85
|
rpcMethod?: string | null;
|
|
76
|
-
runtimeInputs?: ("connectionId" | "channel" | "conversationUrl")[];
|
|
86
|
+
runtimeInputs?: ("connectionId" | "channel" | "conversationUrl" | "verifiedContact" | "outboundRecipient")[];
|
|
77
87
|
writesThrough?: string[];
|
|
78
88
|
}[];
|
|
79
89
|
/**
|
|
@@ -22,7 +22,7 @@ export interface AccountPermission {
|
|
|
22
22
|
/**
|
|
23
23
|
* The product or integration the permission belongs to.
|
|
24
24
|
*/
|
|
25
|
-
group: "raiz" | "agenda" | "ambar" | "sura" | "visoft" | "salud-total" | "nueva-eps" | "comfachoco" | "oficlinic" | "sanitas" | "account";
|
|
25
|
+
group: "raiz" | "agenda" | "ambar" | "sura" | "visoft" | "salud-total" | "nueva-eps" | "comfachoco" | "oficlinic" | "sanitas" | "gmedic" | "account";
|
|
26
26
|
value: string;
|
|
27
27
|
}
|
|
28
28
|
export interface AccountPermissionPage {
|
|
@@ -79,7 +79,7 @@ export interface GmedicAppointmentsPage {
|
|
|
79
79
|
medicalServiceId?: string | null;
|
|
80
80
|
medicalServiceName?: string | null;
|
|
81
81
|
meetUrl?: string | null;
|
|
82
|
-
modality?:
|
|
82
|
+
modality?: string | null;
|
|
83
83
|
modificationDate?: string | null;
|
|
84
84
|
opportunityIndicator?: number | null;
|
|
85
85
|
personCreator?: string | null;
|
|
@@ -277,7 +277,7 @@ export interface GmedicCreateAppointmentResult {
|
|
|
277
277
|
medicalServiceId?: string | null;
|
|
278
278
|
medicalServiceName?: string | null;
|
|
279
279
|
meetUrl?: string | null;
|
|
280
|
-
modality?:
|
|
280
|
+
modality?: string | null;
|
|
281
281
|
/**
|
|
282
282
|
* Deprecated: use `updatedAt`. Answered until 2027-01-28.
|
|
283
283
|
*
|
|
@@ -521,7 +521,7 @@ export interface GmedicUpdateAppointmentResult {
|
|
|
521
521
|
medicalServiceId?: string | null;
|
|
522
522
|
medicalServiceName?: string | null;
|
|
523
523
|
meetUrl?: string | null;
|
|
524
|
-
modality?:
|
|
524
|
+
modality?: string | null;
|
|
525
525
|
/**
|
|
526
526
|
* Deprecated: use `updatedAt`. Answered until 2027-01-28.
|
|
527
527
|
*
|
|
@@ -60,19 +60,18 @@ export interface Client {
|
|
|
60
60
|
*
|
|
61
61
|
* Start reaching people: from now on the campaign's due recipients are
|
|
62
62
|
* called, at most `settings.channels.maxConcurrentOutboundCalls` (five by
|
|
63
|
-
* default) at once across the organization, or sent their message,
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* people.
|
|
63
|
+
* default) at once across the organization, or sent their message, a few a
|
|
64
|
+
* second. A call campaign needs an active, published voice Agent
|
|
65
|
+
* (VOICE_AGENT_NOT_READY). A WhatsApp campaign needs an active text Agent
|
|
66
|
+
* (CAMPAIGN_AGENT_NOT_READY), a line that can send (CHANNEL_NOT_READY), an
|
|
67
|
+
* approved template whose parameters fit (a `TEMPLATE_*` code), a value for
|
|
68
|
+
* every variable (CAMPAIGN_VARIABLE_MISSING) and, when the template's header
|
|
69
|
+
* is a document, image or video, the first pending recipient's own `header`
|
|
70
|
+
* file (CAMPAIGN_HEADER_MISSING). A recipient must be pending
|
|
71
|
+
* (CAMPAIGN_NO_RECIPIENTS). `get_campaign` with `expand=readiness` lists all
|
|
72
|
+
* of this beforehand. A campaign starts once: starting a running one changes
|
|
73
|
+
* nothing, and a paused one resumes with `update_campaign` and `paused:
|
|
74
|
+
* false`. Not an AI tool: it reaches real people.
|
|
76
75
|
*/
|
|
77
76
|
start(request: StartRequest, options?: RequestOptions): Promise<StartResponse>;
|
|
78
77
|
/**
|
|
@@ -132,6 +131,17 @@ export interface GetRequest {
|
|
|
132
131
|
* yet.
|
|
133
132
|
*/
|
|
134
133
|
recipientsResult?: string;
|
|
134
|
+
/**
|
|
135
|
+
* With `expand=recipients`: only those whose last pressed button is this one,
|
|
136
|
+
* by its exact text.
|
|
137
|
+
*/
|
|
138
|
+
recipientsButton?: string;
|
|
139
|
+
/**
|
|
140
|
+
* With `expand=recipients`, WhatsApp: how the people a message reached
|
|
141
|
+
* answered it. `button`: they pressed one of its buttons. `written`: they
|
|
142
|
+
* wrote and pressed none. `none`: they did neither (`progress.noReply`).
|
|
143
|
+
*/
|
|
144
|
+
recipientsReply?: "button" | "written" | "none";
|
|
135
145
|
/**
|
|
136
146
|
* `pending`: waiting for its (next) call or message. `in_progress`: being
|
|
137
147
|
* called, or on WhatsApp waiting for a reply until a reminder is due.
|
|
@@ -25,7 +25,7 @@ const CreateOperation = {
|
|
|
25
25
|
const GetOperation = {
|
|
26
26
|
method: "GET",
|
|
27
27
|
route: "/v1/raiz/campaigns/{campaignId}",
|
|
28
|
-
query: { expand: "expand", recipientsCursor: "recipientsCursor", recipientsDirection: "recipientsDirection", recipientsLimit: "recipientsLimit", recipientsQ: "recipientsQ", recipientsResult: "recipientsResult", recipientsStatus: "recipientsStatus" },
|
|
28
|
+
query: { expand: "expand", recipientsCursor: "recipientsCursor", recipientsDirection: "recipientsDirection", recipientsLimit: "recipientsLimit", recipientsQ: "recipientsQ", recipientsResult: "recipientsResult", recipientsButton: "recipientsButton", recipientsReply: "recipientsReply", recipientsStatus: "recipientsStatus" },
|
|
29
29
|
response: RaizCampaignResponseCodec,
|
|
30
30
|
errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
31
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, GetRequest, GetResponse, ListRequest, ListResponse, StartRequest, StartResponse, UpdateRequest, UpdateResponse, } from "./client.js";
|
|
5
|
-
export type { RaizCampaign, RaizCampaignBlocker, RaizCampaignPage, RaizCampaignPageResponse, RaizCampaignProgress, RaizCampaignReadiness, RaizCampaignRecipientInput, RaizCampaignRecipientPage, RaizCampaignResponse, RaizCampaignResult, RaizCampaignTemplate, RaizCampaignTemplateInput, RaizCreateCampaignBadRequestError, RaizCreateCampaignBadRequestFailure, RaizCreateCampaignBody, RaizCreateCampaignConflictError, RaizCreateCampaignConflictFailure, RaizCreateCampaignServiceUnavailableError, RaizCreateCampaignServiceUnavailableFailure, RaizCreateCampaignUnprocessableContentError, RaizCreateCampaignUnprocessableContentFailure, RaizGetCampaignBadRequestError, RaizGetCampaignBadRequestFailure, RaizGetCampaignServiceUnavailableError, RaizGetCampaignServiceUnavailableFailure, RaizListCampaignsBadRequestError, RaizListCampaignsBadRequestFailure, RaizListCampaignsServiceUnavailableError, RaizListCampaignsServiceUnavailableFailure, RaizStartCampaignBadRequestError, RaizStartCampaignBadRequestFailure, RaizStartCampaignConflictError, RaizStartCampaignConflictFailure, RaizStartCampaignNotFoundError, RaizStartCampaignNotFoundFailure, RaizStartCampaignUnprocessableContentError, RaizStartCampaignUnprocessableContentFailure,
|
|
5
|
+
export type { RaizCampaign, RaizCampaignBlocker, RaizCampaignPage, RaizCampaignPageResponse, RaizCampaignProgress, RaizCampaignReadiness, RaizCampaignRecipientInput, RaizCampaignRecipientPage, RaizCampaignResponse, RaizCampaignResult, RaizCampaignTemplate, RaizCampaignTemplateInput, RaizCreateCampaignBadRequestError, RaizCreateCampaignBadRequestFailure, RaizCreateCampaignBody, RaizCreateCampaignConflictError, RaizCreateCampaignConflictFailure, RaizCreateCampaignServiceUnavailableError, RaizCreateCampaignServiceUnavailableFailure, RaizCreateCampaignUnprocessableContentError, RaizCreateCampaignUnprocessableContentFailure, RaizGetCampaignBadRequestError, RaizGetCampaignBadRequestFailure, RaizGetCampaignServiceUnavailableError, RaizGetCampaignServiceUnavailableFailure, RaizListCampaignsBadRequestError, RaizListCampaignsBadRequestFailure, RaizListCampaignsServiceUnavailableError, RaizListCampaignsServiceUnavailableFailure, RaizStartCampaignBadRequestError, RaizStartCampaignBadRequestFailure, RaizStartCampaignConflictError, RaizStartCampaignConflictFailure, RaizStartCampaignNotFoundError, RaizStartCampaignNotFoundFailure, RaizStartCampaignUnprocessableContentError, RaizStartCampaignUnprocessableContentFailure, RaizUpdateCampaignBadRequestError, RaizUpdateCampaignBadRequestFailure, RaizUpdateCampaignBody, RaizUpdateCampaignConflictError, RaizUpdateCampaignConflictFailure, RaizUpdateCampaignServiceUnavailableError, RaizUpdateCampaignServiceUnavailableFailure, RaizUpdateCampaignUnprocessableContentError, RaizUpdateCampaignUnprocessableContentFailure, } from "./models.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InvalidInputFailure, PageInfo, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type RaizCampaignAgentNotReadyFailure, type RaizCampaignHeaderMissingFailure, type RaizCampaignHeaderNotStoredFailure, type RaizCampaignNoRecipientsFailure, type RaizCampaignVariableMissingFailure, type RaizChannelAgentMismatchFailure, type RaizChannelNotReadyFailure, type RaizChannelTypeMismatchFailure, type RaizContactHoursWindow, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizInvalidStateFailure, type RaizPhoneNumber, type RaizResourceNotFoundFailure, type RaizTemplateHeaderFile, type RaizTemplateHeaderMismatchFailure, type RaizTemplateHeaderRequiredFailure, type RaizTemplateNotApprovedFailure, type RaizTemplateNotFoundFailure, type RaizTemplateParametersMismatchFailure, type RaizTemplateUnsupportedFailure, type RaizTimeZoneUnknownFailure, type RaizVersionConflictFailure, type RaizVoiceAgentNotReadyFailure } from "../models.js";
|
|
3
3
|
export interface RaizCampaign {
|
|
4
4
|
/**
|
|
5
5
|
* Agent id.
|
|
@@ -126,6 +126,16 @@ export interface RaizCampaignProgress {
|
|
|
126
126
|
* judged.
|
|
127
127
|
*/
|
|
128
128
|
answered: number;
|
|
129
|
+
/**
|
|
130
|
+
* WhatsApp: the template's quick-reply buttons people pressed, most pressed
|
|
131
|
+
* first, each with how many recipients pressed it last. A recipient counts
|
|
132
|
+
* once, under their latest press. A button nobody pressed is not listed. Read
|
|
133
|
+
* from the reply itself: a written answer is not a button.
|
|
134
|
+
*/
|
|
135
|
+
buttons: {
|
|
136
|
+
recipients: number;
|
|
137
|
+
text: string;
|
|
138
|
+
}[];
|
|
129
139
|
completed: number;
|
|
130
140
|
/**
|
|
131
141
|
* WhatsApp: recipients who received a message.
|
|
@@ -138,6 +148,17 @@ export interface RaizCampaignProgress {
|
|
|
138
148
|
* answering. A voicemail counts here.
|
|
139
149
|
*/
|
|
140
150
|
noAnswer: number;
|
|
151
|
+
/**
|
|
152
|
+
* WhatsApp: recipients a message reached (`deliveredAt`) who pressed none of
|
|
153
|
+
* its buttons, whether or not they wrote. People still pending, or whose
|
|
154
|
+
* message never arrived, are not counted.
|
|
155
|
+
*/
|
|
156
|
+
noButton: number;
|
|
157
|
+
/**
|
|
158
|
+
* WhatsApp: recipients a message reached who neither pressed a button nor
|
|
159
|
+
* wrote: `noButton` less those who answered in writing.
|
|
160
|
+
*/
|
|
161
|
+
noReply: number;
|
|
141
162
|
pending: number;
|
|
142
163
|
/**
|
|
143
164
|
* WhatsApp: recipients who read a message.
|
|
@@ -208,6 +229,10 @@ export interface RaizCampaignRecipientPage {
|
|
|
208
229
|
data: {
|
|
209
230
|
address: string;
|
|
210
231
|
attemptCount: number;
|
|
232
|
+
button: {
|
|
233
|
+
pressedAt: Temporal.Instant;
|
|
234
|
+
text: string;
|
|
235
|
+
} | null;
|
|
211
236
|
contact: {
|
|
212
237
|
id: string;
|
|
213
238
|
name: string | null;
|
|
@@ -506,21 +531,6 @@ export interface RaizStartCampaignUnprocessableContentError {
|
|
|
506
531
|
success: false;
|
|
507
532
|
}
|
|
508
533
|
export type RaizStartCampaignUnprocessableContentFailure = RaizCampaignHeaderMissingFailure | RaizCampaignVariableMissingFailure | RaizChannelAgentMismatchFailure | RaizTemplateHeaderMismatchFailure | RaizTemplateHeaderRequiredFailure | RaizTemplateParametersMismatchFailure | RaizTemplateUnsupportedFailure;
|
|
509
|
-
export interface RaizTemplateHeaderFile {
|
|
510
|
-
/**
|
|
511
|
-
* The file's bytes in base64, at most 5242880 bytes decoded.
|
|
512
|
-
*/
|
|
513
|
-
data: Uint8Array;
|
|
514
|
-
/**
|
|
515
|
-
* The name the contact sees for a document.
|
|
516
|
-
*/
|
|
517
|
-
fileName?: string;
|
|
518
|
-
/**
|
|
519
|
-
* It must fit the template's header: a PDF for `document`, JPEG or PNG for
|
|
520
|
-
* `image`, MP4 for `video`.
|
|
521
|
-
*/
|
|
522
|
-
mediaType: "application/pdf" | "image/jpeg" | "image/png" | "video/mp4";
|
|
523
|
-
}
|
|
524
534
|
/**
|
|
525
535
|
* A failed answer.
|
|
526
536
|
*/
|
|
@@ -648,5 +658,4 @@ export declare const RaizCampaignRecipientInputCodec: import("../../_/codec.js")
|
|
|
648
658
|
export declare const RaizCampaignRecipientPageCodec: import("../../_/codec.js").Codec;
|
|
649
659
|
export declare const RaizCampaignResponseCodec: import("../../_/codec.js").Codec;
|
|
650
660
|
export declare const RaizCreateCampaignBodyCodec: import("../../_/codec.js").Codec;
|
|
651
|
-
export declare const RaizTemplateHeaderFileCodec: import("../../_/codec.js").Codec;
|
|
652
661
|
export declare const RaizUpdateCampaignBodyCodec: import("../../_/codec.js").Codec;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { array,
|
|
3
|
+
import { array, instant, object, union } from "../../_/index.js";
|
|
4
|
+
import { RaizTemplateHeaderFileCodec, } from "../models.js";
|
|
4
5
|
export const RaizCampaignCodec = object([
|
|
5
6
|
["createdAt", null, instant],
|
|
6
7
|
["endedAt", null, instant],
|
|
@@ -22,15 +23,12 @@ export const RaizCampaignRecipientInputCodec = object([
|
|
|
22
23
|
["header", null, () => RaizTemplateHeaderFileCodec],
|
|
23
24
|
]);
|
|
24
25
|
export const RaizCampaignRecipientPageCodec = object([
|
|
25
|
-
["data", null, array(object([["createdAt", null, instant], ["deliveredAt", null, instant], ["lastAttempt", null, object([["startedAt", null, instant]])], ["nextAttemptAt", null, instant], ["readAt", null, instant], ["repliedAt", null, instant], ["updatedAt", null, instant]]))],
|
|
26
|
+
["data", null, array(object([["button", null, object([["pressedAt", null, instant]])], ["createdAt", null, instant], ["deliveredAt", null, instant], ["lastAttempt", null, object([["startedAt", null, instant]])], ["nextAttemptAt", null, instant], ["readAt", null, instant], ["repliedAt", null, instant], ["updatedAt", null, instant]]))],
|
|
26
27
|
]);
|
|
27
28
|
export const RaizCampaignResponseCodec = object([
|
|
28
29
|
["data", null, () => RaizCampaignCodec],
|
|
29
30
|
]);
|
|
30
31
|
export const RaizCreateCampaignBodyCodec = union([object([["recipients", null, array(() => RaizCampaignRecipientInputCodec)], ["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]]), object([["recipients", null, array(() => RaizCampaignRecipientInputCodec)], ["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]])]);
|
|
31
|
-
export const RaizTemplateHeaderFileCodec = object([
|
|
32
|
-
["data", null, bytes],
|
|
33
|
-
]);
|
|
34
32
|
export const RaizUpdateCampaignBodyCodec = object([
|
|
35
33
|
["addRecipients", null, array(() => RaizCampaignRecipientInputCodec)],
|
|
36
34
|
["recipients", null, array(() => RaizCampaignRecipientInputCodec)],
|
|
@@ -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 { RaizAgentNotTextFailure, RaizCallRejectedFailure, RaizChannel, RaizChannelAgent, RaizChannelAgentRequiredFailure, RaizChannelCreationInAppFailure, RaizChannelEndpointInUseFailure, RaizChannelPage, RaizChannelPageResponse, RaizChannelResponse,
|
|
5
|
+
export type { RaizAgentNotTextFailure, RaizCallRejectedFailure, RaizChannel, RaizChannelAgent, RaizChannelAgentRequiredFailure, RaizChannelCreationInAppFailure, RaizChannelEndpointInUseFailure, RaizChannelPage, RaizChannelPageResponse, RaizChannelResponse, RaizContactUnreachableFailure, RaizConversationViewAuthorOnlyFailure, RaizConversationViewLimitReachedFailure, RaizConversationViewNameTakenFailure, RaizCreateChannelBadGatewayError, RaizCreateChannelBadGatewayFailure, RaizCreateChannelBadRequestError, RaizCreateChannelBadRequestFailure, RaizCreateChannelBody, RaizCreateChannelConflictError, RaizCreateChannelConflictFailure, RaizCreateChannelContentTooLargeError, RaizCreateChannelContentTooLargeFailure, RaizCreateChannelForbiddenError, RaizCreateChannelForbiddenFailure, RaizCreateChannelGatewayTimeoutError, RaizCreateChannelGatewayTimeoutFailure, RaizCreateChannelInternalServerErrorError, RaizCreateChannelInternalServerErrorFailure, RaizCreateChannelNotFoundError, RaizCreateChannelNotFoundFailure, RaizCreateChannelServiceUnavailableError, RaizCreateChannelServiceUnavailableFailure, RaizCreateChannelTooManyRequestsError, RaizCreateChannelTooManyRequestsFailure, RaizCreateChannelUnprocessableContentError, RaizCreateChannelUnprocessableContentFailure, RaizDeleteChannelBadGatewayError, RaizDeleteChannelBadGatewayFailure, RaizDeleteChannelBadRequestError, RaizDeleteChannelBadRequestFailure, RaizDeleteChannelConflictError, RaizDeleteChannelConflictFailure, RaizDeleteChannelForbiddenError, RaizDeleteChannelForbiddenFailure, RaizDeleteChannelGatewayTimeoutError, RaizDeleteChannelGatewayTimeoutFailure, RaizDeleteChannelInternalServerErrorError, RaizDeleteChannelInternalServerErrorFailure, RaizDeleteChannelNotFoundError, RaizDeleteChannelNotFoundFailure, RaizDeleteChannelServiceUnavailableError, RaizDeleteChannelServiceUnavailableFailure, RaizDeleteChannelTooManyRequestsError, RaizDeleteChannelTooManyRequestsFailure, RaizDeleteChannelUnprocessableContentError, RaizDeleteChannelUnprocessableContentFailure, RaizGetChannelServiceUnavailableError, RaizGetChannelServiceUnavailableFailure, RaizGetChannelTooManyRequestsError, RaizGetChannelTooManyRequestsFailure, RaizImportFileTooLargeError, RaizListChannelsBadRequestError, RaizListChannelsBadRequestFailure, RaizListChannelsServiceUnavailableError, RaizListChannelsServiceUnavailableFailure, RaizOutboundChannelInternalFailure, RaizOutboundChannelRefusedFailure, RaizOutsideContactHoursFailure, RaizProfileVariableMissingFailure, RaizProviderAccountExistsFailure, RaizProviderAccountInUseFailure, RaizProviderAccountMismatchFailure, RaizProviderAccountUnsupportedFailure, RaizProviderCredentialsRejectedFailure, RaizProviderSecretUnavailableFailure, RaizRenewChannelSetupConflictError, RaizRenewChannelSetupConflictFailure, RaizRenewChannelSetupTooManyRequestsError, RaizRenewChannelSetupTooManyRequestsFailure, RaizUpdateChannelBadGatewayError, RaizUpdateChannelBadGatewayFailure, RaizUpdateChannelBadRequestError, RaizUpdateChannelBadRequestFailure, RaizUpdateChannelBody, RaizUpdateChannelConflictError, RaizUpdateChannelConflictFailure, RaizUpdateChannelContentTooLargeError, RaizUpdateChannelContentTooLargeFailure, RaizUpdateChannelForbiddenError, RaizUpdateChannelForbiddenFailure, RaizUpdateChannelGatewayTimeoutError, RaizUpdateChannelGatewayTimeoutFailure, RaizUpdateChannelInternalServerErrorError, RaizUpdateChannelInternalServerErrorFailure, RaizUpdateChannelNotFoundError, RaizUpdateChannelNotFoundFailure, RaizUpdateChannelServiceUnavailableError, RaizUpdateChannelServiceUnavailableFailure, RaizUpdateChannelTooManyRequestsError, RaizUpdateChannelTooManyRequestsFailure, RaizUpdateChannelUnprocessableContentError, RaizUpdateChannelUnprocessableContentFailure, RaizVerifyChannelBody, RaizVerifyChannelConflictError, RaizVerifyChannelConflictFailure, RaizVerifyChannelServiceUnavailableError, RaizVerifyChannelServiceUnavailableFailure, RaizVerifyChannelTooManyRequestsError, RaizVerifyChannelTooManyRequestsFailure, RaizVoiceLineUnavailableFailure, RaizVoiceNotAvailableFailure, RaizVoiceNumberInUseFailure, RaizVoiceNumberNotOwnedFailure, RaizWhatsappAccountRestrictedFailure, RaizWhatsappChannelInternalFailure, RaizWhatsappChannelRefusedFailure, RaizWhatsappDeliveryUnconfirmedFailure, RaizWhatsappEngagementLimitedFailure, RaizWhatsappNotSentFailure, RaizWidgetAgentChoice, RaizWidgetClientTool, RaizWidgetConflictFailure, RaizWidgetCopy, RaizWidgetField, RaizWidgetInternalFailure, RaizWidgetLimitReachedFailure, RaizWidgetPublication, RaizWidgetRefusedFailure, RaizWidgetSettings, RaizWidgetSettingsInput, RaizWidgetTranslations, RaizWidgetVoiceUnheardFailure, } from "./models.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Empty, ForbiddenFailure, HttpsUrl, InternalFailure, InvalidInputFailure, OutcomeUnknownFailure, PageInfo, RateLimitedFailure, RequestTooLargeFailure, ResponseMetadata, UpstreamTimeoutFailure, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
-
import { type RaizAddressInUseFailure, type RaizAgentInUseFailure, type RaizAgentModalityLockedFailure, type RaizAgentProceduresInvalidFailure, type RaizAgentSettingsInvalidFailure, type RaizAgentWorkflowInvalidFailure, type RaizBulletinLimitReachedFailure, type RaizBulletinPeriodInvalidFailure, type RaizBusinessHours, type RaizCallInProgressFailure, type RaizCampaignAgentNotReadyFailure, type RaizCampaignHeaderMissingFailure, type RaizCampaignHeaderNotStoredFailure, type RaizCampaignNoRecipientsFailure, type RaizCampaignVariableMissingFailure, type RaizChannelAgentMismatchFailure, type RaizChannelNotReadyFailure, type RaizChannelTypeMismatchFailure, type RaizConversationClosedFailure, type RaizConversationNotHandedOffFailure, type RaizConversationOpenFailure, type RaizDailyReportInProgressFailure, type RaizDailyReportRecipientsMissingFailure, type RaizDefinitionNotActiveFailure, type RaizDefinitionOptionsInvalidFailure, type RaizDefinitionRetiredFailure, type RaizDefinitionTypeLockedFailure, type RaizEvalCasesUnavailableFailure, type RaizEvalGateUnmetFailure, type RaizFactSubjectMismatchFailure, type RaizFactValueInvalidFailure, type RaizFeedbackProposalUnavailableFailure, type RaizHandoffAlreadyContinuedFailure, type RaizIdentifierInUseFailure, type RaizImportFileInvalidFailure, type RaizImportFileTooLargeFailure, type RaizIntegrationProcedureUnavailableFailure, type RaizIntegrationToolUnavailableFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizInvalidStateFailure, type RaizIpNetworkInvalidFailure, type RaizKeyInUseFailure, type RaizKnowledgeDocumentUnavailableFailure, type RaizKnowledgeFileInvalidFailure, type RaizKnowledgeKindMismatchFailure, type RaizPhoneNumber, type RaizProviderRejectedFailure, type RaizReplyInProgressFailure, type RaizReportFilterUnsupportedFailure, type RaizReportRangeInvalidFailure, type RaizResourceNotFoundFailure, type RaizSourceConversationOpenFailure, type RaizSuppressionExistsFailure, type RaizTaskNotRetryableFailure, type RaizTemplateHeaderMismatchFailure, type RaizTemplateHeaderRequiredFailure, type RaizTemplateNotApprovedFailure, type RaizTemplateNotFoundFailure, type RaizTemplateParametersMismatchFailure, type RaizTemplateUnsupportedFailure, type RaizTimeZoneUnknownFailure, type RaizVersionConflictFailure, type RaizVoiceAgentNotReadyFailure, type RaizVoiceUnavailableFailure, type RaizWebsiteNotApprovedFailure, type RaizWhatsappRateLimitedFailure, type RaizWhatsappWindowClosedFailure } from "../models.js";
|
|
2
|
+
import { type RaizAddressInUseFailure, type RaizAgentInUseFailure, type RaizAgentModalityLockedFailure, type RaizAgentProceduresInvalidFailure, type RaizAgentSettingsInvalidFailure, type RaizAgentWorkflowInvalidFailure, type RaizBulletinLimitReachedFailure, type RaizBulletinPeriodInvalidFailure, type RaizBusinessHours, type RaizCallInProgressFailure, type RaizCampaignAgentNotReadyFailure, type RaizCampaignHeaderMissingFailure, type RaizCampaignHeaderNotStoredFailure, type RaizCampaignNoRecipientsFailure, type RaizCampaignVariableMissingFailure, type RaizChannelAgentMismatchFailure, type RaizChannelNotReadyFailure, type RaizChannelTypeMismatchFailure, type RaizContactSuppressedFailure, type RaizConversationClosedFailure, type RaizConversationNotHandedOffFailure, type RaizConversationOpenFailure, type RaizDailyReportInProgressFailure, type RaizDailyReportRecipientsMissingFailure, type RaizDefinitionNotActiveFailure, type RaizDefinitionOptionsInvalidFailure, type RaizDefinitionRetiredFailure, type RaizDefinitionTypeLockedFailure, type RaizEvalCasesUnavailableFailure, type RaizEvalGateUnmetFailure, type RaizFactSubjectMismatchFailure, type RaizFactValueInvalidFailure, type RaizFeedbackProposalUnavailableFailure, type RaizHandoffAlreadyContinuedFailure, type RaizIdentifierInUseFailure, type RaizImportFileInvalidFailure, type RaizImportFileTooLargeFailure, type RaizIntegrationProcedureUnavailableFailure, type RaizIntegrationToolUnavailableFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizInvalidStateFailure, type RaizIpNetworkInvalidFailure, type RaizKeyInUseFailure, type RaizKnowledgeDocumentUnavailableFailure, type RaizKnowledgeFileInvalidFailure, type RaizKnowledgeKindMismatchFailure, type RaizPhoneNumber, type RaizProviderRejectedFailure, type RaizReplyInProgressFailure, type RaizReportFilterUnsupportedFailure, type RaizReportRangeInvalidFailure, type RaizResourceNotFoundFailure, type RaizSourceConversationOpenFailure, type RaizSuppressionExistsFailure, type RaizTaskNotRetryableFailure, type RaizTemplateHeaderMismatchFailure, type RaizTemplateHeaderRequiredFailure, type RaizTemplateNotApprovedFailure, type RaizTemplateNotFoundFailure, type RaizTemplateParametersMismatchFailure, type RaizTemplateUnsupportedFailure, type RaizTimeZoneUnknownFailure, type RaizVersionConflictFailure, type RaizVoiceAgentNotReadyFailure, type RaizVoiceUnavailableFailure, type RaizWebsiteNotApprovedFailure, type RaizWhatsappAiPausedFailure, type RaizWhatsappDeliveryFailedFailure, type RaizWhatsappMarketingStoppedFailure, type RaizWhatsappMediaRejectedFailure, type RaizWhatsappMessageUnsupportedFailure, type RaizWhatsappRateLimitedFailure, type RaizWhatsappRecipientUnavailableFailure, type RaizWhatsappWindowClosedFailure } from "../models.js";
|
|
3
3
|
/**
|
|
4
4
|
* Only a text Agent can hold a web conversation; a voice Agent only with
|
|
5
5
|
* `origin: test`, to try it by text.
|
|
@@ -234,27 +234,6 @@ export interface RaizChannelResponse {
|
|
|
234
234
|
metadata: ResponseMetadata;
|
|
235
235
|
success: true;
|
|
236
236
|
}
|
|
237
|
-
/**
|
|
238
|
-
* A suppression rule of this organization forbids contacting this address.
|
|
239
|
-
*/
|
|
240
|
-
export interface RaizContactSuppressedFailure {
|
|
241
|
-
/**
|
|
242
|
-
* The failure code, stable across releases.
|
|
243
|
-
*/
|
|
244
|
-
code: "CONTACT_SUPPRESSED";
|
|
245
|
-
/**
|
|
246
|
-
* No fields.
|
|
247
|
-
*/
|
|
248
|
-
data: Empty;
|
|
249
|
-
/**
|
|
250
|
-
* What went wrong, for people; it never contains input values.
|
|
251
|
-
*/
|
|
252
|
-
message: string;
|
|
253
|
-
/**
|
|
254
|
-
* Whether repeating the same request may succeed.
|
|
255
|
-
*/
|
|
256
|
-
retryable: false;
|
|
257
|
-
}
|
|
258
237
|
/**
|
|
259
238
|
* The contact has no phone number. Give the destination number in `to`.
|
|
260
239
|
*/
|
|
@@ -441,7 +420,7 @@ export interface RaizCreateChannelForbiddenError {
|
|
|
441
420
|
metadata: ResponseMetadata;
|
|
442
421
|
success: false;
|
|
443
422
|
}
|
|
444
|
-
export type RaizCreateChannelForbiddenFailure = ForbiddenFailure | RaizChannelCreationInAppFailure | RaizConversationViewAuthorOnlyFailure | RaizWhatsappChannelRefusedFailure | RaizWidgetRefusedFailure;
|
|
423
|
+
export type RaizCreateChannelForbiddenFailure = ForbiddenFailure | RaizChannelCreationInAppFailure | RaizConversationViewAuthorOnlyFailure | RaizOutboundChannelRefusedFailure | RaizWhatsappChannelRefusedFailure | RaizWidgetRefusedFailure;
|
|
445
424
|
/**
|
|
446
425
|
* A failed answer.
|
|
447
426
|
*/
|
|
@@ -467,7 +446,7 @@ export interface RaizCreateChannelInternalServerErrorError {
|
|
|
467
446
|
metadata: ResponseMetadata;
|
|
468
447
|
success: false;
|
|
469
448
|
}
|
|
470
|
-
export type RaizCreateChannelInternalServerErrorFailure = InternalFailure | RaizWhatsappChannelInternalFailure | RaizWhatsappNotSentFailure | RaizWidgetInternalFailure;
|
|
449
|
+
export type RaizCreateChannelInternalServerErrorFailure = InternalFailure | RaizOutboundChannelInternalFailure | RaizWhatsappChannelInternalFailure | RaizWhatsappNotSentFailure | RaizWidgetInternalFailure;
|
|
471
450
|
/**
|
|
472
451
|
* A failed answer.
|
|
473
452
|
*/
|
|
@@ -571,7 +550,7 @@ export interface RaizDeleteChannelForbiddenError {
|
|
|
571
550
|
metadata: ResponseMetadata;
|
|
572
551
|
success: false;
|
|
573
552
|
}
|
|
574
|
-
export type RaizDeleteChannelForbiddenFailure = ForbiddenFailure | RaizChannelCreationInAppFailure | RaizConversationViewAuthorOnlyFailure | RaizWhatsappChannelRefusedFailure | RaizWidgetRefusedFailure;
|
|
553
|
+
export type RaizDeleteChannelForbiddenFailure = ForbiddenFailure | RaizChannelCreationInAppFailure | RaizConversationViewAuthorOnlyFailure | RaizOutboundChannelRefusedFailure | RaizWhatsappChannelRefusedFailure | RaizWidgetRefusedFailure;
|
|
575
554
|
/**
|
|
576
555
|
* A failed answer.
|
|
577
556
|
*/
|
|
@@ -597,7 +576,7 @@ export interface RaizDeleteChannelInternalServerErrorError {
|
|
|
597
576
|
metadata: ResponseMetadata;
|
|
598
577
|
success: false;
|
|
599
578
|
}
|
|
600
|
-
export type RaizDeleteChannelInternalServerErrorFailure = InternalFailure | RaizWhatsappChannelInternalFailure | RaizWhatsappNotSentFailure | RaizWidgetInternalFailure;
|
|
579
|
+
export type RaizDeleteChannelInternalServerErrorFailure = InternalFailure | RaizOutboundChannelInternalFailure | RaizWhatsappChannelInternalFailure | RaizWhatsappNotSentFailure | RaizWidgetInternalFailure;
|
|
601
580
|
/**
|
|
602
581
|
* A failed answer.
|
|
603
582
|
*/
|
|
@@ -717,6 +696,50 @@ export interface RaizListChannelsServiceUnavailableError {
|
|
|
717
696
|
success: false;
|
|
718
697
|
}
|
|
719
698
|
export type RaizListChannelsServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
|
|
699
|
+
/**
|
|
700
|
+
* What became of the send could not be read back. Asking again never reaches
|
|
701
|
+
* the person twice.
|
|
702
|
+
*/
|
|
703
|
+
export interface RaizOutboundChannelInternalFailure {
|
|
704
|
+
/**
|
|
705
|
+
* The failure code, stable across releases.
|
|
706
|
+
*/
|
|
707
|
+
code: "OUTBOUND_CHANNEL_INTERNAL";
|
|
708
|
+
/**
|
|
709
|
+
* No fields.
|
|
710
|
+
*/
|
|
711
|
+
data: Empty;
|
|
712
|
+
/**
|
|
713
|
+
* What went wrong, for people; it never contains input values.
|
|
714
|
+
*/
|
|
715
|
+
message: string;
|
|
716
|
+
/**
|
|
717
|
+
* Whether repeating the same request may succeed.
|
|
718
|
+
*/
|
|
719
|
+
retryable: false;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Only the Campaigns Worker sends through this service, and only for a
|
|
723
|
+
* recipient of a campaign of that organization.
|
|
724
|
+
*/
|
|
725
|
+
export interface RaizOutboundChannelRefusedFailure {
|
|
726
|
+
/**
|
|
727
|
+
* The failure code, stable across releases.
|
|
728
|
+
*/
|
|
729
|
+
code: "OUTBOUND_CHANNEL_REFUSED";
|
|
730
|
+
/**
|
|
731
|
+
* No fields.
|
|
732
|
+
*/
|
|
733
|
+
data: Empty;
|
|
734
|
+
/**
|
|
735
|
+
* What went wrong, for people; it never contains input values.
|
|
736
|
+
*/
|
|
737
|
+
message: string;
|
|
738
|
+
/**
|
|
739
|
+
* Whether repeating the same request may succeed.
|
|
740
|
+
*/
|
|
741
|
+
retryable: false;
|
|
742
|
+
}
|
|
720
743
|
/**
|
|
721
744
|
* The profile's contact hours do not allow starting a conversation now. Try
|
|
722
745
|
* again within them.
|
|
@@ -1025,7 +1048,7 @@ export interface RaizUpdateChannelForbiddenError {
|
|
|
1025
1048
|
metadata: ResponseMetadata;
|
|
1026
1049
|
success: false;
|
|
1027
1050
|
}
|
|
1028
|
-
export type RaizUpdateChannelForbiddenFailure = ForbiddenFailure | RaizChannelCreationInAppFailure | RaizConversationViewAuthorOnlyFailure | RaizWhatsappChannelRefusedFailure | RaizWidgetRefusedFailure;
|
|
1051
|
+
export type RaizUpdateChannelForbiddenFailure = ForbiddenFailure | RaizChannelCreationInAppFailure | RaizConversationViewAuthorOnlyFailure | RaizOutboundChannelRefusedFailure | RaizWhatsappChannelRefusedFailure | RaizWidgetRefusedFailure;
|
|
1029
1052
|
/**
|
|
1030
1053
|
* A failed answer.
|
|
1031
1054
|
*/
|
|
@@ -1051,7 +1074,7 @@ export interface RaizUpdateChannelInternalServerErrorError {
|
|
|
1051
1074
|
metadata: ResponseMetadata;
|
|
1052
1075
|
success: false;
|
|
1053
1076
|
}
|
|
1054
|
-
export type RaizUpdateChannelInternalServerErrorFailure = InternalFailure | RaizWhatsappChannelInternalFailure | RaizWhatsappNotSentFailure | RaizWidgetInternalFailure;
|
|
1077
|
+
export type RaizUpdateChannelInternalServerErrorFailure = InternalFailure | RaizOutboundChannelInternalFailure | RaizWhatsappChannelInternalFailure | RaizWhatsappNotSentFailure | RaizWidgetInternalFailure;
|
|
1055
1078
|
/**
|
|
1056
1079
|
* A failed answer.
|
|
1057
1080
|
*/
|
|
@@ -1264,27 +1287,6 @@ export interface RaizWhatsappAccountRestrictedFailure {
|
|
|
1264
1287
|
*/
|
|
1265
1288
|
retryable: false;
|
|
1266
1289
|
}
|
|
1267
|
-
/**
|
|
1268
|
-
* Automatic replies are paused or this conversation can no longer receive them.
|
|
1269
|
-
*/
|
|
1270
|
-
export interface RaizWhatsappAiPausedFailure {
|
|
1271
|
-
/**
|
|
1272
|
-
* The failure code, stable across releases.
|
|
1273
|
-
*/
|
|
1274
|
-
code: "WHATSAPP_AI_PAUSED";
|
|
1275
|
-
/**
|
|
1276
|
-
* No fields.
|
|
1277
|
-
*/
|
|
1278
|
-
data: Empty;
|
|
1279
|
-
/**
|
|
1280
|
-
* What went wrong, for people; it never contains input values.
|
|
1281
|
-
*/
|
|
1282
|
-
message: string;
|
|
1283
|
-
/**
|
|
1284
|
-
* Whether repeating the same request may succeed.
|
|
1285
|
-
*/
|
|
1286
|
-
retryable: false;
|
|
1287
|
-
}
|
|
1288
1290
|
/**
|
|
1289
1291
|
* The delivery outcome could not be read back. Asking again never sends the
|
|
1290
1292
|
* message twice.
|
|
@@ -1329,27 +1331,6 @@ export interface RaizWhatsappChannelRefusedFailure {
|
|
|
1329
1331
|
*/
|
|
1330
1332
|
retryable: false;
|
|
1331
1333
|
}
|
|
1332
|
-
/**
|
|
1333
|
-
* WhatsApp did not deliver the message.
|
|
1334
|
-
*/
|
|
1335
|
-
export interface RaizWhatsappDeliveryFailedFailure {
|
|
1336
|
-
/**
|
|
1337
|
-
* The failure code, stable across releases.
|
|
1338
|
-
*/
|
|
1339
|
-
code: "WHATSAPP_DELIVERY_FAILED";
|
|
1340
|
-
/**
|
|
1341
|
-
* No fields.
|
|
1342
|
-
*/
|
|
1343
|
-
data: Empty;
|
|
1344
|
-
/**
|
|
1345
|
-
* What went wrong, for people; it never contains input values.
|
|
1346
|
-
*/
|
|
1347
|
-
message: string;
|
|
1348
|
-
/**
|
|
1349
|
-
* Whether repeating the same request may succeed.
|
|
1350
|
-
*/
|
|
1351
|
-
retryable: false;
|
|
1352
|
-
}
|
|
1353
1334
|
/**
|
|
1354
1335
|
* WhatsApp never confirmed whether the message was sent. It was not sent again.
|
|
1355
1336
|
*/
|
|
@@ -1393,71 +1374,6 @@ export interface RaizWhatsappEngagementLimitedFailure {
|
|
|
1393
1374
|
*/
|
|
1394
1375
|
retryable: true;
|
|
1395
1376
|
}
|
|
1396
|
-
/**
|
|
1397
|
-
* The contact chose to stop receiving marketing messages from this business.
|
|
1398
|
-
*/
|
|
1399
|
-
export interface RaizWhatsappMarketingStoppedFailure {
|
|
1400
|
-
/**
|
|
1401
|
-
* The failure code, stable across releases.
|
|
1402
|
-
*/
|
|
1403
|
-
code: "WHATSAPP_MARKETING_STOPPED";
|
|
1404
|
-
/**
|
|
1405
|
-
* No fields.
|
|
1406
|
-
*/
|
|
1407
|
-
data: Empty;
|
|
1408
|
-
/**
|
|
1409
|
-
* What went wrong, for people; it never contains input values.
|
|
1410
|
-
*/
|
|
1411
|
-
message: string;
|
|
1412
|
-
/**
|
|
1413
|
-
* Whether repeating the same request may succeed.
|
|
1414
|
-
*/
|
|
1415
|
-
retryable: false;
|
|
1416
|
-
}
|
|
1417
|
-
/**
|
|
1418
|
-
* WhatsApp could not use the attachment. Check its type and size limits.
|
|
1419
|
-
*/
|
|
1420
|
-
export interface RaizWhatsappMediaRejectedFailure {
|
|
1421
|
-
/**
|
|
1422
|
-
* The failure code, stable across releases.
|
|
1423
|
-
*/
|
|
1424
|
-
code: "WHATSAPP_MEDIA_REJECTED";
|
|
1425
|
-
/**
|
|
1426
|
-
* No fields.
|
|
1427
|
-
*/
|
|
1428
|
-
data: Empty;
|
|
1429
|
-
/**
|
|
1430
|
-
* What went wrong, for people; it never contains input values.
|
|
1431
|
-
*/
|
|
1432
|
-
message: string;
|
|
1433
|
-
/**
|
|
1434
|
-
* Whether repeating the same request may succeed.
|
|
1435
|
-
*/
|
|
1436
|
-
retryable: false;
|
|
1437
|
-
}
|
|
1438
|
-
/**
|
|
1439
|
-
* This message cannot be sent on WhatsApp: it allows one attachment per
|
|
1440
|
-
* message, up to three buttons or ten list options, and text of up to 4096
|
|
1441
|
-
* characters.
|
|
1442
|
-
*/
|
|
1443
|
-
export interface RaizWhatsappMessageUnsupportedFailure {
|
|
1444
|
-
/**
|
|
1445
|
-
* The failure code, stable across releases.
|
|
1446
|
-
*/
|
|
1447
|
-
code: "WHATSAPP_MESSAGE_UNSUPPORTED";
|
|
1448
|
-
/**
|
|
1449
|
-
* No fields.
|
|
1450
|
-
*/
|
|
1451
|
-
data: Empty;
|
|
1452
|
-
/**
|
|
1453
|
-
* What went wrong, for people; it never contains input values.
|
|
1454
|
-
*/
|
|
1455
|
-
message: string;
|
|
1456
|
-
/**
|
|
1457
|
-
* Whether repeating the same request may succeed.
|
|
1458
|
-
*/
|
|
1459
|
-
retryable: false;
|
|
1460
|
-
}
|
|
1461
1377
|
/**
|
|
1462
1378
|
* The message was stored but never handed to WhatsApp. It was not sent.
|
|
1463
1379
|
*/
|
|
@@ -1479,27 +1395,6 @@ export interface RaizWhatsappNotSentFailure {
|
|
|
1479
1395
|
*/
|
|
1480
1396
|
retryable: false;
|
|
1481
1397
|
}
|
|
1482
|
-
/**
|
|
1483
|
-
* The recipient cannot receive WhatsApp messages from this number.
|
|
1484
|
-
*/
|
|
1485
|
-
export interface RaizWhatsappRecipientUnavailableFailure {
|
|
1486
|
-
/**
|
|
1487
|
-
* The failure code, stable across releases.
|
|
1488
|
-
*/
|
|
1489
|
-
code: "WHATSAPP_RECIPIENT_UNAVAILABLE";
|
|
1490
|
-
/**
|
|
1491
|
-
* No fields.
|
|
1492
|
-
*/
|
|
1493
|
-
data: Empty;
|
|
1494
|
-
/**
|
|
1495
|
-
* What went wrong, for people; it never contains input values.
|
|
1496
|
-
*/
|
|
1497
|
-
message: string;
|
|
1498
|
-
/**
|
|
1499
|
-
* Whether repeating the same request may succeed.
|
|
1500
|
-
*/
|
|
1501
|
-
retryable: false;
|
|
1502
|
-
}
|
|
1503
1398
|
export interface RaizWidgetAgentChoice {
|
|
1504
1399
|
/**
|
|
1505
1400
|
* A text Agent of the same organization.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
2
|
import type { DeletedObjectResponse } from "../../models.js";
|
|
3
|
-
import { type RaizContinueConversationBody, type RaizConversationCountResponse, type RaizConversationPageResponse, type RaizConversationResponse, type RaizUpdateConversationBody } from "./models.js";
|
|
3
|
+
import { type RaizContinueConversationBody, type RaizConversationCountResponse, type RaizConversationPageResponse, type RaizConversationResponse, type RaizMessageResponse, type RaizSendMessageBody, type RaizUpdateConversationBody } from "./models.js";
|
|
4
4
|
export interface ClientOptions extends BaseClientOptions {
|
|
5
5
|
/**
|
|
6
6
|
* The URL the paths of the API are relative to.
|
|
@@ -15,11 +15,14 @@ export interface Client {
|
|
|
15
15
|
* which continues the contact's pending request now, though the contact has
|
|
16
16
|
* not written. Review the resolved blocker first; use expectedVersion and
|
|
17
17
|
* expectedHandoffMessageId to refuse a stale decision with VERSION_CONFLICT.
|
|
18
|
-
* `note` preserves the evidence and remaining request for the Agent.
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
18
|
+
* `note` preserves the evidence and remaining request for the Agent. Inside
|
|
19
|
+
* WhatsApp's 24-hour window the Agent writes at once; outside it, give
|
|
20
|
+
* `template`: Raíz sends that approved template in the conversation and the
|
|
21
|
+
* Agent answers when the person replies (WHATSAPP_WINDOW_CLOSED without one).
|
|
22
|
+
* Once per handoff, and for an AI handoff. Preserve explicit human requests,
|
|
23
|
+
* unresolved clinical/administrative decisions, identity conflicts and
|
|
24
|
+
* uncertain writes with the team. Not an AI tool: it makes the Agent write to
|
|
25
|
+
* a real person.
|
|
23
26
|
*/
|
|
24
27
|
continue(request: ContinueRequest, options?: RequestOptions): Promise<ContinueResponse>;
|
|
25
28
|
/**
|
|
@@ -86,6 +89,22 @@ export interface Client {
|
|
|
86
89
|
* `get_conversation` for a transcript.
|
|
87
90
|
*/
|
|
88
91
|
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
92
|
+
/**
|
|
93
|
+
* Send a message
|
|
94
|
+
*
|
|
95
|
+
* Write in an open conversation. In a web conversation you write as the
|
|
96
|
+
* visitor (`role: contact`) and the Agent answers in the background; read the
|
|
97
|
+
* transcript to see the reply. On WhatsApp and in a call you write as a
|
|
98
|
+
* person of the organization (`role: operator`): the message is delivered on
|
|
99
|
+
* the channel and `deliveryStatus` follows it, and on WhatsApp it pauses the
|
|
100
|
+
* Agent for this person until resumed. On WhatsApp a message may carry one
|
|
101
|
+
* image or document (base64, up to 5 MiB) with the text as its caption;
|
|
102
|
+
* elsewhere a file fails with CHANNEL_TYPE_MISMATCH. On WhatsApp `template`
|
|
103
|
+
* sends an approved template of the channel instead, the only message
|
|
104
|
+
* WhatsApp delivers when the person has not written in the last 24 hours; a
|
|
105
|
+
* refused template sends nothing (the TEMPLATE_* codes). Not an AI tool.
|
|
106
|
+
*/
|
|
107
|
+
send(request: SendRequest, options?: RequestOptions): Promise<SendResponse>;
|
|
89
108
|
/**
|
|
90
109
|
* Update a conversation
|
|
91
110
|
*
|
|
@@ -481,6 +500,13 @@ export interface ListRequest {
|
|
|
481
500
|
sort?: "started" | "last_message" | "changed";
|
|
482
501
|
}
|
|
483
502
|
export type ListResponse = RaizConversationPageResponse;
|
|
503
|
+
export type SendRequest = {
|
|
504
|
+
/**
|
|
505
|
+
* Conversation id.
|
|
506
|
+
*/
|
|
507
|
+
conversationId: string;
|
|
508
|
+
} & RaizSendMessageBody;
|
|
509
|
+
export type SendResponse = RaizMessageResponse;
|
|
484
510
|
export type UpdateRequest = {
|
|
485
511
|
/**
|
|
486
512
|
* Conversation id.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
import { Transport, } from "../../_/index.js";
|
|
4
|
-
import { RaizConversationPageResponseCodec, RaizConversationResponseCodec, } from "./models.js";
|
|
4
|
+
import { RaizContinueConversationBodyCodec, RaizConversationPageResponseCodec, RaizConversationResponseCodec, RaizMessageResponseCodec, RaizSendMessageBodyCodec, } from "./models.js";
|
|
5
5
|
export function createClient(options) {
|
|
6
6
|
return bind(new Transport(options));
|
|
7
7
|
}
|
|
@@ -12,6 +12,7 @@ export function bind(transport) {
|
|
|
12
12
|
delete: (request, options) => transport.send(DeleteOperation, request, options),
|
|
13
13
|
get: (request, options) => transport.send(GetOperation, request, options),
|
|
14
14
|
list: (request, options) => transport.send(ListOperation, request, options),
|
|
15
|
+
send: (request, options) => transport.send(SendOperation, request, options),
|
|
15
16
|
update: (request, options) => transport.send(UpdateOperation, request, options),
|
|
16
17
|
};
|
|
17
18
|
}
|
|
@@ -19,8 +20,9 @@ const ContinueOperation = {
|
|
|
19
20
|
method: "POST",
|
|
20
21
|
route: "/v1/raiz/conversations/{conversationId}/continue",
|
|
21
22
|
body: "flat",
|
|
23
|
+
request: RaizContinueConversationBodyCodec,
|
|
22
24
|
response: RaizConversationResponseCodec,
|
|
23
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
25
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
24
26
|
};
|
|
25
27
|
const CountOperation = {
|
|
26
28
|
method: "GET",
|
|
@@ -49,6 +51,14 @@ const ListOperation = {
|
|
|
49
51
|
response: RaizConversationPageResponseCodec,
|
|
50
52
|
errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
51
53
|
};
|
|
54
|
+
const SendOperation = {
|
|
55
|
+
method: "POST",
|
|
56
|
+
route: "/v1/raiz/conversations/{conversationId}/send",
|
|
57
|
+
body: "flat",
|
|
58
|
+
request: RaizSendMessageBodyCodec,
|
|
59
|
+
response: RaizMessageResponseCodec,
|
|
60
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
61
|
+
};
|
|
52
62
|
const UpdateOperation = {
|
|
53
63
|
method: "PATCH",
|
|
54
64
|
route: "/v1/raiz/conversations/{conversationId}",
|
|
@@ -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, ContinueRequest, ContinueResponse, CountRequest, CountResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
|
|
5
|
-
export type { RaizContinueConversationBadRequestError, RaizContinueConversationBadRequestFailure, RaizContinueConversationBody, RaizContinueConversationConflictError, RaizContinueConversationConflictFailure, RaizContinueConversationServiceUnavailableError, RaizContinueConversationServiceUnavailableFailure, RaizConversation, RaizConversationCount, RaizConversationCountResponse, RaizConversationDiagnostics, RaizConversationGroup, RaizConversationOutcomeCounts, RaizConversationPage, RaizConversationPageResponse, RaizConversationResponse, RaizConversationToolCalls, RaizConversationToolFailure, RaizConversationWorker, RaizCountConversationsServiceUnavailableError, RaizCountConversationsServiceUnavailableFailure, RaizDeleteConversationConflictError, RaizDeleteConversationConflictFailure, RaizGetConversationBadRequestError, RaizGetConversationBadRequestFailure, RaizGetConversationServiceUnavailableError, RaizGetConversationServiceUnavailableFailure, RaizListConversationsBadRequestError, RaizListConversationsBadRequestFailure, RaizListConversationsServiceUnavailableError, RaizListConversationsServiceUnavailableFailure, RaizMessage, RaizMessagePage, RaizUpdateConversationBadRequestError, RaizUpdateConversationBadRequestFailure, RaizUpdateConversationBody, RaizUpdateConversationConflictError, RaizUpdateConversationConflictFailure, RaizUpdateConversationServiceUnavailableError, RaizUpdateConversationServiceUnavailableFailure, } from "./models.js";
|
|
4
|
+
export type { Client, ClientOptions, ContinueRequest, ContinueResponse, CountRequest, CountResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, SendRequest, SendResponse, UpdateRequest, UpdateResponse, } from "./client.js";
|
|
5
|
+
export type { RaizContinueConversationBadRequestError, RaizContinueConversationBadRequestFailure, RaizContinueConversationBody, RaizContinueConversationConflictError, RaizContinueConversationConflictFailure, RaizContinueConversationNotFoundError, RaizContinueConversationNotFoundFailure, RaizContinueConversationServiceUnavailableError, RaizContinueConversationServiceUnavailableFailure, RaizContinueConversationUnprocessableContentError, RaizContinueConversationUnprocessableContentFailure, RaizConversation, RaizConversationCount, RaizConversationCountResponse, RaizConversationDiagnostics, RaizConversationGroup, RaizConversationOutcomeCounts, RaizConversationPage, RaizConversationPageResponse, RaizConversationResponse, RaizConversationToolCalls, RaizConversationToolFailure, RaizConversationWorker, RaizCountConversationsServiceUnavailableError, RaizCountConversationsServiceUnavailableFailure, RaizDeleteConversationConflictError, RaizDeleteConversationConflictFailure, RaizGetConversationBadRequestError, RaizGetConversationBadRequestFailure, RaizGetConversationServiceUnavailableError, RaizGetConversationServiceUnavailableFailure, RaizListConversationsBadRequestError, RaizListConversationsBadRequestFailure, RaizListConversationsServiceUnavailableError, RaizListConversationsServiceUnavailableFailure, RaizMessage, RaizMessagePage, RaizMessageResponse, RaizSendMessageBadGatewayError, RaizSendMessageBadGatewayFailure, RaizSendMessageBody, RaizSendMessageConflictError, RaizSendMessageConflictFailure, RaizSendMessageNotFoundError, RaizSendMessageNotFoundFailure, RaizSendMessageTooManyRequestsError, RaizSendMessageTooManyRequestsFailure, RaizSendMessageUnprocessableContentError, RaizSendMessageUnprocessableContentFailure, RaizUpdateConversationBadRequestError, RaizUpdateConversationBadRequestFailure, RaizUpdateConversationBody, RaizUpdateConversationConflictError, RaizUpdateConversationConflictFailure, RaizUpdateConversationServiceUnavailableError, RaizUpdateConversationServiceUnavailableFailure, } from "./models.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type InvalidInputFailure, type PageInfo, type ResponseMetadata, type SignedUrl, type UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
-
import { type RaizCallInProgressFailure, type RaizChannelNotReadyFailure, type RaizChannelTypeMismatchFailure, type RaizConversationClosedFailure, type RaizConversationNotHandedOffFailure, type RaizConversationOpenFailure, type RaizFact, type RaizHandoffAlreadyContinuedFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizReplyInProgressFailure, type RaizVersionConflictFailure, type RaizWhatsappWindowClosedFailure } from "../models.js";
|
|
1
|
+
import { type InvalidInputFailure, type OutcomeUnknownFailure, type PageInfo, type RateLimitedFailure, type ResponseMetadata, type SignedUrl, type UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
+
import { type RaizCallInProgressFailure, type RaizChannelNotReadyFailure, type RaizChannelTypeMismatchFailure, type RaizContactSuppressedFailure, type RaizConversationClosedFailure, type RaizConversationNotHandedOffFailure, type RaizConversationOpenFailure, type RaizFact, type RaizHandoffAlreadyContinuedFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizInvalidStateFailure, type RaizReplyInProgressFailure, type RaizResourceNotFoundFailure, type RaizTemplateHeaderFile, type RaizTemplateHeaderMismatchFailure, type RaizTemplateHeaderRequiredFailure, type RaizTemplateNotApprovedFailure, type RaizTemplateNotFoundFailure, type RaizTemplateParametersMismatchFailure, type RaizTemplateUnsupportedFailure, type RaizVersionConflictFailure, type RaizWhatsappAiPausedFailure, type RaizWhatsappDeliveryFailedFailure, type RaizWhatsappMarketingStoppedFailure, type RaizWhatsappMediaRejectedFailure, type RaizWhatsappMessageUnsupportedFailure, type RaizWhatsappRateLimitedFailure, type RaizWhatsappRecipientUnavailableFailure, type RaizWhatsappWindowClosedFailure } from "../models.js";
|
|
3
3
|
/**
|
|
4
4
|
* A failed answer.
|
|
5
5
|
*/
|
|
@@ -34,6 +34,21 @@ export interface RaizContinueConversationBody {
|
|
|
34
34
|
* uncertain writes with the team.
|
|
35
35
|
*/
|
|
36
36
|
note?: string;
|
|
37
|
+
/**
|
|
38
|
+
* An approved template of the conversation's channel that Raíz sends in this
|
|
39
|
+
* conversation now, from the team. With it the Agent does not write now: it
|
|
40
|
+
* answers when the person replies, reading `note`, so the conversation can be
|
|
41
|
+
* given back outside WhatsApp's 24-hour window. Without it the Agent
|
|
42
|
+
* continues at once, and the person must have written in the last 24 hours
|
|
43
|
+
* (WHATSAPP_WINDOW_CLOSED). Follow the template's `deliveryStatus` in the
|
|
44
|
+
* transcript.
|
|
45
|
+
*/
|
|
46
|
+
template?: {
|
|
47
|
+
header?: RaizTemplateHeaderFile;
|
|
48
|
+
language: string;
|
|
49
|
+
name: string;
|
|
50
|
+
parameters?: string[];
|
|
51
|
+
};
|
|
37
52
|
}
|
|
38
53
|
/**
|
|
39
54
|
* A failed answer.
|
|
@@ -47,7 +62,20 @@ export interface RaizContinueConversationConflictError {
|
|
|
47
62
|
metadata: ResponseMetadata;
|
|
48
63
|
success: false;
|
|
49
64
|
}
|
|
50
|
-
export type RaizContinueConversationConflictFailure = RaizConversationClosedFailure | RaizConversationNotHandedOffFailure | RaizHandoffAlreadyContinuedFailure | RaizChannelNotReadyFailure | RaizChannelTypeMismatchFailure | RaizWhatsappWindowClosedFailure | RaizVersionConflictFailure;
|
|
65
|
+
export type RaizContinueConversationConflictFailure = RaizConversationClosedFailure | RaizConversationNotHandedOffFailure | RaizHandoffAlreadyContinuedFailure | RaizChannelNotReadyFailure | RaizChannelTypeMismatchFailure | RaizTemplateNotApprovedFailure | RaizWhatsappWindowClosedFailure | RaizContactSuppressedFailure | RaizVersionConflictFailure;
|
|
66
|
+
/**
|
|
67
|
+
* A failed answer.
|
|
68
|
+
*/
|
|
69
|
+
export interface RaizContinueConversationNotFoundError {
|
|
70
|
+
data: null;
|
|
71
|
+
error: RaizContinueConversationNotFoundFailure;
|
|
72
|
+
/**
|
|
73
|
+
* What every answer carries besides its data or error.
|
|
74
|
+
*/
|
|
75
|
+
metadata: ResponseMetadata;
|
|
76
|
+
success: false;
|
|
77
|
+
}
|
|
78
|
+
export type RaizContinueConversationNotFoundFailure = RaizTemplateNotFoundFailure | RaizResourceNotFoundFailure;
|
|
51
79
|
/**
|
|
52
80
|
* A failed answer.
|
|
53
81
|
*/
|
|
@@ -61,6 +89,19 @@ export interface RaizContinueConversationServiceUnavailableError {
|
|
|
61
89
|
success: false;
|
|
62
90
|
}
|
|
63
91
|
export type RaizContinueConversationServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
|
|
92
|
+
/**
|
|
93
|
+
* A failed answer.
|
|
94
|
+
*/
|
|
95
|
+
export interface RaizContinueConversationUnprocessableContentError {
|
|
96
|
+
data: null;
|
|
97
|
+
error: RaizContinueConversationUnprocessableContentFailure;
|
|
98
|
+
/**
|
|
99
|
+
* What every answer carries besides its data or error.
|
|
100
|
+
*/
|
|
101
|
+
metadata: ResponseMetadata;
|
|
102
|
+
success: false;
|
|
103
|
+
}
|
|
104
|
+
export type RaizContinueConversationUnprocessableContentFailure = RaizTemplateHeaderMismatchFailure | RaizTemplateHeaderRequiredFailure | RaizTemplateParametersMismatchFailure | RaizTemplateUnsupportedFailure | RaizWhatsappMessageUnsupportedFailure;
|
|
64
105
|
export interface RaizConversation {
|
|
65
106
|
agentId: string | null;
|
|
66
107
|
agentName: string | null;
|
|
@@ -134,15 +175,18 @@ export interface RaizConversation {
|
|
|
134
175
|
[key: string]: unknown;
|
|
135
176
|
};
|
|
136
177
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
178
|
+
* The organization's team wrote to the contact, in Raíz or in the WhatsApp
|
|
179
|
+
* Business app. The message a campaign or a machine client opens a
|
|
180
|
+
* conversation with is not the team's (a message's `origin`).
|
|
139
181
|
*/
|
|
140
182
|
operatorReplied: boolean;
|
|
141
183
|
/**
|
|
142
184
|
* How it started: the contact reached out (`inbound`), a person of the
|
|
143
185
|
* organization started it (`manual`: in the Dashboard, or on WhatsApp in the
|
|
144
186
|
* WhatsApp Business app), a client through the API (`api`), a campaign, an
|
|
145
|
-
* import or a person-owned WhatsApp Agent trial (`test`).
|
|
187
|
+
* import or a person-owned WhatsApp Agent trial (`test`). On WhatsApp,
|
|
188
|
+
* `campaign` and `api` with `direction: inbound` are the contact answering
|
|
189
|
+
* such a message after its conversation closed, which continues it.
|
|
146
190
|
*/
|
|
147
191
|
origin: "inbound" | "manual" | "api" | "campaign" | "import" | "test";
|
|
148
192
|
outcome: "success" | "failure" | "unknown" | null;
|
|
@@ -182,7 +226,9 @@ export interface RaizConversation {
|
|
|
182
226
|
* wrote something the contact saw (those who have not yet, last): each Agent
|
|
183
227
|
* and the team that wrote in it and, while it is open or when nobody answered
|
|
184
228
|
* it, whoever has it (the assigned Agent while the AI handles it, the team
|
|
185
|
-
* otherwise).
|
|
229
|
+
* otherwise). A campaign's message and a machine client's opening make nobody
|
|
230
|
+
* a worker: read who sent them from the message's `origin`. `agentId` is the
|
|
231
|
+
* Agent assigned now.
|
|
186
232
|
*/
|
|
187
233
|
workers: RaizConversationWorker[];
|
|
188
234
|
}
|
|
@@ -434,7 +480,7 @@ export interface RaizMessage {
|
|
|
434
480
|
* An instant in RFC 3339 format, in UTC.
|
|
435
481
|
*/
|
|
436
482
|
occurredAt: Temporal.Instant;
|
|
437
|
-
origin: "business_app" | null;
|
|
483
|
+
origin: "business_app" | "campaign" | "api" | null;
|
|
438
484
|
parts: ({
|
|
439
485
|
format: "plain" | "markdown";
|
|
440
486
|
interrupted: boolean;
|
|
@@ -536,6 +582,116 @@ export interface RaizMessagePage {
|
|
|
536
582
|
*/
|
|
537
583
|
pageInfo: PageInfo;
|
|
538
584
|
}
|
|
585
|
+
/**
|
|
586
|
+
* A successful answer.
|
|
587
|
+
*/
|
|
588
|
+
export interface RaizMessageResponse {
|
|
589
|
+
data: RaizMessage;
|
|
590
|
+
error: null;
|
|
591
|
+
/**
|
|
592
|
+
* What every answer carries besides its data or error.
|
|
593
|
+
*/
|
|
594
|
+
metadata: ResponseMetadata;
|
|
595
|
+
success: true;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* A failed answer.
|
|
599
|
+
*/
|
|
600
|
+
export interface RaizSendMessageBadGatewayError {
|
|
601
|
+
data: null;
|
|
602
|
+
error: RaizSendMessageBadGatewayFailure;
|
|
603
|
+
/**
|
|
604
|
+
* What every answer carries besides its data or error.
|
|
605
|
+
*/
|
|
606
|
+
metadata: ResponseMetadata;
|
|
607
|
+
success: false;
|
|
608
|
+
}
|
|
609
|
+
export type RaizSendMessageBadGatewayFailure = OutcomeUnknownFailure | RaizWhatsappDeliveryFailedFailure;
|
|
610
|
+
export interface RaizSendMessageBody {
|
|
611
|
+
/**
|
|
612
|
+
* The message's parts: text and, on WhatsApp, at most one file, whose caption
|
|
613
|
+
* is the text. Give `parts` or `template`.
|
|
614
|
+
*/
|
|
615
|
+
parts?: ({
|
|
616
|
+
format?: "plain" | "markdown";
|
|
617
|
+
text: string;
|
|
618
|
+
type: "text";
|
|
619
|
+
} | {
|
|
620
|
+
data: Uint8Array;
|
|
621
|
+
fileName?: string;
|
|
622
|
+
mediaType: "image/jpeg" | "image/png" | "application/pdf" | "text/plain" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
623
|
+
type: "file";
|
|
624
|
+
})[];
|
|
625
|
+
/**
|
|
626
|
+
* A message of the same conversation to quote.
|
|
627
|
+
*/
|
|
628
|
+
replyToMessageId?: string;
|
|
629
|
+
/**
|
|
630
|
+
* WhatsApp only: send an approved template of the conversation's channel
|
|
631
|
+
* instead of `parts`, the one message WhatsApp delivers when the person has
|
|
632
|
+
* not written in the last 24 hours. Like any message of the team, it pauses
|
|
633
|
+
* the Agent for this person; to have the Agent answer their reply, give the
|
|
634
|
+
* conversation back with `continueConversation` and its `template` instead.
|
|
635
|
+
*/
|
|
636
|
+
template?: {
|
|
637
|
+
header?: RaizTemplateHeaderFile;
|
|
638
|
+
language: string;
|
|
639
|
+
name: string;
|
|
640
|
+
parameters?: string[];
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* A failed answer.
|
|
645
|
+
*/
|
|
646
|
+
export interface RaizSendMessageConflictError {
|
|
647
|
+
data: null;
|
|
648
|
+
error: RaizSendMessageConflictFailure;
|
|
649
|
+
/**
|
|
650
|
+
* What every answer carries besides its data or error.
|
|
651
|
+
*/
|
|
652
|
+
metadata: ResponseMetadata;
|
|
653
|
+
success: false;
|
|
654
|
+
}
|
|
655
|
+
export type RaizSendMessageConflictFailure = RaizConversationClosedFailure | RaizChannelNotReadyFailure | RaizChannelTypeMismatchFailure | RaizTemplateNotApprovedFailure | RaizWhatsappAiPausedFailure | RaizWhatsappMarketingStoppedFailure | RaizWhatsappWindowClosedFailure | RaizInvalidStateFailure | RaizContactSuppressedFailure;
|
|
656
|
+
/**
|
|
657
|
+
* A failed answer.
|
|
658
|
+
*/
|
|
659
|
+
export interface RaizSendMessageNotFoundError {
|
|
660
|
+
data: null;
|
|
661
|
+
error: RaizSendMessageNotFoundFailure;
|
|
662
|
+
/**
|
|
663
|
+
* What every answer carries besides its data or error.
|
|
664
|
+
*/
|
|
665
|
+
metadata: ResponseMetadata;
|
|
666
|
+
success: false;
|
|
667
|
+
}
|
|
668
|
+
export type RaizSendMessageNotFoundFailure = RaizTemplateNotFoundFailure | RaizResourceNotFoundFailure;
|
|
669
|
+
/**
|
|
670
|
+
* A failed answer.
|
|
671
|
+
*/
|
|
672
|
+
export interface RaizSendMessageTooManyRequestsError {
|
|
673
|
+
data: null;
|
|
674
|
+
error: RaizSendMessageTooManyRequestsFailure;
|
|
675
|
+
/**
|
|
676
|
+
* What every answer carries besides its data or error.
|
|
677
|
+
*/
|
|
678
|
+
metadata: ResponseMetadata;
|
|
679
|
+
success: false;
|
|
680
|
+
}
|
|
681
|
+
export type RaizSendMessageTooManyRequestsFailure = RateLimitedFailure | RaizWhatsappRateLimitedFailure;
|
|
682
|
+
/**
|
|
683
|
+
* A failed answer.
|
|
684
|
+
*/
|
|
685
|
+
export interface RaizSendMessageUnprocessableContentError {
|
|
686
|
+
data: null;
|
|
687
|
+
error: RaizSendMessageUnprocessableContentFailure;
|
|
688
|
+
/**
|
|
689
|
+
* What every answer carries besides its data or error.
|
|
690
|
+
*/
|
|
691
|
+
metadata: ResponseMetadata;
|
|
692
|
+
success: false;
|
|
693
|
+
}
|
|
694
|
+
export type RaizSendMessageUnprocessableContentFailure = RaizTemplateHeaderMismatchFailure | RaizTemplateHeaderRequiredFailure | RaizTemplateParametersMismatchFailure | RaizTemplateUnsupportedFailure | RaizWhatsappMediaRejectedFailure | RaizWhatsappMessageUnsupportedFailure | RaizWhatsappRecipientUnavailableFailure;
|
|
539
695
|
/**
|
|
540
696
|
* A failed answer.
|
|
541
697
|
*/
|
|
@@ -610,6 +766,7 @@ export interface RaizUpdateConversationServiceUnavailableError {
|
|
|
610
766
|
success: false;
|
|
611
767
|
}
|
|
612
768
|
export type RaizUpdateConversationServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
|
|
769
|
+
export declare const RaizContinueConversationBodyCodec: import("../../_/codec.js").Codec;
|
|
613
770
|
export declare const RaizConversationCodec: import("../../_/codec.js").Codec;
|
|
614
771
|
export declare const RaizConversationPageCodec: import("../../_/codec.js").Codec;
|
|
615
772
|
export declare const RaizConversationPageResponseCodec: import("../../_/codec.js").Codec;
|
|
@@ -617,3 +774,5 @@ export declare const RaizConversationResponseCodec: import("../../_/codec.js").C
|
|
|
617
774
|
export declare const RaizConversationWorkerCodec: import("../../_/codec.js").Codec;
|
|
618
775
|
export declare const RaizMessageCodec: import("../../_/codec.js").Codec;
|
|
619
776
|
export declare const RaizMessagePageCodec: import("../../_/codec.js").Codec;
|
|
777
|
+
export declare const RaizMessageResponseCodec: import("../../_/codec.js").Codec;
|
|
778
|
+
export declare const RaizSendMessageBodyCodec: import("../../_/codec.js").Codec;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { array, instant, object, union } from "../../_/index.js";
|
|
3
|
+
import { array, bytes, instant, object, union } from "../../_/index.js";
|
|
4
4
|
import { SignedUrlCodec, } from "../../models.js";
|
|
5
|
-
import { RaizFactCodec, } from "../models.js";
|
|
5
|
+
import { RaizFactCodec, RaizTemplateHeaderFileCodec, } from "../models.js";
|
|
6
|
+
export const RaizContinueConversationBodyCodec = object([
|
|
7
|
+
["template", null, object([["header", null, () => RaizTemplateHeaderFileCodec]])],
|
|
8
|
+
]);
|
|
6
9
|
export const RaizConversationCodec = object([
|
|
7
10
|
["analyzedAt", null, instant],
|
|
8
11
|
["createdAt", null, instant],
|
|
@@ -37,3 +40,10 @@ export const RaizMessageCodec = object([
|
|
|
37
40
|
export const RaizMessagePageCodec = object([
|
|
38
41
|
["data", null, array(() => RaizMessageCodec)],
|
|
39
42
|
]);
|
|
43
|
+
export const RaizMessageResponseCodec = object([
|
|
44
|
+
["data", null, () => RaizMessageCodec],
|
|
45
|
+
]);
|
|
46
|
+
export const RaizSendMessageBodyCodec = object([
|
|
47
|
+
["parts", null, array(object([["data", null, bytes]]))],
|
|
48
|
+
["template", null, object([["header", null, () => RaizTemplateHeaderFileCodec]])],
|
|
49
|
+
]);
|
package/dist/raiz/index.d.ts
CHANGED
|
@@ -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, } from "./client.js";
|
|
5
|
-
export type { RaizAddressInUseFailure, RaizAgentInUseFailure, RaizAgentIntegrationProcedureInput, RaizAgentModalityLockedFailure, RaizAgentProcedureInput, RaizAgentProceduresInvalidFailure, RaizAgentProceduresInvalidFailureData, RaizAgentSettingsInvalidFailure, RaizAgentWorkflowInvalidFailure, RaizAgentWorkflowInvalidFailureData, RaizBulletinLimitReachedFailure, RaizBulletinPeriodInvalidFailure, RaizBusinessHours, RaizBusinessHoursWindow, RaizCallInProgressFailure, RaizCampaignAgentNotReadyFailure, RaizCampaignHeaderMissingFailure, RaizCampaignHeaderNotStoredFailure, RaizCampaignHeaderNotStoredFailureData, RaizCampaignNoRecipientsFailure, RaizCampaignVariableMissingFailure, RaizCampaignVariableMissingFailureData, RaizChannelAgentMismatchFailure, RaizChannelNotReadyFailure, RaizChannelTypeMismatchFailure, RaizContactHoursWindow, RaizConversationClosedFailure, RaizConversationNotHandedOffFailure, RaizConversationOpenFailure, RaizDailyReportInProgressFailure, RaizDailyReportRecipientsMissingFailure, RaizDefinitionNotActiveFailure, RaizDefinitionOptionsInvalidFailure, RaizDefinitionRetiredFailure, RaizDefinitionTypeLockedFailure, RaizEmailAddress, RaizEvalCasesUnavailableFailure, RaizEvalGateUnmetFailure, RaizFact, RaizFactSubjectMismatchFailure, RaizFactValueInvalidFailure, RaizFeedbackProposalUnavailableFailure, RaizHandoffAlreadyContinuedFailure, RaizIdentifierInUseFailure, RaizImportFileInvalidFailure, RaizImportFileTooLargeFailure, RaizIntegrationProcedureUnavailableFailure, RaizIntegrationToolUnavailableFailure, RaizIntegrationsUnavailableFailure, RaizInvalidCursorFailure, RaizInvalidStateFailure, RaizIpNetworkInvalidFailure, RaizKeyInUseFailure, RaizKnowledgeDocumentUnavailableFailure, RaizKnowledgeFileInvalidFailure, RaizKnowledgeKindMismatchFailure, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizProviderRejectedError, RaizProviderRejectedFailure, RaizReplyInProgressFailure, RaizReportFilterUnsupportedFailure, RaizReportRangeInvalidFailure, RaizResourceNotFoundError, RaizResourceNotFoundFailure, RaizSourceConversationOpenFailure, RaizSuppressionExistsFailure, RaizTask, RaizTaskNotRetryableFailure, RaizTaskResponse, RaizTemplateHeaderMismatchFailure, RaizTemplateHeaderRequiredFailure, RaizTemplateNotApprovedFailure, RaizTemplateNotFoundFailure, RaizTemplateParametersMismatchFailure, RaizTemplateUnsupportedFailure, RaizTimeZoneUnknownFailure, RaizVersionConflictError, RaizVersionConflictFailure, RaizVoiceAgentNotReadyFailure, RaizVoiceUnavailableFailure, RaizWebsiteNotApprovedFailure, RaizWhatsappRateLimitedFailure, RaizWhatsappWindowClosedFailure, } from "./models.js";
|
|
5
|
+
export type { RaizAddressInUseFailure, RaizAgentInUseFailure, RaizAgentIntegrationProcedureInput, RaizAgentModalityLockedFailure, RaizAgentProcedureInput, RaizAgentProceduresInvalidFailure, RaizAgentProceduresInvalidFailureData, RaizAgentSettingsInvalidFailure, RaizAgentWorkflowInvalidFailure, RaizAgentWorkflowInvalidFailureData, RaizBulletinLimitReachedFailure, RaizBulletinPeriodInvalidFailure, RaizBusinessHours, RaizBusinessHoursWindow, RaizCallInProgressFailure, RaizCampaignAgentNotReadyFailure, RaizCampaignHeaderMissingFailure, RaizCampaignHeaderNotStoredFailure, RaizCampaignHeaderNotStoredFailureData, RaizCampaignNoRecipientsFailure, RaizCampaignVariableMissingFailure, RaizCampaignVariableMissingFailureData, RaizChannelAgentMismatchFailure, RaizChannelNotReadyFailure, RaizChannelTypeMismatchFailure, RaizContactHoursWindow, RaizContactSuppressedFailure, RaizConversationClosedFailure, RaizConversationNotHandedOffFailure, RaizConversationOpenFailure, RaizDailyReportInProgressFailure, RaizDailyReportRecipientsMissingFailure, RaizDefinitionNotActiveFailure, RaizDefinitionOptionsInvalidFailure, RaizDefinitionRetiredFailure, RaizDefinitionTypeLockedFailure, RaizEmailAddress, RaizEvalCasesUnavailableFailure, RaizEvalGateUnmetFailure, RaizFact, RaizFactSubjectMismatchFailure, RaizFactValueInvalidFailure, RaizFeedbackProposalUnavailableFailure, RaizHandoffAlreadyContinuedFailure, RaizIdentifierInUseFailure, RaizImportFileInvalidFailure, RaizImportFileTooLargeFailure, RaizIntegrationProcedureUnavailableFailure, RaizIntegrationToolUnavailableFailure, RaizIntegrationsUnavailableFailure, RaizInvalidCursorFailure, RaizInvalidStateFailure, RaizIpNetworkInvalidFailure, RaizKeyInUseFailure, RaizKnowledgeDocumentUnavailableFailure, RaizKnowledgeFileInvalidFailure, RaizKnowledgeKindMismatchFailure, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizProviderRejectedError, RaizProviderRejectedFailure, RaizReplyInProgressFailure, RaizReportFilterUnsupportedFailure, RaizReportRangeInvalidFailure, RaizResourceNotFoundError, RaizResourceNotFoundFailure, RaizSourceConversationOpenFailure, RaizSuppressionExistsFailure, RaizTask, RaizTaskNotRetryableFailure, RaizTaskResponse, RaizTemplateHeaderFile, RaizTemplateHeaderMismatchFailure, RaizTemplateHeaderRequiredFailure, RaizTemplateNotApprovedFailure, RaizTemplateNotFoundFailure, RaizTemplateParametersMismatchFailure, RaizTemplateUnsupportedFailure, RaizTimeZoneUnknownFailure, RaizVersionConflictError, RaizVersionConflictFailure, RaizVoiceAgentNotReadyFailure, RaizVoiceUnavailableFailure, RaizWebsiteNotApprovedFailure, RaizWhatsappAiPausedFailure, RaizWhatsappDeliveryFailedFailure, RaizWhatsappMarketingStoppedFailure, RaizWhatsappMediaRejectedFailure, RaizWhatsappMessageUnsupportedFailure, RaizWhatsappRateLimitedFailure, RaizWhatsappRecipientUnavailableFailure, RaizWhatsappWindowClosedFailure, } from "./models.js";
|
package/dist/raiz/models.d.ts
CHANGED
|
@@ -633,6 +633,27 @@ export interface RaizContactHoursWindow {
|
|
|
633
633
|
*/
|
|
634
634
|
to: string;
|
|
635
635
|
}
|
|
636
|
+
/**
|
|
637
|
+
* A suppression rule of this organization forbids contacting this address.
|
|
638
|
+
*/
|
|
639
|
+
export interface RaizContactSuppressedFailure {
|
|
640
|
+
/**
|
|
641
|
+
* The failure code, stable across releases.
|
|
642
|
+
*/
|
|
643
|
+
code: "CONTACT_SUPPRESSED";
|
|
644
|
+
/**
|
|
645
|
+
* No fields.
|
|
646
|
+
*/
|
|
647
|
+
data: Empty;
|
|
648
|
+
/**
|
|
649
|
+
* What went wrong, for people; it never contains input values.
|
|
650
|
+
*/
|
|
651
|
+
message: string;
|
|
652
|
+
/**
|
|
653
|
+
* Whether repeating the same request may succeed.
|
|
654
|
+
*/
|
|
655
|
+
retryable: false;
|
|
656
|
+
}
|
|
636
657
|
/**
|
|
637
658
|
* The conversation is closed. Start a new conversation to write again.
|
|
638
659
|
*/
|
|
@@ -1540,6 +1561,21 @@ export interface RaizTaskResponse {
|
|
|
1540
1561
|
metadata: ResponseMetadata;
|
|
1541
1562
|
success: true;
|
|
1542
1563
|
}
|
|
1564
|
+
export interface RaizTemplateHeaderFile {
|
|
1565
|
+
/**
|
|
1566
|
+
* The file's bytes in base64, at most 5242880 bytes decoded.
|
|
1567
|
+
*/
|
|
1568
|
+
data: Uint8Array;
|
|
1569
|
+
/**
|
|
1570
|
+
* The name the contact sees for a document.
|
|
1571
|
+
*/
|
|
1572
|
+
fileName?: string;
|
|
1573
|
+
/**
|
|
1574
|
+
* It must fit the template's header: a PDF for `document`, JPEG or PNG for
|
|
1575
|
+
* `image`, MP4 for `video`.
|
|
1576
|
+
*/
|
|
1577
|
+
mediaType: "application/pdf" | "image/jpeg" | "image/png" | "video/mp4";
|
|
1578
|
+
}
|
|
1543
1579
|
/**
|
|
1544
1580
|
* The header file does not fit the template: a document header takes a PDF, an
|
|
1545
1581
|
* image header a JPEG or PNG, a video header an MP4, and a template without a
|
|
@@ -1794,6 +1830,113 @@ export interface RaizWebsiteNotApprovedFailure {
|
|
|
1794
1830
|
*/
|
|
1795
1831
|
retryable: false;
|
|
1796
1832
|
}
|
|
1833
|
+
/**
|
|
1834
|
+
* Automatic replies are paused or this conversation can no longer receive them.
|
|
1835
|
+
*/
|
|
1836
|
+
export interface RaizWhatsappAiPausedFailure {
|
|
1837
|
+
/**
|
|
1838
|
+
* The failure code, stable across releases.
|
|
1839
|
+
*/
|
|
1840
|
+
code: "WHATSAPP_AI_PAUSED";
|
|
1841
|
+
/**
|
|
1842
|
+
* No fields.
|
|
1843
|
+
*/
|
|
1844
|
+
data: Empty;
|
|
1845
|
+
/**
|
|
1846
|
+
* What went wrong, for people; it never contains input values.
|
|
1847
|
+
*/
|
|
1848
|
+
message: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* Whether repeating the same request may succeed.
|
|
1851
|
+
*/
|
|
1852
|
+
retryable: false;
|
|
1853
|
+
}
|
|
1854
|
+
/**
|
|
1855
|
+
* WhatsApp did not deliver the message.
|
|
1856
|
+
*/
|
|
1857
|
+
export interface RaizWhatsappDeliveryFailedFailure {
|
|
1858
|
+
/**
|
|
1859
|
+
* The failure code, stable across releases.
|
|
1860
|
+
*/
|
|
1861
|
+
code: "WHATSAPP_DELIVERY_FAILED";
|
|
1862
|
+
/**
|
|
1863
|
+
* No fields.
|
|
1864
|
+
*/
|
|
1865
|
+
data: Empty;
|
|
1866
|
+
/**
|
|
1867
|
+
* What went wrong, for people; it never contains input values.
|
|
1868
|
+
*/
|
|
1869
|
+
message: string;
|
|
1870
|
+
/**
|
|
1871
|
+
* Whether repeating the same request may succeed.
|
|
1872
|
+
*/
|
|
1873
|
+
retryable: false;
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* The contact chose to stop receiving marketing messages from this business.
|
|
1877
|
+
*/
|
|
1878
|
+
export interface RaizWhatsappMarketingStoppedFailure {
|
|
1879
|
+
/**
|
|
1880
|
+
* The failure code, stable across releases.
|
|
1881
|
+
*/
|
|
1882
|
+
code: "WHATSAPP_MARKETING_STOPPED";
|
|
1883
|
+
/**
|
|
1884
|
+
* No fields.
|
|
1885
|
+
*/
|
|
1886
|
+
data: Empty;
|
|
1887
|
+
/**
|
|
1888
|
+
* What went wrong, for people; it never contains input values.
|
|
1889
|
+
*/
|
|
1890
|
+
message: string;
|
|
1891
|
+
/**
|
|
1892
|
+
* Whether repeating the same request may succeed.
|
|
1893
|
+
*/
|
|
1894
|
+
retryable: false;
|
|
1895
|
+
}
|
|
1896
|
+
/**
|
|
1897
|
+
* WhatsApp could not use the attachment. Check its type and size limits.
|
|
1898
|
+
*/
|
|
1899
|
+
export interface RaizWhatsappMediaRejectedFailure {
|
|
1900
|
+
/**
|
|
1901
|
+
* The failure code, stable across releases.
|
|
1902
|
+
*/
|
|
1903
|
+
code: "WHATSAPP_MEDIA_REJECTED";
|
|
1904
|
+
/**
|
|
1905
|
+
* No fields.
|
|
1906
|
+
*/
|
|
1907
|
+
data: Empty;
|
|
1908
|
+
/**
|
|
1909
|
+
* What went wrong, for people; it never contains input values.
|
|
1910
|
+
*/
|
|
1911
|
+
message: string;
|
|
1912
|
+
/**
|
|
1913
|
+
* Whether repeating the same request may succeed.
|
|
1914
|
+
*/
|
|
1915
|
+
retryable: false;
|
|
1916
|
+
}
|
|
1917
|
+
/**
|
|
1918
|
+
* This message cannot be sent on WhatsApp: it allows one attachment per
|
|
1919
|
+
* message, up to three buttons or ten list options, and text of up to 4096
|
|
1920
|
+
* characters.
|
|
1921
|
+
*/
|
|
1922
|
+
export interface RaizWhatsappMessageUnsupportedFailure {
|
|
1923
|
+
/**
|
|
1924
|
+
* The failure code, stable across releases.
|
|
1925
|
+
*/
|
|
1926
|
+
code: "WHATSAPP_MESSAGE_UNSUPPORTED";
|
|
1927
|
+
/**
|
|
1928
|
+
* No fields.
|
|
1929
|
+
*/
|
|
1930
|
+
data: Empty;
|
|
1931
|
+
/**
|
|
1932
|
+
* What went wrong, for people; it never contains input values.
|
|
1933
|
+
*/
|
|
1934
|
+
message: string;
|
|
1935
|
+
/**
|
|
1936
|
+
* Whether repeating the same request may succeed.
|
|
1937
|
+
*/
|
|
1938
|
+
retryable: false;
|
|
1939
|
+
}
|
|
1797
1940
|
/**
|
|
1798
1941
|
* WhatsApp is limiting messages from this number. Try again later.
|
|
1799
1942
|
*/
|
|
@@ -1815,6 +1958,27 @@ export interface RaizWhatsappRateLimitedFailure {
|
|
|
1815
1958
|
*/
|
|
1816
1959
|
retryable: true;
|
|
1817
1960
|
}
|
|
1961
|
+
/**
|
|
1962
|
+
* The recipient cannot receive WhatsApp messages from this number.
|
|
1963
|
+
*/
|
|
1964
|
+
export interface RaizWhatsappRecipientUnavailableFailure {
|
|
1965
|
+
/**
|
|
1966
|
+
* The failure code, stable across releases.
|
|
1967
|
+
*/
|
|
1968
|
+
code: "WHATSAPP_RECIPIENT_UNAVAILABLE";
|
|
1969
|
+
/**
|
|
1970
|
+
* No fields.
|
|
1971
|
+
*/
|
|
1972
|
+
data: Empty;
|
|
1973
|
+
/**
|
|
1974
|
+
* What went wrong, for people; it never contains input values.
|
|
1975
|
+
*/
|
|
1976
|
+
message: string;
|
|
1977
|
+
/**
|
|
1978
|
+
* Whether repeating the same request may succeed.
|
|
1979
|
+
*/
|
|
1980
|
+
retryable: false;
|
|
1981
|
+
}
|
|
1818
1982
|
/**
|
|
1819
1983
|
* More than 24 hours passed since the contact last wrote. Start the
|
|
1820
1984
|
* conversation with an approved template.
|
|
@@ -1841,3 +2005,4 @@ export declare const RaizBusinessHoursCodec: import("../_/codec.js").Codec;
|
|
|
1841
2005
|
export declare const RaizFactCodec: import("../_/codec.js").Codec;
|
|
1842
2006
|
export declare const RaizTaskCodec: import("../_/codec.js").Codec;
|
|
1843
2007
|
export declare const RaizTaskResponseCodec: import("../_/codec.js").Codec;
|
|
2008
|
+
export declare const RaizTemplateHeaderFileCodec: import("../_/codec.js").Codec;
|
package/dist/raiz/models.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { array, date, instant, object } from "../_/index.js";
|
|
3
|
+
import { array, bytes, date, instant, object } from "../_/index.js";
|
|
4
4
|
export const RaizBusinessHoursCodec = object([
|
|
5
5
|
["closedDates", null, array(date)],
|
|
6
6
|
]);
|
|
@@ -17,3 +17,6 @@ export const RaizTaskCodec = object([
|
|
|
17
17
|
export const RaizTaskResponseCodec = object([
|
|
18
18
|
["data", null, () => RaizTaskCodec],
|
|
19
19
|
]);
|
|
20
|
+
export const RaizTemplateHeaderFileCodec = object([
|
|
21
|
+
["data", null, bytes],
|
|
22
|
+
]);
|
|
@@ -36,11 +36,11 @@ export interface Client {
|
|
|
36
36
|
* List assigned appointments
|
|
37
37
|
*
|
|
38
38
|
* Read assigned appointments for one day at a cost centre, ordered by moment
|
|
39
|
-
* and reference, with the
|
|
40
|
-
* records. Never cached. A full upstream page that
|
|
41
|
-
* is PROVIDER_UNAVAILABLE; narrow by professionalId
|
|
42
|
-
* partial agenda as complete. This operation changes
|
|
43
|
-
* no message.
|
|
39
|
+
* and reference, with the patient's document number, the contact phone and
|
|
40
|
+
* the state (`status`) SIIPS records. Never cached. A full upstream page that
|
|
41
|
+
* cannot prove completeness is PROVIDER_UNAVAILABLE; narrow by professionalId
|
|
42
|
+
* rather than treating a partial agenda as complete. This operation changes
|
|
43
|
+
* no appointment and sends no message.
|
|
44
44
|
*/
|
|
45
45
|
list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
46
46
|
}
|
|
@@ -76,6 +76,12 @@ export interface VisoftAssignedAppointment {
|
|
|
76
76
|
* SIIPS's attendance flag, as stored.
|
|
77
77
|
*/
|
|
78
78
|
attended: string;
|
|
79
|
+
/**
|
|
80
|
+
* The patient's document number, as SIIPS's agenda stores it: letters and
|
|
81
|
+
* digits only. Empty when the agenda shows none, or when its row and its
|
|
82
|
+
* reference name different documents.
|
|
83
|
+
*/
|
|
84
|
+
documentNumber: string;
|
|
79
85
|
patientName: string;
|
|
80
86
|
/**
|
|
81
87
|
* SIIPS's contact phone text; may be empty or contain several numbers.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbol-ai/sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.48.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",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"packageManager": "bun@1.4.3",
|
|
59
59
|
"arbol": {
|
|
60
60
|
"openapi": {
|
|
61
|
-
"release": "1.
|
|
62
|
-
"sha256": "
|
|
61
|
+
"release": "1.20261110.165834",
|
|
62
|
+
"sha256": "4a5b1bfab518d4cf2e9dc706515e80d4f561a36a622cf49eed7384b206038fc0"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|