@picked/client 0.0.1-dev.1787788898336 → 0.0.1-dev.1789541668638
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/.tsbuildinfo +1 -1
- package/dist/{api-DU4j3Qw0.js → api-C7q_7vxn.js} +1 -1
- package/dist/{api-9gq3GBPF.cjs → api-Ctvh1qkk.cjs} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/telemetry/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/how-to/invite-and-remove-members.md +3 -2
- package/dist/docs/reference/dashboard/fields.mdx +17 -11
- package/dist/docs/reference/sdk/features.md +5 -0
- package/dist/docs/reference/sdk/fields.md +38 -6
- package/dist/docs/reference/sdk/type-generation.md +18 -7
- package/dist/docs/reference/tools/mcp.md +3 -1
- package/dist/esm/index.js +258 -239
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/plugins/responses-browser-storage/index.js +50 -16
- package/dist/esm/plugins/responses-indexeddb/index.js +1 -1
- package/dist/esm/plugins/telemetry/index.js +6 -3
- package/dist/esm/server/index.js +13 -13
- package/dist/{experience-instance-DGk11d8a.js → experience-instance-B9S6Yf0N.js} +302 -154
- package/dist/experience-instance-D8rOg6We.cjs +1 -0
- package/dist/{plugin-CYXHEafF.js → plugin-ChafFq6S.js} +3 -2
- package/dist/{plugin-rwzR9hVc.cjs → plugin-Dn25Gffy.cjs} +1 -1
- package/dist/{provider-BWDd3oaq.js → provider-B8wvmeC8.js} +15 -11
- package/dist/provider-BBLlQOjV.cjs +1 -0
- package/dist/types/client.d.ts +21 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/data-source/provider.d.ts +3 -3
- package/dist/types/data-source/provider.d.ts.map +1 -1
- package/dist/types/data-source/request-observer.d.ts +23 -19
- package/dist/types/data-source/request-observer.d.ts.map +1 -1
- package/dist/types/entities/experience/experience.d.ts +8 -0
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +26 -7
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/field/policies.d.ts +35 -0
- package/dist/types/entities/field/policies.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lifecycle/lifecycle.d.ts +1 -1
- package/dist/types/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/types/picked.d.ts +4 -13
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +3 -8
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +11 -0
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/telemetry/plugin.d.ts +2 -2
- package/dist/types/plugins/telemetry/plugin.d.ts.map +1 -1
- package/dist/types/utils/client-telemetry.d.ts +25 -0
- package/dist/types/utils/client-telemetry.d.ts.map +1 -0
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts +16 -6
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts +18 -7
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +30 -6
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/node-tree/node-adjacency.d.ts +50 -0
- package/dist/types/utils/node-tree/node-adjacency.d.ts.map +1 -0
- package/dist/types/utils/node-tree/node-tree-index.d.ts +57 -0
- package/dist/types/utils/node-tree/node-tree-index.d.ts.map +1 -0
- package/dist/{version-BaI_1eQx.cjs → version-CLjPfmxk.cjs} +1 -1
- package/dist/{version-DXDZM7eT.js → version-CPKulHMH.js} +2 -2
- package/package.json +5 -5
- package/dist/experience-instance-Dej3P1sE.cjs +0 -1
- package/dist/provider-lgLyP_0N.cjs +0 -1
- package/dist/types/ping.d.ts +0 -11
- package/dist/types/ping.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rules-logic-CGZIYgAI.cjs");require("./logger-CSTvAyyB.cjs");const t=require("./dom-DlLH3FxV.cjs");let n=require("effector"),r=require("@withease/factories");function i(e){return e.type===`condition`}function a(e){return e.type===`step`}function o(e){return e.type===`experience`}function s(e){return e.type===`origin`}function c(e){return e.type===`action`}var l=[],u=(e,t)=>{let n=new Map;for(let t of e)n.set(t.id,t);let r=new Map,i=new Map;for(let e of t){let t=r.get(e.sourceNodeId);t?t.push(e):r.set(e.sourceNodeId,[e]);let n=i.get(e.destinationNodeId);n?n.push(e):i.set(e.destinationNodeId,[e])}return{nodeById:n,outgoingEdges:r,incomingEdges:i}},d=(e,t)=>e.outgoingEdges.get(t)??l,f=(e,t)=>e.incomingEdges.get(t)??l,p=-1,m=-1/0,h=(e,t)=>Array.from({length:e},()=>t),g=e=>Array.from({length:e},()=>!1),_=(e,t,n)=>{let r=[];for(let i of e){let e=n.get(i[t]);e!==void 0&&r.push(e)}return r},v=(e,t)=>{let n=new Map;t.forEach((e,t)=>{n.set(e,t)});let r={successors:[],predecessors:[],isLeaf:[],isOrigin:[],leaves:[],origins:[]};return t.forEach((t,i)=>{let a=d(e,t);r.successors.push(_(a,`destinationNodeId`,n)),r.predecessors.push(_(f(e,t),`sourceNodeId`,n));let o=a.length===0;r.isLeaf.push(o),o&&r.leaves.push(i);let s=e.nodeById.get(t)?.type===`origin`;r.isOrigin.push(s),s&&r.origins.push(i)}),r},y=(e,t,n)=>{let r=h(n,p),i=[...e];for(let t of e)r[t]=0;let a=0,o=0;for(;o<i.length;){let e=i[o];if(o+=1,e===void 0)continue;a+=1;let n=(r[e]??0)+1;for(let a of t[e]??[])r[a]===p&&(r[a]=n,i.push(a))}return{values:r,visits:a}},b=(e,t)=>{e.discoveryOf[t]=e.counter,e.lowLinkOf[t]=e.counter,e.counter+=1,e.stack.push(t),e.onStack[t]=!0,e.frames.push({node:t,edge:0}),e.visits+=1},x=(e,t)=>{let n=(e.successors[t.node]??[])[t.edge];if(t.edge+=1,n!==void 0){if(e.discoveryOf[n]===p){b(e,n);return}e.onStack[n]&&(e.lowLinkOf[t.node]=Math.min(e.lowLinkOf[t.node]??0,e.discoveryOf[n]??0))}},S=(e,t)=>{e.frames.pop(),e.visits+=1;let n=e.frames[e.frames.length-1];if(n&&(e.lowLinkOf[n.node]=Math.min(e.lowLinkOf[n.node]??0,e.lowLinkOf[t.node]??0)),e.lowLinkOf[t.node]!==e.discoveryOf[t.node])return;let r=[];for(;;){let n=e.stack.pop();if(n===void 0||(e.onStack[n]=!1,e.componentOf[n]=e.members.length,r.push(n),n===t.node))break}e.members.push(r)},C=(e,t)=>{let n={successors:e,discoveryOf:h(t,p),lowLinkOf:h(t,p),onStack:g(t),componentOf:h(t,p),stack:[],frames:[],members:[],counter:0,visits:0};for(let r=0;r<t;r+=1)if(n.discoveryOf[r]===p)for(b(n,r);n.frames.length>0;){let t=n.frames[n.frames.length-1];if(!t)break;t.edge<(e[t.node]??[]).length?x(n,t):S(n,t)}return{componentOf:n.componentOf,members:n.members,visits:n.visits}},w=(e,t,n)=>{let r=m;for(let i of e.adjacency[t]??[]){let t=e.components.componentOf[i]??p;if(t===n)continue;let a=e.perComponent[t]??m;a!==m&&(r=Math.max(r,a+1))}return r},T=(e,t)=>{let n=m;for(let r of e.components.members[t]??[]){if(e.isTerminus[r]){n=Math.max(n,0);continue}n=Math.max(n,w(e,r,t))}return n},E=(e,t,n,r)=>{let i=n.members.length,a={adjacency:e,isTerminus:t,components:n,perComponent:h(i,m)},o=0;for(let e=0;e<i;e+=1){let t=r?i-1-e:e,s=(n.members[t]??[]).length;o+=s;let c=T(a,t);a.perComponent[t]=c===m?m:c+s-1}return{values:n.componentOf.map((e,n)=>{if(t[n])return 0;let r=a.perComponent[e]??m;return r===m?p:r}),visits:o}},D=(e,t,n)=>{let r=new Map;return e.forEach((e,i)=>{let a=t.values[i]??p,o=n.values[i]??p;r.set(e,a===p?[p,p]:[a,o])}),r},O=(e,t)=>{let n=u(e,t),r=[...n.nodeById.keys()],i=r.length,a=v(n,r),o=C(a.successors,i),s=y(a.leaves,a.predecessors,i),c=E(a.successors,a.isLeaf,o,!1),l=y(a.origins,a.successors,i),d=E(a.predecessors,a.isOrigin,o,!0);return{...n,stepsToLeaf:D(r,s,c),stepsToOrigin:D(r,l,d),nodeVisits:o.visits+s.visits+c.visits+l.visits+d.visits}},k=(e,t,n)=>{let r=1/0,i=m;for(let a of t){let t=e.get(a[n]);!t||t[0]===p||(r=Math.min(r,t[0]+1),i=Math.max(i,t[1]+1))}return r===1/0?[p,p]:[r,i]},A=(e,t)=>{let n=e.stepsToLeaf.get(t.id);if(n)return[n[0],n[1]];let r=d(e,t.id);return r.length===0?[0,0]:k(e.stepsToLeaf,r,`destinationNodeId`)},ee=(e,t)=>{let n=e.stepsToOrigin.get(t.id);return n?[n[0],n[1]]:t.type===`origin`?[0,0]:k(e.stepsToOrigin,f(e,t.id),`sourceNodeId`)},j=`conditions.`,M=(0,n.createDomain)(`condition-results`);function N(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function P(e){if(e===void 0)return null;if(Array.isArray(e))return e.map(e=>P(e));if(N(e)){let t=Object.keys(e).sort((e,t)=>e.localeCompare(t)),n={};for(let r of t)n[r]=P(e[r]);return n}return e}function F(e){return JSON.stringify(P(e))}var I=(0,r.createFactory)(()=>{let e=M.store({}),t=(0,n.createApi)(e,{set(e,t){return e[t.hash]===t.result?e:{...e,[t.hash]:t.result}},seed(e,t){return Object.keys(t).every(n=>e[n]===t[n])?e:{...e,...t}},clear(){return{}}});function r(e){t.set(e)}function i(e){t.seed(e)}function a(){t.clear()}function o(t){return e.getState()[t]}return{store:e,set:r,seed:i,peek:o,reset:a}});function L(){return(0,r.invoke)(I)}async function R(t,n,r){return n==null?!0:typeof n==`boolean`?n:!e.n(n)||await e.t(t,n,r)===!0}function z(e){if(typeof e==`string`)return e;if(Array.isArray(e)&&typeof e[0]==`string`)return e[0]}function B(e){if(Array.isArray(e))return e.some(B);if(N(e)){let t=z(e.var);return t!==void 0&&(t===`actions`||t.startsWith(`actions.`))?!0:Object.values(e).some(B)}return!1}function V(e){if(Array.isArray(e))return e.flatMap(V);if(N(e)){let t=z(e.var);return[...t!==void 0&&t.startsWith(j)?[t.slice(11)]:[],...Object.values(e).flatMap(V)]}return[]}function H(e,t,n=new Set){if(B(e))return!0;for(let r of V(e)){if(n.has(r))continue;n.add(r);let e=t[r];if(e!==void 0&&H(e.logic,t,n))return!0}return!1}async function U(e,t,n){let r={};for(let t of e.conditions.listStore.getState())r[t.key]=t;let i=H(t,r),a=F(t);if(!i){let t=e.conditionResults.peek(a);if(t!==void 0)return t}let o=await R(e,t,n?.context);return i||e.conditionResults.set({hash:a,result:o}),o}async function W(e,t,n){let r=n?.context,i=[n?.precondition,n?.condition,t.condition];for(let t of i)if(!await U(e,t,{context:r}))return!1;return!0}var G=(e,t,n,r)=>r.has(t.id)?[]:(r.add(t.id),a(t)&&!n?[t]:d(e,t.id).flatMap(t=>{let n=e.nodeById.get(t.destinationNodeId);return n?G(e,n,!1,r):[]})),te=(e,t)=>G(e,t,!0,new Set),K=e=>e.find(e=>e.type===`origin`)||null,q=(e,t,n)=>{if(!e)return K(t);let r=n.find(t=>t.sourceNodeId===e.id);return r&&t.find(e=>e.id===r.destinationNodeId)||null};async function ne(e,t,n,r){let i=e?`true`:`false`,a=r.find(e=>e.sourceHandle===i&&e.sourceNodeId===t);return n.find(e=>e.id===a?.destinationNodeId)}function J(e,t,n,r){let i=r.filter(e=>e.sourceNodeId===t),a=e?`true`:`false`,o=i.find(e=>e.sourceHandle===a)??i.find(e=>e.sourceHandle==null);return n.find(e=>e.id===o?.destinationNodeId)}var Y=(0,n.createDomain)(`experience-instance`),X=(0,r.createFactory)(({client:r,experience:l,target:u,options:d})=>{let f=(0,n.createEvent)(),p=(0,n.createEvent)(),m=(0,n.createEvent)(),h=(0,n.createEvent)(),g=(0,n.createEvent)(),_=(0,n.createEvent)(),v=(0,n.createEvent)(),y=l.componentStore,b=Y.store(`transitioning`),x=r.history.entriesStore.map(e=>e.filter(e=>e.experienceId===l.id)),S=x.map(e=>e.filter(e=>a(e.node))),C=x.map(e=>e.at(-1)?.node||null),w=Y.store(null);(0,n.sample)({clock:[C,r.steps.listStore,_],source:{steps:r.steps.listStore,node:C},filter:({node:e})=>e!==null&&a(e),fn:({steps:e,node:t})=>t&&a(t)?e.find(e=>e.id===t.stepId)??null:null,target:w});let T=(0,n.combine)(r.steps.listStore,S,(e,t)=>{let n=t.at(-2);if(!n||!a(n.node))return null;let r=n.node;return e.find(e=>e.id===r.stepId)||null}),E=(0,n.combine)(l.nodeTreeStore,C,(e,t)=>t?te(e,t):[]),D=(0,n.combine)(l.nodeTreeStore,C,(e,t)=>t?ee(e,t):[-1,-1]),O=(0,n.combine)(l.nodeTreeStore,C,(e,t)=>t?A(e,t):[-1,-1]),k=Y.store(!1),j=(0,n.createApi)(k,{open:()=>!0,close:()=>!1,toggle:e=>!e,set:(e,t)=>t}),M=(0,n.createEffect)(async()=>{r.history.back({experienceId:l.id})}),N=(0,n.attach)({source:l.treeStore,effect:async(e,t)=>{let n=e.nodes.find(e=>a(e)&&e.stepId===t);n&&r.history.push({experienceId:l.id,node:n})}}),P=(0,n.attach)({source:l.treeStore,effect:async(e,t)=>{let n=e.steps.find(e=>e.key===t);if(!n)return;let i=e.nodes.find(e=>a(e)&&e.stepId===n.id);i&&r.history.push({experienceId:l.id,node:i})}}),F=(0,n.attach)({source:C,effect:e=>{}}),I=(0,n.attach)({source:l.treeStore,effect:async({nodes:e})=>K(e)}),L=(0,n.attach)({source:l.treeStore,effect:async({nodes:e,edges:t},n)=>{if(s(n))return q(n,e,t)}}),R=(0,n.attach)({source:l.treeStore,effect:async({nodes:t,edges:n,conditions:a},o)=>{if(!i(o))return;let s=a.find(e=>e.id===o.conditionId)?.logic;return s?ne(!!await e.t(r,s),o.id,t,n):void 0}}),z=(0,n.attach)({source:{tree:l.treeStore,actions:r.actions.listStore,snapshot:r.stateSnapshotStore},effect:async({tree:e,actions:t,snapshot:n},r)=>{let{nodes:i,edges:a}=e;if(!c(r))return;let o=r.actionKey;if(!o){`${r.id}`;return}let s=t.find(e=>e.key===o)?.action;if(typeof s!=`function`)return`${o}`,J(!1,r.id,i,a)??null;let l=!0;try{`${o}`,await s({...n,args:[]},{experience:X})}catch{`${o}`,l=!1}let u=J(l,r.id,i,a);if(!u){let e=a.some(e=>e.sourceNodeId===r.id)?`no edge for its outcome`:`no outgoing edge`;return`${r.id}${e}`,null}return`${o}${u.id}`,u}}),B=(0,n.createEffect)(e=>{o(e)&&r.experiences.launch({key:e.experienceKey})}),V=(0,n.attach)({source:[C,l.treeStore],effect:async([e,{nodes:t,edges:n}])=>q(e,t,n)}),H=(0,n.attach)({source:[C,l.treeStore],effect:async([e,{nodes:t,edges:n}])=>q(e,t,n)}),U=(0,n.createEffect)(e=>{r.history.push({experienceId:l.id,node:e})}),W=(0,n.attach)({source:l.configStore,effect:async({initializeOpenLogic:t})=>d?.initialiseOpen===void 0?e.n(t)?!!await e.t(r,t):t??!1:d.initialiseOpen}),G=(0,n.combine)(y,r.frameworks.listStore,(e,t)=>{if(!e)return null;let n=t.find(t=>t.name===e.component.frameworkName);return n?{component:e,framework:n}:null},{skipVoid:!1}),X,Z=(0,n.attach)({source:G,effect:e=>{if(!e)return;if(!u){`${l.id}`;return}let n=t.n(u);try{e.framework.render(n,e.component.component,r,X)}catch{}}});X=Object.freeze({id:Math.random().toString(36).substring(7),experienceKey:l.key,experienceId:l.id,experienceName:l.name,configStore:l.configStore,target:u,componentStore:y,componentAndFrameworkStore:G,stateStore:b,isOpenStore:k,open:j.open,close:j.close,toggleOpen:j.toggle,setOpen:j.set,treeStore:l.treeStore,currentNodeStore:C,currentStepStore:w,previousStepStore:T,nextReachableStepNodesStore:E,stepsToOriginStore:D,stepsToLeafStore:O,goToNextStep:p,goToPreviousStep:m,goToStepById:h,goToStepByKey:g,stepsHistoryStore:S,mountFx:Z});let Q=(0,n.createEvent)(),$=(0,n.createEvent)();return(0,n.sample)({clock:C,target:Q}),(0,n.sample)({clock:Q,filter:e=>e===null,target:I}),(0,n.sample)({clock:Q,filter:e=>e!==null,target:$}),(0,n.split)({source:$,match:e=>i(e)?`condition`:a(e)?`step`:o(e)?`launchExperience`:s(e)?`origin`:c(e)?`action`:`other`,cases:{origin:L,condition:R,step:F,launchExperience:B,action:z,__:(0,n.createEvent)()}}),(0,n.sample)({clock:[R.doneData,L.doneData,I.doneData,H.doneData,V.doneData,z.doneData],filter:Boolean,target:U}),(0,n.sample)({clock:p,target:H}),(0,n.sample)({clock:p,source:w,filter:Boolean,target:r.eventBus.prepend(e=>({type:`step_submit`,step:e,experience:X}))}),(0,n.sample)({clock:H.done,source:w,filter:Boolean,target:r.eventBus.prepend(e=>({type:`step_submit_success`,step:e,experience:X}))}),(0,n.sample)({clock:H.fail,source:w,filter:Boolean,target:r.eventBus.prepend(e=>({type:`step_submit_error`,step:e,experience:X}))}),(0,n.sample)({clock:m,target:M}),(0,n.sample)({clock:h,target:N}),(0,n.sample)({clock:g,target:P}),(0,n.sample)({source:(0,n.combine)([R.pending,L.pending,I.pending,H.pending,V.pending,z.pending]),fn:e=>e.some(Boolean)?`transitioning`:`ready`,target:b}),(0,n.sample)({clock:F.doneData,source:w,filter:Boolean,target:r.eventBus.prepend(e=>({type:`step_enter`,step:e,experience:X}))}),(0,n.sample)({clock:v,target:W}),(0,n.sample)({source:W.doneData,fn:Boolean,target:k}),(0,n.sample)({source:C,clock:f,filter:e=>!e||s(e),target:V}),(0,n.sample)({source:k,filter:Boolean,target:f}),(0,n.sample)({source:k,filter:Boolean,target:r.eventBus.prepend(()=>({type:`experience_open`,experience:X}))}),(0,n.sample)({source:k,filter:e=>!e,target:r.eventBus.prepend(()=>({type:`experience_close`,experience:X}))}),(0,n.sample)({clock:_,target:[v]}),_(),X});function Z(e){return(0,r.invoke)(X,e)}var Q=(0,r.createFactory)(({client:e})=>{let r=Y.store({}),i=(0,n.createEvent)(),a=(0,n.createEvent)(),o=(0,n.createEvent)(),s=(0,n.createApi)(r,{register(e,t){let n=[...e[t.experienceId]??[]];return n.push(t),{...e,[t.experienceId]:n}},unregister(e,t){let n=t.experienceId,r=e[n]?.filter(e=>e!==t);return{...e,[n]:r??[]}}}),c=(0,n.createEffect)(({experience:t,target:n,options:r})=>Z({client:e,experience:t,target:n,options:r})),l=(0,n.createEffect)(e=>{s.register(e)}),u=(0,n.createEffect)(e=>{e.target&&t.o(e.target,()=>{o(e)})}),d=(0,n.createEffect)(e=>{s.unregister(e)}),f=(0,n.createEffect)(async e=>{await e.mountFx()});(0,n.sample)({clock:i,target:c}),(0,n.sample)({clock:o,target:d}),(0,n.sample)({clock:c.doneData,target:[l,u,a]}),(0,n.sample)({clock:c.doneData,target:e.eventBus.prepend(e=>({type:`experience_initialize`,experience:e}))}),(0,n.sample)({clock:a,target:f});function p(e,t,n){i({experience:e,target:t,options:n})}let m=r.map(e=>Object.values(e).flat());function h(e){return m.map(t=>t.filter(t=>t.experienceKey===e),{skipVoid:!1})}function g(e){return r.map(t=>t[e]||[],{skipVoid:!1})}return{spawn:p,getByExperienceKey:h,getByExperienceId:g,listStore:m}});function $(e){return(0,r.invoke)(Q,e)}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return i}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./logger-DMN6TxJJ.js";
|
|
2
|
-
import { r as e } from "./version-
|
|
3
|
-
import "./api-
|
|
2
|
+
import { r as e } from "./version-CPKulHMH.js";
|
|
3
|
+
import "./api-C7q_7vxn.js";
|
|
4
4
|
import { attach as t } from "effector";
|
|
5
5
|
//#region src/plugins/dynamic-experiences/hash.ts
|
|
6
6
|
function n(e) {
|
|
@@ -118,6 +118,7 @@ function b(e, t, n) {
|
|
|
118
118
|
e.registerFeature(t.id, {
|
|
119
119
|
key: `${n}`,
|
|
120
120
|
name: t.name,
|
|
121
|
+
enabled: !0,
|
|
121
122
|
weight: t.weight,
|
|
122
123
|
...t.valueType !== void 0 && { valueType: t.valueType },
|
|
123
124
|
...t.variants !== void 0 && { variants: t.variants },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("./logger-CSTvAyyB.cjs");const e=require("./version-
|
|
1
|
+
require("./logger-CSTvAyyB.cjs");const e=require("./version-CLjPfmxk.cjs");require("./api-Ctvh1qkk.cjs");let t=require("effector");function n(e){let t=2166136261;for(let n of e)t^=n.codePointAt(0)??0,t=Math.imul(t,16777619);return t>>>0}function r(e){let t=e;return t^=t>>>16,t=Math.imul(t,2246822507),t^=t>>>13,t=Math.imul(t,3266489909),t^=t>>>16,t>>>0}function i(e,t){return r(n(`${e}:${t}`))%100}function a(e,t){return t<=0?!1:t>=100||e<t}var o=4294967296;function s(e,t,i){return(r(n(`${e}:${t}:${i}`))+.5)/o}function c(e,t,n){return n.weight<=0?0:n.weight/-Math.log(s(e,t,n.key))}function l(e,t,n){let r=null,i=0;for(let a of n){let n=c(e,t,a);n<=0||(n>i||n===i&&r!==null&&a.key<r.key)&&(i=n,r=a)}return r}function u(e,t){if(Array.isArray(t.conditions))for(let n of t.conditions)e.registerCondition(n)}function d(e,t){e.registerExperience({id:t.id,key:t.key,name:t.name,targets:t.targets,nodes:t.nodes,edges:t.edges,condition:t.condition,initializeOpen:t.initializeOpen,componentName:t.componentName})}function f(e){return typeof e!=`object`||!e?!1:`id`in e&&`key`in e&&`type`in e&&`name`in e}function p(e,t){if(Array.isArray(t.fields))for(let n of t.fields)f(n)&&e.registerField(n)}function m(e,t){if(!Array.isArray(t.steps))return;let n=new Map(t.fields.map(e=>[e.id,e.key]));for(let r of t.steps){let t=[];for(let e of r.fieldIds??[]){let i=n.get(e);if(i===void 0){`${r.key}${e}`;continue}t.push(i)}let i=r.layoutContentId?e.contents.getById(r.layoutContentId):null;e.registerStep({id:r.id,key:r.key,name:r.name,fieldKeys:t,layoutName:r.layoutName,...r.layoutContentId!==void 0&&{layoutContentId:r.layoutContentId,layoutContentStore:i}})}}function h(e,t){if(Array.isArray(t.experiences))for(let n of t.experiences)d(e,n)}function g(e,t,n){y(e,t,n.isPreview,n.sessionId),u(e,t),p(e,t),m(e,t),h(e,t)}function _(e){let t=e.searchParams[`preview-token`];if(t&&t.length>0)return t[0]}function v(t){let n=new Map,r=t.searchParams.feature;if(!r)return n;for(let t of r){let r=e.r(t);r&&n.set(r.id,r.bucket)}return n}function y(e,t,n,r){let i=v(e);for(let a of t.features){let t=i.get(a.id);if(t!==void 0){b(e,a,t);continue}x(e,a,n,r)}}function b(e,t,n){e.registerFeature(t.id,{key:`${n}`,name:t.name,enabled:!0,weight:t.weight,...t.valueType!==void 0&&{valueType:t.valueType},...t.variants!==void 0&&{variants:t.variants},storage:`session`,decide:()=>n})}function x(e,t,n,r){let o=t.id,s=t.variants;e.registerFeature(o,{key:`v${t.version}`,name:t.name,enabled:t.enabled,weight:t.weight,storage:n?`session`:`local`,valueType:t.valueType,variants:s,decide:()=>t.valueType===`text`?!s||s.length===0?(`${o}`,!1):l(r,o,s)?.value??!1:a(i(r,o),t.weight)})}function S(e,t){for(let n of[...t.references??[],...t.content])e.registerContent({id:n.id,contentModelKey:n.contentModelKey,data:n.data})}function C(e,t){let n=new Map;return(r,i)=>{let a=n.get(r.id);if(a)return a;let o=(async()=>{try{let n=await t(r,i);return n&&S(e,n),n}finally{n.delete(r.id)}})();return n.set(r.id,o),o}}function w(e,t){let n=new Set(t&&Array.isArray(t.experiences)?t.experiences.map(e=>e.id):[]);return(t,r)=>n.has(t.id)?e(t,r):Promise.resolve(null)}function T(){return{name:`dynamic-experiences`,setup:e=>({onStart:(0,t.attach)({source:e.session.store.map(e=>e.id),effect:async t=>{let n=_(e),r=n!==void 0,i=n===void 0?void 0:{previewToken:n},a=await e.getProjectConfig(n===void 0?void 0:{previewToken:n}).catch(e=>null);if(e.contentLoader=C(e,w(t=>e.getExperienceContent(t,i),a)),!a)return;let o=e.seededVersionId;if(o!==null&&o!==a.versionId){e.versionSkew={seeded:o,resolved:a.versionId},`${a.versionId}${o}`;return}e.previewEmbedderOrigins=a.previewEmbedderOrigins??null,g(e,a,{isPreview:r,sessionId:t})}})})}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return T}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./logger-DMN6TxJJ.js";
|
|
2
|
-
import { n as e, t } from "./api-
|
|
2
|
+
import { n as e, t } from "./api-C7q_7vxn.js";
|
|
3
3
|
import { r as n, t as r } from "./registry-CXZv0uLg.js";
|
|
4
4
|
//#region src/data-source/request-observer.ts
|
|
5
5
|
function i(e, t) {
|
|
@@ -9,18 +9,20 @@ function i(e, t) {
|
|
|
9
9
|
return {};
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function a(e, t) {
|
|
12
|
+
function a(e, t, n) {
|
|
13
13
|
try {
|
|
14
|
-
e.onSettled?.(t);
|
|
14
|
+
e.onSettled?.(t, n);
|
|
15
15
|
} catch {}
|
|
16
16
|
}
|
|
17
17
|
async function o(e, t, n) {
|
|
18
|
-
let r = i(e?.(), t);
|
|
18
|
+
let r = i(e?.(), t), o;
|
|
19
19
|
try {
|
|
20
|
-
let e = await n(r.headers)
|
|
21
|
-
|
|
20
|
+
let e = await n(r.headers, (e) => {
|
|
21
|
+
o = e;
|
|
22
|
+
});
|
|
23
|
+
return a(r, e !== null, o), e;
|
|
22
24
|
} catch (e) {
|
|
23
|
-
throw a(r, !1), e;
|
|
25
|
+
throw a(r, !1, o), e;
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
//#endregion
|
|
@@ -54,10 +56,11 @@ function d(n) {
|
|
|
54
56
|
async function T() {
|
|
55
57
|
if (_) return w(await C()), _;
|
|
56
58
|
let t = await C();
|
|
57
|
-
return w(t), t ? t.projectConfig : h === s ? null : o(p, "project-config", (t) => e(i, a, {
|
|
59
|
+
return w(t), t ? t.projectConfig : h === s ? null : o(p, "project-config", (t, n) => e(i, a, {
|
|
58
60
|
...d !== void 0 && { previewToken: d },
|
|
59
61
|
...f !== void 0 && { signal: f },
|
|
60
|
-
...t !== void 0 && { headers: t }
|
|
62
|
+
...t !== void 0 && { headers: t },
|
|
63
|
+
...n !== void 0 && { onResponse: n }
|
|
61
64
|
}));
|
|
62
65
|
}
|
|
63
66
|
async function E(e, n) {
|
|
@@ -71,10 +74,11 @@ function d(n) {
|
|
|
71
74
|
}
|
|
72
75
|
if (h === s) return null;
|
|
73
76
|
let l = n ?? f;
|
|
74
|
-
return o(p, "experience-content", (n) => t(i, a, e.id, {
|
|
77
|
+
return o(p, "experience-content", (n, r) => t(i, a, e.id, {
|
|
75
78
|
...d !== void 0 && { previewToken: d },
|
|
76
79
|
...l !== void 0 && { signal: l },
|
|
77
|
-
...n !== void 0 && { headers: n }
|
|
80
|
+
...n !== void 0 && { headers: n },
|
|
81
|
+
...r !== void 0 && { onResponse: r }
|
|
78
82
|
}));
|
|
79
83
|
}
|
|
80
84
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("./logger-CSTvAyyB.cjs");const e=require("./api-Ctvh1qkk.cjs"),t=require("./registry-C1t8l3t9.cjs");function n(e,t){try{return e?.onRequest(t)??{}}catch{return{}}}function r(e,t,n){try{e.onSettled?.(t,n)}catch{}}async function i(e,t,i){let a=n(e?.(),t),o;try{let e=await i(a.headers,e=>{o=e});return r(a,e!==null,o),e}catch(e){throw r(a,!1,o),e}}var a=`bundle`,o=`api`;async function s(){try{let e=await import(`virtual:picked/data`);return t.r(e)?e:null}catch{return null}}function c(e){if(e===void 0||t.r(e))return e}function l(n){let{apiUrl:r,projectId:l,previewToken:u,signal:d,getRequestObserver:f}=n,p=!!u,m=p?o:n.mode,h=c(p?void 0:n.bundle),g=p?void 0:n.projectConfig,_=n.getContent,v={mode:m??o,manifest:null},y,b,x=new Map;function S(){if(m===o)return Promise.resolve(null);if(h)return Promise.resolve(h);let e=t.t();return e?Promise.resolve(e):(y??=s(),y)}function C(e){v.mode=e?a:o,v.manifest=e?e.manifestMetadata:null}async function w(){if(g)return C(await S()),g;let t=await S();return C(t),t?t.projectConfig:m===a?null:i(f,`project-config`,(t,n)=>e.n(r,l,{...u!==void 0&&{previewToken:u},...d!==void 0&&{signal:d},...t!==void 0&&{headers:t},...n!==void 0&&{onResponse:n}}))}async function T(t,n){let o=u===void 0?void 0:{previewToken:u};if(_)return _(t,o);let s=await S();if(C(s),s)try{return await s.experienceContent(t,o)}catch{return`${t.id}`,null}if(m===a)return null;let c=n??d;return i(f,`experience-content`,(n,i)=>e.t(r,l,t.id,{...u!==void 0&&{previewToken:u},...c!==void 0&&{signal:c},...n!==void 0&&{headers:n},...i!==void 0&&{onResponse:i}}))}return{meta:v,getProjectConfig:()=>(b??=w(),b),getContent:(e,t)=>{let n=x.get(e.id);if(n)return n;let r=T(e,t?.signal).finally(()=>{x.delete(e.id)});return x.set(e.id,r),r}}}exports.createPickedDataProvider=l;
|
package/dist/types/client.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { Predicate } from './entities/predicate/predicate';
|
|
|
3
3
|
import type { Action } from './entities/action/action';
|
|
4
4
|
import type { Plugin } from './entities/plugin/plugin';
|
|
5
5
|
import type { Feature } from './entities/feature/feature';
|
|
6
|
+
import type { FieldDefinition } from './entities/field/field';
|
|
6
7
|
import type { AdaptedComponent } from './entities/component/component';
|
|
7
8
|
import type { LogicRule } from './logic-engine';
|
|
8
9
|
export interface CreateClientOptions {
|
|
@@ -98,6 +99,26 @@ export interface CreateClientOptions {
|
|
|
98
99
|
* ```
|
|
99
100
|
*/
|
|
100
101
|
features?: Record<string, Feature | (() => Feature)>;
|
|
102
|
+
/**
|
|
103
|
+
* Register fields that capture responses in experiences. The record key supplies the
|
|
104
|
+
* field `key` when the definition omits one; an explicit `key` on the definition wins.
|
|
105
|
+
* A function value is resolved once during client setup.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```typescript
|
|
109
|
+
* fields: {
|
|
110
|
+
* email: {
|
|
111
|
+
* id: 'email',
|
|
112
|
+
* name: 'email',
|
|
113
|
+
* label: 'Email',
|
|
114
|
+
* type: 'text',
|
|
115
|
+
* multiple: false,
|
|
116
|
+
* required: true,
|
|
117
|
+
* }
|
|
118
|
+
* }
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
fields?: Record<string, FieldDefinition | (() => FieldDefinition)>;
|
|
101
122
|
/**
|
|
102
123
|
* Register components for use in dynamic experiences.
|
|
103
124
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;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AC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAC,CAAA;IAEpD;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,MAAM,eAAe,CAAC,CAAC,CAAA;IAElE;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAE7C;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,SAAS,CAAA;IAExB;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { ExperienceContentResponse, ProjectConfig } from '@picked/delivery-api-client';
|
|
11
11
|
import type { ContentLoader, PickedManifestMetadata, VirtualPickedData } from '../plugins/dynamic-experiences/types';
|
|
12
|
-
import { type
|
|
12
|
+
import { type DeliveryAPIRequestObserverSource } from './request-observer';
|
|
13
13
|
import { isVirtualPickedData } from './virtual-data';
|
|
14
14
|
/** Where a data provider reads project config and CMS content from. */
|
|
15
15
|
export type PickedDataMode = 'bundle' | 'api';
|
|
@@ -42,8 +42,8 @@ export interface PickedDataProviderOptions {
|
|
|
42
42
|
getContent?: ContentLoader;
|
|
43
43
|
/** Abort signal applied to API fetches, such as an `AbortSignal.timeout` deadline. */
|
|
44
44
|
signal?: AbortSignal;
|
|
45
|
-
/** Supplies the observer wrapped around each delivery fetch, read once per request. */
|
|
46
|
-
getRequestObserver?:
|
|
45
|
+
/** Supplies the observer wrapped around each delivery API fetch, read once per request. */
|
|
46
|
+
getRequestObserver?: DeliveryAPIRequestObserverSource;
|
|
47
47
|
}
|
|
48
48
|
/** Read-only description of what a provider resolved to. */
|
|
49
49
|
export interface PickedDataProviderMeta {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/data-source/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAE3F,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,sCAAsC,CAAA;AAE7C,OAAO,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/data-source/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAE3F,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,sCAAsC,CAAA;AAE7C,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEpD,uEAAuE;AACvE,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,KAAK,CAAA;AAQ7C,oDAAoD;AACpD,MAAM,WAAW,yBAAyB;IACxC,sFAAsF;IACtF,MAAM,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,sFAAsF;IACtF,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,sFAAsF;IACtF,UAAU,CAAC,EAAE,aAAa,CAAA;IAC1B,sFAAsF;IACtF,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,2FAA2F;IAC3F,kBAAkB,CAAC,EAAE,gCAAgC,CAAA;CACtD;AAED,4DAA4D;AAC5D,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,IAAI,EAAE,cAAc,CAAA;IACpB,gFAAgF;IAChF,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAA;CACxC;AAED,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,wFAAwF;IACxF,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAA;IACrC,4FAA4F;IAC5F,gBAAgB,EAAE,MAAM,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IACrD,oGAAoG;IACpG,UAAU,EAAE,CACV,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EACvC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,KAC/B,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;CAC/C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAYlF;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAyB9B;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,kBAAkB,CAkL/F"}
|
|
@@ -6,53 +6,57 @@
|
|
|
6
6
|
* observer hands back a per-request handle, so each completion correlates to
|
|
7
7
|
* its own request through the closure that created it.
|
|
8
8
|
*/
|
|
9
|
-
/** Which delivery endpoint a request is for. */
|
|
10
|
-
export type
|
|
9
|
+
/** Which delivery API endpoint a request is for. */
|
|
10
|
+
export type DeliveryAPIEndpoint = 'project-config' | 'experience-content';
|
|
11
11
|
/** A request in flight, from the observer's point of view. */
|
|
12
12
|
export interface ObservedRequest {
|
|
13
13
|
/** Headers to merge into this request, such as `traceparent`. */
|
|
14
14
|
headers?: Record<string, string>;
|
|
15
|
-
/** Called once the request has settled. */
|
|
16
|
-
onSettled?: (ok: boolean) => void;
|
|
15
|
+
/** Called once the request has settled, with the HTTP status when the server answered. */
|
|
16
|
+
onSettled?: (ok: boolean, status?: number) => void;
|
|
17
17
|
}
|
|
18
|
-
/** Receives delivery requests as they are made. */
|
|
19
|
-
export interface
|
|
18
|
+
/** Receives delivery API requests as they are made. */
|
|
19
|
+
export interface DeliveryAPIRequestObserver {
|
|
20
20
|
/** Called as a request begins; returns headers to add and a completion callback. */
|
|
21
|
-
onRequest: (endpoint:
|
|
21
|
+
onRequest: (endpoint: DeliveryAPIEndpoint) => ObservedRequest;
|
|
22
22
|
}
|
|
23
23
|
/** Supplies the observer in force for the next request, or `null` when there is none. */
|
|
24
|
-
export type
|
|
24
|
+
export type DeliveryAPIRequestObserverSource = () => DeliveryAPIRequestObserver | null | undefined;
|
|
25
25
|
/**
|
|
26
26
|
* Notifies the observer that a request is starting.
|
|
27
27
|
*
|
|
28
|
-
* @param {
|
|
29
|
-
* @param {
|
|
28
|
+
* @param {DeliveryAPIRequestObserver | null} [observer] - The observer to notify, if any.
|
|
29
|
+
* @param {DeliveryAPIEndpoint} endpoint - Which endpoint is being called.
|
|
30
30
|
* @returns {ObservedRequest} Headers to merge and a completion callback, both possibly absent.
|
|
31
31
|
* @example const observed = beginObservedRequest(observer, 'project-config')
|
|
32
32
|
*/
|
|
33
|
-
export declare function beginObservedRequest(observer:
|
|
33
|
+
export declare function beginObservedRequest(observer: DeliveryAPIRequestObserver | null | undefined, endpoint: DeliveryAPIEndpoint): ObservedRequest;
|
|
34
34
|
/**
|
|
35
35
|
* Notifies the observer that a request has settled.
|
|
36
36
|
*
|
|
37
37
|
* @param {ObservedRequest} observed - The handle returned when the request began.
|
|
38
38
|
* @param {boolean} ok - Whether the request produced a usable result.
|
|
39
|
+
* @param {number} [status] - HTTP status the server answered with, when it answered.
|
|
39
40
|
* @returns {void}
|
|
40
|
-
* @example settleObservedRequest(observed, true)
|
|
41
|
+
* @example settleObservedRequest(observed, true, 200)
|
|
41
42
|
*/
|
|
42
|
-
export declare function settleObservedRequest(observed: ObservedRequest, ok: boolean): void;
|
|
43
|
+
export declare function settleObservedRequest(observed: ObservedRequest, ok: boolean, status?: number): void;
|
|
43
44
|
/**
|
|
44
|
-
* Runs a delivery fetch with the observer wrapped around it.
|
|
45
|
+
* Runs a delivery API fetch with the observer wrapped around it.
|
|
45
46
|
*
|
|
46
47
|
* The observer is read once per request, so one registered after an earlier fetch
|
|
47
48
|
* still applies to this one. Its headers are handed to `run` to travel with the
|
|
48
49
|
* request, and the same handle receives the outcome.
|
|
49
50
|
*
|
|
51
|
+
* `run` reports the HTTP status through the `onResponse` callback it is handed.
|
|
52
|
+
* A fetch that never reached the server leaves the status absent.
|
|
53
|
+
*
|
|
50
54
|
* @template T - The value the fetch resolves to.
|
|
51
|
-
* @param {
|
|
52
|
-
* @param {
|
|
53
|
-
* @param {(headers?: Record<string, string
|
|
55
|
+
* @param {DeliveryAPIRequestObserverSource} [source] - Supplies the observer for this request.
|
|
56
|
+
* @param {DeliveryAPIEndpoint} endpoint - Which endpoint is being called.
|
|
57
|
+
* @param {(headers?: Record<string, string>, onResponse?: (status: number) => void) => Promise<T | null>} run - The fetch to perform.
|
|
54
58
|
* @returns {Promise<T | null>} Whatever the fetch resolved to.
|
|
55
|
-
* @example
|
|
59
|
+
* @example observeDeliveryAPIRequest(source, 'project-config', (headers, onResponse) => fetchProject(url, id, { headers, onResponse }))
|
|
56
60
|
*/
|
|
57
|
-
export declare function
|
|
61
|
+
export declare function observeDeliveryAPIRequest<T>(source: DeliveryAPIRequestObserverSource | undefined, endpoint: DeliveryAPIEndpoint, run: (headers?: Record<string, string>, onResponse?: (status: number) => void) => Promise<T | null>): Promise<T | null>;
|
|
58
62
|
//# sourceMappingURL=request-observer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-observer.d.ts","sourceRoot":"","sources":["../../../src/data-source/request-observer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,
|
|
1
|
+
{"version":3,"file":"request-observer.d.ts","sourceRoot":"","sources":["../../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6,6 +6,7 @@ import type { ExperienceStep } from '../step/step';
|
|
|
6
6
|
import type { Framework } from '../framework/framework';
|
|
7
7
|
import type { Picked } from '../../picked';
|
|
8
8
|
import type { LogicRule, LogicValue } from '../../logic-engine';
|
|
9
|
+
import type { NodeTreeIndex } from '../../utils/node-tree/node-tree-index';
|
|
9
10
|
export type ExperiencesListStore = ReturnType<typeof createExperienceIndex>;
|
|
10
11
|
/** Per-experience reactive entity returned by `createExperience`. */
|
|
11
12
|
export interface ExperienceStore {
|
|
@@ -24,6 +25,13 @@ export interface ExperienceStore {
|
|
|
24
25
|
edges: ExperienceEdge[];
|
|
25
26
|
conditions: Condition[];
|
|
26
27
|
}>;
|
|
28
|
+
/**
|
|
29
|
+
* The experience's flow graph, indexed for constant-time reads: node and edge
|
|
30
|
+
* lookups, plus a table of the min/max steps from every node to a leaf and back
|
|
31
|
+
* to an origin. Derived from the experience record, so it rebuilds when that
|
|
32
|
+
* record updates and a table read costs a map lookup.
|
|
33
|
+
*/
|
|
34
|
+
nodeTreeStore: Store<NodeTreeIndex>;
|
|
27
35
|
componentStore: Store<{
|
|
28
36
|
name: string;
|
|
29
37
|
component: AdaptedComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experience.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience/experience.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,EAOL,KAAK,MAAM,EACX,KAAK,aAAa,EAElB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAG1C,OAA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;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,WAAkB,MAAM,KAAG,OAAO,CAAC,IAAI,CAExE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experience-instance.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience-instance/experience-instance.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAOL,KAAK,MAAM,EACX,KAAK,aAAa,EAGlB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"experience-instance.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience-instance/experience-instance.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAOL,KAAK,MAAM,EACX,KAAK,aAAa,EAGlB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAiB1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAItD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AAG,OAAO,GAAG,MAAM,GAAG,OAAO;IAC/E,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;CACf;AAED,mGAAmG;AACnG,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;AAqB7D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAU3D;AAED,+FAA+F;AAC/F,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,OAAO,GAAG,MAAM,CAAA;CACzB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAa1E;AAED,QAAA,MAAM,yBAAyB,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;YAoBzC,MAAM;iBAAW,OAAO;;kBAoQvC,MAAM;sBAqBF,MAAM;;sCA+DU,MAAM,KAAG,KAAK,CAAC,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;uBAoEhE,CAAC,SAAS,MAAM,eAC3B,CAAC,KACb,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CAqBvD,CAAA;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,CAAC,EAC1F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAE9C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,SAAU,MAAM,WAAW,OAAO,YAAY,aAAa,SAEnF,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @file Field entity — Effector stores, types, and CRUD helpers for experience fields. */
|
|
2
2
|
import { type Store } from 'effector';
|
|
3
3
|
import type { LogicRule } from '../../logic-engine';
|
|
4
|
+
import { type FieldPolicies } from './policies';
|
|
4
5
|
export type FieldsStore = ReturnType<typeof createFieldIndex>;
|
|
5
6
|
export type PrimitiveFieldValue = string | number | boolean | null;
|
|
6
7
|
export type FieldOptionValue = string | number | boolean;
|
|
@@ -37,14 +38,12 @@ export interface FieldBase<TOptionValue = JsonValue> {
|
|
|
37
38
|
validation?: LogicRule;
|
|
38
39
|
/**
|
|
39
40
|
* Privacy policies governing what leaves the page. Both are opt-in: a value is
|
|
40
|
-
* tracked only under `
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* tracked only under `trackValue: true` and persisted only under `storeValue: true`,
|
|
42
|
+
* so an absent policy captures nothing. Registration resolves whatever the field
|
|
43
|
+
* states into all four flags, so a registered field always answers on `trackValue`
|
|
44
|
+
* and `storeValue`.
|
|
43
45
|
*/
|
|
44
|
-
policies?:
|
|
45
|
-
doNotTrackValue?: boolean;
|
|
46
|
-
doNotStoreValue?: boolean;
|
|
47
|
-
};
|
|
46
|
+
policies?: FieldPolicies;
|
|
48
47
|
options?: FieldOptionArray<TOptionValue> | null;
|
|
49
48
|
}
|
|
50
49
|
export interface FieldTextSingular extends FieldBase<string> {
|
|
@@ -88,6 +87,26 @@ export interface FieldBooleanMultiple extends FieldBase<boolean> {
|
|
|
88
87
|
defaultValue?: boolean[];
|
|
89
88
|
}
|
|
90
89
|
export type Field = FieldTextSingular | FieldTextMultiple | FieldNumberSingular | FieldNumberMultiple | FieldObjectSingular | FieldObjectMultiple | FieldBooleanSingular | FieldBooleanMultiple;
|
|
90
|
+
type FieldWithOptionalKey<T> = T extends Field ? Omit<T, 'key'> & {
|
|
91
|
+
key?: string;
|
|
92
|
+
} : never;
|
|
93
|
+
/**
|
|
94
|
+
* A {@link Field} whose `key` is optional. A registration site that accepts one supplies
|
|
95
|
+
* the key from its own context — `createClient({ fields })` uses the record key.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const email: FieldDefinition = {
|
|
100
|
+
* id: 'email',
|
|
101
|
+
* name: 'email',
|
|
102
|
+
* label: 'Email',
|
|
103
|
+
* type: 'text',
|
|
104
|
+
* multiple: false,
|
|
105
|
+
* required: true,
|
|
106
|
+
* }
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export type FieldDefinition = FieldWithOptionalKey<Field>;
|
|
91
110
|
declare const createFieldIndexFactory: () => {
|
|
92
111
|
register: (field: Field) => void;
|
|
93
112
|
update: (key: FieldBase['key'], updates: Partial<Field>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/entities/field/field.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/entities/field/field.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AAEvE,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAI7D,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAExD,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,gBAAgB;IAC/C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB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AmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,CAAA;AAGxB,KAAK,oBAAoB,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAA;AAE1F;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAA;AAEzD,QAAA,MAAM,uBAAuB;sBAqCF,KAAK,KAAG,IAAI;kBAoBhB,SAAS,CAAC,KAAK,CAAC,WAAW,OAAO,CAAC,KAAK,CAAC,KAAG,IAAI;kBAsBhD,SAAS,CAAC,IAAI,CAAC,KAAG,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;oBAcnC,SAAS,CAAC,KAAK,CAAC,KAAG,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;;sBAgBpC,SAAS,CAAC,MAAM,CAAC,KAAG,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;CAiBhE,CAAA;AAEF;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAE7E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** @file Field privacy policies — the policy shape and the normalisation applied at registration. */
|
|
2
|
+
/**
|
|
3
|
+
* Privacy policies governing what leaves the page. Both are opt-in, and neither affects
|
|
4
|
+
* the in-memory response store.
|
|
5
|
+
*/
|
|
6
|
+
export interface FieldPolicies {
|
|
7
|
+
/** Sends the captured value to analytics. */
|
|
8
|
+
trackValue?: boolean;
|
|
9
|
+
/** Persists the captured value in browser storage. */
|
|
10
|
+
storeValue?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `trackValue`. `doNotTrackValue: false` will be removed in a future version.
|
|
13
|
+
*/
|
|
14
|
+
doNotTrackValue?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `storeValue`. `doNotStoreValue: false` will be removed in a future version.
|
|
17
|
+
*/
|
|
18
|
+
doNotStoreValue?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Resolves the policies a field states into all four flags, so every reader downstream
|
|
22
|
+
* consults `trackValue` and `storeValue` alone. The positive flag decides whenever the
|
|
23
|
+
* field states it; otherwise the deprecated flag grants capture at an explicit `false`.
|
|
24
|
+
* An absent `policies` object and an absent flag both withhold the value.
|
|
25
|
+
*
|
|
26
|
+
* @param {FieldPolicies | undefined} policies - The policies as the field states them.
|
|
27
|
+
* @returns {Required<FieldPolicies>} All four flags, each deprecated flag the inverse of its replacement.
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* normaliseFieldPolicies({ doNotTrackValue: false })
|
|
31
|
+
* // { trackValue: true, storeValue: false, doNotTrackValue: false, doNotStoreValue: true }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function normaliseFieldPolicies(policies?: FieldPolicies): Required<FieldPolicies>;
|
|
35
|
+
//# sourceMappingURL=policies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../../../../src/entities/field/policies.ts"],"names":[],"mappings":"AAAA,qGAAqG;AAErG;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,sDAAsD;IACtD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAQD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,CAWxF"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export type * from './entities/experience/experience';
|
|
|
12
12
|
export type * from './entities/step/step';
|
|
13
13
|
export type * from './entities/feature/feature';
|
|
14
14
|
export type * from './entities/field/field';
|
|
15
|
+
export type * from './entities/field/policies';
|
|
15
16
|
export type * from './entities/framework/framework';
|
|
16
17
|
export type * from './entities/history/history';
|
|
17
18
|
export type * from './entities/plugin/plugin';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,cAAc,WAAW,CAAA;AACzB,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,8BAA8B,CAAA;AACjD,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,oCAAoC,CAAA;AACvD,mBAAmB,oDAAoD,CAAA;AACvE,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,sBAAsB,CAAA;AACzC,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,8BAA8B,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,WAAW,EACX,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,E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 interface Lifecycle {
|
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Creates the lifecycle module for a Picked client. Owns the start chain as an effector
|
|
30
|
-
* event graph: `start` triggers a fan-out of effects (
|
|
30
|
+
* event graph: `start` triggers a fan-out of effects (plugin hooks, domInteractive)
|
|
31
31
|
* whose `.done` events drive the next phases via `sample`.
|
|
32
32
|
*
|
|
33
33
|
* @param {object} params - Factory params.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/lifecycle.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,EAOL,KAAK,MAAM,EACX,KAAK,aAAa,EAElB,KAAK,aAAa,EACnB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/lifecycle.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,EAOL,KAAK,MAAM,EACX,KAAK,aAAa,EAElB,KAAK,aAAa,EACnB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAMhD,4CAA4C;AAC5C,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;AAErE,8GAA8G;AAC9G,KAAK,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;AAEjD,6DAA6D;AAC7D,UAAU,SAAS;IACjB,8HAA8H;IAC9H,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;IAE1B,4CAA4C;IAC5C,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,CAAA;IAClC,2FAA2F;IAC3F,uBAAuB,EAAE,aAAa,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IAC3D,wFAAwF;IACxF,oBAAoB,EAAE,aAAa,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IACxD,qDAAqD;IACrD,mBAAmB,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;IAElD,sDAAsD;IACtD,uBAAuB,EAAE,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;IAEjE,iFAAiF;IACjF,eAAe,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IAC1C,8EAA8E;IAC9E,YAAY,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;CACxC;AAuOD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAErE"}
|
package/dist/types/picked.d.ts
CHANGED
|
@@ -18,10 +18,10 @@ import type { Field } from './entities/field/field';
|
|
|
18
18
|
import type { ExperienceStep } from './entities/step/step';
|
|
19
19
|
import type { Content, ContentDataPatch } from './entities/content/content';
|
|
20
20
|
import type { ContentLoader } from './plugins/dynamic-experiences/types';
|
|
21
|
-
import type { DeliveryRequestObserver } from './data-source/request-observer';
|
|
22
21
|
import type { Action } from './entities/action/action';
|
|
23
22
|
import { type Condition } from './entities/condition/condition';
|
|
24
23
|
import { type StartTiming } from './utils/user-timing';
|
|
24
|
+
import { type ClientTelemetry } from './utils/client-telemetry';
|
|
25
25
|
import type { SessionEntity } from './entities/session/session';
|
|
26
26
|
/**
|
|
27
27
|
* Provenance metadata describing where the Picked client's project config and
|
|
@@ -78,18 +78,8 @@ export declare class Picked {
|
|
|
78
78
|
previewEmbedderOrigins: string[] | null;
|
|
79
79
|
/** Config of every registered plugin, keyed by name in registration order. */
|
|
80
80
|
readonly plugins: PluginConfigIndex;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
* Registers the observer wrapped around this client's delivery requests, or clears it.
|
|
84
|
-
*
|
|
85
|
-
* The observer sees each request as it starts, can add headers to it, and is told the
|
|
86
|
-
* outcome. It observes this client alone.
|
|
87
|
-
*
|
|
88
|
-
* @param {DeliveryRequestObserver | null} next - The observer to install, or `null` to remove it.
|
|
89
|
-
* @returns {void}
|
|
90
|
-
* @example client.setDeliveryRequestObserver({ onRequest: () => ({ headers: { traceparent } }) })
|
|
91
|
-
*/
|
|
92
|
-
setDeliveryRequestObserver: (next: DeliveryRequestObserver | null) => void;
|
|
81
|
+
/** This client's telemetry hooks. */
|
|
82
|
+
readonly telemetry: ClientTelemetry;
|
|
93
83
|
private readonly dataProviders;
|
|
94
84
|
readonly eventBus: EventCallable<EventBusPayload>;
|
|
95
85
|
readonly events: EventHistoryStore;
|
|
@@ -436,6 +426,7 @@ export declare class Picked {
|
|
|
436
426
|
private setupFeatures;
|
|
437
427
|
private setupPredicates;
|
|
438
428
|
private setupActions;
|
|
429
|
+
private setupFields;
|
|
439
430
|
private setupComponents;
|
|
440
431
|
getPluginConfig: (pluginName: string) => PluginConfigIndex[string] | Record<string, unknown>;
|
|
441
432
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picked.d.ts","sourceRoot":"","sources":["../../src/picked.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,aAAa,EACnB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3F,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC7B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,iBAAiB,EAAe,MAAM,0BAA0B,CAAA;AAC3F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAA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