@tinkerlandai/indiana-sdk 0.7.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/README.md +73 -25
  3. package/README.zh-CN.md +77 -25
  4. package/dist/ai-usage-JoM7ZWk-.d.ts +247 -0
  5. package/dist/{ai-usage-BsrSG955.d.ts → api-JVC7x2FV.d.ts} +337 -386
  6. package/dist/chunk-3BQFJANQ.js +1 -0
  7. package/dist/chunk-56AYS7RS.js +1 -0
  8. package/dist/{chunk-6MO6Y24B.js → chunk-6HG7U6AU.js} +1 -1
  9. package/dist/chunk-AE4CUTUE.js +1 -0
  10. package/dist/chunk-AEUFCOFG.js +1 -0
  11. package/dist/chunk-F767CM3T.js +7 -0
  12. package/dist/chunk-KSNOXNTC.js +1 -0
  13. package/dist/{chunk-4AWSZWZD.js → chunk-USLZX2ZA.js} +1 -1
  14. package/dist/{chunk-YAFMBXIE.js → chunk-X747SY26.js} +1 -1
  15. package/dist/chunk-X7JJAEQQ.js +350 -0
  16. package/dist/chunk-YWFNWK7C.js +1 -0
  17. package/dist/{configuration-sync-Bvd956GL.d.ts → configuration-sync-BexM2qbg.d.ts} +17 -18
  18. package/dist/content-YNL2CRJZ.js +1 -0
  19. package/dist/{customer-page-B4LkIr5q.d.ts → customer-page-WUQVK_tp.d.ts} +276 -3
  20. package/dist/{funnel-runtime-start-ChVYbLzV.d.ts → funnel-local-client-D1Fe7CZ6.d.ts} +2507 -8137
  21. package/dist/funnel-runtime-host-CAMI6BJS.js +1 -0
  22. package/dist/index.d.ts +13578 -13442
  23. package/dist/index.js +1 -1
  24. package/dist/native-shell.js +1 -1
  25. package/dist/openrouter.d.ts +5 -3
  26. package/dist/openrouter.js +1 -1
  27. package/dist/page.d.ts +4 -4
  28. package/dist/page.js +1 -1
  29. package/dist/paywall-MXRMMF3R.js +1 -0
  30. package/dist/popup.d.ts +3 -271
  31. package/dist/popup.js +1 -350
  32. package/dist/react-native.d.ts +7 -7
  33. package/dist/react-native.js +1 -1
  34. package/dist/{screen-iFngkxaL.d.ts → screen-i6eHL11m.d.ts} +120 -117
  35. package/dist/screen-renderer-P7MLBHY5.js +1 -0
  36. package/dist/server.d.ts +4645 -8
  37. package/dist/server.js +1 -1
  38. package/dist/src-G7UQB3QE.js +1 -0
  39. package/dist/visual.d.ts +5 -2
  40. package/dist/visual.js +2 -2
  41. package/package.json +3 -9
  42. package/dist/chunk-3SONNXFG.js +0 -1
  43. package/dist/chunk-467Z5ISI.js +0 -11
  44. package/dist/chunk-4K25DELJ.js +0 -1
  45. package/dist/chunk-HD74AAFS.js +0 -1
  46. package/dist/chunk-J4RHVU3W.js +0 -1
  47. package/dist/chunk-NOFNOHUI.js +0 -1
  48. package/dist/chunk-QO4YQLZ4.js +0 -1
  49. package/dist/chunk-U6S6AZM6.js +0 -1
  50. package/dist/chunk-WCFVNF5D.js +0 -1
  51. package/dist/client-F6UPJMHR.js +0 -1
  52. package/dist/controls-XG46TKUU.js +0 -2
  53. package/dist/funnel-runtime-host-26QI2W3S.js +0 -1
  54. package/dist/iam.d.ts +0 -131
  55. package/dist/iam.js +0 -1
  56. package/dist/paywall-WKOHBYW7.js +0 -1
  57. package/dist/src-UHLPVD6E.js +0 -1
  58. /package/dist/{chunk-6X42DWOM.js → chunk-DSPLGTQI.js} +0 -0
  59. /package/dist/{chunk-S5TVMQRC.js → chunk-EXCPE2XH.js} +0 -0
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-6HG7U6AU.js";function a(r,n){let t=i=>"document"in i?i.offering.id:i.content.offeringVersionId;return r.id===n.id&&t(r)===t(n)&&r.content?.artifact.sha256===n.content?.artifact.sha256}function s(r,n,t){if(r.operationId!==n.operationId||n.currency!==void 0&&r.currency!==n.currency)throw new o("INVALID_RESPONSE",t)}function u(r,n,t){if(r.lines.length!==1||r.lines[0].productVersionId!==n.productVersionId||n.currency!==void 0&&r.currency!==n.currency||n.provider!==void 0&&r.provider!==n.provider)throw new o("INVALID_RESPONSE",t)}function c(r,n,t=!1){return!r||r.operationId!==n?.operationId?n:r.status==="complete"&&n.status!=="complete"||r.status!=="pending"&&(n.status==="pending"||t&&n.status!=="complete")?r:n}export{a,s as b,u as c,c as d};
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { S as StackNode } from './screen-iFngkxaL.js';
2
+ import { S as StackNode } from './screen-i6eHL11m.js';
3
3
 
4
4
  declare const configurationScopeSchema: z.ZodObject<{
5
5
  projectId: z.ZodString;
@@ -341,13 +341,13 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
341
341
  variations: {
342
342
  urlRedirect: string;
343
343
  }[];
344
+ name?: string | undefined;
344
345
  filters?: {
345
346
  seed: string;
346
347
  hashVersion: 2;
347
348
  ranges: [number, number][];
348
349
  attribute?: string | undefined;
349
350
  }[] | undefined;
350
- name?: string | undefined;
351
351
  seed?: string | undefined;
352
352
  hashVersion?: 2 | undefined;
353
353
  ranges?: [number, number][] | undefined;
@@ -608,7 +608,7 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
608
608
  event: string;
609
609
  } | {
610
610
  type: "api";
611
- operation: "attach" | "refund" | "update" | "readBalanceSource" | "adjustBalance" | "readUsage" | "setUsage" | "manageBalanceGrant" | "listBalanceGrants" | "restoreNativePurchase" | "setupPayment" | "readPaymentSetup" | "verifySubscriptions" | "previewAttach" | "readSubscriptionOperation" | "previewUpdate" | "readSubscriptionUpdate" | "previewRefund" | "readRefund" | "readBillingControls" | "prepareBillingAuthorization" | "confirmBillingAuthorization" | "setBillingCoupons" | "revokeBillingAuthorization" | "listBillingInvoices" | "confirmBillingAdjustment" | "manageBillingLimits" | "manageUsageEntity" | "readUsageAnalytics" | "readCreditAnalytics" | "submitUsageBatch" | "readUsageBatch" | "checkEntitlement" | "resolveOffering" | "readHoldings" | "readLedger" | "readBillingInvoice" | "readCreditStatement" | "quoteBalance" | "trackUsage" | "mutateBalance" | "redeemReward" | "createReferralCode" | "claimRewardProduct" | "readSeats" | "manageSeat" | "redeemCoupon" | "listOffers" | "grantOffer";
611
+ operation: "update" | "attach" | "refund" | "readBalanceSource" | "adjustBalance" | "readUsage" | "setUsage" | "manageBalanceGrant" | "listBalanceGrants" | "restoreNativePurchase" | "setupPayment" | "readPaymentSetup" | "verifySubscriptions" | "previewAttach" | "readSubscriptionOperation" | "previewUpdate" | "readSubscriptionUpdate" | "previewRefund" | "readRefund" | "readBillingControls" | "prepareBillingAuthorization" | "confirmBillingAuthorization" | "setBillingCoupons" | "revokeBillingAuthorization" | "listBillingInvoices" | "confirmBillingAdjustment" | "manageBillingLimits" | "manageUsageEntity" | "readUsageAnalytics" | "readCreditAnalytics" | "submitUsageBatch" | "readUsageBatch" | "checkEntitlement" | "resolveOffering" | "readHoldings" | "readLedger" | "readBillingInvoice" | "readCreditStatement" | "quoteBalance" | "trackUsage" | "mutateBalance" | "redeemReward" | "createReferralCode" | "claimRewardProduct" | "readSeats" | "manageSeat" | "redeemCoupon" | "listOffers" | "grantOffer";
612
612
  inputs: Record<string, {
613
613
  source: "literal";
614
614
  value: z.core.util.JSONType;
@@ -657,11 +657,6 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
657
657
  nodeId?: string | undefined;
658
658
  contentHash?: string | undefined;
659
659
  renderKey?: string | undefined;
660
- observed?: {
661
- versionId: string;
662
- sha256: string;
663
- contentHash: string;
664
- } | undefined;
665
660
  } | undefined;
666
661
  position?: {
667
662
  x: number;
@@ -720,7 +715,7 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
720
715
  kind: "screen";
721
716
  schemaVersion: 4;
722
717
  name: string;
723
- surface: "popup" | "paywall" | "page" | "onboarding";
718
+ surface: "paywall" | "popup" | "onboarding" | "page" | "banner";
724
719
  presentation: {
725
720
  type: "modal";
726
721
  size: "sm" | "md" | "lg";
@@ -729,12 +724,14 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
729
724
  size: "sm" | "md" | "lg";
730
725
  } | {
731
726
  type: "fullscreen";
727
+ } | {
728
+ type: "inline";
732
729
  };
733
730
  theme: {
734
731
  primary: string;
735
732
  background: string;
736
733
  text: string;
737
- radius: "none" | "full" | "sm" | "md" | "lg";
734
+ radius: "none" | "sm" | "md" | "lg" | "full";
738
735
  font: "system" | "serif" | "rounded" | "mono";
739
736
  };
740
737
  pages: {
@@ -745,7 +742,7 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
745
742
  primary: string;
746
743
  background: string;
747
744
  text: string;
748
- radius: "none" | "full" | "sm" | "md" | "lg";
745
+ radius: "none" | "sm" | "md" | "lg" | "full";
749
746
  font: "system" | "serif" | "rounded" | "mono";
750
747
  } | undefined;
751
748
  editorPosition?: {
@@ -797,18 +794,18 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
797
794
  couponDigests: Record<string, string>;
798
795
  variables: Record<string, Record<string, Partial<Record<"offer.headline" | "offer.name" | "offer.description" | "offer.eligibility" | "offer.validity" | "offer.terms" | "offer.discount" | "offer.months" | "offer.ends_at", string>>>>;
799
796
  locales: Record<string, {
800
- plans: Record<string, never>;
801
797
  nodes: Record<string, {
802
798
  base: {
803
- couponId?: string | undefined;
804
799
  text?: string | undefined;
805
800
  label?: string | undefined;
806
801
  alt?: string | undefined;
807
802
  html?: string | undefined;
808
803
  countdownAt?: string | undefined;
804
+ couponId?: string | undefined;
809
805
  missing?: string[] | undefined;
810
806
  };
811
807
  }>;
808
+ plans: Record<string, never>;
812
809
  pickers: Record<string, never>;
813
810
  diagnostics: {
814
811
  nodeId: string;
@@ -1143,7 +1140,7 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
1143
1140
  kind: "screen";
1144
1141
  schemaVersion: 4;
1145
1142
  name: string;
1146
- surface: "popup" | "paywall" | "page" | "onboarding";
1143
+ surface: "paywall" | "popup" | "onboarding" | "page" | "banner";
1147
1144
  presentation: {
1148
1145
  type: "modal";
1149
1146
  size: "sm" | "md" | "lg";
@@ -1152,12 +1149,14 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
1152
1149
  size: "sm" | "md" | "lg";
1153
1150
  } | {
1154
1151
  type: "fullscreen";
1152
+ } | {
1153
+ type: "inline";
1155
1154
  };
1156
1155
  theme: {
1157
1156
  primary: string;
1158
1157
  background: string;
1159
1158
  text: string;
1160
- radius: "none" | "full" | "sm" | "md" | "lg";
1159
+ radius: "none" | "sm" | "md" | "lg" | "full";
1161
1160
  font: "system" | "serif" | "rounded" | "mono";
1162
1161
  };
1163
1162
  pages: {
@@ -1168,7 +1167,7 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
1168
1167
  primary: string;
1169
1168
  background: string;
1170
1169
  text: string;
1171
- radius: "none" | "full" | "sm" | "md" | "lg";
1170
+ radius: "none" | "sm" | "md" | "lg" | "full";
1172
1171
  font: "system" | "serif" | "rounded" | "mono";
1173
1172
  } | undefined;
1174
1173
  editorPosition?: {
@@ -1236,7 +1235,7 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
1236
1235
  };
1237
1236
  catalog: Record<string, {
1238
1237
  name: string;
1239
- interval: "week" | "month" | "year" | "free" | "one_time";
1238
+ interval: "free" | "week" | "month" | "year" | "one_time";
1240
1239
  intervalCount: number;
1241
1240
  trial: {
1242
1241
  days: number;
@@ -1572,7 +1571,7 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
1572
1571
  entry: string;
1573
1572
  nodes: {
1574
1573
  id: string;
1575
- type: "output" | "feature" | "split" | "action" | "condition" | "coupon" | "end" | "screen" | "offering" | "coupons" | "entry" | "external_page" | "wait";
1574
+ type: "output" | "action" | "feature" | "split" | "condition" | "coupon" | "end" | "screen" | "offering" | "coupons" | "entry" | "external_page" | "wait";
1576
1575
  outputs: Record<string, string>;
1577
1576
  writes: Record<string, string>;
1578
1577
  resources: {
@@ -0,0 +1 @@
1
+ import{h as H}from"./chunk-X7JJAEQQ.js";import{a as b}from"./chunk-DSPLGTQI.js";import"./chunk-AEUFCOFG.js";import{jc as D}from"./chunk-F767CM3T.js";import{a as f}from"./chunk-6HG7U6AU.js";import{Eb as T,Mb as L,Ob as j,tb as k}from"./chunk-3BQFJANQ.js";import"./chunk-AE4CUTUE.js";import"./chunk-EXCPE2XH.js";import{a as I}from"./chunk-RRII2DMC.js";import"./chunk-KQCTDXVD.js";import{z as l}from"zod";var x=new WeakMap;function P(o){let t={string:l.string(),number:l.number().finite(),boolean:l.boolean(),strings:l.array(l.string()),json:I}[o.type];return o.nullable?t.nullable():t}async function J(o,t){let S=D.parse(t.content),r=S.document;if(x.has(o))throw new f("CONFLICT","Content is already mounted in this container");let u=l.record(l.string(),I).parse(t.inputs??{});if(Object.keys(u).length>40)throw new f("INVALID_REQUEST","Too many content inputs");for(let[e,i]of Object.entries(u))L.parse({[e]:i});if(Object.keys(u).some(e=>!Object.hasOwn(r.contract.inputs,e)))throw new f("INVALID_REQUEST","Undeclared content input");for(let[e,i]of Object.entries(r.contract.inputs))if(Object.hasOwn(u,e))P(i).parse(u[e]);else if(i.required)throw new f("INVALID_REQUEST",`Missing content input ${e}`);for(let e of Object.keys(r.contract.outputs))if(typeof t.actions[e]!="function")throw new f("INVALID_REQUEST",`Missing host handler for ${e}`);let R=j.parse(t.bindings??[]),d=o.ownerDocument,v=d.activeElement,A=r.kind==="popup",n=A?d.createElement("dialog"):null,s=d.createElement("div");if(s.dataset.indianaContent=r.kind,s.setAttribute("aria-label",r.name),s.style.cssText="width:100%;min-width:0",n){n.setAttribute("aria-label",r.name);let e=r.screen.presentation;n.style.cssText="box-sizing:border-box;padding:0;border:0;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto",e.type==="modal"||e.type==="sheet"?(n.style.width=`${k[e.size]}px`,e.type==="sheet"&&(n.style.margin="auto auto 0")):n.style.width="100vw",n.append(s),o.append(n)}else o.append(s);let m=!1,g=!1,a=null,w=structuredClone(r.screen);w.actions=w.actions.map(e=>e.type==="event"?{...e,close:!1}:e);let h;function E(){m||(m=!0,h?.destroy(),n?.close(),n?.remove(),s.remove(),x.delete(o),n&&v instanceof HTMLElement&&v.isConnected&&v.focus())}let C=()=>{E(),b(t.onDismiss)};if(n){let e=d.createElement("button");e.type="button",e.textContent="\xD7",e.setAttribute("aria-label",t.locale?.startsWith("zh")?"\u5173\u95ED":"Close"),e.style.cssText="position:absolute;right:8px;top:8px;width:30px;height:30px;z-index:1",e.addEventListener("click",C),n.prepend(e)}n?.addEventListener("cancel",e=>{e.preventDefault(),C()});async function V(){if(m||g||!a)return;let e=a;g=!0,s.setAttribute("aria-busy","true");try{await t.actions[e.actionId](structuredClone(e)),a=null}catch(i){b(t.onError,i)}finally{g=!1,m||s.removeAttribute("aria-busy")}}try{n?.showModal(),h=H(s,{mode:"live",title:r.name,viewportHeight:r.kind==="page"?o.clientHeight||d.defaultView?.innerHeight||800:void 0,onError:c=>b(t.onError,new Error(c)),onEscape:A?C:void 0,onAction:(c,U,M)=>{if(m||g||a)return;let p=r.screen.actions.find(y=>y.id===c),O=r.contract.outputs[c];if(!(p?.type!=="event"||!O))try{let y=P(O).parse(Object.hasOwn(p.properties,"value")?p.properties.value:p.properties);a={requestId:crypto.randomUUID(),contentVersionId:S.id,actionId:c,event:p.event,value:y,selection:U??{},answers:M??{},requestedClose:p.close},V()}catch(y){b(t.onError,y)}}});let e={destroy:E,get pendingAction(){return a?structuredClone(a):null},retryAction:V,updateCapabilities:c=>h?.updateCapabilities(c)};x.set(o,e);let i=T(w,[t.locale,...d.defaultView?.navigator.languages??[]]);return h.update(w,i,{capabilities:t.capabilities,serverInput:{bindings:R,answers:{},values:u}}),await h.ready,e}catch(e){throw E(),e}}export{J as mountContent};
@@ -1,5 +1,258 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ declare const surfaceDataSchema: z.ZodObject<{
4
+ paywall: z.ZodOptional<z.ZodObject<{
5
+ internal_feature_id: z.ZodString;
6
+ name: z.ZodString;
7
+ kind: z.ZodEnum<{
8
+ access: "access";
9
+ metered: "metered";
10
+ credit: "credit";
11
+ }>;
12
+ quantity: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
13
+ allowed: z.ZodBoolean;
14
+ reason: z.ZodNullable<z.ZodEnum<{
15
+ not_entitled: "not_entitled";
16
+ insufficient_balance: "insufficient_balance";
17
+ capacity_exceeded: "capacity_exceeded";
18
+ limit_exceeded: "limit_exceeded";
19
+ awaiting_topup: "awaiting_topup";
20
+ authorization_required: "authorization_required";
21
+ payment_blocked: "payment_blocked";
22
+ cash_budget_exceeded: "cash_budget_exceeded";
23
+ unavailable: "unavailable";
24
+ authentication_required: "authentication_required";
25
+ }>>;
26
+ preview: z.ZodNullable<z.ZodObject<{
27
+ scenario: z.ZodEnum<{
28
+ feature_flag: "feature_flag";
29
+ usage_limit: "usage_limit";
30
+ }>;
31
+ candidates: z.ZodArray<z.ZodObject<{
32
+ productId: z.ZodString;
33
+ productVersionId: z.ZodString;
34
+ name: z.ZodString;
35
+ action: z.ZodEnum<{
36
+ purchase: "purchase";
37
+ upgrade: "upgrade";
38
+ addon: "addon";
39
+ topup: "topup";
40
+ }>;
41
+ membershipId: z.ZodNullable<z.ZodString>;
42
+ currency: z.ZodEnum<{
43
+ USD: "USD";
44
+ EUR: "EUR";
45
+ CNY: "CNY";
46
+ GBP: "GBP";
47
+ JPY: "JPY";
48
+ CAD: "CAD";
49
+ AUD: "AUD";
50
+ NZD: "NZD";
51
+ CHF: "CHF";
52
+ HKD: "HKD";
53
+ SGD: "SGD";
54
+ KRW: "KRW";
55
+ INR: "INR";
56
+ BRL: "BRL";
57
+ MXN: "MXN";
58
+ TWD: "TWD";
59
+ THB: "THB";
60
+ IDR: "IDR";
61
+ MYR: "MYR";
62
+ PHP: "PHP";
63
+ VND: "VND";
64
+ ZAR: "ZAR";
65
+ AED: "AED";
66
+ SAR: "SAR";
67
+ SEK: "SEK";
68
+ NOK: "NOK";
69
+ DKK: "DKK";
70
+ PLN: "PLN";
71
+ CZK: "CZK";
72
+ HUF: "HUF";
73
+ ILS: "ILS";
74
+ TRY: "TRY";
75
+ RON: "RON";
76
+ }>;
77
+ amountMinor: z.ZodString;
78
+ interval: z.ZodEnum<{
79
+ free: "free";
80
+ week: "week";
81
+ month: "month";
82
+ year: "year";
83
+ one_time: "one_time";
84
+ }>;
85
+ intervalCount: z.ZodNumber;
86
+ }, z.core.$strict>>;
87
+ }, z.core.$strict>>;
88
+ }, z.core.$strict>>;
89
+ nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
90
+ base: z.ZodObject<{
91
+ text: z.ZodOptional<z.ZodString>;
92
+ label: z.ZodOptional<z.ZodString>;
93
+ alt: z.ZodOptional<z.ZodString>;
94
+ html: z.ZodOptional<z.ZodString>;
95
+ price: z.ZodOptional<z.ZodObject<{
96
+ current: z.ZodString;
97
+ original: z.ZodNullable<z.ZodString>;
98
+ period: z.ZodString;
99
+ }, z.core.$strip>>;
100
+ code: z.ZodOptional<z.ZodString>;
101
+ countdownAt: z.ZodOptional<z.ZodISODateTime>;
102
+ planId: z.ZodOptional<z.ZodString>;
103
+ planVersionId: z.ZodOptional<z.ZodString>;
104
+ currency: z.ZodOptional<z.ZodEnum<{
105
+ USD: "USD";
106
+ EUR: "EUR";
107
+ CNY: "CNY";
108
+ GBP: "GBP";
109
+ JPY: "JPY";
110
+ CAD: "CAD";
111
+ AUD: "AUD";
112
+ NZD: "NZD";
113
+ CHF: "CHF";
114
+ HKD: "HKD";
115
+ SGD: "SGD";
116
+ KRW: "KRW";
117
+ INR: "INR";
118
+ BRL: "BRL";
119
+ MXN: "MXN";
120
+ TWD: "TWD";
121
+ THB: "THB";
122
+ IDR: "IDR";
123
+ MYR: "MYR";
124
+ PHP: "PHP";
125
+ VND: "VND";
126
+ ZAR: "ZAR";
127
+ AED: "AED";
128
+ SAR: "SAR";
129
+ SEK: "SEK";
130
+ NOK: "NOK";
131
+ DKK: "DKK";
132
+ PLN: "PLN";
133
+ CZK: "CZK";
134
+ HUF: "HUF";
135
+ ILS: "ILS";
136
+ TRY: "TRY";
137
+ RON: "RON";
138
+ }>>;
139
+ couponId: z.ZodOptional<z.ZodUUID>;
140
+ offerId: z.ZodOptional<z.ZodUUID>;
141
+ unavailable: z.ZodOptional<z.ZodBoolean>;
142
+ unavailableReason: z.ZodOptional<z.ZodString>;
143
+ missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
144
+ }, z.core.$strict>;
145
+ picker: z.ZodOptional<z.ZodString>;
146
+ byPlan: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
147
+ text: z.ZodOptional<z.ZodString>;
148
+ label: z.ZodOptional<z.ZodString>;
149
+ alt: z.ZodOptional<z.ZodString>;
150
+ html: z.ZodOptional<z.ZodString>;
151
+ price: z.ZodOptional<z.ZodObject<{
152
+ current: z.ZodString;
153
+ original: z.ZodNullable<z.ZodString>;
154
+ period: z.ZodString;
155
+ }, z.core.$strip>>;
156
+ code: z.ZodOptional<z.ZodString>;
157
+ countdownAt: z.ZodOptional<z.ZodISODateTime>;
158
+ planId: z.ZodOptional<z.ZodString>;
159
+ planVersionId: z.ZodOptional<z.ZodString>;
160
+ currency: z.ZodOptional<z.ZodEnum<{
161
+ USD: "USD";
162
+ EUR: "EUR";
163
+ CNY: "CNY";
164
+ GBP: "GBP";
165
+ JPY: "JPY";
166
+ CAD: "CAD";
167
+ AUD: "AUD";
168
+ NZD: "NZD";
169
+ CHF: "CHF";
170
+ HKD: "HKD";
171
+ SGD: "SGD";
172
+ KRW: "KRW";
173
+ INR: "INR";
174
+ BRL: "BRL";
175
+ MXN: "MXN";
176
+ TWD: "TWD";
177
+ THB: "THB";
178
+ IDR: "IDR";
179
+ MYR: "MYR";
180
+ PHP: "PHP";
181
+ VND: "VND";
182
+ ZAR: "ZAR";
183
+ AED: "AED";
184
+ SAR: "SAR";
185
+ SEK: "SEK";
186
+ NOK: "NOK";
187
+ DKK: "DKK";
188
+ PLN: "PLN";
189
+ CZK: "CZK";
190
+ HUF: "HUF";
191
+ ILS: "ILS";
192
+ TRY: "TRY";
193
+ RON: "RON";
194
+ }>>;
195
+ couponId: z.ZodOptional<z.ZodUUID>;
196
+ offerId: z.ZodOptional<z.ZodUUID>;
197
+ unavailable: z.ZodOptional<z.ZodBoolean>;
198
+ unavailableReason: z.ZodOptional<z.ZodString>;
199
+ missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
200
+ }, z.core.$strict>>>;
201
+ }, z.core.$strict>>;
202
+ plans: z.ZodRecord<z.ZodString, z.ZodObject<{
203
+ id: z.ZodString;
204
+ versionId: z.ZodString;
205
+ available: z.ZodBoolean;
206
+ name: z.ZodString;
207
+ price: z.ZodString;
208
+ period: z.ZodString;
209
+ currency: z.ZodOptional<z.ZodEnum<{
210
+ USD: "USD";
211
+ EUR: "EUR";
212
+ CNY: "CNY";
213
+ GBP: "GBP";
214
+ JPY: "JPY";
215
+ CAD: "CAD";
216
+ AUD: "AUD";
217
+ NZD: "NZD";
218
+ CHF: "CHF";
219
+ HKD: "HKD";
220
+ SGD: "SGD";
221
+ KRW: "KRW";
222
+ INR: "INR";
223
+ BRL: "BRL";
224
+ MXN: "MXN";
225
+ TWD: "TWD";
226
+ THB: "THB";
227
+ IDR: "IDR";
228
+ MYR: "MYR";
229
+ PHP: "PHP";
230
+ VND: "VND";
231
+ ZAR: "ZAR";
232
+ AED: "AED";
233
+ SAR: "SAR";
234
+ SEK: "SEK";
235
+ NOK: "NOK";
236
+ DKK: "DKK";
237
+ PLN: "PLN";
238
+ CZK: "CZK";
239
+ HUF: "HUF";
240
+ ILS: "ILS";
241
+ TRY: "TRY";
242
+ RON: "RON";
243
+ }>>;
244
+ }, z.core.$strict>>;
245
+ pickers: z.ZodRecord<z.ZodString, z.ZodObject<{
246
+ options: z.ZodArray<z.ZodString>;
247
+ selected: z.ZodNullable<z.ZodString>;
248
+ }, z.core.$strict>>;
249
+ diagnostics: z.ZodArray<z.ZodObject<{
250
+ nodeId: z.ZodString;
251
+ message: z.ZodString;
252
+ }, z.core.$strict>>;
253
+ }, z.core.$strict>;
254
+ type SurfaceData = z.infer<typeof surfaceDataSchema>;
255
+
3
256
  declare const couponInputSchema: z.ZodObject<{
4
257
  name: z.ZodString;
5
258
  description: z.ZodString;
@@ -150,8 +403,8 @@ declare const offerSchema: z.ZodObject<{
150
403
  type Offer = z.infer<typeof offerSchema>;
151
404
  /** 领取失败的原因:未生效 / 不在有效期 / 不符合标签 / 不是首购 / 已达每人上限 / 已领完。 */
152
405
  declare const offerUnavailableReasonSchema: z.ZodEnum<{
153
- claim_disabled: "claim_disabled";
154
406
  unavailable: "unavailable";
407
+ claim_disabled: "claim_disabled";
155
408
  inactive: "inactive";
156
409
  outside_window: "outside_window";
157
410
  not_targeted: "not_targeted";
@@ -161,6 +414,26 @@ declare const offerUnavailableReasonSchema: z.ZodEnum<{
161
414
  }>;
162
415
  type OfferUnavailableReason = z.infer<typeof offerUnavailableReasonSchema>;
163
416
 
417
+ declare const screenAnswersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
418
+ declare const screenParametersSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
419
+ type ScreenParameters = z.infer<typeof screenParametersSchema>;
420
+ type ScreenAnswers = z.infer<typeof screenAnswersSchema>;
421
+ declare const screenInputBindingsSchema: z.ZodArray<z.ZodObject<{
422
+ variable: z.ZodString;
423
+ componentId: z.ZodString;
424
+ required: z.ZodBoolean;
425
+ }, z.core.$strict>>;
426
+ declare const screenRendererInputSchema: z.ZodObject<{
427
+ bindings: z.ZodArray<z.ZodObject<{
428
+ variable: z.ZodString;
429
+ componentId: z.ZodString;
430
+ required: z.ZodBoolean;
431
+ }, z.core.$strict>>;
432
+ answers: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
433
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
434
+ }, z.core.$strict>;
435
+ type ScreenRendererInput = z.infer<typeof screenRendererInputSchema>;
436
+
164
437
  declare const customerPageDataSchema: z.ZodObject<{
165
438
  nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
166
439
  source: z.ZodEnum<{
@@ -177,8 +450,8 @@ declare const customerPageDataSchema: z.ZodObject<{
177
450
  status: z.ZodEnum<{
178
451
  error: "error";
179
452
  idle: "idle";
180
- ready: "ready";
181
453
  loading: "loading";
454
+ ready: "ready";
182
455
  }>;
183
456
  stale: z.ZodBoolean;
184
457
  preview: z.ZodBoolean;
@@ -280,4 +553,4 @@ declare const customerDataIntentSchema: z.ZodObject<{
280
553
  }, z.core.$strict>;
281
554
  type CustomerDataIntent = z.infer<typeof customerDataIntentSchema>;
282
555
 
283
- export type { CouponInput as C, Offer as O, CustomerDataIntent as a, OfferUnavailableReason as b, CustomerPageData as c };
556
+ export { type CouponInput as C, type Offer as O, type ScreenAnswers as S, type SurfaceData as a, type CustomerDataIntent as b, type OfferUnavailableReason as c, type CustomerPageData as d, type ScreenParameters as e, type ScreenRendererInput as f, screenInputBindingsSchema as s };