@cross-deck/node 1.13.0 → 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/CHANGELOG.md +4 -0
- package/dist/auto-events/index.d.mts +1 -1
- package/dist/auto-events/index.d.ts +1 -1
- package/dist/{crossdeck-server-CjnIok-o.d.mts → crossdeck-server-NL1p6hlR.d.mts} +35 -1
- package/dist/{crossdeck-server-CjnIok-o.d.ts → crossdeck-server-NL1p6hlR.d.ts} +35 -1
- package/dist/index.cjs +38 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +38 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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
|
//
|