@vinaverse/server 0.0.0-stage → 0.1.0-alpha.2
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 +165 -2
- package/dist/api.cjs +528 -0
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +453 -0
- package/dist/api.d.ts +453 -0
- package/dist/api.js +516 -0
- package/dist/api.js.map +1 -0
- package/dist/chunk-FEEJNQXV.js +64 -0
- package/dist/chunk-FEEJNQXV.js.map +1 -0
- package/dist/chunk-GTPMQKGX.js +277 -0
- package/dist/chunk-GTPMQKGX.js.map +1 -0
- package/dist/chunk-NPXO6SMZ.js +84 -0
- package/dist/chunk-NPXO6SMZ.js.map +1 -0
- package/dist/chunk-SDJFZPHJ.js +141 -0
- package/dist/chunk-SDJFZPHJ.js.map +1 -0
- package/dist/express.cjs +397 -0
- package/dist/express.cjs.map +1 -0
- package/dist/express.d.cts +43 -0
- package/dist/express.d.ts +43 -0
- package/dist/express.js +87 -0
- package/dist/express.js.map +1 -0
- package/dist/fastify.cjs +363 -0
- package/dist/fastify.cjs.map +1 -0
- package/dist/fastify.d.cts +62 -0
- package/dist/fastify.d.ts +62 -0
- package/dist/fastify.js +54 -0
- package/dist/fastify.js.map +1 -0
- package/dist/hono.cjs +421 -0
- package/dist/hono.cjs.map +1 -0
- package/dist/hono.d.cts +21 -0
- package/dist/hono.d.ts +21 -0
- package/dist/hono.js +34 -0
- package/dist/hono.js.map +1 -0
- package/dist/index.cjs +1481 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +196 -0
- package/dist/index.d.ts +196 -0
- package/dist/index.js +920 -0
- package/dist/index.js.map +1 -0
- package/dist/lambda.cjs +405 -0
- package/dist/lambda.cjs.map +1 -0
- package/dist/lambda.d.cts +53 -0
- package/dist/lambda.d.ts +53 -0
- package/dist/lambda.js +86 -0
- package/dist/lambda.js.map +1 -0
- package/dist/nonces-scwljZwl.d.cts +92 -0
- package/dist/nonces-scwljZwl.d.ts +92 -0
- package/dist/provider-BqfTvF3g.d.ts +2016 -0
- package/dist/provider-Miaa9V7I.d.cts +2016 -0
- package/dist/stores.cjs +315 -0
- package/dist/stores.cjs.map +1 -0
- package/dist/stores.d.cts +52 -0
- package/dist/stores.d.ts +52 -0
- package/dist/stores.js +306 -0
- package/dist/stores.js.map +1 -0
- package/dist/testing.cjs +135 -0
- package/dist/testing.cjs.map +1 -0
- package/dist/testing.d.cts +29 -0
- package/dist/testing.d.ts +29 -0
- package/dist/testing.js +49 -0
- package/dist/testing.js.map +1 -0
- package/dist/vinaverse-v1.d-BVc4uyUd.d.cts +3460 -0
- package/dist/vinaverse-v1.d-BVc4uyUd.d.ts +3460 -0
- package/package.json +225 -3
|
@@ -0,0 +1,3460 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
interface paths {
|
|
7
|
+
"/v1/sessions": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
get?: never;
|
|
15
|
+
put?: never;
|
|
16
|
+
/**
|
|
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`; `subject.type` is not part of it, so a guest who signs in keeps the conversation.
|
|
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
|
+
* **`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
|
+
* **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 not_found`.
|
|
23
|
+
* 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
|
+
* conversation instead lets a new one start under the key; the id never starts one silently.
|
|
25
|
+
* 4. The conversation is completed (its flow was accepted): `409 conversation_completed`. This holds by key too,
|
|
26
|
+
* so a finished survey is never started twice.
|
|
27
|
+
*
|
|
28
|
+
* **Resuming** is the same however the conversation is named. The new session continues the conversation, and `conversation_id` stays the same. The agent gets the answers recorded so far and a short summary, and re-emits the pending question card under its original `id`. A question card keeps its `id` across the sessions of a conversation, so an answer resent on a later session still names it. `client_event_id`s are deduplicated across all the sessions of the conversation. The older open session of the conversation is replaced (`session.closed replaced`, close `4409`). Each session still has its own short-lived client secret.
|
|
29
|
+
*/
|
|
30
|
+
post: operations["createSession"];
|
|
31
|
+
delete?: never;
|
|
32
|
+
options?: never;
|
|
33
|
+
head?: never;
|
|
34
|
+
patch?: never;
|
|
35
|
+
trace?: never;
|
|
36
|
+
};
|
|
37
|
+
"/v1/suggestions": {
|
|
38
|
+
parameters: {
|
|
39
|
+
query?: never;
|
|
40
|
+
header?: never;
|
|
41
|
+
path?: never;
|
|
42
|
+
cookie?: never;
|
|
43
|
+
};
|
|
44
|
+
get?: never;
|
|
45
|
+
put?: never;
|
|
46
|
+
/**
|
|
47
|
+
* Pick, rank and word a few explore suggestions from the candidates the tenant sends
|
|
48
|
+
* @description Synchronous, with a service key that has `sessions:write` (a key without scopes has every scope). Feature `suggestions`, for caps and switches: when it is off or capped, the answer is `feature_unavailable`, as everywhere else.
|
|
49
|
+
* **Time.** The tenant waits at most 1.5 seconds. The runtime answers within 1.2 seconds, with what it has by then, or an empty list. A request whose caller disconnected before the answer is not charged and does not count toward the `suggestions` cap, so the tenant's ledger, which records the `usage` it receives, stays exact.
|
|
50
|
+
* **The split.** The tenant supplies the facts: `candidates` from its own live data, each with a `ref`, a `kind`, a `title` and open `facts`. The agent picks between `min` and `max` of them, ranks them, and writes a short `title` and `why` for each. It may also turn one into a question for the agent (`action: ask`). - **Never an invented target.** `ref` is always one of the request's candidates, and `null` only for `ask`. - **Never a claim beyond the facts.** `why` uses only the facts sent. An unknown `facts` key is ignored. - **No filler.** With fewer than `min` good suggestions, the list is empty. `min` greater than `max` is
|
|
51
|
+
* `400 invalid_request` with the pointer `/max`.
|
|
52
|
+
* - **Language and length.** `title`, `why` and `question` are in `subject.locale`, falling back to the
|
|
53
|
+
* tenant's default locale and then English. Their lengths are counted in Unicode code points; a check in a
|
|
54
|
+
* language whose strings are UTF-16 (.NET, JavaScript) must count code points, not UTF-16 units.
|
|
55
|
+
*
|
|
56
|
+
* **Candidates are untrusted data.** Candidate `title`s and `facts` often come from other people (a host's listing title, a professional's name). They enter the model as quoted data in a delimited block, never as instructions, and the platform floor applies: every `title`, `why` and `question` passes the leak check and the blocked-topic filter before it is returned.
|
|
57
|
+
* **Tool mode.** Only when `candidates` is omitted and `tool_access` is given does the agent read the tenant's `read` tools for candidates. With `candidates` present, the tools are not read, and every `ref` is a candidate's. In tool mode: - `why` uses only the tool results; - a `ref` is `<kind>:<id>`, with the `id` exactly as the tenant's read tool returned it: `professional` from
|
|
58
|
+
* `get_professional` and the search tools, `space` from `get_workspace`, `service` from the catalogue's
|
|
59
|
+
* `service_type`, `class` from a tool that returns classes;
|
|
60
|
+
* - the tenant validates a `ref` by fetching that object again before it shows the suggestion.
|
|
61
|
+
* **The agent's guardrails apply.** The suggestions follow the `scope` and `blocked_topics` of the request's `agent` (default `customer_assistant`). An `agent` the tenant does not have is `400 invalid_request` with the pointer `/agent`. `business_setup` or `booking_proposals` in `tool_access` is refused (`400 invalid_request`, `/tool_access/capabilities`): suggestions never propose, and the subject is a `client` or a `guest`.
|
|
62
|
+
* **Privacy and caching.** `personalized` says whether any suggestion used the subject's own history, from a `facts` key such as `booked_by_subject` or from the tools. It is always `false` for a `guest`. A personalised answer never crosses subjects: its cache key includes the tenant, environment and `subject.id`, and the rest of the key (place, filters, a cell size) is the tenant's choice. A response with `personalized: false` may also be cached across subjects. The decision records are kept for the tenant's `transcript_retention` (at most 30 days; with `none`, not after the answer), and are erased with the subject (`eraseSubject`).
|
|
63
|
+
* **An `ask` suggestion** opens the agent with `question` already typed in the composer. It becomes the person's message only when they send it, and they may edit it first. No session field carries the suggestion.
|
|
64
|
+
*/
|
|
65
|
+
post: operations["createSuggestions"];
|
|
66
|
+
delete?: never;
|
|
67
|
+
options?: never;
|
|
68
|
+
head?: never;
|
|
69
|
+
patch?: never;
|
|
70
|
+
trace?: never;
|
|
71
|
+
};
|
|
72
|
+
"/v1/conversations/{conversation_id}": {
|
|
73
|
+
parameters: {
|
|
74
|
+
query?: never;
|
|
75
|
+
header?: never;
|
|
76
|
+
path?: never;
|
|
77
|
+
cookie?: never;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* The state of one conversation, with all its answers
|
|
81
|
+
* @description The same `ConversationState` the conversation webhooks carry, always complete: `answers` and `remarks` are never omitted here, and `sequence` is the same counter the webhooks carry. Use it when a webhook arrives with `answers_omitted: true`, or to check where a person is.
|
|
82
|
+
* **Access.** A service key only, never a client secret, and only for the key's own tenant and environment. The key needs the `conversations:read` scope (a key without scopes has every scope); otherwise `403 forbidden`.
|
|
83
|
+
* **How long the state can be read.** - While the conversation lives. - **72 hours after it ends without acceptance** (`expired`, including one whose last submission
|
|
84
|
+
* `failed`): the final state, answers included, stays readable, so a backend that missed an omitted
|
|
85
|
+
* webhook can still fetch the answers.
|
|
86
|
+
* - **Under `transcript_retention: none`,** the state is deleted on acceptance, and the tenant already holds
|
|
87
|
+
* the accepted submission. The read then answers `410` at once.
|
|
88
|
+
*
|
|
89
|
+
* After that window the read answers `410 conversation_expired`, from a tombstone that keeps no answers (see `docs/conversation-state.md`). An unknown or erased conversation, or one of another tenant or environment, is `404 not_found`.
|
|
90
|
+
*/
|
|
91
|
+
get: operations["getConversation"];
|
|
92
|
+
put?: never;
|
|
93
|
+
post?: never;
|
|
94
|
+
delete?: never;
|
|
95
|
+
options?: never;
|
|
96
|
+
head?: never;
|
|
97
|
+
patch?: never;
|
|
98
|
+
trace?: never;
|
|
99
|
+
};
|
|
100
|
+
"/v1/sessions/{session_id}": {
|
|
101
|
+
parameters: {
|
|
102
|
+
query?: never;
|
|
103
|
+
header?: never;
|
|
104
|
+
path?: never;
|
|
105
|
+
cookie?: never;
|
|
106
|
+
};
|
|
107
|
+
get: operations["getSession"];
|
|
108
|
+
put?: never;
|
|
109
|
+
post?: never;
|
|
110
|
+
delete?: never;
|
|
111
|
+
options?: never;
|
|
112
|
+
head?: never;
|
|
113
|
+
patch?: never;
|
|
114
|
+
trace?: never;
|
|
115
|
+
};
|
|
116
|
+
"/v1/sessions/{session_id}/revoke": {
|
|
117
|
+
parameters: {
|
|
118
|
+
query?: never;
|
|
119
|
+
header?: never;
|
|
120
|
+
path?: never;
|
|
121
|
+
cookie?: never;
|
|
122
|
+
};
|
|
123
|
+
get?: never;
|
|
124
|
+
put?: never;
|
|
125
|
+
post: operations["revokeSession"];
|
|
126
|
+
delete?: never;
|
|
127
|
+
options?: never;
|
|
128
|
+
head?: never;
|
|
129
|
+
patch?: never;
|
|
130
|
+
trace?: never;
|
|
131
|
+
};
|
|
132
|
+
"/v1/sessions/{session_id}/client_secret": {
|
|
133
|
+
parameters: {
|
|
134
|
+
query?: never;
|
|
135
|
+
header?: never;
|
|
136
|
+
path?: never;
|
|
137
|
+
cookie?: never;
|
|
138
|
+
};
|
|
139
|
+
get?: never;
|
|
140
|
+
put?: never;
|
|
141
|
+
/**
|
|
142
|
+
* 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`.
|
|
144
|
+
*/
|
|
145
|
+
post: operations["refreshClientSecret"];
|
|
146
|
+
delete?: never;
|
|
147
|
+
options?: never;
|
|
148
|
+
head?: never;
|
|
149
|
+
patch?: never;
|
|
150
|
+
trace?: never;
|
|
151
|
+
};
|
|
152
|
+
"/v1/sessions/{session_id}/turns": {
|
|
153
|
+
parameters: {
|
|
154
|
+
query?: never;
|
|
155
|
+
header?: never;
|
|
156
|
+
path?: never;
|
|
157
|
+
cookie?: never;
|
|
158
|
+
};
|
|
159
|
+
get?: never;
|
|
160
|
+
put?: never;
|
|
161
|
+
/** Run one turn and stream its events as SSE (alternative to the WebSocket) */
|
|
162
|
+
post: operations["createTurnSse"];
|
|
163
|
+
delete?: never;
|
|
164
|
+
options?: never;
|
|
165
|
+
head?: never;
|
|
166
|
+
patch?: never;
|
|
167
|
+
trace?: never;
|
|
168
|
+
};
|
|
169
|
+
"/v1/sessions/{session_id}/turns/{turn_id}/actions": {
|
|
170
|
+
parameters: {
|
|
171
|
+
query?: never;
|
|
172
|
+
header?: never;
|
|
173
|
+
path?: never;
|
|
174
|
+
cookie?: never;
|
|
175
|
+
};
|
|
176
|
+
get?: never;
|
|
177
|
+
put?: never;
|
|
178
|
+
/** Send a card action and stream the resulting turn as SSE */
|
|
179
|
+
post: operations["createCardActionSse"];
|
|
180
|
+
delete?: never;
|
|
181
|
+
options?: never;
|
|
182
|
+
head?: never;
|
|
183
|
+
patch?: never;
|
|
184
|
+
trace?: never;
|
|
185
|
+
};
|
|
186
|
+
"/v1/moderation/jobs": {
|
|
187
|
+
parameters: {
|
|
188
|
+
query?: never;
|
|
189
|
+
header?: never;
|
|
190
|
+
path?: never;
|
|
191
|
+
cookie?: never;
|
|
192
|
+
};
|
|
193
|
+
get?: never;
|
|
194
|
+
put?: never;
|
|
195
|
+
post: operations["createModerationJob"];
|
|
196
|
+
delete?: never;
|
|
197
|
+
options?: never;
|
|
198
|
+
head?: never;
|
|
199
|
+
patch?: never;
|
|
200
|
+
trace?: never;
|
|
201
|
+
};
|
|
202
|
+
"/v1/moderation/jobs/{job_id}": {
|
|
203
|
+
parameters: {
|
|
204
|
+
query?: never;
|
|
205
|
+
header?: never;
|
|
206
|
+
path?: never;
|
|
207
|
+
cookie?: never;
|
|
208
|
+
};
|
|
209
|
+
get: operations["getModerationJob"];
|
|
210
|
+
put?: never;
|
|
211
|
+
post?: never;
|
|
212
|
+
delete?: never;
|
|
213
|
+
options?: never;
|
|
214
|
+
head?: never;
|
|
215
|
+
patch?: never;
|
|
216
|
+
trace?: never;
|
|
217
|
+
};
|
|
218
|
+
"/v1/moderation/items/{item_id}": {
|
|
219
|
+
parameters: {
|
|
220
|
+
query?: never;
|
|
221
|
+
header?: never;
|
|
222
|
+
path?: never;
|
|
223
|
+
cookie?: never;
|
|
224
|
+
};
|
|
225
|
+
get: operations["getModerationItem"];
|
|
226
|
+
put?: never;
|
|
227
|
+
post?: never;
|
|
228
|
+
delete?: never;
|
|
229
|
+
options?: never;
|
|
230
|
+
head?: never;
|
|
231
|
+
patch?: never;
|
|
232
|
+
trace?: never;
|
|
233
|
+
};
|
|
234
|
+
"/v1/media/jobs": {
|
|
235
|
+
parameters: {
|
|
236
|
+
query?: never;
|
|
237
|
+
header?: never;
|
|
238
|
+
path?: never;
|
|
239
|
+
cookie?: never;
|
|
240
|
+
};
|
|
241
|
+
get: operations["listMediaJobs"];
|
|
242
|
+
put?: never;
|
|
243
|
+
/**
|
|
244
|
+
* @description Queue a media job. `moderate` is required; `transcode`, `poster` and `captions` are optional (video only)
|
|
245
|
+
* and write to the tenant's destination under `<prefix>/<job id>/`. Same tenant, same `media.sha256`, same
|
|
246
|
+
* steps and same policy version within 30 days returns the earlier completed job with `200` and
|
|
247
|
+
* `deduplicated: true`, not charged; `force: true` reprocesses. When the expected wait exceeds the tenant's
|
|
248
|
+
* soft limit the job is accepted with `delayed: true` and a later `estimated_completion_at`; past the hard
|
|
249
|
+
* limit the request is refused with `429` and `Retry-After`.
|
|
250
|
+
*/
|
|
251
|
+
post: operations["createMediaJob"];
|
|
252
|
+
delete?: never;
|
|
253
|
+
options?: never;
|
|
254
|
+
head?: never;
|
|
255
|
+
patch?: never;
|
|
256
|
+
trace?: never;
|
|
257
|
+
};
|
|
258
|
+
"/v1/media/jobs/{job_id}": {
|
|
259
|
+
parameters: {
|
|
260
|
+
query?: never;
|
|
261
|
+
header?: never;
|
|
262
|
+
path?: never;
|
|
263
|
+
cookie?: never;
|
|
264
|
+
};
|
|
265
|
+
get: operations["getMediaJob"];
|
|
266
|
+
put?: never;
|
|
267
|
+
post?: never;
|
|
268
|
+
delete?: never;
|
|
269
|
+
options?: never;
|
|
270
|
+
head?: never;
|
|
271
|
+
patch?: never;
|
|
272
|
+
trace?: never;
|
|
273
|
+
};
|
|
274
|
+
"/v1/media/jobs/{job_id}/cancel": {
|
|
275
|
+
parameters: {
|
|
276
|
+
query?: never;
|
|
277
|
+
header?: never;
|
|
278
|
+
path?: never;
|
|
279
|
+
cookie?: never;
|
|
280
|
+
};
|
|
281
|
+
get?: never;
|
|
282
|
+
put?: never;
|
|
283
|
+
/**
|
|
284
|
+
* @description Stops the job at the next step boundary (within seconds) and deletes outputs already written. Idempotent:
|
|
285
|
+
* cancelling an ended job returns it unchanged.
|
|
286
|
+
*/
|
|
287
|
+
post: operations["cancelMediaJob"];
|
|
288
|
+
delete?: never;
|
|
289
|
+
options?: never;
|
|
290
|
+
head?: never;
|
|
291
|
+
patch?: never;
|
|
292
|
+
trace?: never;
|
|
293
|
+
};
|
|
294
|
+
"/v1/media/profiles": {
|
|
295
|
+
parameters: {
|
|
296
|
+
query?: never;
|
|
297
|
+
header?: never;
|
|
298
|
+
path?: never;
|
|
299
|
+
cookie?: never;
|
|
300
|
+
};
|
|
301
|
+
get: operations["listMediaProfiles"];
|
|
302
|
+
put?: never;
|
|
303
|
+
post?: never;
|
|
304
|
+
delete?: never;
|
|
305
|
+
options?: never;
|
|
306
|
+
head?: never;
|
|
307
|
+
patch?: never;
|
|
308
|
+
trace?: never;
|
|
309
|
+
};
|
|
310
|
+
"/v1/screening/text": {
|
|
311
|
+
parameters: {
|
|
312
|
+
query?: never;
|
|
313
|
+
header?: never;
|
|
314
|
+
path?: never;
|
|
315
|
+
cookie?: never;
|
|
316
|
+
};
|
|
317
|
+
get?: never;
|
|
318
|
+
put?: never;
|
|
319
|
+
post: operations["screenText"];
|
|
320
|
+
delete?: never;
|
|
321
|
+
options?: never;
|
|
322
|
+
head?: never;
|
|
323
|
+
patch?: never;
|
|
324
|
+
trace?: never;
|
|
325
|
+
};
|
|
326
|
+
"/v1/document-checks": {
|
|
327
|
+
parameters: {
|
|
328
|
+
query?: never;
|
|
329
|
+
header?: never;
|
|
330
|
+
path?: never;
|
|
331
|
+
cookie?: never;
|
|
332
|
+
};
|
|
333
|
+
get?: never;
|
|
334
|
+
put?: never;
|
|
335
|
+
post: operations["createDocumentCheck"];
|
|
336
|
+
delete?: never;
|
|
337
|
+
options?: never;
|
|
338
|
+
head?: never;
|
|
339
|
+
patch?: never;
|
|
340
|
+
trace?: never;
|
|
341
|
+
};
|
|
342
|
+
"/v1/document-checks/{check_id}": {
|
|
343
|
+
parameters: {
|
|
344
|
+
query?: never;
|
|
345
|
+
header?: never;
|
|
346
|
+
path?: never;
|
|
347
|
+
cookie?: never;
|
|
348
|
+
};
|
|
349
|
+
/** @description Fields are present only within 24 hours of completion; afterwards only flags remain. */
|
|
350
|
+
get: operations["getDocumentCheck"];
|
|
351
|
+
put?: never;
|
|
352
|
+
post?: never;
|
|
353
|
+
delete?: never;
|
|
354
|
+
options?: never;
|
|
355
|
+
head?: never;
|
|
356
|
+
patch?: never;
|
|
357
|
+
trace?: never;
|
|
358
|
+
};
|
|
359
|
+
"/v1/feedback": {
|
|
360
|
+
parameters: {
|
|
361
|
+
query?: never;
|
|
362
|
+
header?: never;
|
|
363
|
+
path?: never;
|
|
364
|
+
cookie?: never;
|
|
365
|
+
};
|
|
366
|
+
get?: never;
|
|
367
|
+
put?: never;
|
|
368
|
+
post: operations["sendFeedback"];
|
|
369
|
+
delete?: never;
|
|
370
|
+
options?: never;
|
|
371
|
+
head?: never;
|
|
372
|
+
patch?: never;
|
|
373
|
+
trace?: never;
|
|
374
|
+
};
|
|
375
|
+
"/v1/subjects/{subject_id}/erase": {
|
|
376
|
+
parameters: {
|
|
377
|
+
query?: never;
|
|
378
|
+
header?: never;
|
|
379
|
+
path?: never;
|
|
380
|
+
cookie?: never;
|
|
381
|
+
};
|
|
382
|
+
get?: never;
|
|
383
|
+
put?: never;
|
|
384
|
+
/**
|
|
385
|
+
* @description Erases the subject's data: transcripts, screening texts, memory, indexes, the conversation state of its guided flows (recorded answers, remarks, transcript), and the explore suggestion decisions made for it, and revokes its open sessions. `subject.erased` follows.
|
|
386
|
+
* **A subject Vinaverse holds nothing for** (never seen, or already erased) is `404` with `code: not_found` and `type: https://docs.vinaverse.com/problems/subject-not-found`; a client matches on the `type` ending in `/problems/subject-not-found`. Only that answer means nothing is held, and nothing needs erasing. Vinaverse keeps no record of erased subjects to tell the two apart. Any other `404` (a wrong base URL, say) is not that answer, and the caller retries.
|
|
387
|
+
*/
|
|
388
|
+
post: operations["eraseSubject"];
|
|
389
|
+
delete?: never;
|
|
390
|
+
options?: never;
|
|
391
|
+
head?: never;
|
|
392
|
+
patch?: never;
|
|
393
|
+
trace?: never;
|
|
394
|
+
};
|
|
395
|
+
"/v1/events": {
|
|
396
|
+
parameters: {
|
|
397
|
+
query?: never;
|
|
398
|
+
header?: never;
|
|
399
|
+
path?: never;
|
|
400
|
+
cookie?: never;
|
|
401
|
+
};
|
|
402
|
+
get?: never;
|
|
403
|
+
put?: never;
|
|
404
|
+
/** @description Contract §13.1. Each event must validate against its type's JSON Schema in the event catalogue (`contracts/events/beauty_marketplace@1/`); one invalid event rejects the call. */
|
|
405
|
+
post: operations["sendEvents"];
|
|
406
|
+
delete?: never;
|
|
407
|
+
options?: never;
|
|
408
|
+
head?: never;
|
|
409
|
+
patch?: never;
|
|
410
|
+
trace?: never;
|
|
411
|
+
};
|
|
412
|
+
"/v1/knowledge/documents": {
|
|
413
|
+
parameters: {
|
|
414
|
+
query?: never;
|
|
415
|
+
header?: never;
|
|
416
|
+
path?: never;
|
|
417
|
+
cookie?: never;
|
|
418
|
+
};
|
|
419
|
+
get?: never;
|
|
420
|
+
put?: never;
|
|
421
|
+
post: operations["sendKnowledgeDocument"];
|
|
422
|
+
delete?: never;
|
|
423
|
+
options?: never;
|
|
424
|
+
head?: never;
|
|
425
|
+
patch?: never;
|
|
426
|
+
trace?: never;
|
|
427
|
+
};
|
|
428
|
+
"/v1/catalog/{type}/{id}": {
|
|
429
|
+
parameters: {
|
|
430
|
+
query?: never;
|
|
431
|
+
header?: never;
|
|
432
|
+
path?: never;
|
|
433
|
+
cookie?: never;
|
|
434
|
+
};
|
|
435
|
+
get?: never;
|
|
436
|
+
put: operations["putCatalogEntity"];
|
|
437
|
+
post?: never;
|
|
438
|
+
delete?: never;
|
|
439
|
+
options?: never;
|
|
440
|
+
head?: never;
|
|
441
|
+
patch?: never;
|
|
442
|
+
trace?: never;
|
|
443
|
+
};
|
|
444
|
+
"/v1/usage": {
|
|
445
|
+
parameters: {
|
|
446
|
+
query?: never;
|
|
447
|
+
header?: never;
|
|
448
|
+
path?: never;
|
|
449
|
+
cookie?: never;
|
|
450
|
+
};
|
|
451
|
+
get: operations["getUsage"];
|
|
452
|
+
put?: never;
|
|
453
|
+
post?: never;
|
|
454
|
+
delete?: never;
|
|
455
|
+
options?: never;
|
|
456
|
+
head?: never;
|
|
457
|
+
patch?: never;
|
|
458
|
+
trace?: never;
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
interface webhooks {
|
|
462
|
+
"media.job.queued": {
|
|
463
|
+
parameters: {
|
|
464
|
+
query?: never;
|
|
465
|
+
header?: never;
|
|
466
|
+
path?: never;
|
|
467
|
+
cookie?: never;
|
|
468
|
+
};
|
|
469
|
+
get?: never;
|
|
470
|
+
put?: never;
|
|
471
|
+
/** @description The job was accepted (also after a retry). */
|
|
472
|
+
post: {
|
|
473
|
+
parameters: {
|
|
474
|
+
query?: never;
|
|
475
|
+
header?: never;
|
|
476
|
+
path?: never;
|
|
477
|
+
cookie?: never;
|
|
478
|
+
};
|
|
479
|
+
requestBody?: {
|
|
480
|
+
content: {
|
|
481
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
482
|
+
data?: components["schemas"]["MediaJob"];
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
responses: {
|
|
487
|
+
/** @description Received */
|
|
488
|
+
200: {
|
|
489
|
+
headers: {
|
|
490
|
+
[name: string]: unknown;
|
|
491
|
+
};
|
|
492
|
+
content?: never;
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
delete?: never;
|
|
497
|
+
options?: never;
|
|
498
|
+
head?: never;
|
|
499
|
+
patch?: never;
|
|
500
|
+
trace?: never;
|
|
501
|
+
};
|
|
502
|
+
"media.job.progress": {
|
|
503
|
+
parameters: {
|
|
504
|
+
query?: never;
|
|
505
|
+
header?: never;
|
|
506
|
+
path?: never;
|
|
507
|
+
cookie?: never;
|
|
508
|
+
};
|
|
509
|
+
get?: never;
|
|
510
|
+
put?: never;
|
|
511
|
+
/** @description At most one per 10 s per job, and only to an endpoint that lists this event by name; an endpoint that takes every event does not get it. */
|
|
512
|
+
post: {
|
|
513
|
+
parameters: {
|
|
514
|
+
query?: never;
|
|
515
|
+
header?: never;
|
|
516
|
+
path?: never;
|
|
517
|
+
cookie?: never;
|
|
518
|
+
};
|
|
519
|
+
requestBody?: {
|
|
520
|
+
content: {
|
|
521
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
522
|
+
data?: components["schemas"]["MediaJobProgress"];
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
responses: {
|
|
527
|
+
/** @description Received */
|
|
528
|
+
200: {
|
|
529
|
+
headers: {
|
|
530
|
+
[name: string]: unknown;
|
|
531
|
+
};
|
|
532
|
+
content?: never;
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
delete?: never;
|
|
537
|
+
options?: never;
|
|
538
|
+
head?: never;
|
|
539
|
+
patch?: never;
|
|
540
|
+
trace?: never;
|
|
541
|
+
};
|
|
542
|
+
"media.job.step.completed": {
|
|
543
|
+
parameters: {
|
|
544
|
+
query?: never;
|
|
545
|
+
header?: never;
|
|
546
|
+
path?: never;
|
|
547
|
+
cookie?: never;
|
|
548
|
+
};
|
|
549
|
+
get?: never;
|
|
550
|
+
put?: never;
|
|
551
|
+
/** @description A step completed; `completed_step` names it. */
|
|
552
|
+
post: {
|
|
553
|
+
parameters: {
|
|
554
|
+
query?: never;
|
|
555
|
+
header?: never;
|
|
556
|
+
path?: never;
|
|
557
|
+
cookie?: never;
|
|
558
|
+
};
|
|
559
|
+
requestBody?: {
|
|
560
|
+
content: {
|
|
561
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
562
|
+
data?: components["schemas"]["MediaJobStepCompleted"];
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
responses: {
|
|
567
|
+
/** @description Received */
|
|
568
|
+
200: {
|
|
569
|
+
headers: {
|
|
570
|
+
[name: string]: unknown;
|
|
571
|
+
};
|
|
572
|
+
content?: never;
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
delete?: never;
|
|
577
|
+
options?: never;
|
|
578
|
+
head?: never;
|
|
579
|
+
patch?: never;
|
|
580
|
+
trace?: never;
|
|
581
|
+
};
|
|
582
|
+
"media.job.completed": {
|
|
583
|
+
parameters: {
|
|
584
|
+
query?: never;
|
|
585
|
+
header?: never;
|
|
586
|
+
path?: never;
|
|
587
|
+
cookie?: never;
|
|
588
|
+
};
|
|
589
|
+
get?: never;
|
|
590
|
+
put?: never;
|
|
591
|
+
/** @description Every step ended; `outputs` lists the files (none after a `never` verdict). */
|
|
592
|
+
post: {
|
|
593
|
+
parameters: {
|
|
594
|
+
query?: never;
|
|
595
|
+
header?: never;
|
|
596
|
+
path?: never;
|
|
597
|
+
cookie?: never;
|
|
598
|
+
};
|
|
599
|
+
requestBody?: {
|
|
600
|
+
content: {
|
|
601
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
602
|
+
data?: components["schemas"]["MediaJob"];
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
responses: {
|
|
607
|
+
/** @description Received */
|
|
608
|
+
200: {
|
|
609
|
+
headers: {
|
|
610
|
+
[name: string]: unknown;
|
|
611
|
+
};
|
|
612
|
+
content?: never;
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
};
|
|
616
|
+
delete?: never;
|
|
617
|
+
options?: never;
|
|
618
|
+
head?: never;
|
|
619
|
+
patch?: never;
|
|
620
|
+
trace?: never;
|
|
621
|
+
};
|
|
622
|
+
"media.job.failed": {
|
|
623
|
+
parameters: {
|
|
624
|
+
query?: never;
|
|
625
|
+
header?: never;
|
|
626
|
+
path?: never;
|
|
627
|
+
cookie?: never;
|
|
628
|
+
};
|
|
629
|
+
get?: never;
|
|
630
|
+
put?: never;
|
|
631
|
+
/** @description A step failed after its retries; `error` says why. Completed steps are kept for a retry. */
|
|
632
|
+
post: {
|
|
633
|
+
parameters: {
|
|
634
|
+
query?: never;
|
|
635
|
+
header?: never;
|
|
636
|
+
path?: never;
|
|
637
|
+
cookie?: never;
|
|
638
|
+
};
|
|
639
|
+
requestBody?: {
|
|
640
|
+
content: {
|
|
641
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
642
|
+
data?: components["schemas"]["MediaJob"];
|
|
643
|
+
};
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
responses: {
|
|
647
|
+
/** @description Received */
|
|
648
|
+
200: {
|
|
649
|
+
headers: {
|
|
650
|
+
[name: string]: unknown;
|
|
651
|
+
};
|
|
652
|
+
content?: never;
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
};
|
|
656
|
+
delete?: never;
|
|
657
|
+
options?: never;
|
|
658
|
+
head?: never;
|
|
659
|
+
patch?: never;
|
|
660
|
+
trace?: never;
|
|
661
|
+
};
|
|
662
|
+
"media.job.cancelled": {
|
|
663
|
+
parameters: {
|
|
664
|
+
query?: never;
|
|
665
|
+
header?: never;
|
|
666
|
+
path?: never;
|
|
667
|
+
cookie?: never;
|
|
668
|
+
};
|
|
669
|
+
get?: never;
|
|
670
|
+
put?: never;
|
|
671
|
+
/** @description The job was cancelled; outputs already written are deleted. */
|
|
672
|
+
post: {
|
|
673
|
+
parameters: {
|
|
674
|
+
query?: never;
|
|
675
|
+
header?: never;
|
|
676
|
+
path?: never;
|
|
677
|
+
cookie?: never;
|
|
678
|
+
};
|
|
679
|
+
requestBody?: {
|
|
680
|
+
content: {
|
|
681
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
682
|
+
data?: components["schemas"]["MediaJob"];
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
};
|
|
686
|
+
responses: {
|
|
687
|
+
/** @description Received */
|
|
688
|
+
200: {
|
|
689
|
+
headers: {
|
|
690
|
+
[name: string]: unknown;
|
|
691
|
+
};
|
|
692
|
+
content?: never;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
delete?: never;
|
|
697
|
+
options?: never;
|
|
698
|
+
head?: never;
|
|
699
|
+
patch?: never;
|
|
700
|
+
trace?: never;
|
|
701
|
+
};
|
|
702
|
+
"moderation.item.completed": {
|
|
703
|
+
parameters: {
|
|
704
|
+
query?: never;
|
|
705
|
+
header?: never;
|
|
706
|
+
path?: never;
|
|
707
|
+
cookie?: never;
|
|
708
|
+
};
|
|
709
|
+
get?: never;
|
|
710
|
+
put?: never;
|
|
711
|
+
post: {
|
|
712
|
+
parameters: {
|
|
713
|
+
query?: never;
|
|
714
|
+
header?: never;
|
|
715
|
+
path?: never;
|
|
716
|
+
cookie?: never;
|
|
717
|
+
};
|
|
718
|
+
requestBody?: {
|
|
719
|
+
content: {
|
|
720
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
721
|
+
data?: components["schemas"]["ModerationItem"];
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
responses: {
|
|
726
|
+
/** @description Received */
|
|
727
|
+
200: {
|
|
728
|
+
headers: {
|
|
729
|
+
[name: string]: unknown;
|
|
730
|
+
};
|
|
731
|
+
content?: never;
|
|
732
|
+
};
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
delete?: never;
|
|
736
|
+
options?: never;
|
|
737
|
+
head?: never;
|
|
738
|
+
patch?: never;
|
|
739
|
+
trace?: never;
|
|
740
|
+
};
|
|
741
|
+
"moderation.job.completed": {
|
|
742
|
+
parameters: {
|
|
743
|
+
query?: never;
|
|
744
|
+
header?: never;
|
|
745
|
+
path?: never;
|
|
746
|
+
cookie?: never;
|
|
747
|
+
};
|
|
748
|
+
get?: never;
|
|
749
|
+
put?: never;
|
|
750
|
+
post: {
|
|
751
|
+
parameters: {
|
|
752
|
+
query?: never;
|
|
753
|
+
header?: never;
|
|
754
|
+
path?: never;
|
|
755
|
+
cookie?: never;
|
|
756
|
+
};
|
|
757
|
+
requestBody?: {
|
|
758
|
+
content: {
|
|
759
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
760
|
+
data?: components["schemas"]["ModerationJobSummary"];
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
responses: {
|
|
765
|
+
/** @description Received */
|
|
766
|
+
200: {
|
|
767
|
+
headers: {
|
|
768
|
+
[name: string]: unknown;
|
|
769
|
+
};
|
|
770
|
+
content?: never;
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
};
|
|
774
|
+
delete?: never;
|
|
775
|
+
options?: never;
|
|
776
|
+
head?: never;
|
|
777
|
+
patch?: never;
|
|
778
|
+
trace?: never;
|
|
779
|
+
};
|
|
780
|
+
"document_check.completed": {
|
|
781
|
+
parameters: {
|
|
782
|
+
query?: never;
|
|
783
|
+
header?: never;
|
|
784
|
+
path?: never;
|
|
785
|
+
cookie?: never;
|
|
786
|
+
};
|
|
787
|
+
get?: never;
|
|
788
|
+
put?: never;
|
|
789
|
+
post: {
|
|
790
|
+
parameters: {
|
|
791
|
+
query?: never;
|
|
792
|
+
header?: never;
|
|
793
|
+
path?: never;
|
|
794
|
+
cookie?: never;
|
|
795
|
+
};
|
|
796
|
+
requestBody?: {
|
|
797
|
+
content: {
|
|
798
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
799
|
+
data?: components["schemas"]["DocumentCheck"];
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
};
|
|
803
|
+
responses: {
|
|
804
|
+
/** @description Received */
|
|
805
|
+
200: {
|
|
806
|
+
headers: {
|
|
807
|
+
[name: string]: unknown;
|
|
808
|
+
};
|
|
809
|
+
content?: never;
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
delete?: never;
|
|
814
|
+
options?: never;
|
|
815
|
+
head?: never;
|
|
816
|
+
patch?: never;
|
|
817
|
+
trace?: never;
|
|
818
|
+
};
|
|
819
|
+
"session.completed": {
|
|
820
|
+
parameters: {
|
|
821
|
+
query?: never;
|
|
822
|
+
header?: never;
|
|
823
|
+
path?: never;
|
|
824
|
+
cookie?: never;
|
|
825
|
+
};
|
|
826
|
+
get?: never;
|
|
827
|
+
put?: never;
|
|
828
|
+
post: {
|
|
829
|
+
parameters: {
|
|
830
|
+
query?: never;
|
|
831
|
+
header?: never;
|
|
832
|
+
path?: never;
|
|
833
|
+
cookie?: never;
|
|
834
|
+
};
|
|
835
|
+
requestBody?: {
|
|
836
|
+
content: {
|
|
837
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
838
|
+
data?: components["schemas"]["SessionStatus"];
|
|
839
|
+
};
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
responses: {
|
|
843
|
+
/** @description Received */
|
|
844
|
+
200: {
|
|
845
|
+
headers: {
|
|
846
|
+
[name: string]: unknown;
|
|
847
|
+
};
|
|
848
|
+
content?: never;
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
delete?: never;
|
|
853
|
+
options?: never;
|
|
854
|
+
head?: never;
|
|
855
|
+
patch?: never;
|
|
856
|
+
trace?: never;
|
|
857
|
+
};
|
|
858
|
+
"subject.erased": {
|
|
859
|
+
parameters: {
|
|
860
|
+
query?: never;
|
|
861
|
+
header?: never;
|
|
862
|
+
path?: never;
|
|
863
|
+
cookie?: never;
|
|
864
|
+
};
|
|
865
|
+
get?: never;
|
|
866
|
+
put?: never;
|
|
867
|
+
post: {
|
|
868
|
+
parameters: {
|
|
869
|
+
query?: never;
|
|
870
|
+
header?: never;
|
|
871
|
+
path?: never;
|
|
872
|
+
cookie?: never;
|
|
873
|
+
};
|
|
874
|
+
requestBody?: {
|
|
875
|
+
content: {
|
|
876
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
877
|
+
data?: {
|
|
878
|
+
subject_id: components["schemas"]["SubjectId"];
|
|
879
|
+
/** Format: date-time */
|
|
880
|
+
erased_at: string;
|
|
881
|
+
scopes: ("transcripts" | "screening_texts" | "memory" | "indexes" | "sessions" | "local_payload_removal" | "index_and_cache_deletion")[];
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
responses: {
|
|
887
|
+
/** @description Received */
|
|
888
|
+
200: {
|
|
889
|
+
headers: {
|
|
890
|
+
[name: string]: unknown;
|
|
891
|
+
};
|
|
892
|
+
content?: never;
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
delete?: never;
|
|
897
|
+
options?: never;
|
|
898
|
+
head?: never;
|
|
899
|
+
patch?: never;
|
|
900
|
+
trace?: never;
|
|
901
|
+
};
|
|
902
|
+
"usage.threshold_reached": {
|
|
903
|
+
parameters: {
|
|
904
|
+
query?: never;
|
|
905
|
+
header?: never;
|
|
906
|
+
path?: never;
|
|
907
|
+
cookie?: never;
|
|
908
|
+
};
|
|
909
|
+
get?: never;
|
|
910
|
+
put?: never;
|
|
911
|
+
post: {
|
|
912
|
+
parameters: {
|
|
913
|
+
query?: never;
|
|
914
|
+
header?: never;
|
|
915
|
+
path?: never;
|
|
916
|
+
cookie?: never;
|
|
917
|
+
};
|
|
918
|
+
requestBody?: {
|
|
919
|
+
content: {
|
|
920
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
921
|
+
data?: {
|
|
922
|
+
feature: components["schemas"]["Feature"];
|
|
923
|
+
/** @enum {integer} */
|
|
924
|
+
percent: 50 | 80 | 100;
|
|
925
|
+
period: string;
|
|
926
|
+
used: components["schemas"]["MicroMoney"];
|
|
927
|
+
cap: components["schemas"]["MicroMoney"];
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
};
|
|
932
|
+
responses: {
|
|
933
|
+
/** @description Received */
|
|
934
|
+
200: {
|
|
935
|
+
headers: {
|
|
936
|
+
[name: string]: unknown;
|
|
937
|
+
};
|
|
938
|
+
content?: never;
|
|
939
|
+
};
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
delete?: never;
|
|
943
|
+
options?: never;
|
|
944
|
+
head?: never;
|
|
945
|
+
patch?: never;
|
|
946
|
+
trace?: never;
|
|
947
|
+
};
|
|
948
|
+
"conversation.updated": {
|
|
949
|
+
parameters: {
|
|
950
|
+
query?: never;
|
|
951
|
+
header?: never;
|
|
952
|
+
path?: never;
|
|
953
|
+
cookie?: never;
|
|
954
|
+
};
|
|
955
|
+
get?: never;
|
|
956
|
+
put?: never;
|
|
957
|
+
/** @description The state changed while the conversation goes on: an answer was recorded, a rejection changed the state (for example a refused submission re-opened a question), the pending question changed, or a new session resumed it. `data.status` is `in_progress`, or `failed` while a submission's outcome is unknown. Guided-flow conversations only, delivered only to an endpoint that lists this type by name (never to one that takes every type). A test delivery (`data.test: true`) carries no state: skip it. See `docs/conversation-state.md`. */
|
|
958
|
+
post: {
|
|
959
|
+
parameters: {
|
|
960
|
+
query?: never;
|
|
961
|
+
header?: never;
|
|
962
|
+
path?: never;
|
|
963
|
+
cookie?: never;
|
|
964
|
+
};
|
|
965
|
+
requestBody?: {
|
|
966
|
+
content: {
|
|
967
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
968
|
+
/** @constant */
|
|
969
|
+
type?: "conversation.updated";
|
|
970
|
+
data?: components["schemas"]["ConversationState"] & {
|
|
971
|
+
/** @enum {unknown} */
|
|
972
|
+
status?: "in_progress" | "failed";
|
|
973
|
+
flow?: string;
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
responses: {
|
|
979
|
+
/** @description Received */
|
|
980
|
+
200: {
|
|
981
|
+
headers: {
|
|
982
|
+
[name: string]: unknown;
|
|
983
|
+
};
|
|
984
|
+
content?: never;
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
};
|
|
988
|
+
delete?: never;
|
|
989
|
+
options?: never;
|
|
990
|
+
head?: never;
|
|
991
|
+
patch?: never;
|
|
992
|
+
trace?: never;
|
|
993
|
+
};
|
|
994
|
+
"conversation.completed": {
|
|
995
|
+
parameters: {
|
|
996
|
+
query?: never;
|
|
997
|
+
header?: never;
|
|
998
|
+
path?: never;
|
|
999
|
+
cookie?: never;
|
|
1000
|
+
};
|
|
1001
|
+
get?: never;
|
|
1002
|
+
put?: never;
|
|
1003
|
+
/** @description The flow was submitted and the tenant accepted it; `data.status` is `completed`. Guided-flow conversations only, delivered only to an endpoint that lists this type by name (never to one that takes every type). A test delivery (`data.test: true`) carries no state: skip it. See `docs/conversation-state.md`. */
|
|
1004
|
+
post: {
|
|
1005
|
+
parameters: {
|
|
1006
|
+
query?: never;
|
|
1007
|
+
header?: never;
|
|
1008
|
+
path?: never;
|
|
1009
|
+
cookie?: never;
|
|
1010
|
+
};
|
|
1011
|
+
requestBody?: {
|
|
1012
|
+
content: {
|
|
1013
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
1014
|
+
/** @constant */
|
|
1015
|
+
type?: "conversation.completed";
|
|
1016
|
+
data?: components["schemas"]["ConversationState"] & {
|
|
1017
|
+
/** @enum {unknown} */
|
|
1018
|
+
status?: "completed";
|
|
1019
|
+
flow?: string;
|
|
1020
|
+
};
|
|
1021
|
+
};
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
responses: {
|
|
1025
|
+
/** @description Received */
|
|
1026
|
+
200: {
|
|
1027
|
+
headers: {
|
|
1028
|
+
[name: string]: unknown;
|
|
1029
|
+
};
|
|
1030
|
+
content?: never;
|
|
1031
|
+
};
|
|
1032
|
+
};
|
|
1033
|
+
};
|
|
1034
|
+
delete?: never;
|
|
1035
|
+
options?: never;
|
|
1036
|
+
head?: never;
|
|
1037
|
+
patch?: never;
|
|
1038
|
+
trace?: never;
|
|
1039
|
+
};
|
|
1040
|
+
"conversation.failed": {
|
|
1041
|
+
parameters: {
|
|
1042
|
+
query?: never;
|
|
1043
|
+
header?: never;
|
|
1044
|
+
path?: never;
|
|
1045
|
+
cookie?: never;
|
|
1046
|
+
};
|
|
1047
|
+
get?: never;
|
|
1048
|
+
put?: never;
|
|
1049
|
+
/** @description A submission is not known to be accepted (`flow.completed` with `failed`); `data.status` is `failed`. Guided-flow conversations only, delivered only to an endpoint that lists this type by name (never to one that takes every type). A test delivery (`data.test: true`) carries no state: skip it. See `docs/conversation-state.md`. */
|
|
1050
|
+
post: {
|
|
1051
|
+
parameters: {
|
|
1052
|
+
query?: never;
|
|
1053
|
+
header?: never;
|
|
1054
|
+
path?: never;
|
|
1055
|
+
cookie?: never;
|
|
1056
|
+
};
|
|
1057
|
+
requestBody?: {
|
|
1058
|
+
content: {
|
|
1059
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
1060
|
+
/** @constant */
|
|
1061
|
+
type?: "conversation.failed";
|
|
1062
|
+
data?: components["schemas"]["ConversationState"] & {
|
|
1063
|
+
/** @enum {unknown} */
|
|
1064
|
+
status?: "failed";
|
|
1065
|
+
flow?: string;
|
|
1066
|
+
};
|
|
1067
|
+
};
|
|
1068
|
+
};
|
|
1069
|
+
};
|
|
1070
|
+
responses: {
|
|
1071
|
+
/** @description Received */
|
|
1072
|
+
200: {
|
|
1073
|
+
headers: {
|
|
1074
|
+
[name: string]: unknown;
|
|
1075
|
+
};
|
|
1076
|
+
content?: never;
|
|
1077
|
+
};
|
|
1078
|
+
};
|
|
1079
|
+
};
|
|
1080
|
+
delete?: never;
|
|
1081
|
+
options?: never;
|
|
1082
|
+
head?: never;
|
|
1083
|
+
patch?: never;
|
|
1084
|
+
trace?: never;
|
|
1085
|
+
};
|
|
1086
|
+
"conversation.expired": {
|
|
1087
|
+
parameters: {
|
|
1088
|
+
query?: never;
|
|
1089
|
+
header?: never;
|
|
1090
|
+
path?: never;
|
|
1091
|
+
cookie?: never;
|
|
1092
|
+
};
|
|
1093
|
+
get?: never;
|
|
1094
|
+
put?: never;
|
|
1095
|
+
/** @description Retention or the tenant's `conversation_max_days` (`admin-v1.yaml`, at most 30) ended the conversation; `data` is its last state, with `status: expired`. `getConversation` still returns it for 72 hours. Guided-flow conversations only, delivered only to an endpoint that lists this type by name (never to one that takes every type). A test delivery (`data.test: true`) carries no state: skip it. See `docs/conversation-state.md`. */
|
|
1096
|
+
post: {
|
|
1097
|
+
parameters: {
|
|
1098
|
+
query?: never;
|
|
1099
|
+
header?: never;
|
|
1100
|
+
path?: never;
|
|
1101
|
+
cookie?: never;
|
|
1102
|
+
};
|
|
1103
|
+
requestBody?: {
|
|
1104
|
+
content: {
|
|
1105
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
1106
|
+
/** @constant */
|
|
1107
|
+
type?: "conversation.expired";
|
|
1108
|
+
data?: components["schemas"]["ConversationState"] & {
|
|
1109
|
+
/** @enum {unknown} */
|
|
1110
|
+
status?: "expired";
|
|
1111
|
+
flow?: string;
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
responses: {
|
|
1117
|
+
/** @description Received */
|
|
1118
|
+
200: {
|
|
1119
|
+
headers: {
|
|
1120
|
+
[name: string]: unknown;
|
|
1121
|
+
};
|
|
1122
|
+
content?: never;
|
|
1123
|
+
};
|
|
1124
|
+
};
|
|
1125
|
+
};
|
|
1126
|
+
delete?: never;
|
|
1127
|
+
options?: never;
|
|
1128
|
+
head?: never;
|
|
1129
|
+
patch?: never;
|
|
1130
|
+
trace?: never;
|
|
1131
|
+
};
|
|
1132
|
+
"feature.state_changed": {
|
|
1133
|
+
parameters: {
|
|
1134
|
+
query?: never;
|
|
1135
|
+
header?: never;
|
|
1136
|
+
path?: never;
|
|
1137
|
+
cookie?: never;
|
|
1138
|
+
};
|
|
1139
|
+
get?: never;
|
|
1140
|
+
put?: never;
|
|
1141
|
+
post: {
|
|
1142
|
+
parameters: {
|
|
1143
|
+
query?: never;
|
|
1144
|
+
header?: never;
|
|
1145
|
+
path?: never;
|
|
1146
|
+
cookie?: never;
|
|
1147
|
+
};
|
|
1148
|
+
requestBody?: {
|
|
1149
|
+
content: {
|
|
1150
|
+
"application/json": components["schemas"]["WebhookEnvelope"] & {
|
|
1151
|
+
data?: {
|
|
1152
|
+
feature: components["schemas"]["Feature"];
|
|
1153
|
+
/** @enum {string} */
|
|
1154
|
+
state: "enabled" | "disabled";
|
|
1155
|
+
/** @enum {string} */
|
|
1156
|
+
reason: "cap_reached" | "studio" | "incident" | "period_reset";
|
|
1157
|
+
};
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
responses: {
|
|
1162
|
+
/** @description Received */
|
|
1163
|
+
200: {
|
|
1164
|
+
headers: {
|
|
1165
|
+
[name: string]: unknown;
|
|
1166
|
+
};
|
|
1167
|
+
content?: never;
|
|
1168
|
+
};
|
|
1169
|
+
};
|
|
1170
|
+
};
|
|
1171
|
+
delete?: never;
|
|
1172
|
+
options?: never;
|
|
1173
|
+
head?: never;
|
|
1174
|
+
patch?: never;
|
|
1175
|
+
trace?: never;
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
interface components {
|
|
1179
|
+
schemas: {
|
|
1180
|
+
Problem: {
|
|
1181
|
+
/** Format: uri */
|
|
1182
|
+
type: string;
|
|
1183
|
+
title: string;
|
|
1184
|
+
status: number;
|
|
1185
|
+
/** @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";
|
|
1187
|
+
detail?: string;
|
|
1188
|
+
request_id: string;
|
|
1189
|
+
retryable: boolean;
|
|
1190
|
+
/** @description field-level problems for invalid_request */
|
|
1191
|
+
errors?: {
|
|
1192
|
+
/** @description JSON Pointer into the request */
|
|
1193
|
+
pointer: string;
|
|
1194
|
+
message: string;
|
|
1195
|
+
}[];
|
|
1196
|
+
};
|
|
1197
|
+
Money: {
|
|
1198
|
+
/** @description minor units */
|
|
1199
|
+
amount: number;
|
|
1200
|
+
currency: string;
|
|
1201
|
+
};
|
|
1202
|
+
MicroMoney: {
|
|
1203
|
+
/** @description millionths of the currency unit */
|
|
1204
|
+
amount_micros: number;
|
|
1205
|
+
currency: string;
|
|
1206
|
+
};
|
|
1207
|
+
SubjectId: string;
|
|
1208
|
+
/** @enum {string} */
|
|
1209
|
+
SubjectType: "client" | "professional" | "host" | "guest" | "staff";
|
|
1210
|
+
Subject: {
|
|
1211
|
+
id: components["schemas"]["SubjectId"];
|
|
1212
|
+
type: components["schemas"]["SubjectType"];
|
|
1213
|
+
/**
|
|
1214
|
+
* @example en-US
|
|
1215
|
+
* @example es-US
|
|
1216
|
+
* @example pt-BR
|
|
1217
|
+
*/
|
|
1218
|
+
locale?: string;
|
|
1219
|
+
/** @example America/New_York */
|
|
1220
|
+
timezone?: string;
|
|
1221
|
+
approximate_location?: {
|
|
1222
|
+
lat: number;
|
|
1223
|
+
lng: number;
|
|
1224
|
+
/** @enum {string} */
|
|
1225
|
+
precision: "city" | "neighborhood";
|
|
1226
|
+
};
|
|
1227
|
+
};
|
|
1228
|
+
/** @enum {string} */
|
|
1229
|
+
Feature: "assistant" | "moderation_image" | "moderation_video" | "moderation_text" | "screening" | "document_check" | "insights" | "suggestions";
|
|
1230
|
+
/**
|
|
1231
|
+
* @description `business_setup`: grants the business's own read tools and its `propose` tools (`tool-provider-v1.yaml`, `x-effect: propose`), for the `business_setup` agent; never a write tool. Only a subject of type `professional`, `host` or `staff` may be granted it. `booking_proposals`: grants the tenant's `propose` tools for a client's bookings (a booking, a reschedule, a cancellation the client confirms in the tenant's app), for the customer agent; never a write tool. Only a subject of type `client` may be granted it (`docs/agents-guardrails-suggestions-writes.md` §3.4). These two are the only capabilities that carry `propose` tools: `create_proposal` and every tenant `propose` tool require one of them. `flows`: grants the guided-flow endpoints (`tool-provider-v1.yaml`, `/flows/*`). It names no flow and no record: the tenant limits the `tool_access` token itself to one flow and one record. `my_orders`: grants reading the customer's own kits and orders from a styling-kit retailer (`tool-provider-v1.yaml`, `list_my_kits`, `get_my_kit`, `list_my_orders`, `get_my_order`), read only. Like `my_bookings`, it is meant for a signed-in `client`, and the tenant answers for the token's customer only.
|
|
1232
|
+
* @enum {string}
|
|
1233
|
+
*/
|
|
1234
|
+
Capability: "search" | "availability" | "quotes" | "my_bookings" | "policies" | "handoff" | "flows" | "business_setup" | "booking_proposals" | "my_orders";
|
|
1235
|
+
ToolAccess: {
|
|
1236
|
+
token: string;
|
|
1237
|
+
/** Format: date-time */
|
|
1238
|
+
expires_at: string;
|
|
1239
|
+
capabilities: components["schemas"]["Capability"][];
|
|
1240
|
+
};
|
|
1241
|
+
/** @description `candidates`, or `tool_access` alone (tool mode). With `candidates`, the tools are not read. */
|
|
1242
|
+
SuggestionsRequest: {
|
|
1243
|
+
/** @enum {string} */
|
|
1244
|
+
surface: "explore";
|
|
1245
|
+
/** @description a `client` or a `guest`; a guest has no history */
|
|
1246
|
+
subject: components["schemas"]["Subject"] & {
|
|
1247
|
+
/** @enum {unknown} */
|
|
1248
|
+
type?: "client" | "guest";
|
|
1249
|
+
};
|
|
1250
|
+
/**
|
|
1251
|
+
* @description whose guardrails apply
|
|
1252
|
+
* @default customer_assistant
|
|
1253
|
+
* @example customer_assistant
|
|
1254
|
+
*/
|
|
1255
|
+
agent: string;
|
|
1256
|
+
context?: {
|
|
1257
|
+
place?: {
|
|
1258
|
+
/** @example Midtown, Atlanta */
|
|
1259
|
+
label?: string;
|
|
1260
|
+
lat: number;
|
|
1261
|
+
lng: number;
|
|
1262
|
+
};
|
|
1263
|
+
/**
|
|
1264
|
+
* Format: date-time
|
|
1265
|
+
* @description the person's local time, with its offset
|
|
1266
|
+
*/
|
|
1267
|
+
local_time?: string;
|
|
1268
|
+
/** @description the filters the person has on, by name */
|
|
1269
|
+
filters?: {
|
|
1270
|
+
[key: string]: string;
|
|
1271
|
+
};
|
|
1272
|
+
};
|
|
1273
|
+
candidates?: components["schemas"]["SuggestionCandidate"][];
|
|
1274
|
+
/**
|
|
1275
|
+
* @description fewer good suggestions than this is an empty list
|
|
1276
|
+
* @default 3
|
|
1277
|
+
*/
|
|
1278
|
+
min: number;
|
|
1279
|
+
/**
|
|
1280
|
+
* @description at least `min`
|
|
1281
|
+
* @default 5
|
|
1282
|
+
*/
|
|
1283
|
+
max: number;
|
|
1284
|
+
/** @description Optional. Without `candidates`, the agent reads the tenant's `read` tools with it (tool mode). */
|
|
1285
|
+
tool_access?: components["schemas"]["ToolAccess"];
|
|
1286
|
+
} | unknown | unknown;
|
|
1287
|
+
SuggestionCandidate: {
|
|
1288
|
+
/**
|
|
1289
|
+
* @example pro:66f1a2
|
|
1290
|
+
* @example search:service:silk press
|
|
1291
|
+
*/
|
|
1292
|
+
ref: string;
|
|
1293
|
+
/**
|
|
1294
|
+
* @description what `ref` names
|
|
1295
|
+
* @enum {string}
|
|
1296
|
+
*/
|
|
1297
|
+
kind: "professional" | "space" | "class" | "service" | "search";
|
|
1298
|
+
title: string;
|
|
1299
|
+
/** @description Open: what the tenant knows about the candidate (price, rating, distance, next open time, whether the subject booked it before…). A key the agent does not know is ignored. `why` uses only these facts. */
|
|
1300
|
+
facts?: {
|
|
1301
|
+
[key: string]: unknown;
|
|
1302
|
+
};
|
|
1303
|
+
};
|
|
1304
|
+
SuggestionsResponse: {
|
|
1305
|
+
decision_id: string;
|
|
1306
|
+
/** @description between `min` and `max`, or empty */
|
|
1307
|
+
suggestions: components["schemas"]["Suggestion"][];
|
|
1308
|
+
/** @description true when any suggestion used the subject's own history; such a response is cached only per tenant, environment and `subject.id`. Always false for a guest. */
|
|
1309
|
+
personalized: boolean;
|
|
1310
|
+
usage: components["schemas"]["SuggestionsUsage"];
|
|
1311
|
+
};
|
|
1312
|
+
Suggestion: {
|
|
1313
|
+
/** @description one of the request's candidates (in tool mode, `<kind>:<id>` from a tool result); `null` only for `ask` */
|
|
1314
|
+
ref: string | null;
|
|
1315
|
+
/**
|
|
1316
|
+
* @description `open`: open the candidate. `search`: run its search. `ask`: open the agent with `question` in the composer, unsent.
|
|
1317
|
+
* @enum {string}
|
|
1318
|
+
*/
|
|
1319
|
+
action: "open" | "search" | "ask";
|
|
1320
|
+
/** @description in Unicode code points */
|
|
1321
|
+
title: string;
|
|
1322
|
+
/** @description a plain reason taken from the facts sent; in Unicode code points */
|
|
1323
|
+
why: string;
|
|
1324
|
+
/** @description `ask` only; in Unicode code points */
|
|
1325
|
+
question?: string;
|
|
1326
|
+
} & unknown;
|
|
1327
|
+
SuggestionsUsage: {
|
|
1328
|
+
/** @constant */
|
|
1329
|
+
unit: "request";
|
|
1330
|
+
quantity: number;
|
|
1331
|
+
cost: components["schemas"]["MicroMoney"];
|
|
1332
|
+
};
|
|
1333
|
+
SessionCreate: {
|
|
1334
|
+
/** @example customer_assistant */
|
|
1335
|
+
agent: string;
|
|
1336
|
+
subject: components["schemas"]["Subject"];
|
|
1337
|
+
tool_access: components["schemas"]["ToolAccess"];
|
|
1338
|
+
limits?: {
|
|
1339
|
+
max_turns?: number;
|
|
1340
|
+
max_duration_seconds?: number;
|
|
1341
|
+
};
|
|
1342
|
+
context?: {
|
|
1343
|
+
[key: string]: string;
|
|
1344
|
+
};
|
|
1345
|
+
/**
|
|
1346
|
+
* @description Optional. An opaque key the tenant chooses: printable ASCII, no spaces, at most 128 characters. It names a conversation within the tenant, the environment, the `subject.id` and the `agent`. A new session with the same key resumes that conversation; `createSession` describes resuming and its checks, the same whether a conversation is named by key or by `conversation_id`.
|
|
1347
|
+
* One session per conversation is open at a time. Creating a new one closes the older open session: its socket gets `session.closed` with reason `replaced` and close code `4409`, and the session ends as `revoked` (so in `SessionStatus` a replacement looks like a revoke). When two creations for the same conversation race, the later one wins. Conversation state lasts as long as the tenant's `transcript_retention`, counted from the conversation's creation, and never beyond the tenant's `conversation_max_days` (at most 30) from it, however often it is resumed. The key never reaches a model prompt, and logs keep only a hash of it.
|
|
1348
|
+
*/
|
|
1349
|
+
conversation_key?: string;
|
|
1350
|
+
/** @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
|
+
conversation_id?: components["schemas"]["ConversationId"];
|
|
1352
|
+
};
|
|
1353
|
+
ClientSecret: {
|
|
1354
|
+
/** @description `vv_cs_` and base64url characters, so the secret is a valid WebSocket subprotocol token in `bearer.<secret>`. */
|
|
1355
|
+
value: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* Format: date-time
|
|
1358
|
+
* @description The end of the connect window (120 s after issue): the secret must open a connection (over SSE: run its first turn) by then. Once used, it is bound to the session until the session ends or a new secret is issued (`refreshClientSecret`), so the app reconnects with the same secret (and sends it on every SSE turn) without asking for a new one.
|
|
1359
|
+
*/
|
|
1360
|
+
expires_at: string;
|
|
1361
|
+
};
|
|
1362
|
+
Session: {
|
|
1363
|
+
id: string;
|
|
1364
|
+
/** @enum {string} */
|
|
1365
|
+
status: "open";
|
|
1366
|
+
agent: {
|
|
1367
|
+
id: string;
|
|
1368
|
+
version: string;
|
|
1369
|
+
display_name: string;
|
|
1370
|
+
};
|
|
1371
|
+
client_secret: components["schemas"]["ClientSecret"];
|
|
1372
|
+
/** Format: uri */
|
|
1373
|
+
realtime_url: string;
|
|
1374
|
+
/** Format: uri */
|
|
1375
|
+
turns_url: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* Format: date-time
|
|
1378
|
+
* @description When the session ends: the earliest of the session's own `limits.max_duration_seconds` (when `createSession` sets it), the agent's and the environment's longest session, and `tool_access.expires_at`. A short-lived tool token shortens the session. On the WebSocket, `session.expiring` comes 60 s before, then `session.closed` with `expired`.
|
|
1379
|
+
*/
|
|
1380
|
+
expires_at: string;
|
|
1381
|
+
disclosure: string;
|
|
1382
|
+
/** @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
|
+
conversation_id?: components["schemas"]["ConversationId"];
|
|
1384
|
+
};
|
|
1385
|
+
SessionStatus: {
|
|
1386
|
+
id: string;
|
|
1387
|
+
/** @enum {string} */
|
|
1388
|
+
status: "open" | "closed" | "revoked" | "expired";
|
|
1389
|
+
subject_id: components["schemas"]["SubjectId"];
|
|
1390
|
+
agent_version?: string;
|
|
1391
|
+
turns: number;
|
|
1392
|
+
handoff_ticket_ids?: string[];
|
|
1393
|
+
/**
|
|
1394
|
+
* @description Why the session ended. `server_restart` is reserved and never appears here: it never ends a session (`docs/realtime-protocol.md` §2).
|
|
1395
|
+
* @enum {string}
|
|
1396
|
+
*/
|
|
1397
|
+
end_reason?: "expired" | "revoked" | "limit_reached" | "idle" | "server_restart" | "user_left";
|
|
1398
|
+
/** Format: date-time */
|
|
1399
|
+
created_at: string;
|
|
1400
|
+
/** Format: date-time */
|
|
1401
|
+
closed_at?: string;
|
|
1402
|
+
usage?: components["schemas"]["Usage"];
|
|
1403
|
+
};
|
|
1404
|
+
TurnInput: {
|
|
1405
|
+
client_event_id?: string;
|
|
1406
|
+
text: string;
|
|
1407
|
+
};
|
|
1408
|
+
Usage: {
|
|
1409
|
+
/** @enum {string} */
|
|
1410
|
+
unit: "turn" | "image" | "video_second" | "text_item" | "screening_call" | "document_page";
|
|
1411
|
+
quantity: number;
|
|
1412
|
+
input_tokens?: number;
|
|
1413
|
+
output_tokens?: number;
|
|
1414
|
+
cost: components["schemas"]["MicroMoney"];
|
|
1415
|
+
};
|
|
1416
|
+
UsageReport: {
|
|
1417
|
+
period: string;
|
|
1418
|
+
features: {
|
|
1419
|
+
feature: components["schemas"]["Feature"];
|
|
1420
|
+
quantity: number;
|
|
1421
|
+
cost: components["schemas"]["MicroMoney"];
|
|
1422
|
+
/** @description null when the feature has no monthly cap */
|
|
1423
|
+
cap: components["schemas"]["MicroMoney"] | null;
|
|
1424
|
+
/** @enum {string} */
|
|
1425
|
+
state: "enabled" | "disabled";
|
|
1426
|
+
}[];
|
|
1427
|
+
};
|
|
1428
|
+
CardRef: {
|
|
1429
|
+
/** @enum {string} */
|
|
1430
|
+
type: "professional" | "workspace" | "service" | "booking" | "quote" | "policy" | "slot_list" | "ticket" | "metric_series" | "metric_table" | "gap_list" | "intent_cluster" | "memory_claim" | "knowledge_snippet";
|
|
1431
|
+
id: string;
|
|
1432
|
+
};
|
|
1433
|
+
CardAction: {
|
|
1434
|
+
/**
|
|
1435
|
+
* @description `confirmed`, `declined`, `failed` and `expired` are reserved for proposal outcomes, never a card action
|
|
1436
|
+
* @example open
|
|
1437
|
+
* @example show_times
|
|
1438
|
+
* @example show_more
|
|
1439
|
+
* @example get_quote
|
|
1440
|
+
* @example contact_support
|
|
1441
|
+
*/
|
|
1442
|
+
action: string;
|
|
1443
|
+
label: string;
|
|
1444
|
+
deep_link?: string;
|
|
1445
|
+
};
|
|
1446
|
+
/**
|
|
1447
|
+
* @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
|
+
* 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
|
|
1449
|
+
* `ui.action`, nor `createCardActionSse`, for it.
|
|
1450
|
+
* - **The link passes the deep-link rule** (`admin-v1.yaml`, `Connector.deep_link_prefixes`). It must be a
|
|
1451
|
+
* whole string value in the result of the tenant tool call that `source` names (`source.call_id`, the
|
|
1452
|
+
* tenant's `get_setup_state` for example), in the same session. A substring, or any other tool's result,
|
|
1453
|
+
* does not count, and the model never composes a link. It must start with a prefix the tenant registered
|
|
1454
|
+
* for the session's environment, compared code point for code point. And what follows the prefix must be
|
|
1455
|
+
* on an allowlist: path segments of `A`–`Z`, `a`–`z`, `0`–`9`, `.`, `_`, `~` and `-`, each with a character
|
|
1456
|
+
* that is not `.`, then optionally a query of those characters, `=`, `&` and `%20`–`%7E` escapes other
|
|
1457
|
+
* than `%25`, `%2F`, `%3A` and `%5C`. No `%` in the path, no fragment, nothing else. Query values are
|
|
1458
|
+
* data: the app never navigates to one.
|
|
1459
|
+
* - **A card whose link fails is dropped.** The model is told the step could not be shown, so the agent
|
|
1460
|
+
* does not point to a card, and the connector is flagged in Studio (`Connector.health`).
|
|
1461
|
+
* - **The app also checks** the page the link names on its own side, and drops a link to a page it does not
|
|
1462
|
+
* know.
|
|
1463
|
+
* - **It is not restored.** A `next_step` card is in neither `pending_cards` nor `transcript`; after a
|
|
1464
|
+
* reconnect the agent shows the step again once it reads the tenant's state.
|
|
1465
|
+
*/
|
|
1466
|
+
Card: {
|
|
1467
|
+
id: string;
|
|
1468
|
+
/**
|
|
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)
|
|
1470
|
+
* @enum {string}
|
|
1471
|
+
*/
|
|
1472
|
+
kind: "professional" | "workspace" | "service" | "time_slots" | "booking" | "quote" | "policy" | "handoff" | "metric_chart" | "metric_table" | "gap_list" | "cluster" | "claim" | "document" | "question" | "proposal" | "next_step";
|
|
1473
|
+
question?: components["schemas"]["Question"];
|
|
1474
|
+
proposal?: components["schemas"]["Proposal"];
|
|
1475
|
+
ref?: components["schemas"]["CardRef"];
|
|
1476
|
+
title: string;
|
|
1477
|
+
subtitle?: string;
|
|
1478
|
+
/** Format: uri */
|
|
1479
|
+
image_url?: string;
|
|
1480
|
+
rating?: {
|
|
1481
|
+
value_ppm: number;
|
|
1482
|
+
count: number;
|
|
1483
|
+
};
|
|
1484
|
+
price_from?: components["schemas"]["Money"];
|
|
1485
|
+
price?: components["schemas"]["Money"];
|
|
1486
|
+
/** Format: date-time */
|
|
1487
|
+
starts_at?: string;
|
|
1488
|
+
/** @description A `time_slots` card's open times, as the tenant's tool returned them: each with its `start` and `end` (its length), and the card's `subtitle` names the professional or space when the tool result does. Each has an `id` (v1-draft.17): the app may draw the slots as choices, and a tap sends `ui.action` `select_slot` with that `id` and the card's `source.call_id` (`SlotSelection`), over SSE through `createCardActionSse`. A slot without an `id` (an earlier runtime) is drawn read-only. */
|
|
1489
|
+
slots?: {
|
|
1490
|
+
/** @description Opaque, unique within the card, the same for the same slot of the same tool result. Never parse it. */
|
|
1491
|
+
id?: string;
|
|
1492
|
+
/** Format: date-time */
|
|
1493
|
+
start: string;
|
|
1494
|
+
/** Format: date-time */
|
|
1495
|
+
end: string;
|
|
1496
|
+
}[];
|
|
1497
|
+
status?: string;
|
|
1498
|
+
/** @description policy excerpt, handoff text, or what a `next_step` is for */
|
|
1499
|
+
body?: string;
|
|
1500
|
+
badges?: string[];
|
|
1501
|
+
actions: components["schemas"]["CardAction"][];
|
|
1502
|
+
source: {
|
|
1503
|
+
tool: string;
|
|
1504
|
+
call_id: string;
|
|
1505
|
+
/** @description optional; the tool arguments that produced this card (shown by Studio as the source query) */
|
|
1506
|
+
arguments?: Record<string, unknown>;
|
|
1507
|
+
};
|
|
1508
|
+
metric?: components["schemas"]["MetricRef"];
|
|
1509
|
+
/** @enum {string} */
|
|
1510
|
+
grain?: "day" | "week";
|
|
1511
|
+
period?: {
|
|
1512
|
+
/** Format: date */
|
|
1513
|
+
from: string;
|
|
1514
|
+
/** Format: date */
|
|
1515
|
+
to: string;
|
|
1516
|
+
};
|
|
1517
|
+
series?: {
|
|
1518
|
+
key: string;
|
|
1519
|
+
label: string;
|
|
1520
|
+
points: {
|
|
1521
|
+
/** Format: date */
|
|
1522
|
+
t: string;
|
|
1523
|
+
/** @description null when suppressed by the k-anonymity floor */
|
|
1524
|
+
value: number | null;
|
|
1525
|
+
suppressed?: boolean;
|
|
1526
|
+
}[];
|
|
1527
|
+
}[];
|
|
1528
|
+
dimensions?: {
|
|
1529
|
+
key: string;
|
|
1530
|
+
label: string;
|
|
1531
|
+
}[];
|
|
1532
|
+
columns?: {
|
|
1533
|
+
key: string;
|
|
1534
|
+
label: string;
|
|
1535
|
+
unit: components["schemas"]["ValueUnit"];
|
|
1536
|
+
}[];
|
|
1537
|
+
rows?: {
|
|
1538
|
+
dims: {
|
|
1539
|
+
[key: string]: string;
|
|
1540
|
+
};
|
|
1541
|
+
values: {
|
|
1542
|
+
[key: string]: number | null;
|
|
1543
|
+
};
|
|
1544
|
+
}[];
|
|
1545
|
+
/** @description gap_list entries */
|
|
1546
|
+
items?: {
|
|
1547
|
+
service: string;
|
|
1548
|
+
area: string;
|
|
1549
|
+
demand: number;
|
|
1550
|
+
supply: number;
|
|
1551
|
+
zero_result_share_ppm: number;
|
|
1552
|
+
trend_ppm?: number | null;
|
|
1553
|
+
}[];
|
|
1554
|
+
label?: string;
|
|
1555
|
+
count?: number;
|
|
1556
|
+
share_ppm?: number;
|
|
1557
|
+
/** @enum {string} */
|
|
1558
|
+
outcome?: "zero_results" | "withheld" | "handoff" | "mixed";
|
|
1559
|
+
/** @description redacted */
|
|
1560
|
+
examples?: string[];
|
|
1561
|
+
claim?: {
|
|
1562
|
+
id: string;
|
|
1563
|
+
statement: string;
|
|
1564
|
+
/** @enum {string} */
|
|
1565
|
+
status: "candidate" | "confirmed" | "rejected";
|
|
1566
|
+
evidence: {
|
|
1567
|
+
label: string;
|
|
1568
|
+
call_id: string;
|
|
1569
|
+
}[];
|
|
1570
|
+
/** Format: date-time */
|
|
1571
|
+
proposed_at: string;
|
|
1572
|
+
decided_by?: string | null;
|
|
1573
|
+
/** Format: date-time */
|
|
1574
|
+
decided_at?: string | null;
|
|
1575
|
+
};
|
|
1576
|
+
document?: {
|
|
1577
|
+
title: string;
|
|
1578
|
+
section?: string;
|
|
1579
|
+
url?: string;
|
|
1580
|
+
version?: string;
|
|
1581
|
+
};
|
|
1582
|
+
snippet?: string;
|
|
1583
|
+
/** Format: date-time */
|
|
1584
|
+
updated_at?: string;
|
|
1585
|
+
} & (unknown & unknown & unknown);
|
|
1586
|
+
/** @enum {string} */
|
|
1587
|
+
ValueUnit: "count" | "ppm" | "micros_usd" | "ms";
|
|
1588
|
+
MetricRef: {
|
|
1589
|
+
name: string;
|
|
1590
|
+
label: string;
|
|
1591
|
+
unit: components["schemas"]["ValueUnit"];
|
|
1592
|
+
definition: string;
|
|
1593
|
+
k_floor?: number;
|
|
1594
|
+
};
|
|
1595
|
+
/** @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. */
|
|
1596
|
+
Citation: {
|
|
1597
|
+
start: number;
|
|
1598
|
+
end: number;
|
|
1599
|
+
card_id?: string;
|
|
1600
|
+
call_id?: string;
|
|
1601
|
+
};
|
|
1602
|
+
/** @description The tenant's stable ref for a question (or a `rate_each` row), echoed in answers. */
|
|
1603
|
+
QuestionId: string;
|
|
1604
|
+
/** @enum {string} */
|
|
1605
|
+
QuestionKind: "single_choice" | "multi_choice" | "image_choice" | "yes_no" | "list_choice" | "rate_each" | "short_text" | "long_text" | "date" | "number" | "scale" | "photo";
|
|
1606
|
+
QuestionOption: {
|
|
1607
|
+
/** @description The tenant's stable ref for this choice. Answers carry it, never the label. */
|
|
1608
|
+
value: string;
|
|
1609
|
+
label: string;
|
|
1610
|
+
/**
|
|
1611
|
+
* Format: uri
|
|
1612
|
+
* @description on the tenant's CDN; required for `image_choice`
|
|
1613
|
+
*/
|
|
1614
|
+
image_url?: string;
|
|
1615
|
+
description?: string;
|
|
1616
|
+
};
|
|
1617
|
+
/**
|
|
1618
|
+
* @description One question of a guided flow, as the app renders it natively. The tenant's definition supplies every field except `prompt` (the agent's phrasing), `progress`, `state`, `answer` and `row_answers`. Option `value`s are the tenant's refs: the server rejects any value that is not on the card. For `rate_each`, each row is its own question with its own `question_id`, and `options` are the columns. The newest `open` question card is the one to answer. An `answered` card is drawn locked with its `answer`. A `superseded` card was replaced by a newer one and takes no answer.
|
|
1619
|
+
* A `rate_each` card has no single `answer`. Its answered rows are in `row_answers`, on any card where at least one row is answered, in `pending_cards` too. Each answered row is drawn locked, and the others stay open. The card is `answered` only when every row has an answer. A row of a question that is not `required` may be answered `skipped`.
|
|
1620
|
+
*/
|
|
1621
|
+
Question: {
|
|
1622
|
+
question_id: components["schemas"]["QuestionId"];
|
|
1623
|
+
kind: components["schemas"]["QuestionKind"];
|
|
1624
|
+
/** @description the question as the agent phrased it */
|
|
1625
|
+
prompt: string;
|
|
1626
|
+
/** @description optional, from the definition */
|
|
1627
|
+
help?: string;
|
|
1628
|
+
/** @description when false the person may skip it (`answer.skipped`) */
|
|
1629
|
+
required: boolean;
|
|
1630
|
+
/** @description The choices, and for `rate_each` the columns. Choice kinds and `rate_each` need at least 2 and at most 12; `yes_no` needs exactly 2; `list_choice` allows up to 500. */
|
|
1631
|
+
options?: components["schemas"]["QuestionOption"][];
|
|
1632
|
+
/** @description fewest selections (`multi_choice`, `image_choice`) */
|
|
1633
|
+
min?: number;
|
|
1634
|
+
/** @description most selections (`multi_choice`, `image_choice`) */
|
|
1635
|
+
max?: number;
|
|
1636
|
+
/**
|
|
1637
|
+
* @description offers a free-text "Other", answered with `other_text`
|
|
1638
|
+
* @default false
|
|
1639
|
+
*/
|
|
1640
|
+
allows_other: boolean;
|
|
1641
|
+
/**
|
|
1642
|
+
* @description With `allows_other` only: the longest "Other" text (`other_text`), in Unicode code points; 500 when absent. A longer `ui.answer` is rejected with `invalid_value` at any length, past 500 too (`AnswerInput`), and its `message` names the limit, so an app that predates this field can say why. Other text the agent takes from a typed message is held to it too: the runtime asks for a shorter one and never submits a longer one. The app enforces it as the person types.
|
|
1643
|
+
* @default 500
|
|
1644
|
+
*/
|
|
1645
|
+
other_max_length: number;
|
|
1646
|
+
/** @description an exclusive choice, answered as `values` with its `value` alone */
|
|
1647
|
+
none_of_the_above?: {
|
|
1648
|
+
value: string;
|
|
1649
|
+
label: string;
|
|
1650
|
+
};
|
|
1651
|
+
/** @description `rate_each` only: each row is rated on the `options` scale and answered on its own `question_id` */
|
|
1652
|
+
rows?: {
|
|
1653
|
+
question_id: components["schemas"]["QuestionId"];
|
|
1654
|
+
label: string;
|
|
1655
|
+
/** Format: uri */
|
|
1656
|
+
image_url?: string;
|
|
1657
|
+
}[];
|
|
1658
|
+
/** @description `short_text` (max_length at most 200) and `long_text` (at most 2000) */
|
|
1659
|
+
text?: {
|
|
1660
|
+
max_length: number;
|
|
1661
|
+
};
|
|
1662
|
+
number?: {
|
|
1663
|
+
min: number;
|
|
1664
|
+
max: number;
|
|
1665
|
+
step: number;
|
|
1666
|
+
/**
|
|
1667
|
+
* @example cm
|
|
1668
|
+
* @example kg
|
|
1669
|
+
* @example years
|
|
1670
|
+
*/
|
|
1671
|
+
unit?: string;
|
|
1672
|
+
};
|
|
1673
|
+
/** @description optional bounds, inclusive */
|
|
1674
|
+
date?: {
|
|
1675
|
+
/** Format: date */
|
|
1676
|
+
min?: string;
|
|
1677
|
+
/** Format: date */
|
|
1678
|
+
max?: string;
|
|
1679
|
+
};
|
|
1680
|
+
scale?: {
|
|
1681
|
+
min: number;
|
|
1682
|
+
max: number;
|
|
1683
|
+
step: number;
|
|
1684
|
+
min_label: string;
|
|
1685
|
+
max_label: string;
|
|
1686
|
+
};
|
|
1687
|
+
/** @description The app uploads the photo to the tenant (never through Vinaverse) and answers with the `upload_ref` the tenant issued. */
|
|
1688
|
+
photo?: {
|
|
1689
|
+
max_bytes: number;
|
|
1690
|
+
mime_types: string[];
|
|
1691
|
+
};
|
|
1692
|
+
/** @description `total` is an estimate when the flow branches */
|
|
1693
|
+
progress?: {
|
|
1694
|
+
step: number;
|
|
1695
|
+
total: number;
|
|
1696
|
+
};
|
|
1697
|
+
/** @enum {string} */
|
|
1698
|
+
state: "open" | "answered" | "superseded";
|
|
1699
|
+
/** @description the recorded answer, when `state` is `answered`; never on `rate_each` (see `row_answers`) */
|
|
1700
|
+
answer?: components["schemas"]["QuestionAnswer"];
|
|
1701
|
+
/** @description `rate_each` only: the rows answered so far, each on its row's `question_id`, and each row at most once. A row is answered with one column (`values` holding one value, never `other_text`) or, when the question is not `required`, `skipped`. */
|
|
1702
|
+
row_answers?: components["schemas"]["RowAnswer"][];
|
|
1703
|
+
} & (unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown & unknown);
|
|
1704
|
+
/** @description A `rate_each` row's answer: one column (`values` holding one value, never `other_text`) or `skipped`. */
|
|
1705
|
+
RowAnswer: {
|
|
1706
|
+
question_id: components["schemas"]["QuestionId"];
|
|
1707
|
+
answer: components["schemas"]["QuestionAnswer"] & ({
|
|
1708
|
+
values: unknown;
|
|
1709
|
+
} | unknown) & unknown;
|
|
1710
|
+
};
|
|
1711
|
+
ConversationId: string;
|
|
1712
|
+
/**
|
|
1713
|
+
* @description Where one conversation stands, for the tenant backend that created its sessions. It is the `data` of the conversation webhooks and the response of `getConversation`. The backend keeps a durable copy, so it still has the answers after Vinaverse's state ends.
|
|
1714
|
+
* **Personal data.** It never carries the transcript or the `conversation_key`, and nothing about the person beyond the opaque `subject_id` except what the person gave the flow. The answers and remarks (`text`, `other_text`, `upload_ref`, the verbatim remarks) are personal data the person gave the tenant's flow; handle them as such. The object is closed: no other field is ever added to it without a contract change.
|
|
1715
|
+
* **`sequence`** is one counter per conversation, shared by the webhooks and `getConversation`. It goes up by one on every change to any field, `session_id` included, and on nothing else; `last_activity_at` is the time of that change. Each step produces exactly one webhook, so a gap means a delivery still to come. Two states with the same `sequence` are identical. A terminal event (`completed`, `expired`) always takes a new, higher `sequence`.
|
|
1716
|
+
* **Receiving.** Delivery is at least once and in no guaranteed order. Keep, per `conversation_id`, the state with the highest `sequence`, and ignore an equal or lower one. A state with `answers_omitted: true` updates every other field, and never replaces `answers` and `remarks` already held. Merge it, then read the full state with `getConversation`.
|
|
1717
|
+
* **Size.** A webhook body is at most 64 KB: 65,536 bytes of the UTF-8 request body, envelope included. When the state would make it larger, the webhook leaves out `answers` and `remarks` and sets `answers_omitted: true`.
|
|
1718
|
+
*/
|
|
1719
|
+
ConversationState: {
|
|
1720
|
+
conversation_id: components["schemas"]["ConversationId"];
|
|
1721
|
+
subject_id: components["schemas"]["SubjectId"];
|
|
1722
|
+
/** @description the agent profile the conversation runs under */
|
|
1723
|
+
agent: string;
|
|
1724
|
+
/** @description the guided flow's name; null outside a guided flow */
|
|
1725
|
+
flow: string | null;
|
|
1726
|
+
/** @description the flow definition version the answers follow; null outside a guided flow */
|
|
1727
|
+
version: number | null;
|
|
1728
|
+
/**
|
|
1729
|
+
* @description `completed`: submitted and accepted. `failed`: the last submission is not known to be accepted (`flow.completed failed`); a later retry, in this session or a later one, can still complete it. `expired`: retention or `conversation_max_days` ended it.
|
|
1730
|
+
* @enum {string}
|
|
1731
|
+
*/
|
|
1732
|
+
status: "in_progress" | "completed" | "failed" | "expired";
|
|
1733
|
+
sequence: number;
|
|
1734
|
+
progress: {
|
|
1735
|
+
/** @description questions answered, a `rate_each` row counting as one */
|
|
1736
|
+
answered: number;
|
|
1737
|
+
/** @description an estimate when the flow branches; null outside a guided flow */
|
|
1738
|
+
total_estimate: number | null;
|
|
1739
|
+
};
|
|
1740
|
+
/** @description the open question, or null when none is open (finished, between questions, or no flow) */
|
|
1741
|
+
pending_question_id: components["schemas"]["QuestionId"] | null;
|
|
1742
|
+
/** @description The answers recorded so far, in the order they were given. */
|
|
1743
|
+
answers?: components["schemas"]["ConversationAnswer"][];
|
|
1744
|
+
/** @description By `question_id`, extra things the person volunteered; never answers. */
|
|
1745
|
+
remarks?: {
|
|
1746
|
+
[key: string]: string;
|
|
1747
|
+
};
|
|
1748
|
+
/** @description true when a webhook left out `answers` and `remarks` to stay within 64 KB; never in `getConversation` */
|
|
1749
|
+
answers_omitted?: boolean;
|
|
1750
|
+
/**
|
|
1751
|
+
* Format: date-time
|
|
1752
|
+
* @description the time of the change that produced this `sequence`
|
|
1753
|
+
*/
|
|
1754
|
+
last_activity_at: string;
|
|
1755
|
+
/** @description the latest session of the conversation */
|
|
1756
|
+
session_id: string;
|
|
1757
|
+
} & unknown;
|
|
1758
|
+
/** @description One recorded answer: `{ question_id, answer }`, or for `rate_each` `{ question_id, row_answers }`. */
|
|
1759
|
+
ConversationAnswer: {
|
|
1760
|
+
question_id: components["schemas"]["QuestionId"];
|
|
1761
|
+
answer: components["schemas"]["QuestionAnswer"];
|
|
1762
|
+
} | {
|
|
1763
|
+
question_id: components["schemas"]["QuestionId"];
|
|
1764
|
+
row_answers: components["schemas"]["RowAnswer"][];
|
|
1765
|
+
};
|
|
1766
|
+
/** @description Exactly one of: `values` (option values, validated against the card; one for single-choice kinds), `other_text` (the free-text "Other", when `allows_other`), `text`, `number`, `date` (YYYY-MM-DD), `upload_ref` (`photo`) or `skipped` (only when the question is not `required`). The one combination is `values` with `other_text`, for a `single_choice` or `multi_choice` question that `allows_other`: the person picked options and also typed an "Other". On any other question it is refused (`not_allowed`). */
|
|
1767
|
+
QuestionAnswer: {
|
|
1768
|
+
values: string[];
|
|
1769
|
+
} | {
|
|
1770
|
+
other_text: string;
|
|
1771
|
+
} | {
|
|
1772
|
+
values: string[];
|
|
1773
|
+
other_text: string;
|
|
1774
|
+
} | {
|
|
1775
|
+
text: string;
|
|
1776
|
+
} | {
|
|
1777
|
+
number: number;
|
|
1778
|
+
} | {
|
|
1779
|
+
/** Format: date */
|
|
1780
|
+
date: string;
|
|
1781
|
+
} | {
|
|
1782
|
+
upload_ref: string;
|
|
1783
|
+
} | {
|
|
1784
|
+
/** @constant */
|
|
1785
|
+
skipped: true;
|
|
1786
|
+
};
|
|
1787
|
+
/** @description What `ui.answer` carries: a `QuestionAnswer`, or the same with an "Other" longer than 500. An `other_text` longer than the question's `other_max_length` is answered `ui.answer.rejected` with `invalid_value`, at any length, and its `message` names the limit, so a person always learns it. It is never recorded, so recorded and submitted answers keep the `QuestionAnswer` bound. */
|
|
1788
|
+
AnswerInput: components["schemas"]["QuestionAnswer"] | {
|
|
1789
|
+
other_text: string;
|
|
1790
|
+
} | {
|
|
1791
|
+
values: string[];
|
|
1792
|
+
other_text: string;
|
|
1793
|
+
};
|
|
1794
|
+
/**
|
|
1795
|
+
* @description A message, oldest first: `{ role: assistant | person | staff, text, at }` (`staff`: a reply from a person from the business during a takeover, text only, never a name; v1-draft.15 widened the enum, so a client must tolerate a role it does not know), or an answered question card as `{ role: card, card, at }` (its `question.state` is `answered`, with its `answer`, or for `rate_each` its `row_answers`).
|
|
1796
|
+
* A `person` message is the person's own text as the runtime recorded it, card-like digits masked; a card tap, an answer or a proposal's outcome is not a message, and neither is an input the runtime never recorded (one refused with `input.rejected`, held at the turn limit, or a guardrail's refusal and its reply): the app keeps its own copy of those. An `assistant` message with `interrupted: true` (v1-draft.17) is a reply that stopped before it finished: its turn ended with `turn.failed` after it had streamed (a takeover, `input.cancel`, `output_blocked`, an outage), and the text is what was streamed. Draw it as cut off. A client that does not know the field draws it as any reply.
|
|
1797
|
+
* **Identity (v1-draft.17).** A message carries `id`, the identifier the live events gave it, so an app reconciles the transcript with what it drew instead of drawing it again: an `assistant` message's `turn_id` (`message.delta`, `message.completed`), a `person` message's `client_event_id` (`input.text`; absent when the app sent none), a `staff` message's `message_id` (`message.staff`). Unique per role within a conversation. A message of a turn also carries `turn_id`, the person's text and the agent's reply alike, so the cards the turn drew stay anchored after its text; a message sent during a takeover has none.
|
|
1798
|
+
*/
|
|
1799
|
+
TranscriptItem: {
|
|
1800
|
+
/** @enum {string} */
|
|
1801
|
+
role: "assistant" | "person" | "staff";
|
|
1802
|
+
text: string;
|
|
1803
|
+
/** Format: date-time */
|
|
1804
|
+
at: string;
|
|
1805
|
+
/** @description `assistant` only, present only when true: the reply stopped before it finished */
|
|
1806
|
+
interrupted?: boolean;
|
|
1807
|
+
/** @description v1-draft.17: the live event's identifier for this message (`turn_id`, `client_event_id` or `message_id`, by role); absent on a `person` message sent without a `client_event_id` */
|
|
1808
|
+
id?: string;
|
|
1809
|
+
/** @description v1-draft.17; the turn the message belongs to, when it belongs to one */
|
|
1810
|
+
turn_id?: string;
|
|
1811
|
+
} | {
|
|
1812
|
+
/** @constant */
|
|
1813
|
+
role: "card";
|
|
1814
|
+
card: components["schemas"]["Card"] & {
|
|
1815
|
+
/** @constant */
|
|
1816
|
+
kind: "question";
|
|
1817
|
+
question: {
|
|
1818
|
+
/** @constant */
|
|
1819
|
+
state: "answered";
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
/** Format: date-time */
|
|
1823
|
+
at: string;
|
|
1824
|
+
};
|
|
1825
|
+
/** @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
|
+
SlotSelection: {
|
|
1827
|
+
id: string;
|
|
1828
|
+
call_id: string;
|
|
1829
|
+
};
|
|
1830
|
+
/**
|
|
1831
|
+
* @description A change the agent proposed through a `propose` tool. The tenant holds it as pending; nothing has changed yet, and Vinaverse never applies it. The app shows `title`, `summary` and each field's `before` and `after`, with its own Confirm and Decline buttons (`confirm_mode: tenant_app`; the card has no `actions`). - **Confirm or decline** happens in the tenant's app, against the tenant's backend, with the person's own
|
|
1832
|
+
* token, before `expires_at`. The tenant applies the change on confirm.
|
|
1833
|
+
* - **Then** the app sends `ui.action` with the card's `turn_id` and `card_id`, a `client_event_id`, and the
|
|
1834
|
+
* outcome as `action`. The runtime gives that to the model as an event, never as a message from the person,
|
|
1835
|
+
* and the agent carries on from it.
|
|
1836
|
+
* - `confirmed`: the tenant's backend applied the change;
|
|
1837
|
+
* - `declined`: the person declined it;
|
|
1838
|
+
* - `failed`: the person confirmed but the tenant did not apply it (it refused the change, or the proposal
|
|
1839
|
+
* had expired);
|
|
1840
|
+
* - `expired`: the tenant says `expires_at` passed with no answer.
|
|
1841
|
+
* - **The tenant is the source of truth, and only an outcome the app reports is final.** At `expires_at` the
|
|
1842
|
+
* runtime tells the model, provisionally, that the proposal was not confirmed, so the model never waits on it.
|
|
1843
|
+
* This counts for nothing. A `confirmed`, `declined` or `failed` the app reports later is accepted, wins,
|
|
1844
|
+
* and is fed to the model as a correction.
|
|
1845
|
+
* - **The first app-reported outcome per card is final.** A repeat of that same outcome changes nothing. A
|
|
1846
|
+
* second, conflicting outcome, or an outcome on a card that is not a `proposal`, is answered with `error`
|
|
1847
|
+
* (`code: proposal_outcome_rejected`, with the `card_id` and `client_event_id`), and nothing reaches the
|
|
1848
|
+
* model.
|
|
1849
|
+
* - **`status`** is the tenant's state when the card was drawn. A card restored after a reconnect
|
|
1850
|
+
* (`session.ready.pending_cards`) still waits for its outcome.
|
|
1851
|
+
* - **Only a `pending` proposal is actionable.** The app draws Confirm and Decline only for
|
|
1852
|
+
* `proposal.status: pending`. A `propose` result that is not `pending` (a reused key that met an expired,
|
|
1853
|
+
* declined, confirmed or superseded proposal) is never drawn as an actionable card. The runtime advances the
|
|
1854
|
+
* key's attempt counter and calls once more with the new key, or, if that one is not `pending` either, gives
|
|
1855
|
+
* the `status` to the model as the outcome.
|
|
1856
|
+
* - **`edit_deep_link`** opens the tenant's own screen for the change, to edit it there. It is held to the
|
|
1857
|
+
* deep-link rule (`admin-v1.yaml`, `Connector.deep_link_prefixes`), the same check as a `next_step` link.
|
|
1858
|
+
* The runtime removes an `edit_deep_link` that fails, and the card is still sent. With no prefix registered,
|
|
1859
|
+
* nothing passes.
|
|
1860
|
+
*
|
|
1861
|
+
* - **A booking proposal** (topic `booking`, `booking_reschedule` or `booking_cancellation`) carries the fields a
|
|
1862
|
+
* client must see under fixed keys (`BookingFields`): what is booked and with whom, when, and the price; for a
|
|
1863
|
+
* reschedule, the booking (unchanged) and its time before and after; for a cancellation, the booking and its
|
|
1864
|
+
* time (both unchanged), and any fee or refund. It expires no later than the booking starts, and a
|
|
1865
|
+
* reschedule no later than the earlier of its current and its new start
|
|
1866
|
+
* (`docs/agents-guardrails-suggestions-writes.md` §3.4).
|
|
1867
|
+
*
|
|
1868
|
+
* Each field `key` appears once. `expires_at` is at most 7 days after the proposal was created. A field whose `before` equals its `after` does not change: show its value once.
|
|
1869
|
+
*/
|
|
1870
|
+
Proposal: {
|
|
1871
|
+
/** @description the tenant's proposal id */
|
|
1872
|
+
id: string;
|
|
1873
|
+
/**
|
|
1874
|
+
* @description The tenant's current state of the proposal. Only `pending` can still be confirmed. The tenant is the source of truth, and `confirmed` means the change was applied.
|
|
1875
|
+
* @enum {string}
|
|
1876
|
+
*/
|
|
1877
|
+
status: "pending" | "confirmed" | "declined" | "expired" | "superseded";
|
|
1878
|
+
/**
|
|
1879
|
+
* @example business_address
|
|
1880
|
+
* @example opening_hours
|
|
1881
|
+
* @example services
|
|
1882
|
+
* @example booking
|
|
1883
|
+
* @example booking_reschedule
|
|
1884
|
+
* @example booking_cancellation
|
|
1885
|
+
*/
|
|
1886
|
+
topic: string;
|
|
1887
|
+
title: string;
|
|
1888
|
+
summary: string;
|
|
1889
|
+
fields: components["schemas"]["ProposalField"][];
|
|
1890
|
+
/**
|
|
1891
|
+
* Format: date-time
|
|
1892
|
+
* @description after it the tenant declines the proposal on its own
|
|
1893
|
+
*/
|
|
1894
|
+
expires_at: string;
|
|
1895
|
+
/** @description a link into the tenant's app; removed by the runtime when it fails the deep-link rule (see `edit_deep_link` above) */
|
|
1896
|
+
edit_deep_link?: string;
|
|
1897
|
+
/** @enum {string} */
|
|
1898
|
+
confirm_mode: "tenant_app";
|
|
1899
|
+
} & (unknown & unknown & unknown & unknown);
|
|
1900
|
+
/** @description The fields of a booking proposal (topic `booking`, `booking_reschedule` or `booking_cancellation`), whose keys are fixed so every app draws a booking card the same way (`docs/agents-guardrails-suggestions-writes.md` §3.4): `service`, `professional`, `space`, `booking`, `location`, `note` and `reason` are `text`, `services` is a `list`, `time` is a `time_range`, `place` an `address`, and `price`, `deposit`, `fee`, `cancellation_fee` and `refund` are `money_cents`. */
|
|
1901
|
+
BookingFields: (unknown & unknown & unknown & unknown & unknown)[];
|
|
1902
|
+
/** @description `before` is the current value, absent or null when the proposal creates it, and equal to `after` when the field does not change but says what the change is about (the booking a reschedule moves); `before` and `after` take the shape `type` names. */
|
|
1903
|
+
ProposalField: {
|
|
1904
|
+
key: string;
|
|
1905
|
+
label: string;
|
|
1906
|
+
/**
|
|
1907
|
+
* @description `money_cents` is an amount in the currency's minor units (ISO 4217: cents for USD, yen for JPY, fils for BHD), never negative. `time_range` is one dated range whose `end` is after its `start`. `weekly_hours` is recurring opening hours, by weekday, in the business's time zone.
|
|
1908
|
+
* @enum {string}
|
|
1909
|
+
*/
|
|
1910
|
+
type: "text" | "money_cents" | "time_range" | "address" | "list" | "weekly_hours";
|
|
1911
|
+
before?: unknown;
|
|
1912
|
+
after: unknown;
|
|
1913
|
+
} & (unknown & unknown & unknown & unknown & unknown & unknown);
|
|
1914
|
+
ProposalMoney: {
|
|
1915
|
+
/** @description in the currency's minor units (ISO 4217) */
|
|
1916
|
+
amount: number;
|
|
1917
|
+
currency: string;
|
|
1918
|
+
};
|
|
1919
|
+
/** @description Recurring opening hours. A day absent from `entries` is closed; a day may have several entries (a lunch break), which never overlap. `end` may be `24:00` (closing at midnight), and `00:00`–`24:00` is open all day. An `end` earlier than `start` runs past midnight into the next day (a bar's `22:00`–`02:00`), and that spill counts against the next day's entries: `fri 22:00`–`02:00` and `sat 01:00`–`09:00` overlap. `end` never equals `start`. */
|
|
1920
|
+
WeeklyHours: {
|
|
1921
|
+
/**
|
|
1922
|
+
* @description an IANA time zone name
|
|
1923
|
+
* @example America/New_York
|
|
1924
|
+
*/
|
|
1925
|
+
time_zone: string;
|
|
1926
|
+
entries: {
|
|
1927
|
+
/** @enum {string} */
|
|
1928
|
+
day: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
1929
|
+
start: string;
|
|
1930
|
+
end: string;
|
|
1931
|
+
}[];
|
|
1932
|
+
};
|
|
1933
|
+
TimeRange: {
|
|
1934
|
+
/** Format: date-time */
|
|
1935
|
+
start: string;
|
|
1936
|
+
/** Format: date-time */
|
|
1937
|
+
end: string;
|
|
1938
|
+
};
|
|
1939
|
+
PostalAddress: {
|
|
1940
|
+
line1: string;
|
|
1941
|
+
line2?: string;
|
|
1942
|
+
city: string;
|
|
1943
|
+
region?: string;
|
|
1944
|
+
postal_code?: string;
|
|
1945
|
+
/** @description ISO 3166-1 alpha-2 */
|
|
1946
|
+
country: string;
|
|
1947
|
+
};
|
|
1948
|
+
TextList: string[];
|
|
1949
|
+
/** @description What the app sends. **The turn limit narrows the typed message's deduplication rule below**, which lists `limit_reached` among the refusals a resend gets again: that holds in the same session only. A text or an answer refused with `input.rejected` `limit_reached` is not recorded. On a new session of the conversation it is checked as new: it runs, as a turn of that session, or, if its turn had already run, gets `duplicate` (`input.rejected` for a text, `ui.answer.recorded` with `duplicate: true` for an answer) (`docs/realtime-protocol.md` §2, a session out of turns). */
|
|
1950
|
+
ClientEvent: {
|
|
1951
|
+
/** @constant */
|
|
1952
|
+
type: "session.auth";
|
|
1953
|
+
client_secret: string;
|
|
1954
|
+
} | {
|
|
1955
|
+
/** @constant */
|
|
1956
|
+
type: "input.text";
|
|
1957
|
+
client_event_id?: string;
|
|
1958
|
+
text: string;
|
|
1959
|
+
} | {
|
|
1960
|
+
/** @constant */
|
|
1961
|
+
type: "input.cancel";
|
|
1962
|
+
turn_id: string;
|
|
1963
|
+
} | {
|
|
1964
|
+
/** @constant */
|
|
1965
|
+
type: "playback.fenced";
|
|
1966
|
+
turn_id: string;
|
|
1967
|
+
heard_chars: number;
|
|
1968
|
+
} | ({
|
|
1969
|
+
/** @constant */
|
|
1970
|
+
type: "ui.action";
|
|
1971
|
+
client_event_id?: string;
|
|
1972
|
+
turn_id: string;
|
|
1973
|
+
card_id: string;
|
|
1974
|
+
/**
|
|
1975
|
+
* @description On a `proposal` card: `confirmed`, `declined`, `failed` or `expired` (`Proposal`), sent after the outcome in the tenant's app. It tells the session; it changes nothing.
|
|
1976
|
+
* On a `time_slots` card: `select_slot` (v1-draft.17), with `slot`, the person's pick. It is checked against this session's evidence: the card must be one this session drew from the tool call `slot.call_id` names, and the slot one that call returned; anything else gets `error` (`invalid_action`) and reaches nothing. An accepted pick starts a turn: `turn.started` echoes the `client_event_id`, and it is deduplicated as `input.text` is (a resend whose turn ran gets `input.rejected` `duplicate`). It is a tap on a card: refused with `input.rejected` `turn_in_progress` during a turn or a takeover, never held at the turn limit, and never sent on another session.
|
|
1977
|
+
*/
|
|
1978
|
+
action: string;
|
|
1979
|
+
slot?: components["schemas"]["SlotSelection"];
|
|
1980
|
+
} & (unknown & unknown)) | {
|
|
1981
|
+
/** @constant */
|
|
1982
|
+
type: "ui.answer";
|
|
1983
|
+
/** @description the action id, unique per answer */
|
|
1984
|
+
client_event_id: string;
|
|
1985
|
+
card_id: string;
|
|
1986
|
+
question_id: components["schemas"]["QuestionId"];
|
|
1987
|
+
answer: components["schemas"]["AnswerInput"];
|
|
1988
|
+
} | {
|
|
1989
|
+
/** @constant */
|
|
1990
|
+
type: "ping";
|
|
1991
|
+
};
|
|
1992
|
+
/** @description What the server sends on the WebSocket, and as SSE events of a turn. `session.expiring` is WebSocket only: sent once per connection, 60 s before `Session.expires_at`, never for the client secret; `session.closed` with `expired` follows at the end (`docs/realtime-protocol.md` §1). What the app does after each `session.closed` reason is in §2 of the same document; `server_restart` is reserved, nothing sends it today, and it never ends a session. */
|
|
1993
|
+
ServerEvent: {
|
|
1994
|
+
/** @constant */
|
|
1995
|
+
type: "session.ready";
|
|
1996
|
+
session: components["schemas"]["SessionStatus"];
|
|
1997
|
+
limits: {
|
|
1998
|
+
max_turns?: number;
|
|
1999
|
+
turns_left?: number;
|
|
2000
|
+
/** Format: date-time */
|
|
2001
|
+
expires_at?: string;
|
|
2002
|
+
};
|
|
2003
|
+
disclosure: string;
|
|
2004
|
+
resumed: boolean;
|
|
2005
|
+
/**
|
|
2006
|
+
* @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
|
+
* 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):
|
|
2008
|
+
* the person's texts, the agent's replies (`interrupted` when cut off) and the staff replies of a
|
|
2009
|
+
* takeover; the last 20, and none older than 7 days;
|
|
2010
|
+
* - only what the tenant's `transcript_retention` still keeps: under `none`, only the open session's
|
|
2011
|
+
* own messages; never anything of a subject erased since (`eraseSubject`).
|
|
2012
|
+
*
|
|
2013
|
+
* When present, it is the server's view: redraw the messages from it, including any the app missed while disconnected. When absent, the server holds nothing to restore: keep what the app holds. It is sent only on the connection the client secret opened, so it reaches no one the session does not.
|
|
2014
|
+
*/
|
|
2015
|
+
transcript?: components["schemas"]["TranscriptItem"][];
|
|
2016
|
+
/**
|
|
2017
|
+
* @description Optional. The open question card, if there is one (at most one); render it unlocked. For `rate_each`, its `row_answers` say which rows are already answered: draw those locked. Also the `proposal` cards still awaiting an outcome from the app, so the app can report `confirmed`, `declined`, `failed` or `expired` with its `turn_id` and `card_id` after a reconnect. A proposal card awaits until the app reports an outcome, or until 7 days after its `expires_at`. When more than 10 await, the 10 newest are restored. An older one still takes an outcome if the app has its ids.
|
|
2018
|
+
* Every item carries `turn_id`, the turn that drew the card. `ui.action` needs it with the card's `id`, so a proposal card restored after a reconnect or an app kill can still be reported.
|
|
2019
|
+
*/
|
|
2020
|
+
pending_cards?: (components["schemas"]["Card"] & {
|
|
2021
|
+
/** @description the turn that drew the card; `ui.action` names it with the card's `id` */
|
|
2022
|
+
turn_id: string;
|
|
2023
|
+
} & ({
|
|
2024
|
+
/** @constant */
|
|
2025
|
+
kind: "question";
|
|
2026
|
+
question: {
|
|
2027
|
+
/** @constant */
|
|
2028
|
+
state: "open";
|
|
2029
|
+
};
|
|
2030
|
+
} | {
|
|
2031
|
+
/** @constant */
|
|
2032
|
+
kind: "proposal";
|
|
2033
|
+
proposal: {
|
|
2034
|
+
/** @constant */
|
|
2035
|
+
status: "pending";
|
|
2036
|
+
};
|
|
2037
|
+
}))[];
|
|
2038
|
+
} | {
|
|
2039
|
+
/** @constant */
|
|
2040
|
+
type: "turn.started";
|
|
2041
|
+
turn_id: string;
|
|
2042
|
+
client_event_id?: string;
|
|
2043
|
+
} | {
|
|
2044
|
+
/** @constant */
|
|
2045
|
+
type: "tool.status";
|
|
2046
|
+
turn_id: string;
|
|
2047
|
+
label: string;
|
|
2048
|
+
/** @enum {string} */
|
|
2049
|
+
state: "running" | "done" | "failed";
|
|
2050
|
+
} | {
|
|
2051
|
+
/** @constant */
|
|
2052
|
+
type: "message.delta";
|
|
2053
|
+
turn_id: string;
|
|
2054
|
+
/** @description One or more whole sentences. Each sentence passes the leak check, and the tenant's blocked-topic filter, before it is sent. */
|
|
2055
|
+
text: string;
|
|
2056
|
+
} | {
|
|
2057
|
+
/** @constant */
|
|
2058
|
+
type: "ui.cards";
|
|
2059
|
+
turn_id: string;
|
|
2060
|
+
cards: components["schemas"]["Card"][];
|
|
2061
|
+
} | {
|
|
2062
|
+
/** @constant */
|
|
2063
|
+
type: "message.completed";
|
|
2064
|
+
turn_id: string;
|
|
2065
|
+
text: string;
|
|
2066
|
+
/** @description optional; spans of `text` with their source card or tool call */
|
|
2067
|
+
citations?: components["schemas"]["Citation"][];
|
|
2068
|
+
} | {
|
|
2069
|
+
/** @constant */
|
|
2070
|
+
type: "handoff.created";
|
|
2071
|
+
turn_id: string;
|
|
2072
|
+
ticket: {
|
|
2073
|
+
id: string;
|
|
2074
|
+
/** @description the tenant's phrase completing "they'll reply {expected_response}" (`within one business day by email`), never a sentence of its own */
|
|
2075
|
+
expected_response: string;
|
|
2076
|
+
};
|
|
2077
|
+
} | {
|
|
2078
|
+
/** @constant */
|
|
2079
|
+
type: "turn.completed";
|
|
2080
|
+
turn_id: string;
|
|
2081
|
+
usage: components["schemas"]["Usage"];
|
|
2082
|
+
} | {
|
|
2083
|
+
/** @constant */
|
|
2084
|
+
type: "turn.failed";
|
|
2085
|
+
turn_id: string;
|
|
2086
|
+
/**
|
|
2087
|
+
* @description Whatever the code, the sentences the turn already streamed (`message.delta`) stand: they are the reply recorded, marked interrupted (`TranscriptItem.interrupted`, v1-draft.17), so the app keeps them, drawn as cut off, and adds `message` after them. Includes: - `output_blocked`: a sentence of the reply would have leaked (the prompt, keys, other subjects' data),
|
|
2088
|
+
* so it was never sent, and the turn ended (`retryable: false`). A sentence that only touches a
|
|
2089
|
+
* blocked topic is dropped instead, and the turn goes on.
|
|
2090
|
+
* - `cancelled`: the turn was stopped: by `input.cancel`, because the person left, or because a person
|
|
2091
|
+
* from the business took the conversation over (`takeover.started` follows, and nothing of the turn
|
|
2092
|
+
* comes after it).
|
|
2093
|
+
* - `tool_result_invalid`: a `propose` tool returned something that is not a `Proposal`. No card is
|
|
2094
|
+
* shown, and the connector is flagged.
|
|
2095
|
+
*/
|
|
2096
|
+
code: string;
|
|
2097
|
+
message: string;
|
|
2098
|
+
retryable: boolean;
|
|
2099
|
+
} | {
|
|
2100
|
+
/** @constant */
|
|
2101
|
+
type: "input.rejected";
|
|
2102
|
+
client_event_id?: string;
|
|
2103
|
+
/**
|
|
2104
|
+
* @description `duplicate`: the same `client_event_id` was already handled in this conversation, and its turn ran; do not resend it. `turn_in_progress`: send the input again, with the same `client_event_id`, after `turn.completed`. `screen_unavailable`: the chat-safety screen could not check the input, so nothing ran and the model never saw it, and nothing was recorded or remembered. Resend the same input with the same `client_event_id` after a short backoff (for example 2 s, doubling, three or four tries); if it is still refused, show it as not sent, with `message`, and let the person send it again. It replaces, for this case, the retryable `error` with `code: screen_unavailable` that earlier runtimes sent; an older server still sends that `error`. An app that does not know the code treats it as any unknown `input.rejected` code: it does not resend, and shows `message`. `guardrail`: the message was refused before the model saw it, by one of the agent's guardrails (a blocked topic, or outside its scope under `strict`) or by the platform floor (an instruction override or persona hijack); `message` is the tenant's `refusal_message` (or a platform default in the subject's locale): show it as the agent's reply, and do not resend.
|
|
2105
|
+
* @enum {string}
|
|
2106
|
+
*/
|
|
2107
|
+
code: "screened" | "too_long" | "turn_in_progress" | "limit_reached" | "duplicate" | "guardrail" | "screen_unavailable";
|
|
2108
|
+
message: string;
|
|
2109
|
+
} | {
|
|
2110
|
+
/** @constant */
|
|
2111
|
+
type: "session.expiring";
|
|
2112
|
+
seconds_left: number;
|
|
2113
|
+
} | {
|
|
2114
|
+
/** @constant */
|
|
2115
|
+
type: "session.closed";
|
|
2116
|
+
/**
|
|
2117
|
+
* @description `replaced`: a newer session of the same conversation was created (close code `4409`)
|
|
2118
|
+
* @enum {string}
|
|
2119
|
+
*/
|
|
2120
|
+
reason: "expired" | "revoked" | "limit_reached" | "idle" | "server_restart" | "replaced";
|
|
2121
|
+
} | {
|
|
2122
|
+
/** @constant */
|
|
2123
|
+
type: "ui.answer.recorded";
|
|
2124
|
+
card_id: string;
|
|
2125
|
+
question_id: components["schemas"]["QuestionId"];
|
|
2126
|
+
client_event_id: string;
|
|
2127
|
+
duplicate: boolean;
|
|
2128
|
+
} | {
|
|
2129
|
+
/** @constant */
|
|
2130
|
+
type: "ui.answer.rejected";
|
|
2131
|
+
card_id: string;
|
|
2132
|
+
question_id: components["schemas"]["QuestionId"];
|
|
2133
|
+
client_event_id: string;
|
|
2134
|
+
/** @enum {string} */
|
|
2135
|
+
code: "invalid_value" | "too_many" | "too_few" | "card_superseded" | "not_allowed" | "client_event_id_reused";
|
|
2136
|
+
message?: string;
|
|
2137
|
+
} | ({
|
|
2138
|
+
/** @constant */
|
|
2139
|
+
type: "flow.completed";
|
|
2140
|
+
/** @example intake-survey */
|
|
2141
|
+
flow: string;
|
|
2142
|
+
/** @enum {string} */
|
|
2143
|
+
result: "ok" | "refused" | "failed";
|
|
2144
|
+
/**
|
|
2145
|
+
* @description For `refused`, the tenant's refusal code, as it sent it: `REQUIRED_MISSING`, `UNKNOWN_VALUE`, `TOO_LONG`, `VERSION_NOT_ACCEPTED`, `TOO_MANY`, `TOO_FEW`, `BAD_DATE`, `UPLOAD_NOT_FOUND`, `OUT_OF_RANGE`, or a newer one. Show it as it is; the agent has already asked again.
|
|
2146
|
+
* @example REQUIRED_MISSING
|
|
2147
|
+
* @example unavailable
|
|
2148
|
+
*/
|
|
2149
|
+
code?: string;
|
|
2150
|
+
/** @description `failed` only */
|
|
2151
|
+
retryable?: boolean;
|
|
2152
|
+
} & (unknown & unknown & unknown)) | {
|
|
2153
|
+
/** @constant */
|
|
2154
|
+
type: "error";
|
|
2155
|
+
code: string;
|
|
2156
|
+
message: string;
|
|
2157
|
+
retryable: boolean;
|
|
2158
|
+
/** @description the card the refused event named (`proposal_outcome_rejected`) */
|
|
2159
|
+
card_id?: string;
|
|
2160
|
+
/** @description the refused event's `client_event_id` */
|
|
2161
|
+
client_event_id?: string;
|
|
2162
|
+
} | {
|
|
2163
|
+
/** @constant */
|
|
2164
|
+
type: "pong";
|
|
2165
|
+
} | {
|
|
2166
|
+
/** @constant */
|
|
2167
|
+
type: "takeover.started";
|
|
2168
|
+
/** Format: date-time */
|
|
2169
|
+
at: string;
|
|
2170
|
+
/** @description the replier's role as the person sees it, never a name (e.g. "the team") */
|
|
2171
|
+
by?: string;
|
|
2172
|
+
} | {
|
|
2173
|
+
/** @constant */
|
|
2174
|
+
type: "takeover.ended";
|
|
2175
|
+
/** Format: date-time */
|
|
2176
|
+
at: string;
|
|
2177
|
+
} | {
|
|
2178
|
+
/** @constant */
|
|
2179
|
+
type: "message.staff";
|
|
2180
|
+
message_id: string;
|
|
2181
|
+
text: string;
|
|
2182
|
+
/** Format: date-time */
|
|
2183
|
+
at: string;
|
|
2184
|
+
} | {
|
|
2185
|
+
/** @constant */
|
|
2186
|
+
type: "input.received";
|
|
2187
|
+
client_event_id: string;
|
|
2188
|
+
};
|
|
2189
|
+
/**
|
|
2190
|
+
* @description The tenant's binding lists its surfaces; unknown surfaces are rejected.
|
|
2191
|
+
* @example listing_photo
|
|
2192
|
+
* @example gallery_photo
|
|
2193
|
+
* @example profile_photo
|
|
2194
|
+
* @example service_photo
|
|
2195
|
+
* @example class_photo
|
|
2196
|
+
* @example listing_video
|
|
2197
|
+
* @example bio
|
|
2198
|
+
* @example listing_text
|
|
2199
|
+
* @example business_name
|
|
2200
|
+
* @example service_name
|
|
2201
|
+
* @example chat_message
|
|
2202
|
+
* @example review
|
|
2203
|
+
*/
|
|
2204
|
+
Surface: string;
|
|
2205
|
+
Media: {
|
|
2206
|
+
/** Format: uri */
|
|
2207
|
+
url: string;
|
|
2208
|
+
/** Format: date-time */
|
|
2209
|
+
url_expires_at?: string;
|
|
2210
|
+
/** @enum {string} */
|
|
2211
|
+
content_type: "image/jpeg" | "image/png" | "image/webp" | "image/heic" | "video/mp4" | "video/quicktime" | "video/webm";
|
|
2212
|
+
bytes?: number;
|
|
2213
|
+
sha256?: string;
|
|
2214
|
+
};
|
|
2215
|
+
ModerationItemInput: {
|
|
2216
|
+
ref: string;
|
|
2217
|
+
surface: components["schemas"]["Surface"];
|
|
2218
|
+
/** @enum {string} */
|
|
2219
|
+
kind: "image" | "video" | "text";
|
|
2220
|
+
subject: components["schemas"]["Subject"];
|
|
2221
|
+
media?: components["schemas"]["Media"];
|
|
2222
|
+
text?: string;
|
|
2223
|
+
context?: {
|
|
2224
|
+
[key: string]: string;
|
|
2225
|
+
};
|
|
2226
|
+
options?: {
|
|
2227
|
+
/** @default false */
|
|
2228
|
+
assess_quality: boolean;
|
|
2229
|
+
};
|
|
2230
|
+
} & ({
|
|
2231
|
+
/** @enum {unknown} */
|
|
2232
|
+
kind?: "image" | "video";
|
|
2233
|
+
} | {
|
|
2234
|
+
/** @constant */
|
|
2235
|
+
kind?: "text";
|
|
2236
|
+
});
|
|
2237
|
+
ModerationJobCreate: {
|
|
2238
|
+
/** @default default */
|
|
2239
|
+
policy: string;
|
|
2240
|
+
items: components["schemas"]["ModerationItemInput"][];
|
|
2241
|
+
};
|
|
2242
|
+
Reason: {
|
|
2243
|
+
/**
|
|
2244
|
+
* @example contact.off_platform
|
|
2245
|
+
* @example sexual.nudity
|
|
2246
|
+
* @example quality.not_a_space
|
|
2247
|
+
*/
|
|
2248
|
+
code: string;
|
|
2249
|
+
/** @enum {string} */
|
|
2250
|
+
severity: "info" | "review" | "hold" | "never";
|
|
2251
|
+
evidence?: {
|
|
2252
|
+
/** @enum {string} */
|
|
2253
|
+
kind?: "visual" | "text_in_image" | "text" | "speech" | "metadata";
|
|
2254
|
+
/** @description redacted excerpt, at most 120 chars */
|
|
2255
|
+
excerpt?: string;
|
|
2256
|
+
/** @description normalized box, integers in ppm of width/height */
|
|
2257
|
+
region?: {
|
|
2258
|
+
x?: number;
|
|
2259
|
+
y?: number;
|
|
2260
|
+
w?: number;
|
|
2261
|
+
h?: number;
|
|
2262
|
+
} | null;
|
|
2263
|
+
timestamp_ms?: number | null;
|
|
2264
|
+
};
|
|
2265
|
+
explanation?: string;
|
|
2266
|
+
};
|
|
2267
|
+
/** @description A vv-decision/0 decision record as exposed to tenants. */
|
|
2268
|
+
Decision: {
|
|
2269
|
+
id: string;
|
|
2270
|
+
/** @enum {string} */
|
|
2271
|
+
domain: "image_safety" | "video_safety" | "text_safety" | "chat_safety" | "document_check";
|
|
2272
|
+
domain_version: string;
|
|
2273
|
+
domain_hash?: string;
|
|
2274
|
+
/** @enum {string} */
|
|
2275
|
+
class: "clean" | "review" | "hold" | "never";
|
|
2276
|
+
abstained: boolean;
|
|
2277
|
+
reasons: components["schemas"]["Reason"][];
|
|
2278
|
+
distribution_ppm?: {
|
|
2279
|
+
[key: string]: number;
|
|
2280
|
+
} | null;
|
|
2281
|
+
/** @enum {string} */
|
|
2282
|
+
calibration: "absent" | "calibrated";
|
|
2283
|
+
threshold_policy?: string;
|
|
2284
|
+
policy_version: string;
|
|
2285
|
+
model: {
|
|
2286
|
+
id: string;
|
|
2287
|
+
provider: string;
|
|
2288
|
+
revision?: string;
|
|
2289
|
+
};
|
|
2290
|
+
prompt_version?: string;
|
|
2291
|
+
audit: {
|
|
2292
|
+
sampled: boolean;
|
|
2293
|
+
probability_ppm: number;
|
|
2294
|
+
};
|
|
2295
|
+
};
|
|
2296
|
+
Quality: {
|
|
2297
|
+
/** @enum {string} */
|
|
2298
|
+
rating: "good" | "fair" | "poor";
|
|
2299
|
+
issues: ("dark" | "blurry" | "low_resolution" | "tilted" | "cluttered" | "watermark" | "heavy_filter" | "not_a_space" | "duplicate_in_listing")[];
|
|
2300
|
+
is_space: boolean;
|
|
2301
|
+
note?: string;
|
|
2302
|
+
};
|
|
2303
|
+
VideoFindings: {
|
|
2304
|
+
duration_ms: number;
|
|
2305
|
+
frames_analyzed: number;
|
|
2306
|
+
transcript_language?: string | null;
|
|
2307
|
+
segments: {
|
|
2308
|
+
start_ms: number;
|
|
2309
|
+
end_ms: number;
|
|
2310
|
+
reasons: components["schemas"]["Reason"][];
|
|
2311
|
+
/** @description timestamps of the frames supporting visual reasons; the tenant seeks its own video */
|
|
2312
|
+
frame_timestamps_ms: number[];
|
|
2313
|
+
note?: string;
|
|
2314
|
+
}[];
|
|
2315
|
+
summary_for_reviewer: string;
|
|
2316
|
+
};
|
|
2317
|
+
ModerationItem: {
|
|
2318
|
+
id: string;
|
|
2319
|
+
ref: string;
|
|
2320
|
+
surface: components["schemas"]["Surface"];
|
|
2321
|
+
/** @enum {string} */
|
|
2322
|
+
kind: "image" | "video" | "text";
|
|
2323
|
+
/** @enum {string} */
|
|
2324
|
+
status: "queued" | "processing" | "completed" | "failed";
|
|
2325
|
+
decision?: components["schemas"]["Decision"];
|
|
2326
|
+
quality?: components["schemas"]["Quality"];
|
|
2327
|
+
video?: components["schemas"]["VideoFindings"];
|
|
2328
|
+
error?: components["schemas"]["Problem"];
|
|
2329
|
+
/** Format: date-time */
|
|
2330
|
+
completed_at?: string;
|
|
2331
|
+
processing_ms?: number;
|
|
2332
|
+
usage?: components["schemas"]["Usage"];
|
|
2333
|
+
};
|
|
2334
|
+
ModerationJob: {
|
|
2335
|
+
id: string;
|
|
2336
|
+
/** @enum {string} */
|
|
2337
|
+
status: "queued" | "processing" | "completed" | "partially_failed";
|
|
2338
|
+
items: components["schemas"]["ModerationItem"][];
|
|
2339
|
+
estimated_completion_seconds?: {
|
|
2340
|
+
[key: string]: number;
|
|
2341
|
+
};
|
|
2342
|
+
};
|
|
2343
|
+
ModerationJobSummary: {
|
|
2344
|
+
id: string;
|
|
2345
|
+
/** @enum {string} */
|
|
2346
|
+
status: "completed" | "partially_failed";
|
|
2347
|
+
counts: {
|
|
2348
|
+
clean?: number;
|
|
2349
|
+
review?: number;
|
|
2350
|
+
hold?: number;
|
|
2351
|
+
never?: number;
|
|
2352
|
+
failed?: number;
|
|
2353
|
+
};
|
|
2354
|
+
};
|
|
2355
|
+
/** @description A destination configured in Studio (an S3-compatible bucket and a write-only key). */
|
|
2356
|
+
DestinationId: string;
|
|
2357
|
+
/** @description `poster` and `captions` write where `transcode` writes unless they name a destination. Outside the mock environment a step that writes needs a destination. An image takes only `moderate`. */
|
|
2358
|
+
MediaSteps: {
|
|
2359
|
+
moderate: {
|
|
2360
|
+
/** @default default */
|
|
2361
|
+
policy: string;
|
|
2362
|
+
};
|
|
2363
|
+
transcode?: {
|
|
2364
|
+
/** @enum {string} */
|
|
2365
|
+
profile: "tour_hls_v1";
|
|
2366
|
+
destination?: components["schemas"]["DestinationId"];
|
|
2367
|
+
};
|
|
2368
|
+
/** @description One JPEG plus a 6-second silent preview MP4. `auto` picks a sharp, well-lit frame. */
|
|
2369
|
+
poster?: {
|
|
2370
|
+
/** @default auto */
|
|
2371
|
+
at: "auto" | number;
|
|
2372
|
+
destination?: components["schemas"]["DestinationId"];
|
|
2373
|
+
};
|
|
2374
|
+
/** @description WebVTT from the transcript the moderation step makes. */
|
|
2375
|
+
captions?: {
|
|
2376
|
+
languages: string[];
|
|
2377
|
+
destination?: components["schemas"]["DestinationId"];
|
|
2378
|
+
};
|
|
2379
|
+
};
|
|
2380
|
+
MediaJobCreate: {
|
|
2381
|
+
ref: string;
|
|
2382
|
+
surface: components["schemas"]["Surface"];
|
|
2383
|
+
subject: components["schemas"]["Subject"];
|
|
2384
|
+
media: components["schemas"]["Media"];
|
|
2385
|
+
steps: components["schemas"]["MediaSteps"];
|
|
2386
|
+
/**
|
|
2387
|
+
* @description Orders work inside the tenant's own turn; never ahead of another tenant's fair share.
|
|
2388
|
+
* @default normal
|
|
2389
|
+
* @enum {string}
|
|
2390
|
+
*/
|
|
2391
|
+
priority: "high" | "normal" | "low";
|
|
2392
|
+
context?: {
|
|
2393
|
+
[key: string]: string;
|
|
2394
|
+
};
|
|
2395
|
+
/**
|
|
2396
|
+
* @description Reprocess even when a dedupe match exists.
|
|
2397
|
+
* @default false
|
|
2398
|
+
*/
|
|
2399
|
+
force: boolean;
|
|
2400
|
+
};
|
|
2401
|
+
/**
|
|
2402
|
+
* @description `waiting`: for another step; `skipped`: not run because a step it needs failed or the verdict was `never`.
|
|
2403
|
+
* @enum {string}
|
|
2404
|
+
*/
|
|
2405
|
+
MediaStepStatus: "waiting" | "queued" | "processing" | "completed" | "failed" | "skipped" | "cancelled";
|
|
2406
|
+
MediaJobStep: {
|
|
2407
|
+
status: components["schemas"]["MediaStepStatus"];
|
|
2408
|
+
progress_percent: number;
|
|
2409
|
+
/** @enum {string} */
|
|
2410
|
+
stage?: "fetching" | "analyzing" | "transcoding" | "uploading";
|
|
2411
|
+
/** @description `moderate`, when completed */
|
|
2412
|
+
decision?: components["schemas"]["Decision"];
|
|
2413
|
+
video?: components["schemas"]["VideoFindings"];
|
|
2414
|
+
error?: components["schemas"]["Problem"];
|
|
2415
|
+
/** Format: date-time */
|
|
2416
|
+
completed_at?: string;
|
|
2417
|
+
};
|
|
2418
|
+
MediaOutput: {
|
|
2419
|
+
/** @enum {string} */
|
|
2420
|
+
step: "transcode" | "poster" | "captions";
|
|
2421
|
+
/**
|
|
2422
|
+
* @example hls_master
|
|
2423
|
+
* @example hls_720p
|
|
2424
|
+
* @example mp4_fallback
|
|
2425
|
+
* @example poster
|
|
2426
|
+
* @example preview
|
|
2427
|
+
* @example captions
|
|
2428
|
+
*/
|
|
2429
|
+
role?: string;
|
|
2430
|
+
/** @description Object key in the tenant's bucket, under `<prefix>/<job id>/` */
|
|
2431
|
+
key: string;
|
|
2432
|
+
destination_id?: components["schemas"]["DestinationId"];
|
|
2433
|
+
content_type: string;
|
|
2434
|
+
bytes: number;
|
|
2435
|
+
sha256: string;
|
|
2436
|
+
duration_ms?: number;
|
|
2437
|
+
width?: number;
|
|
2438
|
+
height?: number;
|
|
2439
|
+
language?: string;
|
|
2440
|
+
};
|
|
2441
|
+
MediaJob: {
|
|
2442
|
+
id: string;
|
|
2443
|
+
ref: string;
|
|
2444
|
+
surface: components["schemas"]["Surface"];
|
|
2445
|
+
/** @enum {string} */
|
|
2446
|
+
kind: "image" | "video";
|
|
2447
|
+
subject: {
|
|
2448
|
+
id: components["schemas"]["SubjectId"];
|
|
2449
|
+
type: components["schemas"]["SubjectType"];
|
|
2450
|
+
};
|
|
2451
|
+
/** @enum {string} */
|
|
2452
|
+
status: "queued" | "processing" | "completed" | "failed" | "cancelled";
|
|
2453
|
+
/** @enum {string} */
|
|
2454
|
+
stage: "waiting" | "fetching" | "analyzing" | "transcoding" | "uploading" | "done";
|
|
2455
|
+
progress_percent: number;
|
|
2456
|
+
/** @enum {string} */
|
|
2457
|
+
priority: "high" | "normal" | "low";
|
|
2458
|
+
/** @description While queued, the job's place among this tenant's waiting work in its first lane. */
|
|
2459
|
+
queue_position: number | null;
|
|
2460
|
+
/**
|
|
2461
|
+
* Format: date-time
|
|
2462
|
+
* @description From the current queue and measured step durations; null once the job has ended.
|
|
2463
|
+
*/
|
|
2464
|
+
estimated_completion_at: string | null;
|
|
2465
|
+
/** @description One entry per requested step. */
|
|
2466
|
+
steps: {
|
|
2467
|
+
moderate?: components["schemas"]["MediaJobStep"];
|
|
2468
|
+
transcode?: components["schemas"]["MediaJobStep"];
|
|
2469
|
+
poster?: components["schemas"]["MediaJobStep"];
|
|
2470
|
+
captions?: components["schemas"]["MediaJobStep"];
|
|
2471
|
+
};
|
|
2472
|
+
/** @description Set when the job completes (empty after a `never` verdict); null before. */
|
|
2473
|
+
outputs: components["schemas"]["MediaOutput"][] | null;
|
|
2474
|
+
error?: components["schemas"]["Problem"];
|
|
2475
|
+
/** @description 1, plus one per retry from Studio's dead letters */
|
|
2476
|
+
attempts: number;
|
|
2477
|
+
context: {
|
|
2478
|
+
[key: string]: string;
|
|
2479
|
+
};
|
|
2480
|
+
/** Format: date-time */
|
|
2481
|
+
created_at: string;
|
|
2482
|
+
/** Format: date-time */
|
|
2483
|
+
completed_at?: string;
|
|
2484
|
+
};
|
|
2485
|
+
MediaJobCreated: components["schemas"]["MediaJob"] & {
|
|
2486
|
+
/** @description `202` only: the expected wait is past the tenant's soft limit. */
|
|
2487
|
+
delayed?: boolean;
|
|
2488
|
+
/** @description `200` only: the earlier job with the same content, steps and policy version. */
|
|
2489
|
+
deduplicated?: boolean;
|
|
2490
|
+
};
|
|
2491
|
+
MediaJobProgress: {
|
|
2492
|
+
id: string;
|
|
2493
|
+
ref: string;
|
|
2494
|
+
/** @enum {string} */
|
|
2495
|
+
status: "processing";
|
|
2496
|
+
/** @enum {string} */
|
|
2497
|
+
stage: "fetching" | "analyzing" | "transcoding" | "uploading";
|
|
2498
|
+
progress_percent: number;
|
|
2499
|
+
/** Format: date-time */
|
|
2500
|
+
estimated_completion_at: string | null;
|
|
2501
|
+
};
|
|
2502
|
+
MediaJobStepCompleted: components["schemas"]["MediaJob"] & {
|
|
2503
|
+
/** @enum {string} */
|
|
2504
|
+
completed_step: "moderate" | "transcode" | "poster" | "captions";
|
|
2505
|
+
};
|
|
2506
|
+
MediaProfile: {
|
|
2507
|
+
/** @example tour_hls_v1 */
|
|
2508
|
+
id: string;
|
|
2509
|
+
description: string;
|
|
2510
|
+
/** @enum {string} */
|
|
2511
|
+
container: "hls";
|
|
2512
|
+
segment_seconds?: number;
|
|
2513
|
+
video_codec?: string;
|
|
2514
|
+
audio_codec?: string;
|
|
2515
|
+
renditions: {
|
|
2516
|
+
name: string;
|
|
2517
|
+
height: number;
|
|
2518
|
+
video_kbps?: number;
|
|
2519
|
+
audio_kbps?: number;
|
|
2520
|
+
}[];
|
|
2521
|
+
fallback?: {
|
|
2522
|
+
container?: string;
|
|
2523
|
+
height?: number;
|
|
2524
|
+
faststart?: boolean;
|
|
2525
|
+
};
|
|
2526
|
+
};
|
|
2527
|
+
ScreeningRequest: {
|
|
2528
|
+
/** @default default */
|
|
2529
|
+
policy: string;
|
|
2530
|
+
surface: components["schemas"]["Surface"];
|
|
2531
|
+
subject: components["schemas"]["Subject"];
|
|
2532
|
+
text: string;
|
|
2533
|
+
context?: {
|
|
2534
|
+
conversation_ref?: string;
|
|
2535
|
+
booking_exists?: boolean;
|
|
2536
|
+
previous_messages?: {
|
|
2537
|
+
/** @enum {string} */
|
|
2538
|
+
author: "self" | "other";
|
|
2539
|
+
text: string;
|
|
2540
|
+
}[];
|
|
2541
|
+
};
|
|
2542
|
+
};
|
|
2543
|
+
ScreeningResponse: {
|
|
2544
|
+
decision: components["schemas"]["Decision"];
|
|
2545
|
+
/** @enum {string} */
|
|
2546
|
+
action: "allow" | "nudge" | "hold" | "block";
|
|
2547
|
+
nudge?: {
|
|
2548
|
+
/** @enum {string} */
|
|
2549
|
+
audience: "author" | "recipient" | "both";
|
|
2550
|
+
text: string;
|
|
2551
|
+
};
|
|
2552
|
+
};
|
|
2553
|
+
FeedbackRecord: {
|
|
2554
|
+
decision_id?: string;
|
|
2555
|
+
turn_id?: string;
|
|
2556
|
+
/** @enum {string} */
|
|
2557
|
+
outcome: "approved" | "rejected" | "edited" | "escalated" | "user_appealed" | "appeal_upheld" | "appeal_denied" | "thumbs_up" | "thumbs_down";
|
|
2558
|
+
/** @enum {string} */
|
|
2559
|
+
final_class?: "clean" | "review" | "hold" | "never";
|
|
2560
|
+
reason_codes?: string[];
|
|
2561
|
+
reviewer?: {
|
|
2562
|
+
/** @enum {string} */
|
|
2563
|
+
role?: "admin" | "moderator" | "support" | "end_user";
|
|
2564
|
+
ref?: string;
|
|
2565
|
+
};
|
|
2566
|
+
/** Format: date-time */
|
|
2567
|
+
decided_at: string;
|
|
2568
|
+
note?: string;
|
|
2569
|
+
} & (unknown | unknown);
|
|
2570
|
+
FeedbackBatch: {
|
|
2571
|
+
records: components["schemas"]["FeedbackRecord"][];
|
|
2572
|
+
};
|
|
2573
|
+
WebhookEnvelope: {
|
|
2574
|
+
/** @description evt_…; deduplicate on it */
|
|
2575
|
+
id: string;
|
|
2576
|
+
/** @enum {string} */
|
|
2577
|
+
type: "moderation.item.completed" | "moderation.job.completed" | "document_check.completed" | "session.completed" | "subject.erased" | "usage.threshold_reached" | "feature.state_changed" | "media.job.queued" | "media.job.progress" | "media.job.step.completed" | "media.job.completed" | "media.job.failed" | "media.job.cancelled" | "conversation.updated" | "conversation.completed" | "conversation.failed" | "conversation.expired";
|
|
2578
|
+
/** Format: date-time */
|
|
2579
|
+
created_at: string;
|
|
2580
|
+
/** @enum {string} */
|
|
2581
|
+
environment: "mock" | "development" | "production";
|
|
2582
|
+
data: Record<string, unknown>;
|
|
2583
|
+
};
|
|
2584
|
+
/** @enum {string} */
|
|
2585
|
+
DocumentType: "driver_license" | "state_id" | "business_license" | "cosmetology_license" | "insurance_card" | "insurance_certificate";
|
|
2586
|
+
DocumentCheckCreate: {
|
|
2587
|
+
ref: string;
|
|
2588
|
+
document_type: components["schemas"]["DocumentType"];
|
|
2589
|
+
subject: components["schemas"]["Subject"];
|
|
2590
|
+
pages: {
|
|
2591
|
+
/** @enum {string} */
|
|
2592
|
+
side: "front" | "back" | "page";
|
|
2593
|
+
media: {
|
|
2594
|
+
/** Format: uri */
|
|
2595
|
+
url: string;
|
|
2596
|
+
/** Format: date-time */
|
|
2597
|
+
url_expires_at?: string;
|
|
2598
|
+
/** @enum {string} */
|
|
2599
|
+
content_type: "image/jpeg" | "image/png" | "image/webp" | "image/heic" | "application/pdf";
|
|
2600
|
+
bytes?: number;
|
|
2601
|
+
sha256?: string;
|
|
2602
|
+
};
|
|
2603
|
+
}[];
|
|
2604
|
+
expected?: {
|
|
2605
|
+
full_name?: string | null;
|
|
2606
|
+
business_name?: string | null;
|
|
2607
|
+
region?: string | null;
|
|
2608
|
+
};
|
|
2609
|
+
};
|
|
2610
|
+
DocumentFlag: {
|
|
2611
|
+
/** @enum {string} */
|
|
2612
|
+
code: "expired" | "expires_soon" | "name_mismatch" | "business_name_mismatch" | "region_mismatch" | "wrong_document_type" | "unreadable" | "incomplete" | "photo_of_screen" | "possible_edit" | "barcode_text_mismatch";
|
|
2613
|
+
/** @enum {string} */
|
|
2614
|
+
severity: "info" | "review";
|
|
2615
|
+
detail?: string;
|
|
2616
|
+
/** @description for *_mismatch: true when normalisation found them equivalent */
|
|
2617
|
+
matched?: boolean;
|
|
2618
|
+
/** @enum {string} */
|
|
2619
|
+
signal_strength?: "weak" | "moderate" | "strong";
|
|
2620
|
+
};
|
|
2621
|
+
DocumentCheck: {
|
|
2622
|
+
id: string;
|
|
2623
|
+
ref: string;
|
|
2624
|
+
/** @enum {string} */
|
|
2625
|
+
status: "queued" | "processing" | "completed" | "failed";
|
|
2626
|
+
document_type_detected?: string | null;
|
|
2627
|
+
/** @description null after 24 hours; the date of birth is never returned */
|
|
2628
|
+
fields?: {
|
|
2629
|
+
full_name?: string | null;
|
|
2630
|
+
document_number?: string | null;
|
|
2631
|
+
issuer?: string | null;
|
|
2632
|
+
region?: string | null;
|
|
2633
|
+
license_class?: string | null;
|
|
2634
|
+
/** Format: date */
|
|
2635
|
+
issued_on?: string | null;
|
|
2636
|
+
/** Format: date */
|
|
2637
|
+
expires_on?: string | null;
|
|
2638
|
+
date_of_birth_present?: boolean | null;
|
|
2639
|
+
business_name?: string | null;
|
|
2640
|
+
insured_name?: string | null;
|
|
2641
|
+
policy_number?: string | null;
|
|
2642
|
+
carrier?: string | null;
|
|
2643
|
+
/** Format: date */
|
|
2644
|
+
coverage_end?: string | null;
|
|
2645
|
+
} | null;
|
|
2646
|
+
field_sources?: {
|
|
2647
|
+
[key: string]: "barcode" | "text_recognition" | "visual";
|
|
2648
|
+
} | null;
|
|
2649
|
+
flags?: components["schemas"]["DocumentFlag"][];
|
|
2650
|
+
decision?: components["schemas"]["Decision"];
|
|
2651
|
+
model?: {
|
|
2652
|
+
id?: string;
|
|
2653
|
+
provider?: string;
|
|
2654
|
+
};
|
|
2655
|
+
error?: components["schemas"]["Problem"];
|
|
2656
|
+
/** Format: date-time */
|
|
2657
|
+
completed_at?: string;
|
|
2658
|
+
/** Format: date-time */
|
|
2659
|
+
fields_expire_at?: string;
|
|
2660
|
+
processing_ms?: number;
|
|
2661
|
+
};
|
|
2662
|
+
/** @description Common fields; the per-type fields and their strictness come from the event catalogue's JSON Schemas (contract §13.2). */
|
|
2663
|
+
Event: {
|
|
2664
|
+
event_id: string;
|
|
2665
|
+
/** @enum {string} */
|
|
2666
|
+
type: "search.performed" | "listing.viewed" | "booking.requested" | "booking.confirmed" | "booking.completed" | "booking.no_show" | "booking.cancelled" | "signup.completed" | "listing.submitted" | "listing.approved" | "listing.rejected" | "lead.created" | "lead.contacted" | "lead.converted" | "review.posted";
|
|
2667
|
+
/** Format: date-time */
|
|
2668
|
+
occurred_at: string;
|
|
2669
|
+
subject_id: components["schemas"]["SubjectId"];
|
|
2670
|
+
subject_type: components["schemas"]["SubjectType"];
|
|
2671
|
+
} & {
|
|
2672
|
+
[key: string]: unknown;
|
|
2673
|
+
};
|
|
2674
|
+
};
|
|
2675
|
+
responses: {
|
|
2676
|
+
/** @description Problem details (RFC 9457) */
|
|
2677
|
+
Problem: {
|
|
2678
|
+
headers: {
|
|
2679
|
+
"Vinaverse-Request-Id": components["headers"]["RequestId"];
|
|
2680
|
+
[name: string]: unknown;
|
|
2681
|
+
};
|
|
2682
|
+
content: {
|
|
2683
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
2684
|
+
};
|
|
2685
|
+
};
|
|
2686
|
+
/** @description Too many requests */
|
|
2687
|
+
RateLimited: {
|
|
2688
|
+
headers: {
|
|
2689
|
+
"Retry-After"?: number;
|
|
2690
|
+
[name: string]: unknown;
|
|
2691
|
+
};
|
|
2692
|
+
content: {
|
|
2693
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
2694
|
+
};
|
|
2695
|
+
};
|
|
2696
|
+
};
|
|
2697
|
+
parameters: {
|
|
2698
|
+
IdempotencyKey: string;
|
|
2699
|
+
MediaJobId: string;
|
|
2700
|
+
ConversationId: components["schemas"]["ConversationId"];
|
|
2701
|
+
SessionId: string;
|
|
2702
|
+
};
|
|
2703
|
+
requestBodies: never;
|
|
2704
|
+
headers: {
|
|
2705
|
+
/** @description Vinaverse-Request-Id */
|
|
2706
|
+
RequestId: string;
|
|
2707
|
+
};
|
|
2708
|
+
pathItems: never;
|
|
2709
|
+
}
|
|
2710
|
+
interface operations {
|
|
2711
|
+
createSession: {
|
|
2712
|
+
parameters: {
|
|
2713
|
+
query?: never;
|
|
2714
|
+
header: {
|
|
2715
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKey"];
|
|
2716
|
+
};
|
|
2717
|
+
path?: never;
|
|
2718
|
+
cookie?: never;
|
|
2719
|
+
};
|
|
2720
|
+
requestBody: {
|
|
2721
|
+
content: {
|
|
2722
|
+
"application/json": components["schemas"]["SessionCreate"];
|
|
2723
|
+
};
|
|
2724
|
+
};
|
|
2725
|
+
responses: {
|
|
2726
|
+
/** @description Created */
|
|
2727
|
+
201: {
|
|
2728
|
+
headers: {
|
|
2729
|
+
[name: string]: unknown;
|
|
2730
|
+
};
|
|
2731
|
+
content: {
|
|
2732
|
+
"application/json": components["schemas"]["Session"];
|
|
2733
|
+
};
|
|
2734
|
+
};
|
|
2735
|
+
400: components["responses"]["Problem"];
|
|
2736
|
+
401: components["responses"]["Problem"];
|
|
2737
|
+
403: components["responses"]["Problem"];
|
|
2738
|
+
404: components["responses"]["Problem"];
|
|
2739
|
+
409: components["responses"]["Problem"];
|
|
2740
|
+
410: components["responses"]["Problem"];
|
|
2741
|
+
429: components["responses"]["RateLimited"];
|
|
2742
|
+
503: components["responses"]["Problem"];
|
|
2743
|
+
};
|
|
2744
|
+
};
|
|
2745
|
+
createSuggestions: {
|
|
2746
|
+
parameters: {
|
|
2747
|
+
query?: never;
|
|
2748
|
+
header?: never;
|
|
2749
|
+
path?: never;
|
|
2750
|
+
cookie?: never;
|
|
2751
|
+
};
|
|
2752
|
+
requestBody: {
|
|
2753
|
+
content: {
|
|
2754
|
+
"application/json": components["schemas"]["SuggestionsRequest"];
|
|
2755
|
+
};
|
|
2756
|
+
};
|
|
2757
|
+
responses: {
|
|
2758
|
+
/** @description OK */
|
|
2759
|
+
200: {
|
|
2760
|
+
headers: {
|
|
2761
|
+
[name: string]: unknown;
|
|
2762
|
+
};
|
|
2763
|
+
content: {
|
|
2764
|
+
"application/json": components["schemas"]["SuggestionsResponse"];
|
|
2765
|
+
};
|
|
2766
|
+
};
|
|
2767
|
+
400: components["responses"]["Problem"];
|
|
2768
|
+
401: components["responses"]["Problem"];
|
|
2769
|
+
403: components["responses"]["Problem"];
|
|
2770
|
+
429: components["responses"]["RateLimited"];
|
|
2771
|
+
503: components["responses"]["Problem"];
|
|
2772
|
+
};
|
|
2773
|
+
};
|
|
2774
|
+
getConversation: {
|
|
2775
|
+
parameters: {
|
|
2776
|
+
query?: never;
|
|
2777
|
+
header?: never;
|
|
2778
|
+
path: {
|
|
2779
|
+
conversation_id: components["parameters"]["ConversationId"];
|
|
2780
|
+
};
|
|
2781
|
+
cookie?: never;
|
|
2782
|
+
};
|
|
2783
|
+
requestBody?: never;
|
|
2784
|
+
responses: {
|
|
2785
|
+
/** @description OK */
|
|
2786
|
+
200: {
|
|
2787
|
+
headers: {
|
|
2788
|
+
[name: string]: unknown;
|
|
2789
|
+
};
|
|
2790
|
+
content: {
|
|
2791
|
+
"application/json": components["schemas"]["ConversationState"] & unknown;
|
|
2792
|
+
};
|
|
2793
|
+
};
|
|
2794
|
+
401: components["responses"]["Problem"];
|
|
2795
|
+
403: components["responses"]["Problem"];
|
|
2796
|
+
404: components["responses"]["Problem"];
|
|
2797
|
+
410: components["responses"]["Problem"];
|
|
2798
|
+
};
|
|
2799
|
+
};
|
|
2800
|
+
getSession: {
|
|
2801
|
+
parameters: {
|
|
2802
|
+
query?: never;
|
|
2803
|
+
header?: never;
|
|
2804
|
+
path: {
|
|
2805
|
+
session_id: components["parameters"]["SessionId"];
|
|
2806
|
+
};
|
|
2807
|
+
cookie?: never;
|
|
2808
|
+
};
|
|
2809
|
+
requestBody?: never;
|
|
2810
|
+
responses: {
|
|
2811
|
+
/** @description OK */
|
|
2812
|
+
200: {
|
|
2813
|
+
headers: {
|
|
2814
|
+
[name: string]: unknown;
|
|
2815
|
+
};
|
|
2816
|
+
content: {
|
|
2817
|
+
"application/json": components["schemas"]["SessionStatus"];
|
|
2818
|
+
};
|
|
2819
|
+
};
|
|
2820
|
+
404: components["responses"]["Problem"];
|
|
2821
|
+
};
|
|
2822
|
+
};
|
|
2823
|
+
revokeSession: {
|
|
2824
|
+
parameters: {
|
|
2825
|
+
query?: never;
|
|
2826
|
+
header?: never;
|
|
2827
|
+
path: {
|
|
2828
|
+
session_id: components["parameters"]["SessionId"];
|
|
2829
|
+
};
|
|
2830
|
+
cookie?: never;
|
|
2831
|
+
};
|
|
2832
|
+
requestBody?: never;
|
|
2833
|
+
responses: {
|
|
2834
|
+
/** @description Revoked (idempotent) */
|
|
2835
|
+
200: {
|
|
2836
|
+
headers: {
|
|
2837
|
+
[name: string]: unknown;
|
|
2838
|
+
};
|
|
2839
|
+
content: {
|
|
2840
|
+
"application/json": components["schemas"]["SessionStatus"];
|
|
2841
|
+
};
|
|
2842
|
+
};
|
|
2843
|
+
404: components["responses"]["Problem"];
|
|
2844
|
+
};
|
|
2845
|
+
};
|
|
2846
|
+
refreshClientSecret: {
|
|
2847
|
+
parameters: {
|
|
2848
|
+
query?: never;
|
|
2849
|
+
header?: never;
|
|
2850
|
+
path: {
|
|
2851
|
+
session_id: components["parameters"]["SessionId"];
|
|
2852
|
+
};
|
|
2853
|
+
cookie?: never;
|
|
2854
|
+
};
|
|
2855
|
+
requestBody?: never;
|
|
2856
|
+
responses: {
|
|
2857
|
+
/** @description OK */
|
|
2858
|
+
200: {
|
|
2859
|
+
headers: {
|
|
2860
|
+
[name: string]: unknown;
|
|
2861
|
+
};
|
|
2862
|
+
content: {
|
|
2863
|
+
"application/json": components["schemas"]["ClientSecret"];
|
|
2864
|
+
};
|
|
2865
|
+
};
|
|
2866
|
+
409: components["responses"]["Problem"];
|
|
2867
|
+
};
|
|
2868
|
+
};
|
|
2869
|
+
createTurnSse: {
|
|
2870
|
+
parameters: {
|
|
2871
|
+
query?: never;
|
|
2872
|
+
header?: never;
|
|
2873
|
+
path: {
|
|
2874
|
+
session_id: components["parameters"]["SessionId"];
|
|
2875
|
+
};
|
|
2876
|
+
cookie?: never;
|
|
2877
|
+
};
|
|
2878
|
+
requestBody: {
|
|
2879
|
+
content: {
|
|
2880
|
+
"application/json": components["schemas"]["TurnInput"];
|
|
2881
|
+
};
|
|
2882
|
+
};
|
|
2883
|
+
responses: {
|
|
2884
|
+
/** @description `text/event-stream`. Each event's `event:` is a ServerEvent `type`; `data:` is the ServerEvent JSON. */
|
|
2885
|
+
200: {
|
|
2886
|
+
headers: {
|
|
2887
|
+
[name: string]: unknown;
|
|
2888
|
+
};
|
|
2889
|
+
content: {
|
|
2890
|
+
"text/event-stream": string;
|
|
2891
|
+
};
|
|
2892
|
+
};
|
|
2893
|
+
401: components["responses"]["Problem"];
|
|
2894
|
+
409: components["responses"]["Problem"];
|
|
2895
|
+
429: components["responses"]["RateLimited"];
|
|
2896
|
+
};
|
|
2897
|
+
};
|
|
2898
|
+
createCardActionSse: {
|
|
2899
|
+
parameters: {
|
|
2900
|
+
query?: never;
|
|
2901
|
+
header?: never;
|
|
2902
|
+
path: {
|
|
2903
|
+
session_id: components["parameters"]["SessionId"];
|
|
2904
|
+
turn_id: string;
|
|
2905
|
+
};
|
|
2906
|
+
cookie?: never;
|
|
2907
|
+
};
|
|
2908
|
+
requestBody: {
|
|
2909
|
+
content: {
|
|
2910
|
+
"application/json": {
|
|
2911
|
+
card_id: string;
|
|
2912
|
+
action: string;
|
|
2913
|
+
/** @description as on the WebSocket `ui.action`; required for a proposal outcome and for `select_slot` (the server refuses either without it) */
|
|
2914
|
+
client_event_id?: string;
|
|
2915
|
+
/** @description `select_slot` only (v1-draft.17): the slot picked, as on the WebSocket `ui.action` */
|
|
2916
|
+
slot?: components["schemas"]["SlotSelection"];
|
|
2917
|
+
};
|
|
2918
|
+
};
|
|
2919
|
+
};
|
|
2920
|
+
responses: {
|
|
2921
|
+
/** @description `text/event-stream` as for createTurnSse */
|
|
2922
|
+
200: {
|
|
2923
|
+
headers: {
|
|
2924
|
+
[name: string]: unknown;
|
|
2925
|
+
};
|
|
2926
|
+
content: {
|
|
2927
|
+
"text/event-stream": string;
|
|
2928
|
+
};
|
|
2929
|
+
};
|
|
2930
|
+
};
|
|
2931
|
+
};
|
|
2932
|
+
createModerationJob: {
|
|
2933
|
+
parameters: {
|
|
2934
|
+
query?: never;
|
|
2935
|
+
header: {
|
|
2936
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKey"];
|
|
2937
|
+
};
|
|
2938
|
+
path?: never;
|
|
2939
|
+
cookie?: never;
|
|
2940
|
+
};
|
|
2941
|
+
requestBody: {
|
|
2942
|
+
content: {
|
|
2943
|
+
"application/json": components["schemas"]["ModerationJobCreate"];
|
|
2944
|
+
};
|
|
2945
|
+
};
|
|
2946
|
+
responses: {
|
|
2947
|
+
/** @description Accepted */
|
|
2948
|
+
202: {
|
|
2949
|
+
headers: {
|
|
2950
|
+
[name: string]: unknown;
|
|
2951
|
+
};
|
|
2952
|
+
content: {
|
|
2953
|
+
"application/json": components["schemas"]["ModerationJob"];
|
|
2954
|
+
};
|
|
2955
|
+
};
|
|
2956
|
+
400: components["responses"]["Problem"];
|
|
2957
|
+
403: components["responses"]["Problem"];
|
|
2958
|
+
413: components["responses"]["Problem"];
|
|
2959
|
+
429: components["responses"]["RateLimited"];
|
|
2960
|
+
};
|
|
2961
|
+
};
|
|
2962
|
+
getModerationJob: {
|
|
2963
|
+
parameters: {
|
|
2964
|
+
query?: never;
|
|
2965
|
+
header?: never;
|
|
2966
|
+
path: {
|
|
2967
|
+
job_id: string;
|
|
2968
|
+
};
|
|
2969
|
+
cookie?: never;
|
|
2970
|
+
};
|
|
2971
|
+
requestBody?: never;
|
|
2972
|
+
responses: {
|
|
2973
|
+
/** @description OK */
|
|
2974
|
+
200: {
|
|
2975
|
+
headers: {
|
|
2976
|
+
[name: string]: unknown;
|
|
2977
|
+
};
|
|
2978
|
+
content: {
|
|
2979
|
+
"application/json": components["schemas"]["ModerationJob"];
|
|
2980
|
+
};
|
|
2981
|
+
};
|
|
2982
|
+
404: components["responses"]["Problem"];
|
|
2983
|
+
};
|
|
2984
|
+
};
|
|
2985
|
+
getModerationItem: {
|
|
2986
|
+
parameters: {
|
|
2987
|
+
query?: never;
|
|
2988
|
+
header?: never;
|
|
2989
|
+
path: {
|
|
2990
|
+
item_id: string;
|
|
2991
|
+
};
|
|
2992
|
+
cookie?: never;
|
|
2993
|
+
};
|
|
2994
|
+
requestBody?: never;
|
|
2995
|
+
responses: {
|
|
2996
|
+
/** @description OK */
|
|
2997
|
+
200: {
|
|
2998
|
+
headers: {
|
|
2999
|
+
[name: string]: unknown;
|
|
3000
|
+
};
|
|
3001
|
+
content: {
|
|
3002
|
+
"application/json": components["schemas"]["ModerationItem"];
|
|
3003
|
+
};
|
|
3004
|
+
};
|
|
3005
|
+
404: components["responses"]["Problem"];
|
|
3006
|
+
};
|
|
3007
|
+
};
|
|
3008
|
+
listMediaJobs: {
|
|
3009
|
+
parameters: {
|
|
3010
|
+
query?: {
|
|
3011
|
+
ref?: string;
|
|
3012
|
+
status?: "queued" | "processing" | "completed" | "failed" | "cancelled";
|
|
3013
|
+
limit?: number;
|
|
3014
|
+
cursor?: string;
|
|
3015
|
+
};
|
|
3016
|
+
header?: never;
|
|
3017
|
+
path?: never;
|
|
3018
|
+
cookie?: never;
|
|
3019
|
+
};
|
|
3020
|
+
requestBody?: never;
|
|
3021
|
+
responses: {
|
|
3022
|
+
/** @description Newest first. */
|
|
3023
|
+
200: {
|
|
3024
|
+
headers: {
|
|
3025
|
+
[name: string]: unknown;
|
|
3026
|
+
};
|
|
3027
|
+
content: {
|
|
3028
|
+
"application/json": {
|
|
3029
|
+
data: components["schemas"]["MediaJob"][];
|
|
3030
|
+
next_cursor: string | null;
|
|
3031
|
+
};
|
|
3032
|
+
};
|
|
3033
|
+
};
|
|
3034
|
+
};
|
|
3035
|
+
};
|
|
3036
|
+
createMediaJob: {
|
|
3037
|
+
parameters: {
|
|
3038
|
+
query?: never;
|
|
3039
|
+
header: {
|
|
3040
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKey"];
|
|
3041
|
+
};
|
|
3042
|
+
path?: never;
|
|
3043
|
+
cookie?: never;
|
|
3044
|
+
};
|
|
3045
|
+
requestBody: {
|
|
3046
|
+
content: {
|
|
3047
|
+
"application/json": components["schemas"]["MediaJobCreate"];
|
|
3048
|
+
};
|
|
3049
|
+
};
|
|
3050
|
+
responses: {
|
|
3051
|
+
/** @description The same content was processed with the same steps and policy in the last 30 days. */
|
|
3052
|
+
200: {
|
|
3053
|
+
headers: {
|
|
3054
|
+
[name: string]: unknown;
|
|
3055
|
+
};
|
|
3056
|
+
content: {
|
|
3057
|
+
"application/json": components["schemas"]["MediaJobCreated"];
|
|
3058
|
+
};
|
|
3059
|
+
};
|
|
3060
|
+
/** @description Accepted */
|
|
3061
|
+
202: {
|
|
3062
|
+
headers: {
|
|
3063
|
+
[name: string]: unknown;
|
|
3064
|
+
};
|
|
3065
|
+
content: {
|
|
3066
|
+
"application/json": components["schemas"]["MediaJobCreated"];
|
|
3067
|
+
};
|
|
3068
|
+
};
|
|
3069
|
+
400: components["responses"]["Problem"];
|
|
3070
|
+
403: components["responses"]["Problem"];
|
|
3071
|
+
409: components["responses"]["Problem"];
|
|
3072
|
+
413: components["responses"]["Problem"];
|
|
3073
|
+
429: components["responses"]["RateLimited"];
|
|
3074
|
+
};
|
|
3075
|
+
};
|
|
3076
|
+
getMediaJob: {
|
|
3077
|
+
parameters: {
|
|
3078
|
+
query?: never;
|
|
3079
|
+
header?: never;
|
|
3080
|
+
path: {
|
|
3081
|
+
job_id: components["parameters"]["MediaJobId"];
|
|
3082
|
+
};
|
|
3083
|
+
cookie?: never;
|
|
3084
|
+
};
|
|
3085
|
+
requestBody?: never;
|
|
3086
|
+
responses: {
|
|
3087
|
+
/** @description OK */
|
|
3088
|
+
200: {
|
|
3089
|
+
headers: {
|
|
3090
|
+
[name: string]: unknown;
|
|
3091
|
+
};
|
|
3092
|
+
content: {
|
|
3093
|
+
"application/json": components["schemas"]["MediaJob"];
|
|
3094
|
+
};
|
|
3095
|
+
};
|
|
3096
|
+
404: components["responses"]["Problem"];
|
|
3097
|
+
};
|
|
3098
|
+
};
|
|
3099
|
+
cancelMediaJob: {
|
|
3100
|
+
parameters: {
|
|
3101
|
+
query?: never;
|
|
3102
|
+
header?: never;
|
|
3103
|
+
path: {
|
|
3104
|
+
job_id: components["parameters"]["MediaJobId"];
|
|
3105
|
+
};
|
|
3106
|
+
cookie?: never;
|
|
3107
|
+
};
|
|
3108
|
+
requestBody?: never;
|
|
3109
|
+
responses: {
|
|
3110
|
+
/** @description The job, `cancelled` (or as it ended). */
|
|
3111
|
+
200: {
|
|
3112
|
+
headers: {
|
|
3113
|
+
[name: string]: unknown;
|
|
3114
|
+
};
|
|
3115
|
+
content: {
|
|
3116
|
+
"application/json": components["schemas"]["MediaJob"];
|
|
3117
|
+
};
|
|
3118
|
+
};
|
|
3119
|
+
404: components["responses"]["Problem"];
|
|
3120
|
+
};
|
|
3121
|
+
};
|
|
3122
|
+
listMediaProfiles: {
|
|
3123
|
+
parameters: {
|
|
3124
|
+
query?: never;
|
|
3125
|
+
header?: never;
|
|
3126
|
+
path?: never;
|
|
3127
|
+
cookie?: never;
|
|
3128
|
+
};
|
|
3129
|
+
requestBody?: never;
|
|
3130
|
+
responses: {
|
|
3131
|
+
/** @description The transcoding profiles, named and versioned. */
|
|
3132
|
+
200: {
|
|
3133
|
+
headers: {
|
|
3134
|
+
[name: string]: unknown;
|
|
3135
|
+
};
|
|
3136
|
+
content: {
|
|
3137
|
+
"application/json": {
|
|
3138
|
+
data: components["schemas"]["MediaProfile"][];
|
|
3139
|
+
};
|
|
3140
|
+
};
|
|
3141
|
+
};
|
|
3142
|
+
};
|
|
3143
|
+
};
|
|
3144
|
+
screenText: {
|
|
3145
|
+
parameters: {
|
|
3146
|
+
query?: never;
|
|
3147
|
+
header?: never;
|
|
3148
|
+
path?: never;
|
|
3149
|
+
cookie?: never;
|
|
3150
|
+
};
|
|
3151
|
+
requestBody: {
|
|
3152
|
+
content: {
|
|
3153
|
+
"application/json": components["schemas"]["ScreeningRequest"];
|
|
3154
|
+
};
|
|
3155
|
+
};
|
|
3156
|
+
responses: {
|
|
3157
|
+
/** @description OK */
|
|
3158
|
+
200: {
|
|
3159
|
+
headers: {
|
|
3160
|
+
[name: string]: unknown;
|
|
3161
|
+
};
|
|
3162
|
+
content: {
|
|
3163
|
+
"application/json": components["schemas"]["ScreeningResponse"];
|
|
3164
|
+
};
|
|
3165
|
+
};
|
|
3166
|
+
400: components["responses"]["Problem"];
|
|
3167
|
+
403: components["responses"]["Problem"];
|
|
3168
|
+
429: components["responses"]["RateLimited"];
|
|
3169
|
+
503: components["responses"]["Problem"];
|
|
3170
|
+
};
|
|
3171
|
+
};
|
|
3172
|
+
createDocumentCheck: {
|
|
3173
|
+
parameters: {
|
|
3174
|
+
query?: never;
|
|
3175
|
+
header: {
|
|
3176
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKey"];
|
|
3177
|
+
};
|
|
3178
|
+
path?: never;
|
|
3179
|
+
cookie?: never;
|
|
3180
|
+
};
|
|
3181
|
+
requestBody: {
|
|
3182
|
+
content: {
|
|
3183
|
+
"application/json": components["schemas"]["DocumentCheckCreate"];
|
|
3184
|
+
};
|
|
3185
|
+
};
|
|
3186
|
+
responses: {
|
|
3187
|
+
/** @description Accepted */
|
|
3188
|
+
202: {
|
|
3189
|
+
headers: {
|
|
3190
|
+
[name: string]: unknown;
|
|
3191
|
+
};
|
|
3192
|
+
content: {
|
|
3193
|
+
"application/json": {
|
|
3194
|
+
id: string;
|
|
3195
|
+
/** @enum {string} */
|
|
3196
|
+
status: "queued";
|
|
3197
|
+
estimated_completion_seconds?: number;
|
|
3198
|
+
};
|
|
3199
|
+
};
|
|
3200
|
+
};
|
|
3201
|
+
400: components["responses"]["Problem"];
|
|
3202
|
+
403: components["responses"]["Problem"];
|
|
3203
|
+
429: components["responses"]["RateLimited"];
|
|
3204
|
+
};
|
|
3205
|
+
};
|
|
3206
|
+
getDocumentCheck: {
|
|
3207
|
+
parameters: {
|
|
3208
|
+
query?: never;
|
|
3209
|
+
header?: never;
|
|
3210
|
+
path: {
|
|
3211
|
+
check_id: string;
|
|
3212
|
+
};
|
|
3213
|
+
cookie?: never;
|
|
3214
|
+
};
|
|
3215
|
+
requestBody?: never;
|
|
3216
|
+
responses: {
|
|
3217
|
+
/** @description OK */
|
|
3218
|
+
200: {
|
|
3219
|
+
headers: {
|
|
3220
|
+
[name: string]: unknown;
|
|
3221
|
+
};
|
|
3222
|
+
content: {
|
|
3223
|
+
"application/json": components["schemas"]["DocumentCheck"];
|
|
3224
|
+
};
|
|
3225
|
+
};
|
|
3226
|
+
404: components["responses"]["Problem"];
|
|
3227
|
+
};
|
|
3228
|
+
};
|
|
3229
|
+
sendFeedback: {
|
|
3230
|
+
parameters: {
|
|
3231
|
+
query?: never;
|
|
3232
|
+
header?: never;
|
|
3233
|
+
path?: never;
|
|
3234
|
+
cookie?: never;
|
|
3235
|
+
};
|
|
3236
|
+
requestBody: {
|
|
3237
|
+
content: {
|
|
3238
|
+
"application/json": components["schemas"]["FeedbackBatch"];
|
|
3239
|
+
};
|
|
3240
|
+
};
|
|
3241
|
+
responses: {
|
|
3242
|
+
/** @description Accepted */
|
|
3243
|
+
202: {
|
|
3244
|
+
headers: {
|
|
3245
|
+
[name: string]: unknown;
|
|
3246
|
+
};
|
|
3247
|
+
content: {
|
|
3248
|
+
"application/json": {
|
|
3249
|
+
accepted: number;
|
|
3250
|
+
rejected: {
|
|
3251
|
+
index: number;
|
|
3252
|
+
code: string;
|
|
3253
|
+
detail?: string;
|
|
3254
|
+
}[];
|
|
3255
|
+
};
|
|
3256
|
+
};
|
|
3257
|
+
};
|
|
3258
|
+
400: components["responses"]["Problem"];
|
|
3259
|
+
};
|
|
3260
|
+
};
|
|
3261
|
+
eraseSubject: {
|
|
3262
|
+
parameters: {
|
|
3263
|
+
query?: never;
|
|
3264
|
+
header: {
|
|
3265
|
+
"Idempotency-Key": components["parameters"]["IdempotencyKey"];
|
|
3266
|
+
};
|
|
3267
|
+
path: {
|
|
3268
|
+
subject_id: components["schemas"]["SubjectId"];
|
|
3269
|
+
};
|
|
3270
|
+
cookie?: never;
|
|
3271
|
+
};
|
|
3272
|
+
requestBody?: never;
|
|
3273
|
+
responses: {
|
|
3274
|
+
/** @description Accepted; `subject.erased` follows */
|
|
3275
|
+
202: {
|
|
3276
|
+
headers: {
|
|
3277
|
+
[name: string]: unknown;
|
|
3278
|
+
};
|
|
3279
|
+
content: {
|
|
3280
|
+
"application/json": {
|
|
3281
|
+
subject_id: components["schemas"]["SubjectId"];
|
|
3282
|
+
/** @enum {string} */
|
|
3283
|
+
status: "accepted" | "completed";
|
|
3284
|
+
sessions_revoked: number;
|
|
3285
|
+
/** Format: date-time */
|
|
3286
|
+
deadline: string;
|
|
3287
|
+
};
|
|
3288
|
+
};
|
|
3289
|
+
};
|
|
3290
|
+
/** @description Nothing held for the subject (never seen, or already erased); the problem's `type` ends in `/problems/subject-not-found` */
|
|
3291
|
+
404: {
|
|
3292
|
+
headers: {
|
|
3293
|
+
"Vinaverse-Request-Id": components["headers"]["RequestId"];
|
|
3294
|
+
[name: string]: unknown;
|
|
3295
|
+
};
|
|
3296
|
+
content: {
|
|
3297
|
+
"application/problem+json": components["schemas"]["Problem"] & {
|
|
3298
|
+
/** @constant */
|
|
3299
|
+
code?: "not_found";
|
|
3300
|
+
type?: unknown;
|
|
3301
|
+
};
|
|
3302
|
+
};
|
|
3303
|
+
};
|
|
3304
|
+
};
|
|
3305
|
+
};
|
|
3306
|
+
sendEvents: {
|
|
3307
|
+
parameters: {
|
|
3308
|
+
query?: never;
|
|
3309
|
+
header?: never;
|
|
3310
|
+
path?: never;
|
|
3311
|
+
cookie?: never;
|
|
3312
|
+
};
|
|
3313
|
+
requestBody: {
|
|
3314
|
+
content: {
|
|
3315
|
+
"application/json": {
|
|
3316
|
+
events: components["schemas"]["Event"][];
|
|
3317
|
+
};
|
|
3318
|
+
};
|
|
3319
|
+
};
|
|
3320
|
+
responses: {
|
|
3321
|
+
/** @description Accepted */
|
|
3322
|
+
202: {
|
|
3323
|
+
headers: {
|
|
3324
|
+
[name: string]: unknown;
|
|
3325
|
+
};
|
|
3326
|
+
content: {
|
|
3327
|
+
"application/json": {
|
|
3328
|
+
accepted: number;
|
|
3329
|
+
duplicates: number;
|
|
3330
|
+
batch_id: string;
|
|
3331
|
+
batch_cid: string;
|
|
3332
|
+
};
|
|
3333
|
+
};
|
|
3334
|
+
};
|
|
3335
|
+
400: components["responses"]["Problem"];
|
|
3336
|
+
403: components["responses"]["Problem"];
|
|
3337
|
+
429: components["responses"]["RateLimited"];
|
|
3338
|
+
};
|
|
3339
|
+
};
|
|
3340
|
+
sendKnowledgeDocument: {
|
|
3341
|
+
parameters: {
|
|
3342
|
+
query?: never;
|
|
3343
|
+
header?: never;
|
|
3344
|
+
path?: never;
|
|
3345
|
+
cookie?: never;
|
|
3346
|
+
};
|
|
3347
|
+
requestBody: {
|
|
3348
|
+
content: {
|
|
3349
|
+
"application/json": {
|
|
3350
|
+
doc_id: string;
|
|
3351
|
+
version: string;
|
|
3352
|
+
title: string;
|
|
3353
|
+
/** @description Markdown */
|
|
3354
|
+
body: string;
|
|
3355
|
+
/** @enum {string} */
|
|
3356
|
+
audience: "public" | "staff";
|
|
3357
|
+
/** @default en */
|
|
3358
|
+
language?: string;
|
|
3359
|
+
/** Format: uri */
|
|
3360
|
+
url?: string;
|
|
3361
|
+
};
|
|
3362
|
+
};
|
|
3363
|
+
};
|
|
3364
|
+
responses: {
|
|
3365
|
+
/** @description Same version and body already stored (no change) */
|
|
3366
|
+
200: {
|
|
3367
|
+
headers: {
|
|
3368
|
+
[name: string]: unknown;
|
|
3369
|
+
};
|
|
3370
|
+
content?: never;
|
|
3371
|
+
};
|
|
3372
|
+
/** @description Stored */
|
|
3373
|
+
201: {
|
|
3374
|
+
headers: {
|
|
3375
|
+
[name: string]: unknown;
|
|
3376
|
+
};
|
|
3377
|
+
content: {
|
|
3378
|
+
"application/json": {
|
|
3379
|
+
doc_id: string;
|
|
3380
|
+
version: string;
|
|
3381
|
+
audience: string;
|
|
3382
|
+
artifact_cid: string;
|
|
3383
|
+
chunks: number;
|
|
3384
|
+
};
|
|
3385
|
+
};
|
|
3386
|
+
};
|
|
3387
|
+
400: components["responses"]["Problem"];
|
|
3388
|
+
403: components["responses"]["Problem"];
|
|
3389
|
+
};
|
|
3390
|
+
};
|
|
3391
|
+
putCatalogEntity: {
|
|
3392
|
+
parameters: {
|
|
3393
|
+
query?: never;
|
|
3394
|
+
header?: never;
|
|
3395
|
+
path: {
|
|
3396
|
+
type: "professional" | "workspace" | "service_type" | "area";
|
|
3397
|
+
id: string;
|
|
3398
|
+
};
|
|
3399
|
+
cookie?: never;
|
|
3400
|
+
};
|
|
3401
|
+
requestBody: {
|
|
3402
|
+
content: {
|
|
3403
|
+
"application/json": {
|
|
3404
|
+
name?: string;
|
|
3405
|
+
display_name?: string;
|
|
3406
|
+
title?: string;
|
|
3407
|
+
service_type_ids?: string[];
|
|
3408
|
+
area?: {
|
|
3409
|
+
city?: string;
|
|
3410
|
+
neighborhood?: string;
|
|
3411
|
+
};
|
|
3412
|
+
/** @default true */
|
|
3413
|
+
active?: boolean;
|
|
3414
|
+
};
|
|
3415
|
+
};
|
|
3416
|
+
};
|
|
3417
|
+
responses: {
|
|
3418
|
+
/** @description Stored or unchanged */
|
|
3419
|
+
200: {
|
|
3420
|
+
headers: {
|
|
3421
|
+
[name: string]: unknown;
|
|
3422
|
+
};
|
|
3423
|
+
content: {
|
|
3424
|
+
"application/json": {
|
|
3425
|
+
type: string;
|
|
3426
|
+
id: string;
|
|
3427
|
+
changed: boolean;
|
|
3428
|
+
snapshot_cid: string | null;
|
|
3429
|
+
};
|
|
3430
|
+
};
|
|
3431
|
+
};
|
|
3432
|
+
400: components["responses"]["Problem"];
|
|
3433
|
+
403: components["responses"]["Problem"];
|
|
3434
|
+
};
|
|
3435
|
+
};
|
|
3436
|
+
getUsage: {
|
|
3437
|
+
parameters: {
|
|
3438
|
+
query?: {
|
|
3439
|
+
period?: string;
|
|
3440
|
+
};
|
|
3441
|
+
header?: never;
|
|
3442
|
+
path?: never;
|
|
3443
|
+
cookie?: never;
|
|
3444
|
+
};
|
|
3445
|
+
requestBody?: never;
|
|
3446
|
+
responses: {
|
|
3447
|
+
/** @description OK */
|
|
3448
|
+
200: {
|
|
3449
|
+
headers: {
|
|
3450
|
+
[name: string]: unknown;
|
|
3451
|
+
};
|
|
3452
|
+
content: {
|
|
3453
|
+
"application/json": components["schemas"]["UsageReport"];
|
|
3454
|
+
};
|
|
3455
|
+
};
|
|
3456
|
+
};
|
|
3457
|
+
};
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3460
|
+
export type { components as c, operations as o, paths as p, webhooks as w };
|