@tinkerlandai/longplay-sdk 0.10.32 → 0.10.34

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 (46) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +10 -6
  3. package/README.zh-CN.md +2 -0
  4. package/dist/chunk-3JJYWRA3.js +1 -0
  5. package/dist/chunk-4WZVC4TM.js +1 -0
  6. package/dist/chunk-5JWMP4YD.js +1 -0
  7. package/dist/{chunk-XH7RJPBV.js → chunk-6T575JKD.js} +1 -1
  8. package/dist/{chunk-EMVWUEW4.js → chunk-7NELM6EH.js} +1 -1
  9. package/dist/{chunk-KHM6IHPJ.js → chunk-7VRZYSTR.js} +1 -1
  10. package/dist/{chunk-P5K67CKS.js → chunk-ERJP2GBD.js} +1 -1
  11. package/dist/{chunk-4XC34JBS.js → chunk-I6TSQQ5N.js} +1 -1
  12. package/dist/{chunk-SP5AQION.js → chunk-ITGERPCJ.js} +1 -1
  13. package/dist/{chunk-EUVLXS2V.js → chunk-QBA3B4YK.js} +1 -1
  14. package/dist/chunk-RKPAIF6U.js +1 -0
  15. package/dist/chunk-TDSATEGE.js +10 -0
  16. package/dist/{chunk-GLQXJMKL.js → chunk-TYY3MUTF.js} +1 -1
  17. package/dist/chunk-U6UHASIB.js +1 -0
  18. package/dist/{chunk-CZ2RY6RG.js → chunk-WKIR2EQG.js} +1 -1
  19. package/dist/{chunk-ZIQENZDI.js → chunk-WTVLNUMS.js} +1 -1
  20. package/dist/{content-YRQSNKN7.js → content-ORU4ODJQ.js} +1 -1
  21. package/dist/funnel-host-purchase-BEFE3N3E.js +1 -0
  22. package/dist/{funnel-runtime-host-J2PQHVSO.js → funnel-runtime-host-V6TYIDX3.js} +1 -1
  23. package/dist/index.d.ts +8 -3
  24. package/dist/index.js +1 -1
  25. package/dist/native-shell.js +1 -1
  26. package/dist/openrouter.js +1 -1
  27. package/dist/page.js +1 -1
  28. package/dist/paywall-HO4PS472.js +1 -0
  29. package/dist/{paywall-session-PPECL5XK.js → paywall-session-MZXFOPTR.js} +1 -1
  30. package/dist/popup.d.ts +6 -2
  31. package/dist/popup.js +1 -1
  32. package/dist/{presentation-loading-iSaRiDP2.d.ts → presentation-loading-CFSiS0VX.d.ts} +502 -3
  33. package/dist/react-native.js +1 -1
  34. package/dist/{screen-renderer-NHLIJDCW.js → screen-renderer-W7ZGBFIR.js} +1 -1
  35. package/dist/server.d.ts +30 -0
  36. package/dist/server.js +3 -3
  37. package/dist/visual.js +1 -1
  38. package/package.json +1 -1
  39. package/dist/chunk-5UFRIIGC.js +0 -1
  40. package/dist/chunk-6KBCR7JJ.js +0 -10
  41. package/dist/chunk-EMYZUBWL.js +0 -1
  42. package/dist/chunk-HQPP76BS.js +0 -1
  43. package/dist/chunk-UESDHJRB.js +0 -1
  44. package/dist/chunk-Y3MQLWGD.js +0 -1
  45. package/dist/funnel-host-purchase-SWYFJOVN.js +0 -1
  46. package/dist/paywall-RQ66UZLW.js +0 -1
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { S as StackNode, e as ScreenDocument } from './screen-CGCJ46b1.js';
2
3
 
3
4
  declare const surfaceDataSchema: z.ZodObject<{
4
5
  paywall: z.ZodOptional<z.ZodObject<{
@@ -497,6 +498,503 @@ declare const customerDataIntentSchema: z.ZodObject<{
497
498
  }, z.core.$strict>;
498
499
  type CustomerDataIntent = z.infer<typeof customerDataIntentSchema>;
499
500
 
501
+ declare const publicPaywallSchema: z.ZodObject<{
502
+ kind: z.ZodLiteral<"paywall">;
503
+ formatVersion: z.ZodLiteral<1>;
504
+ name: z.ZodString;
505
+ offeringVersionId: z.ZodUUID;
506
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
507
+ desktopWidth: z.ZodOptional<z.ZodObject<{
508
+ min: z.ZodNumber;
509
+ max: z.ZodNumber;
510
+ viewport: z.ZodNumber;
511
+ }, z.core.$strict>>;
512
+ mobile: z.ZodOptional<z.ZodEnum<{
513
+ sheet: "sheet";
514
+ fullscreen: "fullscreen";
515
+ }>>;
516
+ backdrop: z.ZodOptional<z.ZodEnum<{
517
+ none: "none";
518
+ scrim: "scrim";
519
+ dim: "dim";
520
+ "strong-dim": "strong-dim";
521
+ blur: "blur";
522
+ }>>;
523
+ type: z.ZodLiteral<"modal">;
524
+ size: z.ZodEnum<{
525
+ sm: "sm";
526
+ md: "md";
527
+ lg: "lg";
528
+ }>;
529
+ }, z.core.$strict>, z.ZodObject<{
530
+ desktopWidth: z.ZodOptional<z.ZodObject<{
531
+ min: z.ZodNumber;
532
+ max: z.ZodNumber;
533
+ viewport: z.ZodNumber;
534
+ }, z.core.$strict>>;
535
+ mobile: z.ZodOptional<z.ZodEnum<{
536
+ sheet: "sheet";
537
+ fullscreen: "fullscreen";
538
+ }>>;
539
+ backdrop: z.ZodOptional<z.ZodEnum<{
540
+ none: "none";
541
+ scrim: "scrim";
542
+ dim: "dim";
543
+ "strong-dim": "strong-dim";
544
+ blur: "blur";
545
+ }>>;
546
+ type: z.ZodLiteral<"sheet">;
547
+ size: z.ZodEnum<{
548
+ sm: "sm";
549
+ md: "md";
550
+ lg: "lg";
551
+ }>;
552
+ }, z.core.$strict>, z.ZodObject<{
553
+ type: z.ZodLiteral<"fullscreen">;
554
+ }, z.core.$strict>, z.ZodObject<{
555
+ type: z.ZodLiteral<"inline">;
556
+ }, z.core.$strict>], "type">;
557
+ screen: z.ZodObject<{
558
+ kind: z.ZodLiteral<"screen">;
559
+ schemaVersion: z.ZodLiteral<4>;
560
+ name: z.ZodString;
561
+ surface: z.ZodEnum<{
562
+ popup: "popup";
563
+ paywall: "paywall";
564
+ onboarding: "onboarding";
565
+ page: "page";
566
+ banner: "banner";
567
+ }>;
568
+ initialPageId: z.ZodOptional<z.ZodString>;
569
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
570
+ desktopWidth: z.ZodOptional<z.ZodObject<{
571
+ min: z.ZodNumber;
572
+ max: z.ZodNumber;
573
+ viewport: z.ZodNumber;
574
+ }, z.core.$strict>>;
575
+ mobile: z.ZodOptional<z.ZodEnum<{
576
+ sheet: "sheet";
577
+ fullscreen: "fullscreen";
578
+ }>>;
579
+ backdrop: z.ZodOptional<z.ZodEnum<{
580
+ none: "none";
581
+ scrim: "scrim";
582
+ dim: "dim";
583
+ "strong-dim": "strong-dim";
584
+ blur: "blur";
585
+ }>>;
586
+ type: z.ZodLiteral<"modal">;
587
+ size: z.ZodEnum<{
588
+ sm: "sm";
589
+ md: "md";
590
+ lg: "lg";
591
+ }>;
592
+ }, z.core.$strict>, z.ZodObject<{
593
+ desktopWidth: z.ZodOptional<z.ZodObject<{
594
+ min: z.ZodNumber;
595
+ max: z.ZodNumber;
596
+ viewport: z.ZodNumber;
597
+ }, z.core.$strict>>;
598
+ mobile: z.ZodOptional<z.ZodEnum<{
599
+ sheet: "sheet";
600
+ fullscreen: "fullscreen";
601
+ }>>;
602
+ backdrop: z.ZodOptional<z.ZodEnum<{
603
+ none: "none";
604
+ scrim: "scrim";
605
+ dim: "dim";
606
+ "strong-dim": "strong-dim";
607
+ blur: "blur";
608
+ }>>;
609
+ type: z.ZodLiteral<"sheet">;
610
+ size: z.ZodEnum<{
611
+ sm: "sm";
612
+ md: "md";
613
+ lg: "lg";
614
+ }>;
615
+ }, z.core.$strict>, z.ZodObject<{
616
+ type: z.ZodLiteral<"fullscreen">;
617
+ }, z.core.$strict>, z.ZodObject<{
618
+ type: z.ZodLiteral<"inline">;
619
+ }, z.core.$strict>], "type">;
620
+ theme: z.ZodObject<{
621
+ primary: z.ZodString;
622
+ background: z.ZodString;
623
+ text: z.ZodString;
624
+ radius: z.ZodEnum<{
625
+ sm: "sm";
626
+ md: "md";
627
+ lg: "lg";
628
+ none: "none";
629
+ full: "full";
630
+ }>;
631
+ font: z.ZodEnum<{
632
+ system: "system";
633
+ serif: "serif";
634
+ rounded: "rounded";
635
+ mono: "mono";
636
+ }>;
637
+ fontAssets: z.ZodOptional<z.ZodObject<{
638
+ family: z.ZodString;
639
+ faces: z.ZodArray<z.ZodObject<{
640
+ url: z.ZodString;
641
+ weight: z.ZodNumber;
642
+ family: z.ZodOptional<z.ZodString>;
643
+ }, z.core.$strict>>;
644
+ }, z.core.$strict>>;
645
+ }, z.core.$strict>;
646
+ pages: z.ZodArray<z.ZodObject<{
647
+ id: z.ZodString;
648
+ name: z.ZodString;
649
+ root: z.ZodType<StackNode, unknown, z.core.$ZodTypeInternals<StackNode, unknown>>;
650
+ theme: z.ZodOptional<z.ZodObject<{
651
+ primary: z.ZodString;
652
+ background: z.ZodString;
653
+ text: z.ZodString;
654
+ radius: z.ZodEnum<{
655
+ sm: "sm";
656
+ md: "md";
657
+ lg: "lg";
658
+ none: "none";
659
+ full: "full";
660
+ }>;
661
+ font: z.ZodEnum<{
662
+ system: "system";
663
+ serif: "serif";
664
+ rounded: "rounded";
665
+ mono: "mono";
666
+ }>;
667
+ fontAssets: z.ZodOptional<z.ZodObject<{
668
+ family: z.ZodString;
669
+ faces: z.ZodArray<z.ZodObject<{
670
+ url: z.ZodString;
671
+ weight: z.ZodNumber;
672
+ family: z.ZodOptional<z.ZodString>;
673
+ }, z.core.$strict>>;
674
+ }, z.core.$strict>>;
675
+ }, z.core.$strict>>;
676
+ editorPosition: z.ZodOptional<z.ZodObject<{
677
+ x: z.ZodNumber;
678
+ y: z.ZodNumber;
679
+ }, z.core.$strict>>;
680
+ }, z.core.$strict>>;
681
+ strings: z.ZodObject<{
682
+ defaultLocale: z.ZodString;
683
+ locales: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
684
+ }, z.core.$strict>;
685
+ actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
686
+ type: z.ZodLiteral<"navigate">;
687
+ close: z.ZodLiteral<false>;
688
+ pageId: z.ZodString;
689
+ id: z.ZodString;
690
+ event: z.ZodString;
691
+ properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
692
+ }, z.core.$strict>, z.ZodObject<{
693
+ type: z.ZodLiteral<"event">;
694
+ close: z.ZodBoolean;
695
+ id: z.ZodString;
696
+ event: z.ZodString;
697
+ properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
698
+ }, z.core.$strict>, z.ZodObject<{
699
+ type: z.ZodLiteral<"close">;
700
+ close: z.ZodLiteral<true>;
701
+ id: z.ZodString;
702
+ event: z.ZodString;
703
+ properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
704
+ }, z.core.$strict>, z.ZodObject<{
705
+ type: z.ZodLiteral<"open_url">;
706
+ close: z.ZodBoolean;
707
+ url: z.ZodString;
708
+ id: z.ZodString;
709
+ event: z.ZodString;
710
+ properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
711
+ }, z.core.$strict>, z.ZodObject<{
712
+ type: z.ZodLiteral<"claim_offer">;
713
+ close: z.ZodBoolean;
714
+ couponId: z.ZodUUID;
715
+ id: z.ZodString;
716
+ event: z.ZodString;
717
+ properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
718
+ }, z.core.$strict>], "type">>;
719
+ }, z.core.$strict>;
720
+ products: z.ZodObject<{
721
+ items: z.ZodArray<z.ZodObject<{
722
+ productVersionId: z.ZodString;
723
+ label: z.ZodString;
724
+ }, z.core.$strict>>;
725
+ defaultProductVersionId: z.ZodNullable<z.ZodString>;
726
+ grouping: z.ZodOptional<z.ZodObject<{
727
+ tiers: z.ZodArray<z.ZodObject<{
728
+ id: z.ZodString;
729
+ name: z.ZodString;
730
+ }, z.core.$strict>>;
731
+ assignments: z.ZodArray<z.ZodObject<{
732
+ productVersionId: z.ZodString;
733
+ tierId: z.ZodString;
734
+ period: z.ZodEnum<{
735
+ month: "month";
736
+ year: "year";
737
+ }>;
738
+ }, z.core.$strict>>;
739
+ }, z.core.$strict>>;
740
+ }, z.core.$strict>;
741
+ catalog: z.ZodRecord<z.ZodUUID, z.ZodObject<{
742
+ name: z.ZodString;
743
+ interval: z.ZodEnum<{
744
+ free: "free";
745
+ week: "week";
746
+ month: "month";
747
+ year: "year";
748
+ one_time: "one_time";
749
+ }>;
750
+ intervalCount: z.ZodNumber;
751
+ trial: z.ZodNullable<z.ZodObject<{
752
+ days: z.ZodNumber;
753
+ cardRequired: z.ZodBoolean;
754
+ }, z.core.$strict>>;
755
+ benefits: z.ZodArray<z.ZodObject<{
756
+ featureId: z.ZodUUID;
757
+ name: z.ZodString;
758
+ allowance: z.ZodNullable<z.ZodString>;
759
+ access: z.ZodBoolean;
760
+ }, z.core.$strict>>;
761
+ channels: z.ZodObject<{
762
+ stripe: z.ZodOptional<z.ZodObject<{
763
+ prices: z.ZodArray<z.ZodObject<{
764
+ currency: z.ZodEnum<{
765
+ USD: "USD";
766
+ EUR: "EUR";
767
+ CNY: "CNY";
768
+ GBP: "GBP";
769
+ JPY: "JPY";
770
+ CAD: "CAD";
771
+ AUD: "AUD";
772
+ NZD: "NZD";
773
+ CHF: "CHF";
774
+ HKD: "HKD";
775
+ SGD: "SGD";
776
+ KRW: "KRW";
777
+ INR: "INR";
778
+ BRL: "BRL";
779
+ MXN: "MXN";
780
+ TWD: "TWD";
781
+ THB: "THB";
782
+ IDR: "IDR";
783
+ MYR: "MYR";
784
+ PHP: "PHP";
785
+ VND: "VND";
786
+ ZAR: "ZAR";
787
+ AED: "AED";
788
+ SAR: "SAR";
789
+ SEK: "SEK";
790
+ NOK: "NOK";
791
+ DKK: "DKK";
792
+ PLN: "PLN";
793
+ CZK: "CZK";
794
+ HUF: "HUF";
795
+ ILS: "ILS";
796
+ TRY: "TRY";
797
+ RON: "RON";
798
+ }>;
799
+ amountMinor: z.ZodNumber;
800
+ }, z.core.$strict>>;
801
+ }, z.core.$strict>>;
802
+ apple: z.ZodOptional<z.ZodObject<{
803
+ productIds: z.ZodArray<z.ZodString>;
804
+ }, z.core.$strict>>;
805
+ google: z.ZodOptional<z.ZodObject<{
806
+ products: z.ZodArray<z.ZodObject<{
807
+ productId: z.ZodString;
808
+ basePlanId: z.ZodNullable<z.ZodString>;
809
+ }, z.core.$strict>>;
810
+ }, z.core.$strict>>;
811
+ }, z.core.$strict>;
812
+ prepaid: z.ZodOptional<z.ZodArray<z.ZodObject<{
813
+ internalFeatureId: z.ZodUUID;
814
+ name: z.ZodString;
815
+ includedAmount: z.ZodString;
816
+ reset: z.ZodEnum<{
817
+ week: "week";
818
+ month: "month";
819
+ year: "year";
820
+ hour: "hour";
821
+ day: "day";
822
+ lifetime: "lifetime";
823
+ }>;
824
+ resetCount: z.ZodNumber;
825
+ terms: z.ZodObject<{
826
+ units: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
827
+ prices: z.ZodArray<z.ZodObject<{
828
+ currency: z.ZodEnum<{
829
+ USD: "USD";
830
+ EUR: "EUR";
831
+ CNY: "CNY";
832
+ GBP: "GBP";
833
+ JPY: "JPY";
834
+ CAD: "CAD";
835
+ AUD: "AUD";
836
+ NZD: "NZD";
837
+ CHF: "CHF";
838
+ HKD: "HKD";
839
+ SGD: "SGD";
840
+ KRW: "KRW";
841
+ INR: "INR";
842
+ BRL: "BRL";
843
+ MXN: "MXN";
844
+ TWD: "TWD";
845
+ THB: "THB";
846
+ IDR: "IDR";
847
+ MYR: "MYR";
848
+ PHP: "PHP";
849
+ VND: "VND";
850
+ ZAR: "ZAR";
851
+ AED: "AED";
852
+ SAR: "SAR";
853
+ SEK: "SEK";
854
+ NOK: "NOK";
855
+ DKK: "DKK";
856
+ PLN: "PLN";
857
+ CZK: "CZK";
858
+ HUF: "HUF";
859
+ ILS: "ILS";
860
+ TRY: "TRY";
861
+ RON: "RON";
862
+ }>;
863
+ amountMinor: z.ZodNumber;
864
+ pricing: z.ZodOptional<z.ZodObject<{
865
+ kind: z.ZodEnum<{
866
+ graduated: "graduated";
867
+ volume: "volume";
868
+ }>;
869
+ tiers: z.ZodArray<z.ZodObject<{
870
+ upTo: z.ZodNullable<z.ZodNumber>;
871
+ unitAmountMinor: z.ZodNumber;
872
+ flatAmountMinor: z.ZodOptional<z.ZodNumber>;
873
+ }, z.core.$strict>>;
874
+ }, z.core.$strict>>;
875
+ }, z.core.$strict>>;
876
+ minimumQuantity: z.ZodNumber;
877
+ maximumQuantity: z.ZodNumber;
878
+ }, z.core.$strict>;
879
+ }, z.core.$strict>>>;
880
+ }, z.core.$strict>>;
881
+ buttons: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
882
+ type: z.ZodLiteral<"checkout">;
883
+ product: z.ZodDiscriminatedUnion<[z.ZodObject<{
884
+ type: z.ZodLiteral<"fixed">;
885
+ productVersionId: z.ZodString;
886
+ }, z.core.$strict>, z.ZodObject<{
887
+ type: z.ZodLiteral<"picker">;
888
+ pickerId: z.ZodString;
889
+ allowedProductVersionIds: z.ZodArray<z.ZodString>;
890
+ }, z.core.$strict>], "type">;
891
+ }, z.core.$strict>, z.ZodObject<{
892
+ type: z.ZodLiteral<"close">;
893
+ }, z.core.$strict>, z.ZodObject<{
894
+ type: z.ZodLiteral<"action">;
895
+ action: z.ZodDiscriminatedUnion<[z.ZodObject<{
896
+ type: z.ZodLiteral<"event">;
897
+ event: z.ZodString;
898
+ }, z.core.$strict>, z.ZodObject<{
899
+ type: z.ZodLiteral<"open_url">;
900
+ url: z.ZodURL;
901
+ }, z.core.$strict>], "type">;
902
+ }, z.core.$strict>], "type">>;
903
+ coupons: z.ZodRecord<z.ZodUUID, z.ZodObject<{
904
+ digest: z.ZodString;
905
+ content: z.ZodObject<{
906
+ discount: z.ZodDiscriminatedUnion<[z.ZodObject<{
907
+ type: z.ZodLiteral<"percent">;
908
+ percentOff: z.ZodNumber;
909
+ }, z.core.$strict>, z.ZodObject<{
910
+ type: z.ZodLiteral<"amount">;
911
+ amountOffCents: z.ZodNumber;
912
+ currency: z.ZodEnum<{
913
+ USD: "USD";
914
+ EUR: "EUR";
915
+ CNY: "CNY";
916
+ GBP: "GBP";
917
+ JPY: "JPY";
918
+ CAD: "CAD";
919
+ AUD: "AUD";
920
+ NZD: "NZD";
921
+ CHF: "CHF";
922
+ HKD: "HKD";
923
+ SGD: "SGD";
924
+ KRW: "KRW";
925
+ INR: "INR";
926
+ BRL: "BRL";
927
+ MXN: "MXN";
928
+ TWD: "TWD";
929
+ THB: "THB";
930
+ IDR: "IDR";
931
+ MYR: "MYR";
932
+ PHP: "PHP";
933
+ VND: "VND";
934
+ ZAR: "ZAR";
935
+ AED: "AED";
936
+ SAR: "SAR";
937
+ SEK: "SEK";
938
+ NOK: "NOK";
939
+ DKK: "DKK";
940
+ PLN: "PLN";
941
+ CZK: "CZK";
942
+ HUF: "HUF";
943
+ ILS: "ILS";
944
+ TRY: "TRY";
945
+ RON: "RON";
946
+ }>;
947
+ }, z.core.$strict>], "type">;
948
+ duration: z.ZodDiscriminatedUnion<[z.ZodObject<{
949
+ type: z.ZodLiteral<"once">;
950
+ }, z.core.$strict>, z.ZodObject<{
951
+ type: z.ZodLiteral<"repeating">;
952
+ months: z.ZodNumber;
953
+ }, z.core.$strict>, z.ZodObject<{
954
+ type: z.ZodLiteral<"forever">;
955
+ }, z.core.$strict>], "type">;
956
+ appliesTo: z.ZodDiscriminatedUnion<[z.ZodObject<{
957
+ type: z.ZodLiteral<"all">;
958
+ }, z.core.$strict>, z.ZodObject<{
959
+ type: z.ZodLiteral<"plans">;
960
+ planIds: z.ZodArray<z.ZodUUID>;
961
+ }, z.core.$strict>, z.ZodObject<{
962
+ type: z.ZodLiteral<"merchandise">;
963
+ scope: z.ZodObject<{
964
+ type: z.ZodEnum<{
965
+ selected: "selected";
966
+ condition: "condition";
967
+ all: "all";
968
+ }>;
969
+ }, z.core.$strict>;
970
+ }, z.core.$strict>], "type">;
971
+ displayCopy: z.ZodNullable<z.ZodObject<{
972
+ defaultLocale: z.ZodString;
973
+ locales: z.ZodRecord<z.ZodString, z.ZodObject<{
974
+ name: z.ZodString;
975
+ description: z.ZodString;
976
+ }, z.core.$strict>>;
977
+ }, z.core.$strict>>;
978
+ firstPurchaseOnly: z.ZodBoolean;
979
+ qualificationRequired: z.ZodBoolean;
980
+ startsAt: z.ZodNullable<z.ZodISODateTime>;
981
+ endsAt: z.ZodNullable<z.ZodISODateTime>;
982
+ grantWindowHours: z.ZodNumber;
983
+ perCustomerLimit: z.ZodNumber;
984
+ }, z.core.$strict>;
985
+ }, z.core.$strict>>;
986
+ }, z.core.$strict>;
987
+ type PublicPaywall = z.infer<typeof publicPaywallSchema>;
988
+
989
+ /** The display portion of an already available published Paywall document. */
990
+ type PaywallLoadingDocument = {
991
+ presentation: ScreenDocument["presentation"];
992
+ screen: ScreenDocument;
993
+ buttons?: PublicPaywall["buttons"];
994
+ };
995
+ /** Render the authored layout in the same sandbox used by the live Paywall. */
996
+ declare function renderPaywallLoadingDocument(panel: HTMLElement, holder: HTMLElement, input: PaywallLoadingDocument, locale: string, onRendered: () => void): () => void;
997
+
500
998
  type Surface = "page" | "popup" | "banner" | "paywall" | "funnel";
501
999
  type PresentationState = {
502
1000
  surface: Surface;
@@ -518,11 +1016,12 @@ type PresentationLoadingOptions = {
518
1016
  signal?: AbortSignal;
519
1017
  };
520
1018
  /** One loading cycle. No authored content or controls are exposed during it. */
521
- declare function createPresentationLoading(container: HTMLElement | ShadowRoot, options: PresentationLoadingOptions, surface: Surface, onDismiss: () => void): {
1019
+ declare function createPresentationLoading(container: HTMLElement | ShadowRoot, options: PresentationLoadingOptions, surface: Surface, onDismiss: () => void, renderPaywall?: typeof renderPaywallLoadingDocument): {
522
1020
  setDismissHandler(handler: () => void): void;
523
1021
  readonly active: boolean;
524
1022
  readonly cancelled: boolean;
525
- start(modal: boolean, locale?: string): void;
1023
+ /** Null selects the Paywall loading status when its layout is unavailable. */
1024
+ start(modal: boolean, locale?: string, paywall?: PaywallLoadingDocument | null): void;
526
1025
  /** Remove the placeholder and reveal in the same turn, before notifying the host. */
527
1026
  present(show: (hadPlaceholder: boolean) => void): void;
528
1027
  dismiss: () => void;
@@ -532,4 +1031,4 @@ declare function createPresentationLoading(container: HTMLElement | ShadowRoot,
532
1031
  wait<T>(work: Promise<T>, timeoutMs?: number): Promise<T>;
533
1032
  };
534
1033
 
535
- export { type CustomerDataIntent as C, type PresentationLoadingOptions as P, type ScreenAnswers as S, type SurfaceData as a, type PresentationState as b, createPresentationLoading as c, type CustomerPageData as d, type ScreenParameters as e, type ScreenRendererInput as f, screenInputBindingsSchema as s };
1034
+ export { type CustomerDataIntent as C, type PresentationLoadingOptions as P, type ScreenAnswers as S, type SurfaceData as a, type PaywallLoadingDocument as b, createPresentationLoading as c, type PresentationState as d, type CustomerPageData as e, type ScreenParameters as f, type ScreenRendererInput as g, screenInputBindingsSchema as s };
@@ -1 +1 @@
1
- import{b as S,c as E,d as T}from"./chunk-EMVWUEW4.js";import"./chunk-4XC34JBS.js";import{a as A}from"./chunk-P5K67CKS.js";import{e as P}from"./chunk-ILEDKSRQ.js";import"./chunk-EQPEUPMG.js";import{h as b,i as x,k as L}from"./chunk-KHM6IHPJ.js";import"./chunk-FYQXSGRT.js";import"./chunk-7MNJH5GB.js";import{F as C}from"./chunk-EUVLXS2V.js";import"./chunk-SP5AQION.js";import"./chunk-THMGTRXP.js";import"./chunk-NAZU3EEJ.js";import"./chunk-SCC3O2RD.js";import"./chunk-R23IGK5U.js";import"./chunk-ZGCKQWQ5.js";import"./chunk-EHDHWYVJ.js";import"./chunk-BXPXJARS.js";import"./chunk-5HJYR6Z4.js";import"./chunk-ZIQENZDI.js";import"./chunk-VYFSRHXM.js";import"./chunk-N7YXDSQL.js";import"./chunk-MIBRUDIS.js";import{a as r}from"./chunk-X4W22IH6.js";import{h as R}from"./chunk-R4FDIYMN.js";import"./chunk-3VUPVXAV.js";import"./chunk-CZ2RY6RG.js";import"./chunk-VF6QMMEA.js";import"./chunk-DSPLGTQI.js";import"./chunk-7QL4GF4C.js";import"./chunk-BID4UGWB.js";import"./chunk-WOT6VMZA.js";function k(t,d){let n,a=0,m=-1,l,i=!1,y=()=>{if(i)throw new r("CLOSED","Native host was destroyed");if(!t.nativeModule)throw new r("CAPABILITY_UNAVAILABLE","Link IndianaBridge and supply nativeModule");return t.nativeModule},o=()=>new r("IDENTITY_CHANGED","Customer identity changed during the native operation"),h=d.subscribeIdentity(()=>{a++,m=-1;let e=a;n&&t.nativeModule&&n.then(c=>t.nativeModule.reset(c,e)).catch(()=>{})}),I=t.nativeEvents?.(e=>{!n||!t.nativeModule||typeof e?.requestId!="string"||(async()=>{let c=await n;if(e.instanceId!==c)return;if(e.kind==="credential"){let w=a,f=null;try{if(!i&&e.revision===w){let N=await d.access();!i&&a===w&&(f=N)}}finally{await t.nativeModule.provideCredential(c,e.requestId,f)}return}let s=!1,u=a;try{if(i||e.revision!==u||!t.onNativeAction)throw o();await t.onNativeAction(e.action),s=!i&&a===u}finally{await t.nativeModule.acknowledge(c,e.requestId,s)}})().catch(()=>{})});async function p(e,c={}){let s=y();if(d.snapshot()&&!t.nativeEvents)throw new r("CAPABILITY_UNAVAILABLE","Supply nativeEvents to share credential refresh with the native host");let u=a,w=await d.access();if(i||a!==u)throw o();if(!n){let v=s.create(JSON.stringify({baseUrl:t.baseUrl??"https://api.longplayai.com",scope:t.scope,timeout:(t.timeoutMs??15e3)/1e3,credentialEvents:!!t.nativeEvents}));n=v,v.catch(()=>{n===v&&(n=void 0)})}let f=await n;if(i||a!==u)throw o();if(m!==u){if(!l||l.epoch!==u){let O=(async()=>{if(await s.identify(f,JSON.stringify({revision:u,credentials:w})),i||a!==u)throw await s.reset(f,u),o();m=u})();l={epoch:u,task:O}}let v=l;try{await v.task}finally{l===v&&(l=void 0)}}let N=await s.invoke(f,e,JSON.stringify(c));if(i||a!==u)throw o();try{return JSON.parse(N)}catch{throw new r("INVALID_RESPONSE","Native host returned invalid JSON")}}async function g(e,c){let s=await p(e,c);if(!s||typeof s!="object"||Array.isArray(s)||s.status!=="complete"&&s.status!=="dismissed")throw new r("INVALID_RESPONSE","Native presentation returned an invalid result");return s}return{showFunnel(e){return g("showFunnel",{runToken:e})},showPaywall(e){return g("showPaywall",e)},showContent(e){return g("showContent",e)},purchaseSubscription(e,c){return p("purchaseSubscription",{operationId:e,accepted:c})},switchSubscription(e,c){return p("switchSubscription",{operationId:e,accepted:c})},restorePurchases(){return p("restorePurchases")},manageSubscriptions(e){return p("manageSubscriptions",e?{productId:e}:{})},async dismiss(){a++,m=-1,n&&await y().reset(await n,a)},async destroy(){i||(i=!0,a++,h(),I?.(),n&&t.nativeModule&&await t.nativeModule.destroy(await n))}}}var M=P.trackUsage.request.shape.command,U=P.trackUsage.response;function F(t){let d=R.parse(t.scope),n=S({...t,scope:d}),a={...t,scope:d,session:n.session},m=k(t,n.session),l=0,i=!1;n.subscribeIdentity(()=>{l++});let y=()=>{if(i)throw new r("CLOSED","SDK client was destroyed");let o=n.session.peek();if(!o)throw new r("UNAUTHENTICATED","Identify the Customer first");return o};return{...n,native:m,async destroy(){i||(i=!0,l++,n.destroy(),await m.destroy())},funnel(){return E({...a,customerToken:y()})},resumeFunnel(o){return y(),C({...a,runToken:o})},paywall(o){return A(a,{...o,customerToken:y()})},async trackUsage(o){if(y(),!t.usageReporter)throw new r("INVALID_REQUEST","Configure your authenticated backend usageReporter");let h=M.parse(o),I=l,p;try{p=await t.usageReporter(h)}catch(e){throw I!==l?new r("IDENTITY_CHANGED","Customer identity changed during usage reporting"):e}if(I!==l)throw new r("IDENTITY_CHANGED","Customer identity changed during usage reporting");let g=U.parse(p);if(g.scope.projectId!==d.projectId||g.scope.environment!==d.environment)throw new r("INVALID_RESPONSE","Usage response scope differs");return g}}}export{r as LongplayError,x as createConfigurationSync,b as createFeatureClient,T as createFunnelProcess,L as createLocalFunnelClient,F as createLongplayReactNative};
1
+ import{b as S,c as E,d as T}from"./chunk-7NELM6EH.js";import"./chunk-I6TSQQ5N.js";import{a as A}from"./chunk-ERJP2GBD.js";import{e as P}from"./chunk-ILEDKSRQ.js";import"./chunk-EQPEUPMG.js";import{h as b,i as x,k as L}from"./chunk-7VRZYSTR.js";import"./chunk-FYQXSGRT.js";import"./chunk-7MNJH5GB.js";import{F as C}from"./chunk-QBA3B4YK.js";import"./chunk-ITGERPCJ.js";import"./chunk-THMGTRXP.js";import"./chunk-NAZU3EEJ.js";import"./chunk-SCC3O2RD.js";import"./chunk-R23IGK5U.js";import"./chunk-ZGCKQWQ5.js";import"./chunk-EHDHWYVJ.js";import"./chunk-BXPXJARS.js";import"./chunk-5HJYR6Z4.js";import"./chunk-WTVLNUMS.js";import"./chunk-VYFSRHXM.js";import"./chunk-N7YXDSQL.js";import"./chunk-MIBRUDIS.js";import{a as r}from"./chunk-X4W22IH6.js";import{h as R}from"./chunk-R4FDIYMN.js";import"./chunk-3VUPVXAV.js";import"./chunk-WKIR2EQG.js";import"./chunk-VF6QMMEA.js";import"./chunk-DSPLGTQI.js";import"./chunk-7QL4GF4C.js";import"./chunk-BID4UGWB.js";import"./chunk-WOT6VMZA.js";function k(t,d){let n,a=0,m=-1,l,i=!1,y=()=>{if(i)throw new r("CLOSED","Native host was destroyed");if(!t.nativeModule)throw new r("CAPABILITY_UNAVAILABLE","Link IndianaBridge and supply nativeModule");return t.nativeModule},o=()=>new r("IDENTITY_CHANGED","Customer identity changed during the native operation"),h=d.subscribeIdentity(()=>{a++,m=-1;let e=a;n&&t.nativeModule&&n.then(c=>t.nativeModule.reset(c,e)).catch(()=>{})}),I=t.nativeEvents?.(e=>{!n||!t.nativeModule||typeof e?.requestId!="string"||(async()=>{let c=await n;if(e.instanceId!==c)return;if(e.kind==="credential"){let w=a,f=null;try{if(!i&&e.revision===w){let N=await d.access();!i&&a===w&&(f=N)}}finally{await t.nativeModule.provideCredential(c,e.requestId,f)}return}let s=!1,u=a;try{if(i||e.revision!==u||!t.onNativeAction)throw o();await t.onNativeAction(e.action),s=!i&&a===u}finally{await t.nativeModule.acknowledge(c,e.requestId,s)}})().catch(()=>{})});async function p(e,c={}){let s=y();if(d.snapshot()&&!t.nativeEvents)throw new r("CAPABILITY_UNAVAILABLE","Supply nativeEvents to share credential refresh with the native host");let u=a,w=await d.access();if(i||a!==u)throw o();if(!n){let v=s.create(JSON.stringify({baseUrl:t.baseUrl??"https://api.longplayai.com",scope:t.scope,timeout:(t.timeoutMs??15e3)/1e3,credentialEvents:!!t.nativeEvents}));n=v,v.catch(()=>{n===v&&(n=void 0)})}let f=await n;if(i||a!==u)throw o();if(m!==u){if(!l||l.epoch!==u){let O=(async()=>{if(await s.identify(f,JSON.stringify({revision:u,credentials:w})),i||a!==u)throw await s.reset(f,u),o();m=u})();l={epoch:u,task:O}}let v=l;try{await v.task}finally{l===v&&(l=void 0)}}let N=await s.invoke(f,e,JSON.stringify(c));if(i||a!==u)throw o();try{return JSON.parse(N)}catch{throw new r("INVALID_RESPONSE","Native host returned invalid JSON")}}async function g(e,c){let s=await p(e,c);if(!s||typeof s!="object"||Array.isArray(s)||s.status!=="complete"&&s.status!=="dismissed")throw new r("INVALID_RESPONSE","Native presentation returned an invalid result");return s}return{showFunnel(e){return g("showFunnel",{runToken:e})},showPaywall(e){return g("showPaywall",e)},showContent(e){return g("showContent",e)},purchaseSubscription(e,c){return p("purchaseSubscription",{operationId:e,accepted:c})},switchSubscription(e,c){return p("switchSubscription",{operationId:e,accepted:c})},restorePurchases(){return p("restorePurchases")},manageSubscriptions(e){return p("manageSubscriptions",e?{productId:e}:{})},async dismiss(){a++,m=-1,n&&await y().reset(await n,a)},async destroy(){i||(i=!0,a++,h(),I?.(),n&&t.nativeModule&&await t.nativeModule.destroy(await n))}}}var M=P.trackUsage.request.shape.command,U=P.trackUsage.response;function F(t){let d=R.parse(t.scope),n=S({...t,scope:d}),a={...t,scope:d,session:n.session},m=k(t,n.session),l=0,i=!1;n.subscribeIdentity(()=>{l++});let y=()=>{if(i)throw new r("CLOSED","SDK client was destroyed");let o=n.session.peek();if(!o)throw new r("UNAUTHENTICATED","Identify the Customer first");return o};return{...n,native:m,async destroy(){i||(i=!0,l++,n.destroy(),await m.destroy())},funnel(){return E({...a,customerToken:y()})},resumeFunnel(o){return y(),C({...a,runToken:o})},paywall(o){return A(a,{...o,customerToken:y()})},async trackUsage(o){if(y(),!t.usageReporter)throw new r("INVALID_REQUEST","Configure your authenticated backend usageReporter");let h=M.parse(o),I=l,p;try{p=await t.usageReporter(h)}catch(e){throw I!==l?new r("IDENTITY_CHANGED","Customer identity changed during usage reporting"):e}if(I!==l)throw new r("IDENTITY_CHANGED","Customer identity changed during usage reporting");let g=U.parse(p);if(g.scope.projectId!==d.projectId||g.scope.environment!==d.environment)throw new r("INVALID_RESPONSE","Usage response scope differs");return g}}}export{r as LongplayError,x as createConfigurationSync,b as createFeatureClient,T as createFunnelProcess,L as createLocalFunnelClient,F as createLongplayReactNative};
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g,h,i}from"./chunk-6KBCR7JJ.js";import"./chunk-Y3MQLWGD.js";import"./chunk-N7YXDSQL.js";import"./chunk-MIBRUDIS.js";import"./chunk-X4W22IH6.js";import"./chunk-R4FDIYMN.js";import"./chunk-VF6QMMEA.js";import"./chunk-DSPLGTQI.js";import"./chunk-7QL4GF4C.js";import"./chunk-BID4UGWB.js";import"./chunk-WOT6VMZA.js";export{f as formatCustomerDecimal,b as hostedRendererScript,a as hostedRendererShell,d as inspectCustomHtml,i as mountScreenPreview,h as preparePopup,e as prepareScreen,c as sanitizeCustomHtml,g as showPopup};
1
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-TDSATEGE.js";import"./chunk-U6UHASIB.js";import"./chunk-N7YXDSQL.js";import"./chunk-MIBRUDIS.js";import"./chunk-X4W22IH6.js";import"./chunk-R4FDIYMN.js";import"./chunk-VF6QMMEA.js";import"./chunk-DSPLGTQI.js";import"./chunk-7QL4GF4C.js";import"./chunk-BID4UGWB.js";import"./chunk-WOT6VMZA.js";export{f as formatCustomerDecimal,b as hostedRendererScript,a as hostedRendererShell,d as inspectCustomHtml,i as mountScreenPreview,h as preparePopup,e as prepareScreen,c as sanitizeCustomHtml,g as showPopup};
package/dist/server.d.ts CHANGED
@@ -537,6 +537,7 @@ declare const merchantBridgeV4ManifestSchema: z.ZodObject<{
537
537
  preparations: "preparations";
538
538
  benefit_claims: "benefit_claims";
539
539
  business_results: "business_results";
540
+ checkout_termination: "checkout_termination";
540
541
  }>>;
541
542
  checkKinds: z.ZodArray<z.ZodEnum<{
542
543
  access: "access";
@@ -757,6 +758,10 @@ declare const merchantBridgeV4CommandInputs: {
757
758
  operationId: z.ZodUUID;
758
759
  customerId: z.ZodUUID;
759
760
  }, z.core.$strict>;
761
+ readonly "purchase.terminate": z.ZodObject<{
762
+ operationId: z.ZodUUID;
763
+ customerId: z.ZodUUID;
764
+ }, z.core.$strict>;
760
765
  };
761
766
  declare const merchantBridgeV4CommandOutputs: {
762
767
  readonly "bridge.ping": z.ZodObject<{
@@ -781,6 +786,7 @@ declare const merchantBridgeV4CommandOutputs: {
781
786
  preparations: "preparations";
782
787
  benefit_claims: "benefit_claims";
783
788
  business_results: "business_results";
789
+ checkout_termination: "checkout_termination";
784
790
  }>>;
785
791
  checkKinds: z.ZodArray<z.ZodEnum<{
786
792
  access: "access";
@@ -1205,6 +1211,14 @@ declare const merchantBridgeV4CommandOutputs: {
1205
1211
  expiresAt: z.ZodISODateTime;
1206
1212
  }, z.core.$strict>;
1207
1213
  }, z.core.$strict>], "lookup">;
1214
+ readonly "purchase.terminate": z.ZodObject<{
1215
+ operationId: z.ZodUUID;
1216
+ customerId: z.ZodUUID;
1217
+ outcome: z.ZodEnum<{
1218
+ requested: "requested";
1219
+ already_paid: "already_paid";
1220
+ }>;
1221
+ }, z.core.$strict>;
1208
1222
  };
1209
1223
  type MerchantBridgeV4Command = keyof typeof merchantBridgeV4CommandInputs;
1210
1224
  declare const merchantBridgeV4RequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1426,6 +1440,22 @@ declare const merchantBridgeV4RequestSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
1426
1440
  operationId: z.ZodUUID;
1427
1441
  customerId: z.ZodUUID;
1428
1442
  }, z.core.$strict>;
1443
+ }, z.core.$strict>, z.ZodObject<{
1444
+ bridgeVersion: z.ZodLiteral<4>;
1445
+ requestId: z.ZodUUID;
1446
+ scope: z.ZodObject<{
1447
+ projectId: z.ZodUUID;
1448
+ environmentId: z.ZodUUID;
1449
+ environment: z.ZodEnum<{
1450
+ sandbox: "sandbox";
1451
+ live: "live";
1452
+ }>;
1453
+ }, z.core.$strict>;
1454
+ command: z.ZodLiteral<"purchase.terminate">;
1455
+ data: z.ZodObject<{
1456
+ operationId: z.ZodUUID;
1457
+ customerId: z.ZodUUID;
1458
+ }, z.core.$strict>;
1429
1459
  }, z.core.$strict>], "command">;
1430
1460
  type MerchantBridgeV4Request<C extends MerchantBridgeV4Command = MerchantBridgeV4Command> = Extract<z.infer<typeof merchantBridgeV4RequestSchema>, {
1431
1461
  command: C;