@sanity/workflow-engine 0.18.0 → 0.19.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/define.d.cts CHANGED
@@ -1156,6 +1156,7 @@ declare const FIELD_VALUE_KINDS: readonly [
1156
1156
  "string",
1157
1157
  "text",
1158
1158
  "number",
1159
+ "progress",
1159
1160
  "boolean",
1160
1161
  "date",
1161
1162
  "datetime",
@@ -1927,7 +1928,11 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
1927
1928
  readonly name: v.SchemaWithPipe<
1928
1929
  readonly [
1929
1930
  v.StringSchema<undefined>,
1930
- v.NonEmptyAction<string, "must not be empty">,
1931
+ v.NonEmptyAction<string, undefined>,
1932
+ v.CheckAction<
1933
+ string,
1934
+ `invalid ${string} \u2014 ASCII lowercase + digits + dashes, no leading dash, no dots`
1935
+ >,
1931
1936
  ]
1932
1937
  >;
1933
1938
  readonly expectedMinReaderModel: v.OptionalSchema<
@@ -1940,7 +1945,7 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
1940
1945
  v.NonEmptyAction<string, undefined>,
1941
1946
  v.CheckAction<
1942
1947
  string,
1943
- "invalid tag — lowercase letters, digits and dashes only, no leading dash, no dots"
1948
+ `invalid ${string} \u2014 ASCII lowercase + digits + dashes, no leading dash, no dots`
1944
1949
  >,
1945
1950
  ]
1946
1951
  >;
@@ -2141,7 +2146,30 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
2141
2146
  id: string;
2142
2147
  };
2143
2148
  }[],
2144
- "duplicate resource handle name — each binding name must be unique within a deployment"
2149
+ (
2150
+ issue: v.CheckIssue<
2151
+ {
2152
+ name: string;
2153
+ resource:
2154
+ | {
2155
+ type: "dataset";
2156
+ id: string;
2157
+ }
2158
+ | {
2159
+ type: "canvas";
2160
+ id: string;
2161
+ }
2162
+ | {
2163
+ type: "media-library";
2164
+ id: string;
2165
+ }
2166
+ | {
2167
+ type: "dashboard";
2168
+ id: string;
2169
+ };
2170
+ }[]
2171
+ >,
2172
+ ) => string
2145
2173
  >,
2146
2174
  ]
2147
2175
  >,
@@ -2311,7 +2339,187 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
2311
2339
  roleAliases?: RoleAliases | undefined;
2312
2340
  }[];
2313
2341
  }[],
2314
- "duplicate deployment tag — each deployment must use a unique tag"
2342
+ (
2343
+ issue: v.CheckIssue<
2344
+ {
2345
+ name: string;
2346
+ expectedMinReaderModel?: 2 | undefined;
2347
+ tag: string;
2348
+ workflowResource:
2349
+ | {
2350
+ type: "dataset";
2351
+ id: string;
2352
+ }
2353
+ | {
2354
+ type: "canvas";
2355
+ id: string;
2356
+ }
2357
+ | {
2358
+ type: "media-library";
2359
+ id: string;
2360
+ }
2361
+ | {
2362
+ type: "dashboard";
2363
+ id: string;
2364
+ };
2365
+ resourceAliases?:
2366
+ | {
2367
+ name: string;
2368
+ resource:
2369
+ | {
2370
+ type: "dataset";
2371
+ id: string;
2372
+ }
2373
+ | {
2374
+ type: "canvas";
2375
+ id: string;
2376
+ }
2377
+ | {
2378
+ type: "media-library";
2379
+ id: string;
2380
+ }
2381
+ | {
2382
+ type: "dashboard";
2383
+ id: string;
2384
+ };
2385
+ }[]
2386
+ | undefined;
2387
+ definitions: {
2388
+ name: string;
2389
+ title: string;
2390
+ description?: string | undefined;
2391
+ groups?: Group[] | undefined;
2392
+ lifecycle?: WorkflowLifecycle | undefined;
2393
+ start?: StartBlock | undefined;
2394
+ initialStage: string;
2395
+ fields?: FieldEntry[] | undefined;
2396
+ stages: Stage[];
2397
+ predicates?: Record<string, string> | undefined;
2398
+ roleAliases?: RoleAliases | undefined;
2399
+ }[];
2400
+ }[]
2401
+ >,
2402
+ ) => string
2403
+ >,
2404
+ v.CheckAction<
2405
+ {
2406
+ name: string;
2407
+ expectedMinReaderModel?: 2 | undefined;
2408
+ tag: string;
2409
+ workflowResource:
2410
+ | {
2411
+ type: "dataset";
2412
+ id: string;
2413
+ }
2414
+ | {
2415
+ type: "canvas";
2416
+ id: string;
2417
+ }
2418
+ | {
2419
+ type: "media-library";
2420
+ id: string;
2421
+ }
2422
+ | {
2423
+ type: "dashboard";
2424
+ id: string;
2425
+ };
2426
+ resourceAliases?:
2427
+ | {
2428
+ name: string;
2429
+ resource:
2430
+ | {
2431
+ type: "dataset";
2432
+ id: string;
2433
+ }
2434
+ | {
2435
+ type: "canvas";
2436
+ id: string;
2437
+ }
2438
+ | {
2439
+ type: "media-library";
2440
+ id: string;
2441
+ }
2442
+ | {
2443
+ type: "dashboard";
2444
+ id: string;
2445
+ };
2446
+ }[]
2447
+ | undefined;
2448
+ definitions: {
2449
+ name: string;
2450
+ title: string;
2451
+ description?: string | undefined;
2452
+ groups?: Group[] | undefined;
2453
+ lifecycle?: WorkflowLifecycle | undefined;
2454
+ start?: StartBlock | undefined;
2455
+ initialStage: string;
2456
+ fields?: FieldEntry[] | undefined;
2457
+ stages: Stage[];
2458
+ predicates?: Record<string, string> | undefined;
2459
+ roleAliases?: RoleAliases | undefined;
2460
+ }[];
2461
+ }[],
2462
+ (
2463
+ issue: v.CheckIssue<
2464
+ {
2465
+ name: string;
2466
+ expectedMinReaderModel?: 2 | undefined;
2467
+ tag: string;
2468
+ workflowResource:
2469
+ | {
2470
+ type: "dataset";
2471
+ id: string;
2472
+ }
2473
+ | {
2474
+ type: "canvas";
2475
+ id: string;
2476
+ }
2477
+ | {
2478
+ type: "media-library";
2479
+ id: string;
2480
+ }
2481
+ | {
2482
+ type: "dashboard";
2483
+ id: string;
2484
+ };
2485
+ resourceAliases?:
2486
+ | {
2487
+ name: string;
2488
+ resource:
2489
+ | {
2490
+ type: "dataset";
2491
+ id: string;
2492
+ }
2493
+ | {
2494
+ type: "canvas";
2495
+ id: string;
2496
+ }
2497
+ | {
2498
+ type: "media-library";
2499
+ id: string;
2500
+ }
2501
+ | {
2502
+ type: "dashboard";
2503
+ id: string;
2504
+ };
2505
+ }[]
2506
+ | undefined;
2507
+ definitions: {
2508
+ name: string;
2509
+ title: string;
2510
+ description?: string | undefined;
2511
+ groups?: Group[] | undefined;
2512
+ lifecycle?: WorkflowLifecycle | undefined;
2513
+ start?: StartBlock | undefined;
2514
+ initialStage: string;
2515
+ fields?: FieldEntry[] | undefined;
2516
+ stages: Stage[];
2517
+ predicates?: Record<string, string> | undefined;
2518
+ roleAliases?: RoleAliases | undefined;
2519
+ }[];
2520
+ }[]
2521
+ >,
2522
+ ) => string
2315
2523
  >,
2316
2524
  ]
2317
2525
  >;
package/dist/define.d.ts CHANGED
@@ -1156,6 +1156,7 @@ declare const FIELD_VALUE_KINDS: readonly [
1156
1156
  "string",
1157
1157
  "text",
1158
1158
  "number",
1159
+ "progress",
1159
1160
  "boolean",
1160
1161
  "date",
1161
1162
  "datetime",
@@ -1927,7 +1928,11 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
1927
1928
  readonly name: v.SchemaWithPipe<
1928
1929
  readonly [
1929
1930
  v.StringSchema<undefined>,
1930
- v.NonEmptyAction<string, "must not be empty">,
1931
+ v.NonEmptyAction<string, undefined>,
1932
+ v.CheckAction<
1933
+ string,
1934
+ `invalid ${string} \u2014 ASCII lowercase + digits + dashes, no leading dash, no dots`
1935
+ >,
1931
1936
  ]
1932
1937
  >;
1933
1938
  readonly expectedMinReaderModel: v.OptionalSchema<
@@ -1940,7 +1945,7 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
1940
1945
  v.NonEmptyAction<string, undefined>,
1941
1946
  v.CheckAction<
1942
1947
  string,
1943
- "invalid tag — lowercase letters, digits and dashes only, no leading dash, no dots"
1948
+ `invalid ${string} \u2014 ASCII lowercase + digits + dashes, no leading dash, no dots`
1944
1949
  >,
1945
1950
  ]
1946
1951
  >;
@@ -2141,7 +2146,30 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
2141
2146
  id: string;
2142
2147
  };
2143
2148
  }[],
2144
- "duplicate resource handle name — each binding name must be unique within a deployment"
2149
+ (
2150
+ issue: v.CheckIssue<
2151
+ {
2152
+ name: string;
2153
+ resource:
2154
+ | {
2155
+ type: "dataset";
2156
+ id: string;
2157
+ }
2158
+ | {
2159
+ type: "canvas";
2160
+ id: string;
2161
+ }
2162
+ | {
2163
+ type: "media-library";
2164
+ id: string;
2165
+ }
2166
+ | {
2167
+ type: "dashboard";
2168
+ id: string;
2169
+ };
2170
+ }[]
2171
+ >,
2172
+ ) => string
2145
2173
  >,
2146
2174
  ]
2147
2175
  >,
@@ -2311,7 +2339,187 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
2311
2339
  roleAliases?: RoleAliases | undefined;
2312
2340
  }[];
2313
2341
  }[],
2314
- "duplicate deployment tag — each deployment must use a unique tag"
2342
+ (
2343
+ issue: v.CheckIssue<
2344
+ {
2345
+ name: string;
2346
+ expectedMinReaderModel?: 2 | undefined;
2347
+ tag: string;
2348
+ workflowResource:
2349
+ | {
2350
+ type: "dataset";
2351
+ id: string;
2352
+ }
2353
+ | {
2354
+ type: "canvas";
2355
+ id: string;
2356
+ }
2357
+ | {
2358
+ type: "media-library";
2359
+ id: string;
2360
+ }
2361
+ | {
2362
+ type: "dashboard";
2363
+ id: string;
2364
+ };
2365
+ resourceAliases?:
2366
+ | {
2367
+ name: string;
2368
+ resource:
2369
+ | {
2370
+ type: "dataset";
2371
+ id: string;
2372
+ }
2373
+ | {
2374
+ type: "canvas";
2375
+ id: string;
2376
+ }
2377
+ | {
2378
+ type: "media-library";
2379
+ id: string;
2380
+ }
2381
+ | {
2382
+ type: "dashboard";
2383
+ id: string;
2384
+ };
2385
+ }[]
2386
+ | undefined;
2387
+ definitions: {
2388
+ name: string;
2389
+ title: string;
2390
+ description?: string | undefined;
2391
+ groups?: Group[] | undefined;
2392
+ lifecycle?: WorkflowLifecycle | undefined;
2393
+ start?: StartBlock | undefined;
2394
+ initialStage: string;
2395
+ fields?: FieldEntry[] | undefined;
2396
+ stages: Stage[];
2397
+ predicates?: Record<string, string> | undefined;
2398
+ roleAliases?: RoleAliases | undefined;
2399
+ }[];
2400
+ }[]
2401
+ >,
2402
+ ) => string
2403
+ >,
2404
+ v.CheckAction<
2405
+ {
2406
+ name: string;
2407
+ expectedMinReaderModel?: 2 | undefined;
2408
+ tag: string;
2409
+ workflowResource:
2410
+ | {
2411
+ type: "dataset";
2412
+ id: string;
2413
+ }
2414
+ | {
2415
+ type: "canvas";
2416
+ id: string;
2417
+ }
2418
+ | {
2419
+ type: "media-library";
2420
+ id: string;
2421
+ }
2422
+ | {
2423
+ type: "dashboard";
2424
+ id: string;
2425
+ };
2426
+ resourceAliases?:
2427
+ | {
2428
+ name: string;
2429
+ resource:
2430
+ | {
2431
+ type: "dataset";
2432
+ id: string;
2433
+ }
2434
+ | {
2435
+ type: "canvas";
2436
+ id: string;
2437
+ }
2438
+ | {
2439
+ type: "media-library";
2440
+ id: string;
2441
+ }
2442
+ | {
2443
+ type: "dashboard";
2444
+ id: string;
2445
+ };
2446
+ }[]
2447
+ | undefined;
2448
+ definitions: {
2449
+ name: string;
2450
+ title: string;
2451
+ description?: string | undefined;
2452
+ groups?: Group[] | undefined;
2453
+ lifecycle?: WorkflowLifecycle | undefined;
2454
+ start?: StartBlock | undefined;
2455
+ initialStage: string;
2456
+ fields?: FieldEntry[] | undefined;
2457
+ stages: Stage[];
2458
+ predicates?: Record<string, string> | undefined;
2459
+ roleAliases?: RoleAliases | undefined;
2460
+ }[];
2461
+ }[],
2462
+ (
2463
+ issue: v.CheckIssue<
2464
+ {
2465
+ name: string;
2466
+ expectedMinReaderModel?: 2 | undefined;
2467
+ tag: string;
2468
+ workflowResource:
2469
+ | {
2470
+ type: "dataset";
2471
+ id: string;
2472
+ }
2473
+ | {
2474
+ type: "canvas";
2475
+ id: string;
2476
+ }
2477
+ | {
2478
+ type: "media-library";
2479
+ id: string;
2480
+ }
2481
+ | {
2482
+ type: "dashboard";
2483
+ id: string;
2484
+ };
2485
+ resourceAliases?:
2486
+ | {
2487
+ name: string;
2488
+ resource:
2489
+ | {
2490
+ type: "dataset";
2491
+ id: string;
2492
+ }
2493
+ | {
2494
+ type: "canvas";
2495
+ id: string;
2496
+ }
2497
+ | {
2498
+ type: "media-library";
2499
+ id: string;
2500
+ }
2501
+ | {
2502
+ type: "dashboard";
2503
+ id: string;
2504
+ };
2505
+ }[]
2506
+ | undefined;
2507
+ definitions: {
2508
+ name: string;
2509
+ title: string;
2510
+ description?: string | undefined;
2511
+ groups?: Group[] | undefined;
2512
+ lifecycle?: WorkflowLifecycle | undefined;
2513
+ start?: StartBlock | undefined;
2514
+ initialStage: string;
2515
+ fields?: FieldEntry[] | undefined;
2516
+ stages: Stage[];
2517
+ predicates?: Record<string, string> | undefined;
2518
+ roleAliases?: RoleAliases | undefined;
2519
+ }[];
2520
+ }[]
2521
+ >,
2522
+ ) => string
2315
2523
  >,
2316
2524
  ]
2317
2525
  >;