@opengeni/contracts 0.38.3 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,300 @@
1
+ import { z } from "zod";
2
+ export declare const TranscriptionRecordingErrorCode: z.ZodEnum<{
3
+ cancelled: "cancelled";
4
+ invalid_audio: "invalid_audio";
5
+ network: "network";
6
+ not_supported: "not_supported";
7
+ permission_denied: "permission_denied";
8
+ policy_blocked: "policy_blocked";
9
+ provider: "provider";
10
+ timeout: "timeout";
11
+ too_large: "too_large";
12
+ unavailable: "unavailable";
13
+ unknown: "unknown";
14
+ }>;
15
+ export type TranscriptionRecordingErrorCode = z.infer<typeof TranscriptionRecordingErrorCode>;
16
+ export declare const TranscriptionRecordingState: z.ZodEnum<{
17
+ complete: "complete";
18
+ discarded: "discarded";
19
+ failed: "failed";
20
+ ready: "ready";
21
+ segmenting: "segmenting";
22
+ transcribing: "transcribing";
23
+ uploading: "uploading";
24
+ }>;
25
+ export type TranscriptionRecordingState = z.infer<typeof TranscriptionRecordingState>;
26
+ export declare const TranscriptionRecordingSegmentState: z.ZodEnum<{
27
+ complete: "complete";
28
+ failed: "failed";
29
+ pending: "pending";
30
+ preparing: "preparing";
31
+ transcribing: "transcribing";
32
+ }>;
33
+ export type TranscriptionRecordingSegmentState = z.infer<typeof TranscriptionRecordingSegmentState>;
34
+ export declare const ClientResumableVoiceInputConfig: z.ZodObject<{
35
+ maxDurationSeconds: z.ZodNumber;
36
+ maxSizeBytes: z.ZodNumber;
37
+ maxChunkSizeBytes: z.ZodNumber;
38
+ providerSegmentSeconds: z.ZodNumber;
39
+ }, z.core.$strict>;
40
+ export type ClientResumableVoiceInputConfig = z.infer<typeof ClientResumableVoiceInputConfig>;
41
+ export declare const CreateTranscriptionRecordingRequest: z.ZodObject<{
42
+ recordingId: z.ZodString;
43
+ mimeType: z.ZodString;
44
+ }, z.core.$strict>;
45
+ export type CreateTranscriptionRecordingRequest = z.infer<typeof CreateTranscriptionRecordingRequest>;
46
+ export declare const FinalizeTranscriptionRecordingRequest: z.ZodObject<{
47
+ chunkCount: z.ZodNumber;
48
+ totalBytes: z.ZodNumber;
49
+ totalDurationMilliseconds: z.ZodNumber;
50
+ }, z.core.$strict>;
51
+ export type FinalizeTranscriptionRecordingRequest = z.infer<typeof FinalizeTranscriptionRecordingRequest>;
52
+ export declare const TranscriptionRecordingChunk: z.ZodObject<{
53
+ chunkNumber: z.ZodNumber;
54
+ byteLength: z.ZodNumber;
55
+ sha256: z.ZodString;
56
+ startMilliseconds: z.ZodNumber;
57
+ durationMilliseconds: z.ZodNumber;
58
+ deduplicated: z.ZodBoolean;
59
+ }, z.core.$strict>;
60
+ export type TranscriptionRecordingChunk = z.infer<typeof TranscriptionRecordingChunk>;
61
+ export declare const TranscriptionRecordingSegment: z.ZodObject<{
62
+ segmentNumber: z.ZodNumber;
63
+ state: z.ZodEnum<{
64
+ complete: "complete";
65
+ failed: "failed";
66
+ pending: "pending";
67
+ preparing: "preparing";
68
+ transcribing: "transcribing";
69
+ }>;
70
+ startMilliseconds: z.ZodNumber;
71
+ durationMilliseconds: z.ZodNumber;
72
+ byteLength: z.ZodNumber;
73
+ errorCode: z.ZodNullable<z.ZodEnum<{
74
+ cancelled: "cancelled";
75
+ invalid_audio: "invalid_audio";
76
+ network: "network";
77
+ not_supported: "not_supported";
78
+ permission_denied: "permission_denied";
79
+ policy_blocked: "policy_blocked";
80
+ provider: "provider";
81
+ timeout: "timeout";
82
+ too_large: "too_large";
83
+ unavailable: "unavailable";
84
+ unknown: "unknown";
85
+ }>>;
86
+ retryable: z.ZodBoolean;
87
+ }, z.core.$strict>;
88
+ export type TranscriptionRecordingSegment = z.infer<typeof TranscriptionRecordingSegment>;
89
+ export declare const TranscriptionRecording: z.ZodObject<{
90
+ id: z.ZodString;
91
+ workspaceId: z.ZodString;
92
+ mimeType: z.ZodString;
93
+ state: z.ZodEnum<{
94
+ complete: "complete";
95
+ discarded: "discarded";
96
+ failed: "failed";
97
+ ready: "ready";
98
+ segmenting: "segmenting";
99
+ transcribing: "transcribing";
100
+ uploading: "uploading";
101
+ }>;
102
+ nextChunkNumber: z.ZodNumber;
103
+ chunkCount: z.ZodNumber;
104
+ totalBytes: z.ZodNumber;
105
+ totalDurationMilliseconds: z.ZodNumber;
106
+ segmentCount: z.ZodNumber;
107
+ completedSegmentCount: z.ZodNumber;
108
+ transcriptText: z.ZodNullable<z.ZodString>;
109
+ languages: z.ZodArray<z.ZodString>;
110
+ errorCode: z.ZodNullable<z.ZodEnum<{
111
+ cancelled: "cancelled";
112
+ invalid_audio: "invalid_audio";
113
+ network: "network";
114
+ not_supported: "not_supported";
115
+ permission_denied: "permission_denied";
116
+ policy_blocked: "policy_blocked";
117
+ provider: "provider";
118
+ timeout: "timeout";
119
+ too_large: "too_large";
120
+ unavailable: "unavailable";
121
+ unknown: "unknown";
122
+ }>>;
123
+ retryable: z.ZodBoolean;
124
+ objectsCleaned: z.ZodBoolean;
125
+ createdAt: z.ZodString;
126
+ updatedAt: z.ZodString;
127
+ expiresAt: z.ZodString;
128
+ }, z.core.$strict>;
129
+ export type TranscriptionRecording = z.infer<typeof TranscriptionRecording>;
130
+ export declare const TranscriptionRecordingResponse: z.ZodObject<{
131
+ recording: z.ZodObject<{
132
+ id: z.ZodString;
133
+ workspaceId: z.ZodString;
134
+ mimeType: z.ZodString;
135
+ state: z.ZodEnum<{
136
+ complete: "complete";
137
+ discarded: "discarded";
138
+ failed: "failed";
139
+ ready: "ready";
140
+ segmenting: "segmenting";
141
+ transcribing: "transcribing";
142
+ uploading: "uploading";
143
+ }>;
144
+ nextChunkNumber: z.ZodNumber;
145
+ chunkCount: z.ZodNumber;
146
+ totalBytes: z.ZodNumber;
147
+ totalDurationMilliseconds: z.ZodNumber;
148
+ segmentCount: z.ZodNumber;
149
+ completedSegmentCount: z.ZodNumber;
150
+ transcriptText: z.ZodNullable<z.ZodString>;
151
+ languages: z.ZodArray<z.ZodString>;
152
+ errorCode: z.ZodNullable<z.ZodEnum<{
153
+ cancelled: "cancelled";
154
+ invalid_audio: "invalid_audio";
155
+ network: "network";
156
+ not_supported: "not_supported";
157
+ permission_denied: "permission_denied";
158
+ policy_blocked: "policy_blocked";
159
+ provider: "provider";
160
+ timeout: "timeout";
161
+ too_large: "too_large";
162
+ unavailable: "unavailable";
163
+ unknown: "unknown";
164
+ }>>;
165
+ retryable: z.ZodBoolean;
166
+ objectsCleaned: z.ZodBoolean;
167
+ createdAt: z.ZodString;
168
+ updatedAt: z.ZodString;
169
+ expiresAt: z.ZodString;
170
+ }, z.core.$strict>;
171
+ segments: z.ZodArray<z.ZodObject<{
172
+ segmentNumber: z.ZodNumber;
173
+ state: z.ZodEnum<{
174
+ complete: "complete";
175
+ failed: "failed";
176
+ pending: "pending";
177
+ preparing: "preparing";
178
+ transcribing: "transcribing";
179
+ }>;
180
+ startMilliseconds: z.ZodNumber;
181
+ durationMilliseconds: z.ZodNumber;
182
+ byteLength: z.ZodNumber;
183
+ errorCode: z.ZodNullable<z.ZodEnum<{
184
+ cancelled: "cancelled";
185
+ invalid_audio: "invalid_audio";
186
+ network: "network";
187
+ not_supported: "not_supported";
188
+ permission_denied: "permission_denied";
189
+ policy_blocked: "policy_blocked";
190
+ provider: "provider";
191
+ timeout: "timeout";
192
+ too_large: "too_large";
193
+ unavailable: "unavailable";
194
+ unknown: "unknown";
195
+ }>>;
196
+ retryable: z.ZodBoolean;
197
+ }, z.core.$strict>>;
198
+ retryAfterMilliseconds: z.ZodOptional<z.ZodNumber>;
199
+ }, z.core.$strict>;
200
+ export type TranscriptionRecordingResponse = z.infer<typeof TranscriptionRecordingResponse>;
201
+ export declare const TranscriptionRecordingListResponse: z.ZodObject<{
202
+ recordings: z.ZodArray<z.ZodObject<{
203
+ id: z.ZodString;
204
+ workspaceId: z.ZodString;
205
+ mimeType: z.ZodString;
206
+ state: z.ZodEnum<{
207
+ complete: "complete";
208
+ discarded: "discarded";
209
+ failed: "failed";
210
+ ready: "ready";
211
+ segmenting: "segmenting";
212
+ transcribing: "transcribing";
213
+ uploading: "uploading";
214
+ }>;
215
+ nextChunkNumber: z.ZodNumber;
216
+ chunkCount: z.ZodNumber;
217
+ totalBytes: z.ZodNumber;
218
+ totalDurationMilliseconds: z.ZodNumber;
219
+ segmentCount: z.ZodNumber;
220
+ completedSegmentCount: z.ZodNumber;
221
+ transcriptText: z.ZodNullable<z.ZodString>;
222
+ languages: z.ZodArray<z.ZodString>;
223
+ errorCode: z.ZodNullable<z.ZodEnum<{
224
+ cancelled: "cancelled";
225
+ invalid_audio: "invalid_audio";
226
+ network: "network";
227
+ not_supported: "not_supported";
228
+ permission_denied: "permission_denied";
229
+ policy_blocked: "policy_blocked";
230
+ provider: "provider";
231
+ timeout: "timeout";
232
+ too_large: "too_large";
233
+ unavailable: "unavailable";
234
+ unknown: "unknown";
235
+ }>>;
236
+ retryable: z.ZodBoolean;
237
+ objectsCleaned: z.ZodBoolean;
238
+ createdAt: z.ZodString;
239
+ updatedAt: z.ZodString;
240
+ expiresAt: z.ZodString;
241
+ }, z.core.$strict>>;
242
+ }, z.core.$strict>;
243
+ export type TranscriptionRecordingListResponse = z.infer<typeof TranscriptionRecordingListResponse>;
244
+ export declare const UploadTranscriptionRecordingChunkResponse: z.ZodObject<{
245
+ recording: z.ZodObject<{
246
+ id: z.ZodString;
247
+ workspaceId: z.ZodString;
248
+ mimeType: z.ZodString;
249
+ state: z.ZodEnum<{
250
+ complete: "complete";
251
+ discarded: "discarded";
252
+ failed: "failed";
253
+ ready: "ready";
254
+ segmenting: "segmenting";
255
+ transcribing: "transcribing";
256
+ uploading: "uploading";
257
+ }>;
258
+ nextChunkNumber: z.ZodNumber;
259
+ chunkCount: z.ZodNumber;
260
+ totalBytes: z.ZodNumber;
261
+ totalDurationMilliseconds: z.ZodNumber;
262
+ segmentCount: z.ZodNumber;
263
+ completedSegmentCount: z.ZodNumber;
264
+ transcriptText: z.ZodNullable<z.ZodString>;
265
+ languages: z.ZodArray<z.ZodString>;
266
+ errorCode: z.ZodNullable<z.ZodEnum<{
267
+ cancelled: "cancelled";
268
+ invalid_audio: "invalid_audio";
269
+ network: "network";
270
+ not_supported: "not_supported";
271
+ permission_denied: "permission_denied";
272
+ policy_blocked: "policy_blocked";
273
+ provider: "provider";
274
+ timeout: "timeout";
275
+ too_large: "too_large";
276
+ unavailable: "unavailable";
277
+ unknown: "unknown";
278
+ }>>;
279
+ retryable: z.ZodBoolean;
280
+ objectsCleaned: z.ZodBoolean;
281
+ createdAt: z.ZodString;
282
+ updatedAt: z.ZodString;
283
+ expiresAt: z.ZodString;
284
+ }, z.core.$strict>;
285
+ chunk: z.ZodObject<{
286
+ chunkNumber: z.ZodNumber;
287
+ byteLength: z.ZodNumber;
288
+ sha256: z.ZodString;
289
+ startMilliseconds: z.ZodNumber;
290
+ durationMilliseconds: z.ZodNumber;
291
+ deduplicated: z.ZodBoolean;
292
+ }, z.core.$strict>;
293
+ }, z.core.$strict>;
294
+ export type UploadTranscriptionRecordingChunkResponse = z.infer<typeof UploadTranscriptionRecordingChunkResponse>;
295
+ export declare const TRANSCRIPTION_RECORDING_MAX_DURATION_SECONDS: number;
296
+ export declare const TRANSCRIPTION_RECORDING_MAX_SIZE_BYTES: number;
297
+ export declare const TRANSCRIPTION_RECORDING_MAX_CHUNK_SIZE_BYTES: number;
298
+ export declare const TRANSCRIPTION_RECORDING_PROVIDER_SEGMENT_SECONDS = 50;
299
+ export declare const TRANSCRIPTION_RECORDING_RECOVERY_RETRY_AFTER_MILLISECONDS = 5000;
300
+ export declare const TRANSCRIPTION_RECORDING_RETENTION_SECONDS: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/contracts",
3
- "version": "0.38.3",
3
+ "version": "0.40.0",
4
4
  "description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Canonical bounded representation for `session_events.payload`.
2
+ * Canonical bounded representation for explicit session-event previews.
3
3
  *
4
- * Session events are the lossy human/audit projection, not model memory and not
5
- * an evidence blob store. This helper keeps that projection useful while making
6
- * the loss explicit. It deliberately has no server-only dependency so the DB,
7
- * realtime transports, SDK/React, and tests can share one wire contract.
4
+ * Canonical session-event payloads are stored in full. This helper derives a
5
+ * bounded monitoring/public projection without writing that projection back
6
+ * over canonical data. It deliberately has no server-only dependency so the
7
+ * DB, realtime transports, SDK/React, and tests can share one wire contract.
8
8
  */
9
9
 
10
10
  import {
@@ -184,7 +184,7 @@ export function sessionEventPayloadTruncation(
184
184
  }
185
185
 
186
186
  /**
187
- * Return a byte-bounded audit payload. Unchanged ordinary payloads retain their
187
+ * Return a byte-bounded preview payload. Unchanged ordinary payloads retain their
188
188
  * reference. Oversized strings/containers get deterministic head+tail previews;
189
189
  * inline images/binary values become metadata because `session_events` does not
190
190
  * durably retain their source bytes as independently retrievable evidence.