@knock-ai/sdk 0.1.2
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/LICENSE +21 -0
- package/README.md +166 -0
- package/angular/package.json +7 -0
- package/contract/package.json +7 -0
- package/dist/angular.cjs +2 -0
- package/dist/angular.cjs.map +1 -0
- package/dist/angular.js +2 -0
- package/dist/angular.js.map +1 -0
- package/dist/contract.cjs +2 -0
- package/dist/contract.cjs.map +1 -0
- package/dist/contract.js +2 -0
- package/dist/contract.js.map +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/knockai.iife.js +3 -0
- package/dist/knockai.iife.js.map +1 -0
- package/dist/react.cjs +2 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.js +2 -0
- package/dist/react.js.map +1 -0
- package/dist/snippet.js +3 -0
- package/dist/snippet.js.map +1 -0
- package/dist/testing.cjs +2 -0
- package/dist/testing.cjs.map +1 -0
- package/dist/testing.js +2 -0
- package/dist/testing.js.map +1 -0
- package/dist/types/core/bridge.d.cts +6 -0
- package/dist/types/core/bridge.d.ts +7 -0
- package/dist/types/core/bridge.d.ts.map +1 -0
- package/dist/types/core/contract.d.cts +4 -0
- package/dist/types/core/contract.d.ts +5 -0
- package/dist/types/core/contract.d.ts.map +1 -0
- package/dist/types/core/emitter.d.cts +7 -0
- package/dist/types/core/emitter.d.ts +8 -0
- package/dist/types/core/emitter.d.ts.map +1 -0
- package/dist/types/core/env.d.cts +2 -0
- package/dist/types/core/env.d.ts +3 -0
- package/dist/types/core/env.d.ts.map +1 -0
- package/dist/types/core/globals.d.cts +21 -0
- package/dist/types/core/globals.d.ts +22 -0
- package/dist/types/core/globals.d.ts.map +1 -0
- package/dist/types/core/iife.d.cts +7 -0
- package/dist/types/core/iife.d.ts +8 -0
- package/dist/types/core/iife.d.ts.map +1 -0
- package/dist/types/core/index.d.cts +22 -0
- package/dist/types/core/index.d.ts +23 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/types/core/loader.d.cts +9 -0
- package/dist/types/core/loader.d.ts +10 -0
- package/dist/types/core/loader.d.ts.map +1 -0
- package/dist/types/core/queue.d.cts +16 -0
- package/dist/types/core/queue.d.ts +17 -0
- package/dist/types/core/queue.d.ts.map +1 -0
- package/dist/types/core/snippet.d.cts +1 -0
- package/dist/types/core/snippet.d.ts +2 -0
- package/dist/types/core/snippet.d.ts.map +1 -0
- package/dist/types/core/types.d.cts +148 -0
- package/dist/types/core/types.d.ts +149 -0
- package/dist/types/core/types.d.ts.map +1 -0
- package/dist/types/core/version.d.cts +1 -0
- package/dist/types/core/version.d.ts +2 -0
- package/dist/types/core/version.d.ts.map +1 -0
- package/dist/types/core/wire.d.cts +66 -0
- package/dist/types/core/wire.d.ts +67 -0
- package/dist/types/core/wire.d.ts.map +1 -0
- package/dist/types/frameworks/angular/index.d.cts +2 -0
- package/dist/types/frameworks/angular/index.d.ts +3 -0
- package/dist/types/frameworks/angular/index.d.ts.map +1 -0
- package/dist/types/frameworks/angular/knock.token.d.cts +4 -0
- package/dist/types/frameworks/angular/knock.token.d.ts +5 -0
- package/dist/types/frameworks/angular/knock.token.d.ts.map +1 -0
- package/dist/types/frameworks/angular/provide-knock.d.cts +4 -0
- package/dist/types/frameworks/angular/provide-knock.d.ts +5 -0
- package/dist/types/frameworks/angular/provide-knock.d.ts.map +1 -0
- package/dist/types/frameworks/react/KnockButton.d.cts +9 -0
- package/dist/types/frameworks/react/KnockButton.d.ts +10 -0
- package/dist/types/frameworks/react/KnockButton.d.ts.map +1 -0
- package/dist/types/frameworks/react/KnockProvider.d.cts +10 -0
- package/dist/types/frameworks/react/KnockProvider.d.ts +11 -0
- package/dist/types/frameworks/react/KnockProvider.d.ts.map +1 -0
- package/dist/types/frameworks/react/context.d.cts +3 -0
- package/dist/types/frameworks/react/context.d.ts +4 -0
- package/dist/types/frameworks/react/context.d.ts.map +1 -0
- package/dist/types/frameworks/react/index.d.cts +7 -0
- package/dist/types/frameworks/react/index.d.ts +8 -0
- package/dist/types/frameworks/react/index.d.ts.map +1 -0
- package/dist/types/frameworks/react/useKnock.d.cts +2 -0
- package/dist/types/frameworks/react/useKnock.d.ts +3 -0
- package/dist/types/frameworks/react/useKnock.d.ts.map +1 -0
- package/dist/types/frameworks/react/useKnockEvent.d.cts +2 -0
- package/dist/types/frameworks/react/useKnockEvent.d.ts +3 -0
- package/dist/types/frameworks/react/useKnockEvent.d.ts.map +1 -0
- package/dist/types/frameworks/react/useKnockIdentify.d.cts +2 -0
- package/dist/types/frameworks/react/useKnockIdentify.d.ts +3 -0
- package/dist/types/frameworks/react/useKnockIdentify.d.ts.map +1 -0
- package/dist/types/frameworks/vue/button.d.cts +29 -0
- package/dist/types/frameworks/vue/button.d.ts +30 -0
- package/dist/types/frameworks/vue/button.d.ts.map +1 -0
- package/dist/types/frameworks/vue/index.d.cts +4 -0
- package/dist/types/frameworks/vue/index.d.ts +5 -0
- package/dist/types/frameworks/vue/index.d.ts.map +1 -0
- package/dist/types/frameworks/vue/inject-key.d.cts +3 -0
- package/dist/types/frameworks/vue/inject-key.d.ts +4 -0
- package/dist/types/frameworks/vue/inject-key.d.ts.map +1 -0
- package/dist/types/frameworks/vue/plugin.d.cts +5 -0
- package/dist/types/frameworks/vue/plugin.d.ts +6 -0
- package/dist/types/frameworks/vue/plugin.d.ts.map +1 -0
- package/dist/types/frameworks/vue/use-knock.d.cts +2 -0
- package/dist/types/frameworks/vue/use-knock.d.ts +3 -0
- package/dist/types/frameworks/vue/use-knock.d.ts.map +1 -0
- package/dist/types/testing/index.d.cts +61 -0
- package/dist/types/testing/index.d.ts +62 -0
- package/dist/types/testing/index.d.ts.map +1 -0
- package/dist/vue.cjs +2 -0
- package/dist/vue.cjs.map +1 -0
- package/dist/vue.js +2 -0
- package/dist/vue.js.map +1 -0
- package/package.json +231 -0
- package/react/package.json +7 -0
- package/testing/package.json +7 -0
- package/vue/package.json +7 -0
package/dist/testing.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {__setKnockForTesting}from'@knock-ai/sdk';function l(){let d=[],i=new Map;function n(e){d.push(e);}function c(){let e="slots_found";return {open(){n({method:"scheduling.handle.open",args:[]}),e="slots_found";},close(){n({method:"scheduling.handle.close",args:[]}),e="closed";},get status(){return e}}}return {ready:true,version:"0.0.0-mock",surface:void 0,calls:d,init(e){n({method:"init",args:[e]});},identify(e){n({method:"identify",args:[e]});},track(e,o){n({method:"track",args:[e,o]});},modal:{open(e={}){n({method:"modal.open",args:[e]});},close(){n({method:"modal.close",args:[]});}},scheduling:{load(e){return n({method:"scheduling.load",args:[e]}),c()}},widget:{show(){n({method:"widget.show",args:[]});},hide(){n({method:"widget.hide",args:[]});},open(){n({method:"widget.open",args:[]});},close(){n({method:"widget.close",args:[]});}},clearCalls(){d.length=0;},on(e,o){n({method:"on",args:[e]});let t=i.get(e);return t||(t=new Set,i.set(e,t)),t.add(o),()=>{var a;(a=i.get(e))==null||a.delete(o);}},emit(e,o){let t=i.get(e);if(t)for(let a of t)a(o);},lastIdentify(){for(let e=d.length-1;e>=0;e-=1){let o=d[e];if((o==null?void 0:o.method)==="identify")return {traits:o.args[0]}}},eventsNamed(e){let o=[];for(let t of d)t.method==="track"&&t.args[0]===e&&o.push(t.args[1]);return o}}}function g(d){__setKnockForTesting(d);}function h(){__setKnockForTesting(void 0);}export{l as createKnockMock,g as installKnockMock,h as uninstallKnockMock};//# sourceMappingURL=testing.js.map
|
|
2
|
+
//# sourceMappingURL=testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/testing/index.ts"],"names":["createKnockMock","calls","listeners","record","call","createSchedulingHandle","status","options","traits","eventName","properties","event","handler","set","_a","payload","i","name","result","installKnockMock","mock","__setKnockForTesting","uninstallKnockMock"],"mappings":"iDAmDO,SAASA,CAAAA,EAA6B,CAC3C,IAAMC,CAAAA,CAAyB,GACzBC,CAA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ACb,IAAA,IAASC,CAAAA,CAAIf,EAAM,MAAA,CAAS,CAAA,CAAGe,GAAK,CAAA,CAAGA,CAAAA,EAAK,EAAG,CAC7C,IAAMZ,EAAOH,CAAAA,CAAMe,CAAC,EACpB,GAAA,CAAIZ,CAAAA,EAAA,YAAAA,CAAAA,CAAM,MAAA,IAAW,WACnB,OAAO,CAAE,OAAQA,CAAAA,CAAK,IAAA,CAAK,CAAC,CAAE,CAElC,CAEF,CAAA,CAEA,YAAYa,CAAAA,CAAM,CAChB,IAAMC,CAAAA,CAA6D,GACnE,IAAA,IAAWd,CAAAA,IAAQH,EACbG,CAAAA,CAAK,MAAA,GAAW,SAAWA,CAAAA,CAAK,IAAA,CAAK,CAAC,CAAA,GAAMa,CAAAA,EAC9CC,EAAO,IAAA,CAAKd,CAAAA,CAAK,KAAK,CAAC,CAAC,EAG5B,OAAOc,CACT,CACF,CACF,CAGO,SAASC,CAAAA,CAAiBC,CAAAA,CAAuB,CACtDC,oBAAAA,CAAqBD,CAAI,EAC3B,CAGO,SAASE,GAA2B,CACzCD,oBAAAA,CAAqB,MAAS,EAChC","file":"testing.js","sourcesContent":["/**\n * In-memory test double for the `@knock-ai/sdk` facade. Zero DOM access — every method\n * just records what was called so tests can assert on it.\n *\n * `installKnockMock`/`uninstallKnockMock` expect `../core` to export\n * `__setKnockForTesting(sdk: KnockSDK | undefined): void`, a test-only hook the\n * framework bindings resolve their singleton through.\n */\nimport { __setKnockForTesting } from '@knock-ai/sdk';\nimport type {\n KnockEventMap,\n KnockEventName,\n KnockFieldValue,\n KnockIdentifyTraits,\n KnockInitOptions,\n KnockModalOpenOptions,\n KnockSDK,\n KnockSchedulingHandle,\n KnockSchedulingLoadOptions,\n KnockSchedulingStatus,\n} from '../core/types.js';\n\nexport type KnockMockCall =\n | { method: 'init'; args: [KnockInitOptions] }\n | { method: 'identify'; args: [KnockIdentifyTraits] }\n | { method: 'track'; args: [string, Record<string, KnockFieldValue> | undefined] }\n | { method: 'modal.open'; args: [KnockModalOpenOptions] }\n | { method: 'modal.close'; args: [] }\n | { method: 'scheduling.load'; args: [KnockSchedulingLoadOptions] }\n | { method: 'scheduling.handle.open'; args: [] }\n | { method: 'scheduling.handle.close'; args: [] }\n | { method: 'widget.show'; args: [] }\n | { method: 'widget.hide'; args: [] }\n | { method: 'widget.open'; args: [] }\n | { method: 'widget.close'; args: [] }\n | { method: 'on'; args: [KnockEventName] };\n\nexport interface KnockMock extends KnockSDK {\n /** Every call made against this mock, oldest first. */\n readonly calls: readonly KnockMockCall[];\n /** Traits from the most recent `identify()` call, if any. */\n lastIdentify(): { traits: KnockIdentifyTraits } | undefined;\n /** Properties from every `track(name, …)` call, in call order. */\n eventsNamed(name: string): Array<Record<string, KnockFieldValue> | undefined>;\n /** Fire a handler registered via `on()`, as the real runtime would. */\n emit<E extends KnockEventName>(event: E, payload: KnockEventMap[E]): void;\n /** Forget recorded calls; `on()` subscriptions stay. */\n clearCalls(): void;\n}\n\n/** A full, in-memory `KnockSDK` that records every call for assertions. */\nexport function createKnockMock(): KnockMock {\n const calls: KnockMockCall[] = [];\n const listeners = new Map<KnockEventName, Set<(payload: never) => void>>();\n\n function record(call: KnockMockCall): void {\n calls.push(call);\n }\n\n function createSchedulingHandle(): KnockSchedulingHandle {\n let status: KnockSchedulingStatus = 'slots_found';\n return {\n open(): void {\n record({ method: 'scheduling.handle.open', args: [] });\n status = 'slots_found';\n },\n close(): void {\n record({ method: 'scheduling.handle.close', args: [] });\n status = 'closed';\n },\n get status(): KnockSchedulingStatus {\n return status;\n },\n };\n }\n\n return {\n ready: true,\n version: '0.0.0-mock',\n surface: undefined,\n calls,\n\n init(options): void {\n record({ method: 'init', args: [options] });\n },\n\n identify(traits): void {\n record({ method: 'identify', args: [traits] });\n },\n\n track(eventName, properties): void {\n record({ method: 'track', args: [eventName, properties] });\n },\n\n modal: {\n open(options = {}): void {\n record({ method: 'modal.open', args: [options] });\n },\n close(): void {\n record({ method: 'modal.close', args: [] });\n },\n },\n\n scheduling: {\n load(options): KnockSchedulingHandle {\n record({ method: 'scheduling.load', args: [options] });\n return createSchedulingHandle();\n },\n },\n\n widget: {\n show(): void {\n record({ method: 'widget.show', args: [] });\n },\n hide(): void {\n record({ method: 'widget.hide', args: [] });\n },\n open(): void {\n record({ method: 'widget.open', args: [] });\n },\n close(): void {\n record({ method: 'widget.close', args: [] });\n },\n },\n\n clearCalls(): void {\n calls.length = 0;\n },\n\n on<E extends KnockEventName>(event: E, handler: (payload: KnockEventMap[E]) => void): () => void {\n record({ method: 'on', args: [event] });\n let set = listeners.get(event);\n if (!set) {\n set = new Set();\n listeners.set(event, set);\n }\n set.add(handler);\n return () => {\n listeners.get(event)?.delete(handler);\n };\n },\n\n emit<E extends KnockEventName>(event: E, payload: KnockEventMap[E]): void {\n const set = listeners.get(event);\n if (!set) return;\n // handlers are stored with their per-event type erased to `never`; this is the one\n // place that needs to undo it to actually invoke them.\n for (const handler of set) handler(payload as never);\n },\n\n lastIdentify() {\n for (let i = calls.length - 1; i >= 0; i -= 1) {\n const call = calls[i];\n if (call?.method === 'identify') {\n return { traits: call.args[0] };\n }\n }\n return undefined;\n },\n\n eventsNamed(name) {\n const result: Array<Record<string, KnockFieldValue> | undefined> = [];\n for (const call of calls) {\n if (call.method === 'track' && call.args[0] === name) {\n result.push(call.args[1]);\n }\n }\n return result;\n },\n };\n}\n\n/** Swap the singleton the framework bindings resolve `knock` through onto `mock`. */\nexport function installKnockMock(mock: KnockMock): void {\n __setKnockForTesting(mock);\n}\n\n/** Restore the framework bindings to the real (queueing) facade singleton. */\nexport function uninstallKnockMock(): void {\n __setKnockForTesting(undefined);\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { KnockRuntime } from './types.cjs';
|
|
2
|
+
import type { DeferredSchedulingHandle, QueuedCommand } from './queue.cjs';
|
|
3
|
+
/** Returned synchronously from `scheduling.load()` before the runtime exists. */
|
|
4
|
+
export declare function createDeferredSchedulingHandle(): DeferredSchedulingHandle;
|
|
5
|
+
/** Applies one queued (or live) command against the loaded runtime. */
|
|
6
|
+
export declare function applyCommand(runtime: KnockRuntime, command: QueuedCommand, debug: boolean): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { KnockRuntime } from './types.js';
|
|
2
|
+
import type { DeferredSchedulingHandle, QueuedCommand } from './queue.js';
|
|
3
|
+
/** Returned synchronously from `scheduling.load()` before the runtime exists. */
|
|
4
|
+
export declare function createDeferredSchedulingHandle(): DeferredSchedulingHandle;
|
|
5
|
+
/** Applies one queued (or live) command against the loaded runtime. */
|
|
6
|
+
export declare function applyCommand(runtime: KnockRuntime, command: QueuedCommand, debug: boolean): void;
|
|
7
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/core/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAqD,MAAM,YAAY,CAAC;AAClG,OAAO,KAAK,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI1E,iFAAiF;AACjF,wBAAgB,8BAA8B,IAAI,wBAAwB,CAmBzE;AAQD,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAehG"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Runtime implementers' entry: the `window.Knock` contract (types) plus the wire protocol (types + policy constants). */
|
|
2
|
+
export type { KnockEventMap, KnockEventName, KnockFieldValue, KnockModalOpenOptions, KnockRuntime, KnockSchedulingHandle, KnockSchedulingLoadOptions, KnockSchedulingStatus, KnockSchedulingStatusChange, KnockSdkBootConfig, KnockTagSurface, } from './types.cjs';
|
|
3
|
+
export type { KnockWireBatch, KnockWireEvent } from './wire.cjs';
|
|
4
|
+
export { WIRE_BATCH_POLICY, WIRE_COMPRESSION, WIRE_EVENT_NAME_PATTERN, WIRE_RETRY_POLICY } from './wire.cjs';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Runtime implementers' entry: the `window.Knock` contract (types) plus the wire protocol (types + policy constants). */
|
|
2
|
+
export type { KnockEventMap, KnockEventName, KnockFieldValue, KnockModalOpenOptions, KnockRuntime, KnockSchedulingHandle, KnockSchedulingLoadOptions, KnockSchedulingStatus, KnockSchedulingStatusChange, KnockSdkBootConfig, KnockTagSurface, } from './types.js';
|
|
3
|
+
export type { KnockWireBatch, KnockWireEvent } from './wire.js';
|
|
4
|
+
export { WIRE_BATCH_POLICY, WIRE_COMPRESSION, WIRE_EVENT_NAME_PATTERN, WIRE_RETRY_POLICY } from './wire.js';
|
|
5
|
+
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/core/contract.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1H,YAAY,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EAClB,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Minimal typed pub/sub. One instance per KnockSDK instance; not exported publicly. */
|
|
2
|
+
export declare class Emitter<EventMap extends object> {
|
|
3
|
+
private readonly handlers;
|
|
4
|
+
on<E extends keyof EventMap>(event: E, handler: (payload: EventMap[E]) => void): () => void;
|
|
5
|
+
emit<E extends keyof EventMap>(event: E, payload: EventMap[E]): void;
|
|
6
|
+
clear(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Minimal typed pub/sub. One instance per KnockSDK instance; not exported publicly. */
|
|
2
|
+
export declare class Emitter<EventMap extends object> {
|
|
3
|
+
private readonly handlers;
|
|
4
|
+
on<E extends keyof EventMap>(event: E, handler: (payload: EventMap[E]) => void): () => void;
|
|
5
|
+
emit<E extends keyof EventMap>(event: E, payload: EventMap[E]): void;
|
|
6
|
+
clear(): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=emitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../../src/core/emitter.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,qBAAa,OAAO,CAAC,QAAQ,SAAS,MAAM;IAC1C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA4C;IAErE,EAAE,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAW1F;IAED,IAAI,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAInE;IAED,KAAK,IAAI,IAAI,CAEZ;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/core/env.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AASnD,wBAAgB,YAAY,CAAC,WAAW,EAAE,gBAAgB,GAAG,MAAM,CAElE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Shared by the CDN stub and the IIFE facade. No side effects — importing it must never install anything. */
|
|
2
|
+
/**
|
|
3
|
+
* Replayed by the IIFE in order: `path` is called on the facade with `args` and `bind` gets its return value;
|
|
4
|
+
* a function `path` (a handle op queued before load) is just called.
|
|
5
|
+
*/
|
|
6
|
+
export type StubCall = [path: string | (() => void), args: unknown[], bind?: (result: unknown) => void];
|
|
7
|
+
export interface KnockStub {
|
|
8
|
+
q: StubCall[];
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface Window {
|
|
13
|
+
/** The public global: `knock.identify(...)`. Left alone if the page already owns `window.knock`. */
|
|
14
|
+
knock?: KnockStub | unknown;
|
|
15
|
+
/** Permanent alias — always ours, so it works even when `window.knock` is taken. */
|
|
16
|
+
knockai?: KnockStub | unknown;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export declare function isStub(value: unknown): value is KnockStub;
|
|
20
|
+
/** True for our stub or our facade — anything else on `window.knock` belongs to the host page. */
|
|
21
|
+
export declare function isKnockGlobal(value: unknown): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Shared by the CDN stub and the IIFE facade. No side effects — importing it must never install anything. */
|
|
2
|
+
/**
|
|
3
|
+
* Replayed by the IIFE in order: `path` is called on the facade with `args` and `bind` gets its return value;
|
|
4
|
+
* a function `path` (a handle op queued before load) is just called.
|
|
5
|
+
*/
|
|
6
|
+
export type StubCall = [path: string | (() => void), args: unknown[], bind?: (result: unknown) => void];
|
|
7
|
+
export interface KnockStub {
|
|
8
|
+
q: StubCall[];
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface Window {
|
|
13
|
+
/** The public global: `knock.identify(...)`. Left alone if the page already owns `window.knock`. */
|
|
14
|
+
knock?: KnockStub | unknown;
|
|
15
|
+
/** Permanent alias — always ours, so it works even when `window.knock` is taken. */
|
|
16
|
+
knockai?: KnockStub | unknown;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export declare function isStub(value: unknown): value is KnockStub;
|
|
20
|
+
/** True for our stub or our facade — anything else on `window.knock` belongs to the host page. */
|
|
21
|
+
export declare function isKnockGlobal(value: unknown): boolean;
|
|
22
|
+
//# sourceMappingURL=globals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/core/globals.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAE9G;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC,CAAC;AAExG,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,QAAQ,EAAE,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,oGAAoG;QACpG,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;QAC5B,oFAAoF;QACpF,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;KAC/B;CACF;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAEzD;AAED,kGAAkG;AAClG,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAErD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser global build (`dist/knockai.iife.js`). Loaded by the CDN stub in `snippet.ts`: replays the
|
|
3
|
+
* stub's queue through the real facade, then exposes the facade as `window.knock` (unless the page
|
|
4
|
+
* owns that name) and always as `window.knockai`.
|
|
5
|
+
*/
|
|
6
|
+
import { knock } from './index.cjs';
|
|
7
|
+
export { knock as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser global build (`dist/knockai.iife.js`). Loaded by the CDN stub in `snippet.ts`: replays the
|
|
3
|
+
* stub's queue through the real facade, then exposes the facade as `window.knock` (unless the page
|
|
4
|
+
* owns that name) and always as `window.knockai`.
|
|
5
|
+
*/
|
|
6
|
+
import { knock } from './index.js';
|
|
7
|
+
export { knock as default };
|
|
8
|
+
//# sourceMappingURL=iife.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iife.d.ts","sourceRoot":"","sources":["../../../src/core/iife.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAgCnC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { KnockSDK } from './types.cjs';
|
|
2
|
+
export type { KnockEnvironment, KnockEventMap, KnockEventName, KnockFieldValue, KnockIdentifyTraits, KnockInitOptions, KnockModalOpenOptions, KnockRuntime, KnockSDK, KnockSchedulingHandle, KnockSchedulingLoadOptions, KnockSchedulingStatus, KnockSchedulingStatusChange, KnockSdkBootConfig, KnockTagSurface, } from './types.cjs';
|
|
3
|
+
export { VERSION } from './version.cjs';
|
|
4
|
+
/**
|
|
5
|
+
* Builds one independent KnockSDK instance: its own queue, emitter and ready
|
|
6
|
+
* state. Use this in tests, or when a page legitimately needs two instances;
|
|
7
|
+
* everyday code should use the `knock` singleton below instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createKnock(): KnockSDK;
|
|
10
|
+
/**
|
|
11
|
+
* The shared `knock` instance. Property reads resolve through `activeKnock` at
|
|
12
|
+
* access time, so `__setKnockForTesting` can redirect every framework binding
|
|
13
|
+
* without any of them re-importing anything.
|
|
14
|
+
*/
|
|
15
|
+
export declare const knock: KnockSDK;
|
|
16
|
+
export default knock;
|
|
17
|
+
/**
|
|
18
|
+
* Test-only hook: redirects the `knock` singleton to `sdk` (e.g. a
|
|
19
|
+
* `createKnockMock()` from `@knock-ai/sdk/testing`), or back to the real SDK when
|
|
20
|
+
* called with `undefined`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function __setKnockForTesting(sdk: KnockSDK | undefined): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { KnockSDK } from './types.js';
|
|
2
|
+
export type { KnockEnvironment, KnockEventMap, KnockEventName, KnockFieldValue, KnockIdentifyTraits, KnockInitOptions, KnockModalOpenOptions, KnockRuntime, KnockSDK, KnockSchedulingHandle, KnockSchedulingLoadOptions, KnockSchedulingStatus, KnockSchedulingStatusChange, KnockSdkBootConfig, KnockTagSurface, } from './types.js';
|
|
3
|
+
export { VERSION } from './version.js';
|
|
4
|
+
/**
|
|
5
|
+
* Builds one independent KnockSDK instance: its own queue, emitter and ready
|
|
6
|
+
* state. Use this in tests, or when a page legitimately needs two instances;
|
|
7
|
+
* everyday code should use the `knock` singleton below instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createKnock(): KnockSDK;
|
|
10
|
+
/**
|
|
11
|
+
* The shared `knock` instance. Property reads resolve through `activeKnock` at
|
|
12
|
+
* access time, so `__setKnockForTesting` can redirect every framework binding
|
|
13
|
+
* without any of them re-importing anything.
|
|
14
|
+
*/
|
|
15
|
+
export declare const knock: KnockSDK;
|
|
16
|
+
export default knock;
|
|
17
|
+
/**
|
|
18
|
+
* Test-only hook: redirects the `knock` singleton to `sdk` (e.g. a
|
|
19
|
+
* `createKnockMock()` from `@knock-ai/sdk/testing`), or back to the real SDK when
|
|
20
|
+
* called with `undefined`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function __setKnockForTesting(sdk: KnockSDK | undefined): void;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAQV,QAAQ,EAIT,MAAM,YAAY,CAAC;AAOpB,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,QAAQ,EACR,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EAClB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAYvC;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,QAAQ,CA8HtC;AAKD;;;;GAIG;AACH,eAAO,MAAM,KAAK,EAAE,QAGlB,CAAC;eAEY,KAAK;AAEpB;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,CAEpE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { KnockEnvironment, KnockSdkBootConfig } from './types.cjs';
|
|
2
|
+
/** True when a Knock runtime <script> is already in the DOM (booted or still loading). */
|
|
3
|
+
export declare function hasRuntimeScript(): boolean;
|
|
4
|
+
/** tagIds of Knock tags that already booted on this page (the Knock tag's own duplicate guard). */
|
|
5
|
+
export declare function bootedTagIds(): string[];
|
|
6
|
+
export declare function buildScriptUrl(environment: KnockEnvironment, tagId: string, scriptUrl?: string): string;
|
|
7
|
+
/** Informational; the current Knock tag doesn't read it. */
|
|
8
|
+
export declare function writeBootConfig(config: KnockSdkBootConfig): void;
|
|
9
|
+
export declare function injectRuntimeScript(url: string): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { KnockEnvironment, KnockSdkBootConfig } from './types.js';
|
|
2
|
+
/** True when a Knock runtime <script> is already in the DOM (booted or still loading). */
|
|
3
|
+
export declare function hasRuntimeScript(): boolean;
|
|
4
|
+
/** tagIds of Knock tags that already booted on this page (the Knock tag's own duplicate guard). */
|
|
5
|
+
export declare function bootedTagIds(): string[];
|
|
6
|
+
export declare function buildScriptUrl(environment: KnockEnvironment, tagId: string, scriptUrl?: string): string;
|
|
7
|
+
/** Informational; the current Knock tag doesn't read it. */
|
|
8
|
+
export declare function writeBootConfig(config: KnockSdkBootConfig): void;
|
|
9
|
+
export declare function injectRuntimeScript(url: string): void;
|
|
10
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/core/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAOvE,0FAA0F;AAC1F,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED,mGAAmG;AACnG,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAEvC;AAED,wBAAgB,cAAc,CAC5B,WAAW,EAAE,gBAAgB,EAC7B,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAGR;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAGhE;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAOrD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { KnockSchedulingHandle } from './types.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* A `scheduling.load()` handle returned before the runtime exists. Buffers
|
|
4
|
+
* `open`/`close` until `attach()` hands it the real handle from the runtime.
|
|
5
|
+
*/
|
|
6
|
+
export interface DeferredSchedulingHandle extends KnockSchedulingHandle {
|
|
7
|
+
attach(real: KnockSchedulingHandle): void;
|
|
8
|
+
}
|
|
9
|
+
/** Dotted path into `window.Knock` (`identify`, `modal.open`, `widget.show`, …). */
|
|
10
|
+
export type RuntimePath = 'identify' | 'track' | 'modal.open' | 'modal.close' | 'scheduling.load' | 'widget.show' | 'widget.hide' | 'widget.open' | 'widget.close';
|
|
11
|
+
export interface QueuedCommand {
|
|
12
|
+
path: RuntimePath;
|
|
13
|
+
args: unknown[];
|
|
14
|
+
/** Only for `scheduling.load`: receives the runtime's real handle. */
|
|
15
|
+
handle?: DeferredSchedulingHandle;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { KnockSchedulingHandle } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A `scheduling.load()` handle returned before the runtime exists. Buffers
|
|
4
|
+
* `open`/`close` until `attach()` hands it the real handle from the runtime.
|
|
5
|
+
*/
|
|
6
|
+
export interface DeferredSchedulingHandle extends KnockSchedulingHandle {
|
|
7
|
+
attach(real: KnockSchedulingHandle): void;
|
|
8
|
+
}
|
|
9
|
+
/** Dotted path into `window.Knock` (`identify`, `modal.open`, `widget.show`, …). */
|
|
10
|
+
export type RuntimePath = 'identify' | 'track' | 'modal.open' | 'modal.close' | 'scheduling.load' | 'widget.show' | 'widget.hide' | 'widget.open' | 'widget.close';
|
|
11
|
+
export interface QueuedCommand {
|
|
12
|
+
path: RuntimePath;
|
|
13
|
+
args: unknown[];
|
|
14
|
+
/** Only for `scheduling.load`: receives the runtime's real handle. */
|
|
15
|
+
handle?: DeferredSchedulingHandle;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../src/core/queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE,MAAM,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC3C;AAED,oFAAoF;AACpF,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,OAAO,GACP,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,aAAa,GACb,aAAa,GACb,cAAc,CAAC;AAEnB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,sEAAsE;IACtE,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snippet.d.ts","sourceRoot":"","sources":["../../../src/core/snippet.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public contract of the `@knock-ai/sdk` SDK. Everything the vendor's code can call is
|
|
3
|
+
* declared here; the runtime (the Knock tag, loaded from Knock's CDN) implements it.
|
|
4
|
+
* Keep this file dependency-free and DOM-agnostic: it is shared by the core and
|
|
5
|
+
* every framework binding.
|
|
6
|
+
*/
|
|
7
|
+
export type KnockEnvironment = 'production' | 'staging' | 'development';
|
|
8
|
+
/** Which of the vendor's two Knock tags is loaded: the website tag or the product tag. */
|
|
9
|
+
export type KnockTagSurface = 'website' | 'product';
|
|
10
|
+
/** Dates are sent as ISO strings. */
|
|
11
|
+
export type KnockFieldValue = string | number | boolean | Date | string[] | null;
|
|
12
|
+
export interface KnockInitOptions {
|
|
13
|
+
/** Your Knock tag id — your website tag's on a marketing site, your product tag's in a logged-in app. */
|
|
14
|
+
tagId: string;
|
|
15
|
+
/** For Knock's own testing. Leave unset. */
|
|
16
|
+
environment?: KnockEnvironment;
|
|
17
|
+
/** Logs the SDK's own warnings (dropped calls, a method the loaded tag doesn't have) to the console. */
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
/** Load the Knock tag from this URL instead of Knock's default location. */
|
|
20
|
+
scriptUrl?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface KnockIdentifyTraits {
|
|
23
|
+
email: string;
|
|
24
|
+
firstName?: string;
|
|
25
|
+
lastName?: string;
|
|
26
|
+
company?: string;
|
|
27
|
+
[customField: string]: KnockFieldValue | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface KnockModalOpenOptions {
|
|
30
|
+
/** The scheduling modal for this magic link. Omit it to open your workspace's default Knock modal. */
|
|
31
|
+
magicLinkId?: string;
|
|
32
|
+
/** Pre-fills the scheduling modal so it starts finding times immediately. Only used together with `magicLinkId`. */
|
|
33
|
+
email?: string;
|
|
34
|
+
}
|
|
35
|
+
export type KnockSchedulingStatus = 'loading' | 'email_submitted' | 'slots_found' | 'no_slots_found' | 'booked' | 'pending_confirmation' | 'error' | 'closed';
|
|
36
|
+
export interface KnockSchedulingStatusChange {
|
|
37
|
+
status: KnockSchedulingStatus;
|
|
38
|
+
magicLinkId: string;
|
|
39
|
+
/** Once an email is known — passed to `load()`, or typed into the modal. */
|
|
40
|
+
email?: string;
|
|
41
|
+
/** `slots_found`: how many bookable times came back, and the earliest. */
|
|
42
|
+
slots?: {
|
|
43
|
+
count: number;
|
|
44
|
+
first: string | null;
|
|
45
|
+
};
|
|
46
|
+
/** `booked`: the confirmed meeting. `pending_confirmation`: only a requested time — not a booking yet. */
|
|
47
|
+
meeting?: {
|
|
48
|
+
startDateTime: string;
|
|
49
|
+
endDateTime: string;
|
|
50
|
+
};
|
|
51
|
+
/** `no_slots_found`: `disqualified` or `no_slots`. */
|
|
52
|
+
reason?: string;
|
|
53
|
+
/** `error`: what went wrong. */
|
|
54
|
+
message?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface KnockSchedulingLoadOptions {
|
|
57
|
+
magicLinkId: string;
|
|
58
|
+
email?: string;
|
|
59
|
+
onStatusChange?: (change: KnockSchedulingStatusChange) => void;
|
|
60
|
+
}
|
|
61
|
+
export interface KnockSchedulingHandle {
|
|
62
|
+
open(): void;
|
|
63
|
+
close(): void;
|
|
64
|
+
readonly status: KnockSchedulingStatus;
|
|
65
|
+
}
|
|
66
|
+
export interface KnockEventMap {
|
|
67
|
+
/** Fires once. A handler added after that still runs, once. */
|
|
68
|
+
ready: void;
|
|
69
|
+
/** `magicLinkId` is null for the default Knock modal. */
|
|
70
|
+
'modal:open': {
|
|
71
|
+
magicLinkId: string | null;
|
|
72
|
+
};
|
|
73
|
+
'modal:close': {
|
|
74
|
+
magicLinkId: string | null;
|
|
75
|
+
};
|
|
76
|
+
'widget:open': void;
|
|
77
|
+
'widget:close': void;
|
|
78
|
+
error: {
|
|
79
|
+
message: string;
|
|
80
|
+
cause?: unknown;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export type KnockEventName = keyof KnockEventMap;
|
|
84
|
+
export interface KnockSDK {
|
|
85
|
+
init(options: KnockInitOptions): void;
|
|
86
|
+
identify(traits: KnockIdentifyTraits): void;
|
|
87
|
+
track(eventName: string, properties?: Record<string, KnockFieldValue>): void;
|
|
88
|
+
modal: {
|
|
89
|
+
open(options?: KnockModalOpenOptions): void;
|
|
90
|
+
close(): void;
|
|
91
|
+
};
|
|
92
|
+
scheduling: {
|
|
93
|
+
load(options: KnockSchedulingLoadOptions): KnockSchedulingHandle;
|
|
94
|
+
};
|
|
95
|
+
widget: {
|
|
96
|
+
show(): void;
|
|
97
|
+
hide(): void;
|
|
98
|
+
open(): void;
|
|
99
|
+
close(): void;
|
|
100
|
+
};
|
|
101
|
+
on<E extends KnockEventName>(event: E, handler: (payload: KnockEventMap[E]) => void): () => void;
|
|
102
|
+
/** True once the runtime has loaded and drained the queue. */
|
|
103
|
+
readonly ready: boolean;
|
|
104
|
+
readonly version: string;
|
|
105
|
+
/** The loaded tag's surface; `undefined` before ready, or on a tag that predates it. */
|
|
106
|
+
readonly surface: KnockTagSurface | undefined;
|
|
107
|
+
}
|
|
108
|
+
/** What the loaded runtime (the Knock tag, website or product) must expose on `window.Knock`. */
|
|
109
|
+
export interface KnockRuntime {
|
|
110
|
+
/** Absent on tags that predate it. */
|
|
111
|
+
surface?: KnockTagSurface;
|
|
112
|
+
identify(traits: Record<string, unknown>): void;
|
|
113
|
+
track?(eventName: string, properties?: Record<string, unknown>): void;
|
|
114
|
+
scheduling: {
|
|
115
|
+
load(options: KnockSchedulingLoadOptions): KnockSchedulingHandle;
|
|
116
|
+
};
|
|
117
|
+
modal?: {
|
|
118
|
+
open(options?: KnockModalOpenOptions): void;
|
|
119
|
+
close(): void;
|
|
120
|
+
};
|
|
121
|
+
widget?: {
|
|
122
|
+
show(): void;
|
|
123
|
+
hide(): void;
|
|
124
|
+
open(): void;
|
|
125
|
+
close(): void;
|
|
126
|
+
};
|
|
127
|
+
on?<E extends KnockEventName>(event: E, handler: (payload: KnockEventMap[E]) => void): () => void;
|
|
128
|
+
}
|
|
129
|
+
/** What the SDK writes to `window.__KNOCK_SDK__` on `init()`. Informational; the current Knock tag doesn't read it. */
|
|
130
|
+
export interface KnockSdkBootConfig {
|
|
131
|
+
protocolVersion: 1;
|
|
132
|
+
sdkVersion: string;
|
|
133
|
+
tagId: string;
|
|
134
|
+
environment: KnockEnvironment;
|
|
135
|
+
debug: boolean;
|
|
136
|
+
}
|
|
137
|
+
declare global {
|
|
138
|
+
interface Window {
|
|
139
|
+
Knock?: KnockRuntime;
|
|
140
|
+
__KNOCK_SDK__?: KnockSdkBootConfig;
|
|
141
|
+
/** The Knock tag's own duplicate guard: one entry per booted `tagId:vendorId`. */
|
|
142
|
+
__knockTagInstances?: Map<string, {
|
|
143
|
+
tagId: string;
|
|
144
|
+
vendorId: string;
|
|
145
|
+
initialized?: boolean;
|
|
146
|
+
}>;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public contract of the `@knock-ai/sdk` SDK. Everything the vendor's code can call is
|
|
3
|
+
* declared here; the runtime (the Knock tag, loaded from Knock's CDN) implements it.
|
|
4
|
+
* Keep this file dependency-free and DOM-agnostic: it is shared by the core and
|
|
5
|
+
* every framework binding.
|
|
6
|
+
*/
|
|
7
|
+
export type KnockEnvironment = 'production' | 'staging' | 'development';
|
|
8
|
+
/** Which of the vendor's two Knock tags is loaded: the website tag or the product tag. */
|
|
9
|
+
export type KnockTagSurface = 'website' | 'product';
|
|
10
|
+
/** Dates are sent as ISO strings. */
|
|
11
|
+
export type KnockFieldValue = string | number | boolean | Date | string[] | null;
|
|
12
|
+
export interface KnockInitOptions {
|
|
13
|
+
/** Your Knock tag id — your website tag's on a marketing site, your product tag's in a logged-in app. */
|
|
14
|
+
tagId: string;
|
|
15
|
+
/** For Knock's own testing. Leave unset. */
|
|
16
|
+
environment?: KnockEnvironment;
|
|
17
|
+
/** Logs the SDK's own warnings (dropped calls, a method the loaded tag doesn't have) to the console. */
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
/** Load the Knock tag from this URL instead of Knock's default location. */
|
|
20
|
+
scriptUrl?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface KnockIdentifyTraits {
|
|
23
|
+
email: string;
|
|
24
|
+
firstName?: string;
|
|
25
|
+
lastName?: string;
|
|
26
|
+
company?: string;
|
|
27
|
+
[customField: string]: KnockFieldValue | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface KnockModalOpenOptions {
|
|
30
|
+
/** The scheduling modal for this magic link. Omit it to open your workspace's default Knock modal. */
|
|
31
|
+
magicLinkId?: string;
|
|
32
|
+
/** Pre-fills the scheduling modal so it starts finding times immediately. Only used together with `magicLinkId`. */
|
|
33
|
+
email?: string;
|
|
34
|
+
}
|
|
35
|
+
export type KnockSchedulingStatus = 'loading' | 'email_submitted' | 'slots_found' | 'no_slots_found' | 'booked' | 'pending_confirmation' | 'error' | 'closed';
|
|
36
|
+
export interface KnockSchedulingStatusChange {
|
|
37
|
+
status: KnockSchedulingStatus;
|
|
38
|
+
magicLinkId: string;
|
|
39
|
+
/** Once an email is known — passed to `load()`, or typed into the modal. */
|
|
40
|
+
email?: string;
|
|
41
|
+
/** `slots_found`: how many bookable times came back, and the earliest. */
|
|
42
|
+
slots?: {
|
|
43
|
+
count: number;
|
|
44
|
+
first: string | null;
|
|
45
|
+
};
|
|
46
|
+
/** `booked`: the confirmed meeting. `pending_confirmation`: only a requested time — not a booking yet. */
|
|
47
|
+
meeting?: {
|
|
48
|
+
startDateTime: string;
|
|
49
|
+
endDateTime: string;
|
|
50
|
+
};
|
|
51
|
+
/** `no_slots_found`: `disqualified` or `no_slots`. */
|
|
52
|
+
reason?: string;
|
|
53
|
+
/** `error`: what went wrong. */
|
|
54
|
+
message?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface KnockSchedulingLoadOptions {
|
|
57
|
+
magicLinkId: string;
|
|
58
|
+
email?: string;
|
|
59
|
+
onStatusChange?: (change: KnockSchedulingStatusChange) => void;
|
|
60
|
+
}
|
|
61
|
+
export interface KnockSchedulingHandle {
|
|
62
|
+
open(): void;
|
|
63
|
+
close(): void;
|
|
64
|
+
readonly status: KnockSchedulingStatus;
|
|
65
|
+
}
|
|
66
|
+
export interface KnockEventMap {
|
|
67
|
+
/** Fires once. A handler added after that still runs, once. */
|
|
68
|
+
ready: void;
|
|
69
|
+
/** `magicLinkId` is null for the default Knock modal. */
|
|
70
|
+
'modal:open': {
|
|
71
|
+
magicLinkId: string | null;
|
|
72
|
+
};
|
|
73
|
+
'modal:close': {
|
|
74
|
+
magicLinkId: string | null;
|
|
75
|
+
};
|
|
76
|
+
'widget:open': void;
|
|
77
|
+
'widget:close': void;
|
|
78
|
+
error: {
|
|
79
|
+
message: string;
|
|
80
|
+
cause?: unknown;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export type KnockEventName = keyof KnockEventMap;
|
|
84
|
+
export interface KnockSDK {
|
|
85
|
+
init(options: KnockInitOptions): void;
|
|
86
|
+
identify(traits: KnockIdentifyTraits): void;
|
|
87
|
+
track(eventName: string, properties?: Record<string, KnockFieldValue>): void;
|
|
88
|
+
modal: {
|
|
89
|
+
open(options?: KnockModalOpenOptions): void;
|
|
90
|
+
close(): void;
|
|
91
|
+
};
|
|
92
|
+
scheduling: {
|
|
93
|
+
load(options: KnockSchedulingLoadOptions): KnockSchedulingHandle;
|
|
94
|
+
};
|
|
95
|
+
widget: {
|
|
96
|
+
show(): void;
|
|
97
|
+
hide(): void;
|
|
98
|
+
open(): void;
|
|
99
|
+
close(): void;
|
|
100
|
+
};
|
|
101
|
+
on<E extends KnockEventName>(event: E, handler: (payload: KnockEventMap[E]) => void): () => void;
|
|
102
|
+
/** True once the runtime has loaded and drained the queue. */
|
|
103
|
+
readonly ready: boolean;
|
|
104
|
+
readonly version: string;
|
|
105
|
+
/** The loaded tag's surface; `undefined` before ready, or on a tag that predates it. */
|
|
106
|
+
readonly surface: KnockTagSurface | undefined;
|
|
107
|
+
}
|
|
108
|
+
/** What the loaded runtime (the Knock tag, website or product) must expose on `window.Knock`. */
|
|
109
|
+
export interface KnockRuntime {
|
|
110
|
+
/** Absent on tags that predate it. */
|
|
111
|
+
surface?: KnockTagSurface;
|
|
112
|
+
identify(traits: Record<string, unknown>): void;
|
|
113
|
+
track?(eventName: string, properties?: Record<string, unknown>): void;
|
|
114
|
+
scheduling: {
|
|
115
|
+
load(options: KnockSchedulingLoadOptions): KnockSchedulingHandle;
|
|
116
|
+
};
|
|
117
|
+
modal?: {
|
|
118
|
+
open(options?: KnockModalOpenOptions): void;
|
|
119
|
+
close(): void;
|
|
120
|
+
};
|
|
121
|
+
widget?: {
|
|
122
|
+
show(): void;
|
|
123
|
+
hide(): void;
|
|
124
|
+
open(): void;
|
|
125
|
+
close(): void;
|
|
126
|
+
};
|
|
127
|
+
on?<E extends KnockEventName>(event: E, handler: (payload: KnockEventMap[E]) => void): () => void;
|
|
128
|
+
}
|
|
129
|
+
/** What the SDK writes to `window.__KNOCK_SDK__` on `init()`. Informational; the current Knock tag doesn't read it. */
|
|
130
|
+
export interface KnockSdkBootConfig {
|
|
131
|
+
protocolVersion: 1;
|
|
132
|
+
sdkVersion: string;
|
|
133
|
+
tagId: string;
|
|
134
|
+
environment: KnockEnvironment;
|
|
135
|
+
debug: boolean;
|
|
136
|
+
}
|
|
137
|
+
declare global {
|
|
138
|
+
interface Window {
|
|
139
|
+
Knock?: KnockRuntime;
|
|
140
|
+
__KNOCK_SDK__?: KnockSdkBootConfig;
|
|
141
|
+
/** The Knock tag's own duplicate guard: one entry per booted `tagId:vendorId`. */
|
|
142
|
+
__knockTagInstances?: Map<string, {
|
|
143
|
+
tagId: string;
|
|
144
|
+
vendorId: string;
|
|
145
|
+
initialized?: boolean;
|
|
146
|
+
}>;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAAC;AAExE,0FAA0F;AAC1F,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpD,qCAAqC;AACrC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;AAEjF,MAAM,WAAW,gBAAgB;IAC/B,yGAAyG;IACzG,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,wGAAwG;IACxG,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;CACpD;AAED,MAAM,WAAW,qBAAqB;IACpC,sGAAsG;IACtG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oHAAoH;IACpH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,qBAAqB,GAC7B,S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 -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/core/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,UAAU,CAAC"}
|