@vertesia/common 1.6.0-dev.20260918.090710Z → 1.6.0-dev.20260918.115658Z

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.
Files changed (42) hide show
  1. package/lib/api-contract/components.generated.json +612 -1
  2. package/lib/api-schemas/app-runtime.d.ts +18 -0
  3. package/lib/api-schemas/app-runtime.d.ts.map +1 -1
  4. package/lib/api-schemas/apps.d.ts +5 -0
  5. package/lib/api-schemas/apps.d.ts.map +1 -1
  6. package/lib/api-schemas/apps.js +6 -3
  7. package/lib/api-schemas/apps.js.map +1 -1
  8. package/lib/api-schemas/embeddings.d.ts +250 -0
  9. package/lib/api-schemas/embeddings.d.ts.map +1 -1
  10. package/lib/api-schemas/embeddings.js +163 -0
  11. package/lib/api-schemas/embeddings.js.map +1 -1
  12. package/lib/api-schemas/files.d.ts +1 -0
  13. package/lib/api-schemas/files.d.ts.map +1 -1
  14. package/lib/api-schemas/files.js +1 -0
  15. package/lib/api-schemas/files.js.map +1 -1
  16. package/lib/api-schemas/registry.d.ts +271 -0
  17. package/lib/api-schemas/registry.d.ts.map +1 -1
  18. package/lib/api-schemas/registry.js +20 -1
  19. package/lib/api-schemas/registry.js.map +1 -1
  20. package/lib/embeddings.d.ts +18 -1
  21. package/lib/embeddings.d.ts.map +1 -1
  22. package/lib/index.d.ts +1 -0
  23. package/lib/index.d.ts.map +1 -1
  24. package/lib/index.js +1 -0
  25. package/lib/index.js.map +1 -1
  26. package/lib/store/rendering.d.ts +1 -0
  27. package/lib/store/rendering.d.ts.map +1 -1
  28. package/lib/store/rendering.js +4 -0
  29. package/lib/store/rendering.js.map +1 -1
  30. package/lib/vertesia-common.js +1 -1
  31. package/lib/vertesia-common.js.map +1 -1
  32. package/package.json +2 -2
  33. package/src/api-contract/components.generated.json +612 -1
  34. package/src/api-schemas/apps.ts +6 -3
  35. package/src/api-schemas/embeddings.ts +184 -0
  36. package/src/api-schemas/files.ts +1 -0
  37. package/src/api-schemas/indexing.contract.test.ts +40 -1
  38. package/src/api-schemas/mcp-api-key.contract.test.ts +39 -0
  39. package/src/api-schemas/registry.ts +36 -0
  40. package/src/embeddings.ts +34 -0
  41. package/src/index.ts +1 -0
  42. package/src/store/rendering.ts +9 -0
@@ -102,10 +102,40 @@ export const EmbeddingsApiRequestSchema = z
102
102
  })
103
103
  .meta({ id: 'EmbeddingsApiRequest' });
104
104
 
105
+ export const EmbeddingBatchRunStateSchema = z.enum([
106
+ 'preparing',
107
+ 'submitted',
108
+ 'running',
109
+ 'applying',
110
+ 'completed',
111
+ 'completed_with_errors',
112
+ 'cancelled',
113
+ 'stale',
114
+ 'failed',
115
+ ]);
116
+
117
+ export const EmbeddingBatchRunSummarySchema = z
118
+ .strictObject({
119
+ id: z.string(),
120
+ state: EmbeddingBatchRunStateSchema,
121
+ model: z.string(),
122
+ created_at: z.string().meta({ format: 'date-time' }),
123
+ completed_at: z.string().meta({ format: 'date-time' }).optional(),
124
+ applied: z.number().int().nonnegative(),
125
+ skipped: z.number().int().nonnegative(),
126
+ failed: z.number().int().nonnegative(),
127
+ stale: z.number().int().nonnegative(),
128
+ })
129
+ .meta({
130
+ id: 'EmbeddingBatchRunSummary',
131
+ description: 'Latest batch run for this embedding type, without provider payloads or input content.',
132
+ });
133
+
105
134
  export const EmbeddingsStatusResponseSchema = z
106
135
  .strictObject({
107
136
  status: z.string(),
108
137
  embeddingRunsInProgress: z.number().optional(),
138
+ latestBatchRun: EmbeddingBatchRunSummarySchema.optional(),
109
139
  totalIndexableObjects: z.number().optional(),
110
140
  embeddingsModels: z.array(z.string()).optional(),
111
141
  objectsWithEmbeddings: z.number().optional(),
@@ -117,6 +147,25 @@ export const EmbeddingsStatusResponseSchema = z
117
147
  })
118
148
  .meta({ id: 'EmbeddingsStatusResponse' });
119
149
 
150
+ export const RecalculateEmbeddingsQuerySchema = z
151
+ .strictObject({
152
+ mode: z
153
+ .literal('sync')
154
+ .meta({
155
+ description:
156
+ 'Force synchronous per-object recalculation. When omitted, batch inference is used when supported.',
157
+ })
158
+ .optional(),
159
+ force: z
160
+ .boolean()
161
+ .meta({
162
+ description:
163
+ 'Recalculate all eligible objects, including current embeddings. Token limits still apply; existing renditions are reused.',
164
+ })
165
+ .optional(),
166
+ })
167
+ .meta({ id: 'RecalculateEmbeddingsQuery' });
168
+
120
169
  export const ProjectConfigurationEmbeddingEnablePayloadSchema = z
121
170
  .strictObject({
122
171
  environment: z.string(),
@@ -124,3 +173,138 @@ export const ProjectConfigurationEmbeddingEnablePayloadSchema = z
124
173
  model: z.string().optional(),
125
174
  })
126
175
  .meta({ id: 'ProjectConfigurationEmbeddingEnablePayload' });
176
+
177
+ export const EmbeddingBatchProviderStateSchema = z.enum([
178
+ 'pending',
179
+ 'running',
180
+ 'succeeded',
181
+ 'failed',
182
+ 'cancelled',
183
+ 'paused',
184
+ ]);
185
+
186
+ export const EmbeddingBatchCapabilityRequestSchema = z
187
+ .strictObject({ embedding_type: SupportedEmbeddingTypesSchema })
188
+ .meta({ id: 'EmbeddingBatchCapabilityRequest' });
189
+
190
+ export const EmbeddingBatchCapabilityResponseSchema = z
191
+ .strictObject({
192
+ eligible: z.boolean(),
193
+ reason: z.string().optional(),
194
+ environment: z.string().optional(),
195
+ provider: z.string().optional(),
196
+ model: z.string().optional(),
197
+ dimensions: z.number().int().positive().optional(),
198
+ max_tokens: z.number().int().positive().optional(),
199
+ location: z.string().optional(),
200
+ input_format: z.string().optional(),
201
+ max_rows: z.number().int().positive().optional(),
202
+ artifact_uri: z.string().optional(),
203
+ })
204
+ .meta({ id: 'EmbeddingBatchCapabilityResponse' });
205
+
206
+ export const EmbeddingBatchCreateRequestSchema = z
207
+ .strictObject({
208
+ embedding_type: SupportedEmbeddingTypesSchema,
209
+ model: z.string(),
210
+ dimensions: z.number().int().positive(),
211
+ display_name: z.string(),
212
+ input_uri: z.string(),
213
+ output_uri: z.string(),
214
+ })
215
+ .meta({ id: 'EmbeddingBatchCreateRequest' });
216
+
217
+ export const EmbeddingBatchJobRequestSchema = z
218
+ .strictObject({
219
+ embedding_type: SupportedEmbeddingTypesSchema,
220
+ model: z.string(),
221
+ name: z.string(),
222
+ include_output_artifacts: z.boolean().optional().meta({
223
+ description:
224
+ 'On get, resolve terminal result artifacts for application. Omit for lightweight status polling.',
225
+ }),
226
+ })
227
+ .meta({ id: 'EmbeddingBatchJobRequest' });
228
+
229
+ export const EmbeddingBatchJobResponseSchema = z
230
+ .strictObject({
231
+ name: z.string(),
232
+ display_name: z.string().optional(),
233
+ state: EmbeddingBatchProviderStateSchema,
234
+ model: z.string().optional(),
235
+ input_uri: z.string().optional(),
236
+ output_uri: z.string().optional(),
237
+ output_artifacts: z.array(z.string()).optional().meta({
238
+ description:
239
+ 'Terminal job result artifacts in application storage, including partial results. Never provider file IDs.',
240
+ }),
241
+ error_message: z.string().optional(),
242
+ })
243
+ .meta({ id: 'EmbeddingBatchJobResponse' });
244
+
245
+ export const EmbeddingBatchPrepareRequestSchema = z
246
+ .strictObject({
247
+ run_id: z.string(),
248
+ embedding_type: SupportedEmbeddingTypesSchema,
249
+ capability: EmbeddingBatchCapabilityResponseSchema,
250
+ })
251
+ .meta({ id: 'EmbeddingBatchPrepareRequest' });
252
+
253
+ export const EmbeddingBatchSubjobSchema = z.strictObject({
254
+ index: z.number().int().nonnegative(),
255
+ display_name: z.string(),
256
+ input_uri: z.string(),
257
+ output_uri: z.string(),
258
+ row_count: z.number().int().nonnegative(),
259
+ provider_name: z.string().optional(),
260
+ state: EmbeddingBatchProviderStateSchema.optional(),
261
+ });
262
+
263
+ export const EmbeddingBatchPrepareResponseSchema = z
264
+ .strictObject({
265
+ run_id: z.string(),
266
+ row_count: z.number().int().nonnegative(),
267
+ subjobs: z.array(EmbeddingBatchSubjobSchema),
268
+ })
269
+ .meta({ id: 'EmbeddingBatchPrepareResponse' });
270
+
271
+ export const EmbeddingBatchRenditionPageRequestSchema = z
272
+ .strictObject({ run_id: z.string() })
273
+ .meta({ id: 'EmbeddingBatchRenditionPageRequest' });
274
+
275
+ export const EmbeddingBatchRenditionPageResponseSchema = z
276
+ .strictObject({
277
+ status: z.enum(['running', 'page_completed', 'completed']),
278
+ page_index: z.number().int().nonnegative(),
279
+ page_scanned: z.number().int().nonnegative(),
280
+ page_ready: z.number().int().nonnegative(),
281
+ page_generated: z.number().int().nonnegative(),
282
+ page_failed: z.number().int().nonnegative(),
283
+ running: z.number().int().nonnegative(),
284
+ })
285
+ .meta({ id: 'EmbeddingBatchRenditionPageResponse' });
286
+
287
+ export const EmbeddingBatchUpdateRequestSchema = z
288
+ .strictObject({
289
+ run_id: z.string(),
290
+ state: EmbeddingBatchRunStateSchema,
291
+ subjobs: z.array(EmbeddingBatchSubjobSchema).optional(),
292
+ error_code: z.string().optional(),
293
+ error_message: z.string().optional(),
294
+ })
295
+ .meta({ id: 'EmbeddingBatchUpdateRequest' });
296
+
297
+ export const EmbeddingBatchApplyRequestSchema = z
298
+ .strictObject({ run_id: z.string() })
299
+ .meta({ id: 'EmbeddingBatchApplyRequest' });
300
+
301
+ export const EmbeddingBatchApplyResponseSchema = z
302
+ .strictObject({
303
+ state: EmbeddingBatchRunStateSchema,
304
+ succeeded: z.number().int().nonnegative(),
305
+ failed: z.number().int().nonnegative(),
306
+ stale: z.number().int().nonnegative(),
307
+ applied: z.number().int().nonnegative(),
308
+ failure_counts: z.record(z.string(), z.number().int().nonnegative()).optional(),
309
+ })
310
+ .meta({ id: 'EmbeddingBatchApplyResponse' });
@@ -74,6 +74,7 @@ export const BulkUploadUrlsPayloadSchema = z
74
74
  export const FileBucketResponseSchema = z
75
75
  .strictObject({
76
76
  bucket: z.string(),
77
+ location: z.string().optional(),
77
78
  })
78
79
  .meta({ id: 'FileBucketResponse' });
79
80
 
@@ -1,5 +1,6 @@
1
1
  import { describe, expect, it } from 'vitest';
2
2
  import type { GenericCommandResponse } from '../common.js';
3
+ import type { RecalculateEmbeddingsQuery } from '../embeddings.js';
3
4
  import type {
4
5
  DriftAnalysisStatusResponse,
5
6
  EmbeddingsStatusResponse,
@@ -11,7 +12,11 @@ import type {
11
12
  } from '../project.js';
12
13
  import { WorkflowExecutionStatus } from '../store/workflow.js';
13
14
  import type { GenericCommandResponseSchema } from './commands.js';
14
- import type { EmbeddingsStatusResponseSchema, ProjectConfigurationEmbeddingEnablePayloadSchema } from './embeddings.js';
15
+ import type {
16
+ EmbeddingsStatusResponseSchema,
17
+ ProjectConfigurationEmbeddingEnablePayloadSchema,
18
+ RecalculateEmbeddingsQuerySchema,
19
+ } from './embeddings.js';
15
20
  import type {
16
21
  DriftAnalysisStatusResponseSchema,
17
22
  IndexingStatusResponseSchema,
@@ -28,6 +33,7 @@ describe('indexing and embedding API contracts', () => {
28
33
  it('derives every public type from its domain schema', () => {
29
34
  assertType<Equals<GenericCommandResponse, typeof GenericCommandResponseSchema._output>>(true);
30
35
  assertType<Equals<EmbeddingsStatusResponse, typeof EmbeddingsStatusResponseSchema._output>>(true);
36
+ assertType<Equals<RecalculateEmbeddingsQuery, typeof RecalculateEmbeddingsQuerySchema._output>>(true);
31
37
  assertType<Equals<IndexingStatusResponse, typeof IndexingStatusResponseSchema._output>>(true);
32
38
  assertType<Equals<DriftAnalysisStatusResponse, typeof DriftAnalysisStatusResponseSchema._output>>(true);
33
39
  assertType<
@@ -51,6 +57,39 @@ describe('indexing and embedding API contracts', () => {
51
57
  );
52
58
  });
53
59
 
60
+ it('allows only the explicit synchronous embedding recalculation override', () => {
61
+ expect(validateApiRequest('RecalculateEmbeddingsQuery', {}).valid).toBe(true);
62
+ expect(validateApiRequest('RecalculateEmbeddingsQuery', { mode: 'sync' }).valid).toBe(true);
63
+ expect(validateApiRequest('RecalculateEmbeddingsQuery', { force: true }).valid).toBe(true);
64
+ expect(validateApiRequest('RecalculateEmbeddingsQuery', { mode: 'sync', force: true }).valid).toBe(true);
65
+ expect(validateApiRequest('RecalculateEmbeddingsQuery', { force_renditions: true }).valid).toBe(false);
66
+ expect(validateApiRequest('RecalculateEmbeddingsQuery', { mode: 'batch' }).valid).toBe(false);
67
+ });
68
+
69
+ it('validates the optional batch summary without exposing stored run fields', () => {
70
+ const summary = {
71
+ id: 'run-1',
72
+ state: 'completed_with_errors',
73
+ model: 'model-1',
74
+ created_at: '2026-01-01T00:00:00Z',
75
+ applied: 110,
76
+ skipped: 17,
77
+ failed: 0,
78
+ stale: 0,
79
+ };
80
+ expect(
81
+ validateApiResponse('EmbeddingsStatusResponse', {
82
+ status: 'success',
83
+ vectorIndex: { status: 'READY' },
84
+ latestBatchRun: summary,
85
+ }).valid,
86
+ ).toBe(true);
87
+ expect(validateApiResponse('EmbeddingBatchRunSummary', { ...summary, applied: -1 }).valid).toBe(false);
88
+ expect(validateApiResponse('EmbeddingBatchRunSummary', { ...summary, prefix_uri: 'private' }).valid).toBe(
89
+ false,
90
+ );
91
+ });
92
+
54
93
  it('keeps drift workflow status numeric and nullable identifiers explicit', () => {
55
94
  expect(
56
95
  validateApiResponse('DriftAnalysisStatusResponse', {
@@ -84,3 +84,42 @@ describe('McpApiKeyStatus', () => {
84
84
  );
85
85
  });
86
86
  });
87
+
88
+ describe('MCP anonymous authentication — emitted contract', () => {
89
+ const collection = {
90
+ type: 'mcp',
91
+ id: 'public',
92
+ name: 'Public tools',
93
+ description: 'Public tools',
94
+ namespace: 'public',
95
+ url: 'https://example.com/mcp',
96
+ };
97
+
98
+ it.each(['none', 'oauth', 'api_key', 'other', undefined])('accepts auth=%s', (auth) => {
99
+ expect(
100
+ validateApiRequest('AppManifestData', {
101
+ name: 'public-mcp',
102
+ title: 'Public MCP',
103
+ description: 'Public tools',
104
+ publisher: 'Vertesia',
105
+ status: 'beta',
106
+ visibility: 'private',
107
+ tool_collections: [{ ...collection, auth }],
108
+ }).valid,
109
+ ).toBe(true);
110
+ });
111
+
112
+ it('rejects unknown authentication modes', () => {
113
+ expect(
114
+ validateApiRequest('AppManifestData', {
115
+ name: 'public-mcp',
116
+ title: 'Public MCP',
117
+ description: 'Public tools',
118
+ publisher: 'Vertesia',
119
+ status: 'beta',
120
+ visibility: 'private',
121
+ tool_collections: [{ ...collection, auth: 'anonymous' }],
122
+ }).valid,
123
+ ).toBe(false);
124
+ });
125
+ });
@@ -370,6 +370,22 @@ import {
370
370
  WorkflowExecutionStatusSchema,
371
371
  } from './document-processing.js';
372
372
  import {
373
+ EmbeddingBatchApplyRequestSchema,
374
+ EmbeddingBatchApplyResponseSchema,
375
+ EmbeddingBatchCapabilityRequestSchema,
376
+ EmbeddingBatchCapabilityResponseSchema,
377
+ EmbeddingBatchCreateRequestSchema,
378
+ EmbeddingBatchJobRequestSchema,
379
+ EmbeddingBatchJobResponseSchema,
380
+ EmbeddingBatchPrepareRequestSchema,
381
+ EmbeddingBatchPrepareResponseSchema,
382
+ EmbeddingBatchProviderStateSchema,
383
+ EmbeddingBatchRenditionPageRequestSchema,
384
+ EmbeddingBatchRenditionPageResponseSchema,
385
+ EmbeddingBatchRunStateSchema,
386
+ EmbeddingBatchRunSummarySchema,
387
+ EmbeddingBatchSubjobSchema,
388
+ EmbeddingBatchUpdateRequestSchema,
373
389
  EmbeddingsApiAudioInputSchema,
374
390
  EmbeddingsApiImageInputSchema,
375
391
  EmbeddingsApiInputSchema,
@@ -379,6 +395,7 @@ import {
379
395
  EmbeddingsApiVideoInputSchema,
380
396
  EmbeddingsStatusResponseSchema,
381
397
  ProjectConfigurationEmbeddingEnablePayloadSchema,
398
+ RecalculateEmbeddingsQuerySchema,
382
399
  } from './embeddings.js';
383
400
  import { emitJsonSchema } from './emit-json-schema.js';
384
401
  import {
@@ -1476,7 +1493,24 @@ const INDEXING_SCHEMAS = {
1476
1493
 
1477
1494
  const EMBEDDING_ADMIN_SCHEMAS = {
1478
1495
  EmbeddingsStatusResponse: EmbeddingsStatusResponseSchema,
1496
+ RecalculateEmbeddingsQuery: RecalculateEmbeddingsQuerySchema,
1479
1497
  ProjectConfigurationEmbeddingEnablePayload: ProjectConfigurationEmbeddingEnablePayloadSchema,
1498
+ EmbeddingBatchProviderState: EmbeddingBatchProviderStateSchema,
1499
+ EmbeddingBatchCapabilityRequest: EmbeddingBatchCapabilityRequestSchema,
1500
+ EmbeddingBatchCapabilityResponse: EmbeddingBatchCapabilityResponseSchema,
1501
+ EmbeddingBatchCreateRequest: EmbeddingBatchCreateRequestSchema,
1502
+ EmbeddingBatchJobRequest: EmbeddingBatchJobRequestSchema,
1503
+ EmbeddingBatchJobResponse: EmbeddingBatchJobResponseSchema,
1504
+ EmbeddingBatchRunState: EmbeddingBatchRunStateSchema,
1505
+ EmbeddingBatchRunSummary: EmbeddingBatchRunSummarySchema,
1506
+ EmbeddingBatchSubjob: EmbeddingBatchSubjobSchema,
1507
+ EmbeddingBatchPrepareRequest: EmbeddingBatchPrepareRequestSchema,
1508
+ EmbeddingBatchPrepareResponse: EmbeddingBatchPrepareResponseSchema,
1509
+ EmbeddingBatchRenditionPageRequest: EmbeddingBatchRenditionPageRequestSchema,
1510
+ EmbeddingBatchRenditionPageResponse: EmbeddingBatchRenditionPageResponseSchema,
1511
+ EmbeddingBatchUpdateRequest: EmbeddingBatchUpdateRequestSchema,
1512
+ EmbeddingBatchApplyRequest: EmbeddingBatchApplyRequestSchema,
1513
+ EmbeddingBatchApplyResponse: EmbeddingBatchApplyResponseSchema,
1480
1514
  } as const satisfies Record<string, z.ZodType>;
1481
1515
 
1482
1516
  const COMMAND_SCHEMAS = {
@@ -2799,6 +2833,8 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2799
2833
  'DriftAnalysisResult',
2800
2834
  'DriftAnalysisProgress',
2801
2835
  'EmbeddingsStatusResponse',
2836
+ 'EmbeddingBatchRunSummary',
2837
+ 'RecalculateEmbeddingsQuery',
2802
2838
  'ProjectConfigurationEmbeddingEnablePayload',
2803
2839
  'GenericCommandResponse',
2804
2840
  'DriftAnalysisStatusResponse',
package/src/embeddings.ts CHANGED
@@ -1,6 +1,22 @@
1
1
  import type { EmbeddingsResult } from '@llumiverse/common';
2
2
  import type { z } from 'zod';
3
3
  import type {
4
+ EmbeddingBatchApplyRequestSchema,
5
+ EmbeddingBatchApplyResponseSchema,
6
+ EmbeddingBatchCapabilityRequestSchema,
7
+ EmbeddingBatchCapabilityResponseSchema,
8
+ EmbeddingBatchCreateRequestSchema,
9
+ EmbeddingBatchJobRequestSchema,
10
+ EmbeddingBatchJobResponseSchema,
11
+ EmbeddingBatchPrepareRequestSchema,
12
+ EmbeddingBatchPrepareResponseSchema,
13
+ EmbeddingBatchProviderStateSchema,
14
+ EmbeddingBatchRenditionPageRequestSchema,
15
+ EmbeddingBatchRenditionPageResponseSchema,
16
+ EmbeddingBatchRunStateSchema,
17
+ EmbeddingBatchRunSummarySchema,
18
+ EmbeddingBatchSubjobSchema,
19
+ EmbeddingBatchUpdateRequestSchema,
4
20
  EmbeddingsApiAudioInputSchema,
5
21
  EmbeddingsApiImageInputSchema,
6
22
  EmbeddingsApiInputSchema,
@@ -8,6 +24,7 @@ import type {
8
24
  EmbeddingsApiSourceSchema,
9
25
  EmbeddingsApiTextInputSchema,
10
26
  EmbeddingsApiVideoInputSchema,
27
+ RecalculateEmbeddingsQuerySchema,
11
28
  } from './api-schemas/embeddings.js';
12
29
 
13
30
  /**
@@ -36,3 +53,20 @@ export type EmbeddingsApiRequest = z.infer<typeof EmbeddingsApiRequestSchema>;
36
53
  * that prefer to consume types from @vertesia/common.
37
54
  */
38
55
  export type EmbeddingsApiResult = EmbeddingsResult;
56
+ export type RecalculateEmbeddingsQuery = z.infer<typeof RecalculateEmbeddingsQuerySchema>;
57
+ export type EmbeddingBatchCapabilityRequest = z.infer<typeof EmbeddingBatchCapabilityRequestSchema>;
58
+ export type EmbeddingBatchCapabilityResponse = z.infer<typeof EmbeddingBatchCapabilityResponseSchema>;
59
+ export type EmbeddingBatchCreateRequest = z.infer<typeof EmbeddingBatchCreateRequestSchema>;
60
+ export type EmbeddingBatchJobRequest = z.infer<typeof EmbeddingBatchJobRequestSchema>;
61
+ export type EmbeddingBatchJobResponse = z.infer<typeof EmbeddingBatchJobResponseSchema>;
62
+ export type EmbeddingBatchProviderState = z.infer<typeof EmbeddingBatchProviderStateSchema>;
63
+ export type EmbeddingBatchRunState = z.infer<typeof EmbeddingBatchRunStateSchema>;
64
+ export type EmbeddingBatchRunSummary = z.infer<typeof EmbeddingBatchRunSummarySchema>;
65
+ export type EmbeddingBatchSubjob = z.infer<typeof EmbeddingBatchSubjobSchema>;
66
+ export type EmbeddingBatchPrepareRequest = z.infer<typeof EmbeddingBatchPrepareRequestSchema>;
67
+ export type EmbeddingBatchPrepareResponse = z.infer<typeof EmbeddingBatchPrepareResponseSchema>;
68
+ export type EmbeddingBatchRenditionPageRequest = z.infer<typeof EmbeddingBatchRenditionPageRequestSchema>;
69
+ export type EmbeddingBatchRenditionPageResponse = z.infer<typeof EmbeddingBatchRenditionPageResponseSchema>;
70
+ export type EmbeddingBatchUpdateRequest = z.infer<typeof EmbeddingBatchUpdateRequestSchema>;
71
+ export type EmbeddingBatchApplyRequest = z.infer<typeof EmbeddingBatchApplyRequestSchema>;
72
+ export type EmbeddingBatchApplyResponse = z.infer<typeof EmbeddingBatchApplyResponseSchema>;
package/src/index.ts CHANGED
@@ -57,6 +57,7 @@ export * from './schema-for-extraction.js';
57
57
  export * from './secrets.js';
58
58
  export * from './skill.js';
59
59
  export * from './store/index.js';
60
+ export * from './store/rendering.js';
60
61
  export type {
61
62
  ContentObjectExportArtifact,
62
63
  ContentObjectExportArtifactFile,
@@ -43,6 +43,15 @@ export function getRenditionsPath(contentEtag: string, params: ImageRenditionPar
43
43
  return `renditions/${contentEtag}/${params.max_hw}`;
44
44
  }
45
45
 
46
+ export function getRenditionPagePath(
47
+ contentEtag: string,
48
+ params: ImageRenditionParams,
49
+ pageNumber: number | string = 0,
50
+ ) {
51
+ const page = typeof pageNumber === 'number' ? String(pageNumber).padStart(4, '0') : pageNumber;
52
+ return `${getRenditionsPath(contentEtag, params)}/${page}.${params.format}`;
53
+ }
54
+
46
55
  /** Metadata for PDF rendering, inferred from the published API schema. */
47
56
  export type PdfRenderingMetadata = z.infer<typeof PdfRenderingMetadataSchema>;
48
57