bitsnap-react 1.6.1 → 1.7.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/README.md +135 -0
- package/dist/CartProvider-F2VH7WFO.mjs +2 -0
- package/dist/CartProvider-F2VH7WFO.mjs.map +1 -0
- package/dist/CartProvider-PDEV6GCV.css +2 -0
- package/dist/CartProvider-PDEV6GCV.css.map +1 -0
- package/dist/appearance-core-Dt2grZdl.d.mts +19 -0
- package/dist/appearance-core-Dt2grZdl.d.ts +19 -0
- package/dist/catalog.css +2 -0
- package/dist/catalog.css.map +1 -0
- package/dist/catalog.d.mts +214 -0
- package/dist/catalog.d.ts +214 -0
- package/dist/catalog.js +2 -0
- package/dist/catalog.js.map +1 -0
- package/dist/catalog.mjs +2 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/chunk-3TENJTY4.mjs +2 -0
- package/dist/chunk-3TENJTY4.mjs.map +1 -0
- package/dist/chunk-4HOZFM6V.mjs +2 -0
- package/dist/chunk-4HOZFM6V.mjs.map +1 -0
- package/dist/chunk-6KQBDN7M.mjs +2 -0
- package/dist/chunk-6KQBDN7M.mjs.map +1 -0
- package/dist/chunk-FTYJTO6O.mjs +2 -0
- package/dist/chunk-FTYJTO6O.mjs.map +1 -0
- package/dist/chunk-RATFYRKZ.mjs +4 -0
- package/dist/chunk-RATFYRKZ.mjs.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +62 -23
- package/dist/index.d.ts +62 -23
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -3
- package/dist/index.mjs.map +1 -1
- package/dist/methods-PFZSMZFU.mjs +2 -0
- package/dist/methods-PFZSMZFU.mjs.map +1 -0
- package/dist/methods-QAZED7TJ.css +2 -0
- package/dist/methods-QAZED7TJ.css.map +1 -0
- package/dist/models.d.mts +54 -0
- package/dist/models.d.ts +54 -0
- package/dist/models.js +1 -1
- package/dist/models.js.map +1 -1
- package/dist/models.mjs +1 -1
- package/dist/models.mjs.map +1 -1
- package/dist/returns.d.mts +602 -52
- package/dist/returns.d.ts +602 -52
- package/dist/returns.js +1 -1
- package/dist/returns.js.map +1 -1
- package/dist/returns.mjs +1 -1
- package/package.json +21 -26
- package/dist/chunk-O4ICBP4G.mjs +0 -2
- package/dist/chunk-O4ICBP4G.mjs.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{G as a,H as b,I as c,J as d,K as e}from"./chunk-RATFYRKZ.mjs";import"./chunk-4HOZFM6V.mjs";import"./chunk-3TENJTY4.mjs";import"./chunk-U6FLIRIV.mjs";export{a as Bitsnap,c as createCheckout,b as createPaymentURL,d as getReferenceIfPossible,e as injectReferenceToRequestIfNeeded};
|
|
2
|
+
//# sourceMappingURL=methods-PFZSMZFU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.bitsnap-react #audio-player-container{--seek-before-width: 0%;--buffered-width: 0%}.bitsnap-react input[type=range]{position:relative;-webkit-appearance:none;width:100%;margin:0;padding:0;height:19px;float:left;outline:none;background:transparent}.bitsnap-react input[type=range]::-webkit-slider-runnable-track{width:100%;height:3px;cursor:pointer;background:#d9d9d9}.bitsnap-react input[type=range]:before{position:absolute;content:"";top:8px;left:0;width:var(--seek-before-width);height:3px;background-color:#8c8c8c;cursor:pointer}.bitsnap-react input[type=range]::-webkit-slider-thumb{position:relative;-webkit-appearance:none;box-sizing:content-box;border:1px solid #d9d9d9;height:15px;width:15px;border-radius:50%;background-color:#8c8c8c;cursor:pointer;margin:-7px 0 0}.bitsnap-react input[type=range]:active::-webkit-slider-thumb{transform:scale(1.2);background:#e2e8f0}.bitsnap-react input[type=range]::-moz-range-track{width:100%;height:3px;cursor:pointer;background:linear-gradient(to right,rgba(0,125,181,.6) var(--buffered-width),rgba(0,125,181,.2) var(--buffered-width))}.bitsnap-react input[type=range]::-moz-range-progress{background-color:#007db5}.bitsnap-react input[type=range]::-moz-focus-outer{border:0}.bitsnap-react input[type=range]::-moz-range-thumb{box-sizing:content-box;border:1px solid #007db5;height:15px;width:15px;border-radius:50%;background-color:#fff;cursor:pointer}.bitsnap-react input[type=range]:active::-moz-range-thumb{transform:scale(1.2);background:#007db5}.bitsnap-react input[type=range]::-ms-track{width:100%;height:3px;cursor:pointer;background:transparent;border:solid transparent;color:transparent}.bitsnap-react input[type=range]::-ms-fill-lower{background-color:#007db5}.bitsnap-react input[type=range]::-ms-fill-upper{background:linear-gradient(to right,rgba(0,125,181,.6) var(--buffered-width),rgba(0,125,181,.2) var(--buffered-width))}.bitsnap-react input[type=range]::-ms-thumb{box-sizing:content-box;border:1px solid #007db5;height:15px;width:15px;border-radius:50%;background-color:#fff;cursor:pointer}.bitsnap-react input[type=range]:active::-ms-thumb{transform:scale(1.2);background:#007db5}.bitsnap-react .SliderRoot{position:relative;display:flex;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none;width:200px;height:20px}.bitsnap-react .SliderTrack{background-color:var(--black-a10);position:relative;flex-grow:1;border-radius:9999px;height:3px}.bitsnap-react .SliderRange{position:absolute;background-color:#fff;border-radius:9999px;height:100%}.bitsnap-react .SliderThumb{display:block;width:20px;height:20px;background-color:#fff;box-shadow:0 2px 10px var(--black-a7);border-radius:10px}.bitsnap-react .SliderThumb:hover{background-color:var(--violet-3)}.bitsnap-react .SliderThumb:focus{outline:none;box-shadow:0 0 0 5px var(--black-a8)}
|
|
2
|
+
/*# sourceMappingURL=methods-QAZED7TJ.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/panel/audio-player/audio-player.css"],"sourcesContent":[".bitsnap-react #audio-player-container {\n --seek-before-width: 0%;\n --buffered-width: 0%;\n}\n\n.bitsnap-react input[type=\"range\"] {\n position: relative;\n -webkit-appearance: none;\n width: 100%;\n margin: 0;\n padding: 0;\n height: 19px;\n float: left;\n outline: none;\n background: transparent;\n}\n.bitsnap-react input[type=\"range\"]::-webkit-slider-runnable-track {\n width: 100%;\n height: 3px;\n cursor: pointer;\n /*background: linear-gradient(to right, rgba(0, 125, 181, 0.6) var(--buffered-width), rgba(0, 125, 181, 0.2) var(--buffered-width));*/\n background: #d9d9d9;\n}\n.bitsnap-react input[type=\"range\"]::before {\n position: absolute;\n content: \"\";\n top: 8px;\n left: 0;\n width: var(--seek-before-width);\n height: 3px;\n background-color: #8c8c8c;\n cursor: pointer;\n}\n.bitsnap-react input[type=\"range\"]::-webkit-slider-thumb {\n position: relative;\n -webkit-appearance: none;\n box-sizing: content-box;\n border: 1px solid #d9d9d9;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: #8c8c8c;\n cursor: pointer;\n margin: -7px 0 0 0;\n}\n.bitsnap-react input[type=\"range\"]:active::-webkit-slider-thumb {\n transform: scale(1.2);\n background: #e2e8f0;\n}\n.bitsnap-react input[type=\"range\"]::-moz-range-track {\n width: 100%;\n height: 3px;\n cursor: pointer;\n background: linear-gradient(\n to right,\n rgba(0, 125, 181, 0.6) var(--buffered-width),\n rgba(0, 125, 181, 0.2) var(--buffered-width)\n );\n}\n.bitsnap-react input[type=\"range\"]::-moz-range-progress {\n background-color: #007db5;\n}\n.bitsnap-react input[type=\"range\"]::-moz-focus-outer {\n border: 0;\n}\n.bitsnap-react input[type=\"range\"]::-moz-range-thumb {\n box-sizing: content-box;\n border: 1px solid #007db5;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: #fff;\n cursor: pointer;\n}\n.bitsnap-react input[type=\"range\"]:active::-moz-range-thumb {\n transform: scale(1.2);\n background: #007db5;\n}\n.bitsnap-react input[type=\"range\"]::-ms-track {\n width: 100%;\n height: 3px;\n cursor: pointer;\n background: transparent;\n border: solid transparent;\n color: transparent;\n}\n.bitsnap-react input[type=\"range\"]::-ms-fill-lower {\n background-color: #007db5;\n}\n.bitsnap-react input[type=\"range\"]::-ms-fill-upper {\n background: linear-gradient(\n to right,\n rgba(0, 125, 181, 0.6) var(--buffered-width),\n rgba(0, 125, 181, 0.2) var(--buffered-width)\n );\n}\n.bitsnap-react input[type=\"range\"]::-ms-thumb {\n box-sizing: content-box;\n border: 1px solid #007db5;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: #fff;\n cursor: pointer;\n}\n.bitsnap-react input[type=\"range\"]:active::-ms-thumb {\n transform: scale(1.2);\n background: #007db5;\n}\n\n.bitsnap-react .SliderRoot {\n position: relative;\n display: flex;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n touch-action: none;\n width: 200px;\n height: 20px;\n}\n\n.bitsnap-react .SliderTrack {\n background-color: var(--black-a10);\n position: relative;\n flex-grow: 1;\n border-radius: 9999px;\n height: 3px;\n}\n\n.bitsnap-react .SliderRange {\n position: absolute;\n background-color: white;\n border-radius: 9999px;\n height: 100%;\n}\n\n.bitsnap-react .SliderThumb {\n display: block;\n width: 20px;\n height: 20px;\n background-color: white;\n box-shadow: 0 2px 10px var(--black-a7);\n border-radius: 10px;\n}\n.bitsnap-react .SliderThumb:hover {\n background-color: var(--violet-3);\n}\n.bitsnap-react .SliderThumb:focus {\n outline: none;\n box-shadow: 0 0 0 5px var(--black-a8);\n}\n"],"mappings":"AAAA,CAAC,cAAc,CAAC,uBACd,qBAAqB,GACrB,kBAAkB,EACpB,CAEA,CALC,cAKc,KAAK,CAAC,YACnB,SAAU,SACV,mBAAoB,KACpB,MAAO,KART,OASU,EATV,QAUW,EACT,OAAQ,KACR,MAAO,KACP,QAAS,KACT,WAAY,WACd,CACA,CAhBC,cAgBc,KAAK,CAAC,WAAa,gCAChC,MAAO,KACP,OAAQ,IACR,OAAQ,QAER,WAAY,OACd,CACA,CAvBC,cAuBc,KAAK,CAAC,WAAa,QAChC,SAAU,SACV,QAAS,GACT,IAAK,IACL,KAAM,EACN,MAAO,IAAI,qBACX,OAAQ,IACR,iBAA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CAAE,GAAG,CAAE,IAAK,IAAI,kBAE/B,CACA,CAhGC,cAgGc,KAAK,CAAC,WAAa,YAChC,WAAY,YACZ,OAAQ,IAAI,MAAM,QAClB,OAAQ,KACR,MAAO,KApGT,cAqGiB,IACf,iBAAkB,KAClB,OAAQ,OACV,CACA,CAzGC,cAyGc,KAAK,CAAC,WAAa,OAAO,YACvC,UAAW,MAAM,KACjB,WAAY,OACd,CAEA,CA9GC,cA8Gc,CAAC,WACd,SAAU,SACV,QAAS,KACT,YAAa,OACb,oBAAqB,KAClB,iBAAkB,KACb,YAAa,KACrB,aAAc,KACd,MAAO,MACP,OAAQ,IACV,CAEA,CA1HC,cA0Hc,CAAC,YACd,iBAAkB,IAAI,aACtB,SAAU,SACV,UAAW,EA7Hb,cA8HiB,OACf,OAAQ,GACV,CAEA,CAlIC,cAkIc,CAAC,YACd,SAAU,SACV,iBAAkB,KApIpB,cAqIiB,OACf,OAAQ,IACV,CAEA,CAzIC,cAyIc,CAAC,YACd,QAAS,MACT,MAAO,KACP,OAAQ,KACR,iBAAkB,KAClB,WAAY,EAAE,IAAI,KAAK,IAAI,YA9I7B,cA+IiB,IACjB,CACA,CAjJC,cAiJc,CARC,WAQW,OACzB,iBAAkB,IAAI,WACxB,CACA,CApJC,cAoJc,CAXC,WAWW,OACzB,QAAS,KACT,WAAY,EAAE,EAAE,EAAE,IAAI,IAAI,WAC5B","names":[]}
|
package/dist/models.d.mts
CHANGED
|
@@ -587,6 +587,60 @@ declare namespace BitsnapModels {
|
|
|
587
587
|
}, z.core.$strip>;
|
|
588
588
|
}, z.core.$strip>;
|
|
589
589
|
}, z.core.$strip>>;
|
|
590
|
+
const PublicListProductImageSchema: z.ZodObject<{
|
|
591
|
+
url: z.ZodString;
|
|
592
|
+
thumbnailUrl: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
type PublicListProductImage = z.infer<typeof PublicListProductImageSchema>;
|
|
595
|
+
/**
|
|
596
|
+
* One card of the public product catalog
|
|
597
|
+
* (`GET /api/integrations/{projectID}/public-commerce/product-list`).
|
|
598
|
+
* `price` and `compareAtPrice` are in minor units (grosze, cents), like the
|
|
599
|
+
* prices of the cart.
|
|
600
|
+
*/
|
|
601
|
+
const PublicListProductSchema: z.ZodObject<{
|
|
602
|
+
id: z.ZodString;
|
|
603
|
+
cartItemId: z.ZodOptional<z.ZodString>;
|
|
604
|
+
uniqueSlug: z.ZodString;
|
|
605
|
+
name: z.ZodString;
|
|
606
|
+
shortDescription: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
607
|
+
image: z.ZodUnion<readonly [z.ZodObject<{
|
|
608
|
+
url: z.ZodString;
|
|
609
|
+
thumbnailUrl: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
610
|
+
}, z.core.$strip>, z.ZodNull]>;
|
|
611
|
+
price: z.ZodNumber;
|
|
612
|
+
currency: z.ZodString;
|
|
613
|
+
compareAtPrice: z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>;
|
|
614
|
+
priceFrom: z.ZodBoolean;
|
|
615
|
+
variantCount: z.ZodNumber;
|
|
616
|
+
isRecurring: z.ZodBoolean;
|
|
617
|
+
available: z.ZodBoolean;
|
|
618
|
+
addToCart: z.ZodBoolean;
|
|
619
|
+
}, z.core.$strip>;
|
|
620
|
+
type PublicListProduct = z.infer<typeof PublicListProductSchema>;
|
|
621
|
+
const ProductListResponseSchema: z.ZodObject<{
|
|
622
|
+
items: z.ZodArray<z.ZodObject<{
|
|
623
|
+
id: z.ZodString;
|
|
624
|
+
cartItemId: z.ZodOptional<z.ZodString>;
|
|
625
|
+
uniqueSlug: z.ZodString;
|
|
626
|
+
name: z.ZodString;
|
|
627
|
+
shortDescription: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
628
|
+
image: z.ZodUnion<readonly [z.ZodObject<{
|
|
629
|
+
url: z.ZodString;
|
|
630
|
+
thumbnailUrl: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
631
|
+
}, z.core.$strip>, z.ZodNull]>;
|
|
632
|
+
price: z.ZodNumber;
|
|
633
|
+
currency: z.ZodString;
|
|
634
|
+
compareAtPrice: z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>;
|
|
635
|
+
priceFrom: z.ZodBoolean;
|
|
636
|
+
variantCount: z.ZodNumber;
|
|
637
|
+
isRecurring: z.ZodBoolean;
|
|
638
|
+
available: z.ZodBoolean;
|
|
639
|
+
addToCart: z.ZodBoolean;
|
|
640
|
+
}, z.core.$strip>>;
|
|
641
|
+
totalCount: z.ZodNumber;
|
|
642
|
+
}, z.core.$strip>;
|
|
643
|
+
type ProductListResponse = z.infer<typeof ProductListResponseSchema>;
|
|
590
644
|
}
|
|
591
645
|
|
|
592
646
|
export { BitsnapModels };
|
package/dist/models.d.ts
CHANGED
|
@@ -587,6 +587,60 @@ declare namespace BitsnapModels {
|
|
|
587
587
|
}, z.core.$strip>;
|
|
588
588
|
}, z.core.$strip>;
|
|
589
589
|
}, z.core.$strip>>;
|
|
590
|
+
const PublicListProductImageSchema: z.ZodObject<{
|
|
591
|
+
url: z.ZodString;
|
|
592
|
+
thumbnailUrl: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
type PublicListProductImage = z.infer<typeof PublicListProductImageSchema>;
|
|
595
|
+
/**
|
|
596
|
+
* One card of the public product catalog
|
|
597
|
+
* (`GET /api/integrations/{projectID}/public-commerce/product-list`).
|
|
598
|
+
* `price` and `compareAtPrice` are in minor units (grosze, cents), like the
|
|
599
|
+
* prices of the cart.
|
|
600
|
+
*/
|
|
601
|
+
const PublicListProductSchema: z.ZodObject<{
|
|
602
|
+
id: z.ZodString;
|
|
603
|
+
cartItemId: z.ZodOptional<z.ZodString>;
|
|
604
|
+
uniqueSlug: z.ZodString;
|
|
605
|
+
name: z.ZodString;
|
|
606
|
+
shortDescription: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
607
|
+
image: z.ZodUnion<readonly [z.ZodObject<{
|
|
608
|
+
url: z.ZodString;
|
|
609
|
+
thumbnailUrl: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
610
|
+
}, z.core.$strip>, z.ZodNull]>;
|
|
611
|
+
price: z.ZodNumber;
|
|
612
|
+
currency: z.ZodString;
|
|
613
|
+
compareAtPrice: z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>;
|
|
614
|
+
priceFrom: z.ZodBoolean;
|
|
615
|
+
variantCount: z.ZodNumber;
|
|
616
|
+
isRecurring: z.ZodBoolean;
|
|
617
|
+
available: z.ZodBoolean;
|
|
618
|
+
addToCart: z.ZodBoolean;
|
|
619
|
+
}, z.core.$strip>;
|
|
620
|
+
type PublicListProduct = z.infer<typeof PublicListProductSchema>;
|
|
621
|
+
const ProductListResponseSchema: z.ZodObject<{
|
|
622
|
+
items: z.ZodArray<z.ZodObject<{
|
|
623
|
+
id: z.ZodString;
|
|
624
|
+
cartItemId: z.ZodOptional<z.ZodString>;
|
|
625
|
+
uniqueSlug: z.ZodString;
|
|
626
|
+
name: z.ZodString;
|
|
627
|
+
shortDescription: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
628
|
+
image: z.ZodUnion<readonly [z.ZodObject<{
|
|
629
|
+
url: z.ZodString;
|
|
630
|
+
thumbnailUrl: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
631
|
+
}, z.core.$strip>, z.ZodNull]>;
|
|
632
|
+
price: z.ZodNumber;
|
|
633
|
+
currency: z.ZodString;
|
|
634
|
+
compareAtPrice: z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>;
|
|
635
|
+
priceFrom: z.ZodBoolean;
|
|
636
|
+
variantCount: z.ZodNumber;
|
|
637
|
+
isRecurring: z.ZodBoolean;
|
|
638
|
+
available: z.ZodBoolean;
|
|
639
|
+
addToCart: z.ZodBoolean;
|
|
640
|
+
}, z.core.$strip>>;
|
|
641
|
+
totalCount: z.ZodNumber;
|
|
642
|
+
}, z.core.$strip>;
|
|
643
|
+
type ProductListResponse = z.infer<typeof ProductListResponseSchema>;
|
|
590
644
|
}
|
|
591
645
|
|
|
592
646
|
export { BitsnapModels };
|
package/dist/models.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var g=Object.create;var c=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var f=(r,o)=>{for(var n in o)c(r,n,{get:o[n],enumerable:!0})},u=(r,o,n,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of P(o))!d.call(r,a)&&a!==n&&c(r,a,{get:()=>o[a],enumerable:!(i=y(o,a))||i.enumerable});return r};var S=(r,o,n)=>(n=r!=null?g(h(r)):{},u(o||!r||!r.__esModule?c(n,"default",{value:r,enumerable:!0}):n,r)),x=r=>u(c({},"__esModule",{value:!0}),r);var D={};f(D,{BitsnapModels:()=>l});module.exports=x(D);var e=S(require("zod")),l;(t=>(t.BaselinkerFieldsSchema=e.object({storageID:e.string().optional()}),t.MetadataSchema=e.record(e.string(),e.any()),t.ProductPricingSchema=e.object({regularPrice:e.number(),effectivePrice:e.number(),currency:e.string(),discount:e.object({id:e.string(),type:e.enum(["FIXED","PERCENTAGE"]),value:e.number(),status:e.enum(["ACTIVE","SCHEDULED","EXPIRED","DISABLED"]),startsAt:e.number().optional(),endsAt:e.number().optional()}).optional(),referencePrice:e.object({amount:e.number().optional(),windowDays:e.literal(30),asOf:e.number(),basis:e.literal("observed-history"),historyAvailable:e.boolean()}),priceVersion:e.string(),nextPriceChangeAt:e.number().optional()}),t.VariantSchema=e.object({id:e.string(),name:e.string(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),images:e.array(e.string()),availableQuantity:e.number().optional(),isDeliverable:e.boolean().optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.AdditionalSchema=e.object({sku:e.string().optional(),baselinkerFields:t.BaselinkerFieldsSchema.optional(),isPresale:e.boolean().optional()}),t.ItemSchema=e.object({id:e.string(),ownerID:e.string().optional(),name:e.string(),description:e.union([e.string(),e.null()]).optional(),createdAt:e.number().optional(),updatedAt:e.number().optional(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),image_url:e.string(),images:e.array(e.string()),isDeliverable:e.boolean().optional(),availableQuantity:e.number().optional(),additional:t.AdditionalSchema.optional(),variants:e.array(t.VariantSchema).optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.DataSchema=e.object({success:e.boolean(),result:e.array(t.ItemSchema),totalCount:e.number()}),t.ProductsResultResultSchema=e.object({data:t.DataSchema}),t.ProductsResultElementSchema=e.array(e.object({result:t.ProductsResultResultSchema})),t.ProductResultSchema=e.array(e.object({result:e.object({data:e.object({success:e.boolean(),message:e.string().optional(),result:t.ItemSchema.optional()})})})),t.PublicListProductImageSchema=e.object({url:e.string(),thumbnailUrl:e.union([e.string(),e.null()])}),t.PublicListProductSchema=e.object({id:e.string(),cartItemId:e.string().optional(),uniqueSlug:e.string(),name:e.string(),shortDescription:e.union([e.string(),e.null()]),image:e.union([t.PublicListProductImageSchema,e.null()]),price:e.number(),currency:e.string(),compareAtPrice:e.union([e.number(),e.null()]),priceFrom:e.boolean(),variantCount:e.number(),isRecurring:e.boolean(),available:e.boolean(),addToCart:e.boolean()}),t.ProductListResponseSchema=e.object({items:e.array(t.PublicListProductSchema),totalCount:e.number()})))(l||={});
|
|
2
2
|
//# sourceMappingURL=models.js.map
|
package/dist/models.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/models.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport namespace BitsnapModels {\n export const BaselinkerFieldsSchema = z.object({\n storageID: z.string().optional(),\n });\n export type BaselinkerFields = z.infer<typeof BaselinkerFieldsSchema>;\n\n export const MetadataSchema = z.record(z.string(), z.any());\n\n export const ProductPricingSchema = z.object({\n regularPrice: z.number(),\n effectivePrice: z.number(),\n currency: z.string(),\n discount: z.object({\n id: z.string(),\n type: z.enum([\"FIXED\", \"PERCENTAGE\"]),\n value: z.number(),\n status: z.enum([\"ACTIVE\", \"SCHEDULED\", \"EXPIRED\", \"DISABLED\"]),\n startsAt: z.number().optional(),\n endsAt: z.number().optional(),\n }).optional(),\n referencePrice: z.object({\n amount: z.number().optional(),\n windowDays: z.literal(30),\n asOf: z.number(),\n basis: z.literal(\"observed-history\"),\n historyAvailable: z.boolean(),\n }),\n priceVersion: z.string(),\n nextPriceChangeAt: z.number().optional(),\n });\n export type ProductPricing = z.infer<typeof ProductPricingSchema>;\n\n export const VariantSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n images: z.array(z.string()),\n availableQuantity: z.number().optional(),\n isDeliverable: z.boolean().optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Variant = z.infer<typeof VariantSchema>;\n\n export const AdditionalSchema = z.object({\n sku: z.string().optional(),\n baselinkerFields: BaselinkerFieldsSchema.optional(),\n isPresale: z.boolean().optional(),\n });\n export type Additional = z.infer<typeof AdditionalSchema>;\n\n export const ItemSchema = z.object({\n id: z.string(),\n ownerID: z.string().optional(),\n name: z.string(),\n description: z.union([z.string(), z.null()]).optional(),\n createdAt: z.number().optional(),\n updatedAt: z.number().optional(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n image_url: z.string(),\n images: z.array(z.string()),\n isDeliverable: z.boolean().optional(),\n availableQuantity: z.number().optional(),\n additional: AdditionalSchema.optional(),\n variants: z.array(VariantSchema).optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Item = z.infer<typeof ItemSchema>;\n\n export const DataSchema = z.object({\n success: z.boolean(),\n result: z.array(ItemSchema),\n totalCount: z.number(),\n });\n export type Data = z.infer<typeof DataSchema>;\n\n export const ProductsResultResultSchema = z.object({\n data: DataSchema,\n });\n export type ProductsResultResult = z.infer<typeof ProductsResultResultSchema>;\n\n export const ProductsResultElementSchema = z.array(\n z.object({\n result: ProductsResultResultSchema,\n }),\n );\n export type ProductsResultElement = z.infer<\n typeof ProductsResultElementSchema\n >;\n\n export const ProductResultSchema = z.array(\n z.object({\n result: z.object({\n data: z.object({\n success: z.boolean(),\n message: z.string().optional(),\n result: ItemSchema.optional(),\n }),\n }),\n }),\n );\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmB,kBAEFF,OACFA,EAAA,uBAA2B,SAAO,CAC7C,UAAa,SAAO,EAAE,SAAS,CACjC,CAAC,EAGYA,EAAA,eAAmB,SAAS,SAAO,EAAK,MAAI,CAAC,EAE7CA,EAAA,qBAAyB,SAAO,CAC3C,aAAgB,SAAO,EACvB,eAAkB,SAAO,EACzB,SAAY,SAAO,EACnB,SAAY,SAAO,CACjB,GAAM,SAAO,EACb,KAAQ,OAAK,CAAC,QAAS,YAAY,CAAC,EACpC,MAAS,SAAO,EAChB,OAAU,OAAK,CAAC,SAAU,YAAa,UAAW,UAAU,CAAC,EAC7D,SAAY,SAAO,EAAE,SAAS,EAC9B,OAAU,SAAO,EAAE,SAAS,CAC9B,CAAC,EAAE,SAAS,EACZ,eAAkB,SAAO,CACvB,OAAU,SAAO,EAAE,SAAS,EAC5B,WAAc,UAAQ,EAAE,EACxB,KAAQ,SAAO,EACf,MAAS,UAAQ,kBAAkB,EACnC,iBAAoB,UAAQ,CAC9B,CAAC,EACD,aAAgB,SAAO,EACvB,kBAAqB,SAAO,EAAE,SAAS,CACzC,CAAC,EAGYA,EAAA,cAAkB,SAAO,CACpC,GAAM,SAAO,EACb,KAAQ,SAAO,EACf,MAAS,SAAO,EAChB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,EACnB,QAAW,SAAO,EAAE,SAAS,EAC7B,OAAQA,EAAA,WAAW,SAAS,CAC9B,CAAC,CACH,CAAC,CACH,CAAC,CACH,
|
|
1
|
+
{"version":3,"sources":["../src/models.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport namespace BitsnapModels {\n export const BaselinkerFieldsSchema = z.object({\n storageID: z.string().optional(),\n });\n export type BaselinkerFields = z.infer<typeof BaselinkerFieldsSchema>;\n\n export const MetadataSchema = z.record(z.string(), z.any());\n\n export const ProductPricingSchema = z.object({\n regularPrice: z.number(),\n effectivePrice: z.number(),\n currency: z.string(),\n discount: z.object({\n id: z.string(),\n type: z.enum([\"FIXED\", \"PERCENTAGE\"]),\n value: z.number(),\n status: z.enum([\"ACTIVE\", \"SCHEDULED\", \"EXPIRED\", \"DISABLED\"]),\n startsAt: z.number().optional(),\n endsAt: z.number().optional(),\n }).optional(),\n referencePrice: z.object({\n amount: z.number().optional(),\n windowDays: z.literal(30),\n asOf: z.number(),\n basis: z.literal(\"observed-history\"),\n historyAvailable: z.boolean(),\n }),\n priceVersion: z.string(),\n nextPriceChangeAt: z.number().optional(),\n });\n export type ProductPricing = z.infer<typeof ProductPricingSchema>;\n\n export const VariantSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n images: z.array(z.string()),\n availableQuantity: z.number().optional(),\n isDeliverable: z.boolean().optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Variant = z.infer<typeof VariantSchema>;\n\n export const AdditionalSchema = z.object({\n sku: z.string().optional(),\n baselinkerFields: BaselinkerFieldsSchema.optional(),\n isPresale: z.boolean().optional(),\n });\n export type Additional = z.infer<typeof AdditionalSchema>;\n\n export const ItemSchema = z.object({\n id: z.string(),\n ownerID: z.string().optional(),\n name: z.string(),\n description: z.union([z.string(), z.null()]).optional(),\n createdAt: z.number().optional(),\n updatedAt: z.number().optional(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n image_url: z.string(),\n images: z.array(z.string()),\n isDeliverable: z.boolean().optional(),\n availableQuantity: z.number().optional(),\n additional: AdditionalSchema.optional(),\n variants: z.array(VariantSchema).optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Item = z.infer<typeof ItemSchema>;\n\n export const DataSchema = z.object({\n success: z.boolean(),\n result: z.array(ItemSchema),\n totalCount: z.number(),\n });\n export type Data = z.infer<typeof DataSchema>;\n\n export const ProductsResultResultSchema = z.object({\n data: DataSchema,\n });\n export type ProductsResultResult = z.infer<typeof ProductsResultResultSchema>;\n\n export const ProductsResultElementSchema = z.array(\n z.object({\n result: ProductsResultResultSchema,\n }),\n );\n export type ProductsResultElement = z.infer<\n typeof ProductsResultElementSchema\n >;\n\n export const ProductResultSchema = z.array(\n z.object({\n result: z.object({\n data: z.object({\n success: z.boolean(),\n message: z.string().optional(),\n result: ItemSchema.optional(),\n }),\n }),\n }),\n );\n\n export const PublicListProductImageSchema = z.object({\n url: z.string(),\n thumbnailUrl: z.union([z.string(), z.null()]),\n });\n export type PublicListProductImage = z.infer<\n typeof PublicListProductImageSchema\n >;\n\n /**\n * One card of the public product catalog\n * (`GET /api/integrations/{projectID}/public-commerce/product-list`).\n * `price` and `compareAtPrice` are in minor units (grosze, cents), like the\n * prices of the cart.\n */\n export const PublicListProductSchema = z.object({\n id: z.string(),\n /**\n * ID the cart should add: the variant ID for single-variant products.\n * Older backends omit it; use `cartItemId ?? id`.\n */\n cartItemId: z.string().optional(),\n uniqueSlug: z.string(),\n name: z.string(),\n shortDescription: z.union([z.string(), z.null()]),\n image: z.union([PublicListProductImageSchema, z.null()]),\n price: z.number(),\n currency: z.string(),\n compareAtPrice: z.union([z.number(), z.null()]),\n /** `true` when the variants have different prices: show \"from {price}\". */\n priceFrom: z.boolean(),\n variantCount: z.number(),\n isRecurring: z.boolean(),\n available: z.boolean(),\n /** `true` when the product can be added to the cart straight from the list. */\n addToCart: z.boolean(),\n });\n export type PublicListProduct = z.infer<typeof PublicListProductSchema>;\n\n export const ProductListResponseSchema = z.object({\n items: z.array(PublicListProductSchema),\n totalCount: z.number(),\n });\n export type ProductListResponse = z.infer<typeof ProductListResponseSchema>;\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmB,kBAEFF,OACFA,EAAA,uBAA2B,SAAO,CAC7C,UAAa,SAAO,EAAE,SAAS,CACjC,CAAC,EAGYA,EAAA,eAAmB,SAAS,SAAO,EAAK,MAAI,CAAC,EAE7CA,EAAA,qBAAyB,SAAO,CAC3C,aAAgB,SAAO,EACvB,eAAkB,SAAO,EACzB,SAAY,SAAO,EACnB,SAAY,SAAO,CACjB,GAAM,SAAO,EACb,KAAQ,OAAK,CAAC,QAAS,YAAY,CAAC,EACpC,MAAS,SAAO,EAChB,OAAU,OAAK,CAAC,SAAU,YAAa,UAAW,UAAU,CAAC,EAC7D,SAAY,SAAO,EAAE,SAAS,EAC9B,OAAU,SAAO,EAAE,SAAS,CAC9B,CAAC,EAAE,SAAS,EACZ,eAAkB,SAAO,CACvB,OAAU,SAAO,EAAE,SAAS,EAC5B,WAAc,UAAQ,EAAE,EACxB,KAAQ,SAAO,EACf,MAAS,UAAQ,kBAAkB,EACnC,iBAAoB,UAAQ,CAC9B,CAAC,EACD,aAAgB,SAAO,EACvB,kBAAqB,SAAO,EAAE,SAAS,CACzC,CAAC,EAGYA,EAAA,cAAkB,SAAO,CACpC,GAAM,SAAO,EACb,KAAQ,SAAO,EACf,MAAS,SAAO,EAChB,SAAY,SAAO,EACnB,SAAUA,EAAA,eAAe,SAAS,EAClC,OAAU,QAAQ,SAAO,CAAC,EAC1B,kBAAqB,SAAO,EAAE,SAAS,EACvC,cAAiB,UAAQ,EAAE,SAAS,EACpC,oBAAuB,SAAO,EAAE,SAAS,EACzC,QAASA,EAAA,q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AAC,CAAC,CAC9C,CAAC,EAWYA,EAAA,wBAA4B,SAAO,CAC9C,GAAM,SAAO,EAKb,WAAc,SAAO,EAAE,SAAS,EAChC,WAAc,SAAO,EACrB,KAAQ,SAAO,EACf,iBAAoB,QAAM,CAAG,SAAO,EAAK,OAAK,CAAC,CAAC,EAChD,MAAS,QAAM,CAACA,EAAA,6BAAgC,OAAK,CAAC,CAAC,EACvD,MAAS,SAAO,EAChB,SAAY,SAAO,EACnB,eAAkB,QAAM,CAAG,SAAO,EAAK,OAAK,CAAC,CAAC,EAE9C,UAAa,UAAQ,EACrB,aAAgB,SAAO,EACvB,YAAe,UAAQ,EACvB,UAAa,UAAQ,EAErB,UAAa,UAAQ,CACvB,CAAC,EAGYA,EAAA,0BAA8B,SAAO,CAChD,MAAS,QAAMA,EAAA,uBAAuB,EACtC,WAAc,SAAO,CACvB,CAAC,IApJcA,IAAA","names":["models_exports","__export","BitsnapModels","__toCommonJS","z"]}
|
package/dist/models.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-U6FLIRIV.mjs";import*as e from"zod";var
|
|
1
|
+
import"./chunk-U6FLIRIV.mjs";import*as e from"zod";var s;(t=>(t.BaselinkerFieldsSchema=e.object({storageID:e.string().optional()}),t.MetadataSchema=e.record(e.string(),e.any()),t.ProductPricingSchema=e.object({regularPrice:e.number(),effectivePrice:e.number(),currency:e.string(),discount:e.object({id:e.string(),type:e.enum(["FIXED","PERCENTAGE"]),value:e.number(),status:e.enum(["ACTIVE","SCHEDULED","EXPIRED","DISABLED"]),startsAt:e.number().optional(),endsAt:e.number().optional()}).optional(),referencePrice:e.object({amount:e.number().optional(),windowDays:e.literal(30),asOf:e.number(),basis:e.literal("observed-history"),historyAvailable:e.boolean()}),priceVersion:e.string(),nextPriceChangeAt:e.number().optional()}),t.VariantSchema=e.object({id:e.string(),name:e.string(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),images:e.array(e.string()),availableQuantity:e.number().optional(),isDeliverable:e.boolean().optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.AdditionalSchema=e.object({sku:e.string().optional(),baselinkerFields:t.BaselinkerFieldsSchema.optional(),isPresale:e.boolean().optional()}),t.ItemSchema=e.object({id:e.string(),ownerID:e.string().optional(),name:e.string(),description:e.union([e.string(),e.null()]).optional(),createdAt:e.number().optional(),updatedAt:e.number().optional(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),image_url:e.string(),images:e.array(e.string()),isDeliverable:e.boolean().optional(),availableQuantity:e.number().optional(),additional:t.AdditionalSchema.optional(),variants:e.array(t.VariantSchema).optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.DataSchema=e.object({success:e.boolean(),result:e.array(t.ItemSchema),totalCount:e.number()}),t.ProductsResultResultSchema=e.object({data:t.DataSchema}),t.ProductsResultElementSchema=e.array(e.object({result:t.ProductsResultResultSchema})),t.ProductResultSchema=e.array(e.object({result:e.object({data:e.object({success:e.boolean(),message:e.string().optional(),result:t.ItemSchema.optional()})})})),t.PublicListProductImageSchema=e.object({url:e.string(),thumbnailUrl:e.union([e.string(),e.null()])}),t.PublicListProductSchema=e.object({id:e.string(),cartItemId:e.string().optional(),uniqueSlug:e.string(),name:e.string(),shortDescription:e.union([e.string(),e.null()]),image:e.union([t.PublicListProductImageSchema,e.null()]),price:e.number(),currency:e.string(),compareAtPrice:e.union([e.number(),e.null()]),priceFrom:e.boolean(),variantCount:e.number(),isRecurring:e.boolean(),available:e.boolean(),addToCart:e.boolean()}),t.ProductListResponseSchema=e.object({items:e.array(t.PublicListProductSchema),totalCount:e.number()})))(s||={});export{s as BitsnapModels};
|
|
2
2
|
//# sourceMappingURL=models.mjs.map
|
package/dist/models.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/models.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport namespace BitsnapModels {\n export const BaselinkerFieldsSchema = z.object({\n storageID: z.string().optional(),\n });\n export type BaselinkerFields = z.infer<typeof BaselinkerFieldsSchema>;\n\n export const MetadataSchema = z.record(z.string(), z.any());\n\n export const ProductPricingSchema = z.object({\n regularPrice: z.number(),\n effectivePrice: z.number(),\n currency: z.string(),\n discount: z.object({\n id: z.string(),\n type: z.enum([\"FIXED\", \"PERCENTAGE\"]),\n value: z.number(),\n status: z.enum([\"ACTIVE\", \"SCHEDULED\", \"EXPIRED\", \"DISABLED\"]),\n startsAt: z.number().optional(),\n endsAt: z.number().optional(),\n }).optional(),\n referencePrice: z.object({\n amount: z.number().optional(),\n windowDays: z.literal(30),\n asOf: z.number(),\n basis: z.literal(\"observed-history\"),\n historyAvailable: z.boolean(),\n }),\n priceVersion: z.string(),\n nextPriceChangeAt: z.number().optional(),\n });\n export type ProductPricing = z.infer<typeof ProductPricingSchema>;\n\n export const VariantSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n images: z.array(z.string()),\n availableQuantity: z.number().optional(),\n isDeliverable: z.boolean().optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Variant = z.infer<typeof VariantSchema>;\n\n export const AdditionalSchema = z.object({\n sku: z.string().optional(),\n baselinkerFields: BaselinkerFieldsSchema.optional(),\n isPresale: z.boolean().optional(),\n });\n export type Additional = z.infer<typeof AdditionalSchema>;\n\n export const ItemSchema = z.object({\n id: z.string(),\n ownerID: z.string().optional(),\n name: z.string(),\n description: z.union([z.string(), z.null()]).optional(),\n createdAt: z.number().optional(),\n updatedAt: z.number().optional(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n image_url: z.string(),\n images: z.array(z.string()),\n isDeliverable: z.boolean().optional(),\n availableQuantity: z.number().optional(),\n additional: AdditionalSchema.optional(),\n variants: z.array(VariantSchema).optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Item = z.infer<typeof ItemSchema>;\n\n export const DataSchema = z.object({\n success: z.boolean(),\n result: z.array(ItemSchema),\n totalCount: z.number(),\n });\n export type Data = z.infer<typeof DataSchema>;\n\n export const ProductsResultResultSchema = z.object({\n data: DataSchema,\n });\n export type ProductsResultResult = z.infer<typeof ProductsResultResultSchema>;\n\n export const ProductsResultElementSchema = z.array(\n z.object({\n result: ProductsResultResultSchema,\n }),\n );\n export type ProductsResultElement = z.infer<\n typeof ProductsResultElementSchema\n >;\n\n export const ProductResultSchema = z.array(\n z.object({\n result: z.object({\n data: z.object({\n success: z.boolean(),\n message: z.string().optional(),\n result: ItemSchema.optional(),\n }),\n }),\n }),\n );\n}\n"],"mappings":"6BAAA,UAAYA,MAAO,MAEZ,IAAUC,OACFA,EAAA,uBAA2B,SAAO,CAC7C,UAAa,SAAO,EAAE,SAAS,CACjC,CAAC,EAGYA,EAAA,eAAmB,SAAS,SAAO,EAAK,MAAI,CAAC,EAE7CA,EAAA,qBAAyB,SAAO,CAC3C,aAAgB,SAAO,EACvB,eAAkB,SAAO,EACzB,SAAY,SAAO,EACnB,SAAY,SAAO,CACjB,GAAM,SAAO,EACb,KAAQ,OAAK,CAAC,QAAS,YAAY,CAAC,EACpC,MAAS,SAAO,EAChB,OAAU,OAAK,CAAC,SAAU,YAAa,UAAW,UAAU,CAAC,EAC7D,SAAY,SAAO,EAAE,SAAS,EAC9B,OAAU,SAAO,EAAE,SAAS,CAC9B,CAAC,EAAE,SAAS,EACZ,eAAkB,SAAO,CACvB,OAAU,SAAO,EAAE,SAAS,EAC5B,WAAc,UAAQ,EAAE,EACxB,KAAQ,SAAO,EACf,MAAS,UAAQ,kBAAkB,EACnC,iBAAoB,UAAQ,CAC9B,CAAC,EACD,aAAgB,SAAO,EACvB,kBAAqB,SAAO,EAAE,SAAS,CACzC,CAAC,EAGYA,EAAA,cAAkB,SAAO,CACpC,GAAM,SAAO,EACb,KAAQ,SAAO,EACf,MAAS,SAAO,EACh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Q,EACnB,QAAW,SAAO,EAAE,SAAS,EAC7B,OAAQA,EAAA,WAAW,SAAS,CAC9B,CAAC,CACH,CAAC,CACH,CAAC,CACH,
|
|
1
|
+
{"version":3,"sources":["../src/models.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport namespace BitsnapModels {\n export const BaselinkerFieldsSchema = z.object({\n storageID: z.string().optional(),\n });\n export type BaselinkerFields = z.infer<typeof BaselinkerFieldsSchema>;\n\n export const MetadataSchema = z.record(z.string(), z.any());\n\n export const ProductPricingSchema = z.object({\n regularPrice: z.number(),\n effectivePrice: z.number(),\n currency: z.string(),\n discount: z.object({\n id: z.string(),\n type: z.enum([\"FIXED\", \"PERCENTAGE\"]),\n value: z.number(),\n status: z.enum([\"ACTIVE\", \"SCHEDULED\", \"EXPIRED\", \"DISABLED\"]),\n startsAt: z.number().optional(),\n endsAt: z.number().optional(),\n }).optional(),\n referencePrice: z.object({\n amount: z.number().optional(),\n windowDays: z.literal(30),\n asOf: z.number(),\n basis: z.literal(\"observed-history\"),\n historyAvailable: z.boolean(),\n }),\n priceVersion: z.string(),\n nextPriceChangeAt: z.number().optional(),\n });\n export type ProductPricing = z.infer<typeof ProductPricingSchema>;\n\n export const VariantSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n images: z.array(z.string()),\n availableQuantity: z.number().optional(),\n isDeliverable: z.boolean().optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Variant = z.infer<typeof VariantSchema>;\n\n export const AdditionalSchema = z.object({\n sku: z.string().optional(),\n baselinkerFields: BaselinkerFieldsSchema.optional(),\n isPresale: z.boolean().optional(),\n });\n export type Additional = z.infer<typeof AdditionalSchema>;\n\n export const ItemSchema = z.object({\n id: z.string(),\n ownerID: z.string().optional(),\n name: z.string(),\n description: z.union([z.string(), z.null()]).optional(),\n createdAt: z.number().optional(),\n updatedAt: z.number().optional(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n image_url: z.string(),\n images: z.array(z.string()),\n isDeliverable: z.boolean().optional(),\n availableQuantity: z.number().optional(),\n additional: AdditionalSchema.optional(),\n variants: z.array(VariantSchema).optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Item = z.infer<typeof ItemSchema>;\n\n export const DataSchema = z.object({\n success: z.boolean(),\n result: z.array(ItemSchema),\n totalCount: z.number(),\n });\n export type Data = z.infer<typeof DataSchema>;\n\n export const ProductsResultResultSchema = z.object({\n data: DataSchema,\n });\n export type ProductsResultResult = z.infer<typeof ProductsResultResultSchema>;\n\n export const ProductsResultElementSchema = z.array(\n z.object({\n result: ProductsResultResultSchema,\n }),\n );\n export type ProductsResultElement = z.infer<\n typeof ProductsResultElementSchema\n >;\n\n export const ProductResultSchema = z.array(\n z.object({\n result: z.object({\n data: z.object({\n success: z.boolean(),\n message: z.string().optional(),\n result: ItemSchema.optional(),\n }),\n }),\n }),\n );\n\n export const PublicListProductImageSchema = z.object({\n url: z.string(),\n thumbnailUrl: z.union([z.string(), z.null()]),\n });\n export type PublicListProductImage = z.infer<\n typeof PublicListProductImageSchema\n >;\n\n /**\n * One card of the public product catalog\n * (`GET /api/integrations/{projectID}/public-commerce/product-list`).\n * `price` and `compareAtPrice` are in minor units (grosze, cents), like the\n * prices of the cart.\n */\n export const PublicListProductSchema = z.object({\n id: z.string(),\n /**\n * ID the cart should add: the variant ID for single-variant products.\n * Older backends omit it; use `cartItemId ?? id`.\n */\n cartItemId: z.string().optional(),\n uniqueSlug: z.string(),\n name: z.string(),\n shortDescription: z.union([z.string(), z.null()]),\n image: z.union([PublicListProductImageSchema, z.null()]),\n price: z.number(),\n currency: z.string(),\n compareAtPrice: z.union([z.number(), z.null()]),\n /** `true` when the variants have different prices: show \"from {price}\". */\n priceFrom: z.boolean(),\n variantCount: z.number(),\n isRecurring: z.boolean(),\n available: z.boolean(),\n /** `true` when the product can be added to the cart straight from the list. */\n addToCart: z.boolean(),\n });\n export type PublicListProduct = z.infer<typeof PublicListProductSchema>;\n\n export const ProductListResponseSchema = z.object({\n items: z.array(PublicListProductSchema),\n totalCount: z.number(),\n });\n export type ProductListResponse = z.infer<typeof ProductListResponseSchema>;\n}\n"],"mappings":"6BAAA,UAAYA,MAAO,MAEZ,IAAUC,OACFA,EAAA,uBAA2B,SAAO,CAC7C,UAAa,SAAO,EAAE,SAAS,CACjC,CAAC,EAGYA,EAAA,eAAmB,SAAS,SAAO,EAAK,MAAI,CAAC,EAE7CA,EAAA,qBAAyB,SAAO,CAC3C,aAAgB,SAAO,EACvB,eAAkB,SAAO,EACzB,SAAY,SAAO,EACnB,SAAY,SAAO,CACjB,GAAM,SAAO,EACb,KAAQ,OAAK,CAAC,QAAS,YAAY,CAAC,EACpC,MAAS,SAAO,EAChB,OAAU,OAAK,CAAC,SAAU,YAAa,UAAW,UAAU,CAAC,EAC7D,SAAY,SAAO,EAAE,SAAS,EAC9B,OAAU,SAAO,EAAE,SAAS,CAC9B,CAAC,EAAE,SAAS,EACZ,eAAkB,SAAO,CACvB,OAAU,SAAO,EAAE,SAAS,EAC5B,WAAc,UAAQ,EAAE,EACxB,KAAQ,SAAO,EACf,MAAS,UAAQ,kBAAkB,EACnC,iBAAoB,UAAQ,CAC9B,CAAC,EACD,aAAgB,SAAO,EACvB,kBAAqB,SAAO,EAAE,SAAS,CACzC,CAAC,EAGYA,EAAA,cAAkB,SAAO,CACpC,GAAM,SAAO,EACb,KAAQ,SAAO,EACf,MAAS,SAAO,EAChB,SAAY,SAAO,EACnB,SAAUA,EAAA,eAAe,SAAS,EAClC,OAAU,QAAQ,SAAO,CAAC,EAC1B,kBAAqB,SAAO,EAAE,SAAS,EACvC,cAAiB,UAAQ,EAAE,SAAS,EACpC,oBAAuB,SAAO,EAAE,SAAS,EACzC,QAASA,EAAA,qBAAqB,SAAS,CACzC,CAAC,EAGYA,EAAA,iBAAqB,SAAO,CACvC,IAAO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