deepline 0.1.93 → 0.1.95

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/index.d.mts CHANGED
@@ -1194,6 +1194,10 @@ type EnrichStepCommand = {
1194
1194
  alias: string;
1195
1195
  tool: string;
1196
1196
  operation?: string;
1197
+ play?: {
1198
+ ref: string;
1199
+ mode?: 'scalar';
1200
+ };
1197
1201
  payload: Record<string, unknown>;
1198
1202
  extract_js?: string;
1199
1203
  run_if_js?: string;
@@ -1638,6 +1642,7 @@ declare class DeeplineClient {
1638
1642
  compileEnrichPlan(input: {
1639
1643
  plan_args?: string[];
1640
1644
  config?: unknown;
1645
+ native_play_materialization?: 'macro' | 'inline_prebuilt';
1641
1646
  }): Promise<{
1642
1647
  config: EnrichCompiledConfig;
1643
1648
  }>;
@@ -1812,6 +1817,56 @@ declare class DeeplineClient {
1812
1817
  * ```
1813
1818
  */
1814
1819
  listPlayRuns(playName: string): Promise<PlayRunListItem[]>;
1820
+ /** List the org's workflows. `GET /api/v2/workflows`. */
1821
+ listWorkflows(options?: {
1822
+ limit?: number;
1823
+ }): Promise<{
1824
+ workflows: Array<{
1825
+ id: string;
1826
+ name: string;
1827
+ status: string;
1828
+ current_published_version: number | null;
1829
+ }>;
1830
+ }>;
1831
+ /**
1832
+ * Fetch a single workflow (including its published-revision config — the
1833
+ * input to `compileWorkflowConfigToPlay`). `GET /api/v2/workflows/:id`.
1834
+ */
1835
+ getWorkflow(id: string): Promise<{
1836
+ workflow: {
1837
+ id: string;
1838
+ name: string;
1839
+ status: string;
1840
+ current_published_version: number | null;
1841
+ current_published_revision: {
1842
+ version: number;
1843
+ config: unknown;
1844
+ } | null;
1845
+ } | null;
1846
+ validation?: unknown;
1847
+ }>;
1848
+ /** Delete a workflow. `DELETE /api/v2/workflows/:id`. */
1849
+ deleteWorkflow(id: string): Promise<unknown>;
1850
+ /** Turn a workflow off. `POST /api/v2/workflows/:id/disable`. */
1851
+ disableWorkflow(id: string): Promise<unknown>;
1852
+ /** Turn a workflow back on. `POST /api/v2/workflows/:id/enable`. */
1853
+ enableWorkflow(id: string): Promise<unknown>;
1854
+ /** Create/update a workflow from config. `POST /api/v2/workflows/apply`. */
1855
+ applyWorkflow(body: Record<string, unknown>): Promise<unknown>;
1856
+ /** Validate a workflow config without saving. `POST /api/v2/workflows/lint`. */
1857
+ lintWorkflow(body: Record<string, unknown>): Promise<unknown>;
1858
+ /** Fetch live workflow request schemas. `GET /api/v2/workflows/schema`. */
1859
+ getWorkflowSchema(subject?: string): Promise<unknown>;
1860
+ /** Queue a workflow run. `POST /api/v2/workflows/call`. */
1861
+ callWorkflow(body: Record<string, unknown>): Promise<unknown>;
1862
+ /** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
1863
+ listWorkflowRuns(id: string, options?: {
1864
+ limit?: number;
1865
+ }): Promise<unknown>;
1866
+ /** Fetch one workflow run. `GET /api/v2/workflows/:id/runs/:runId`. */
1867
+ getWorkflowRun(id: string, runId: string): Promise<unknown>;
1868
+ /** Cancel a workflow run. `POST /api/v2/workflows/:id/runs/:runId/cancel`. */
1869
+ cancelWorkflowRun(id: string, runId: string): Promise<unknown>;
1815
1870
  /**
1816
1871
  * Get a run by id using the public runs resource model.
1817
1872
  *
@@ -2226,107 +2281,6 @@ declare const PROD_URL = "https://code.deepline.com";
2226
2281
  */
2227
2282
  declare function resolveConfig(options?: DeeplineClientOptions): ResolvedConfig;
2228
2283
 
2229
- interface PlayR2FileRef {
2230
- storageKind: 'r2';
2231
- storageKey: string;
2232
- logicalPath: string;
2233
- fileName: string;
2234
- contentHash: string;
2235
- contentType: string;
2236
- bytes: number;
2237
- }
2238
- type PlayExecutionFileRef = PlayR2FileRef;
2239
-
2240
- declare const PLAY_DATASET_BRAND: unique symbol;
2241
- type PlayDatasetKind = 'csv' | 'map';
2242
- type PlayDatasetBacking = {
2243
- storage: 'neon_sheet';
2244
- sheet: {
2245
- playName: string;
2246
- tableNamespace: string;
2247
- };
2248
- } | {
2249
- storage: 'r2_file';
2250
- file: PlayExecutionFileRef;
2251
- };
2252
- type PlayDatasetWorkProgressSummary = {
2253
- total: number;
2254
- executed: number;
2255
- reused: number;
2256
- skipped: number;
2257
- pending: number;
2258
- failed: number;
2259
- degraded?: boolean;
2260
- duplicates?: {
2261
- exact?: number;
2262
- semantic?: number;
2263
- rejected?: number;
2264
- };
2265
- };
2266
- type PlayDatasetInput<T> = ReadonlyArray<T> | Iterable<T> | AsyncIterable<T> | PlayDataset<T>;
2267
- type PlayDatasetTransformOptions = {
2268
- key?: string;
2269
- sourceLabel?: string | null;
2270
- };
2271
- /**
2272
- * Durable handle for rows produced by `ctx.csv(...)` or `ctx.dataset(...).run()`.
2273
- *
2274
- * A `PlayDataset` is not a normal in-memory array. It points at runtime-managed
2275
- * rows, usually backed by persisted sheet storage, and carries metadata such as
2276
- * dataset kind, dataset id, table namespace, count, and preview rows.
2277
- *
2278
- * Pass dataset handles directly into later `ctx.dataset(...)` stages by default so
2279
- * Deepline keeps row progress, retries, memory use, and table output under
2280
- * runtime control. Use `count()` and `peek()` for bounded inspection. Use
2281
- * `materialize(limit)` or async iteration only when the dataset is intentionally
2282
- * small and bounded. `PlayDataset` intentionally does not expose `.rows`,
2283
- * `.toArray()`, or other array aliases; those hide the runtime cost of loading
2284
- * persisted rows into memory.
2285
- *
2286
- * @sdkReference runtime 190
2287
- */
2288
- interface PlayDataset<T> extends AsyncIterable<T> {
2289
- readonly [PLAY_DATASET_BRAND]: true;
2290
- /** Dataset kind. */
2291
- readonly datasetKind: PlayDatasetKind;
2292
- /** Dataset id. */
2293
- readonly datasetId: string;
2294
- /** Backing store info. */
2295
- readonly backing?: PlayDatasetBacking;
2296
- /** Display label. */
2297
- readonly sourceLabel?: string | null;
2298
- /** Runtime table name. */
2299
- readonly tableNamespace?: string | null;
2300
- /** Row count. */
2301
- count(): Promise<number>;
2302
- /** Preview rows. */
2303
- peek(limit?: number): Promise<T[]>;
2304
- map<U>(mapper: (row: T, index: number) => U | Promise<U>, options?: PlayDatasetTransformOptions): PlayDataset<U>;
2305
- filter(predicate: (row: T, index: number) => boolean | Promise<boolean>, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2306
- slice(start?: number, end?: number, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2307
- take(limit: number, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2308
- /**
2309
- * Explicit escape hatch for bounded result sets.
2310
- * Large datasets should flow by handle through Neon-backed storage, not
2311
- * through worker memory as giant arrays.
2312
- */
2313
- materialize(limit?: number): Promise<T[]>;
2314
- toJSON(): {
2315
- kind: 'dataset';
2316
- datasetKind: PlayDatasetKind;
2317
- datasetId: string;
2318
- count: number;
2319
- backing?: PlayDatasetBacking;
2320
- sourceLabel?: string | null;
2321
- tableNamespace?: string | null;
2322
- columns?: string[];
2323
- _metadata?: {
2324
- workProgress?: PlayDatasetWorkProgressSummary;
2325
- };
2326
- preview: T[];
2327
- };
2328
- }
2329
-
2330
2284
  type EmailStatusVerdict = 'send' | 'send_with_caution' | 'verify_next' | 'hold' | 'drop';
2331
2285
  type EmailStatusValue = 'valid' | 'invalid' | 'catch_all' | 'valid_catch_all' | 'unknown' | 'do_not_mail' | 'spamtrap' | 'abuse' | 'disposable';
2332
2286
  type EmailDeliverability = 'high' | 'medium' | 'low' | 'unknown';
@@ -2503,7 +2457,7 @@ declare const DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS: {
2503
2457
  };
2504
2458
  type DeeplineExtractorTarget = keyof typeof DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS;
2505
2459
  declare const DEEPLINE_EXTRACTOR_TARGETS: DeeplineExtractorTarget[];
2506
- type DeeplineEmailStatusGetterValue = EmailStatus | EmailStatusValue;
2460
+ type DeeplineEmailStatusGetterValue = EmailStatus;
2507
2461
  type DeeplineGetterValueMap = {
2508
2462
  id: string;
2509
2463
  name: string;
@@ -2528,7 +2482,7 @@ type DeeplineGetterValueMap = {
2528
2482
  status: string;
2529
2483
  job_change: JobChangeGetterValue;
2530
2484
  job_change_status: JobChangeStatus;
2531
- email_status: DeeplineEmailStatusGetterValue;
2485
+ email_status: EmailStatus;
2532
2486
  phone_status: PhoneStatus;
2533
2487
  };
2534
2488
  type DeeplineGetterValue<TTarget extends DeeplineExtractorTarget = DeeplineExtractorTarget> = DeeplineGetterValueMap[TTarget];
@@ -2622,6 +2576,107 @@ type ToolExecuteResultAccessors<TExtracted extends Record<string, unknown> = Par
2622
2576
  */
2623
2577
  type ToolExecuteResult<TResult = unknown, TMeta = Record<string, unknown>, TExtracted extends Record<string, unknown> = Partial<DeeplineGetterValueMap>, TLists extends Record<string, Record<string, unknown>> = Record<string, Record<string, unknown>>> = ToolExecuteResultBase<TResult, TMeta> & ToolExecuteResultAccessors<TExtracted, TLists>;
2624
2578
 
2579
+ interface PlayR2FileRef {
2580
+ storageKind: 'r2';
2581
+ storageKey: string;
2582
+ logicalPath: string;
2583
+ fileName: string;
2584
+ contentHash: string;
2585
+ contentType: string;
2586
+ bytes: number;
2587
+ }
2588
+ type PlayExecutionFileRef = PlayR2FileRef;
2589
+
2590
+ declare const PLAY_DATASET_BRAND: unique symbol;
2591
+ type PlayDatasetKind = 'csv' | 'map';
2592
+ type PlayDatasetBacking = {
2593
+ storage: 'neon_sheet';
2594
+ sheet: {
2595
+ playName: string;
2596
+ tableNamespace: string;
2597
+ };
2598
+ } | {
2599
+ storage: 'r2_file';
2600
+ file: PlayExecutionFileRef;
2601
+ };
2602
+ type PlayDatasetWorkProgressSummary = {
2603
+ total: number;
2604
+ executed: number;
2605
+ reused: number;
2606
+ skipped: number;
2607
+ pending: number;
2608
+ failed: number;
2609
+ degraded?: boolean;
2610
+ duplicates?: {
2611
+ exact?: number;
2612
+ semantic?: number;
2613
+ rejected?: number;
2614
+ };
2615
+ };
2616
+ type PlayDatasetInput<T> = ReadonlyArray<T> | Iterable<T> | AsyncIterable<T> | PlayDataset<T>;
2617
+ type PlayDatasetTransformOptions = {
2618
+ key?: string;
2619
+ sourceLabel?: string | null;
2620
+ };
2621
+ /**
2622
+ * Durable handle for rows produced by `ctx.csv(...)` or `ctx.dataset(...).run()`.
2623
+ *
2624
+ * A `PlayDataset` is not a normal in-memory array. It points at runtime-managed
2625
+ * rows, usually backed by persisted sheet storage, and carries metadata such as
2626
+ * dataset kind, dataset id, table namespace, count, and preview rows.
2627
+ *
2628
+ * Pass dataset handles directly into later `ctx.dataset(...)` stages by default so
2629
+ * Deepline keeps row progress, retries, memory use, and table output under
2630
+ * runtime control. Use `count()` and `peek()` for bounded inspection. Use
2631
+ * `materialize(limit)` or async iteration only when the dataset is intentionally
2632
+ * small and bounded. `PlayDataset` intentionally does not expose `.rows`,
2633
+ * `.toArray()`, or other array aliases; those hide the runtime cost of loading
2634
+ * persisted rows into memory.
2635
+ *
2636
+ * @sdkReference runtime 190
2637
+ */
2638
+ interface PlayDataset<T> extends AsyncIterable<T> {
2639
+ readonly [PLAY_DATASET_BRAND]: true;
2640
+ /** Dataset kind. */
2641
+ readonly datasetKind: PlayDatasetKind;
2642
+ /** Dataset id. */
2643
+ readonly datasetId: string;
2644
+ /** Backing store info. */
2645
+ readonly backing?: PlayDatasetBacking;
2646
+ /** Display label. */
2647
+ readonly sourceLabel?: string | null;
2648
+ /** Runtime table name. */
2649
+ readonly tableNamespace?: string | null;
2650
+ /** Row count. */
2651
+ count(): Promise<number>;
2652
+ /** Preview rows. */
2653
+ peek(limit?: number): Promise<T[]>;
2654
+ map<U>(mapper: (row: T, index: number) => U | Promise<U>, options?: PlayDatasetTransformOptions): PlayDataset<U>;
2655
+ filter(predicate: (row: T, index: number) => boolean | Promise<boolean>, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2656
+ slice(start?: number, end?: number, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2657
+ take(limit: number, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2658
+ /**
2659
+ * Explicit escape hatch for bounded result sets.
2660
+ * Large datasets should flow by handle through Neon-backed storage, not
2661
+ * through worker memory as giant arrays.
2662
+ */
2663
+ materialize(limit?: number): Promise<T[]>;
2664
+ toJSON(): {
2665
+ kind: 'dataset';
2666
+ datasetKind: PlayDatasetKind;
2667
+ datasetId: string;
2668
+ count: number;
2669
+ backing?: PlayDatasetBacking;
2670
+ sourceLabel?: string | null;
2671
+ tableNamespace?: string | null;
2672
+ columns?: string[];
2673
+ _metadata?: {
2674
+ workProgress?: PlayDatasetWorkProgressSummary;
2675
+ };
2676
+ preview: T[];
2677
+ };
2678
+ }
2679
+
2625
2680
  /**
2626
2681
  * Previous durable cell value passed to object-column resolvers.
2627
2682
  *
package/dist/index.d.ts CHANGED
@@ -1194,6 +1194,10 @@ type EnrichStepCommand = {
1194
1194
  alias: string;
1195
1195
  tool: string;
1196
1196
  operation?: string;
1197
+ play?: {
1198
+ ref: string;
1199
+ mode?: 'scalar';
1200
+ };
1197
1201
  payload: Record<string, unknown>;
1198
1202
  extract_js?: string;
1199
1203
  run_if_js?: string;
@@ -1638,6 +1642,7 @@ declare class DeeplineClient {
1638
1642
  compileEnrichPlan(input: {
1639
1643
  plan_args?: string[];
1640
1644
  config?: unknown;
1645
+ native_play_materialization?: 'macro' | 'inline_prebuilt';
1641
1646
  }): Promise<{
1642
1647
  config: EnrichCompiledConfig;
1643
1648
  }>;
@@ -1812,6 +1817,56 @@ declare class DeeplineClient {
1812
1817
  * ```
1813
1818
  */
1814
1819
  listPlayRuns(playName: string): Promise<PlayRunListItem[]>;
1820
+ /** List the org's workflows. `GET /api/v2/workflows`. */
1821
+ listWorkflows(options?: {
1822
+ limit?: number;
1823
+ }): Promise<{
1824
+ workflows: Array<{
1825
+ id: string;
1826
+ name: string;
1827
+ status: string;
1828
+ current_published_version: number | null;
1829
+ }>;
1830
+ }>;
1831
+ /**
1832
+ * Fetch a single workflow (including its published-revision config — the
1833
+ * input to `compileWorkflowConfigToPlay`). `GET /api/v2/workflows/:id`.
1834
+ */
1835
+ getWorkflow(id: string): Promise<{
1836
+ workflow: {
1837
+ id: string;
1838
+ name: string;
1839
+ status: string;
1840
+ current_published_version: number | null;
1841
+ current_published_revision: {
1842
+ version: number;
1843
+ config: unknown;
1844
+ } | null;
1845
+ } | null;
1846
+ validation?: unknown;
1847
+ }>;
1848
+ /** Delete a workflow. `DELETE /api/v2/workflows/:id`. */
1849
+ deleteWorkflow(id: string): Promise<unknown>;
1850
+ /** Turn a workflow off. `POST /api/v2/workflows/:id/disable`. */
1851
+ disableWorkflow(id: string): Promise<unknown>;
1852
+ /** Turn a workflow back on. `POST /api/v2/workflows/:id/enable`. */
1853
+ enableWorkflow(id: string): Promise<unknown>;
1854
+ /** Create/update a workflow from config. `POST /api/v2/workflows/apply`. */
1855
+ applyWorkflow(body: Record<string, unknown>): Promise<unknown>;
1856
+ /** Validate a workflow config without saving. `POST /api/v2/workflows/lint`. */
1857
+ lintWorkflow(body: Record<string, unknown>): Promise<unknown>;
1858
+ /** Fetch live workflow request schemas. `GET /api/v2/workflows/schema`. */
1859
+ getWorkflowSchema(subject?: string): Promise<unknown>;
1860
+ /** Queue a workflow run. `POST /api/v2/workflows/call`. */
1861
+ callWorkflow(body: Record<string, unknown>): Promise<unknown>;
1862
+ /** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
1863
+ listWorkflowRuns(id: string, options?: {
1864
+ limit?: number;
1865
+ }): Promise<unknown>;
1866
+ /** Fetch one workflow run. `GET /api/v2/workflows/:id/runs/:runId`. */
1867
+ getWorkflowRun(id: string, runId: string): Promise<unknown>;
1868
+ /** Cancel a workflow run. `POST /api/v2/workflows/:id/runs/:runId/cancel`. */
1869
+ cancelWorkflowRun(id: string, runId: string): Promise<unknown>;
1815
1870
  /**
1816
1871
  * Get a run by id using the public runs resource model.
1817
1872
  *
@@ -2226,107 +2281,6 @@ declare const PROD_URL = "https://code.deepline.com";
2226
2281
  */
2227
2282
  declare function resolveConfig(options?: DeeplineClientOptions): ResolvedConfig;
2228
2283
 
2229
- interface PlayR2FileRef {
2230
- storageKind: 'r2';
2231
- storageKey: string;
2232
- logicalPath: string;
2233
- fileName: string;
2234
- contentHash: string;
2235
- contentType: string;
2236
- bytes: number;
2237
- }
2238
- type PlayExecutionFileRef = PlayR2FileRef;
2239
-
2240
- declare const PLAY_DATASET_BRAND: unique symbol;
2241
- type PlayDatasetKind = 'csv' | 'map';
2242
- type PlayDatasetBacking = {
2243
- storage: 'neon_sheet';
2244
- sheet: {
2245
- playName: string;
2246
- tableNamespace: string;
2247
- };
2248
- } | {
2249
- storage: 'r2_file';
2250
- file: PlayExecutionFileRef;
2251
- };
2252
- type PlayDatasetWorkProgressSummary = {
2253
- total: number;
2254
- executed: number;
2255
- reused: number;
2256
- skipped: number;
2257
- pending: number;
2258
- failed: number;
2259
- degraded?: boolean;
2260
- duplicates?: {
2261
- exact?: number;
2262
- semantic?: number;
2263
- rejected?: number;
2264
- };
2265
- };
2266
- type PlayDatasetInput<T> = ReadonlyArray<T> | Iterable<T> | AsyncIterable<T> | PlayDataset<T>;
2267
- type PlayDatasetTransformOptions = {
2268
- key?: string;
2269
- sourceLabel?: string | null;
2270
- };
2271
- /**
2272
- * Durable handle for rows produced by `ctx.csv(...)` or `ctx.dataset(...).run()`.
2273
- *
2274
- * A `PlayDataset` is not a normal in-memory array. It points at runtime-managed
2275
- * rows, usually backed by persisted sheet storage, and carries metadata such as
2276
- * dataset kind, dataset id, table namespace, count, and preview rows.
2277
- *
2278
- * Pass dataset handles directly into later `ctx.dataset(...)` stages by default so
2279
- * Deepline keeps row progress, retries, memory use, and table output under
2280
- * runtime control. Use `count()` and `peek()` for bounded inspection. Use
2281
- * `materialize(limit)` or async iteration only when the dataset is intentionally
2282
- * small and bounded. `PlayDataset` intentionally does not expose `.rows`,
2283
- * `.toArray()`, or other array aliases; those hide the runtime cost of loading
2284
- * persisted rows into memory.
2285
- *
2286
- * @sdkReference runtime 190
2287
- */
2288
- interface PlayDataset<T> extends AsyncIterable<T> {
2289
- readonly [PLAY_DATASET_BRAND]: true;
2290
- /** Dataset kind. */
2291
- readonly datasetKind: PlayDatasetKind;
2292
- /** Dataset id. */
2293
- readonly datasetId: string;
2294
- /** Backing store info. */
2295
- readonly backing?: PlayDatasetBacking;
2296
- /** Display label. */
2297
- readonly sourceLabel?: string | null;
2298
- /** Runtime table name. */
2299
- readonly tableNamespace?: string | null;
2300
- /** Row count. */
2301
- count(): Promise<number>;
2302
- /** Preview rows. */
2303
- peek(limit?: number): Promise<T[]>;
2304
- map<U>(mapper: (row: T, index: number) => U | Promise<U>, options?: PlayDatasetTransformOptions): PlayDataset<U>;
2305
- filter(predicate: (row: T, index: number) => boolean | Promise<boolean>, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2306
- slice(start?: number, end?: number, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2307
- take(limit: number, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2308
- /**
2309
- * Explicit escape hatch for bounded result sets.
2310
- * Large datasets should flow by handle through Neon-backed storage, not
2311
- * through worker memory as giant arrays.
2312
- */
2313
- materialize(limit?: number): Promise<T[]>;
2314
- toJSON(): {
2315
- kind: 'dataset';
2316
- datasetKind: PlayDatasetKind;
2317
- datasetId: string;
2318
- count: number;
2319
- backing?: PlayDatasetBacking;
2320
- sourceLabel?: string | null;
2321
- tableNamespace?: string | null;
2322
- columns?: string[];
2323
- _metadata?: {
2324
- workProgress?: PlayDatasetWorkProgressSummary;
2325
- };
2326
- preview: T[];
2327
- };
2328
- }
2329
-
2330
2284
  type EmailStatusVerdict = 'send' | 'send_with_caution' | 'verify_next' | 'hold' | 'drop';
2331
2285
  type EmailStatusValue = 'valid' | 'invalid' | 'catch_all' | 'valid_catch_all' | 'unknown' | 'do_not_mail' | 'spamtrap' | 'abuse' | 'disposable';
2332
2286
  type EmailDeliverability = 'high' | 'medium' | 'low' | 'unknown';
@@ -2503,7 +2457,7 @@ declare const DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS: {
2503
2457
  };
2504
2458
  type DeeplineExtractorTarget = keyof typeof DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS;
2505
2459
  declare const DEEPLINE_EXTRACTOR_TARGETS: DeeplineExtractorTarget[];
2506
- type DeeplineEmailStatusGetterValue = EmailStatus | EmailStatusValue;
2460
+ type DeeplineEmailStatusGetterValue = EmailStatus;
2507
2461
  type DeeplineGetterValueMap = {
2508
2462
  id: string;
2509
2463
  name: string;
@@ -2528,7 +2482,7 @@ type DeeplineGetterValueMap = {
2528
2482
  status: string;
2529
2483
  job_change: JobChangeGetterValue;
2530
2484
  job_change_status: JobChangeStatus;
2531
- email_status: DeeplineEmailStatusGetterValue;
2485
+ email_status: EmailStatus;
2532
2486
  phone_status: PhoneStatus;
2533
2487
  };
2534
2488
  type DeeplineGetterValue<TTarget extends DeeplineExtractorTarget = DeeplineExtractorTarget> = DeeplineGetterValueMap[TTarget];
@@ -2622,6 +2576,107 @@ type ToolExecuteResultAccessors<TExtracted extends Record<string, unknown> = Par
2622
2576
  */
2623
2577
  type ToolExecuteResult<TResult = unknown, TMeta = Record<string, unknown>, TExtracted extends Record<string, unknown> = Partial<DeeplineGetterValueMap>, TLists extends Record<string, Record<string, unknown>> = Record<string, Record<string, unknown>>> = ToolExecuteResultBase<TResult, TMeta> & ToolExecuteResultAccessors<TExtracted, TLists>;
2624
2578
 
2579
+ interface PlayR2FileRef {
2580
+ storageKind: 'r2';
2581
+ storageKey: string;
2582
+ logicalPath: string;
2583
+ fileName: string;
2584
+ contentHash: string;
2585
+ contentType: string;
2586
+ bytes: number;
2587
+ }
2588
+ type PlayExecutionFileRef = PlayR2FileRef;
2589
+
2590
+ declare const PLAY_DATASET_BRAND: unique symbol;
2591
+ type PlayDatasetKind = 'csv' | 'map';
2592
+ type PlayDatasetBacking = {
2593
+ storage: 'neon_sheet';
2594
+ sheet: {
2595
+ playName: string;
2596
+ tableNamespace: string;
2597
+ };
2598
+ } | {
2599
+ storage: 'r2_file';
2600
+ file: PlayExecutionFileRef;
2601
+ };
2602
+ type PlayDatasetWorkProgressSummary = {
2603
+ total: number;
2604
+ executed: number;
2605
+ reused: number;
2606
+ skipped: number;
2607
+ pending: number;
2608
+ failed: number;
2609
+ degraded?: boolean;
2610
+ duplicates?: {
2611
+ exact?: number;
2612
+ semantic?: number;
2613
+ rejected?: number;
2614
+ };
2615
+ };
2616
+ type PlayDatasetInput<T> = ReadonlyArray<T> | Iterable<T> | AsyncIterable<T> | PlayDataset<T>;
2617
+ type PlayDatasetTransformOptions = {
2618
+ key?: string;
2619
+ sourceLabel?: string | null;
2620
+ };
2621
+ /**
2622
+ * Durable handle for rows produced by `ctx.csv(...)` or `ctx.dataset(...).run()`.
2623
+ *
2624
+ * A `PlayDataset` is not a normal in-memory array. It points at runtime-managed
2625
+ * rows, usually backed by persisted sheet storage, and carries metadata such as
2626
+ * dataset kind, dataset id, table namespace, count, and preview rows.
2627
+ *
2628
+ * Pass dataset handles directly into later `ctx.dataset(...)` stages by default so
2629
+ * Deepline keeps row progress, retries, memory use, and table output under
2630
+ * runtime control. Use `count()` and `peek()` for bounded inspection. Use
2631
+ * `materialize(limit)` or async iteration only when the dataset is intentionally
2632
+ * small and bounded. `PlayDataset` intentionally does not expose `.rows`,
2633
+ * `.toArray()`, or other array aliases; those hide the runtime cost of loading
2634
+ * persisted rows into memory.
2635
+ *
2636
+ * @sdkReference runtime 190
2637
+ */
2638
+ interface PlayDataset<T> extends AsyncIterable<T> {
2639
+ readonly [PLAY_DATASET_BRAND]: true;
2640
+ /** Dataset kind. */
2641
+ readonly datasetKind: PlayDatasetKind;
2642
+ /** Dataset id. */
2643
+ readonly datasetId: string;
2644
+ /** Backing store info. */
2645
+ readonly backing?: PlayDatasetBacking;
2646
+ /** Display label. */
2647
+ readonly sourceLabel?: string | null;
2648
+ /** Runtime table name. */
2649
+ readonly tableNamespace?: string | null;
2650
+ /** Row count. */
2651
+ count(): Promise<number>;
2652
+ /** Preview rows. */
2653
+ peek(limit?: number): Promise<T[]>;
2654
+ map<U>(mapper: (row: T, index: number) => U | Promise<U>, options?: PlayDatasetTransformOptions): PlayDataset<U>;
2655
+ filter(predicate: (row: T, index: number) => boolean | Promise<boolean>, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2656
+ slice(start?: number, end?: number, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2657
+ take(limit: number, options?: PlayDatasetTransformOptions): PlayDataset<T>;
2658
+ /**
2659
+ * Explicit escape hatch for bounded result sets.
2660
+ * Large datasets should flow by handle through Neon-backed storage, not
2661
+ * through worker memory as giant arrays.
2662
+ */
2663
+ materialize(limit?: number): Promise<T[]>;
2664
+ toJSON(): {
2665
+ kind: 'dataset';
2666
+ datasetKind: PlayDatasetKind;
2667
+ datasetId: string;
2668
+ count: number;
2669
+ backing?: PlayDatasetBacking;
2670
+ sourceLabel?: string | null;
2671
+ tableNamespace?: string | null;
2672
+ columns?: string[];
2673
+ _metadata?: {
2674
+ workProgress?: PlayDatasetWorkProgressSummary;
2675
+ };
2676
+ preview: T[];
2677
+ };
2678
+ }
2679
+
2625
2680
  /**
2626
2681
  * Previous durable cell value passed to object-column resolvers.
2627
2682
  *