deepline 0.2.47 → 0.2.49

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.
@@ -1030,7 +1030,7 @@ var SDK_RELEASE = {
1030
1030
  // 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
1031
1031
  // exposed storage-dependent synchronous access. This deliberate minor
1032
1032
  // release keeps lazy paging semantics independent of row residency.
1033
- version: "0.2.47",
1033
+ version: "0.2.49",
1034
1034
  contracts: {
1035
1035
  api: {
1036
1036
  name: "sdk-http-api",
@@ -3865,7 +3865,7 @@ var DeeplineClient = class {
3865
3865
  deploy: (definition, options2) => this.deployMonitor(definition, options2),
3866
3866
  list: (options2) => this.listMonitors(options2),
3867
3867
  get: (key) => this.getMonitor(key),
3868
- test: (key, payload) => this.testMonitorWebhook(key, payload),
3868
+ test: (key, payload, options2) => this.testMonitorWebhook(key, payload, options2),
3869
3869
  validate: (key) => this.validateMonitor(key),
3870
3870
  dependents: (key) => this.getMonitorDependents(key),
3871
3871
  update: (key, patch) => this.updateMonitor(key, patch),
@@ -6034,10 +6034,16 @@ var DeeplineClient = class {
6034
6034
  { method: "GET" }
6035
6035
  );
6036
6036
  }
6037
- async testMonitorWebhook(key, payload) {
6037
+ async testMonitorWebhook(key, payload, options) {
6038
6038
  return this.http.request(
6039
6039
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/test`,
6040
- { method: "POST", body: { payload } }
6040
+ {
6041
+ method: "POST",
6042
+ body: {
6043
+ payload,
6044
+ ...options?.validationOnly ? { mode: "validation_only" } : {}
6045
+ }
6046
+ }
6041
6047
  );
6042
6048
  }
6043
6049
  async setupMonitor(tool, payload) {
@@ -15058,6 +15064,76 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
15058
15064
  description: "HTTP header containing the webhook signature.",
15059
15065
  errorMessage: "bindings.webhook.hmac.header must be a non-empty static string."
15060
15066
  },
15067
+ "bindings.webhook.auth.type": {
15068
+ schema: Type.Literal("standard-webhooks"),
15069
+ fixtures: {
15070
+ valid: "standard-webhooks",
15071
+ invalid: "svix",
15072
+ absent: void 0,
15073
+ unresolved: { expression: "type" },
15074
+ edition1: void 0
15075
+ },
15076
+ referenceType: "'standard-webhooks'",
15077
+ // auth itself is optional; once present, the AST adapter requires this
15078
+ // field together with headerFamily and signingSecrets.
15079
+ required: false,
15080
+ resolution: "static-required",
15081
+ issueCode: "play_authoring_standard_webhooks_invalid",
15082
+ description: "Uses the Standard Webhooks v1 symmetric signing scheme.",
15083
+ errorMessage: 'bindings.webhook.auth.type must be the static literal "standard-webhooks".'
15084
+ },
15085
+ "bindings.webhook.auth.headerFamily": {
15086
+ schema: Type.Union([Type.Literal("standard"), Type.Literal("svix")]),
15087
+ fixtures: {
15088
+ valid: "svix",
15089
+ invalid: "webhook",
15090
+ absent: void 0,
15091
+ unresolved: { expression: "headerFamily" },
15092
+ edition1: void 0
15093
+ },
15094
+ referenceType: "'standard' | 'svix'",
15095
+ // auth itself is optional; once present, the AST adapter requires this
15096
+ // field together with type and signingSecrets.
15097
+ required: false,
15098
+ resolution: "static-required",
15099
+ issueCode: "play_authoring_standard_webhooks_invalid",
15100
+ description: "Header namespace expected from the webhook provider.",
15101
+ errorMessage: 'bindings.webhook.auth.headerFamily must be the static literal "standard" or "svix".'
15102
+ },
15103
+ "bindings.webhook.auth.signingSecrets[]": {
15104
+ schema: SecretEnvironmentNameSchema,
15105
+ fixtures: {
15106
+ valid: "VECTOR_WEBHOOK_SECRET",
15107
+ invalid: "vector_webhook_secret",
15108
+ absent: void 0,
15109
+ unresolved: { expression: "secret" },
15110
+ edition1: void 0
15111
+ },
15112
+ referenceType: "string",
15113
+ // auth itself is optional; once present, the AST adapter requires this
15114
+ // field together with type and headerFamily.
15115
+ required: false,
15116
+ resolution: "static-required",
15117
+ issueCode: "play_authoring_standard_webhooks_invalid",
15118
+ description: "Deepline Secret name used to verify Standard Webhooks.",
15119
+ errorMessage: "bindings.webhook.auth.signingSecrets entries must be uppercase Deepline Secret names beginning with a letter."
15120
+ },
15121
+ "bindings.webhook.auth.toleranceSeconds": {
15122
+ schema: Type.Integer({ minimum: 1, maximum: 3600 }),
15123
+ fixtures: {
15124
+ valid: 300,
15125
+ invalid: 0,
15126
+ absent: void 0,
15127
+ unresolved: { expression: "toleranceSeconds" },
15128
+ edition1: void 0
15129
+ },
15130
+ referenceType: "number",
15131
+ required: false,
15132
+ resolution: "static-required",
15133
+ issueCode: "play_authoring_standard_webhooks_invalid",
15134
+ description: "Accepted delivery timestamp skew in seconds, from 1 through 3600.",
15135
+ errorMessage: "bindings.webhook.auth.toleranceSeconds must be a static whole number from 1 through 3600."
15136
+ },
15061
15137
  "bindings.cron.schedule": {
15062
15138
  schema: Type.String({ minLength: 1 }),
15063
15139
  fixtures: {
@@ -16082,7 +16158,7 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
16082
16158
  ` inline?: ${cloudReferenceType("inline")};`,
16083
16159
  ` billing?: { maxCreditsPerRun?: ${cloudReferenceType("billing.maxCreditsPerRun")} };`,
16084
16160
  ` runtime?: { timeout?: ${cloudReferenceType("runtime.timeout")}; size?: ${cloudReferenceType("runtime.size")} };`,
16085
- ` webhook?: { hmac?: { algorithm?: ${cloudReferenceType("bindings.webhook.hmac.algorithm")}; header?: ${cloudReferenceType("bindings.webhook.hmac.header")}; secretEnv: ${cloudReferenceType("bindings.webhook.hmac.secretEnv")} } };`,
16161
+ ` webhook?: { hmac?: { algorithm?: ${cloudReferenceType("bindings.webhook.hmac.algorithm")}; header?: ${cloudReferenceType("bindings.webhook.hmac.header")}; secretEnv: ${cloudReferenceType("bindings.webhook.hmac.secretEnv")} }; auth?: { type: ${cloudReferenceType("bindings.webhook.auth.type")}; headerFamily: ${cloudReferenceType("bindings.webhook.auth.headerFamily")}; signingSecrets: readonly ${cloudReferenceType("bindings.webhook.auth.signingSecrets[]")}[]; toleranceSeconds?: ${cloudReferenceType("bindings.webhook.auth.toleranceSeconds")} } };`,
16086
16162
  ` cron?: { schedule: ${cloudReferenceType("bindings.cron.schedule")}; timezone?: ${cloudReferenceType("bindings.cron.timezone")} };`,
16087
16163
  " sqlListeners?: readonly SqlListenerDeclaration[];",
16088
16164
  ` secrets?: readonly ${cloudReferenceType("bindings.secrets[]")}[];`,
@@ -30808,6 +30884,31 @@ function readDeployOutputContract(payload) {
30808
30884
  });
30809
30885
  return { tool: asString(contract.tool), streams };
30810
30886
  }
30887
+ function renderDeployReplacementWarning(input2) {
30888
+ const summary = asRecord2(input2.payload.change_summary);
30889
+ const upstream = summary ? asRecord2(summary.upstream) : void 0;
30890
+ if (!summary || !upstream || upstream.resource_replaced !== true) return [];
30891
+ const definition = asRecord2(summary.definition);
30892
+ const changed = definition && Array.isArray(definition.changed) ? definition.changed : [];
30893
+ const lines = [
30894
+ input2.completed ? "WARNING: this deploy replaced the existing upstream monitor." : "WARNING: this deploy replaces the existing upstream monitor.",
30895
+ "Existing Customer DB rows are preserved. Provider backfill is not implied."
30896
+ ];
30897
+ for (const raw of changed) {
30898
+ const item = asRecord2(raw);
30899
+ const path = item ? asString(item.path) : void 0;
30900
+ if (!item || !path) continue;
30901
+ lines.push(
30902
+ ` ${path}: ${JSON.stringify(item.before ?? null)} \u2192 ${JSON.stringify(
30903
+ item.after ?? null
30904
+ )}`
30905
+ );
30906
+ }
30907
+ lines.push(
30908
+ input2.monitorKey ? `Use \`deepline monitors update ${input2.monitorKey} <patch>\` for a patch-style change.` : "Use `deepline monitors update <key> <patch>` for a patch-style change."
30909
+ );
30910
+ return lines;
30911
+ }
30811
30912
  function renderMonitorDeployCompletion(payload) {
30812
30913
  const monitor = asRecord2(payload.monitor);
30813
30914
  const key = monitor ? asString(monitor.key) : void 0;
@@ -30835,6 +30936,12 @@ function renderMonitorDeployCompletion(payload) {
30835
30936
  if (pricingLine) {
30836
30937
  lines.push("", `Pricing: ${pricingLine}`);
30837
30938
  }
30939
+ const replacementWarning = renderDeployReplacementWarning({
30940
+ payload,
30941
+ completed: true,
30942
+ monitorKey: key
30943
+ });
30944
+ if (replacementWarning.length) lines.push("", ...replacementWarning);
30838
30945
  const guidance = asRecord2(payload.setup_guidance);
30839
30946
  if (guidance) {
30840
30947
  const callbackUrl = asString(guidance.callback_url);
@@ -30886,6 +30993,11 @@ function renderMonitorDeployPlan(payload) {
30886
30993
  if (message) lines.push(` - ${path ? `${path}: ` : ""}${message}`);
30887
30994
  }
30888
30995
  }
30996
+ const replacementWarning = renderDeployReplacementWarning({
30997
+ payload,
30998
+ completed: false
30999
+ });
31000
+ if (replacementWarning.length) lines.push("", ...replacementWarning);
30889
31001
  const estimate = asRecord2(payload.deploy_cost_estimate);
30890
31002
  const credits = estimate ? asFiniteNumber(estimate.credits) : void 0;
30891
31003
  if (credits !== void 0) {
@@ -31252,10 +31364,17 @@ async function handleMonitorsGet(key, options) {
31252
31364
  }
31253
31365
  async function handleMonitorsTest(key, payload, options) {
31254
31366
  const explicitPayload = parseJsonObjectArg(payload, "<payload>");
31255
- const result = await new DeeplineClient().monitors.test(key, explicitPayload);
31256
- const text = `Webhook test for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
31257
- persisted rows: ${asFiniteNumber(result.persisted_rows) ?? 0}
31258
- bound Plays dispatched: ${asFiniteNumber(result.dispatched_bound_plays) ?? 0}
31367
+ const result = await new DeeplineClient().monitors.test(
31368
+ key,
31369
+ explicitPayload,
31370
+ {
31371
+ validationOnly: options.dispatch !== true
31372
+ }
31373
+ );
31374
+ const dispatch = options.dispatch === true;
31375
+ const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
31376
+ ` + (dispatch ? " mode: dispatch (writes rows and may dispatch bound Plays)\n" : " mode: validation_only (no rows written, credits spent, or Plays dispatched)\n") + `${dispatch ? "persisted" : "would persist"} rows: ${asFiniteNumber(result.persisted_rows) ?? 0}
31377
+ ${dispatch ? "dispatched" : "would dispatch"} bound Plays: ${asFiniteNumber(result.dispatched_bound_plays) ?? 0}
31259
31378
  `;
31260
31379
  printCommandEnvelope(result, { json: options.json, text });
31261
31380
  }
@@ -31467,12 +31586,18 @@ Examples:
31467
31586
  withJsonOption(
31468
31587
  monitors.command("test <key> <payload>").description(
31469
31588
  "Send an explicit payload through a monitor\u2019s webhook ingestion path."
31589
+ ).option(
31590
+ "--dispatch",
31591
+ "Inject the test event through normal ingestion (writes rows and may dispatch bound Plays)"
31470
31592
  ).addHelpText(
31471
31593
  "after",
31472
31594
  `
31473
31595
  Notes:
31474
31596
  <payload> must be an explicit JSON object. The command uses the deployed
31475
- monitor\u2019s real validation, persistence, and inline Play dispatch path; it does
31597
+ monitor\u2019s real binding and payload validation, but is a side-effect-free
31598
+ diagnostic: it does not persist rows, spend credits, dispatch Plays, or alter
31599
+ monitor state. Pass --dispatch only when you deliberately need the historic
31600
+ full-ingestion test event; it can write rows and trigger bound Plays. It does
31476
31601
  not synthesize a provider event or accept an omitted payload.
31477
31602
 
31478
31603
  Examples:
@@ -31493,7 +31618,9 @@ Notes:
31493
31618
  via --file <path>, or
31494
31619
  from stdin with --file -. Does not deploy or spend credits.
31495
31620
  For Deepline Native Company Radar monitors, check validates persona-filter enums and the
31496
- job_titles Boolean-expression grammar locally. Inspect the exact schema with
31621
+ job_titles Boolean-expression grammar locally (parentheses are unsupported;
31622
+ NOT > AND > OR).
31623
+ Inspect the exact schema with
31497
31624
  \`deepline monitors available deepline_native.company_radar --json\`.
31498
31625
 
31499
31626
  Examples:
@@ -31517,6 +31644,9 @@ Notes:
31517
31644
  --dry-run validates the definition and shows the plan (deploy cost in Deepline
31518
31645
  credits when the server reports it, plus any existing monitors that may
31519
31646
  already cover this scope) WITHOUT deploying. Exits 0 when valid, 7 when not.
31647
+ Deploy is a full desired definition for its key: omitting a previously stored
31648
+ field removes it and can replace the upstream resource. Use \`monitors update\`
31649
+ for a patch-style change.
31520
31650
 
31521
31651
  Examples:
31522
31652
  deepline monitors deploy '{"key":"job-openings","tool":"deepline_native.company_radar","payload":{"domain":"stripe.com","radar_type":"company_job_openings"}}'
@@ -876,6 +876,16 @@ declare class ProviderTransientError extends ToolExecutionError {
876
876
  declare const SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS: readonly [1, 2, 3];
877
877
  type PlayAuthoringContractEdition = (typeof SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS)[number];
878
878
  type PlaySqlListenerOperation = 'INSERT' | 'UPDATE' | 'DELETE';
879
+ type PlayStandardWebhookHeaderFamily = 'standard' | 'svix';
880
+ type PlayStandardWebhookAuth = {
881
+ type: 'standard-webhooks';
882
+ /** `webhook-*` for Standard Webhooks, `svix-*` for Svix senders. */
883
+ headerFamily: PlayStandardWebhookHeaderFamily;
884
+ /** Deepline Secret names used for ordinary operation and rotation overlap. */
885
+ signingSecrets: string[];
886
+ /** Replay-protection window. Omitted means the Standard Webhooks 5-minute default. */
887
+ toleranceSeconds?: number;
888
+ };
879
889
  type PlaySqlListenerFilterScalar = string | number | boolean | null;
880
890
  type PlaySqlListenerFilterOperator = {
881
891
  eq?: PlaySqlListenerFilterScalar;
@@ -928,6 +938,7 @@ type PlayAuthoringAstBindings = {
928
938
  header?: string;
929
939
  secretEnv: string;
930
940
  };
941
+ auth?: PlayStandardWebhookAuth;
931
942
  };
932
943
  cron?: {
933
944
  schedule: string;
@@ -958,6 +969,7 @@ type PlayAuthoringBindings = {
958
969
  header?: string;
959
970
  secretEnv: string;
960
971
  };
972
+ auth?: PlayStandardWebhookAuth;
961
973
  };
962
974
  cron?: {
963
975
  schedule: string;
@@ -1362,6 +1374,78 @@ declare const PLAY_AUTHORING_FIELD_REGISTRY: {
1362
1374
  readonly description: "HTTP header containing the webhook signature.";
1363
1375
  readonly errorMessage: "bindings.webhook.hmac.header must be a non-empty static string.";
1364
1376
  };
1377
+ readonly 'bindings.webhook.auth.type': {
1378
+ readonly schema: _sinclair_typebox.TLiteral<"standard-webhooks">;
1379
+ readonly fixtures: {
1380
+ readonly valid: "standard-webhooks";
1381
+ readonly invalid: "svix";
1382
+ readonly absent: undefined;
1383
+ readonly unresolved: {
1384
+ readonly expression: "type";
1385
+ };
1386
+ readonly edition1: undefined;
1387
+ };
1388
+ readonly referenceType: "'standard-webhooks'";
1389
+ readonly required: false;
1390
+ readonly resolution: "static-required";
1391
+ readonly issueCode: "play_authoring_standard_webhooks_invalid";
1392
+ readonly description: "Uses the Standard Webhooks v1 symmetric signing scheme.";
1393
+ readonly errorMessage: "bindings.webhook.auth.type must be the static literal \"standard-webhooks\".";
1394
+ };
1395
+ readonly 'bindings.webhook.auth.headerFamily': {
1396
+ readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"standard">, _sinclair_typebox.TLiteral<"svix">]>;
1397
+ readonly fixtures: {
1398
+ readonly valid: "svix";
1399
+ readonly invalid: "webhook";
1400
+ readonly absent: undefined;
1401
+ readonly unresolved: {
1402
+ readonly expression: "headerFamily";
1403
+ };
1404
+ readonly edition1: undefined;
1405
+ };
1406
+ readonly referenceType: "'standard' | 'svix'";
1407
+ readonly required: false;
1408
+ readonly resolution: "static-required";
1409
+ readonly issueCode: "play_authoring_standard_webhooks_invalid";
1410
+ readonly description: "Header namespace expected from the webhook provider.";
1411
+ readonly errorMessage: "bindings.webhook.auth.headerFamily must be the static literal \"standard\" or \"svix\".";
1412
+ };
1413
+ readonly 'bindings.webhook.auth.signingSecrets[]': {
1414
+ readonly schema: _sinclair_typebox.TString;
1415
+ readonly fixtures: {
1416
+ readonly valid: "VECTOR_WEBHOOK_SECRET";
1417
+ readonly invalid: "vector_webhook_secret";
1418
+ readonly absent: undefined;
1419
+ readonly unresolved: {
1420
+ readonly expression: "secret";
1421
+ };
1422
+ readonly edition1: undefined;
1423
+ };
1424
+ readonly referenceType: "string";
1425
+ readonly required: false;
1426
+ readonly resolution: "static-required";
1427
+ readonly issueCode: "play_authoring_standard_webhooks_invalid";
1428
+ readonly description: "Deepline Secret name used to verify Standard Webhooks.";
1429
+ readonly errorMessage: "bindings.webhook.auth.signingSecrets entries must be uppercase Deepline Secret names beginning with a letter.";
1430
+ };
1431
+ readonly 'bindings.webhook.auth.toleranceSeconds': {
1432
+ readonly schema: _sinclair_typebox.TInteger;
1433
+ readonly fixtures: {
1434
+ readonly valid: 300;
1435
+ readonly invalid: 0;
1436
+ readonly absent: undefined;
1437
+ readonly unresolved: {
1438
+ readonly expression: "toleranceSeconds";
1439
+ };
1440
+ readonly edition1: undefined;
1441
+ };
1442
+ readonly referenceType: "number";
1443
+ readonly required: false;
1444
+ readonly resolution: "static-required";
1445
+ readonly issueCode: "play_authoring_standard_webhooks_invalid";
1446
+ readonly description: "Accepted delivery timestamp skew in seconds, from 1 through 3600.";
1447
+ readonly errorMessage: "bindings.webhook.auth.toleranceSeconds must be a static whole number from 1 through 3600.";
1448
+ };
1365
1449
  readonly 'bindings.cron.schedule': {
1366
1450
  readonly schema: _sinclair_typebox.TString;
1367
1451
  readonly fixtures: {
@@ -876,6 +876,16 @@ declare class ProviderTransientError extends ToolExecutionError {
876
876
  declare const SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS: readonly [1, 2, 3];
877
877
  type PlayAuthoringContractEdition = (typeof SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS)[number];
878
878
  type PlaySqlListenerOperation = 'INSERT' | 'UPDATE' | 'DELETE';
879
+ type PlayStandardWebhookHeaderFamily = 'standard' | 'svix';
880
+ type PlayStandardWebhookAuth = {
881
+ type: 'standard-webhooks';
882
+ /** `webhook-*` for Standard Webhooks, `svix-*` for Svix senders. */
883
+ headerFamily: PlayStandardWebhookHeaderFamily;
884
+ /** Deepline Secret names used for ordinary operation and rotation overlap. */
885
+ signingSecrets: string[];
886
+ /** Replay-protection window. Omitted means the Standard Webhooks 5-minute default. */
887
+ toleranceSeconds?: number;
888
+ };
879
889
  type PlaySqlListenerFilterScalar = string | number | boolean | null;
880
890
  type PlaySqlListenerFilterOperator = {
881
891
  eq?: PlaySqlListenerFilterScalar;
@@ -928,6 +938,7 @@ type PlayAuthoringAstBindings = {
928
938
  header?: string;
929
939
  secretEnv: string;
930
940
  };
941
+ auth?: PlayStandardWebhookAuth;
931
942
  };
932
943
  cron?: {
933
944
  schedule: string;
@@ -958,6 +969,7 @@ type PlayAuthoringBindings = {
958
969
  header?: string;
959
970
  secretEnv: string;
960
971
  };
972
+ auth?: PlayStandardWebhookAuth;
961
973
  };
962
974
  cron?: {
963
975
  schedule: string;
@@ -1362,6 +1374,78 @@ declare const PLAY_AUTHORING_FIELD_REGISTRY: {
1362
1374
  readonly description: "HTTP header containing the webhook signature.";
1363
1375
  readonly errorMessage: "bindings.webhook.hmac.header must be a non-empty static string.";
1364
1376
  };
1377
+ readonly 'bindings.webhook.auth.type': {
1378
+ readonly schema: _sinclair_typebox.TLiteral<"standard-webhooks">;
1379
+ readonly fixtures: {
1380
+ readonly valid: "standard-webhooks";
1381
+ readonly invalid: "svix";
1382
+ readonly absent: undefined;
1383
+ readonly unresolved: {
1384
+ readonly expression: "type";
1385
+ };
1386
+ readonly edition1: undefined;
1387
+ };
1388
+ readonly referenceType: "'standard-webhooks'";
1389
+ readonly required: false;
1390
+ readonly resolution: "static-required";
1391
+ readonly issueCode: "play_authoring_standard_webhooks_invalid";
1392
+ readonly description: "Uses the Standard Webhooks v1 symmetric signing scheme.";
1393
+ readonly errorMessage: "bindings.webhook.auth.type must be the static literal \"standard-webhooks\".";
1394
+ };
1395
+ readonly 'bindings.webhook.auth.headerFamily': {
1396
+ readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"standard">, _sinclair_typebox.TLiteral<"svix">]>;
1397
+ readonly fixtures: {
1398
+ readonly valid: "svix";
1399
+ readonly invalid: "webhook";
1400
+ readonly absent: undefined;
1401
+ readonly unresolved: {
1402
+ readonly expression: "headerFamily";
1403
+ };
1404
+ readonly edition1: undefined;
1405
+ };
1406
+ readonly referenceType: "'standard' | 'svix'";
1407
+ readonly required: false;
1408
+ readonly resolution: "static-required";
1409
+ readonly issueCode: "play_authoring_standard_webhooks_invalid";
1410
+ readonly description: "Header namespace expected from the webhook provider.";
1411
+ readonly errorMessage: "bindings.webhook.auth.headerFamily must be the static literal \"standard\" or \"svix\".";
1412
+ };
1413
+ readonly 'bindings.webhook.auth.signingSecrets[]': {
1414
+ readonly schema: _sinclair_typebox.TString;
1415
+ readonly fixtures: {
1416
+ readonly valid: "VECTOR_WEBHOOK_SECRET";
1417
+ readonly invalid: "vector_webhook_secret";
1418
+ readonly absent: undefined;
1419
+ readonly unresolved: {
1420
+ readonly expression: "secret";
1421
+ };
1422
+ readonly edition1: undefined;
1423
+ };
1424
+ readonly referenceType: "string";
1425
+ readonly required: false;
1426
+ readonly resolution: "static-required";
1427
+ readonly issueCode: "play_authoring_standard_webhooks_invalid";
1428
+ readonly description: "Deepline Secret name used to verify Standard Webhooks.";
1429
+ readonly errorMessage: "bindings.webhook.auth.signingSecrets entries must be uppercase Deepline Secret names beginning with a letter.";
1430
+ };
1431
+ readonly 'bindings.webhook.auth.toleranceSeconds': {
1432
+ readonly schema: _sinclair_typebox.TInteger;
1433
+ readonly fixtures: {
1434
+ readonly valid: 300;
1435
+ readonly invalid: 0;
1436
+ readonly absent: undefined;
1437
+ readonly unresolved: {
1438
+ readonly expression: "toleranceSeconds";
1439
+ };
1440
+ readonly edition1: undefined;
1441
+ };
1442
+ readonly referenceType: "number";
1443
+ readonly required: false;
1444
+ readonly resolution: "static-required";
1445
+ readonly issueCode: "play_authoring_standard_webhooks_invalid";
1446
+ readonly description: "Accepted delivery timestamp skew in seconds, from 1 through 3600.";
1447
+ readonly errorMessage: "bindings.webhook.auth.toleranceSeconds must be a static whole number from 1 through 3600.";
1448
+ };
1365
1449
  readonly 'bindings.cron.schedule': {
1366
1450
  readonly schema: _sinclair_typebox.TString;
1367
1451
  readonly fixtures: {
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q as ToolExecuteResult, r as PlayAuthoringReferenceLike, s as PlayReturnObject$1, t as PlayAuthoringDefineConfig, u as PlayAuthoringDefinedPlay, v as PlayAuthoringFetchOptions, w as PlayAuthoringFileInput, x as PlayAuthoringBindings, y as PlayAuthoringCallExecution, z as PlayAuthoringCallOptions, A as PlayAuthoringFetchResponse, B as PlayAuthoringInputContract, C as PlayAuthoringStepProgramStep, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest } from './compiler-manifest-CGZadg-v.mjs';
2
- export { O as DEEPLINE_EXTRACTOR_TARGETS, Q as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, R as DeeplineEmailStatusGetterValue, S as DeeplineExtractorTarget, U as DeeplineGetterValue, V as DeeplineGetterValueMap, W as JOB_CHANGE_STATUS_VALUES, X as JobChangeStatus, Y as PHONE_STATUS_VALUES, Z as PhoneStatus, _ as PlayDataset, $ as PlayDatasetInput, a0 as PreviousCell, a1 as ProviderTransientError, a2 as ProviderTransientErrorCategory, a3 as ToolExecutionErrorCategory, a4 as ToolExecutionErrorOrigin, a5 as ToolExecutionFailureV1, a6 as ToolExecutionNetworkKind, a7 as ToolExecutionNetworkScope, a8 as isDeeplineExtractorTarget } from './compiler-manifest-CGZadg-v.mjs';
1
+ import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q as ToolExecuteResult, r as PlayAuthoringReferenceLike, s as PlayReturnObject$1, t as PlayAuthoringDefineConfig, u as PlayAuthoringDefinedPlay, v as PlayAuthoringFetchOptions, w as PlayAuthoringFileInput, x as PlayAuthoringBindings, y as PlayAuthoringCallExecution, z as PlayAuthoringCallOptions, A as PlayAuthoringFetchResponse, B as PlayAuthoringInputContract, C as PlayAuthoringStepProgramStep, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest } from './compiler-manifest-BPA3r-VG.mjs';
2
+ export { O as DEEPLINE_EXTRACTOR_TARGETS, Q as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, R as DeeplineEmailStatusGetterValue, S as DeeplineExtractorTarget, U as DeeplineGetterValue, V as DeeplineGetterValueMap, W as JOB_CHANGE_STATUS_VALUES, X as JobChangeStatus, Y as PHONE_STATUS_VALUES, Z as PhoneStatus, _ as PlayDataset, $ as PlayDatasetInput, a0 as PreviousCell, a1 as ProviderTransientError, a2 as ProviderTransientErrorCategory, a3 as ToolExecutionErrorCategory, a4 as ToolExecutionErrorOrigin, a5 as ToolExecutionFailureV1, a6 as ToolExecutionNetworkKind, a7 as ToolExecutionNetworkScope, a8 as isDeeplineExtractorTarget } from './compiler-manifest-BPA3r-VG.mjs';
3
3
  import '@sinclair/typebox';
4
4
 
5
5
  declare const FIXTURE_BEHAVIOR_VERSION: 1;
@@ -2187,8 +2187,13 @@ type MonitorsNamespace = {
2187
2187
  list: (options?: MonitorsListOptions) => Promise<MonitorsListResult>;
2188
2188
  /** Fetch one deployed monitor by public key (without dependents). */
2189
2189
  get: (key: string) => Promise<MonitorDetail>;
2190
- /** Send an explicit payload through the deployed monitor's normal webhook path. */
2191
- test: (key: string, payload: Record<string, unknown>) => Promise<MonitorTestResult>;
2190
+ /**
2191
+ * Test a deployed monitor. `validationOnly` safely verifies the callback
2192
+ * envelope; omitted options preserve the historic full-ingestion behavior.
2193
+ */
2194
+ test: (key: string, payload: Record<string, unknown>, options?: {
2195
+ validationOnly?: boolean;
2196
+ }) => Promise<MonitorTestResult>;
2192
2197
  validate: (key: string) => Promise<MonitorValidateResult>;
2193
2198
  /** List the published plays depending on one monitor's output streams. */
2194
2199
  dependents: (key: string) => Promise<MonitorDependents>;
@@ -3520,7 +3525,9 @@ declare class DeeplineClient {
3520
3525
  listMonitors(options?: MonitorsListOptions): Promise<MonitorsListResult>;
3521
3526
  /** Fetch one deployed monitor by public key. Prefer `client.monitors.get(...)`. */
3522
3527
  getMonitor(key: string): Promise<MonitorDetail>;
3523
- testMonitorWebhook(key: string, payload: Record<string, unknown>): Promise<MonitorTestResult>;
3528
+ testMonitorWebhook(key: string, payload: Record<string, unknown>, options?: {
3529
+ validationOnly?: boolean;
3530
+ }): Promise<MonitorTestResult>;
3524
3531
  setupMonitor(tool: string, payload: Record<string, unknown>): Promise<Record<string, unknown>>;
3525
3532
  validateMonitor(key: string): Promise<MonitorValidateResult>;
3526
3533
  /** Published plays depending on one monitor. Prefer `client.monitors.dependents(...)`. */
@@ -3720,7 +3727,8 @@ type PlayFetchResponse = PlayAuthoringFetchResponse;
3720
3727
  *
3721
3728
  * A play can be triggered three ways, declared as the third argument to
3722
3729
  * {@link definePlay}:
3723
- * - `webhook` — an inbound HTTP call (with optional HMAC signature verification);
3730
+ * - `webhook` — an inbound HTTP call (with optional legacy HMAC or Standard
3731
+ * Webhooks signature verification);
3724
3732
  * - `cron` — a schedule; or
3725
3733
  * - `sqlListeners` — a **monitor**: the play runs whenever a monitor writes a new
3726
3734
  * row to its output stream. This is how you build a play "on top of" a monitor
@@ -3742,6 +3750,19 @@ type PlayFetchResponse = PlayAuthoringFetchResponse;
3742
3750
  * });
3743
3751
  * ```
3744
3752
  *
3753
+ * @example Svix / Standard Webhooks verification with Deepline Secrets
3754
+ * ```typescript
3755
+ * definePlay('visitor-webhook', handler, {
3756
+ * webhook: {
3757
+ * auth: {
3758
+ * type: 'standard-webhooks',
3759
+ * headerFamily: 'svix',
3760
+ * signingSecrets: ['VECTOR_WEBHOOK_SECRET'],
3761
+ * },
3762
+ * },
3763
+ * });
3764
+ * ```
3765
+ *
3745
3766
  * @example Cron schedule
3746
3767
  * ```typescript
3747
3768
  * definePlay('nightly-sync', handler, {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q as ToolExecuteResult, r as PlayAuthoringReferenceLike, s as PlayReturnObject$1, t as PlayAuthoringDefineConfig, u as PlayAuthoringDefinedPlay, v as PlayAuthoringFetchOptions, w as PlayAuthoringFileInput, x as PlayAuthoringBindings, y as PlayAuthoringCallExecution, z as PlayAuthoringCallOptions, A as PlayAuthoringFetchResponse, B as PlayAuthoringInputContract, C as PlayAuthoringStepProgramStep, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest } from './compiler-manifest-CGZadg-v.js';
2
- export { O as DEEPLINE_EXTRACTOR_TARGETS, Q as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, R as DeeplineEmailStatusGetterValue, S as DeeplineExtractorTarget, U as DeeplineGetterValue, V as DeeplineGetterValueMap, W as JOB_CHANGE_STATUS_VALUES, X as JobChangeStatus, Y as PHONE_STATUS_VALUES, Z as PhoneStatus, _ as PlayDataset, $ as PlayDatasetInput, a0 as PreviousCell, a1 as ProviderTransientError, a2 as ProviderTransientErrorCategory, a3 as ToolExecutionErrorCategory, a4 as ToolExecutionErrorOrigin, a5 as ToolExecutionFailureV1, a6 as ToolExecutionNetworkKind, a7 as ToolExecutionNetworkScope, a8 as isDeeplineExtractorTarget } from './compiler-manifest-CGZadg-v.js';
1
+ import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q as ToolExecuteResult, r as PlayAuthoringReferenceLike, s as PlayReturnObject$1, t as PlayAuthoringDefineConfig, u as PlayAuthoringDefinedPlay, v as PlayAuthoringFetchOptions, w as PlayAuthoringFileInput, x as PlayAuthoringBindings, y as PlayAuthoringCallExecution, z as PlayAuthoringCallOptions, A as PlayAuthoringFetchResponse, B as PlayAuthoringInputContract, C as PlayAuthoringStepProgramStep, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest } from './compiler-manifest-BPA3r-VG.js';
2
+ export { O as DEEPLINE_EXTRACTOR_TARGETS, Q as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, R as DeeplineEmailStatusGetterValue, S as DeeplineExtractorTarget, U as DeeplineGetterValue, V as DeeplineGetterValueMap, W as JOB_CHANGE_STATUS_VALUES, X as JobChangeStatus, Y as PHONE_STATUS_VALUES, Z as PhoneStatus, _ as PlayDataset, $ as PlayDatasetInput, a0 as PreviousCell, a1 as ProviderTransientError, a2 as ProviderTransientErrorCategory, a3 as ToolExecutionErrorCategory, a4 as ToolExecutionErrorOrigin, a5 as ToolExecutionFailureV1, a6 as ToolExecutionNetworkKind, a7 as ToolExecutionNetworkScope, a8 as isDeeplineExtractorTarget } from './compiler-manifest-BPA3r-VG.js';
3
3
  import '@sinclair/typebox';
4
4
 
5
5
  declare const FIXTURE_BEHAVIOR_VERSION: 1;
@@ -2187,8 +2187,13 @@ type MonitorsNamespace = {
2187
2187
  list: (options?: MonitorsListOptions) => Promise<MonitorsListResult>;
2188
2188
  /** Fetch one deployed monitor by public key (without dependents). */
2189
2189
  get: (key: string) => Promise<MonitorDetail>;
2190
- /** Send an explicit payload through the deployed monitor's normal webhook path. */
2191
- test: (key: string, payload: Record<string, unknown>) => Promise<MonitorTestResult>;
2190
+ /**
2191
+ * Test a deployed monitor. `validationOnly` safely verifies the callback
2192
+ * envelope; omitted options preserve the historic full-ingestion behavior.
2193
+ */
2194
+ test: (key: string, payload: Record<string, unknown>, options?: {
2195
+ validationOnly?: boolean;
2196
+ }) => Promise<MonitorTestResult>;
2192
2197
  validate: (key: string) => Promise<MonitorValidateResult>;
2193
2198
  /** List the published plays depending on one monitor's output streams. */
2194
2199
  dependents: (key: string) => Promise<MonitorDependents>;
@@ -3520,7 +3525,9 @@ declare class DeeplineClient {
3520
3525
  listMonitors(options?: MonitorsListOptions): Promise<MonitorsListResult>;
3521
3526
  /** Fetch one deployed monitor by public key. Prefer `client.monitors.get(...)`. */
3522
3527
  getMonitor(key: string): Promise<MonitorDetail>;
3523
- testMonitorWebhook(key: string, payload: Record<string, unknown>): Promise<MonitorTestResult>;
3528
+ testMonitorWebhook(key: string, payload: Record<string, unknown>, options?: {
3529
+ validationOnly?: boolean;
3530
+ }): Promise<MonitorTestResult>;
3524
3531
  setupMonitor(tool: string, payload: Record<string, unknown>): Promise<Record<string, unknown>>;
3525
3532
  validateMonitor(key: string): Promise<MonitorValidateResult>;
3526
3533
  /** Published plays depending on one monitor. Prefer `client.monitors.dependents(...)`. */
@@ -3720,7 +3727,8 @@ type PlayFetchResponse = PlayAuthoringFetchResponse;
3720
3727
  *
3721
3728
  * A play can be triggered three ways, declared as the third argument to
3722
3729
  * {@link definePlay}:
3723
- * - `webhook` — an inbound HTTP call (with optional HMAC signature verification);
3730
+ * - `webhook` — an inbound HTTP call (with optional legacy HMAC or Standard
3731
+ * Webhooks signature verification);
3724
3732
  * - `cron` — a schedule; or
3725
3733
  * - `sqlListeners` — a **monitor**: the play runs whenever a monitor writes a new
3726
3734
  * row to its output stream. This is how you build a play "on top of" a monitor
@@ -3742,6 +3750,19 @@ type PlayFetchResponse = PlayAuthoringFetchResponse;
3742
3750
  * });
3743
3751
  * ```
3744
3752
  *
3753
+ * @example Svix / Standard Webhooks verification with Deepline Secrets
3754
+ * ```typescript
3755
+ * definePlay('visitor-webhook', handler, {
3756
+ * webhook: {
3757
+ * auth: {
3758
+ * type: 'standard-webhooks',
3759
+ * headerFamily: 'svix',
3760
+ * signingSecrets: ['VECTOR_WEBHOOK_SECRET'],
3761
+ * },
3762
+ * },
3763
+ * });
3764
+ * ```
3765
+ *
3745
3766
  * @example Cron schedule
3746
3767
  * ```typescript
3747
3768
  * definePlay('nightly-sync', handler, {
package/dist/index.js CHANGED
@@ -763,7 +763,7 @@ var SDK_RELEASE = {
763
763
  // 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
764
764
  // exposed storage-dependent synchronous access. This deliberate minor
765
765
  // release keeps lazy paging semantics independent of row residency.
766
- version: "0.2.47",
766
+ version: "0.2.49",
767
767
  contracts: {
768
768
  api: {
769
769
  name: "sdk-http-api",
@@ -3598,7 +3598,7 @@ var DeeplineClient = class {
3598
3598
  deploy: (definition, options2) => this.deployMonitor(definition, options2),
3599
3599
  list: (options2) => this.listMonitors(options2),
3600
3600
  get: (key) => this.getMonitor(key),
3601
- test: (key, payload) => this.testMonitorWebhook(key, payload),
3601
+ test: (key, payload, options2) => this.testMonitorWebhook(key, payload, options2),
3602
3602
  validate: (key) => this.validateMonitor(key),
3603
3603
  dependents: (key) => this.getMonitorDependents(key),
3604
3604
  update: (key, patch) => this.updateMonitor(key, patch),
@@ -5767,10 +5767,16 @@ var DeeplineClient = class {
5767
5767
  { method: "GET" }
5768
5768
  );
5769
5769
  }
5770
- async testMonitorWebhook(key, payload) {
5770
+ async testMonitorWebhook(key, payload, options) {
5771
5771
  return this.http.request(
5772
5772
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/test`,
5773
- { method: "POST", body: { payload } }
5773
+ {
5774
+ method: "POST",
5775
+ body: {
5776
+ payload,
5777
+ ...options?.validationOnly ? { mode: "validation_only" } : {}
5778
+ }
5779
+ }
5774
5780
  );
5775
5781
  }
5776
5782
  async setupMonitor(tool, payload) {