@cross-deck/node 1.12.1 → 1.14.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/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AliasIdentityInput, a as AliasResult, b as AuditDecision, c as AuditEntry, B as BlockVerdict, d as Breadcrumb, e as BreadcrumbCategory, f as BreadcrumbLevel, C as CROSSDECK_API_VERSION, g as CapturedError, h as Contract, i as ContractAppliesTo, j as ContractFailureInput, k as ContractPillar, l as ContractStatus, m as ContractTestRef, n as CrossdeckAuthenticationError, o as CrossdeckConfigurationError, p as CrossdeckContracts, q as CrossdeckError, r as CrossdeckErrorPayload, s as CrossdeckErrorType, t as CrossdeckInternalError, u as CrossdeckNetworkError, v as CrossdeckPermissionError, w as CrossdeckRateLimitError, x as CrossdeckServer, y as CrossdeckServerOptions, z as CrossdeckValidationError, D as DEFAULT_BASE_URL, E as DEFAULT_TIMEOUT_MS, F as Diagnostics, G as EntitlementCacheOptions, H as EntitlementMutationResult, I as EntitlementStore, J as EntitlementsListResponse, K as EntitlementsListener, L as Environment, M as ErrorCaptureConfig, N as ErrorLevel, O as EventProperties, P as ForgetResult, Q as GateInput, R as GateVerdict, S as GrantDuration, T as GrantEntitlementInput, U as GroupMembership, V as HeartbeatResponse, W as HttpRequestInfo, X as HttpResponseInfo, Y as HttpRetriesConfig, Z as IdentifyOptions, _ as IdentityHints, $ as IngestOptions, a0 as IngestResponse, a1 as OwnerStatusInput, a2 as PublicEntitlement, a3 as PurchaseResult, a4 as RequestOptions, a5 as ResolveInput, a6 as ResolveResult, a7 as RevokeEntitlementInput, a8 as RuntimeHost, a9 as RuntimeInfo, aa as ServerEvent, ab as StackFrame, ac as StoredEntitlements, ad as SyncPurchaseInput, ae as makeCrossdeckError } from './crossdeck-server-CuTGwrwx.mjs';
1
+ export { A as AliasIdentityInput, a as AliasResult, b as AuditDecision, c as AuditEntry, B as BlockVerdict, d as Breadcrumb, e as BreadcrumbCategory, f as BreadcrumbLevel, C as CROSSDECK_API_VERSION, g as CampaignLinkInput, h as CampaignLinkResult, i as CapturedError, j as Contract, k as ContractAppliesTo, l as ContractFailureInput, m as ContractPillar, n as ContractStatus, o as ContractTestRef, p as CrossdeckAuthenticationError, q as CrossdeckConfigurationError, r as CrossdeckContracts, s as CrossdeckError, t as CrossdeckErrorPayload, u as CrossdeckErrorType, v as CrossdeckInternalError, w as CrossdeckNetworkError, x as CrossdeckPermissionError, y as CrossdeckRateLimitError, z as CrossdeckServer, D as CrossdeckServerOptions, E as CrossdeckValidationError, F as DEFAULT_BASE_URL, G as DEFAULT_TIMEOUT_MS, H as Diagnostics, I as EntitlementCacheOptions, J as EntitlementMutationResult, K as EntitlementStore, L as EntitlementsListResponse, M as EntitlementsListener, N as Environment, O as ErrorCaptureConfig, P as ErrorLevel, Q as EventProperties, R as ForgetResult, S as GateInput, T as GateVerdict, U as GrantDuration, V as GrantEntitlementInput, W as GroupMembership, X as HeartbeatResponse, Y as HttpRequestInfo, Z as HttpResponseInfo, _ as HttpRetriesConfig, $ as IdentifyOptions, a0 as IdentityHints, a1 as IngestOptions, a2 as IngestResponse, a3 as OwnerStatusInput, a4 as PublicEntitlement, a5 as PurchaseResult, a6 as RequestOptions, a7 as ResolveInput, a8 as ResolveResult, a9 as RevokeEntitlementInput, aa as RuntimeHost, ab as RuntimeInfo, ac as ServerEvent, ad as StackFrame, ae as StoredEntitlements, af as SyncPurchaseInput, ag as makeCrossdeckError } from './crossdeck-server-NL1p6hlR.mjs';
2
2
  import 'node:events';
3
3
 
4
4
  /**
@@ -17,7 +17,7 @@ import 'node:events';
17
17
  *
18
18
  * Do NOT edit by hand — `node scripts/sync-sdk-versions.mjs`.
19
19
  */
20
- declare const SDK_VERSION = "1.12.1";
20
+ declare const SDK_VERSION = "1.14.0";
21
21
  declare const SDK_NAME = "@cross-deck/node";
22
22
 
23
23
  /**
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AliasIdentityInput, a as AliasResult, b as AuditDecision, c as AuditEntry, B as BlockVerdict, d as Breadcrumb, e as BreadcrumbCategory, f as BreadcrumbLevel, C as CROSSDECK_API_VERSION, g as CapturedError, h as Contract, i as ContractAppliesTo, j as ContractFailureInput, k as ContractPillar, l as ContractStatus, m as ContractTestRef, n as CrossdeckAuthenticationError, o as CrossdeckConfigurationError, p as CrossdeckContracts, q as CrossdeckError, r as CrossdeckErrorPayload, s as CrossdeckErrorType, t as CrossdeckInternalError, u as CrossdeckNetworkError, v as CrossdeckPermissionError, w as CrossdeckRateLimitError, x as CrossdeckServer, y as CrossdeckServerOptions, z as CrossdeckValidationError, D as DEFAULT_BASE_URL, E as DEFAULT_TIMEOUT_MS, F as Diagnostics, G as EntitlementCacheOptions, H as EntitlementMutationResult, I as EntitlementStore, J as EntitlementsListResponse, K as EntitlementsListener, L as Environment, M as ErrorCaptureConfig, N as ErrorLevel, O as EventProperties, P as ForgetResult, Q as GateInput, R as GateVerdict, S as GrantDuration, T as GrantEntitlementInput, U as GroupMembership, V as HeartbeatResponse, W as HttpRequestInfo, X as HttpResponseInfo, Y as HttpRetriesConfig, Z as IdentifyOptions, _ as IdentityHints, $ as IngestOptions, a0 as IngestResponse, a1 as OwnerStatusInput, a2 as PublicEntitlement, a3 as PurchaseResult, a4 as RequestOptions, a5 as ResolveInput, a6 as ResolveResult, a7 as RevokeEntitlementInput, a8 as RuntimeHost, a9 as RuntimeInfo, aa as ServerEvent, ab as StackFrame, ac as StoredEntitlements, ad as SyncPurchaseInput, ae as makeCrossdeckError } from './crossdeck-server-CuTGwrwx.js';
1
+ export { A as AliasIdentityInput, a as AliasResult, b as AuditDecision, c as AuditEntry, B as BlockVerdict, d as Breadcrumb, e as BreadcrumbCategory, f as BreadcrumbLevel, C as CROSSDECK_API_VERSION, g as CampaignLinkInput, h as CampaignLinkResult, i as CapturedError, j as Contract, k as ContractAppliesTo, l as ContractFailureInput, m as ContractPillar, n as ContractStatus, o as ContractTestRef, p as CrossdeckAuthenticationError, q as CrossdeckConfigurationError, r as CrossdeckContracts, s as CrossdeckError, t as CrossdeckErrorPayload, u as CrossdeckErrorType, v as CrossdeckInternalError, w as CrossdeckNetworkError, x as CrossdeckPermissionError, y as CrossdeckRateLimitError, z as CrossdeckServer, D as CrossdeckServerOptions, E as CrossdeckValidationError, F as DEFAULT_BASE_URL, G as DEFAULT_TIMEOUT_MS, H as Diagnostics, I as EntitlementCacheOptions, J as EntitlementMutationResult, K as EntitlementStore, L as EntitlementsListResponse, M as EntitlementsListener, N as Environment, O as ErrorCaptureConfig, P as ErrorLevel, Q as EventProperties, R as ForgetResult, S as GateInput, T as GateVerdict, U as GrantDuration, V as GrantEntitlementInput, W as GroupMembership, X as HeartbeatResponse, Y as HttpRequestInfo, Z as HttpResponseInfo, _ as HttpRetriesConfig, $ as IdentifyOptions, a0 as IdentityHints, a1 as IngestOptions, a2 as IngestResponse, a3 as OwnerStatusInput, a4 as PublicEntitlement, a5 as PurchaseResult, a6 as RequestOptions, a7 as ResolveInput, a8 as ResolveResult, a9 as RevokeEntitlementInput, aa as RuntimeHost, ab as RuntimeInfo, ac as ServerEvent, ad as StackFrame, ae as StoredEntitlements, af as SyncPurchaseInput, ag as makeCrossdeckError } from './crossdeck-server-NL1p6hlR.js';
2
2
  import 'node:events';
3
3
 
4
4
  /**
@@ -17,7 +17,7 @@ import 'node:events';
17
17
  *
18
18
  * Do NOT edit by hand — `node scripts/sync-sdk-versions.mjs`.
19
19
  */
20
- declare const SDK_VERSION = "1.12.1";
20
+ declare const SDK_VERSION = "1.14.0";
21
21
  declare const SDK_NAME = "@cross-deck/node";
22
22
 
23
23
  /**
package/dist/index.mjs CHANGED
@@ -329,7 +329,7 @@ function byteLength(s) {
329
329
  import * as https from "https";
330
330
 
331
331
  // src/_version.ts
332
- var SDK_VERSION = "1.12.1";
332
+ var SDK_VERSION = "1.14.0";
333
333
  var SDK_NAME = "@cross-deck/node";
334
334
 
335
335
  // src/_diagnostic-telemetry.ts
@@ -2990,6 +2990,43 @@ var CrossdeckServer = class extends EventEmitter {
2990
2990
  timeoutMs: options?.timeoutMs
2991
2991
  });
2992
2992
  }
2993
+ /**
2994
+ * Stamp an outbound email link so its click binds to the recipient on landing.
2995
+ *
2996
+ * You know the recipient's email at send time; pass it with the link's destination
2997
+ * and Crossdeck returns the same URL carrying a one-time arrival ticket (`cd_ref`).
2998
+ * Put the returned URL in the email. When the recipient clicks and lands on a page
2999
+ * running `@cross-deck/web`, the SDK reads the ticket automatically and binds that
3000
+ * session to the person — the post-click journey then joins their identity.
3001
+ *
3002
+ * Rail-agnostic: works for Resend, HubSpot, your own SMTP, anything. Server-side
3003
+ * only (it mints an identity bind, so a secret key is required). If the landing page
3004
+ * has no Crossdeck web SDK, the deep session stitch softens but the server-side
3005
+ * email funnel (via the rail adapter) still lands by identity.
3006
+ */
3007
+ async campaignLink(input, options) {
3008
+ if (!input.email) {
3009
+ throw new CrossdeckError({
3010
+ type: "invalid_request_error",
3011
+ code: "missing_email",
3012
+ message: "campaignLink requires the recipient's email."
3013
+ });
3014
+ }
3015
+ if (!input.url) {
3016
+ throw new CrossdeckError({
3017
+ type: "invalid_request_error",
3018
+ code: "missing_url",
3019
+ message: "campaignLink requires the link's destination url."
3020
+ });
3021
+ }
3022
+ const body = { email: input.email, url: input.url };
3023
+ if (input.rail) body.rail = input.rail;
3024
+ return this.http.request("POST", "/campaign/email-link", {
3025
+ body,
3026
+ signal: options?.signal,
3027
+ timeoutMs: options?.timeoutMs
3028
+ });
3029
+ }
2993
3030
  // ============================================================
2994
3031
  // Entitlements — direct HTTP + TTL cache (v1.0.0+)
2995
3032
  //
@@ -3251,7 +3288,11 @@ var CrossdeckServer = class extends EventEmitter {
3251
3288
  ...input.email ? { email: input.email } : {},
3252
3289
  ...input.ip ? { ip: input.ip } : {},
3253
3290
  ...input.domain ? { domain: input.domain } : {},
3254
- ...input.fingerprint ? { fingerprint: input.fingerprint } : {}
3291
+ ...input.fingerprint ? { fingerprint: input.fingerprint } : {},
3292
+ // The human-proof attestation from the Crossdeck Trust browser panel.
3293
+ // Verified server-side at the gate; its absence is scored, never a hard
3294
+ // block on its own (fail-open). Only sent when the client supplied one.
3295
+ ...input.token ? { challengeToken: input.token } : {}
3255
3296
  },
3256
3297
  signal: options?.signal,
3257
3298
  timeoutMs: options?.timeoutMs