@tinkerlandai/indiana-sdk 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +67 -20
- package/README.zh-CN.md +66 -19
- package/dist/ai-usage-JoM7ZWk-.d.ts +247 -0
- package/dist/{ai-usage-Bigjb8MS.d.ts → api-JVC7x2FV.d.ts} +175 -418
- package/dist/chunk-56AYS7RS.js +1 -0
- package/dist/chunk-AEUFCOFG.js +1 -0
- package/dist/chunk-F767CM3T.js +7 -0
- package/dist/chunk-KSNOXNTC.js +1 -0
- package/dist/{chunk-G2R56FKU.js → chunk-USLZX2ZA.js} +1 -1
- package/dist/{chunk-YAFMBXIE.js → chunk-X747SY26.js} +1 -1
- package/dist/{chunk-3ENVRJE6.js → chunk-X7JJAEQQ.js} +1 -1
- package/dist/chunk-YWFNWK7C.js +1 -0
- package/dist/{configuration-sync-VFbY1pCN.d.ts → configuration-sync-BexM2qbg.d.ts} +25 -25
- package/dist/{content-K2HCZVC2.js → content-YNL2CRJZ.js} +1 -1
- package/dist/{funnel-runtime-start-DKcTCRrd.d.ts → funnel-local-client-D1Fe7CZ6.d.ts} +694 -6057
- package/dist/funnel-runtime-host-CAMI6BJS.js +1 -0
- package/dist/index.d.ts +1755 -1915
- package/dist/index.js +1 -1
- package/dist/native-shell.js +1 -1
- package/dist/openrouter.d.ts +4 -3
- package/dist/openrouter.js +1 -1
- package/dist/page.d.ts +7 -7
- package/dist/page.js +1 -1
- package/dist/paywall-MXRMMF3R.js +1 -0
- package/dist/popup.d.ts +2 -2
- package/dist/popup.js +1 -1
- package/dist/react-native.d.ts +2 -2
- package/dist/react-native.js +1 -1
- package/dist/screen-renderer-P7MLBHY5.js +1 -0
- package/dist/server.d.ts +4645 -8
- package/dist/server.js +1 -1
- package/dist/{src-4MRSESVS.js → src-G7UQB3QE.js} +1 -1
- package/dist/visual.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-2A6UYUFA.js +0 -1
- package/dist/chunk-A3N4ZZTM.js +0 -7
- package/dist/chunk-CXYOZSOF.js +0 -1
- package/dist/funnel-runtime-host-HNZ47TZW.js +0 -1
- package/dist/paywall-PD62B2AY.js +0 -1
- package/dist/{chunk-OVMNCZYC.js → chunk-6HG7U6AU.js} +0 -0
- package/dist/{chunk-6X42DWOM.js → chunk-DSPLGTQI.js} +0 -0
- package/dist/{chunk-S5TVMQRC.js → chunk-EXCPE2XH.js} +0 -0
- package/dist/{customer-page-BrCZxcaQ.d.ts → customer-page-WUQVK_tp.d.ts} +4 -4
- package/dist/{errors-BpCmukJr.d.ts → errors-DrdTlPwf.d.ts} +1 -1
- package/dist/{screen-BazUOjwM.d.ts → screen-i6eHL11m.d.ts} +267 -267
package/dist/chunk-CXYOZSOF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as T,b as C,e as E}from"./chunk-A3N4ZZTM.js";import{a as t}from"./chunk-OVMNCZYC.js";import{a as A,j as N,m as D,p as O}from"./chunk-3BQFJANQ.js";import{b as I}from"./chunk-AE4CUTUE.js";import{a as k}from"./chunk-S5TVMQRC.js";var _={name:"@tinkerlandai/indiana-sdk",version:"0.8.0",description:"Framework-independent Indiana SDK for customer identity, entitlements, credits, offers and growth surfaces.",license:"UNLICENSED",repository:{type:"git",url:"git+https://github.com/tinkerlandai/Indiana.git",directory:"packages/sdk"},engines:{node:">=22"},publishConfig:{access:"public",tag:"beta"},type:"module",sideEffects:!1,files:["dist","README.md","README.zh-CN.md","CHANGELOG.md","THIRD_PARTY_NOTICES.md"],exports:{"./react-native":{types:"./dist/react-native.d.ts","react-native":"./dist/react-native.js",import:"./dist/react-native.js",default:"./dist/react-native.js"},".":{types:"./dist/index.d.ts",import:"./dist/index.js"},"./popup":{types:"./dist/popup.d.ts",import:"./dist/popup.js"},"./server":{types:"./dist/server.d.ts",import:"./dist/server.js"},"./openrouter":{types:"./dist/openrouter.d.ts",import:"./dist/openrouter.js"},"./native-shell":{types:"./dist/native-shell.d.ts",import:"./dist/native-shell.js"},"./page":{types:"./dist/page.d.ts",import:"./dist/page.js"},"./visual":{types:"./dist/visual.d.ts",import:"./dist/visual.js"}},scripts:{build:"tsup",prepack:"pnpm run build",typecheck:"tsc --noEmit",lint:"node ../../scripts/lint.mjs --workspace packages/sdk"},dependencies:{"@ai-sdk/provider":"4.0.26","@types/json-schema":"7.0.15","css-tree":"^3.2.1","dom-mutator":"0.7.0",dompurify:"^3.4.15",zod:"4.6.5"},devDependencies:{"@indiana/contracts":"workspace:*","@openrouter/sdk":"^1.4.25","@types/css-tree":"^3.2.0",ai:"7.0.136",tsup:"^8.5.1",typescript:"^5.9.3","whatwg-url-minimum":"0.2.0"},peerDependencies:{"@openrouter/sdk":"^1.4.25"},peerDependenciesMeta:{"@openrouter/sdk":{optional:!0}}};var F=Symbol("IndianaNoContent");function J(d,j,P=URL){let a=d.scope?I.parse(d.scope):void 0,o=new P(d.baseUrl??k);if(o.username||o.password||o.search||o.hash)throw new t("INVALID_URL","baseUrl must not contain credentials, query, or fragment");if(o.protocol!=="https:"&&!(o.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(o.hostname)))throw new t("INVALID_URL","Use HTTPS, or HTTP on localhost during development");let L=d.fetch??globalThis.fetch.bind(globalThis),u=d.timeoutMs??1e4;if(!Number.isFinite(u)||u<=0||u>12e4)throw new t("INVALID_TIMEOUT","timeoutMs must be between 1 and 120000");let p=null,c=0,l=null,m=new Set;function b(){c+=1,p=null,l=null;for(let i of m)i.abort();m.clear()}async function M(i,U={},v="POST",H={}){if(!p)throw new t("NOT_IDENTIFIED","Call identify with a server-issued customer token first");let w=c,n=new AbortController;m.add(n);let f=()=>w!==c?new t("IDENTITY_CHANGED","Customer identity changed while the request was in flight"):new t("TIMEOUT","Indiana request timed out"),y,q=new Promise((r,s)=>{y=()=>s(f()),n.signal.addEventListener("abort",y,{once:!0})}),K=setTimeout(()=>n.abort(),u),x=async()=>{let r=await L(`${o.href.replace(/\/$/,"")}/api/v1/${i}`,{method:v,headers:{"Content-Type":"application/json",Authorization:`Bearer ${p}`,[T]:E.current,[C]:_.version,...a?{"X-Indiana-Project":a.projectId,"X-Indiana-Environment":a.environment}:{}},body:v==="POST"?JSON.stringify(U):void 0,signal:n.signal,credentials:"omit",cache:"no-store",redirect:"error",...H.keepalive?{keepalive:!0}:{}});if(n.signal.aborted)throw f();let s;try{s=r.status===204?F:await r.json()}catch{throw n.signal.aborted?f():new t(r.ok?"INVALID_RESPONSE":"HTTP_ERROR","The gateway returned an unreadable response",r.status,r.headers.get("X-Request-Id")??void 0)}if(n.signal.aborted)throw f();if(w!==c)throw new t("IDENTITY_CHANGED","Customer identity changed while the request was in flight");if(!r.ok){let e=D.safeParse(s),g=e.success&&(!A.safeParse(e.data.error.code).success||N(e.data.error.code,r.status)),S=g?e.data.error.code:"HTTP_ERROR",R=O(S,r.status,{retryAfter:r.headers.get("Retry-After"),recovery:g?e.data.error.recovery:void 0,reason:g?e.data.error.reason:void 0});throw new t(S,g?e.data.error.message:"Indiana request failed",r.status,r.headers.get("X-Request-Id")??(e.success?e.data.requestId:void 0),{...R,...e.success&&e.data.error.retryable===!1?{retryable:!1}:{},...R.retryAfterSeconds===void 0&&e.success&&e.data.error.retryAfterSeconds!==void 0?{retryAfterSeconds:e.data.error.retryAfterSeconds}:{}})}if(r.headers.get(T)!==E.current)throw new t("PROTOCOL_MISMATCH","Response protocol does not match this SDK");if(a&&s&&typeof s=="object"&&"scope"in s){let e=I.safeParse(s.scope);if(!e.success||e.data.projectId!==a.projectId||e.data.environment!==a.environment)throw new t("SCOPE_MISMATCH","Response scope does not match this SDK instance")}let h=r.headers.get("X-Indiana-Telemetry-Subject");if(h){if(!/^[a-f0-9]{64}$/.test(h))throw new t("INVALID_RESPONSE","Invalid telemetry identity");l!==h&&(l=h,j?.(l))}return s};try{return await Promise.race([x(),q])}catch(r){throw w!==c?new t("IDENTITY_CHANGED","Customer identity changed while the request was in flight"):r instanceof t?r:new t(n.signal.aborted?"TIMEOUT":"NETWORK_ERROR",n.signal.aborted?"Indiana request timed out":"Unable to read the Indiana response")}finally{clearTimeout(K),n.signal.removeEventListener("abort",y),m.delete(n)}}return{subjectKey:()=>l,identify(i){if(!i.trim()||/\s/.test(i)||i.length>4096)throw new t("INVALID_TOKEN","A nonempty server-issued token is required");b(),p=i},reset:b,request:M}}export{J as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as re}from"./chunk-6X42DWOM.js";import"./chunk-CXYOZSOF.js";import{Qd as be,bg as me}from"./chunk-A3N4ZZTM.js";import{a}from"./chunk-OVMNCZYC.js";import{Hb as ve}from"./chunk-3BQFJANQ.js";import"./chunk-AE4CUTUE.js";import"./chunk-S5TVMQRC.js";import"./chunk-RRII2DMC.js";import"./chunk-KQCTDXVD.js";function Ce(P){let M=P.view;if(!M?.paywall)throw new a("INVALID_REQUEST","The current node is not a Paywall");let n=M.paywall.receiptId,te=M.nodeId,se=M.visit,I=M.paywall.resolution,Q=I,v="document"in I?I:null;function U(t){return"document"in t?t.offering.id:t.content.offeringVersionId}function ie(t){if(t.id!==I.id||U(t)!==U(I)||t.content?.artifact.sha256!==I.content?.artifact.sha256)throw new a("INVALID_RESPONSE","The pinned Paywall binding changed")}let m=M.paywall.quote,T=M.paywall.operation,W=!1,q=new AbortController,S=M.paywall.purchaseRequestId,H=0,k=M.paywall.selectionGeneration??0,D=M.paywall.canReselect===!0,C=null,N=new Map,J=new Map;function V(t){if(t.purchase&&t.purchase.receiptId!==n)throw new a("INVALID_RESPONSE","Purchase receipt changed");let r=t.run.paywall;return t.purchase??(r?.receiptId===n?r:null)}function $(){if(W)throw new a("IDENTITY_CHANGED","Paywall presentation has closed")}function X(t,r,w){if($(),r!==H||w!==void 0&&m?.operationId!==w)return!1;let y=k,s=t.run.paywall;if(s?.receiptId===n){if((s.selectionGeneration??0)<k)return!1;k=s.selectionGeneration??0,D=s.canReselect===!0,ie(s.resolution)}let l=V(t),u=k>y,_=u?l?.quote??null:l?.quote??m,R=l?.operation??(_?.operationId===m?.operationId?T:null);if(_&&R&&_.operationId!==R.operationId)throw new a("INVALID_RESPONSE","Purchase operation changed");return s?.receiptId===n&&(Q=s.resolution,v="document"in Q?Q:v?{...Q,document:v.document,offering:v.offering}:null),(u||_?.operationId!==m?.operationId)&&(H++,s?.receiptId===n&&(S=s.purchaseRequestId)),m=_,(T?.operationId!==R?.operationId||T?.status==="pending"||R?.status==="complete")&&(T=R),!0}function B(t,r,w){return new Promise((y,s)=>{let l=!1,u=()=>{clearTimeout(Z),q.signal.removeEventListener("abort",Y)},_=x=>{l||(l=!0,u(),y(x))},R=x=>{l||(l=!0,u(),s(x))},Y=()=>R(new a("IDENTITY_CHANGED","Paywall presentation has closed")),Z=setTimeout(()=>R(new a("COMMAND_PENDING","The purchase command is still pending; retry the original request",202,w)),Math.max(0,r-Date.now()));q.signal.addEventListener("abort",Y,{once:!0}),q.signal.aborted&&Y(),t.then(_,R)})}function h(t){return new Promise(r=>{let w=()=>{clearTimeout(y),q.signal.removeEventListener("abort",w),r()},y=setTimeout(w,t);q.signal.addEventListener("abort",w,{once:!0}),q.signal.aborted&&w()})}async function F(t,r,w){$();let y=N.get(t);if(!y){let u=P.pendingCommands?.find(_=>_.requestId===t)??P.pendingCommand;if(u?.operation==="submit"&&u.requestId===t&&u.nodeId===te&&u.visit===se){r.type==="paywall_quote"&&u.input.type==="paywall_quote"&&u.input.predecessor&&!r.predecessor&&(r={...r,predecessor:u.input.predecessor});let _=me.parse(u),R=me.parse({...u,input:r});if(R.operation!=="submit"||_.operation!=="submit"||JSON.stringify(R.input)!==JSON.stringify(_.input))throw new a("CONFLICT","A restored purchase request cannot change its input");r=R.input,y=_,N.set(t,y)}}if(y){if(JSON.stringify(y.input)!==JSON.stringify(r))throw new a("CONFLICT","A purchase request cannot change its input")}else{let u=P.view;if(!u||u.nodeId!==te||u.visit!==se||u.paywall?.receiptId!==n)throw new a("PRECONDITION_FAILED","The Paywall visit has changed");y={operation:"submit",requestId:t,nodeId:te,visit:se,revision:u.revision,input:r},N.set(t,y)}let s=Date.now()+3e4,l=await B(P.submit(y),s,t);for(;l.run.pendingRequest?.requestId===t&&Date.now()<s&&!W&&(await h(Math.min(1e3,s-Date.now())),!(W||Date.now()>=s));)l=await B(P.resume(t),s,t);if(W)throw new a("IDENTITY_CHANGED","Paywall presentation has closed");if(l.run.pendingRequest?.requestId===t)throw new a("COMMAND_PENDING","The purchase command is still pending; retry the original request",202,t);if(!X(l,w,r.type==="paywall_confirm"||r.type==="paywall_cancel"?r.operationId:void 0))throw new a("PRECONDITION_FAILED","The purchase selection has changed")}async function oe(t){if(!m)throw new a("INVALID_REQUEST","A quoted purchase is required");let r=`${t}:${m.operationId}`,w=J.get(r);if(!w){let y=t==="confirm"?"paywall_confirm":"paywall_cancel",s=P.pendingCommands?.find(l=>l.operation==="submit"&&l.input.type===y&&"operationId"in l.input&&l.input.operationId===m.operationId)??P.pendingCommand;w=s?.operation==="submit"&&s.input.type===y&&"operationId"in s.input&&s.input.operationId===m.operationId?s.requestId:crypto.randomUUID(),J.set(r,w)}if(await F(w,{type:t==="confirm"?"paywall_confirm":"paywall_cancel",operationId:m.operationId},H),!T)throw new a("INVALID_RESPONSE","The accepted purchase result is missing");return structuredClone(T)}return{get view(){return structuredClone(v)},get quote(){return m?structuredClone(m):null},get operation(){return T?structuredClone(T):null},get webViewUrl(){return P.webViewUrl},get canReselect(){return D},async refresh(){$();let t=H,r=await P.get();if(X(r,t),r.run.paywall?.receiptId!==n)throw new a("PRECONDITION_FAILED","Paywall presentation has changed");if(!v){if("document"in Q||!P.resolvePaywall)throw new a("INVALID_RESPONSE","Public Paywall reader is unavailable");let w=await P.resolvePaywall(Q);$(),ie(w),v={...Q,document:w.document,offering:w.offering}}return structuredClone(v)},preview(t){if(!v)return Promise.reject(new a("PRECONDITION_FAILED","Load the Paywall presentation first"));if(S&&S!==t.requestId&&(C||!D))return Promise.reject(new a("COMMAND_PENDING","Retry the original purchase before starting another"));if(S===t.requestId&&C)return C;let r=v.document.buttons[t.actionId],w=r?.type==="checkout"?be(r.product,t.selection,v.capabilities):null;if(!w)return Promise.reject(new a("PRODUCT_UNAVAILABLE","Choose an available Product in this purchase area"));let y=S!==t.requestId&&k>0?{operationId:m?.operationId??null,generation:k}:void 0;if(y&&(!D||k<=0))return Promise.reject(new a("COMMAND_PENDING","Original purchase requires authoritative termination"));S!==t.requestId&&H++;let s=H;S=t.requestId;let l=(async()=>{if(await F(t.requestId,{type:"paywall_quote",actionId:t.actionId,productVersionId:w,...y?{predecessor:y}:{},...t.offerId?{offerId:t.offerId}:{},...t.nativeOffer?{nativeOffer:t.nativeOffer}:{}},s),!m)throw new a("INVALID_RESPONSE","The accepted quote is missing");return structuredClone(m)})();return C=l,l.then(()=>{C===l&&(C=null)},u=>{C===l&&(C=null),S===t.requestId&&P.pendingCommand?.requestId!==t.requestId&&u instanceof a&&u.status!==void 0&&u.status<500&&![401,425].includes(u.status)&&(S=null)}),l},confirm:()=>oe("confirm"),cancel:()=>oe("cancel"),async read(){if($(),!m)throw new a("INVALID_REQUEST","A quoted purchase is required");let t=m.operationId,r=H,w=P.pendingCommands?.find(u=>u.operation==="submit"&&(u.input.type==="paywall_confirm"||u.input.type==="paywall_cancel")&&u.input.operationId===t)??P.pendingCommand;w?.operation==="submit"&&(w.input.type==="paywall_confirm"||w.input.type==="paywall_cancel")&&w.input.operationId===t&&await P.settle?.(w.requestId);let y=await P.get(void 0,{receiptId:n,operationId:t});$();let s=V(y);if(s?.quote&&s.quote.operationId!==t||s?.operation&&s.operation.operationId!==t)throw new a("INVALID_RESPONSE","Purchase operation changed");let l=X(y,r,t)?T:s?.operation;if(!l)throw new a("INVALID_RESPONSE","The current purchase result is missing");return structuredClone(l)},destroy(){W=!0,q.abort(),N.clear(),J.clear()}}}async function Fe(P,M){let n=M,{mountScreenPreview:te}=await import("./popup.js"),{showPaywall:se}=await import("./paywall-PD62B2AY.js"),I=P.ownerDocument,Q=I.activeElement,v=I.createElement("section"),U=I.createElement("div"),ie=I.createElement("div"),m=I.createElement("div"),T=I.createElement("button");m.hidden=!0,T.type="button";let W=I.createElement("p"),q=I.createElement("p"),S=I.createElement("button"),H=I.createElement("button"),k=I.createElement("button"),D=I.createElement("dialog");v.dataset.indianaFunnel="",v.setAttribute("aria-busy","false"),v.style.cssText="box-sizing:border-box;width:100%;min-width:0;font:14px/1.5 system-ui,sans-serif;color:#172033;background:#fff",ie.style.cssText="display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px 20px",W.setAttribute("role","status"),q.setAttribute("role","alert"),q.hidden=!0,S.type=H.type=k.type="button",ie.append(S,W,q,k,T,H),v.append(U,m,ie),P.append(v);let C=null,N=null,J=null,V="",$="",X="",B="",h=!1,F=0,oe=!1,t="",r=null,w=Promise.resolve(),y=null,s=null,l={},u=new Map,_=new Set,R=new Set,Y=new Set,Z=null,x={},E=!1,he,j=0,L=null,ae="",le=new Map,ye=e=>e?`${e.id}:${e.nodeId}:${e.visit}:${e.revision}:${e.paywall?.quote?.operationId??""}`:"",z=(e,i=null)=>{h||(s=i,q.textContent=e instanceof Error?e.message:"Request failed",q.hidden=!1,k.hidden=n.client.pendingCommand===null,re(n.onError,e))};function K(){let e=n.client.view;if(!e)throw new a("INVALID_REQUEST","No current Run is available");return{requestId:crypto.randomUUID(),nodeId:e.nodeId,visit:e.visit,revision:e.revision}}async function ee(e,i=!1){if(!(F&&!i||h||E&&!i)){F++,v.setAttribute("aria-busy","true"),q.hidden=!0,s=null;try{if(!i&&Z){let o=n.client.view;await Z;let g=n.client.view;if(!o||!g||g.id!==o.id||g.nodeId!==o.nodeId||g.visit!==o.visit||g.stopped||!["running","waiting"].includes(g.status))throw new a("PRECONDITION_FAILED","The screen changed while its display was acknowledged")}if(h)return;let d=await e();h||await ne(n.client.view??d.run)}catch(d){z(d,n.client.pendingCommand?.requestId??null)}finally{F=Math.max(0,F-1),v.setAttribute("aria-busy",String(F>0)),h||(k.hidden=n.client.pendingCommand===null,S.disabled=F>0||!!n.client.pendingCommand||!n.client.view?.canBack)}}}function ge(e){if(E||_.has(e)||R.has(e)||h)return;R.add(e);let i=async()=>{if(E||h||V!==e){R.delete(e);return}if(F||n.client.pendingCommand){setTimeout(()=>{i()},250);return}let d=(async()=>{let g=n.client.view,p=K(),A=p.requestId,c=!1;try{await n.client.submit({operation:"shown",...p})}catch(b){if(!(b instanceof a)||b.code!=="CONFLICT"||b.status!==409||n.client.pendingCommand)throw b;await n.client.get();let f=n.client.view;if(h||E||V!==e||!f||!g||f.id!==g.id||f.source.versionId!==g.source.versionId||f.nodeId!==p.nodeId||f.visit!==p.visit||f.revision<=p.revision||f.stopped||!f.screen||!["running","waiting"].includes(f.status)||n.client.pendingCommand)throw b;let O=K();A=O.requestId,await n.client.submit({operation:"shown",...O})}for(;!h&&V===e&&n.client.pendingCommand?.requestId===A;){if(!n.client.settle)throw new a("COMMAND_PENDING","The original display acknowledgement is still pending");await n.client.settle(A),c=!0,n.client.pendingCommand?.requestId===A&&await new Promise(b=>setTimeout(b,1500))}h||V!==e||(c&&await n.client.get(),!(h||V!==e)&&_.add(e))})();Z=d;let o=()=>{Z===d&&(Z=null),R.delete(e)};d.then(o,g=>{o(),F||z(g)})};i()}function ue(){r&&clearTimeout(r),!(h||!J||!["running","waiting"].includes(J.status)&&!n.client.pendingCommand)&&(r=setTimeout(()=>{r=null,Ie().finally(ue)},J.pendingRequest||n.client.pendingCommand?1500:5e3))}async function Ie(){if(!(h||oe||F)){if(E){await ce(he);return}oe=!0;try{let e=n.client.pendingCommand;e&&n.client.settle&&await n.client.settle(e.requestId);let i=n.client.view,d=l,o=await n.client.get(i?.screen&&Object.keys(d).length?{nodeId:i.nodeId,visit:i.visit,revision:i.revision,components:d}:void 0);!h&&d===l&&await ne(n.client.view??o.run)}catch(e){z(e)}finally{oe=!1}}}async function Ee(e){let i=n.client.view,d=i?.screen,o=d?.customerData.nodes[e.nodeId];if(h||F||!i||!d||!o)return;if(!["refresh","next","previous","filter","sources_next","sources_previous"].includes(e.action)){let O=C?.document,G=O?ve(O,e.nodeId):null,we=G?.type==="customer_data"?G.data.outputs?.[e.action]:void 0;we&&d.outputs.includes(we)?await ee(()=>n.client.submit({operation:"submit",...K(),input:{type:"screen",output:we,answers:x,selection:e.value?{[e.nodeId]:e.value}:{}}})):await n.onCustomerDataIntent?.(e,i);return}let p=e.action.startsWith("sources_")?o.resources.find(O=>O.key===e.value):null;if(e.action.startsWith("sources_")&&!p)throw new a("INVALID_REQUEST","Choose a current resource");let A=`${i.visit}:${e.nodeId}:${p?.key??""}`,c=u.get(A)??[null],f=l[e.nodeId]??{page:1,after:null,filter:"all",...p?{resourceKey:p.key}:{}};if(e.action==="filter"){let O=e.value;if(!O||!(o.source==="offer_history"?["all","issued","reserved","redeemed","expired","revoked"]:["all","purchase","refund","source","usage","debt","settlement"]).includes(O))throw new a("INVALID_REQUEST","Unknown data filter");f={page:1,after:null,filter:O},c.splice(0,c.length,null)}else if(e.action==="next"||e.action==="sources_next"){let O=p?.sources.at(-1),G=p?O?{kind:"ledger",cursor:{at:O.detail[0],id:O.id,type:"source"}}:null:d.dataCursors[e.nodeId];if(!G||!p&&!o.hasNext)return;c[f.page]=G,f={...f,page:f.page+1,after:G}}else if(e.action==="previous"||e.action==="sources_previous"){if(f.page<=1)return;f={...f,page:f.page-1,after:c[f.page-2]??null}}u.set(A,c),l={...l,[e.nodeId]:f},await ee(()=>n.client.get({nodeId:i.nodeId,visit:i.visit,revision:i.revision,components:l}))}function Pe(e){let i=e.screen?.presentation;if(!i||i.type==="inline"){D.open&&D.close(),v.parentElement!==P&&P.append(v);return}v.parentElement!==D&&(D.append(v),P.append(D));let d={sm:420,md:640,lg:900};D.style.cssText=`padding:0;border:0;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;width:${"size"in i?d[i.size]+"px":"100vw"}`,D.setAttribute("aria-label",C?.document?.name??e.screen?.content.document.name??"Funnel"),D.open||D.showModal()}async function De(e){if(h)return;J=e,s&&n.client.pendingCommand?.requestId!==s&&(q.hidden=!0,s=null);let i=e.locale.startsWith("zh");if(T.textContent=i?"\u56DE\u770B":"History",T.hidden=!n.client.review,S.textContent=E?i?"\u8FD4\u56DE\u5F53\u524D":"Return to current":i?"\u8FD4\u56DE":"Back",H.textContent=i?"\u5173\u95ED":"Close",k.textContent=i?"\u91CD\u8BD5":"Retry",S.disabled=!E&&(F>0||!!n.client.pendingCommand||!e.canBack),k.hidden=n.client.pendingCommand===null,W.textContent=e.pendingRequest?i?"\u6B63\u5728\u5904\u7406":"Processing":e.instruction?.type==="wait"?i?"\u7B49\u5F85\u4E2D":"Waiting":"",t!==`${e.revision}:${e.visit}:${e.status}:${e.stopped}`&&(t=`${e.revision}:${e.visit}:${e.status}:${e.stopped}`,re(n.onState,structuredClone(e))),e.stopped||n.client.configurationReady===!1){E=!1,j++,L?.destroy(),L=null,m.replaceChildren(),m.hidden=!0,U.hidden=!1,C?.destroy(),C=null,N?.destroy(),N=null,U.replaceChildren(),V="",$="",B="",D.open&&D.close(),v.hidden=!0,ue();return}if(v.hidden=!1,E){ue();return}let d=e.screen||e.paywall?`${e.id}:${e.nodeId}:${e.visit}`:"";if(d!==V&&(C?.destroy(),C=null,N?.destroy(),N=null,U.replaceChildren(),V=d,$="",B="",x={...e.answers},l={},u.clear()),Pe(e),e.screen){let g=e.screen.content;C||(C=te(U,{mode:"live",rendererUrl:n.client.webViewUrl,title:g.document.name,onAction(c,b={},f={}){if(E)return;x={...x,...f};let O=Object.fromEntries((e.screen?.inputs??[]).filter(({variable:G})=>Object.hasOwn(x,G)).map(({variable:G})=>[G,x[G]]));ee(()=>n.client.submit({operation:"submit",...K(),input:{type:"screen",output:c,answers:O,selection:b}}))},onAnswers:c=>{E||(x={...x,...c})},onCustomerDataIntent:c=>{E||Ee(c).catch(z)},onEscape:()=>{E||de()},onError:c=>z(new Error(c)),onRendered:()=>ge(d)}));let p={capabilities:e.screen.capabilities,customerData:e.screen.customerData,parameters:e.parameters,serverInput:{bindings:e.screen.inputs,answers:x,values:e.screen.values}},A=JSON.stringify([g,e.locale,p.parameters,e.screen.inputs,e.screen.values]);if(A!==$)C.update(g.document,e.locale,p),$=A,X=JSON.stringify(p.capabilities),B=JSON.stringify(p.customerData);else{let c=JSON.stringify(p.capabilities);c!==X&&(C.updateCapabilities(p.capabilities),X=c),JSON.stringify(p.customerData)!==B&&(C.updateCustomerData(p.customerData),B=JSON.stringify(p.customerData))}await C.ready}else if(e.paywall&&!N){let g=await se(U,{canInteract:()=>!E&&!h,start:async()=>Ce(n.client),onPurchase:n.onPurchase,onCheckoutUrl:n.onCheckoutUrl,resolveOfferId:n.resolveOfferId,onEvent:n.onEvent,onOpenUrl:p=>n.onOpenUrl?n.onOpenUrl({receiptId:e.paywall.receiptId,url:p,openIn:"same_window"}):I.defaultView?.location.assign(p),onAction:async p=>{if(E)return;let A=await n.client.submit({operation:"submit",requestId:crypto.randomUUID(),nodeId:e.nodeId,visit:e.visit,revision:e.revision,input:{type:"screen",output:p,answers:{}}});await ne(n.client.view??A.run)},onError:z,onDismiss:()=>{!E&&!h&&n.client.view?.visit===e.visit&&de()}});h?g.host?.destroy():(N=g.host,N?.setSuspended(E)),ge(d)}let o=e.instruction;if(o&&(o.type==="open_url"||o.type==="event")&&!Y.has(o.receiptId)){let g=I.createElement("button");g.type="button",g.textContent=o.type==="open_url"?`${i?"\u524D\u5F80":"Continue to"} ${new URL(o.url).host}`:i?"\u7EE7\u7EED":"Continue",g.onclick=()=>{let p=K(),A=o.type==="open_url"&&!n.onOpenUrl&&o.openIn==="new_window"?Re(o.url):null;ee(async()=>{let c="success";if(o.type==="open_url")if(n.onOpenUrl)try{c=await n.onOpenUrl({receiptId:o.receiptId,url:o.url,openIn:o.openIn})===!1?"failed":"opened"}catch(f){re(n.onError,f),c="failed"}else c=o.openIn==="new_window"&&!A?"failed":"opened";if(o.type==="event"){if(!n.onEvent)throw new a("EVENT_HANDLER_REQUIRED","Provide the event handler");await n.onEvent(o.event)}if(h||n.client.view?.nodeId!==p.nodeId||n.client.view.visit!==p.visit)throw new a("PRECONDITION_FAILED","The client action visit changed");let b=await n.client.submit({operation:"submit",...p,input:{type:"client_action",receiptId:o.receiptId,outcome:c}});return Y.add(o.receiptId),o.type==="open_url"&&!n.onOpenUrl&&o.openIn==="same_window"&&I.defaultView?.location.assign(o.url),b})},U.replaceChildren(g)}!e.pendingRequest&&e.status==="completed"&&!Y.has(`complete:${e.id}`)&&(Y.add(`complete:${e.id}`),re(n.onComplete,structuredClone(e))),ue()}function Re(e){let i=I.defaultView?.open(e,"_blank")??null;return i&&(i.opener=null),i}function ne(e){return w=w.catch(()=>{}).then(()=>De(e)),w}async function ce(e){if(h||!n.client.review)return;E||(ae=ye(n.client.view),le.set(ae,structuredClone(x))),E=!0,he=e,U.hidden=!0,N?.setSuspended(!0),m.hidden=!1;let i=++j;try{let d=await n.client.review(e);if(h||i!==j||!E)return;if(!d.review)throw new a("INVALID_RESPONSE","Historical projection is missing");L?.destroy(),L=null,m.replaceChildren();let o=d.run.locale.startsWith("zh"),g=I.createElement("p");g.textContent=o?"\u53EA\u8BFB\u56DE\u770B":"Read-only history",m.append(g);for(let[c,b]of d.review.pages.entries()){let f=I.createElement("button");f.type="button",f.textContent=o?`\u7B2C ${c+1} \u9875`:`Page ${c+1}`,f.onclick=()=>{ce(b.receiptId)},m.append(f)}if(d.review.page){let c=d.review.page,b=I.createElement("div");if(b.inert=!0,m.append(b),L=te(b,{mode:"live",rendererUrl:n.client.webViewUrl,title:c.document.name,onAction:()=>{},onAnswers:()=>{},onCustomerDataIntent:()=>{},onRendered:()=>{},onEscape:()=>{fe()}}),L.update(c.document,d.run.locale,{serverInput:{bindings:c.inputs,answers:c.answers,values:c.values}}),await L.ready,h||i!==j||!E)return}let p=o?{issued:"\u5DF2\u9886\u53D6",reserved:"\u5DF2\u9884\u7559",redeemed:"\u5DF2\u4F7F\u7528",expired:"\u5DF2\u8FC7\u671F",revoked:"\u5DF2\u64A4\u9500",unknown:"\u72B6\u6001\u5F85\u786E\u8BA4"}:{issued:"Issued",reserved:"Reserved",redeemed:"Used",expired:"Expired",revoked:"Revoked",unknown:"Status unconfirmed"},A=o?{pending:"\u5904\u7406\u4E2D",complete:"\u5DF2\u5B8C\u6210",cancelled:"\u5DF2\u53D6\u6D88",failed:"\u5931\u8D25",unknown:"\u72B6\u6001\u5F85\u786E\u8BA4"}:{pending:"Processing",complete:"Completed",cancelled:"Cancelled",failed:"Failed",unknown:"Status unconfirmed"};for(let c of[...d.review.coupons.map((b,f)=>`${o?"\u4F18\u60E0\u5238":"Coupon"} ${f+1}: ${p[b.status]}`),...d.review.purchases.map((b,f)=>`${o?"\u8D2D\u4E70":"Purchase"} ${f+1}: ${A[b.status]}`)]){let b=I.createElement("p");b.textContent=c,m.append(b)}n.client.view&&await ne(n.client.view)}catch(d){if(i!==j||h)return;L?.destroy(),L=null,m.replaceChildren(),z(d)}}async function fe(){if(!E||h||!n.client.review)return;let e=++j;try{if(await n.client.review(),h||e!==j)return;E=!1,j++,L?.destroy(),L=null,m.replaceChildren(),m.hidden=!0,U.hidden=!1;let i=n.client.view;ye(i)!==ae?(le.set(ae,structuredClone(x)),V="",$=""):(le.delete(ae),N?.setSuspended(!1)),i&&await ne(i)}catch(i){if(e!==j||h)return;L?.destroy(),L=null,m.replaceChildren(),z(i)}}let Ne=n.client.subscribe(e=>{n.client.configurationReady===!1&&(v.hidden=!0,C?.destroy(),C=null,N?.destroy(),N=null,U.replaceChildren(),V="",$="",B="",D.open&&D.close()),ne(e).catch(z)}),Oe=n.client.subscribeError?.(z);function de(){return y||(h?Promise.resolve():n.client.view&&!["running","waiting"].includes(n.client.view.status)?(pe(),Promise.resolve()):(y=ee(()=>n.client.submit({operation:"close",...K()}),!0).then(()=>{n.client.view?.status==="closed"&&pe()}).finally(()=>{y=null}),y))}function pe(){h||(h=!0,r&&clearTimeout(r),Ne(),Oe?.(),C?.destroy(),j++,L?.destroy(),N?.destroy(),D.close(),D.remove(),v.remove(),Q instanceof HTMLElement&&Q.isConnected&&Q.focus(),re(n.onDismiss,J?structuredClone(J):null))}S.onclick=()=>{if(E){fe();return}ee(()=>n.client.submit({operation:"back",...K()}))},T.onclick=()=>{ce()},H.onclick=()=>{de()},k.onclick=()=>{ee(()=>n.client.retry())},D.addEventListener("cancel",e=>{e.preventDefault(),de()});try{let e=await n.client.get();await ne(n.client.view??e.run)}catch(e){throw pe(),e}return{destroy:pe,refresh:Ie,review:ce,exitReview:fe,get unappliedDrafts(){return new Map([...le].map(([e,i])=>[e,structuredClone(i)]))}}}export{Fe as showFunnelRun};
|
package/dist/paywall-PD62B2AY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as z}from"./chunk-6X42DWOM.js";import"./chunk-CXYOZSOF.js";import{Qd as q,kj as j}from"./chunk-A3N4ZZTM.js";import{a as w}from"./chunk-OVMNCZYC.js";import{ka as N,v as $}from"./chunk-3BQFJANQ.js";import"./chunk-AE4CUTUE.js";import"./chunk-S5TVMQRC.js";import"./chunk-RRII2DMC.js";import"./chunk-KQCTDXVD.js";async function W(b,n,h){if(n.status!=="complete")throw new w("INVALID_RESPONSE","A verified completed purchase is required");if(await h.onComplete?.(n),!b||!h.check)return;let t=N.parse(await h.check());if(t.internal_feature_id!==b.internal_feature_id||t.quantity!==b.quantity)throw new w("INVALID_RESPONSE","The access requirement changed");t.allowed&&await h.onAccessGranted?.(t)}async function ie(b,n){let h=n.check?N.parse(await n.check()):null;if(h?.allowed)return await n.onAccessGranted?.(h),{check:h,host:null};let t=await n.start(),y=t.view??await t.refresh();if(!y)throw new w("INVALID_RESPONSE","Paywall presentation is missing");let{mountScreenPreview:J}=await import("./popup.js"),a=b.ownerDocument,S=new AbortController,v=a.createElement("section"),Q=a.createElement("div"),O=a.createElement("div"),P=a.createElement("p"),c=a.createElement("button"),L=a.createElement("button"),u=a.createElement("dialog"),_=a.activeElement,p=y.document.screen.strings.defaultLocale.startsWith("zh");v.dataset.indianaPaywall="",v.setAttribute("aria-label",y.document.name),v.style.cssText="width:100%;box-sizing:border-box;background:#fff;color:#172033;font:14px/1.5 system-ui,sans-serif",O.style.cssText="display:flex;gap:12px;padding:12px 20px;align-items:center;flex-wrap:wrap",P.setAttribute("role","status"),L.textContent=p?"\u5173\u95ED":"Close",c.textContent=p?"\u91CD\u8BD5":"Retry",c.hidden=!0,O.append(P,c,L),v.append(Q,O);let D=y.document.presentation,A,d=!1,T=!1,f=null,G=!1,m=()=>!G&&n.canInteract?.()!==!1,M=!1,r=null,I=null,U=e=>{P.textContent=e instanceof Error?e.message:p?"\u8BF7\u6C42\u5931\u8D25":"Request failed",z(n.onError,e),c.hidden=r===null};async function k(e){if(!(T||d||!m())){T=!0,c.hidden=!0,P.textContent="";try{await e()}catch(s){d||U(s)}finally{T=!1}}}async function K(e){await W(h,e,n)}async function E(e){if(d)return;if(!m()){r=async()=>E(await t.read()),c.hidden=!1;return}if(P.textContent=e.status,e.status==="complete"){r=null,await K(e);return}if(e.status!=="pending"){if(t.canReselect===!1){P.textContent=p?"\u6B63\u5728\u6838\u5BF9\u539F\u8D2D\u4E70\u7ED3\u679C":"Checking the original purchase result",c.textContent=p?"\u67E5\u8BE2\u7ED3\u679C":"Check result",r=async()=>E(await t.read()),c.hidden=!1;return}c.textContent=p?"\u91CD\u8BD5":"Retry",r=null,f=null;return}let s=Date.now()+6e5,l=2e3;for(;!d&&Date.now()<s;){if(await new Promise(C=>{let R=()=>{clearTimeout(x),C()},x=setTimeout(()=>{S.signal.removeEventListener("abort",R),C()},l);S.signal.addEventListener("abort",R,{once:!0})}),d)return;if(!m()){r=async()=>E(await t.read()),c.hidden=!1;return}let i=await t.read();if(i.status!=="pending"){await E(i);return}l=Math.min(l*1.5,3e4)}r=async()=>E(await t.read()),c.hidden=!1}async function V(){I?.remove(),I=null,r=V;let e=await t.confirm();if(!m()){r=V,c.hidden=!1;return}if(e.status==="pending"){if(e.checkoutUrl)n.onCheckoutUrl?await n.onCheckoutUrl(e.checkoutUrl):a.defaultView?.location.assign(e.checkoutUrl);else if(e.execution||e.nativePurchase){if(!n.onPurchase)throw new w("PURCHASE_HANDLER_REQUIRED","Provide the merchant or native purchase handler");await n.onPurchase({operation:e,signal:S.signal})}}r=async()=>E(await t.read()),await E(e)}function X(e){I?.remove();let s=a.createElement("div"),l=a.createElement("button"),i=a.createElement("button"),C=a.createElement("p");C.textContent=e.lines.map(o=>o.productName).join(", ")+" \xB7 "+$(e.charge?.totalMinor??e.catalogAmountMinor-(e.discount?.amountMinor??0),e.currency),l.textContent=p?"\u786E\u8BA4\u8D2D\u4E70":"Confirm purchase",i.textContent=p?"\u53D6\u6D88":"Cancel",l.onclick=()=>{k(V)};let R=async()=>{let o=await t.cancel();d||(s.remove(),I=null,await E(o))};i.onclick=()=>{r=R,k(R)};let x=a.createElement("div");for(let o of e.lines){let B=a.createElement("p");if(B.textContent=`${o.productName} \xB7 ${$(o.catalogAmountMinor,e.currency)}${j(o.interval,p?"zh-CN":"en",o.intervalCount??1)}`,x.append(B),o.trial){let F=a.createElement("p");F.textContent=p?`\u8BD5\u7528 ${o.trial.days} \u5929\uFF1B${o.trial.cardRequired?"\u9700\u8981\u63D0\u4F9B\u4ED8\u6B3E\u65B9\u5F0F":"\u65E0\u9700\u63D0\u4F9B\u4ED8\u6B3E\u65B9\u5F0F"}`:`Trial days: ${o.trial.days}; ${o.trial.cardRequired?"a payment method is required":"no payment method is required"}`,x.append(F)}}if(!e.charge){let o=a.createElement("p");o.textContent=p?"\u76EE\u5F55\u4EF7\u683C\uFF1B\u6700\u7EC8\u91D1\u989D\u4EE5\u7ED3\u8D26\u65F6\u7A0E\u8D39\u548C\u8BD5\u7528\u89C4\u5219\u4E3A\u51C6\u3002":"Catalog price; the final charge depends on checkout taxes and trial terms.",x.append(o)}s.append(C,x,l,i),O.prepend(s),I=s,r=null}async function H(){if(!f)return;if(r=H,!M){let s=t.view,l=s?.document.buttons[f.actionId],i=s&&l?.type==="checkout"?q(l.product,f.selection,s.capabilities):null;if(!i)throw new w("PRODUCT_UNAVAILABLE","Choose an available Product in this purchase area");let C=await n.resolveOfferId?.({actionId:f.actionId,productVersionId:i});if(d)return;C!==void 0&&(f.offerId=C),M=!0}if(!m()){c.hidden=!1;return}let e=await t.preview(f);d||X(e)}function g(e="destroy"){d||(d=!0,S.abort(),A?.destroy(),t.destroy(),u.open&&u.close(),u.remove(),v.remove(),_ instanceof HTMLElement&&_.isConnected&&_.focus(),e==="dismiss"&&z(n.onDismiss))}L.onclick=()=>{m()&&g("dismiss")},u.addEventListener("cancel",e=>{e.preventDefault(),m()&&g("dismiss")}),c.onclick=()=>{r&&k(r)};try{if(D.type==="inline")b.append(v);else{let e={sm:420,md:640,lg:900};u.style.cssText=`padding:0;border:0;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;width:${"size"in D?e[D.size]+"px":"100vw"}`,u.setAttribute("aria-label",y.document.name),u.append(v),b.append(u),m()&&u.showModal()}A=J(Q,{mode:"live",rendererUrl:t.webViewUrl,title:y.document.name,onAction(e,s={}){if(!m())return;let l=t.view,i=l?.document.buttons[e];if(i){if(i.type==="close"){k(async()=>{await n.onAction?.(e),g(n.onAction?"action":"dismiss")});return}if(i.type==="action"){r=async()=>{if(i.action.type==="event"){if(!n.onEvent)throw new w("EVENT_HANDLER_REQUIRED","Provide the event handler");await n.onEvent(i.action.event)}else n.onOpenUrl?await n.onOpenUrl(i.action.url):a.defaultView?.location.assign(i.action.url);await n.onAction?.(e),r=null},k(r);return}if((t.quote||f)&&t.canReselect===!1){r=t.quote?async()=>E(await t.read()):H,k(r);return}if(!l||!q(i.product,s,l.capabilities)){U(new w("PRODUCT_UNAVAILABLE","Choose an available Product in this purchase area"));return}if(f&&f.actionId!==e){U(new w("COMMAND_PENDING","Finish the current purchase"));return}f||(f={requestId:crypto.randomUUID(),actionId:e,selection:s},M=!1),k(H)}},onEscape:()=>{m()&&g("dismiss")},onError:e=>U(new Error(e))}),A.update(y.document.screen,y.document.screen.strings.defaultLocale,{capabilities:y.capabilities,serverInput:{bindings:[],answers:{}}}),await A.ready}catch(e){throw g(),e}return{check:h,host:{setSuspended(e){G=e,v.hidden=e,e&&u.open?u.close():!e&&!d&&D.type!=="inline"&&!u.open&&u.showModal()},destroy:g,refresh:async()=>{if(!m()){if(t.view)return t.view;throw new w("PRECONDITION_FAILED","Paywall presentation is suspended")}let e=await t.refresh();return d||A?.updateCapabilities(e.capabilities),e}}}}export{ie as showPaywall};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -332,9 +332,9 @@ declare const offerSchema: z.ZodObject<{
|
|
|
332
332
|
id: z.ZodUUID;
|
|
333
333
|
couponId: z.ZodUUID;
|
|
334
334
|
status: z.ZodEnum<{
|
|
335
|
-
reserved: "reserved";
|
|
336
335
|
expired: "expired";
|
|
337
336
|
issued: "issued";
|
|
337
|
+
reserved: "reserved";
|
|
338
338
|
redeemed: "redeemed";
|
|
339
339
|
revoked: "revoked";
|
|
340
340
|
}>;
|
|
@@ -437,9 +437,9 @@ type ScreenRendererInput = z.infer<typeof screenRendererInputSchema>;
|
|
|
437
437
|
declare const customerPageDataSchema: z.ZodObject<{
|
|
438
438
|
nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
439
439
|
source: z.ZodEnum<{
|
|
440
|
+
membership: "membership";
|
|
440
441
|
credit_balance: "credit_balance";
|
|
441
442
|
credit_transactions: "credit_transactions";
|
|
442
|
-
membership: "membership";
|
|
443
443
|
billing: "billing";
|
|
444
444
|
billing_controls: "billing_controls";
|
|
445
445
|
customer_plans: "customer_plans";
|
|
@@ -449,9 +449,9 @@ declare const customerPageDataSchema: z.ZodObject<{
|
|
|
449
449
|
}>;
|
|
450
450
|
status: z.ZodEnum<{
|
|
451
451
|
error: "error";
|
|
452
|
-
ready: "ready";
|
|
453
452
|
idle: "idle";
|
|
454
453
|
loading: "loading";
|
|
454
|
+
ready: "ready";
|
|
455
455
|
}>;
|
|
456
456
|
stale: z.ZodBoolean;
|
|
457
457
|
preview: z.ZodBoolean;
|
|
@@ -534,12 +534,12 @@ type CustomerPageData = z.infer<typeof customerPageDataSchema>;
|
|
|
534
534
|
declare const customerDataIntentSchema: z.ZodObject<{
|
|
535
535
|
nodeId: z.ZodString;
|
|
536
536
|
action: z.ZodEnum<{
|
|
537
|
-
invoice_open: "invoice_open";
|
|
538
537
|
filter: "filter";
|
|
539
538
|
billing_adjustment: "billing_adjustment";
|
|
540
539
|
billing_authorization: "billing_authorization";
|
|
541
540
|
buy_pack: "buy_pack";
|
|
542
541
|
billing_portal: "billing_portal";
|
|
542
|
+
invoice_open: "invoice_open";
|
|
543
543
|
refresh: "refresh";
|
|
544
544
|
next: "next";
|
|
545
545
|
previous: "previous";
|