@arbol-ai/sdk 5.43.0 → 5.45.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/client.d.ts +0 -16
- package/dist/account/client.js +0 -40
- package/dist/account/index.d.ts +1 -1
- package/dist/account/models.d.ts +0 -93
- package/dist/agenda/appointments/client.d.ts +14 -243
- package/dist/agenda/appointments/client.js +18 -17
- package/dist/agenda/appointments/index.d.ts +1 -1
- package/dist/agenda/appointments/models.d.ts +612 -2
- package/dist/agenda/appointments/models.js +14 -2
- package/dist/agenda/availability/client.d.ts +2 -7
- package/dist/agenda/availability/client.js +5 -4
- package/dist/agenda/availability/index.d.ts +1 -0
- package/dist/agenda/availability/models.d.ts +67 -0
- package/dist/agenda/bookingLocations/client.d.ts +2 -7
- package/dist/agenda/bookingLocations/client.js +4 -4
- package/dist/agenda/bookingLocations/index.d.ts +1 -0
- package/dist/agenda/bookingLocations/models.d.ts +67 -0
- package/dist/agenda/bookingOfferings/client.d.ts +2 -8
- package/dist/agenda/bookingOfferings/client.js +1 -1
- package/dist/agenda/bookingOfferings/index.d.ts +1 -1
- package/dist/agenda/bookingOfferings/models.d.ts +79 -1
- package/dist/agenda/bookingRequirements/client.d.ts +2 -75
- package/dist/agenda/bookingRequirements/client.js +1 -1
- package/dist/agenda/bookingRequirements/index.d.ts +1 -0
- package/dist/agenda/bookingRequirements/models.d.ts +182 -0
- package/dist/agenda/bookingSlots/client.d.ts +2 -7
- package/dist/agenda/bookingSlots/client.js +5 -4
- package/dist/agenda/bookingSlots/index.d.ts +1 -0
- package/dist/agenda/bookingSlots/models.d.ts +67 -0
- package/dist/agenda/bookingSlots/models.js +3 -0
- package/dist/agenda/bookings/client.d.ts +13 -188
- package/dist/agenda/bookings/client.js +13 -13
- package/dist/agenda/bookings/index.d.ts +1 -1
- package/dist/agenda/bookings/models.d.ts +526 -1
- package/dist/agenda/bookings/models.js +7 -1
- package/dist/agenda/firstAvailability/client.d.ts +2 -8
- package/dist/agenda/firstAvailability/client.js +4 -4
- package/dist/agenda/firstAvailability/index.d.ts +1 -1
- package/dist/agenda/firstAvailability/models.d.ts +80 -1
- package/dist/agenda/firstAvailability/models.js +4 -1
- package/dist/agenda/index.d.ts +1 -1
- package/dist/agenda/locations/client.d.ts +2 -7
- package/dist/agenda/locations/client.js +4 -4
- package/dist/agenda/locations/index.d.ts +1 -0
- package/dist/agenda/locations/models.d.ts +67 -0
- package/dist/agenda/locations/models.js +3 -0
- package/dist/agenda/models.d.ts +2193 -839
- package/dist/agenda/models.js +9 -0
- package/dist/agenda/nearestBookingSlots/client.d.ts +2 -8
- package/dist/agenda/nearestBookingSlots/client.js +4 -4
- package/dist/agenda/nearestBookingSlots/index.d.ts +1 -1
- package/dist/agenda/nearestBookingSlots/models.d.ts +80 -2
- package/dist/agenda/nearestBookingSlots/models.js +4 -1
- package/dist/agenda/offerings/client.d.ts +7 -146
- package/dist/agenda/offerings/client.js +8 -8
- package/dist/agenda/offerings/index.d.ts +1 -1
- package/dist/agenda/offerings/models.d.ts +349 -1
- package/dist/agenda/offerings/models.js +6 -0
- package/dist/agenda/resourceSchedules/client.d.ts +4 -51
- package/dist/agenda/resourceSchedules/client.js +5 -4
- package/dist/agenda/resourceSchedules/index.d.ts +1 -0
- package/dist/agenda/resourceSchedules/models.d.ts +133 -0
- package/dist/agenda/resourceSchedules/models.js +12 -0
- package/dist/agenda/resources/client.d.ts +7 -99
- package/dist/agenda/resources/client.js +8 -8
- package/dist/agenda/resources/index.d.ts +1 -1
- package/dist/agenda/resources/models.d.ts +302 -1
- package/dist/agenda/resources/models.js +6 -0
- package/dist/agenda/scheduleRules/client.d.ts +7 -172
- package/dist/agenda/scheduleRules/client.js +10 -10
- package/dist/agenda/scheduleRules/index.d.ts +1 -1
- package/dist/agenda/scheduleRules/models.d.ts +520 -1
- package/dist/agenda/scheduleRules/models.js +31 -0
- package/dist/agenda/services/client.d.ts +7 -71
- package/dist/agenda/services/client.js +8 -8
- package/dist/agenda/services/index.d.ts +1 -1
- package/dist/agenda/services/models.d.ts +274 -1
- package/dist/agenda/services/models.js +6 -0
- package/dist/agenda/waitlist/client.d.ts +9 -217
- package/dist/agenda/waitlist/client.js +13 -13
- package/dist/agenda/waitlist/index.d.ts +1 -1
- package/dist/agenda/waitlist/models.d.ts +482 -1
- package/dist/agenda/waitlist/models.js +16 -1
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +0 -20
- package/dist/raiz/agents/client.d.ts +8 -137
- package/dist/raiz/agents/client.js +12 -12
- package/dist/raiz/agents/index.d.ts +1 -1
- package/dist/raiz/agents/models.d.ts +258 -2
- package/dist/raiz/agents/models.js +13 -1
- package/dist/raiz/bulletins/client.d.ts +10 -74
- package/dist/raiz/bulletins/client.js +13 -14
- package/dist/raiz/bulletins/index.d.ts +1 -1
- package/dist/raiz/bulletins/models.d.ts +112 -1
- package/dist/raiz/bulletins/models.js +14 -0
- package/dist/raiz/campaigns/client.d.ts +11 -140
- package/dist/raiz/campaigns/client.js +14 -14
- package/dist/raiz/campaigns/index.d.ts +1 -1
- package/dist/raiz/campaigns/models.d.ts +343 -2
- package/dist/raiz/campaigns/models.js +14 -1
- package/dist/raiz/changes/client.d.ts +2 -8
- package/dist/raiz/changes/client.js +4 -4
- package/dist/raiz/changes/index.d.ts +1 -1
- package/dist/raiz/changes/models.d.ts +41 -1
- package/dist/raiz/changes/models.js +3 -0
- package/dist/raiz/channels/client.d.ts +15 -142
- package/dist/raiz/channels/client.js +16 -18
- package/dist/raiz/channels/index.d.ts +1 -1
- package/dist/raiz/channels/models.d.ts +1511 -2
- package/dist/raiz/channels/models.js +12 -2
- package/dist/raiz/contacts/client.d.ts +12 -117
- package/dist/raiz/contacts/client.js +15 -15
- package/dist/raiz/contacts/index.d.ts +1 -1
- package/dist/raiz/contacts/models.d.ts +305 -2
- package/dist/raiz/contacts/models.js +10 -1
- package/dist/raiz/conversations/client.d.ts +18 -99
- package/dist/raiz/conversations/client.js +12 -13
- package/dist/raiz/conversations/index.d.ts +1 -1
- package/dist/raiz/conversations/models.d.ts +253 -2
- package/dist/raiz/conversations/models.js +8 -2
- package/dist/raiz/definitions/client.d.ts +8 -115
- package/dist/raiz/definitions/client.js +10 -10
- package/dist/raiz/definitions/index.d.ts +1 -1
- package/dist/raiz/definitions/models.d.ts +224 -1
- package/dist/raiz/definitions/models.js +6 -0
- package/dist/raiz/evalCases/client.d.ts +10 -57
- package/dist/raiz/evalCases/client.js +8 -8
- package/dist/raiz/evalCases/index.d.ts +1 -1
- package/dist/raiz/evalCases/models.d.ts +78 -1
- package/dist/raiz/evalCases/models.js +6 -0
- package/dist/raiz/evalRuns/client.d.ts +4 -45
- package/dist/raiz/evalRuns/client.js +6 -6
- package/dist/raiz/evalRuns/index.d.ts +1 -1
- package/dist/raiz/evalRuns/models.d.ts +85 -0
- package/dist/raiz/evalRuns/models.js +3 -0
- package/dist/raiz/facts/client.d.ts +6 -65
- package/dist/raiz/facts/client.js +7 -7
- package/dist/raiz/facts/index.d.ts +1 -0
- package/dist/raiz/facts/models.d.ts +120 -0
- package/dist/raiz/facts/models.js +10 -0
- package/dist/raiz/index.d.ts +1 -1
- package/dist/raiz/knowledge/client.d.ts +10 -130
- package/dist/raiz/knowledge/client.js +13 -13
- package/dist/raiz/knowledge/index.d.ts +1 -1
- package/dist/raiz/knowledge/models.d.ts +256 -1
- package/dist/raiz/knowledge/models.js +12 -0
- package/dist/raiz/models.d.ts +1474 -825
- package/dist/raiz/models.js +3 -0
- package/dist/raiz/organization/client.d.ts +7 -70
- package/dist/raiz/organization/client.js +8 -8
- package/dist/raiz/organization/index.d.ts +1 -1
- package/dist/raiz/organization/models.d.ts +178 -1
- package/dist/raiz/organization/models.js +11 -0
- package/dist/raiz/profiles/client.d.ts +8 -87
- package/dist/raiz/profiles/client.js +10 -10
- package/dist/raiz/profiles/index.d.ts +1 -1
- package/dist/raiz/profiles/models.d.ts +206 -2
- package/dist/raiz/profiles/models.js +6 -0
- package/dist/raiz/reports/client.d.ts +5 -8
- package/dist/raiz/reports/client.js +4 -4
- package/dist/raiz/reports/index.d.ts +1 -1
- package/dist/raiz/reports/models.d.ts +41 -0
- package/dist/raiz/reports/models.js +3 -0
- package/dist/raiz/suppressions/client.d.ts +4 -31
- package/dist/raiz/suppressions/client.js +6 -6
- package/dist/raiz/suppressions/index.d.ts +1 -1
- package/dist/raiz/suppressions/models.d.ts +114 -1
- package/dist/raiz/suppressions/models.js +6 -0
- package/dist/raiz/tasks/client.d.ts +12 -32
- package/dist/raiz/tasks/client.js +11 -11
- package/dist/raiz/tasks/index.d.ts +1 -1
- package/dist/raiz/tasks/models.d.ts +108 -2
- package/dist/raiz/tasks/models.js +4 -1
- package/dist/raiz/templates/client.d.ts +7 -84
- package/dist/raiz/templates/client.js +5 -4
- package/dist/raiz/templates/index.d.ts +1 -1
- package/dist/raiz/templates/models.d.ts +214 -1
- package/dist/raiz/templates/models.js +4 -1
- package/dist/raiz/voices/client.d.ts +2 -8
- package/dist/raiz/voices/client.js +1 -1
- package/dist/raiz/voices/index.d.ts +1 -1
- package/dist/raiz/voices/models.d.ts +40 -1
- package/package.json +3 -3
- package/dist/account/billing/client.d.ts +0 -22
- package/dist/account/billing/client.js +0 -18
- package/dist/account/billing/index.d.ts +0 -5
- package/dist/account/billing/index.js +0 -4
- package/dist/account/billing/models.d.ts +0 -74
- package/dist/account/billing/models.js +0 -10
- package/dist/account/billingProfiles/client.d.ts +0 -39
- package/dist/account/billingProfiles/client.js +0 -25
- package/dist/account/billingProfiles/index.d.ts +0 -5
- package/dist/account/billingProfiles/index.js +0 -4
- package/dist/account/billingProfiles/models.d.ts +0 -58
- package/dist/account/invoiceDocuments/client.d.ts +0 -25
- package/dist/account/invoiceDocuments/client.js +0 -17
- package/dist/account/invoiceDocuments/index.d.ts +0 -5
- package/dist/account/invoiceDocuments/index.js +0 -4
- package/dist/account/invoiceDocuments/models.d.ts +0 -35
- package/dist/account/invoices/client.d.ts +0 -47
- package/dist/account/invoices/client.js +0 -26
- package/dist/account/invoices/index.d.ts +0 -5
- package/dist/account/invoices/index.js +0 -4
- package/dist/account/invoices/models.d.ts +0 -135
- package/dist/account/invoices/models.js +0 -24
- package/dist/account/payments/client.d.ts +0 -34
- package/dist/account/payments/client.js +0 -19
- package/dist/account/payments/index.d.ts +0 -5
- package/dist/account/payments/index.js +0 -4
- package/dist/account/payments/models.d.ts +0 -64
- package/dist/account/payments/models.js +0 -12
- package/dist/account/usage/client.d.ts +0 -47
- package/dist/account/usage/client.js +0 -18
- package/dist/account/usage/index.d.ts +0 -5
- package/dist/account/usage/index.js +0 -4
- package/dist/account/usage/models.d.ts +0 -51
- package/dist/account/usageSummary/client.d.ts +0 -26
- package/dist/account/usageSummary/client.js +0 -19
- package/dist/account/usageSummary/index.d.ts +0 -5
- package/dist/account/usageSummary/index.js +0 -4
- package/dist/account/usageSummary/models.d.ts +0 -50
- package/dist/account/usageSummary/models.js +0 -9
- package/dist/account/walletTransactions/client.d.ts +0 -34
- package/dist/account/walletTransactions/client.js +0 -19
- package/dist/account/walletTransactions/index.d.ts +0 -5
- package/dist/account/walletTransactions/index.js +0 -4
- package/dist/account/walletTransactions/models.d.ts +0 -58
- package/dist/account/walletTransactions/models.js +0 -12
- /package/dist/{account/billingProfiles → agenda/availability}/models.js +0 -0
- /package/dist/{account/invoiceDocuments → agenda/bookingLocations}/models.js +0 -0
- /package/dist/{account/usage → agenda/bookingRequirements}/models.js +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type
|
|
4
|
-
import { type RaizConversation, type RaizConversationCount, type RaizConversationPage } from "./models.js";
|
|
2
|
+
import type { DeletedObjectResponse } from "../../models.js";
|
|
3
|
+
import { type RaizContinueConversationBody, type RaizConversationCountResponse, type RaizConversationPageResponse, type RaizConversationResponse, type RaizUpdateConversationBody } from "./models.js";
|
|
5
4
|
export interface ClientOptions extends BaseClientOptions {
|
|
6
5
|
/**
|
|
7
6
|
* The URL the paths of the API are relative to.
|
|
@@ -105,38 +104,13 @@ export interface Client {
|
|
|
105
104
|
}
|
|
106
105
|
export declare function createClient(options: ClientOptions): Client;
|
|
107
106
|
export declare function bind(transport: Transport): Client;
|
|
108
|
-
export
|
|
107
|
+
export type ContinueRequest = {
|
|
109
108
|
/**
|
|
110
109
|
* Conversation id.
|
|
111
110
|
*/
|
|
112
111
|
conversationId: string;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
* handoff refuses the continuation with VERSION_CONFLICT, without resuming or
|
|
116
|
-
* sending anything. Use with expectedVersion after checking that the original
|
|
117
|
-
* blocker is resolved.
|
|
118
|
-
*/
|
|
119
|
-
expectedHandoffMessageId?: string;
|
|
120
|
-
/**
|
|
121
|
-
* The `version` you read. When present, the change applies only if nobody
|
|
122
|
-
* changed the resource since; otherwise it fails with VERSION_CONFLICT.
|
|
123
|
-
*/
|
|
124
|
-
expectedVersion?: number;
|
|
125
|
-
/**
|
|
126
|
-
* A short internal note about the resolved blocker, authoritative evidence,
|
|
127
|
-
* confirmed appointments and any remaining request. A note does not establish
|
|
128
|
-
* coverage, clinical equivalence, consent or a booking. Preserve explicit
|
|
129
|
-
* human requests and unresolved clinical decisions, identity conflicts or
|
|
130
|
-
* uncertain writes with the team.
|
|
131
|
-
*/
|
|
132
|
-
note?: string;
|
|
133
|
-
}
|
|
134
|
-
export interface ContinueResponse {
|
|
135
|
-
data: RaizConversation;
|
|
136
|
-
error: null;
|
|
137
|
-
metadata: RaizResponseMetadata;
|
|
138
|
-
success: true;
|
|
139
|
-
}
|
|
112
|
+
} & RaizContinueConversationBody;
|
|
113
|
+
export type ContinueResponse = RaizConversationResponse;
|
|
140
114
|
export interface CountRequest {
|
|
141
115
|
/**
|
|
142
116
|
* Agent id.
|
|
@@ -226,6 +200,9 @@ export interface CountRequest {
|
|
|
226
200
|
* Started before this instant (RFC 3339).
|
|
227
201
|
*/
|
|
228
202
|
startedBefore?: Temporal.Instant;
|
|
203
|
+
/**
|
|
204
|
+
* The status.
|
|
205
|
+
*/
|
|
229
206
|
status?: "open" | "closed";
|
|
230
207
|
/**
|
|
231
208
|
* Started today or in the last 7, 30, 90 or 365 days including today,
|
|
@@ -296,27 +273,14 @@ export interface CountRequest {
|
|
|
296
273
|
*/
|
|
297
274
|
groupBy?: string;
|
|
298
275
|
}
|
|
299
|
-
export
|
|
300
|
-
data: RaizConversationCount;
|
|
301
|
-
error: null;
|
|
302
|
-
metadata: RaizResponseMetadata;
|
|
303
|
-
success: true;
|
|
304
|
-
}
|
|
276
|
+
export type CountResponse = RaizConversationCountResponse;
|
|
305
277
|
export interface DeleteRequest {
|
|
306
278
|
/**
|
|
307
279
|
* Conversation id.
|
|
308
280
|
*/
|
|
309
281
|
conversationId: string;
|
|
310
|
-
body: {
|
|
311
|
-
[key: string]: unknown;
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
export interface DeleteResponse {
|
|
315
|
-
data: DeletedObject;
|
|
316
|
-
error: null;
|
|
317
|
-
metadata: RaizResponseMetadata;
|
|
318
|
-
success: true;
|
|
319
282
|
}
|
|
283
|
+
export type DeleteResponse = DeletedObjectResponse;
|
|
320
284
|
export interface GetRequest {
|
|
321
285
|
/**
|
|
322
286
|
* Conversation id.
|
|
@@ -341,12 +305,7 @@ export interface GetRequest {
|
|
|
341
305
|
*/
|
|
342
306
|
messagesLimit?: number;
|
|
343
307
|
}
|
|
344
|
-
export
|
|
345
|
-
data: RaizConversation;
|
|
346
|
-
error: null;
|
|
347
|
-
metadata: RaizResponseMetadata;
|
|
348
|
-
success: true;
|
|
349
|
-
}
|
|
308
|
+
export type GetResponse = RaizConversationResponse;
|
|
350
309
|
export interface ListRequest {
|
|
351
310
|
/**
|
|
352
311
|
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
@@ -449,6 +408,9 @@ export interface ListRequest {
|
|
|
449
408
|
* Started before this instant (RFC 3339).
|
|
450
409
|
*/
|
|
451
410
|
startedBefore?: Temporal.Instant;
|
|
411
|
+
/**
|
|
412
|
+
* The status.
|
|
413
|
+
*/
|
|
452
414
|
status?: "open" | "closed";
|
|
453
415
|
/**
|
|
454
416
|
* Started today or in the last 7, 30, 90 or 365 days including today,
|
|
@@ -518,54 +480,11 @@ export interface ListRequest {
|
|
|
518
480
|
*/
|
|
519
481
|
sort?: "started" | "last_message" | "changed";
|
|
520
482
|
}
|
|
521
|
-
export
|
|
522
|
-
|
|
523
|
-
error: null;
|
|
524
|
-
metadata: RaizResponseMetadata;
|
|
525
|
-
success: true;
|
|
526
|
-
}
|
|
527
|
-
export interface UpdateRequest {
|
|
483
|
+
export type ListResponse = RaizConversationPageResponse;
|
|
484
|
+
export type UpdateRequest = {
|
|
528
485
|
/**
|
|
529
486
|
* Conversation id.
|
|
530
487
|
*/
|
|
531
488
|
conversationId: string;
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
* Activation answers what the contact wrote after the last real answer, the
|
|
535
|
-
* team's or the Agent's (a wait notice is not one).
|
|
536
|
-
*/
|
|
537
|
-
aiEnabled?: boolean;
|
|
538
|
-
/**
|
|
539
|
-
* WhatsApp only: pause or resume automatic replies for this recipient until
|
|
540
|
-
* their open conversation closes. Resuming answers what the contact wrote in
|
|
541
|
-
* this conversation after the last real answer.
|
|
542
|
-
*/
|
|
543
|
-
aiPaused?: boolean;
|
|
544
|
-
contactId?: string | null;
|
|
545
|
-
/**
|
|
546
|
-
* The `version` you read. When present, the change applies only if nobody
|
|
547
|
-
* changed the resource since; otherwise it fails with VERSION_CONFLICT.
|
|
548
|
-
*/
|
|
549
|
-
expectedVersion?: number;
|
|
550
|
-
/**
|
|
551
|
-
* Your own keys and labels for this resource (up to 50 keys of 40 characters;
|
|
552
|
-
* values up to 500 characters). Raíz never interprets them.
|
|
553
|
-
*/
|
|
554
|
-
metadata?: {
|
|
555
|
-
[key: string]: unknown;
|
|
556
|
-
};
|
|
557
|
-
/**
|
|
558
|
-
* Close the conversation (`closeReason: manual`); its analysis then runs. A
|
|
559
|
-
* closed conversation stays closed. Calls close by themselves when they end.
|
|
560
|
-
*/
|
|
561
|
-
status?: "closed";
|
|
562
|
-
subjectContactId?: string | null;
|
|
563
|
-
summary?: string | null;
|
|
564
|
-
title?: string | null;
|
|
565
|
-
}
|
|
566
|
-
export interface UpdateResponse {
|
|
567
|
-
data: RaizConversation;
|
|
568
|
-
error: null;
|
|
569
|
-
metadata: RaizResponseMetadata;
|
|
570
|
-
success: true;
|
|
571
|
-
}
|
|
489
|
+
} & RaizUpdateConversationBody;
|
|
490
|
+
export type UpdateResponse = RaizConversationResponse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { Transport,
|
|
4
|
-
import {
|
|
3
|
+
import { Transport, } from "../../_/index.js";
|
|
4
|
+
import { RaizConversationPageResponseCodec, RaizConversationResponseCodec, } from "./models.js";
|
|
5
5
|
export function createClient(options) {
|
|
6
6
|
return bind(new Transport(options));
|
|
7
7
|
}
|
|
@@ -19,41 +19,40 @@ const ContinueOperation = {
|
|
|
19
19
|
method: "POST",
|
|
20
20
|
route: "/v1/raiz/conversations/{conversationId}/continue",
|
|
21
21
|
body: "flat",
|
|
22
|
-
response:
|
|
23
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "
|
|
22
|
+
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 },
|
|
24
24
|
};
|
|
25
25
|
const CountOperation = {
|
|
26
26
|
method: "GET",
|
|
27
27
|
route: "/v1/raiz/conversations/count",
|
|
28
28
|
query: { agentId: "agentId", campaignId: "campaignId", channelId: "channelId", channelType: "channelType", contactId: "contactId", conversationDirection: "conversationDirection", handling: "handling", worker: "worker", origin: "origin", outcome: "outcome", metadataReference: "metadataReference", profileId: "profileId", q: "q", requestedBy: "requestedBy", startedAfter: "startedAfter", startedBefore: "startedBefore", status: "status", period: "period", sentiment: "sentiment", toolName: "toolName", toolStatus: "toolStatus", factDefinition: "factDefinition", factValue: "factValue", assessment: "assessment", toReview: "toReview", messagesMin: "messagesMin", messagesMax: "messagesMax", durationMin: "durationMin", durationMax: "durationMax", groupBy: "groupBy" },
|
|
29
29
|
response: null,
|
|
30
|
-
errors: { "400": true, "401": true, "403": true, "
|
|
30
|
+
errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
31
31
|
};
|
|
32
32
|
const DeleteOperation = {
|
|
33
33
|
method: "DELETE",
|
|
34
34
|
route: "/v1/raiz/conversations/{conversationId}",
|
|
35
|
-
body: "nested",
|
|
36
35
|
response: null,
|
|
37
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "
|
|
36
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
38
37
|
};
|
|
39
38
|
const GetOperation = {
|
|
40
39
|
method: "GET",
|
|
41
40
|
route: "/v1/raiz/conversations/{conversationId}",
|
|
42
41
|
query: { expand: "expand", messagesCursor: "messagesCursor", messagesDirection: "messagesDirection", messagesLimit: "messagesLimit" },
|
|
43
|
-
response:
|
|
44
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "
|
|
42
|
+
response: RaizConversationResponseCodec,
|
|
43
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
45
44
|
};
|
|
46
45
|
const ListOperation = {
|
|
47
46
|
method: "GET",
|
|
48
47
|
route: "/v1/raiz/conversations",
|
|
49
48
|
query: { cursor: "cursor", direction: "direction", limit: "limit", agentId: "agentId", campaignId: "campaignId", channelId: "channelId", channelType: "channelType", contactId: "contactId", conversationDirection: "conversationDirection", handling: "handling", worker: "worker", origin: "origin", outcome: "outcome", metadataReference: "metadataReference", profileId: "profileId", q: "q", requestedBy: "requestedBy", startedAfter: "startedAfter", startedBefore: "startedBefore", status: "status", period: "period", sentiment: "sentiment", toolName: "toolName", toolStatus: "toolStatus", factDefinition: "factDefinition", factValue: "factValue", assessment: "assessment", toReview: "toReview", messagesMin: "messagesMin", messagesMax: "messagesMax", durationMin: "durationMin", durationMax: "durationMax", sort: "sort" },
|
|
50
|
-
response:
|
|
51
|
-
errors: { "400": true, "401": true, "403": true, "
|
|
49
|
+
response: RaizConversationPageResponseCodec,
|
|
50
|
+
errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
52
51
|
};
|
|
53
52
|
const UpdateOperation = {
|
|
54
53
|
method: "PATCH",
|
|
55
54
|
route: "/v1/raiz/conversations/{conversationId}",
|
|
56
55
|
body: "flat",
|
|
57
|
-
response:
|
|
58
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "
|
|
56
|
+
response: RaizConversationResponseCodec,
|
|
57
|
+
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 },
|
|
59
58
|
};
|
|
@@ -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, ContinueRequest, ContinueResponse, CountRequest, CountResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
|
|
5
|
-
export type { RaizConversation, RaizConversationCount, RaizConversationDiagnostics, RaizConversationGroup, RaizConversationOutcomeCounts, RaizConversationPage, RaizConversationToolCalls, RaizConversationToolFailure, RaizConversationWorker, RaizMessage, RaizMessagePage, } from "./models.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";
|
|
@@ -1,5 +1,66 @@
|
|
|
1
|
-
import { type PageInfo, type SignedUrl } from "../../models.js";
|
|
2
|
-
import { type RaizFact } from "../models.js";
|
|
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";
|
|
3
|
+
/**
|
|
4
|
+
* A failed answer.
|
|
5
|
+
*/
|
|
6
|
+
export interface RaizContinueConversationBadRequestError {
|
|
7
|
+
data: null;
|
|
8
|
+
error: RaizContinueConversationBadRequestFailure;
|
|
9
|
+
/**
|
|
10
|
+
* What every answer carries besides its data or error.
|
|
11
|
+
*/
|
|
12
|
+
metadata: ResponseMetadata;
|
|
13
|
+
success: false;
|
|
14
|
+
}
|
|
15
|
+
export type RaizContinueConversationBadRequestFailure = InvalidInputFailure | RaizInvalidCursorFailure;
|
|
16
|
+
export interface RaizContinueConversationBody {
|
|
17
|
+
/**
|
|
18
|
+
* The humanReviewMessageId just reviewed by the operator. A different current
|
|
19
|
+
* handoff refuses the continuation with VERSION_CONFLICT, without resuming or
|
|
20
|
+
* sending anything. Use with expectedVersion after checking that the original
|
|
21
|
+
* blocker is resolved.
|
|
22
|
+
*/
|
|
23
|
+
expectedHandoffMessageId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The `version` you read. When present, the change applies only if nobody
|
|
26
|
+
* changed the resource since; otherwise it fails with VERSION_CONFLICT.
|
|
27
|
+
*/
|
|
28
|
+
expectedVersion?: number;
|
|
29
|
+
/**
|
|
30
|
+
* A short internal note about the resolved blocker, authoritative evidence,
|
|
31
|
+
* confirmed appointments and any remaining request. A note does not establish
|
|
32
|
+
* coverage, clinical equivalence, consent or a booking. Preserve explicit
|
|
33
|
+
* human requests and unresolved clinical decisions, identity conflicts or
|
|
34
|
+
* uncertain writes with the team.
|
|
35
|
+
*/
|
|
36
|
+
note?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A failed answer.
|
|
40
|
+
*/
|
|
41
|
+
export interface RaizContinueConversationConflictError {
|
|
42
|
+
data: null;
|
|
43
|
+
error: RaizContinueConversationConflictFailure;
|
|
44
|
+
/**
|
|
45
|
+
* What every answer carries besides its data or error.
|
|
46
|
+
*/
|
|
47
|
+
metadata: ResponseMetadata;
|
|
48
|
+
success: false;
|
|
49
|
+
}
|
|
50
|
+
export type RaizContinueConversationConflictFailure = RaizConversationClosedFailure | RaizConversationNotHandedOffFailure | RaizHandoffAlreadyContinuedFailure | RaizChannelNotReadyFailure | RaizChannelTypeMismatchFailure | RaizWhatsappWindowClosedFailure | RaizVersionConflictFailure;
|
|
51
|
+
/**
|
|
52
|
+
* A failed answer.
|
|
53
|
+
*/
|
|
54
|
+
export interface RaizContinueConversationServiceUnavailableError {
|
|
55
|
+
data: null;
|
|
56
|
+
error: RaizContinueConversationServiceUnavailableFailure;
|
|
57
|
+
/**
|
|
58
|
+
* What every answer carries besides its data or error.
|
|
59
|
+
*/
|
|
60
|
+
metadata: ResponseMetadata;
|
|
61
|
+
success: false;
|
|
62
|
+
}
|
|
63
|
+
export type RaizContinueConversationServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
|
|
3
64
|
export interface RaizConversation {
|
|
4
65
|
agentId: string | null;
|
|
5
66
|
agentName: string | null;
|
|
@@ -138,6 +199,18 @@ export interface RaizConversationCount {
|
|
|
138
199
|
count: number;
|
|
139
200
|
groups: RaizConversationGroup[] | null;
|
|
140
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* A successful answer.
|
|
204
|
+
*/
|
|
205
|
+
export interface RaizConversationCountResponse {
|
|
206
|
+
data: RaizConversationCount;
|
|
207
|
+
error: null;
|
|
208
|
+
/**
|
|
209
|
+
* What every answer carries besides its data or error.
|
|
210
|
+
*/
|
|
211
|
+
metadata: ResponseMetadata;
|
|
212
|
+
success: true;
|
|
213
|
+
}
|
|
141
214
|
export interface RaizConversationDiagnostics {
|
|
142
215
|
errorCode: string | null;
|
|
143
216
|
providerErrorCode: number | null;
|
|
@@ -188,6 +261,30 @@ export interface RaizConversationPage {
|
|
|
188
261
|
*/
|
|
189
262
|
pageInfo: PageInfo;
|
|
190
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* A successful answer.
|
|
266
|
+
*/
|
|
267
|
+
export interface RaizConversationPageResponse {
|
|
268
|
+
data: RaizConversationPage;
|
|
269
|
+
error: null;
|
|
270
|
+
/**
|
|
271
|
+
* What every answer carries besides its data or error.
|
|
272
|
+
*/
|
|
273
|
+
metadata: ResponseMetadata;
|
|
274
|
+
success: true;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* A successful answer.
|
|
278
|
+
*/
|
|
279
|
+
export interface RaizConversationResponse {
|
|
280
|
+
data: RaizConversation;
|
|
281
|
+
error: null;
|
|
282
|
+
/**
|
|
283
|
+
* What every answer carries besides its data or error.
|
|
284
|
+
*/
|
|
285
|
+
metadata: ResponseMetadata;
|
|
286
|
+
success: true;
|
|
287
|
+
}
|
|
191
288
|
export interface RaizConversationToolCalls {
|
|
192
289
|
/**
|
|
193
290
|
* The Agent's tool calls in the conversation.
|
|
@@ -225,6 +322,84 @@ export type RaizConversationWorker = {
|
|
|
225
322
|
}[];
|
|
226
323
|
messageCount: number;
|
|
227
324
|
};
|
|
325
|
+
/**
|
|
326
|
+
* A failed answer.
|
|
327
|
+
*/
|
|
328
|
+
export interface RaizCountConversationsServiceUnavailableError {
|
|
329
|
+
data: null;
|
|
330
|
+
error: RaizCountConversationsServiceUnavailableFailure;
|
|
331
|
+
/**
|
|
332
|
+
* What every answer carries besides its data or error.
|
|
333
|
+
*/
|
|
334
|
+
metadata: ResponseMetadata;
|
|
335
|
+
success: false;
|
|
336
|
+
}
|
|
337
|
+
export type RaizCountConversationsServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
|
|
338
|
+
/**
|
|
339
|
+
* A failed answer.
|
|
340
|
+
*/
|
|
341
|
+
export interface RaizDeleteConversationConflictError {
|
|
342
|
+
data: null;
|
|
343
|
+
error: RaizDeleteConversationConflictFailure;
|
|
344
|
+
/**
|
|
345
|
+
* What every answer carries besides its data or error.
|
|
346
|
+
*/
|
|
347
|
+
metadata: ResponseMetadata;
|
|
348
|
+
success: false;
|
|
349
|
+
}
|
|
350
|
+
export type RaizDeleteConversationConflictFailure = RaizCallInProgressFailure | RaizConversationOpenFailure | RaizReplyInProgressFailure | RaizChannelNotReadyFailure | RaizChannelTypeMismatchFailure | RaizVersionConflictFailure;
|
|
351
|
+
/**
|
|
352
|
+
* A failed answer.
|
|
353
|
+
*/
|
|
354
|
+
export interface RaizGetConversationBadRequestError {
|
|
355
|
+
data: null;
|
|
356
|
+
error: RaizGetConversationBadRequestFailure;
|
|
357
|
+
/**
|
|
358
|
+
* What every answer carries besides its data or error.
|
|
359
|
+
*/
|
|
360
|
+
metadata: ResponseMetadata;
|
|
361
|
+
success: false;
|
|
362
|
+
}
|
|
363
|
+
export type RaizGetConversationBadRequestFailure = InvalidInputFailure | RaizInvalidCursorFailure;
|
|
364
|
+
/**
|
|
365
|
+
* A failed answer.
|
|
366
|
+
*/
|
|
367
|
+
export interface RaizGetConversationServiceUnavailableError {
|
|
368
|
+
data: null;
|
|
369
|
+
error: RaizGetConversationServiceUnavailableFailure;
|
|
370
|
+
/**
|
|
371
|
+
* What every answer carries besides its data or error.
|
|
372
|
+
*/
|
|
373
|
+
metadata: ResponseMetadata;
|
|
374
|
+
success: false;
|
|
375
|
+
}
|
|
376
|
+
export type RaizGetConversationServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
|
|
377
|
+
/**
|
|
378
|
+
* A failed answer.
|
|
379
|
+
*/
|
|
380
|
+
export interface RaizListConversationsBadRequestError {
|
|
381
|
+
data: null;
|
|
382
|
+
error: RaizListConversationsBadRequestFailure;
|
|
383
|
+
/**
|
|
384
|
+
* What every answer carries besides its data or error.
|
|
385
|
+
*/
|
|
386
|
+
metadata: ResponseMetadata;
|
|
387
|
+
success: false;
|
|
388
|
+
}
|
|
389
|
+
export type RaizListConversationsBadRequestFailure = InvalidInputFailure | RaizInvalidCursorFailure;
|
|
390
|
+
/**
|
|
391
|
+
* A failed answer.
|
|
392
|
+
*/
|
|
393
|
+
export interface RaizListConversationsServiceUnavailableError {
|
|
394
|
+
data: null;
|
|
395
|
+
error: RaizListConversationsServiceUnavailableFailure;
|
|
396
|
+
/**
|
|
397
|
+
* What every answer carries besides its data or error.
|
|
398
|
+
*/
|
|
399
|
+
metadata: ResponseMetadata;
|
|
400
|
+
success: false;
|
|
401
|
+
}
|
|
402
|
+
export type RaizListConversationsServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
|
|
228
403
|
export interface RaizMessage {
|
|
229
404
|
agentId: string | null;
|
|
230
405
|
/**
|
|
@@ -361,8 +536,84 @@ export interface RaizMessagePage {
|
|
|
361
536
|
*/
|
|
362
537
|
pageInfo: PageInfo;
|
|
363
538
|
}
|
|
539
|
+
/**
|
|
540
|
+
* A failed answer.
|
|
541
|
+
*/
|
|
542
|
+
export interface RaizUpdateConversationBadRequestError {
|
|
543
|
+
data: null;
|
|
544
|
+
error: RaizUpdateConversationBadRequestFailure;
|
|
545
|
+
/**
|
|
546
|
+
* What every answer carries besides its data or error.
|
|
547
|
+
*/
|
|
548
|
+
metadata: ResponseMetadata;
|
|
549
|
+
success: false;
|
|
550
|
+
}
|
|
551
|
+
export type RaizUpdateConversationBadRequestFailure = InvalidInputFailure | RaizInvalidCursorFailure;
|
|
552
|
+
export interface RaizUpdateConversationBody {
|
|
553
|
+
/**
|
|
554
|
+
* WhatsApp only: activate or pause AI for this open conversation alone.
|
|
555
|
+
* Activation answers what the contact wrote after the last real answer, the
|
|
556
|
+
* team's or the Agent's (a wait notice is not one).
|
|
557
|
+
*/
|
|
558
|
+
aiEnabled?: boolean;
|
|
559
|
+
/**
|
|
560
|
+
* WhatsApp only: pause or resume automatic replies for this recipient until
|
|
561
|
+
* their open conversation closes. Resuming answers what the contact wrote in
|
|
562
|
+
* this conversation after the last real answer.
|
|
563
|
+
*/
|
|
564
|
+
aiPaused?: boolean;
|
|
565
|
+
contactId?: string | null;
|
|
566
|
+
/**
|
|
567
|
+
* The `version` you read. When present, the change applies only if nobody
|
|
568
|
+
* changed the resource since; otherwise it fails with VERSION_CONFLICT.
|
|
569
|
+
*/
|
|
570
|
+
expectedVersion?: number;
|
|
571
|
+
/**
|
|
572
|
+
* Your own keys and labels for this resource (up to 50 keys of 40 characters;
|
|
573
|
+
* values up to 500 characters). Raíz never interprets them.
|
|
574
|
+
*/
|
|
575
|
+
metadata?: {
|
|
576
|
+
[key: string]: unknown;
|
|
577
|
+
};
|
|
578
|
+
/**
|
|
579
|
+
* Close the conversation (`closeReason: manual`); its analysis then runs. A
|
|
580
|
+
* closed conversation stays closed. Calls close by themselves when they end.
|
|
581
|
+
*/
|
|
582
|
+
status?: "closed";
|
|
583
|
+
subjectContactId?: string | null;
|
|
584
|
+
summary?: string | null;
|
|
585
|
+
title?: string | null;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* A failed answer.
|
|
589
|
+
*/
|
|
590
|
+
export interface RaizUpdateConversationConflictError {
|
|
591
|
+
data: null;
|
|
592
|
+
error: RaizUpdateConversationConflictFailure;
|
|
593
|
+
/**
|
|
594
|
+
* What every answer carries besides its data or error.
|
|
595
|
+
*/
|
|
596
|
+
metadata: ResponseMetadata;
|
|
597
|
+
success: false;
|
|
598
|
+
}
|
|
599
|
+
export type RaizUpdateConversationConflictFailure = RaizCallInProgressFailure | RaizConversationOpenFailure | RaizReplyInProgressFailure | RaizChannelNotReadyFailure | RaizChannelTypeMismatchFailure | RaizVersionConflictFailure;
|
|
600
|
+
/**
|
|
601
|
+
* A failed answer.
|
|
602
|
+
*/
|
|
603
|
+
export interface RaizUpdateConversationServiceUnavailableError {
|
|
604
|
+
data: null;
|
|
605
|
+
error: RaizUpdateConversationServiceUnavailableFailure;
|
|
606
|
+
/**
|
|
607
|
+
* What every answer carries besides its data or error.
|
|
608
|
+
*/
|
|
609
|
+
metadata: ResponseMetadata;
|
|
610
|
+
success: false;
|
|
611
|
+
}
|
|
612
|
+
export type RaizUpdateConversationServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
|
|
364
613
|
export declare const RaizConversationCodec: import("../../_/codec.js").Codec;
|
|
365
614
|
export declare const RaizConversationPageCodec: import("../../_/codec.js").Codec;
|
|
615
|
+
export declare const RaizConversationPageResponseCodec: import("../../_/codec.js").Codec;
|
|
616
|
+
export declare const RaizConversationResponseCodec: import("../../_/codec.js").Codec;
|
|
366
617
|
export declare const RaizConversationWorkerCodec: import("../../_/codec.js").Codec;
|
|
367
618
|
export declare const RaizMessageCodec: import("../../_/codec.js").Codec;
|
|
368
619
|
export declare const RaizMessagePageCodec: import("../../_/codec.js").Codec;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
import { array, instant, object, union } from "../../_/index.js";
|
|
4
|
-
import { SignedUrlCodec } from "../../models.js";
|
|
5
|
-
import { RaizFactCodec } from "../models.js";
|
|
4
|
+
import { SignedUrlCodec, } from "../../models.js";
|
|
5
|
+
import { RaizFactCodec, } from "../models.js";
|
|
6
6
|
export const RaizConversationCodec = object([
|
|
7
7
|
["analyzedAt", null, instant],
|
|
8
8
|
["createdAt", null, instant],
|
|
@@ -20,6 +20,12 @@ export const RaizConversationCodec = object([
|
|
|
20
20
|
export const RaizConversationPageCodec = object([
|
|
21
21
|
["data", null, array(() => RaizConversationCodec)],
|
|
22
22
|
]);
|
|
23
|
+
export const RaizConversationPageResponseCodec = object([
|
|
24
|
+
["data", null, () => RaizConversationPageCodec],
|
|
25
|
+
]);
|
|
26
|
+
export const RaizConversationResponseCodec = object([
|
|
27
|
+
["data", null, () => RaizConversationCodec],
|
|
28
|
+
]);
|
|
23
29
|
export const RaizConversationWorkerCodec = union([object([["firstMessageAt", null, instant], ["lastMessageAt", null, instant]]), object([["firstMessageAt", null, instant], ["lastMessageAt", null, instant], ["members", null, array(object([["firstMessageAt", null, instant], ["lastMessageAt", null, instant]]))]])]);
|
|
24
30
|
export const RaizMessageCodec = object([
|
|
25
31
|
["createdAt", null, instant],
|