@elevasis/sdk 1.46.0 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +550 -45
- package/dist/index.d.ts +164 -0
- package/dist/test-utils/index.d.ts +164 -0
- package/dist/test-utils/index.js +13 -2
- package/dist/worker/index.d.ts +197 -4
- package/dist/worker/index.js +8 -2
- package/package.json +4 -4
- package/reference/_navigation.md +2 -2
- package/reference/packages/core/src/content/README.md +15 -10
- package/reference/scaffold/recipes/extend-content.md +103 -67
- package/reference/sdk/cli-management.mdx +111 -27
- package/reference/sdk/platform-tools/adapters-platform.mdx +1 -1
- package/reference/sdk/platform-tools/index.mdx +0 -2
- package/reference/sdk/resources/patterns.mdx +14 -6
package/dist/index.d.ts
CHANGED
|
@@ -2612,6 +2612,7 @@ type Database = {
|
|
|
2612
2612
|
activities: {
|
|
2613
2613
|
Row: {
|
|
2614
2614
|
activity_type: string;
|
|
2615
|
+
actor_api_key_id: string | null;
|
|
2615
2616
|
actor_id: string | null;
|
|
2616
2617
|
actor_type: string | null;
|
|
2617
2618
|
created_at: string;
|
|
@@ -2628,6 +2629,7 @@ type Database = {
|
|
|
2628
2629
|
};
|
|
2629
2630
|
Insert: {
|
|
2630
2631
|
activity_type: string;
|
|
2632
|
+
actor_api_key_id?: string | null;
|
|
2631
2633
|
actor_id?: string | null;
|
|
2632
2634
|
actor_type?: string | null;
|
|
2633
2635
|
created_at?: string;
|
|
@@ -2644,6 +2646,7 @@ type Database = {
|
|
|
2644
2646
|
};
|
|
2645
2647
|
Update: {
|
|
2646
2648
|
activity_type?: string;
|
|
2649
|
+
actor_api_key_id?: string | null;
|
|
2647
2650
|
actor_id?: string | null;
|
|
2648
2651
|
actor_type?: string | null;
|
|
2649
2652
|
created_at?: string;
|
|
@@ -2659,6 +2662,13 @@ type Database = {
|
|
|
2659
2662
|
title?: string;
|
|
2660
2663
|
};
|
|
2661
2664
|
Relationships: [
|
|
2665
|
+
{
|
|
2666
|
+
foreignKeyName: "activities_actor_api_key_id_fkey";
|
|
2667
|
+
columns: ["actor_api_key_id"];
|
|
2668
|
+
isOneToOne: false;
|
|
2669
|
+
referencedRelation: "api_keys";
|
|
2670
|
+
referencedColumns: ["id"];
|
|
2671
|
+
},
|
|
2662
2672
|
{
|
|
2663
2673
|
foreignKeyName: "activities_actor_id_fkey";
|
|
2664
2674
|
columns: ["actor_id"];
|
|
@@ -2746,6 +2756,7 @@ type Database = {
|
|
|
2746
2756
|
api_keys: {
|
|
2747
2757
|
Row: {
|
|
2748
2758
|
created_at: string | null;
|
|
2759
|
+
created_by: string | null;
|
|
2749
2760
|
id: string;
|
|
2750
2761
|
key_hash: string;
|
|
2751
2762
|
last_used_at: string | null;
|
|
@@ -2754,6 +2765,7 @@ type Database = {
|
|
|
2754
2765
|
};
|
|
2755
2766
|
Insert: {
|
|
2756
2767
|
created_at?: string | null;
|
|
2768
|
+
created_by?: string | null;
|
|
2757
2769
|
id?: string;
|
|
2758
2770
|
key_hash: string;
|
|
2759
2771
|
last_used_at?: string | null;
|
|
@@ -2762,6 +2774,7 @@ type Database = {
|
|
|
2762
2774
|
};
|
|
2763
2775
|
Update: {
|
|
2764
2776
|
created_at?: string | null;
|
|
2777
|
+
created_by?: string | null;
|
|
2765
2778
|
id?: string;
|
|
2766
2779
|
key_hash?: string;
|
|
2767
2780
|
last_used_at?: string | null;
|
|
@@ -2769,6 +2782,13 @@ type Database = {
|
|
|
2769
2782
|
organization_id?: string;
|
|
2770
2783
|
};
|
|
2771
2784
|
Relationships: [
|
|
2785
|
+
{
|
|
2786
|
+
foreignKeyName: "api_keys_created_by_fkey";
|
|
2787
|
+
columns: ["created_by"];
|
|
2788
|
+
isOneToOne: false;
|
|
2789
|
+
referencedRelation: "users";
|
|
2790
|
+
referencedColumns: ["id"];
|
|
2791
|
+
},
|
|
2772
2792
|
{
|
|
2773
2793
|
foreignKeyName: "api_keys_organization_id_fkey";
|
|
2774
2794
|
columns: ["organization_id"];
|
|
@@ -3096,6 +3116,7 @@ type Database = {
|
|
|
3096
3116
|
organization_id: string;
|
|
3097
3117
|
payload: Json;
|
|
3098
3118
|
source_execution_id: string | null;
|
|
3119
|
+
status: string;
|
|
3099
3120
|
step_key: string | null;
|
|
3100
3121
|
};
|
|
3101
3122
|
Insert: {
|
|
@@ -3107,6 +3128,7 @@ type Database = {
|
|
|
3107
3128
|
organization_id: string;
|
|
3108
3129
|
payload?: Json;
|
|
3109
3130
|
source_execution_id?: string | null;
|
|
3131
|
+
status: string;
|
|
3110
3132
|
step_key?: string | null;
|
|
3111
3133
|
};
|
|
3112
3134
|
Update: {
|
|
@@ -3118,6 +3140,7 @@ type Database = {
|
|
|
3118
3140
|
organization_id?: string;
|
|
3119
3141
|
payload?: Json;
|
|
3120
3142
|
source_execution_id?: string | null;
|
|
3143
|
+
status?: string;
|
|
3121
3144
|
step_key?: string | null;
|
|
3122
3145
|
};
|
|
3123
3146
|
Relationships: [
|
|
@@ -3269,6 +3292,7 @@ type Database = {
|
|
|
3269
3292
|
kind: string;
|
|
3270
3293
|
metadata: Json;
|
|
3271
3294
|
organization_id: string;
|
|
3295
|
+
payload: Json;
|
|
3272
3296
|
processing_state: Json;
|
|
3273
3297
|
storage_path: string | null;
|
|
3274
3298
|
title: string;
|
|
@@ -3282,6 +3306,7 @@ type Database = {
|
|
|
3282
3306
|
kind: string;
|
|
3283
3307
|
metadata?: Json;
|
|
3284
3308
|
organization_id: string;
|
|
3309
|
+
payload?: Json;
|
|
3285
3310
|
processing_state?: Json;
|
|
3286
3311
|
storage_path?: string | null;
|
|
3287
3312
|
title: string;
|
|
@@ -3295,6 +3320,7 @@ type Database = {
|
|
|
3295
3320
|
kind?: string;
|
|
3296
3321
|
metadata?: Json;
|
|
3297
3322
|
organization_id?: string;
|
|
3323
|
+
payload?: Json;
|
|
3298
3324
|
processing_state?: Json;
|
|
3299
3325
|
storage_path?: string | null;
|
|
3300
3326
|
title?: string;
|
|
@@ -11154,6 +11180,20 @@ declare const ProjectSchemas: {
|
|
|
11154
11180
|
}, z.core.$strip>;
|
|
11155
11181
|
};
|
|
11156
11182
|
|
|
11183
|
+
/**
|
|
11184
|
+
* `'running'` is the only in-flight value; every other member is terminal.
|
|
11185
|
+
* Added 2026-08-14 (the step-state model): a producer writes `'running'`
|
|
11186
|
+
* when it starts a step and patches the same row to a terminal status when
|
|
11187
|
+
* the step finishes (`updateAttempt`) — see `CreateContentItemAttemptRequestSchema`
|
|
11188
|
+
* / `UpdateContentItemAttemptRequestSchema` below.
|
|
11189
|
+
*/
|
|
11190
|
+
declare const ContentStepStatusSchema: z.ZodEnum<{
|
|
11191
|
+
error: "error";
|
|
11192
|
+
success: "success";
|
|
11193
|
+
running: "running";
|
|
11194
|
+
no_result: "no_result";
|
|
11195
|
+
skipped: "skipped";
|
|
11196
|
+
}>;
|
|
11157
11197
|
/** D18: `pipeline_id` is an OM ontology id (free text), not a UUID. */
|
|
11158
11198
|
declare const ContentPipelineIdSchema: z.ZodString;
|
|
11159
11199
|
/** `content:catalog/status` entries. Free text, model-owned. */
|
|
@@ -11188,9 +11228,13 @@ declare const ContentItemResponseSchema: z.ZodObject<{
|
|
|
11188
11228
|
status: z.ZodEnum<{
|
|
11189
11229
|
error: "error";
|
|
11190
11230
|
success: "success";
|
|
11231
|
+
running: "running";
|
|
11191
11232
|
no_result: "no_result";
|
|
11192
11233
|
skipped: "skipped";
|
|
11193
11234
|
}>;
|
|
11235
|
+
attemptId: z.ZodString;
|
|
11236
|
+
executionId: z.ZodNullable<z.ZodString>;
|
|
11237
|
+
attemptedAt: z.ZodString;
|
|
11194
11238
|
data: z.ZodOptional<z.ZodUnknown>;
|
|
11195
11239
|
}, z.core.$loose>>;
|
|
11196
11240
|
reviewedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -11218,9 +11262,13 @@ declare const ContentItemListResponseSchema: z.ZodObject<{
|
|
|
11218
11262
|
status: z.ZodEnum<{
|
|
11219
11263
|
error: "error";
|
|
11220
11264
|
success: "success";
|
|
11265
|
+
running: "running";
|
|
11221
11266
|
no_result: "no_result";
|
|
11222
11267
|
skipped: "skipped";
|
|
11223
11268
|
}>;
|
|
11269
|
+
attemptId: z.ZodString;
|
|
11270
|
+
executionId: z.ZodNullable<z.ZodString>;
|
|
11271
|
+
attemptedAt: z.ZodString;
|
|
11224
11272
|
data: z.ZodOptional<z.ZodUnknown>;
|
|
11225
11273
|
}, z.core.$loose>>;
|
|
11226
11274
|
reviewedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -11242,6 +11290,13 @@ declare const ContentItemAttemptResponseSchema: z.ZodObject<{
|
|
|
11242
11290
|
contentItemId: z.ZodString;
|
|
11243
11291
|
attemptNumber: z.ZodNumber;
|
|
11244
11292
|
stepKey: z.ZodNullable<z.ZodString>;
|
|
11293
|
+
status: z.ZodEnum<{
|
|
11294
|
+
error: "error";
|
|
11295
|
+
success: "success";
|
|
11296
|
+
running: "running";
|
|
11297
|
+
no_result: "no_result";
|
|
11298
|
+
skipped: "skipped";
|
|
11299
|
+
}>;
|
|
11245
11300
|
payload: z.ZodUnknown;
|
|
11246
11301
|
sourceExecutionId: z.ZodNullable<z.ZodString>;
|
|
11247
11302
|
createdBy: z.ZodNullable<z.ZodString>;
|
|
@@ -11254,12 +11309,45 @@ declare const ContentItemAttemptListResponseSchema: z.ZodObject<{
|
|
|
11254
11309
|
contentItemId: z.ZodString;
|
|
11255
11310
|
attemptNumber: z.ZodNumber;
|
|
11256
11311
|
stepKey: z.ZodNullable<z.ZodString>;
|
|
11312
|
+
status: z.ZodEnum<{
|
|
11313
|
+
error: "error";
|
|
11314
|
+
success: "success";
|
|
11315
|
+
running: "running";
|
|
11316
|
+
no_result: "no_result";
|
|
11317
|
+
skipped: "skipped";
|
|
11318
|
+
}>;
|
|
11257
11319
|
payload: z.ZodUnknown;
|
|
11258
11320
|
sourceExecutionId: z.ZodNullable<z.ZodString>;
|
|
11259
11321
|
createdBy: z.ZodNullable<z.ZodString>;
|
|
11260
11322
|
createdAt: z.ZodString;
|
|
11261
11323
|
}, z.core.$strip>>;
|
|
11262
11324
|
}, z.core.$strip>;
|
|
11325
|
+
declare const ContentSourceAssetResponseSchema: z.ZodObject<{
|
|
11326
|
+
id: z.ZodString;
|
|
11327
|
+
organizationId: z.ZodString;
|
|
11328
|
+
kind: z.ZodString;
|
|
11329
|
+
title: z.ZodString;
|
|
11330
|
+
externalUrl: z.ZodNullable<z.ZodString>;
|
|
11331
|
+
storagePath: z.ZodNullable<z.ZodString>;
|
|
11332
|
+
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
11333
|
+
metadata: z.ZodUnknown;
|
|
11334
|
+
payload: z.ZodUnknown;
|
|
11335
|
+
processingState: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
11336
|
+
status: z.ZodEnum<{
|
|
11337
|
+
error: "error";
|
|
11338
|
+
success: "success";
|
|
11339
|
+
running: "running";
|
|
11340
|
+
no_result: "no_result";
|
|
11341
|
+
skipped: "skipped";
|
|
11342
|
+
}>;
|
|
11343
|
+
attemptId: z.ZodString;
|
|
11344
|
+
executionId: z.ZodNullable<z.ZodString>;
|
|
11345
|
+
attemptedAt: z.ZodString;
|
|
11346
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
11347
|
+
}, z.core.$loose>>;
|
|
11348
|
+
createdAt: z.ZodString;
|
|
11349
|
+
updatedAt: z.ZodString;
|
|
11350
|
+
}, z.core.$strip>;
|
|
11263
11351
|
declare const ContentDistributionResponseSchema: z.ZodObject<{
|
|
11264
11352
|
id: z.ZodString;
|
|
11265
11353
|
organizationId: z.ZodString;
|
|
@@ -11275,9 +11363,13 @@ declare const ContentDistributionResponseSchema: z.ZodObject<{
|
|
|
11275
11363
|
status: z.ZodEnum<{
|
|
11276
11364
|
error: "error";
|
|
11277
11365
|
success: "success";
|
|
11366
|
+
running: "running";
|
|
11278
11367
|
no_result: "no_result";
|
|
11279
11368
|
skipped: "skipped";
|
|
11280
11369
|
}>;
|
|
11370
|
+
attemptId: z.ZodString;
|
|
11371
|
+
executionId: z.ZodNullable<z.ZodString>;
|
|
11372
|
+
attemptedAt: z.ZodString;
|
|
11281
11373
|
data: z.ZodOptional<z.ZodUnknown>;
|
|
11282
11374
|
}, z.core.$loose>>;
|
|
11283
11375
|
publishMethod: z.ZodNullable<z.ZodString>;
|
|
@@ -11289,6 +11381,7 @@ declare const ContentDistributionResponseSchema: z.ZodObject<{
|
|
|
11289
11381
|
createdAt: z.ZodString;
|
|
11290
11382
|
updatedAt: z.ZodString;
|
|
11291
11383
|
}, z.core.$strip>;
|
|
11384
|
+
type ContentStepStatus = z.infer<typeof ContentStepStatusSchema>;
|
|
11292
11385
|
type ContentPipelineId = z.infer<typeof ContentPipelineIdSchema>;
|
|
11293
11386
|
type ContentItemStatus = z.infer<typeof ContentItemStatusSchema>;
|
|
11294
11387
|
type ContentPillar = z.infer<typeof ContentPillarSchema>;
|
|
@@ -11300,6 +11393,7 @@ type ContentItemResponse = z.infer<typeof ContentItemResponseSchema>;
|
|
|
11300
11393
|
type ContentItemListResponse = z.infer<typeof ContentItemListResponseSchema>;
|
|
11301
11394
|
type ContentItemAttemptResponse = z.infer<typeof ContentItemAttemptResponseSchema>;
|
|
11302
11395
|
type ContentItemAttemptListResponse = z.infer<typeof ContentItemAttemptListResponseSchema>;
|
|
11396
|
+
type ContentSourceAssetResponse = z.infer<typeof ContentSourceAssetResponseSchema>;
|
|
11303
11397
|
type ContentDistributionResponse = z.infer<typeof ContentDistributionResponseSchema>;
|
|
11304
11398
|
|
|
11305
11399
|
/**
|
|
@@ -12339,6 +12433,13 @@ type ContentToolMap = {
|
|
|
12339
12433
|
/** Which step this attempt implements. Stored as-is; NULL when omitted. */
|
|
12340
12434
|
stepKey?: string | null;
|
|
12341
12435
|
sourceExecutionId?: string | null;
|
|
12436
|
+
/**
|
|
12437
|
+
* The status the row is created with. Optional so a producer starting a
|
|
12438
|
+
* step can write `'running'` before doing the work -- the "write-at-start"
|
|
12439
|
+
* half of write-at-start/patch-at-end. Omitted, the column's own default
|
|
12440
|
+
* applies, which is why a producer that means `'running'` must say so.
|
|
12441
|
+
*/
|
|
12442
|
+
status?: ContentStepStatus;
|
|
12342
12443
|
};
|
|
12343
12444
|
result: ContentItemAttemptResponse;
|
|
12344
12445
|
};
|
|
@@ -12349,6 +12450,69 @@ type ContentToolMap = {
|
|
|
12349
12450
|
};
|
|
12350
12451
|
result: ContentItemAttemptListResponse;
|
|
12351
12452
|
};
|
|
12453
|
+
/**
|
|
12454
|
+
* Patch an existing attempt to its terminal status -- the "patch-at-end"
|
|
12455
|
+
* half of write-at-start/patch-at-end (see `ContentStepStatus`'s
|
|
12456
|
+
* `'running'` value). `attemptNumber`, `stepKey`, and `sourceExecutionId`
|
|
12457
|
+
* are immutable once written; only `status` and `payload` change here.
|
|
12458
|
+
*/
|
|
12459
|
+
updateAttempt: {
|
|
12460
|
+
params: {
|
|
12461
|
+
attemptId: string;
|
|
12462
|
+
status?: ContentStepStatus;
|
|
12463
|
+
payload?: ContentPayloadEnvelope;
|
|
12464
|
+
};
|
|
12465
|
+
result: ContentItemAttemptResponse;
|
|
12466
|
+
};
|
|
12467
|
+
/**
|
|
12468
|
+
* Insert a new `content_source_assets` row. `payload` is an open envelope
|
|
12469
|
+
* (D5, content-source-asset-write-path.mdx) -- per-`kind` field membership
|
|
12470
|
+
* is declared in the OM catalog, not enforced by this transport type.
|
|
12471
|
+
*/
|
|
12472
|
+
createSourceAsset: {
|
|
12473
|
+
params: {
|
|
12474
|
+
kind: string;
|
|
12475
|
+
title: string;
|
|
12476
|
+
externalUrl?: string | null;
|
|
12477
|
+
storagePath?: string | null;
|
|
12478
|
+
durationSeconds?: number | null;
|
|
12479
|
+
metadata?: Record<string, unknown>;
|
|
12480
|
+
payload?: ContentPayloadEnvelope;
|
|
12481
|
+
};
|
|
12482
|
+
result: ContentSourceAssetResponse;
|
|
12483
|
+
};
|
|
12484
|
+
/** Fetch a single source asset by id, org-scoped. */
|
|
12485
|
+
getSourceAsset: {
|
|
12486
|
+
params: {
|
|
12487
|
+
sourceAssetId: string;
|
|
12488
|
+
};
|
|
12489
|
+
result: ContentSourceAssetResponse | null;
|
|
12490
|
+
};
|
|
12491
|
+
/** Query source assets -- e.g. a producer picking material for the next item. */
|
|
12492
|
+
listSourceAssets: {
|
|
12493
|
+
params: {
|
|
12494
|
+
kind?: string;
|
|
12495
|
+
limit?: number;
|
|
12496
|
+
offset?: number;
|
|
12497
|
+
};
|
|
12498
|
+
result: {
|
|
12499
|
+
data: ContentSourceAssetResponse[];
|
|
12500
|
+
};
|
|
12501
|
+
};
|
|
12502
|
+
/** Update a source asset's mutable fields. */
|
|
12503
|
+
updateSourceAsset: {
|
|
12504
|
+
params: {
|
|
12505
|
+
sourceAssetId: string;
|
|
12506
|
+
kind?: string;
|
|
12507
|
+
title?: string;
|
|
12508
|
+
externalUrl?: string | null;
|
|
12509
|
+
storagePath?: string | null;
|
|
12510
|
+
durationSeconds?: number | null;
|
|
12511
|
+
metadata?: Record<string, unknown>;
|
|
12512
|
+
payload?: ContentPayloadEnvelope;
|
|
12513
|
+
};
|
|
12514
|
+
result: ContentSourceAssetResponse;
|
|
12515
|
+
};
|
|
12352
12516
|
/** Insert a `content_distributions` row for one platform/format target. */
|
|
12353
12517
|
createDistribution: {
|
|
12354
12518
|
params: {
|
|
@@ -2482,6 +2482,7 @@ type Database = {
|
|
|
2482
2482
|
activities: {
|
|
2483
2483
|
Row: {
|
|
2484
2484
|
activity_type: string;
|
|
2485
|
+
actor_api_key_id: string | null;
|
|
2485
2486
|
actor_id: string | null;
|
|
2486
2487
|
actor_type: string | null;
|
|
2487
2488
|
created_at: string;
|
|
@@ -2498,6 +2499,7 @@ type Database = {
|
|
|
2498
2499
|
};
|
|
2499
2500
|
Insert: {
|
|
2500
2501
|
activity_type: string;
|
|
2502
|
+
actor_api_key_id?: string | null;
|
|
2501
2503
|
actor_id?: string | null;
|
|
2502
2504
|
actor_type?: string | null;
|
|
2503
2505
|
created_at?: string;
|
|
@@ -2514,6 +2516,7 @@ type Database = {
|
|
|
2514
2516
|
};
|
|
2515
2517
|
Update: {
|
|
2516
2518
|
activity_type?: string;
|
|
2519
|
+
actor_api_key_id?: string | null;
|
|
2517
2520
|
actor_id?: string | null;
|
|
2518
2521
|
actor_type?: string | null;
|
|
2519
2522
|
created_at?: string;
|
|
@@ -2529,6 +2532,13 @@ type Database = {
|
|
|
2529
2532
|
title?: string;
|
|
2530
2533
|
};
|
|
2531
2534
|
Relationships: [
|
|
2535
|
+
{
|
|
2536
|
+
foreignKeyName: "activities_actor_api_key_id_fkey";
|
|
2537
|
+
columns: ["actor_api_key_id"];
|
|
2538
|
+
isOneToOne: false;
|
|
2539
|
+
referencedRelation: "api_keys";
|
|
2540
|
+
referencedColumns: ["id"];
|
|
2541
|
+
},
|
|
2532
2542
|
{
|
|
2533
2543
|
foreignKeyName: "activities_actor_id_fkey";
|
|
2534
2544
|
columns: ["actor_id"];
|
|
@@ -2616,6 +2626,7 @@ type Database = {
|
|
|
2616
2626
|
api_keys: {
|
|
2617
2627
|
Row: {
|
|
2618
2628
|
created_at: string | null;
|
|
2629
|
+
created_by: string | null;
|
|
2619
2630
|
id: string;
|
|
2620
2631
|
key_hash: string;
|
|
2621
2632
|
last_used_at: string | null;
|
|
@@ -2624,6 +2635,7 @@ type Database = {
|
|
|
2624
2635
|
};
|
|
2625
2636
|
Insert: {
|
|
2626
2637
|
created_at?: string | null;
|
|
2638
|
+
created_by?: string | null;
|
|
2627
2639
|
id?: string;
|
|
2628
2640
|
key_hash: string;
|
|
2629
2641
|
last_used_at?: string | null;
|
|
@@ -2632,6 +2644,7 @@ type Database = {
|
|
|
2632
2644
|
};
|
|
2633
2645
|
Update: {
|
|
2634
2646
|
created_at?: string | null;
|
|
2647
|
+
created_by?: string | null;
|
|
2635
2648
|
id?: string;
|
|
2636
2649
|
key_hash?: string;
|
|
2637
2650
|
last_used_at?: string | null;
|
|
@@ -2639,6 +2652,13 @@ type Database = {
|
|
|
2639
2652
|
organization_id?: string;
|
|
2640
2653
|
};
|
|
2641
2654
|
Relationships: [
|
|
2655
|
+
{
|
|
2656
|
+
foreignKeyName: "api_keys_created_by_fkey";
|
|
2657
|
+
columns: ["created_by"];
|
|
2658
|
+
isOneToOne: false;
|
|
2659
|
+
referencedRelation: "users";
|
|
2660
|
+
referencedColumns: ["id"];
|
|
2661
|
+
},
|
|
2642
2662
|
{
|
|
2643
2663
|
foreignKeyName: "api_keys_organization_id_fkey";
|
|
2644
2664
|
columns: ["organization_id"];
|
|
@@ -2966,6 +2986,7 @@ type Database = {
|
|
|
2966
2986
|
organization_id: string;
|
|
2967
2987
|
payload: Json;
|
|
2968
2988
|
source_execution_id: string | null;
|
|
2989
|
+
status: string;
|
|
2969
2990
|
step_key: string | null;
|
|
2970
2991
|
};
|
|
2971
2992
|
Insert: {
|
|
@@ -2977,6 +2998,7 @@ type Database = {
|
|
|
2977
2998
|
organization_id: string;
|
|
2978
2999
|
payload?: Json;
|
|
2979
3000
|
source_execution_id?: string | null;
|
|
3001
|
+
status: string;
|
|
2980
3002
|
step_key?: string | null;
|
|
2981
3003
|
};
|
|
2982
3004
|
Update: {
|
|
@@ -2988,6 +3010,7 @@ type Database = {
|
|
|
2988
3010
|
organization_id?: string;
|
|
2989
3011
|
payload?: Json;
|
|
2990
3012
|
source_execution_id?: string | null;
|
|
3013
|
+
status?: string;
|
|
2991
3014
|
step_key?: string | null;
|
|
2992
3015
|
};
|
|
2993
3016
|
Relationships: [
|
|
@@ -3139,6 +3162,7 @@ type Database = {
|
|
|
3139
3162
|
kind: string;
|
|
3140
3163
|
metadata: Json;
|
|
3141
3164
|
organization_id: string;
|
|
3165
|
+
payload: Json;
|
|
3142
3166
|
processing_state: Json;
|
|
3143
3167
|
storage_path: string | null;
|
|
3144
3168
|
title: string;
|
|
@@ -3152,6 +3176,7 @@ type Database = {
|
|
|
3152
3176
|
kind: string;
|
|
3153
3177
|
metadata?: Json;
|
|
3154
3178
|
organization_id: string;
|
|
3179
|
+
payload?: Json;
|
|
3155
3180
|
processing_state?: Json;
|
|
3156
3181
|
storage_path?: string | null;
|
|
3157
3182
|
title: string;
|
|
@@ -3165,6 +3190,7 @@ type Database = {
|
|
|
3165
3190
|
kind?: string;
|
|
3166
3191
|
metadata?: Json;
|
|
3167
3192
|
organization_id?: string;
|
|
3193
|
+
payload?: Json;
|
|
3168
3194
|
processing_state?: Json;
|
|
3169
3195
|
storage_path?: string | null;
|
|
3170
3196
|
title?: string;
|
|
@@ -9539,6 +9565,20 @@ declare const ProjectSchemas: {
|
|
|
9539
9565
|
}, z.core.$strip>;
|
|
9540
9566
|
};
|
|
9541
9567
|
|
|
9568
|
+
/**
|
|
9569
|
+
* `'running'` is the only in-flight value; every other member is terminal.
|
|
9570
|
+
* Added 2026-08-14 (the step-state model): a producer writes `'running'`
|
|
9571
|
+
* when it starts a step and patches the same row to a terminal status when
|
|
9572
|
+
* the step finishes (`updateAttempt`) — see `CreateContentItemAttemptRequestSchema`
|
|
9573
|
+
* / `UpdateContentItemAttemptRequestSchema` below.
|
|
9574
|
+
*/
|
|
9575
|
+
declare const ContentStepStatusSchema: z.ZodEnum<{
|
|
9576
|
+
error: "error";
|
|
9577
|
+
success: "success";
|
|
9578
|
+
running: "running";
|
|
9579
|
+
no_result: "no_result";
|
|
9580
|
+
skipped: "skipped";
|
|
9581
|
+
}>;
|
|
9542
9582
|
/** D18: `pipeline_id` is an OM ontology id (free text), not a UUID. */
|
|
9543
9583
|
declare const ContentPipelineIdSchema: z.ZodString;
|
|
9544
9584
|
/** `content:catalog/status` entries. Free text, model-owned. */
|
|
@@ -9573,9 +9613,13 @@ declare const ContentItemResponseSchema: z.ZodObject<{
|
|
|
9573
9613
|
status: z.ZodEnum<{
|
|
9574
9614
|
error: "error";
|
|
9575
9615
|
success: "success";
|
|
9616
|
+
running: "running";
|
|
9576
9617
|
no_result: "no_result";
|
|
9577
9618
|
skipped: "skipped";
|
|
9578
9619
|
}>;
|
|
9620
|
+
attemptId: z.ZodString;
|
|
9621
|
+
executionId: z.ZodNullable<z.ZodString>;
|
|
9622
|
+
attemptedAt: z.ZodString;
|
|
9579
9623
|
data: z.ZodOptional<z.ZodUnknown>;
|
|
9580
9624
|
}, z.core.$loose>>;
|
|
9581
9625
|
reviewedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -9603,9 +9647,13 @@ declare const ContentItemListResponseSchema: z.ZodObject<{
|
|
|
9603
9647
|
status: z.ZodEnum<{
|
|
9604
9648
|
error: "error";
|
|
9605
9649
|
success: "success";
|
|
9650
|
+
running: "running";
|
|
9606
9651
|
no_result: "no_result";
|
|
9607
9652
|
skipped: "skipped";
|
|
9608
9653
|
}>;
|
|
9654
|
+
attemptId: z.ZodString;
|
|
9655
|
+
executionId: z.ZodNullable<z.ZodString>;
|
|
9656
|
+
attemptedAt: z.ZodString;
|
|
9609
9657
|
data: z.ZodOptional<z.ZodUnknown>;
|
|
9610
9658
|
}, z.core.$loose>>;
|
|
9611
9659
|
reviewedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -9627,6 +9675,13 @@ declare const ContentItemAttemptResponseSchema: z.ZodObject<{
|
|
|
9627
9675
|
contentItemId: z.ZodString;
|
|
9628
9676
|
attemptNumber: z.ZodNumber;
|
|
9629
9677
|
stepKey: z.ZodNullable<z.ZodString>;
|
|
9678
|
+
status: z.ZodEnum<{
|
|
9679
|
+
error: "error";
|
|
9680
|
+
success: "success";
|
|
9681
|
+
running: "running";
|
|
9682
|
+
no_result: "no_result";
|
|
9683
|
+
skipped: "skipped";
|
|
9684
|
+
}>;
|
|
9630
9685
|
payload: z.ZodUnknown;
|
|
9631
9686
|
sourceExecutionId: z.ZodNullable<z.ZodString>;
|
|
9632
9687
|
createdBy: z.ZodNullable<z.ZodString>;
|
|
@@ -9639,12 +9694,45 @@ declare const ContentItemAttemptListResponseSchema: z.ZodObject<{
|
|
|
9639
9694
|
contentItemId: z.ZodString;
|
|
9640
9695
|
attemptNumber: z.ZodNumber;
|
|
9641
9696
|
stepKey: z.ZodNullable<z.ZodString>;
|
|
9697
|
+
status: z.ZodEnum<{
|
|
9698
|
+
error: "error";
|
|
9699
|
+
success: "success";
|
|
9700
|
+
running: "running";
|
|
9701
|
+
no_result: "no_result";
|
|
9702
|
+
skipped: "skipped";
|
|
9703
|
+
}>;
|
|
9642
9704
|
payload: z.ZodUnknown;
|
|
9643
9705
|
sourceExecutionId: z.ZodNullable<z.ZodString>;
|
|
9644
9706
|
createdBy: z.ZodNullable<z.ZodString>;
|
|
9645
9707
|
createdAt: z.ZodString;
|
|
9646
9708
|
}, z.core.$strip>>;
|
|
9647
9709
|
}, z.core.$strip>;
|
|
9710
|
+
declare const ContentSourceAssetResponseSchema: z.ZodObject<{
|
|
9711
|
+
id: z.ZodString;
|
|
9712
|
+
organizationId: z.ZodString;
|
|
9713
|
+
kind: z.ZodString;
|
|
9714
|
+
title: z.ZodString;
|
|
9715
|
+
externalUrl: z.ZodNullable<z.ZodString>;
|
|
9716
|
+
storagePath: z.ZodNullable<z.ZodString>;
|
|
9717
|
+
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
9718
|
+
metadata: z.ZodUnknown;
|
|
9719
|
+
payload: z.ZodUnknown;
|
|
9720
|
+
processingState: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
9721
|
+
status: z.ZodEnum<{
|
|
9722
|
+
error: "error";
|
|
9723
|
+
success: "success";
|
|
9724
|
+
running: "running";
|
|
9725
|
+
no_result: "no_result";
|
|
9726
|
+
skipped: "skipped";
|
|
9727
|
+
}>;
|
|
9728
|
+
attemptId: z.ZodString;
|
|
9729
|
+
executionId: z.ZodNullable<z.ZodString>;
|
|
9730
|
+
attemptedAt: z.ZodString;
|
|
9731
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
9732
|
+
}, z.core.$loose>>;
|
|
9733
|
+
createdAt: z.ZodString;
|
|
9734
|
+
updatedAt: z.ZodString;
|
|
9735
|
+
}, z.core.$strip>;
|
|
9648
9736
|
declare const ContentDistributionResponseSchema: z.ZodObject<{
|
|
9649
9737
|
id: z.ZodString;
|
|
9650
9738
|
organizationId: z.ZodString;
|
|
@@ -9660,9 +9748,13 @@ declare const ContentDistributionResponseSchema: z.ZodObject<{
|
|
|
9660
9748
|
status: z.ZodEnum<{
|
|
9661
9749
|
error: "error";
|
|
9662
9750
|
success: "success";
|
|
9751
|
+
running: "running";
|
|
9663
9752
|
no_result: "no_result";
|
|
9664
9753
|
skipped: "skipped";
|
|
9665
9754
|
}>;
|
|
9755
|
+
attemptId: z.ZodString;
|
|
9756
|
+
executionId: z.ZodNullable<z.ZodString>;
|
|
9757
|
+
attemptedAt: z.ZodString;
|
|
9666
9758
|
data: z.ZodOptional<z.ZodUnknown>;
|
|
9667
9759
|
}, z.core.$loose>>;
|
|
9668
9760
|
publishMethod: z.ZodNullable<z.ZodString>;
|
|
@@ -9674,6 +9766,7 @@ declare const ContentDistributionResponseSchema: z.ZodObject<{
|
|
|
9674
9766
|
createdAt: z.ZodString;
|
|
9675
9767
|
updatedAt: z.ZodString;
|
|
9676
9768
|
}, z.core.$strip>;
|
|
9769
|
+
type ContentStepStatus = z.infer<typeof ContentStepStatusSchema>;
|
|
9677
9770
|
type ContentPipelineId = z.infer<typeof ContentPipelineIdSchema>;
|
|
9678
9771
|
type ContentItemStatus = z.infer<typeof ContentItemStatusSchema>;
|
|
9679
9772
|
type ContentPillar = z.infer<typeof ContentPillarSchema>;
|
|
@@ -9685,6 +9778,7 @@ type ContentItemResponse = z.infer<typeof ContentItemResponseSchema>;
|
|
|
9685
9778
|
type ContentItemListResponse = z.infer<typeof ContentItemListResponseSchema>;
|
|
9686
9779
|
type ContentItemAttemptResponse = z.infer<typeof ContentItemAttemptResponseSchema>;
|
|
9687
9780
|
type ContentItemAttemptListResponse = z.infer<typeof ContentItemAttemptListResponseSchema>;
|
|
9781
|
+
type ContentSourceAssetResponse = z.infer<typeof ContentSourceAssetResponseSchema>;
|
|
9688
9782
|
type ContentDistributionResponse = z.infer<typeof ContentDistributionResponseSchema>;
|
|
9689
9783
|
|
|
9690
9784
|
/**
|
|
@@ -10707,6 +10801,13 @@ type ContentToolMap = {
|
|
|
10707
10801
|
/** Which step this attempt implements. Stored as-is; NULL when omitted. */
|
|
10708
10802
|
stepKey?: string | null;
|
|
10709
10803
|
sourceExecutionId?: string | null;
|
|
10804
|
+
/**
|
|
10805
|
+
* The status the row is created with. Optional so a producer starting a
|
|
10806
|
+
* step can write `'running'` before doing the work -- the "write-at-start"
|
|
10807
|
+
* half of write-at-start/patch-at-end. Omitted, the column's own default
|
|
10808
|
+
* applies, which is why a producer that means `'running'` must say so.
|
|
10809
|
+
*/
|
|
10810
|
+
status?: ContentStepStatus;
|
|
10710
10811
|
};
|
|
10711
10812
|
result: ContentItemAttemptResponse;
|
|
10712
10813
|
};
|
|
@@ -10717,6 +10818,69 @@ type ContentToolMap = {
|
|
|
10717
10818
|
};
|
|
10718
10819
|
result: ContentItemAttemptListResponse;
|
|
10719
10820
|
};
|
|
10821
|
+
/**
|
|
10822
|
+
* Patch an existing attempt to its terminal status -- the "patch-at-end"
|
|
10823
|
+
* half of write-at-start/patch-at-end (see `ContentStepStatus`'s
|
|
10824
|
+
* `'running'` value). `attemptNumber`, `stepKey`, and `sourceExecutionId`
|
|
10825
|
+
* are immutable once written; only `status` and `payload` change here.
|
|
10826
|
+
*/
|
|
10827
|
+
updateAttempt: {
|
|
10828
|
+
params: {
|
|
10829
|
+
attemptId: string;
|
|
10830
|
+
status?: ContentStepStatus;
|
|
10831
|
+
payload?: ContentPayloadEnvelope;
|
|
10832
|
+
};
|
|
10833
|
+
result: ContentItemAttemptResponse;
|
|
10834
|
+
};
|
|
10835
|
+
/**
|
|
10836
|
+
* Insert a new `content_source_assets` row. `payload` is an open envelope
|
|
10837
|
+
* (D5, content-source-asset-write-path.mdx) -- per-`kind` field membership
|
|
10838
|
+
* is declared in the OM catalog, not enforced by this transport type.
|
|
10839
|
+
*/
|
|
10840
|
+
createSourceAsset: {
|
|
10841
|
+
params: {
|
|
10842
|
+
kind: string;
|
|
10843
|
+
title: string;
|
|
10844
|
+
externalUrl?: string | null;
|
|
10845
|
+
storagePath?: string | null;
|
|
10846
|
+
durationSeconds?: number | null;
|
|
10847
|
+
metadata?: Record<string, unknown>;
|
|
10848
|
+
payload?: ContentPayloadEnvelope;
|
|
10849
|
+
};
|
|
10850
|
+
result: ContentSourceAssetResponse;
|
|
10851
|
+
};
|
|
10852
|
+
/** Fetch a single source asset by id, org-scoped. */
|
|
10853
|
+
getSourceAsset: {
|
|
10854
|
+
params: {
|
|
10855
|
+
sourceAssetId: string;
|
|
10856
|
+
};
|
|
10857
|
+
result: ContentSourceAssetResponse | null;
|
|
10858
|
+
};
|
|
10859
|
+
/** Query source assets -- e.g. a producer picking material for the next item. */
|
|
10860
|
+
listSourceAssets: {
|
|
10861
|
+
params: {
|
|
10862
|
+
kind?: string;
|
|
10863
|
+
limit?: number;
|
|
10864
|
+
offset?: number;
|
|
10865
|
+
};
|
|
10866
|
+
result: {
|
|
10867
|
+
data: ContentSourceAssetResponse[];
|
|
10868
|
+
};
|
|
10869
|
+
};
|
|
10870
|
+
/** Update a source asset's mutable fields. */
|
|
10871
|
+
updateSourceAsset: {
|
|
10872
|
+
params: {
|
|
10873
|
+
sourceAssetId: string;
|
|
10874
|
+
kind?: string;
|
|
10875
|
+
title?: string;
|
|
10876
|
+
externalUrl?: string | null;
|
|
10877
|
+
storagePath?: string | null;
|
|
10878
|
+
durationSeconds?: number | null;
|
|
10879
|
+
metadata?: Record<string, unknown>;
|
|
10880
|
+
payload?: ContentPayloadEnvelope;
|
|
10881
|
+
};
|
|
10882
|
+
result: ContentSourceAssetResponse;
|
|
10883
|
+
};
|
|
10720
10884
|
/** Insert a `content_distributions` row for one platform/format target. */
|
|
10721
10885
|
createDistribution: {
|
|
10722
10886
|
params: {
|