@vinaverse/server 0.1.0-alpha.1 → 0.1.0-alpha.11
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/LICENSE +202 -0
- package/README.md +8 -0
- package/dist/api.cjs +29 -0
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +31 -3
- package/dist/api.d.ts +31 -3
- package/dist/api.js +29 -0
- package/dist/api.js.map +1 -1
- package/dist/express.d.cts +2 -2
- package/dist/express.d.ts +2 -2
- package/dist/fastify.d.cts +2 -2
- package/dist/fastify.d.ts +2 -2
- package/dist/hono.d.cts +2 -2
- package/dist/hono.d.ts +2 -2
- package/dist/index.cjs +30 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/dist/lambda.d.cts +2 -2
- package/dist/lambda.d.ts +2 -2
- package/dist/{provider-Miaa9V7I.d.cts → provider-CLoSmI29.d.cts} +178 -1
- package/dist/{provider-BqfTvF3g.d.ts → provider-ClyzwMQx.d.ts} +178 -1
- package/dist/{vinaverse-v1.d-BVc4uyUd.d.cts → vinaverse-v1.d-DiulmRgx.d.cts} +516 -16
- package/dist/{vinaverse-v1.d-BVc4uyUd.d.ts → vinaverse-v1.d-DiulmRgx.d.ts} +516 -16
- package/package.json +8 -8
|
@@ -15,11 +15,15 @@ interface paths {
|
|
|
15
15
|
put?: never;
|
|
16
16
|
/**
|
|
17
17
|
* Create an agent session for one subject
|
|
18
|
-
* @description A session belongs to a conversation when it names one (`conversation_key`, `conversation_id`, or both) or when its agent runs a guided flow; a flow session that names none starts a new conversation. `Session` then returns its `conversation_id`, and a conversation started without a key can later be resumed by that id. A conversation is scoped to the tenant, the environment, the `subject.id` and the `agent
|
|
18
|
+
* @description A session belongs to a conversation when it names one (`conversation_key`, `conversation_id`, or both) or when its agent runs a guided flow; a flow session that names none starts a new conversation. `Session` then returns its `conversation_id`, and a conversation started without a key can later be resumed by that id. A conversation is scoped to the tenant, the environment, the `subject.id` and the `agent`, and (v1-draft.20) the mode and business scope it started with; `subject.type` itself is not part of it, so a guest who signs in keeps the conversation.
|
|
19
19
|
* **`business_setup`.** The `business_setup` capability is only for a business's own people: a `subject.type` of `professional`, `host` or `staff`. Asked for any other subject, it is `400 invalid_request` with the pointer `/tool_access/capabilities`.
|
|
20
20
|
* **`booking_proposals`.** The `booking_proposals` capability is only for a `client`: not a guest, who has no account in the tenant's app to confirm with. Asked for any other subject, it is `400 invalid_request` with the pointer `/tool_access/capabilities`.
|
|
21
|
+
* **Audience** (v1-draft.20). An agent talks only to the subject types of its template (admin-v1 `AgentProfile.audience`): the customer agent to a `client` or `guest`, a business agent to a `professional`, `host` or `staff`, a guided flow to anyone its tenant names. Any other `subject.type` is `400 invalid_request` with the pointer `/subject/type`. The tenant's backend sets the type by the side of its app the person is on, never by the account's roles: a professional booking for themselves is a `client`.
|
|
22
|
+
* **Mode and business scope** (v1-draft.20). `experience_mode` is the agent's side: `customer` for the customer agent, `business` for a business agent. Left out, it follows the agent's template; given, it must match it (`400 invalid_request`, `/experience_mode`). `business_scope_id` names the business the person acts for (a professional's business, a host's place): only with `business` (`400`, `/business_scope_id`), and the tenant's backend derives it from its own records, never from the app. A conversation is bound, when it starts, to the subject, the agent, the mode and the business scope. The mode stands for the side of the app, so a guest who signs in as a client keeps their conversation, while a professional never resumes a customer conversation (the audience rule keeps each side's types apart). Resuming with any of them different is `404 not_found` (step 1 below), never a switch: a person acting for business A never resumes business B's conversation.
|
|
21
23
|
* **The checks, in this order:** 1. `conversation_id` is given, and is unknown, erased, or belongs to another tenant, environment, `agent` or
|
|
22
|
-
* `subject.id`: `404
|
|
24
|
+
* `subject.id`, or (v1-draft.20) was started with another `experience_mode` or `business_scope_id`: `404
|
|
25
|
+
* not_found`. A `conversation_key` names a conversation within the same binding,
|
|
26
|
+
* so the same key under another binding names another conversation.
|
|
23
27
|
* 2. Both are given, and the key names a different conversation, or none: `409 conversation_mismatch`. 3. The conversation expired: `410 conversation_expired`. With `conversation_key` alone, an expired
|
|
24
28
|
* conversation instead lets a new one start under the key; the id never starts one silently.
|
|
25
29
|
* 4. The conversation is completed (its flow was accepted): `409 conversation_completed`. This holds by key too,
|
|
@@ -69,6 +73,30 @@ interface paths {
|
|
|
69
73
|
patch?: never;
|
|
70
74
|
trace?: never;
|
|
71
75
|
};
|
|
76
|
+
"/v1/conversations": {
|
|
77
|
+
parameters: {
|
|
78
|
+
query?: never;
|
|
79
|
+
header?: never;
|
|
80
|
+
path?: never;
|
|
81
|
+
cookie?: never;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* A person's past conversations with one agent, newest activity first
|
|
85
|
+
* @description v1-draft.21 (VIN-246): the conversations a history screen lists, for one subject and one agent, on one side of the app (`experience_mode`, and for a business `business_scope_id`, as the conversation was bound when it started). Newest activity first; ties by `id`.
|
|
86
|
+
* **Access.** A service key only, never a client secret: the app asks the tenant's backend, which checks the person and calls this. The key needs `conversations:read` (a key without scopes has every scope) and sees its own tenant and environment only.
|
|
87
|
+
* **What is listed.** Only what the tenant's `transcript_retention` still keeps: a conversation past it, a deleted one (`deleteConversation`) or an erased subject's is never listed, nor one where nothing was said (a session opened and left). A subject Vinaverse holds nothing for gets an empty page, the same as one with no conversations, so the answer never says whether a subject exists.
|
|
88
|
+
* **The title** is deterministic and never the person's words: from the conversation's last search intent (`title_source: intent`, for example "Haircut · Los Angeles", in the subject's locale), else the date it started (`title_source: date`). There is no preview of the messages.
|
|
89
|
+
* **Paging.** `next_cursor` is opaque and signed. It is bound to the filters, the key's tenant and environment, and expires after 24 hours: a cursor changed, used with other filters or expired is `400 invalid_request` at `/cursor`, and the caller starts again without it. An outage is `503 unavailable` (retryable), never an empty page: the app does not take it as "no conversations".
|
|
90
|
+
*/
|
|
91
|
+
get: operations["listConversations"];
|
|
92
|
+
put?: never;
|
|
93
|
+
post?: never;
|
|
94
|
+
delete?: never;
|
|
95
|
+
options?: never;
|
|
96
|
+
head?: never;
|
|
97
|
+
patch?: never;
|
|
98
|
+
trace?: never;
|
|
99
|
+
};
|
|
72
100
|
"/v1/conversations/{conversation_id}": {
|
|
73
101
|
parameters: {
|
|
74
102
|
query?: never;
|
|
@@ -91,6 +119,42 @@ interface paths {
|
|
|
91
119
|
get: operations["getConversation"];
|
|
92
120
|
put?: never;
|
|
93
121
|
post?: never;
|
|
122
|
+
/**
|
|
123
|
+
* Delete one of a person's conversations, everywhere
|
|
124
|
+
* @description v1-draft.21 (VIN-246): the person deletes a conversation from their history, through the tenant's backend. A service key with `conversations:write`, for its own tenant and environment; `subject_id` must be the conversation's subject.
|
|
125
|
+
* **What it does, before it answers.** - Ends the conversation's open sessions: their sockets get `session.closed` with `reason: deleted` and
|
|
126
|
+
* close with `4403` (a client that does not know `deleted` reads it as `revoked`). Their status ends as
|
|
127
|
+
* `deleted`.
|
|
128
|
+
* - Blanks every copy of the conversation's messages, cards, screening texts and state (and the guided flow's
|
|
129
|
+
* answers), across both sides of the app, and leaves no title or count behind.
|
|
130
|
+
* - Fences late writes: a turn still running, a webhook retry or a worker job that finishes after the delete
|
|
131
|
+
* records nothing for it (a deletion barrier, kept as long as the longest session could run).
|
|
132
|
+
* - Frees its `conversation_key`: a session with the same key afterwards starts a new conversation.
|
|
133
|
+
* **Answers.** `200` with the number of sessions revoked. An unknown id, another tenant's, environment's or subject's, one bound to another `agent`, side or business than the call names (v1-draft.24), or one already deleted or erased: `404 not_found`, the same answer for each, so it never says whether the conversation exists. Deleting is not erasing the subject (`eraseSubject`): the person's other conversations and memory stay.
|
|
134
|
+
*/
|
|
135
|
+
delete: operations["deleteConversation"];
|
|
136
|
+
options?: never;
|
|
137
|
+
head?: never;
|
|
138
|
+
patch?: never;
|
|
139
|
+
trace?: never;
|
|
140
|
+
};
|
|
141
|
+
"/v1/conversations/{conversation_id}/messages": {
|
|
142
|
+
parameters: {
|
|
143
|
+
query?: never;
|
|
144
|
+
header?: never;
|
|
145
|
+
path?: never;
|
|
146
|
+
cookie?: never;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* One past conversation, as one ordered timeline of messages and cards
|
|
150
|
+
* @description v1-draft.21 (VIN-246): what a history screen draws when the person opens a past conversation. A service key with `conversations:read`, for its own tenant and environment; `subject_id` must be the conversation's subject.
|
|
151
|
+
* **The timeline.** One list of messages and the cards their turns drew, in the order they happened, each with an `id` that is stable and unique within the conversation. The first page is the newest; within a page, oldest first; `next_cursor` pages toward older items. A message carries `event_id`, the identifier its live event gave it (as `TranscriptItem.id`: an `assistant` message's `turn_id`, a `person` message's `client_event_id`, a `staff` message's `message_id`), so an app merges what it drew live, or a resumed `session.ready.transcript`, into the fetched history by `role` and `event_id` instead of replacing either. An input the runtime never recorded is not in it, as in the transcript.
|
|
152
|
+
* **Cards from history are read-only.** An app draws their actions disabled: a past slot, price or availability is not checked again, so a tap would act on stale data. The person asks again in the conversation, and a fresh turn draws fresh cards.
|
|
153
|
+
* **What is kept.** Only what the tenant's `transcript_retention` still keeps; a conversation past it is `410 conversation_expired`. An unknown id, another tenant's, environment's or subject's, or a deleted or erased one, or one bound to another `agent`, side or business than the call names (v1-draft.24): `404 not_found`, the same answer for each. A cursor changed, used for another conversation or expired (24 hours) is `400 invalid_request` at `/cursor`. An outage is `503 unavailable`, never an empty timeline.
|
|
154
|
+
*/
|
|
155
|
+
get: operations["listConversationMessages"];
|
|
156
|
+
put?: never;
|
|
157
|
+
post?: never;
|
|
94
158
|
delete?: never;
|
|
95
159
|
options?: never;
|
|
96
160
|
head?: never;
|
|
@@ -113,6 +177,28 @@ interface paths {
|
|
|
113
177
|
patch?: never;
|
|
114
178
|
trace?: never;
|
|
115
179
|
};
|
|
180
|
+
"/v1/sessions/{session_id}/context": {
|
|
181
|
+
parameters: {
|
|
182
|
+
query?: never;
|
|
183
|
+
header?: never;
|
|
184
|
+
path?: never;
|
|
185
|
+
cookie?: never;
|
|
186
|
+
};
|
|
187
|
+
get?: never;
|
|
188
|
+
/**
|
|
189
|
+
* Tell an open session where the person is now
|
|
190
|
+
* @description v1-draft.23 (VIN-115): the person moved to another screen while the chat is open; the tenant's backend, which checked that they may see what is on it, says so, and the session keeps going (no new session per navigation). A service key with `sessions:write`, for the session's own tenant and environment: another tenant's or an unknown session is `404 not_found`, an ended one `409 session_closed`.
|
|
191
|
+
* **The body** is a `ScreenContext` (the same type and rules as on `createSession`: a fixed vocabulary, typed filters, never page text, and it grants nothing), or `{clear: true, revision}` when the person left any screen that says something (the agent then has no screen context). Either way `revision` must be greater than the session's: the tenant's own counter for this person's screen, so a late update never overwrites a newer one. An older or equal revision is `409 context_stale` with `current_revision`, except the same revision with the same body, which is a retry and answered `200` as the first time.
|
|
192
|
+
* **What follows.** The session's open socket gets `context.updated` (the revision, and `cleared: true` after a clear). A turn already running keeps the context it started with; the next turn reads the new one, as data in the turn's details, never in the cached prompt.
|
|
193
|
+
*/
|
|
194
|
+
put: operations["updateSessionContext"];
|
|
195
|
+
post?: never;
|
|
196
|
+
delete?: never;
|
|
197
|
+
options?: never;
|
|
198
|
+
head?: never;
|
|
199
|
+
patch?: never;
|
|
200
|
+
trace?: never;
|
|
201
|
+
};
|
|
116
202
|
"/v1/sessions/{session_id}/revoke": {
|
|
117
203
|
parameters: {
|
|
118
204
|
query?: never;
|
|
@@ -140,7 +226,7 @@ interface paths {
|
|
|
140
226
|
put?: never;
|
|
141
227
|
/**
|
|
142
228
|
* A fresh client secret for an open session
|
|
143
|
-
* @description A service key with the `sessions:write` scope gets a new connect secret for an open session, for an app that missed the connect window or connects from another device (whose connection then replaces the open one, with close code 4409). The previous secret no longer authenticates a new connection or an SSE turn. A socket already open stays open and keeps its session: refreshing never drops the person's live connection. To cut it off, revoke the session (`revokeSession`). An ended session is `409 session_closed`.
|
|
229
|
+
* @description A service key with the `sessions:write` scope gets a new connect secret for an open session, for an app that missed the connect window or connects from another device (whose connection then replaces the open one, with close code 4409). The previous secret no longer authenticates a new connection or an SSE turn. A socket already open stays open and keeps its session: refreshing never drops the person's live connection. To cut it off, revoke the session (`revokeSession`). An ended session is `409 session_closed`. With an optional `Idempotency-Key` (declared in v1-draft.22), a retry within 24 hours answers the secret first issued for that key instead of a newer one.
|
|
144
230
|
*/
|
|
145
231
|
post: operations["refreshClientSecret"];
|
|
146
232
|
delete?: never;
|
|
@@ -158,7 +244,10 @@ interface paths {
|
|
|
158
244
|
};
|
|
159
245
|
get?: never;
|
|
160
246
|
put?: never;
|
|
161
|
-
/**
|
|
247
|
+
/**
|
|
248
|
+
* Run one turn and stream its events as SSE (alternative to the WebSocket)
|
|
249
|
+
* @description Browsers and WebViews (v1-draft.18): the preflight (`OPTIONS`) is answered for the tenant's client origins of the session's environment only (admin-v1 `ClientOrigins.effective`), with `Access-Control-Allow-Origin` the request's origin (never `*`), `Vary: Origin`, `Access-Control-Allow-Methods: POST`, `Access-Control-Allow-Headers: Authorization, Content-Type` and `Access-Control-Max-Age: 600`; no credentials mode is needed (the client secret is a header). Any other origin, or a session that does not exist, gets no CORS headers. A request whose `Origin` is not one of them is refused with `403` `forbidden` and runs nothing; a request with no `Origin` (a native app, a server) is not checked.
|
|
250
|
+
*/
|
|
162
251
|
post: operations["createTurnSse"];
|
|
163
252
|
delete?: never;
|
|
164
253
|
options?: never;
|
|
@@ -175,7 +264,10 @@ interface paths {
|
|
|
175
264
|
};
|
|
176
265
|
get?: never;
|
|
177
266
|
put?: never;
|
|
178
|
-
/**
|
|
267
|
+
/**
|
|
268
|
+
* Send a card action and stream the resulting turn as SSE
|
|
269
|
+
* @description Browsers and WebViews (v1-draft.18), as for `createTurnSse`: the preflight (`OPTIONS`) is answered for the tenant's client origins of the session's environment only (admin-v1 `ClientOrigins.effective`), with `Access-Control-Allow-Origin` the request's origin (never `*`), `Vary: Origin`, `Access-Control-Allow-Methods: POST`, `Access-Control-Allow-Headers: Authorization, Content-Type` and `Access-Control-Max-Age: 600`; no credentials mode is needed (the client secret is a header). Any other origin, or a session that does not exist, gets no CORS headers. A request whose `Origin` is not one of them is refused with `403` `forbidden` and runs nothing; a request with no `Origin` (a native app, a server) is not checked.
|
|
270
|
+
*/
|
|
179
271
|
post: operations["createCardActionSse"];
|
|
180
272
|
delete?: never;
|
|
181
273
|
options?: never;
|
|
@@ -231,6 +323,26 @@ interface paths {
|
|
|
231
323
|
patch?: never;
|
|
232
324
|
trace?: never;
|
|
233
325
|
};
|
|
326
|
+
"/v1/media/avatars/{avatar_file}": {
|
|
327
|
+
parameters: {
|
|
328
|
+
query?: never;
|
|
329
|
+
header?: never;
|
|
330
|
+
path?: never;
|
|
331
|
+
cookie?: never;
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* An agent's avatar image (v1-draft.19), as `Session.agent.avatar_url` names it
|
|
335
|
+
* @description Public: no credential, since an app draws it in an image view. Only an avatar that passed the screen is served, and only while it is an agent's current or previous avatar of the last 30 days; anything else is `404`. The bytes never change under a name (`Cache-Control: public, max-age=31536000, immutable`), and the response is `image/webp` with `X-Content-Type-Options: nosniff` and a sandboxing `Content-Security-Policy`.
|
|
336
|
+
*/
|
|
337
|
+
get: operations["getAgentAvatarImage"];
|
|
338
|
+
put?: never;
|
|
339
|
+
post?: never;
|
|
340
|
+
delete?: never;
|
|
341
|
+
options?: never;
|
|
342
|
+
head?: never;
|
|
343
|
+
patch?: never;
|
|
344
|
+
trace?: never;
|
|
345
|
+
};
|
|
234
346
|
"/v1/media/jobs": {
|
|
235
347
|
parameters: {
|
|
236
348
|
query?: never;
|
|
@@ -1183,10 +1295,12 @@ interface components {
|
|
|
1183
1295
|
title: string;
|
|
1184
1296
|
status: number;
|
|
1185
1297
|
/** @enum {string} */
|
|
1186
|
-
code: "invalid_request" | "unauthenticated" | "forbidden" | "feature_unavailable" | "not_found" | "idempotency_conflict" | "session_closed" | "payload_too_large" | "unprocessable_media" | "rate_limited" | "internal" | "unavailable" | "conversation_mismatch" | "conversation_expired" | "conversation_completed";
|
|
1298
|
+
code: "invalid_request" | "unauthenticated" | "forbidden" | "feature_unavailable" | "not_found" | "idempotency_conflict" | "session_closed" | "payload_too_large" | "unprocessable_media" | "rate_limited" | "internal" | "unavailable" | "conversation_mismatch" | "conversation_expired" | "conversation_completed" | "context_stale";
|
|
1187
1299
|
detail?: string;
|
|
1188
1300
|
request_id: string;
|
|
1189
1301
|
retryable: boolean;
|
|
1302
|
+
/** @description v1-draft.23, with `context_stale` only, the session's screen-context revision now */
|
|
1303
|
+
current_revision?: number;
|
|
1190
1304
|
/** @description field-level problems for invalid_request */
|
|
1191
1305
|
errors?: {
|
|
1192
1306
|
/** @description JSON Pointer into the request */
|
|
@@ -1349,6 +1463,67 @@ interface components {
|
|
|
1349
1463
|
conversation_key?: string;
|
|
1350
1464
|
/** @description Optional. Resumes the conversation with this id (`Session.conversation_id`, `ConversationState`), as an alternative to `conversation_key` or together with it; `createSession` describes resuming and the order of its checks. */
|
|
1351
1465
|
conversation_id?: components["schemas"]["ConversationId"];
|
|
1466
|
+
experience_mode?: components["schemas"]["ExperienceMode"];
|
|
1467
|
+
business_scope_id?: components["schemas"]["BusinessScopeId"];
|
|
1468
|
+
screen_context?: components["schemas"]["ScreenContext"];
|
|
1469
|
+
};
|
|
1470
|
+
/**
|
|
1471
|
+
* @description v1-draft.20, optional on `createSession`: the side of the tenant's app the person is on. `customer` for the customer agent (a `client` or `guest`), `business` for a business agent (a `professional`, `host` or `staff`). Left out, it follows the agent's template; `createSession` describes the binding.
|
|
1472
|
+
* @enum {string}
|
|
1473
|
+
*/
|
|
1474
|
+
ExperienceMode: "customer" | "business";
|
|
1475
|
+
/** @description v1-draft.20, optional, with `experience_mode: business` only: the business the person acts for, as the tenant's backend knows it (a professional's business, a host's place). Opaque to Vinaverse; it binds the conversation, so a person acting for two businesses keeps two conversations. It never reaches a model prompt. */
|
|
1476
|
+
BusinessScopeId: string;
|
|
1477
|
+
/** @description v1-draft.20, optional on `createSession`: where the person is in the tenant's app when the session opens, as the tenant's backend vouches for it (it checked that the person may see the entity). It grants nothing: no tool, capability or record. The agent reads it as data in its working notes (never in the cached system prompt, never as something the person said), as a hint: before it states anything about the entity it reads it with a tool, and a tool that refuses means the agent says it cannot see it. A screen change while the chat is open does not open a new session: the tenant's backend sends it with `updateSessionContext` (v1-draft.23). Never arbitrary page text, URLs, names, amounts or instructions: only these fields, from this vocabulary. */
|
|
1478
|
+
ScreenContext: {
|
|
1479
|
+
/**
|
|
1480
|
+
* @description A coarse screen from a fixed vocabulary; the tenant maps its own screens onto it. `other` when none fits. Customer side: `home`, `explore`, `search_results`, `professional`, `workspace`, `service`, `class`, `checkout`, `booking`, `bookings`, `inbox`, `profile`. Business side: `business_hub`, `setup`, `services`, `hours`, `location`, `gallery`, `spaces`, `space_manage`, `renters`, `payouts`, `plans`, `team`.
|
|
1481
|
+
* @enum {string}
|
|
1482
|
+
*/
|
|
1483
|
+
screen: "home" | "explore" | "search_results" | "professional" | "workspace" | "service" | "class" | "checkout" | "booking" | "bookings" | "inbox" | "profile" | "business_hub" | "setup" | "services" | "hours" | "location" | "gallery" | "spaces" | "space_manage" | "renters" | "payouts" | "plans" | "team" | "other";
|
|
1484
|
+
/** @description the object on the screen, as the tenant's read tools name it; `id` is a tool id (letters, digits and `_`, `.`, `:`, `-`), since it reaches the agent's working notes */
|
|
1485
|
+
entity?: {
|
|
1486
|
+
/** @enum {string} */
|
|
1487
|
+
type: "professional" | "workspace" | "service" | "class" | "booking" | "location";
|
|
1488
|
+
id: string;
|
|
1489
|
+
};
|
|
1490
|
+
/** @description the filters the screen shows, typed; free text never */
|
|
1491
|
+
filters?: {
|
|
1492
|
+
service_ids?: string[];
|
|
1493
|
+
category_ids?: string[];
|
|
1494
|
+
area_id?: string;
|
|
1495
|
+
/** Format: date */
|
|
1496
|
+
date_from?: string;
|
|
1497
|
+
/** Format: date */
|
|
1498
|
+
date_to?: string;
|
|
1499
|
+
price_max?: components["schemas"]["Money"];
|
|
1500
|
+
};
|
|
1501
|
+
/** @description the tenant's counter for this person's screen state; a later update never goes back to a lower one (v1-draft.23: `updateSessionContext` refuses one that is not greater) */
|
|
1502
|
+
revision: number;
|
|
1503
|
+
};
|
|
1504
|
+
/** @description v1-draft.23: what `updateSessionContext` takes: the person's screen now (`ScreenContext`), or an explicit clear. Both carry the tenant's `revision`, which must be greater than the session's. */
|
|
1505
|
+
SessionContextUpdate: components["schemas"]["ScreenContext"] | {
|
|
1506
|
+
/** @constant */
|
|
1507
|
+
clear: true;
|
|
1508
|
+
revision: number;
|
|
1509
|
+
};
|
|
1510
|
+
/** @description v1-draft.23, the session's screen context after an update; no `screen_context` after a clear */
|
|
1511
|
+
SessionContextState: {
|
|
1512
|
+
revision: number;
|
|
1513
|
+
screen_context?: components["schemas"]["ScreenContext"];
|
|
1514
|
+
};
|
|
1515
|
+
/** @description v1-draft.20: a tap target the app draws under the welcome. Tapping it sends `message` as the person's own text (an `input.text`, or `createTurnSse`), exactly as if they typed it; it starts nothing else. */
|
|
1516
|
+
Chip: {
|
|
1517
|
+
/** @description in Unicode code points */
|
|
1518
|
+
label: string;
|
|
1519
|
+
/** @description in Unicode code points */
|
|
1520
|
+
message: string;
|
|
1521
|
+
};
|
|
1522
|
+
/** @description v1-draft.20: the tenant's greeting for the session's mode, with the chips of the session's screen when its manifest has some for it (else the mode's own), from the connector manifest (admin-v1 `Connector.welcome`), checked when the manifest loads. The app shows it the moment the session is ready: it costs no model call and is not a turn. The agent knows it was shown and does not greet again. */
|
|
1523
|
+
Welcome: {
|
|
1524
|
+
/** @description in Unicode code points */
|
|
1525
|
+
text: string;
|
|
1526
|
+
chips: components["schemas"]["Chip"][];
|
|
1352
1527
|
};
|
|
1353
1528
|
ClientSecret: {
|
|
1354
1529
|
/** @description `vv_cs_` and base64url characters, so the secret is a valid WebSocket subprotocol token in `bearer.<secret>`. */
|
|
@@ -1367,6 +1542,11 @@ interface components {
|
|
|
1367
1542
|
id: string;
|
|
1368
1543
|
version: string;
|
|
1369
1544
|
display_name: string;
|
|
1545
|
+
/**
|
|
1546
|
+
* Format: uri
|
|
1547
|
+
* @description v1-draft.19, optional: the agent's avatar (`getAgentAvatarImage`), a square 512 px WebP with no metadata, re-encoded by Vinaverse from the tenant's upload and passed by its image screen. The URL is immutable (it changes when the image does), so an app may cache the image for as long as it likes; it needs no credential. Absent: no avatar yet, so draw the name's monogram.
|
|
1548
|
+
*/
|
|
1549
|
+
avatar_url?: string;
|
|
1370
1550
|
};
|
|
1371
1551
|
client_secret: components["schemas"]["ClientSecret"];
|
|
1372
1552
|
/** Format: uri */
|
|
@@ -1381,6 +1561,14 @@ interface components {
|
|
|
1381
1561
|
disclosure: string;
|
|
1382
1562
|
/** @description The conversation this session belongs to, the same for every session of it, however it was resumed (by `conversation_key` or `conversation_id`). Present whenever the session belongs to a conversation: when the request named one, and for every guided-flow session. It is absent only for a session with no conversation, and optional in the schema so clients built on earlier drafts keep working. */
|
|
1383
1563
|
conversation_id?: components["schemas"]["ConversationId"];
|
|
1564
|
+
/** @description v1-draft.20, the session's mode, as given or as the agent's template sets it */
|
|
1565
|
+
experience_mode?: components["schemas"]["ExperienceMode"];
|
|
1566
|
+
/** @description v1-draft.20, present when the session acts for a business */
|
|
1567
|
+
business_scope_id?: components["schemas"]["BusinessScopeId"];
|
|
1568
|
+
/** @description v1-draft.20, the screen context the session accepted, when `createSession` gave one */
|
|
1569
|
+
screen_context?: components["schemas"]["ScreenContext"];
|
|
1570
|
+
/** @description v1-draft.20, absent when the tenant's manifest has no welcome for the session's mode */
|
|
1571
|
+
welcome?: components["schemas"]["Welcome"];
|
|
1384
1572
|
};
|
|
1385
1573
|
SessionStatus: {
|
|
1386
1574
|
id: string;
|
|
@@ -1391,10 +1579,10 @@ interface components {
|
|
|
1391
1579
|
turns: number;
|
|
1392
1580
|
handoff_ticket_ids?: string[];
|
|
1393
1581
|
/**
|
|
1394
|
-
* @description Why the session ended. `server_restart` is reserved and never appears here: it never ends a session (`docs/realtime-protocol.md` §2).
|
|
1582
|
+
* @description Why the session ended. `server_restart` is reserved and never appears here: it never ends a session (`docs/realtime-protocol.md` §2). `deleted` (v1-draft.21): its conversation was deleted from history.
|
|
1395
1583
|
* @enum {string}
|
|
1396
1584
|
*/
|
|
1397
|
-
end_reason?: "expired" | "revoked" | "limit_reached" | "idle" | "server_restart" | "user_left";
|
|
1585
|
+
end_reason?: "expired" | "revoked" | "limit_reached" | "idle" | "server_restart" | "user_left" | "deleted";
|
|
1398
1586
|
/** Format: date-time */
|
|
1399
1587
|
created_at: string;
|
|
1400
1588
|
/** Format: date-time */
|
|
@@ -1443,6 +1631,35 @@ interface components {
|
|
|
1443
1631
|
label: string;
|
|
1444
1632
|
deep_link?: string;
|
|
1445
1633
|
};
|
|
1634
|
+
/** @description v1-draft.20: one photo of a `professional` or `workspace` card. Https only, from a prefix the tenant registered (admin-v1 `Connector.image_url_prefixes`), compared after the URL is parsed and normalized (no user info, backslash, fragment or dot segment): an image that fails is dropped, never the card. The tenant serves only photos its own moderation approved, at URLs that stay valid as long as the transcript (a card in history draws them again). An image that fails to load draws the name's monogram; the card stays. */
|
|
1635
|
+
CardImage: {
|
|
1636
|
+
/** Format: uri */
|
|
1637
|
+
url: string;
|
|
1638
|
+
width?: number;
|
|
1639
|
+
height?: number;
|
|
1640
|
+
};
|
|
1641
|
+
/** @description v1-draft.20: the cards one turn draws together carry the same `id`. `layout` is a hint: `carousel` draws them in one horizontal row, `list` one under another. A client that does not know `group`, or a `layout` value, draws a list, as before. */
|
|
1642
|
+
CardGroup: {
|
|
1643
|
+
id: string;
|
|
1644
|
+
/** @enum {string} */
|
|
1645
|
+
layout: "list" | "carousel";
|
|
1646
|
+
};
|
|
1647
|
+
/** @description v1-draft.20, one link of a `links` card: one of the tenant's own destinations from its connector manifest (admin-v1 `Connector.help_links`), never a link the model wrote. */
|
|
1648
|
+
CardLink: {
|
|
1649
|
+
/** @description in Unicode code points */
|
|
1650
|
+
label: string;
|
|
1651
|
+
/** @description an https page of the tenant's, or a deep link that passes the deep-link rule (`next_step`) */
|
|
1652
|
+
url: string;
|
|
1653
|
+
/** @enum {string} */
|
|
1654
|
+
purpose: "help" | "support" | "policy" | "contact" | "feedback";
|
|
1655
|
+
};
|
|
1656
|
+
/** @description v1-draft.20, on a `links` card: the tenant's scope policy, at the version in force, that kept the agent from answering, and why. */
|
|
1657
|
+
ScopeProvenance: {
|
|
1658
|
+
policy_id: string;
|
|
1659
|
+
version: string;
|
|
1660
|
+
/** @enum {string} */
|
|
1661
|
+
reason: "off_scope" | "competitor" | "blocked_topic";
|
|
1662
|
+
};
|
|
1446
1663
|
/**
|
|
1447
1664
|
* @description `ref` is present on every customer-agent card (professional … handoff); copilot cards (metric_chart … document) may omit it, since a metric, cluster or claim is not a tenant object. A `question` card (guided flows) carries `question`, has no `actions` (the person answers with `ui.answer`), uses `title` as a short label for the question, and its `source` names the tool call that fetched the flow's definition.
|
|
1448
1665
|
* A `next_step` card is a step the person finishes on the tenant's own screen (payouts, a plan purchase, photos). It has a `title` (at most 80 code points), a `body` (at most 300) and exactly one action: `action: open`, with a `label` (at most 40) and a `deep_link`. It may omit `ref`, and its `source` names the tool call the step came from. - **Nothing is written.** Tapping the action opens `deep_link` in the tenant's app. The app sends no
|
|
@@ -1462,14 +1679,17 @@ interface components {
|
|
|
1462
1679
|
* know.
|
|
1463
1680
|
* - **It is not restored.** A `next_step` card is in neither `pending_cards` nor `transcript`; after a
|
|
1464
1681
|
* reconnect the agent shows the step again once it reads the tenant's state.
|
|
1682
|
+
*
|
|
1683
|
+
* **Listing cards** (v1-draft.20). A `professional` or `workspace` card may carry `images` (up to five, the first the hero; `image_url`, when present, is the first one's URL, for clients that predate `images`), `next_available` (the earliest open time the tenant's tool returned; a hint, so a tap on its time reads availability again), `price_from` and a `group`. An app draws one hero image first and the rest on a swipe.
|
|
1684
|
+
* **A `links` card** (v1-draft.20) answers what the tenant's scope keeps the agent from answering: a question off its scope, a comparison with a competitor, a blocked topic. Its `links` are the tenant's own help, support, policy, contact or feedback destinations (`CardLink`), its `provenance` names the scope policy and the reason, and it has no `actions`: each link opens the tenant's page. It belongs to a recorded turn, with the agent's one line around it, never to `input.rejected`. Its `source.tool` is `scope` and its `source.call_id` the turn's id: no tool call made it. An earlier client skips the unknown kind, as it skips any.
|
|
1465
1685
|
*/
|
|
1466
1686
|
Card: {
|
|
1467
1687
|
id: string;
|
|
1468
1688
|
/**
|
|
1469
|
-
* @description customer-agent kinds, then business-copilot kinds (Studio), then `question` (guided flows), then `proposal` (a change the person confirms or declines in the tenant's app), then `next_step` (a step the person finishes on the tenant's own screen)
|
|
1689
|
+
* @description customer-agent kinds, then business-copilot kinds (Studio), then `question` (guided flows), then `proposal` (a change the person confirms or declines in the tenant's app), then `next_step` (a step the person finishes on the tenant's own screen), then `links` (v1-draft.20: the tenant's own pages, when its scope keeps the agent from answering)
|
|
1470
1690
|
* @enum {string}
|
|
1471
1691
|
*/
|
|
1472
|
-
kind: "professional" | "workspace" | "service" | "time_slots" | "booking" | "quote" | "policy" | "handoff" | "metric_chart" | "metric_table" | "gap_list" | "cluster" | "claim" | "document" | "question" | "proposal" | "next_step";
|
|
1692
|
+
kind: "professional" | "workspace" | "service" | "time_slots" | "booking" | "quote" | "policy" | "handoff" | "metric_chart" | "metric_table" | "gap_list" | "cluster" | "claim" | "document" | "question" | "proposal" | "next_step" | "links";
|
|
1473
1693
|
question?: components["schemas"]["Question"];
|
|
1474
1694
|
proposal?: components["schemas"]["Proposal"];
|
|
1475
1695
|
ref?: components["schemas"]["CardRef"];
|
|
@@ -1477,6 +1697,17 @@ interface components {
|
|
|
1477
1697
|
subtitle?: string;
|
|
1478
1698
|
/** Format: uri */
|
|
1479
1699
|
image_url?: string;
|
|
1700
|
+
/** @description v1-draft.20, a `professional` or `workspace` card's photos, the first the hero */
|
|
1701
|
+
images?: components["schemas"]["CardImage"][];
|
|
1702
|
+
/**
|
|
1703
|
+
* Format: date-time
|
|
1704
|
+
* @description v1-draft.20, a `professional` or `workspace` card's earliest open time, as the tenant's tool returned it
|
|
1705
|
+
*/
|
|
1706
|
+
next_available?: string;
|
|
1707
|
+
group?: components["schemas"]["CardGroup"];
|
|
1708
|
+
/** @description v1-draft.20, a `links` card's links */
|
|
1709
|
+
links?: components["schemas"]["CardLink"][];
|
|
1710
|
+
provenance?: components["schemas"]["ScopeProvenance"];
|
|
1480
1711
|
rating?: {
|
|
1481
1712
|
value_ppm: number;
|
|
1482
1713
|
count: number;
|
|
@@ -1520,7 +1751,7 @@ interface components {
|
|
|
1520
1751
|
points: {
|
|
1521
1752
|
/** Format: date */
|
|
1522
1753
|
t: string;
|
|
1523
|
-
/** @description null when suppressed by the k-anonymity floor */
|
|
1754
|
+
/** @description null when suppressed by the k-anonymity floor; on a metric without k_floor, nothing to measure */
|
|
1524
1755
|
value: number | null;
|
|
1525
1756
|
suppressed?: boolean;
|
|
1526
1757
|
}[];
|
|
@@ -1538,6 +1769,7 @@ interface components {
|
|
|
1538
1769
|
dims: {
|
|
1539
1770
|
[key: string]: string;
|
|
1540
1771
|
};
|
|
1772
|
+
/** @description null when suppressed by the metric's k_floor; on a metric without k_floor, nothing to measure */
|
|
1541
1773
|
values: {
|
|
1542
1774
|
[key: string]: number | null;
|
|
1543
1775
|
};
|
|
@@ -1582,7 +1814,7 @@ interface components {
|
|
|
1582
1814
|
snippet?: string;
|
|
1583
1815
|
/** Format: date-time */
|
|
1584
1816
|
updated_at?: string;
|
|
1585
|
-
} & (unknown & unknown & unknown);
|
|
1817
|
+
} & (unknown & unknown & unknown & unknown);
|
|
1586
1818
|
/** @enum {string} */
|
|
1587
1819
|
ValueUnit: "count" | "ppm" | "micros_usd" | "ms";
|
|
1588
1820
|
MetricRef: {
|
|
@@ -1590,6 +1822,7 @@ interface components {
|
|
|
1590
1822
|
label: string;
|
|
1591
1823
|
unit: components["schemas"]["ValueUnit"];
|
|
1592
1824
|
definition: string;
|
|
1825
|
+
/** @description The privacy floor: a value built from fewer than this many distinct people is suppressed (`null`). Absent when no floor applies, as on a business's own operational data (Studio's pages, read by the business copilot); a `null` value there means there was nothing to measure, never a hidden count. */
|
|
1593
1826
|
k_floor?: number;
|
|
1594
1827
|
};
|
|
1595
1828
|
/** @description Links a span of the reply text to the card or tool call it came from. Offsets are in Unicode code points (not bytes, not UTF-16 units), start inclusive, end exclusive. */
|
|
@@ -1822,6 +2055,83 @@ interface components {
|
|
|
1822
2055
|
/** Format: date-time */
|
|
1823
2056
|
at: string;
|
|
1824
2057
|
};
|
|
2058
|
+
ConversationPage: {
|
|
2059
|
+
data: components["schemas"]["ConversationSummary"][];
|
|
2060
|
+
next_cursor: string | null;
|
|
2061
|
+
};
|
|
2062
|
+
/** @description v1-draft.21: one past conversation as a history screen lists it. No message text: the title is from the conversation's last search intent or its date, never the person's words. */
|
|
2063
|
+
ConversationSummary: {
|
|
2064
|
+
id: components["schemas"]["ConversationId"];
|
|
2065
|
+
agent: string;
|
|
2066
|
+
experience_mode: components["schemas"]["ExperienceMode"];
|
|
2067
|
+
business_scope_id?: components["schemas"]["BusinessScopeId"];
|
|
2068
|
+
title: string;
|
|
2069
|
+
/**
|
|
2070
|
+
* @description `intent`: the last search intent (service and place); `date`: the day it started
|
|
2071
|
+
* @enum {string}
|
|
2072
|
+
*/
|
|
2073
|
+
title_source: "intent" | "date";
|
|
2074
|
+
/** Format: date-time */
|
|
2075
|
+
started_at: string;
|
|
2076
|
+
/** Format: date-time */
|
|
2077
|
+
last_activity_at: string;
|
|
2078
|
+
/** @description the messages its timeline holds (cards not counted) */
|
|
2079
|
+
message_count: number;
|
|
2080
|
+
/**
|
|
2081
|
+
* @description `open`: a session can resume it; `ended`: it can only be read
|
|
2082
|
+
* @enum {string}
|
|
2083
|
+
*/
|
|
2084
|
+
state: "open" | "ended";
|
|
2085
|
+
};
|
|
2086
|
+
TimelinePage: {
|
|
2087
|
+
data: components["schemas"]["TimelineItem"][];
|
|
2088
|
+
/** @description the next older page; null at the conversation's start */
|
|
2089
|
+
next_cursor: string | null;
|
|
2090
|
+
};
|
|
2091
|
+
/**
|
|
2092
|
+
* @description v1-draft.21: one item of a past conversation, a message or a card its turn drew. `id` is stable and unique within the conversation; a message's `event_id` is its live event's identifier (`TranscriptItem.id`), the key an app merges live and resumed messages by, with `role`. A card is read-only in history.
|
|
2093
|
+
* Unlike `session.ready.transcript`, the history holds a guardrail's refusals: the person's message a guardrail refused and the fixed line said instead of an answer both carry `refusal: true`, so the app draws them as it drew them live (muted, never offered again). A `proposal` card carries `proposal_outcome`, what became of it.
|
|
2094
|
+
*/
|
|
2095
|
+
TimelineItem: {
|
|
2096
|
+
/** @constant */
|
|
2097
|
+
type: "message";
|
|
2098
|
+
id: string;
|
|
2099
|
+
/**
|
|
2100
|
+
* @description a client tolerates a role it does not know, as in `TranscriptItem`
|
|
2101
|
+
* @enum {string}
|
|
2102
|
+
*/
|
|
2103
|
+
role: "person" | "assistant" | "staff";
|
|
2104
|
+
text: string;
|
|
2105
|
+
/** Format: date-time */
|
|
2106
|
+
at: string;
|
|
2107
|
+
/** @description absent on a `person` message sent without a `client_event_id` */
|
|
2108
|
+
event_id?: string;
|
|
2109
|
+
turn_id?: string;
|
|
2110
|
+
/** @description `assistant` only, present only when true: the reply stopped before it finished */
|
|
2111
|
+
interrupted?: boolean;
|
|
2112
|
+
/**
|
|
2113
|
+
* @description Present only when true: a guardrail refused this turn. On a `person` message, the text it refused (as recorded, card-like digits masked); on an `assistant` message, the fixed line said instead of an answer.
|
|
2114
|
+
* @constant
|
|
2115
|
+
*/
|
|
2116
|
+
refusal?: true;
|
|
2117
|
+
} | {
|
|
2118
|
+
/** @constant */
|
|
2119
|
+
type: "card";
|
|
2120
|
+
id: string;
|
|
2121
|
+
turn_id: string;
|
|
2122
|
+
/** Format: date-time */
|
|
2123
|
+
at: string;
|
|
2124
|
+
card: components["schemas"]["Card"];
|
|
2125
|
+
/**
|
|
2126
|
+
* @description A `proposal` card only, always present on one: the outcome the app reported for it (`ui.action` `confirmed`, `declined`, `failed` or `expired`), or `pending` while none was reported. Draw it as settled; a past proposal is never confirmed from history.
|
|
2127
|
+
* @enum {string}
|
|
2128
|
+
*/
|
|
2129
|
+
proposal_outcome?: "pending" | "confirmed" | "declined" | "failed" | "expired";
|
|
2130
|
+
};
|
|
2131
|
+
ConversationDeleted: {
|
|
2132
|
+
conversation_id: components["schemas"]["ConversationId"];
|
|
2133
|
+
sessions_revoked: number;
|
|
2134
|
+
};
|
|
1825
2135
|
/** @description A time slot the person picked on a `time_slots` card (v1-draft.17, `docs/realtime-protocol.md` §6): the slot's `id`, and the `call_id` of the tool call the card came from (the card's `source.call_id`), so the runtime checks the pick against the evidence it holds for that call. Both are copied from the card; never built by the app. */
|
|
1826
2136
|
SlotSelection: {
|
|
1827
2137
|
id: string;
|
|
@@ -2002,6 +2312,10 @@ interface components {
|
|
|
2002
2312
|
};
|
|
2003
2313
|
disclosure: string;
|
|
2004
2314
|
resumed: boolean;
|
|
2315
|
+
/** @description v1-draft.20, the session's mode (`Session.experience_mode`), so the app keeps one store per mode */
|
|
2316
|
+
experience_mode?: components["schemas"]["ExperienceMode"];
|
|
2317
|
+
/** @description v1-draft.20, present when the session acts for a business */
|
|
2318
|
+
business_scope_id?: components["schemas"]["BusinessScopeId"];
|
|
2005
2319
|
/**
|
|
2006
2320
|
* @description Optional. The last messages of the conversation, oldest first, text only, so the app can redraw it after a kill or a reconnect. Older context is not sent.
|
|
2007
2321
|
* A guided flow's resumed `session.ready` always carries it. Any other session's (a chat; v1-draft.17) carries it when `resumed` is true and there is something to restore, whether the app reconnects to the same session or the backend created a new session of the conversation: - the conversation's messages across its sessions (the session's own when it has no conversation):
|
|
@@ -2106,6 +2420,15 @@ interface components {
|
|
|
2106
2420
|
*/
|
|
2107
2421
|
code: "screened" | "too_long" | "turn_in_progress" | "limit_reached" | "duplicate" | "guardrail" | "screen_unavailable";
|
|
2108
2422
|
message: string;
|
|
2423
|
+
} | {
|
|
2424
|
+
/** @constant */
|
|
2425
|
+
type: "context.updated";
|
|
2426
|
+
revision: number;
|
|
2427
|
+
/**
|
|
2428
|
+
* @description present only after an explicit clear
|
|
2429
|
+
* @constant
|
|
2430
|
+
*/
|
|
2431
|
+
cleared?: true;
|
|
2109
2432
|
} | {
|
|
2110
2433
|
/** @constant */
|
|
2111
2434
|
type: "session.expiring";
|
|
@@ -2114,10 +2437,10 @@ interface components {
|
|
|
2114
2437
|
/** @constant */
|
|
2115
2438
|
type: "session.closed";
|
|
2116
2439
|
/**
|
|
2117
|
-
* @description `replaced`: a newer session of the same conversation was created (close code `4409`)
|
|
2440
|
+
* @description `replaced`: a newer session of the same conversation was created (close code `4409`). `deleted` (v1-draft.21): the person deleted the conversation from their history (`deleteConversation`, close code `4403`); drop it from the app's store and never resume it. A client that does not know `deleted` reads it as `revoked`, as any unknown reason.
|
|
2118
2441
|
* @enum {string}
|
|
2119
2442
|
*/
|
|
2120
|
-
reason: "expired" | "revoked" | "limit_reached" | "idle" | "server_restart" | "replaced";
|
|
2443
|
+
reason: "expired" | "revoked" | "limit_reached" | "idle" | "server_restart" | "replaced" | "deleted";
|
|
2121
2444
|
} | {
|
|
2122
2445
|
/** @constant */
|
|
2123
2446
|
type: "ui.answer.recorded";
|
|
@@ -2695,7 +3018,15 @@ interface components {
|
|
|
2695
3018
|
};
|
|
2696
3019
|
};
|
|
2697
3020
|
parameters: {
|
|
3021
|
+
/** @description v1-draft.24, optional: the agent the caller acts for; when given, the conversation must be this agent's, else `404` (the same answer as an unknown id) */
|
|
3022
|
+
BindingAgent: string;
|
|
3023
|
+
/** @description v1-draft.24, optional: the side of the app the caller acts on; when given, the conversation must be bound to it, else `404` */
|
|
3024
|
+
BindingExperienceMode: components["schemas"]["ExperienceMode"];
|
|
3025
|
+
/** @description v1-draft.24, optional: the business the caller acts for; when given, the conversation must be bound to it, else `404`. With `experience_mode: business` and no `business_scope_id`, a conversation bound to a business does not match. */
|
|
3026
|
+
BindingBusinessScope: components["schemas"]["BusinessScopeId"];
|
|
2698
3027
|
IdempotencyKey: string;
|
|
3028
|
+
/** @description Accepted, not required (declared in v1-draft.22). Scoped to the tenant and environment: the same key and request within 24 hours answers the first success again (`Idempotent-Replayed: true`); the same key with another request is `409 idempotency_conflict`. */
|
|
3029
|
+
OptionalIdempotencyKey: string;
|
|
2699
3030
|
MediaJobId: string;
|
|
2700
3031
|
ConversationId: components["schemas"]["ConversationId"];
|
|
2701
3032
|
SessionId: string;
|
|
@@ -2771,6 +3102,39 @@ interface operations {
|
|
|
2771
3102
|
503: components["responses"]["Problem"];
|
|
2772
3103
|
};
|
|
2773
3104
|
};
|
|
3105
|
+
listConversations: {
|
|
3106
|
+
parameters: {
|
|
3107
|
+
query: {
|
|
3108
|
+
subject_id: components["schemas"]["SubjectId"];
|
|
3109
|
+
agent: string;
|
|
3110
|
+
/** @description the side of the app; left out, the agent's template's */
|
|
3111
|
+
experience_mode?: components["schemas"]["ExperienceMode"];
|
|
3112
|
+
/** @description the business the person acts for; only with `experience_mode=business` */
|
|
3113
|
+
business_scope_id?: components["schemas"]["BusinessScopeId"];
|
|
3114
|
+
limit?: number;
|
|
3115
|
+
cursor?: string;
|
|
3116
|
+
};
|
|
3117
|
+
header?: never;
|
|
3118
|
+
path?: never;
|
|
3119
|
+
cookie?: never;
|
|
3120
|
+
};
|
|
3121
|
+
requestBody?: never;
|
|
3122
|
+
responses: {
|
|
3123
|
+
/** @description Newest activity first. */
|
|
3124
|
+
200: {
|
|
3125
|
+
headers: {
|
|
3126
|
+
[name: string]: unknown;
|
|
3127
|
+
};
|
|
3128
|
+
content: {
|
|
3129
|
+
"application/json": components["schemas"]["ConversationPage"];
|
|
3130
|
+
};
|
|
3131
|
+
};
|
|
3132
|
+
400: components["responses"]["Problem"];
|
|
3133
|
+
401: components["responses"]["Problem"];
|
|
3134
|
+
403: components["responses"]["Problem"];
|
|
3135
|
+
503: components["responses"]["Problem"];
|
|
3136
|
+
};
|
|
3137
|
+
};
|
|
2774
3138
|
getConversation: {
|
|
2775
3139
|
parameters: {
|
|
2776
3140
|
query?: never;
|
|
@@ -2797,6 +3161,78 @@ interface operations {
|
|
|
2797
3161
|
410: components["responses"]["Problem"];
|
|
2798
3162
|
};
|
|
2799
3163
|
};
|
|
3164
|
+
deleteConversation: {
|
|
3165
|
+
parameters: {
|
|
3166
|
+
query: {
|
|
3167
|
+
subject_id: components["schemas"]["SubjectId"];
|
|
3168
|
+
/** @description v1-draft.24, optional: the agent the caller acts for; when given, the conversation must be this agent's, else `404` (the same answer as an unknown id) */
|
|
3169
|
+
agent?: components["parameters"]["BindingAgent"];
|
|
3170
|
+
/** @description v1-draft.24, optional: the side of the app the caller acts on; when given, the conversation must be bound to it, else `404` */
|
|
3171
|
+
experience_mode?: components["parameters"]["BindingExperienceMode"];
|
|
3172
|
+
/** @description v1-draft.24, optional: the business the caller acts for; when given, the conversation must be bound to it, else `404`. With `experience_mode: business` and no `business_scope_id`, a conversation bound to a business does not match. */
|
|
3173
|
+
business_scope_id?: components["parameters"]["BindingBusinessScope"];
|
|
3174
|
+
};
|
|
3175
|
+
header?: never;
|
|
3176
|
+
path: {
|
|
3177
|
+
conversation_id: components["parameters"]["ConversationId"];
|
|
3178
|
+
};
|
|
3179
|
+
cookie?: never;
|
|
3180
|
+
};
|
|
3181
|
+
requestBody?: never;
|
|
3182
|
+
responses: {
|
|
3183
|
+
/** @description Deleted. */
|
|
3184
|
+
200: {
|
|
3185
|
+
headers: {
|
|
3186
|
+
[name: string]: unknown;
|
|
3187
|
+
};
|
|
3188
|
+
content: {
|
|
3189
|
+
"application/json": components["schemas"]["ConversationDeleted"];
|
|
3190
|
+
};
|
|
3191
|
+
};
|
|
3192
|
+
401: components["responses"]["Problem"];
|
|
3193
|
+
403: components["responses"]["Problem"];
|
|
3194
|
+
404: components["responses"]["Problem"];
|
|
3195
|
+
503: components["responses"]["Problem"];
|
|
3196
|
+
};
|
|
3197
|
+
};
|
|
3198
|
+
listConversationMessages: {
|
|
3199
|
+
parameters: {
|
|
3200
|
+
query: {
|
|
3201
|
+
subject_id: components["schemas"]["SubjectId"];
|
|
3202
|
+
/** @description v1-draft.24, optional: the agent the caller acts for; when given, the conversation must be this agent's, else `404` (the same answer as an unknown id) */
|
|
3203
|
+
agent?: components["parameters"]["BindingAgent"];
|
|
3204
|
+
/** @description v1-draft.24, optional: the side of the app the caller acts on; when given, the conversation must be bound to it, else `404` */
|
|
3205
|
+
experience_mode?: components["parameters"]["BindingExperienceMode"];
|
|
3206
|
+
/** @description v1-draft.24, optional: the business the caller acts for; when given, the conversation must be bound to it, else `404`. With `experience_mode: business` and no `business_scope_id`, a conversation bound to a business does not match. */
|
|
3207
|
+
business_scope_id?: components["parameters"]["BindingBusinessScope"];
|
|
3208
|
+
limit?: number;
|
|
3209
|
+
cursor?: string;
|
|
3210
|
+
};
|
|
3211
|
+
header?: never;
|
|
3212
|
+
path: {
|
|
3213
|
+
conversation_id: components["parameters"]["ConversationId"];
|
|
3214
|
+
};
|
|
3215
|
+
cookie?: never;
|
|
3216
|
+
};
|
|
3217
|
+
requestBody?: never;
|
|
3218
|
+
responses: {
|
|
3219
|
+
/** @description The newest page first; oldest first within a page. */
|
|
3220
|
+
200: {
|
|
3221
|
+
headers: {
|
|
3222
|
+
[name: string]: unknown;
|
|
3223
|
+
};
|
|
3224
|
+
content: {
|
|
3225
|
+
"application/json": components["schemas"]["TimelinePage"];
|
|
3226
|
+
};
|
|
3227
|
+
};
|
|
3228
|
+
400: components["responses"]["Problem"];
|
|
3229
|
+
401: components["responses"]["Problem"];
|
|
3230
|
+
403: components["responses"]["Problem"];
|
|
3231
|
+
404: components["responses"]["Problem"];
|
|
3232
|
+
410: components["responses"]["Problem"];
|
|
3233
|
+
503: components["responses"]["Problem"];
|
|
3234
|
+
};
|
|
3235
|
+
};
|
|
2800
3236
|
getSession: {
|
|
2801
3237
|
parameters: {
|
|
2802
3238
|
query?: never;
|
|
@@ -2820,7 +3256,7 @@ interface operations {
|
|
|
2820
3256
|
404: components["responses"]["Problem"];
|
|
2821
3257
|
};
|
|
2822
3258
|
};
|
|
2823
|
-
|
|
3259
|
+
updateSessionContext: {
|
|
2824
3260
|
parameters: {
|
|
2825
3261
|
query?: never;
|
|
2826
3262
|
header?: never;
|
|
@@ -2829,6 +3265,40 @@ interface operations {
|
|
|
2829
3265
|
};
|
|
2830
3266
|
cookie?: never;
|
|
2831
3267
|
};
|
|
3268
|
+
requestBody: {
|
|
3269
|
+
content: {
|
|
3270
|
+
"application/json": components["schemas"]["SessionContextUpdate"];
|
|
3271
|
+
};
|
|
3272
|
+
};
|
|
3273
|
+
responses: {
|
|
3274
|
+
/** @description The session's screen context now. */
|
|
3275
|
+
200: {
|
|
3276
|
+
headers: {
|
|
3277
|
+
[name: string]: unknown;
|
|
3278
|
+
};
|
|
3279
|
+
content: {
|
|
3280
|
+
"application/json": components["schemas"]["SessionContextState"];
|
|
3281
|
+
};
|
|
3282
|
+
};
|
|
3283
|
+
400: components["responses"]["Problem"];
|
|
3284
|
+
401: components["responses"]["Problem"];
|
|
3285
|
+
403: components["responses"]["Problem"];
|
|
3286
|
+
404: components["responses"]["Problem"];
|
|
3287
|
+
409: components["responses"]["Problem"];
|
|
3288
|
+
};
|
|
3289
|
+
};
|
|
3290
|
+
revokeSession: {
|
|
3291
|
+
parameters: {
|
|
3292
|
+
query?: never;
|
|
3293
|
+
header?: {
|
|
3294
|
+
/** @description Accepted, not required (declared in v1-draft.22). Scoped to the tenant and environment: the same key and request within 24 hours answers the first success again (`Idempotent-Replayed: true`); the same key with another request is `409 idempotency_conflict`. */
|
|
3295
|
+
"Idempotency-Key"?: components["parameters"]["OptionalIdempotencyKey"];
|
|
3296
|
+
};
|
|
3297
|
+
path: {
|
|
3298
|
+
session_id: components["parameters"]["SessionId"];
|
|
3299
|
+
};
|
|
3300
|
+
cookie?: never;
|
|
3301
|
+
};
|
|
2832
3302
|
requestBody?: never;
|
|
2833
3303
|
responses: {
|
|
2834
3304
|
/** @description Revoked (idempotent) */
|
|
@@ -2841,12 +3311,16 @@ interface operations {
|
|
|
2841
3311
|
};
|
|
2842
3312
|
};
|
|
2843
3313
|
404: components["responses"]["Problem"];
|
|
3314
|
+
409: components["responses"]["Problem"];
|
|
2844
3315
|
};
|
|
2845
3316
|
};
|
|
2846
3317
|
refreshClientSecret: {
|
|
2847
3318
|
parameters: {
|
|
2848
3319
|
query?: never;
|
|
2849
|
-
header?:
|
|
3320
|
+
header?: {
|
|
3321
|
+
/** @description Accepted, not required (declared in v1-draft.22). Scoped to the tenant and environment: the same key and request within 24 hours answers the first success again (`Idempotent-Replayed: true`); the same key with another request is `409 idempotency_conflict`. */
|
|
3322
|
+
"Idempotency-Key"?: components["parameters"]["OptionalIdempotencyKey"];
|
|
3323
|
+
};
|
|
2850
3324
|
path: {
|
|
2851
3325
|
session_id: components["parameters"]["SessionId"];
|
|
2852
3326
|
};
|
|
@@ -2891,6 +3365,7 @@ interface operations {
|
|
|
2891
3365
|
};
|
|
2892
3366
|
};
|
|
2893
3367
|
401: components["responses"]["Problem"];
|
|
3368
|
+
403: components["responses"]["Problem"];
|
|
2894
3369
|
409: components["responses"]["Problem"];
|
|
2895
3370
|
429: components["responses"]["RateLimited"];
|
|
2896
3371
|
};
|
|
@@ -2927,6 +3402,7 @@ interface operations {
|
|
|
2927
3402
|
"text/event-stream": string;
|
|
2928
3403
|
};
|
|
2929
3404
|
};
|
|
3405
|
+
403: components["responses"]["Problem"];
|
|
2930
3406
|
};
|
|
2931
3407
|
};
|
|
2932
3408
|
createModerationJob: {
|
|
@@ -3005,6 +3481,30 @@ interface operations {
|
|
|
3005
3481
|
404: components["responses"]["Problem"];
|
|
3006
3482
|
};
|
|
3007
3483
|
};
|
|
3484
|
+
getAgentAvatarImage: {
|
|
3485
|
+
parameters: {
|
|
3486
|
+
query?: never;
|
|
3487
|
+
header?: never;
|
|
3488
|
+
path: {
|
|
3489
|
+
/** @description the SHA-256 of the image's bytes, its first 32 hex digits, then `.webp` */
|
|
3490
|
+
avatar_file: string;
|
|
3491
|
+
};
|
|
3492
|
+
cookie?: never;
|
|
3493
|
+
};
|
|
3494
|
+
requestBody?: never;
|
|
3495
|
+
responses: {
|
|
3496
|
+
/** @description the image */
|
|
3497
|
+
200: {
|
|
3498
|
+
headers: {
|
|
3499
|
+
[name: string]: unknown;
|
|
3500
|
+
};
|
|
3501
|
+
content: {
|
|
3502
|
+
"image/webp": string;
|
|
3503
|
+
};
|
|
3504
|
+
};
|
|
3505
|
+
404: components["responses"]["Problem"];
|
|
3506
|
+
};
|
|
3507
|
+
};
|
|
3008
3508
|
listMediaJobs: {
|
|
3009
3509
|
parameters: {
|
|
3010
3510
|
query?: {
|