@firfi/voila-sdk 0.1.0
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/LICENSE +21 -0
- package/README.md +165 -0
- package/dist/src/domain/cart.d.ts +10 -0
- package/dist/src/domain/cart.d.ts.map +1 -0
- package/dist/src/domain/cart.js +14 -0
- package/dist/src/domain/cart.js.map +1 -0
- package/dist/src/domain/checkout-readiness.d.ts +3 -0
- package/dist/src/domain/checkout-readiness.d.ts.map +1 -0
- package/dist/src/domain/checkout-readiness.js +18 -0
- package/dist/src/domain/checkout-readiness.js.map +1 -0
- package/dist/src/domain/parse.d.ts +5 -0
- package/dist/src/domain/parse.d.ts.map +1 -0
- package/dist/src/domain/parse.js +11 -0
- package/dist/src/domain/parse.js.map +1 -0
- package/dist/src/domain/schemas/auth.d.ts +123 -0
- package/dist/src/domain/schemas/auth.d.ts.map +1 -0
- package/dist/src/domain/schemas/auth.js +36 -0
- package/dist/src/domain/schemas/auth.js.map +1 -0
- package/dist/src/domain/schemas/cart.d.ts +1224 -0
- package/dist/src/domain/schemas/cart.d.ts.map +1 -0
- package/dist/src/domain/schemas/cart.js +123 -0
- package/dist/src/domain/schemas/cart.js.map +1 -0
- package/dist/src/domain/schemas/category-page.d.ts +187 -0
- package/dist/src/domain/schemas/category-page.d.ts.map +1 -0
- package/dist/src/domain/schemas/category-page.js +43 -0
- package/dist/src/domain/schemas/category-page.js.map +1 -0
- package/dist/src/domain/schemas/category.d.ts +25 -0
- package/dist/src/domain/schemas/category.d.ts.map +1 -0
- package/dist/src/domain/schemas/category.js +30 -0
- package/dist/src/domain/schemas/category.js.map +1 -0
- package/dist/src/domain/schemas/checkout-summary.d.ts +1035 -0
- package/dist/src/domain/schemas/checkout-summary.d.ts.map +1 -0
- package/dist/src/domain/schemas/checkout-summary.js +103 -0
- package/dist/src/domain/schemas/checkout-summary.js.map +1 -0
- package/dist/src/domain/schemas/delivery-destination.d.ts +176 -0
- package/dist/src/domain/schemas/delivery-destination.d.ts.map +1 -0
- package/dist/src/domain/schemas/delivery-destination.js +52 -0
- package/dist/src/domain/schemas/delivery-destination.js.map +1 -0
- package/dist/src/domain/schemas/index.d.ts +13 -0
- package/dist/src/domain/schemas/index.d.ts.map +1 -0
- package/dist/src/domain/schemas/index.js +13 -0
- package/dist/src/domain/schemas/index.js.map +1 -0
- package/dist/src/domain/schemas/money.d.ts +18 -0
- package/dist/src/domain/schemas/money.d.ts.map +1 -0
- package/dist/src/domain/schemas/money.js +11 -0
- package/dist/src/domain/schemas/money.js.map +1 -0
- package/dist/src/domain/schemas/product.d.ts +230 -0
- package/dist/src/domain/schemas/product.d.ts.map +1 -0
- package/dist/src/domain/schemas/product.js +32 -0
- package/dist/src/domain/schemas/product.js.map +1 -0
- package/dist/src/domain/schemas/proposition.d.ts +746 -0
- package/dist/src/domain/schemas/proposition.d.ts.map +1 -0
- package/dist/src/domain/schemas/proposition.js +110 -0
- package/dist/src/domain/schemas/proposition.js.map +1 -0
- package/dist/src/domain/schemas/search.d.ts +31 -0
- package/dist/src/domain/schemas/search.d.ts.map +1 -0
- package/dist/src/domain/schemas/search.js +16 -0
- package/dist/src/domain/schemas/search.js.map +1 -0
- package/dist/src/domain/schemas/session.d.ts +1341 -0
- package/dist/src/domain/schemas/session.d.ts.map +1 -0
- package/dist/src/domain/schemas/session.js +140 -0
- package/dist/src/domain/schemas/session.js.map +1 -0
- package/dist/src/domain/schemas/slot.d.ts +844 -0
- package/dist/src/domain/schemas/slot.d.ts.map +1 -0
- package/dist/src/domain/schemas/slot.js +130 -0
- package/dist/src/domain/schemas/slot.js.map +1 -0
- package/dist/src/index.d.ts +26 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +26 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/voila/browser-login-adapter.d.ts +108 -0
- package/dist/src/voila/browser-login-adapter.d.ts.map +1 -0
- package/dist/src/voila/browser-login-adapter.js +128 -0
- package/dist/src/voila/browser-login-adapter.js.map +1 -0
- package/dist/src/voila/browser-login.d.ts +32 -0
- package/dist/src/voila/browser-login.d.ts.map +1 -0
- package/dist/src/voila/browser-login.js +86 -0
- package/dist/src/voila/browser-login.js.map +1 -0
- package/dist/src/voila/cart-mutation.d.ts +23 -0
- package/dist/src/voila/cart-mutation.d.ts.map +1 -0
- package/dist/src/voila/cart-mutation.js +52 -0
- package/dist/src/voila/cart-mutation.js.map +1 -0
- package/dist/src/voila/cart-view.d.ts +14 -0
- package/dist/src/voila/cart-view.d.ts.map +1 -0
- package/dist/src/voila/cart-view.js +45 -0
- package/dist/src/voila/cart-view.js.map +1 -0
- package/dist/src/voila/catalog-search.d.ts +27 -0
- package/dist/src/voila/catalog-search.d.ts.map +1 -0
- package/dist/src/voila/catalog-search.js +40 -0
- package/dist/src/voila/catalog-search.js.map +1 -0
- package/dist/src/voila/categories.d.ts +4 -0
- package/dist/src/voila/categories.d.ts.map +1 -0
- package/dist/src/voila/categories.js +22 -0
- package/dist/src/voila/categories.js.map +1 -0
- package/dist/src/voila/category-products.d.ts +22 -0
- package/dist/src/voila/category-products.d.ts.map +1 -0
- package/dist/src/voila/category-products.js +32 -0
- package/dist/src/voila/category-products.js.map +1 -0
- package/dist/src/voila/checkout-summary.d.ts +15 -0
- package/dist/src/voila/checkout-summary.d.ts.map +1 -0
- package/dist/src/voila/checkout-summary.js +93 -0
- package/dist/src/voila/checkout-summary.js.map +1 -0
- package/dist/src/voila/checkout-urls.d.ts +11 -0
- package/dist/src/voila/checkout-urls.d.ts.map +1 -0
- package/dist/src/voila/checkout-urls.js +23 -0
- package/dist/src/voila/checkout-urls.js.map +1 -0
- package/dist/src/voila/delivery-destinations.d.ts +22 -0
- package/dist/src/voila/delivery-destinations.d.ts.map +1 -0
- package/dist/src/voila/delivery-destinations.js +70 -0
- package/dist/src/voila/delivery-destinations.js.map +1 -0
- package/dist/src/voila/guest-bootstrap.d.ts +40 -0
- package/dist/src/voila/guest-bootstrap.d.ts.map +1 -0
- package/dist/src/voila/guest-bootstrap.js +108 -0
- package/dist/src/voila/guest-bootstrap.js.map +1 -0
- package/dist/src/voila/headers.d.ts +5 -0
- package/dist/src/voila/headers.d.ts.map +1 -0
- package/dist/src/voila/headers.js +20 -0
- package/dist/src/voila/headers.js.map +1 -0
- package/dist/src/voila/http-client.d.ts +60 -0
- package/dist/src/voila/http-client.d.ts.map +1 -0
- package/dist/src/voila/http-client.js +124 -0
- package/dist/src/voila/http-client.js.map +1 -0
- package/dist/src/voila/initial-state.d.ts +19 -0
- package/dist/src/voila/initial-state.d.ts.map +1 -0
- package/dist/src/voila/initial-state.js +117 -0
- package/dist/src/voila/initial-state.js.map +1 -0
- package/dist/src/voila/session-health.d.ts +10 -0
- package/dist/src/voila/session-health.d.ts.map +1 -0
- package/dist/src/voila/session-health.js +176 -0
- package/dist/src/voila/session-health.js.map +1 -0
- package/dist/src/voila/session-snapshot.d.ts +41 -0
- package/dist/src/voila/session-snapshot.d.ts.map +1 -0
- package/dist/src/voila/session-snapshot.js +101 -0
- package/dist/src/voila/session-snapshot.js.map +1 -0
- package/dist/src/voila/session-storage.d.ts +22 -0
- package/dist/src/voila/session-storage.d.ts.map +1 -0
- package/dist/src/voila/session-storage.js +54 -0
- package/dist/src/voila/session-storage.js.map +1 -0
- package/dist/src/voila/shopping-context.d.ts +33 -0
- package/dist/src/voila/shopping-context.d.ts.map +1 -0
- package/dist/src/voila/shopping-context.js +159 -0
- package/dist/src/voila/shopping-context.js.map +1 -0
- package/dist/src/voila/slot-urls.d.ts +22 -0
- package/dist/src/voila/slot-urls.d.ts.map +1 -0
- package/dist/src/voila/slot-urls.js +51 -0
- package/dist/src/voila/slot-urls.js.map +1 -0
- package/dist/src/voila/slots.d.ts +41 -0
- package/dist/src/voila/slots.d.ts.map +1 -0
- package/dist/src/voila/slots.js +137 -0
- package/dist/src/voila/slots.js.map +1 -0
- package/dist/src/voila/urls.d.ts +114 -0
- package/dist/src/voila/urls.d.ts.map +1 -0
- package/dist/src/voila/urls.js +197 -0
- package/dist/src/voila/urls.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkout-summary.d.ts","sourceRoot":"","sources":["../../../../src/domain/schemas/checkout-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAQ/B,eAAO,MAAM,0BAA0B;;;;;;;EAGrC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAExF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;SAAuB,CAAA;AAE/D,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE1F,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAWvC,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE1F,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;SAKzC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAE9F,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAQjC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE9E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;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;;SAa5C,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEpG,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAElG,eAAO,MAAM,6BAA6B,0EAIzC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAE9F,eAAO,MAAM,6BAA6B,6FAIzC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAE9F,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { CartViewSignalSchema } from "./cart.js";
|
|
3
|
+
import { MoneySchema } from "./money.js";
|
|
4
|
+
const UnknownStringRecordSchema = Schema.Record({ key: Schema.String, value: Schema.Unknown });
|
|
5
|
+
const NonEmptyStringSchema = Schema.String.pipe(Schema.trimmed(), Schema.minLength(1));
|
|
6
|
+
export const CheckoutSummaryInputSchema = Schema.Struct({
|
|
7
|
+
appliedPaymentCheckId: Schema.optionalWith(NonEmptyStringSchema, { exact: true }),
|
|
8
|
+
fetchAllocatedPaymentChecks: Schema.optionalWith(Schema.Boolean, { exact: true })
|
|
9
|
+
});
|
|
10
|
+
export const CheckoutSummarySignalSchema = CartViewSignalSchema;
|
|
11
|
+
export const CheckoutSummaryTotalsSchema = Schema.asSchema(Schema.Struct({
|
|
12
|
+
depositsPrice: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
13
|
+
environmentalHandlingPrice: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
14
|
+
finalPrice: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
15
|
+
itemPriceAfterPromos: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
16
|
+
itemsRetailPrice: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
17
|
+
retailPrice: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
18
|
+
savingsPrice: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
19
|
+
totalPrice: Schema.optionalWith(MoneySchema, { exact: true })
|
|
20
|
+
}).pipe(Schema.extend(UnknownStringRecordSchema)));
|
|
21
|
+
export const CheckoutChargeComponentSchema = Schema.asSchema(Schema.Struct({
|
|
22
|
+
finalPrice: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
23
|
+
price: Schema.optionalWith(MoneySchema, { exact: true })
|
|
24
|
+
}).pipe(Schema.extend(UnknownStringRecordSchema)));
|
|
25
|
+
export const CheckoutChargesSchema = Schema.asSchema(Schema.Struct({
|
|
26
|
+
carrierBag: Schema.optionalWith(CheckoutChargeComponentSchema, { exact: true }),
|
|
27
|
+
delivery: Schema.optionalWith(CheckoutChargeComponentSchema, { exact: true }),
|
|
28
|
+
invoice: Schema.optionalWith(CheckoutChargeComponentSchema, { exact: true }),
|
|
29
|
+
preparation: Schema.optionalWith(CheckoutChargeComponentSchema, { exact: true }),
|
|
30
|
+
smallOrder: Schema.optionalWith(CheckoutChargeComponentSchema, { exact: true })
|
|
31
|
+
}).pipe(Schema.extend(UnknownStringRecordSchema)));
|
|
32
|
+
export const NormalizedCheckoutFeesSchema = Schema.Struct({
|
|
33
|
+
carrierBag: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
34
|
+
delivery: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
35
|
+
invoice: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
36
|
+
preparation: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
37
|
+
smallOrder: Schema.optionalWith(MoneySchema, { exact: true })
|
|
38
|
+
});
|
|
39
|
+
const CheckoutSlotShapeSchema = Schema.Struct({
|
|
40
|
+
deliveryPriceChanged: Schema.optionalWith(Schema.Boolean, { exact: true }),
|
|
41
|
+
endTime: Schema.optionalWith(Schema.String, { exact: true }),
|
|
42
|
+
expiryTime: Schema.optionalWith(Schema.String, { exact: true }),
|
|
43
|
+
price: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
44
|
+
slotId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
45
|
+
startTime: Schema.optionalWith(Schema.String, { exact: true }),
|
|
46
|
+
timeZoneId: Schema.optionalWith(Schema.String, { exact: true })
|
|
47
|
+
});
|
|
48
|
+
export const RawCheckoutDeliverySchema = Schema.asSchema(CheckoutSlotShapeSchema.pipe(Schema.extend(UnknownStringRecordSchema)));
|
|
49
|
+
export const CheckoutSlotSummarySchema = CheckoutSlotShapeSchema;
|
|
50
|
+
export const RawCheckoutStateSchema = Schema.asSchema(Schema.Struct({
|
|
51
|
+
basketAboveThreshold: Schema.optionalWith(Schema.Boolean, { exact: true }),
|
|
52
|
+
canCheckout: Schema.optionalWith(Schema.Boolean, { exact: true }),
|
|
53
|
+
checkoutRestrictions: Schema.optionalWith(Schema.Array(CheckoutSummarySignalSchema), { exact: true }),
|
|
54
|
+
delivery: Schema.optionalWith(RawCheckoutDeliverySchema, { exact: true }),
|
|
55
|
+
minimumCheckoutThreshold: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
56
|
+
shippingGroupType: Schema.optionalWith(Schema.String, { exact: true }),
|
|
57
|
+
shippingGroupTypeDisplayName: Schema.optionalWith(Schema.String, { exact: true })
|
|
58
|
+
}).pipe(Schema.extend(UnknownStringRecordSchema)));
|
|
59
|
+
export const CheckoutSummaryWarningSchema = Schema.Struct({
|
|
60
|
+
kind: Schema.Literal("checkout-restriction", "limited-item", "pricing-notification", "substitution", "unavailable-item"),
|
|
61
|
+
signal: CheckoutSummarySignalSchema
|
|
62
|
+
});
|
|
63
|
+
export const RawCheckoutSummaryResponseSchema = Schema.asSchema(Schema.Struct({
|
|
64
|
+
cartId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
65
|
+
charges: Schema.optionalWith(CheckoutChargesSchema, { exact: true }),
|
|
66
|
+
checkout: RawCheckoutStateSchema,
|
|
67
|
+
checkoutCorrelationId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
68
|
+
limitedItems: Schema.optionalWith(Schema.Array(CheckoutSummarySignalSchema), { exact: true }),
|
|
69
|
+
orderId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
70
|
+
pricingNotifications: Schema.optionalWith(Schema.Array(CheckoutSummarySignalSchema), { exact: true }),
|
|
71
|
+
substitutions: Schema.optionalWith(Schema.Array(CheckoutSummarySignalSchema), { exact: true }),
|
|
72
|
+
totals: Schema.optionalWith(CheckoutSummaryTotalsSchema, { exact: true }),
|
|
73
|
+
unavailableData: Schema.optionalWith(Schema.Array(CheckoutSummarySignalSchema), { exact: true })
|
|
74
|
+
}).pipe(Schema.extend(UnknownStringRecordSchema)));
|
|
75
|
+
export const NormalizedCheckoutSummarySchema = Schema.Struct({
|
|
76
|
+
basketAboveThreshold: Schema.Boolean,
|
|
77
|
+
basketId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
78
|
+
canCheckout: Schema.Boolean,
|
|
79
|
+
checkoutCorrelationId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
80
|
+
checkoutRestrictions: Schema.Array(CheckoutSummarySignalSchema),
|
|
81
|
+
fees: NormalizedCheckoutFeesSchema,
|
|
82
|
+
limitedItems: Schema.Array(CheckoutSummarySignalSchema),
|
|
83
|
+
minimumCheckoutThreshold: Schema.optionalWith(MoneySchema, { exact: true }),
|
|
84
|
+
orderId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
85
|
+
pricingNotifications: Schema.Array(CheckoutSummarySignalSchema),
|
|
86
|
+
selectedSlot: Schema.optionalWith(CheckoutSlotSummarySchema, { exact: true }),
|
|
87
|
+
shippingGroupType: Schema.optionalWith(Schema.String, { exact: true }),
|
|
88
|
+
shippingGroupTypeDisplayName: Schema.optionalWith(Schema.String, { exact: true }),
|
|
89
|
+
substitutions: Schema.Array(CheckoutSummarySignalSchema),
|
|
90
|
+
totals: Schema.optionalWith(CheckoutSummaryTotalsSchema, { exact: true }),
|
|
91
|
+
unavailableData: Schema.Array(CheckoutSummarySignalSchema),
|
|
92
|
+
warnings: Schema.Array(CheckoutSummaryWarningSchema)
|
|
93
|
+
});
|
|
94
|
+
export const CheckoutReadinessStatusSchema = Schema.Literal("blocked", "needs-review", "ready-for-manual-checkout");
|
|
95
|
+
export const CheckoutReadinessReasonSchema = Schema.Literal("checkout-blocked", "review-signals-present", "ready-for-manual-checkout");
|
|
96
|
+
export const CheckoutReadinessDecisionSchema = Schema.Struct({
|
|
97
|
+
canContinueToManualCheckout: Schema.Boolean,
|
|
98
|
+
checkoutRestrictions: Schema.Array(CheckoutSummarySignalSchema),
|
|
99
|
+
reason: CheckoutReadinessReasonSchema,
|
|
100
|
+
status: CheckoutReadinessStatusSchema,
|
|
101
|
+
warnings: Schema.Array(CheckoutSummaryWarningSchema)
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=checkout-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkout-summary.js","sourceRoot":"","sources":["../../../../src/domain/schemas/checkout-summary.ts"],"names":[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YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACtE,4BAA4B,EAAE,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACjF,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC;IACxD,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzE,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC;IAC1D,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,4BAA4B,CAAC;CACrD,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,OAAO,CACzD,SAAS,EACT,cAAc,EACd,2BAA2B,CAC5B,CAAA;AAID,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,OAAO,CACzD,kBAAkB,EAClB,wBAAwB,EACxB,2BAA2B,CAC5B,CAAA;AAID,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,2BAA2B,EAAE,MAAM,CAAC,OAAO;IAC3C,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC;IAC/D,MAAM,EAAE,6BAA6B;IACrC,MAAM,EAAE,6BAA6B;IACrC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,4BAA4B,CAAC;CACrD,CAAC,CAAA"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const DeliveryMethodSchema: Schema.Literal<["HOME_DELIVERY", "CUSTOMER_COLLECTION"]>;
|
|
3
|
+
export type DeliveryMethod = Schema.Schema.Type<typeof DeliveryMethodSchema>;
|
|
4
|
+
export declare const DeliveryDestinationsInputSchema: Schema.Struct<{
|
|
5
|
+
deliveryMethod: Schema.optionalWith<Schema.Literal<["HOME_DELIVERY", "CUSTOMER_COLLECTION"]>, {
|
|
6
|
+
default: () => "HOME_DELIVERY";
|
|
7
|
+
}>;
|
|
8
|
+
}>;
|
|
9
|
+
export type DeliveryDestinationsInput = Schema.Schema.Type<typeof DeliveryDestinationsInputSchema>;
|
|
10
|
+
export declare const DeliveryDestinationByIdInputSchema: Schema.Struct<{
|
|
11
|
+
deliveryDestinationId: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
12
|
+
}>;
|
|
13
|
+
export type DeliveryDestinationByIdInput = Schema.Schema.Type<typeof DeliveryDestinationByIdInputSchema>;
|
|
14
|
+
export declare const RawDeliveryDestinationSchema: Schema.Schema<{
|
|
15
|
+
readonly name?: string;
|
|
16
|
+
readonly regionId?: string;
|
|
17
|
+
readonly deliveryMethod?: "HOME_DELIVERY" | "CUSTOMER_COLLECTION";
|
|
18
|
+
readonly deliveryDestinationId: string;
|
|
19
|
+
readonly addressId?: string;
|
|
20
|
+
readonly deliverability?: string;
|
|
21
|
+
readonly deliveryInstructions?: string;
|
|
22
|
+
readonly formattedAddress?: string;
|
|
23
|
+
readonly resolvedRegionId?: string;
|
|
24
|
+
} & {
|
|
25
|
+
readonly [x: string]: unknown;
|
|
26
|
+
}, {
|
|
27
|
+
readonly deliveryDestinationId: string;
|
|
28
|
+
readonly name?: string;
|
|
29
|
+
readonly regionId?: string;
|
|
30
|
+
readonly deliveryMethod?: "HOME_DELIVERY" | "CUSTOMER_COLLECTION";
|
|
31
|
+
readonly addressId?: string;
|
|
32
|
+
readonly deliverability?: string;
|
|
33
|
+
readonly deliveryInstructions?: string;
|
|
34
|
+
readonly formattedAddress?: string;
|
|
35
|
+
readonly resolvedRegionId?: string;
|
|
36
|
+
} & {
|
|
37
|
+
readonly [x: string]: unknown;
|
|
38
|
+
}, never>;
|
|
39
|
+
export type RawDeliveryDestination = Schema.Schema.Type<typeof RawDeliveryDestinationSchema>;
|
|
40
|
+
export declare const RawDeliveryDestinationsResponseSchema: Schema.Array$<Schema.Schema<{
|
|
41
|
+
readonly name?: string;
|
|
42
|
+
readonly regionId?: string;
|
|
43
|
+
readonly deliveryMethod?: "HOME_DELIVERY" | "CUSTOMER_COLLECTION";
|
|
44
|
+
readonly deliveryDestinationId: string;
|
|
45
|
+
readonly addressId?: string;
|
|
46
|
+
readonly deliverability?: string;
|
|
47
|
+
readonly deliveryInstructions?: string;
|
|
48
|
+
readonly formattedAddress?: string;
|
|
49
|
+
readonly resolvedRegionId?: string;
|
|
50
|
+
} & {
|
|
51
|
+
readonly [x: string]: unknown;
|
|
52
|
+
}, {
|
|
53
|
+
readonly deliveryDestinationId: string;
|
|
54
|
+
readonly name?: string;
|
|
55
|
+
readonly regionId?: string;
|
|
56
|
+
readonly deliveryMethod?: "HOME_DELIVERY" | "CUSTOMER_COLLECTION";
|
|
57
|
+
readonly addressId?: string;
|
|
58
|
+
readonly deliverability?: string;
|
|
59
|
+
readonly deliveryInstructions?: string;
|
|
60
|
+
readonly formattedAddress?: string;
|
|
61
|
+
readonly resolvedRegionId?: string;
|
|
62
|
+
} & {
|
|
63
|
+
readonly [x: string]: unknown;
|
|
64
|
+
}, never>>;
|
|
65
|
+
export type RawDeliveryDestinationsResponse = Schema.Schema.Type<typeof RawDeliveryDestinationsResponseSchema>;
|
|
66
|
+
export declare const DeliveryDestinationSchema: Schema.Struct<{
|
|
67
|
+
deliveryDestinationId: typeof Schema.String;
|
|
68
|
+
deliverable: typeof Schema.Boolean;
|
|
69
|
+
regionId: Schema.optionalWith<typeof Schema.String, {
|
|
70
|
+
exact: true;
|
|
71
|
+
}>;
|
|
72
|
+
deliveryMethod: Schema.optionalWith<Schema.Literal<["HOME_DELIVERY", "CUSTOMER_COLLECTION"]>, {
|
|
73
|
+
exact: true;
|
|
74
|
+
}>;
|
|
75
|
+
addressId: Schema.optionalWith<typeof Schema.String, {
|
|
76
|
+
exact: true;
|
|
77
|
+
}>;
|
|
78
|
+
formattedAddress: Schema.optionalWith<typeof Schema.String, {
|
|
79
|
+
exact: true;
|
|
80
|
+
}>;
|
|
81
|
+
nickname: Schema.optionalWith<typeof Schema.String, {
|
|
82
|
+
exact: true;
|
|
83
|
+
}>;
|
|
84
|
+
deliverability: Schema.optionalWith<typeof Schema.String, {
|
|
85
|
+
exact: true;
|
|
86
|
+
}>;
|
|
87
|
+
deliveryInstructions: Schema.optionalWith<typeof Schema.String, {
|
|
88
|
+
exact: true;
|
|
89
|
+
}>;
|
|
90
|
+
}>;
|
|
91
|
+
export type DeliveryDestination = Schema.Schema.Type<typeof DeliveryDestinationSchema>;
|
|
92
|
+
export declare const NormalizedDeliveryDestinationsSchema: Schema.Struct<{
|
|
93
|
+
destinations: Schema.Array$<Schema.Struct<{
|
|
94
|
+
deliveryDestinationId: typeof Schema.String;
|
|
95
|
+
deliverable: typeof Schema.Boolean;
|
|
96
|
+
regionId: Schema.optionalWith<typeof Schema.String, {
|
|
97
|
+
exact: true;
|
|
98
|
+
}>;
|
|
99
|
+
deliveryMethod: Schema.optionalWith<Schema.Literal<["HOME_DELIVERY", "CUSTOMER_COLLECTION"]>, {
|
|
100
|
+
exact: true;
|
|
101
|
+
}>;
|
|
102
|
+
addressId: Schema.optionalWith<typeof Schema.String, {
|
|
103
|
+
exact: true;
|
|
104
|
+
}>;
|
|
105
|
+
formattedAddress: Schema.optionalWith<typeof Schema.String, {
|
|
106
|
+
exact: true;
|
|
107
|
+
}>;
|
|
108
|
+
nickname: Schema.optionalWith<typeof Schema.String, {
|
|
109
|
+
exact: true;
|
|
110
|
+
}>;
|
|
111
|
+
deliverability: Schema.optionalWith<typeof Schema.String, {
|
|
112
|
+
exact: true;
|
|
113
|
+
}>;
|
|
114
|
+
deliveryInstructions: Schema.optionalWith<typeof Schema.String, {
|
|
115
|
+
exact: true;
|
|
116
|
+
}>;
|
|
117
|
+
}>>;
|
|
118
|
+
}>;
|
|
119
|
+
export type NormalizedDeliveryDestinations = Schema.Schema.Type<typeof NormalizedDeliveryDestinationsSchema>;
|
|
120
|
+
declare const DeliveryDestinationDiagnosticItemSchema: Schema.Struct<{
|
|
121
|
+
addressId: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
122
|
+
exact: true;
|
|
123
|
+
}>;
|
|
124
|
+
deliverability: Schema.optionalWith<typeof Schema.String, {
|
|
125
|
+
exact: true;
|
|
126
|
+
}>;
|
|
127
|
+
deliverable: typeof Schema.Boolean;
|
|
128
|
+
deliveryDestinationId: Schema.Literal<["[redacted]"]>;
|
|
129
|
+
deliveryInstructions: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
130
|
+
exact: true;
|
|
131
|
+
}>;
|
|
132
|
+
deliveryMethod: Schema.optionalWith<Schema.Literal<["HOME_DELIVERY", "CUSTOMER_COLLECTION"]>, {
|
|
133
|
+
exact: true;
|
|
134
|
+
}>;
|
|
135
|
+
formattedAddress: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
136
|
+
exact: true;
|
|
137
|
+
}>;
|
|
138
|
+
nickname: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
139
|
+
exact: true;
|
|
140
|
+
}>;
|
|
141
|
+
regionId: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
142
|
+
exact: true;
|
|
143
|
+
}>;
|
|
144
|
+
}>;
|
|
145
|
+
export type DeliveryDestinationDiagnosticItem = Schema.Schema.Type<typeof DeliveryDestinationDiagnosticItemSchema>;
|
|
146
|
+
export declare const DeliveryDestinationsDiagnosticSchema: Schema.Struct<{
|
|
147
|
+
count: Schema.filter<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
148
|
+
destinations: Schema.Array$<Schema.Struct<{
|
|
149
|
+
addressId: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
150
|
+
exact: true;
|
|
151
|
+
}>;
|
|
152
|
+
deliverability: Schema.optionalWith<typeof Schema.String, {
|
|
153
|
+
exact: true;
|
|
154
|
+
}>;
|
|
155
|
+
deliverable: typeof Schema.Boolean;
|
|
156
|
+
deliveryDestinationId: Schema.Literal<["[redacted]"]>;
|
|
157
|
+
deliveryInstructions: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
158
|
+
exact: true;
|
|
159
|
+
}>;
|
|
160
|
+
deliveryMethod: Schema.optionalWith<Schema.Literal<["HOME_DELIVERY", "CUSTOMER_COLLECTION"]>, {
|
|
161
|
+
exact: true;
|
|
162
|
+
}>;
|
|
163
|
+
formattedAddress: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
164
|
+
exact: true;
|
|
165
|
+
}>;
|
|
166
|
+
nickname: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
167
|
+
exact: true;
|
|
168
|
+
}>;
|
|
169
|
+
regionId: Schema.optionalWith<Schema.Literal<["[redacted]"]>, {
|
|
170
|
+
exact: true;
|
|
171
|
+
}>;
|
|
172
|
+
}>>;
|
|
173
|
+
}>;
|
|
174
|
+
export type DeliveryDestinationsDiagnostic = Schema.Schema.Type<typeof DeliveryDestinationsDiagnosticSchema>;
|
|
175
|
+
export {};
|
|
176
|
+
//# sourceMappingURL=delivery-destination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-destination.d.ts","sourceRoot":"","sources":["../../../../src/domain/schemas/delivery-destination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,eAAO,MAAM,oBAAoB,0DAAyD,CAAA;AAE1F,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE5E,eAAO,MAAM,+BAA+B;;;;EAI1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAElG,eAAO,MAAM,kCAAkC;;EAK7C,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAExG,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;SAYxC,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAE5F,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;UAA6C,CAAA;AAE/F,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,qCAAqC,CAAC,CAAA;AAE9G,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;EAUpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEtF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/C,CAAA;AAEF,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oCAAoC,CAAC,CAAA;AAE5G,QAAA,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;EAU3C,CAAA;AAEF,MAAM,MAAM,iCAAiC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,uCAAuC,CAAC,CAAA;AAElH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO/C,CAAA;AAEF,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oCAAoC,CAAC,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export const DeliveryMethodSchema = Schema.Literal("HOME_DELIVERY", "CUSTOMER_COLLECTION");
|
|
3
|
+
export const DeliveryDestinationsInputSchema = Schema.Struct({
|
|
4
|
+
deliveryMethod: Schema.optionalWith(DeliveryMethodSchema, {
|
|
5
|
+
default: () => "HOME_DELIVERY"
|
|
6
|
+
})
|
|
7
|
+
});
|
|
8
|
+
export const DeliveryDestinationByIdInputSchema = Schema.Struct({
|
|
9
|
+
deliveryDestinationId: Schema.String.pipe(Schema.trimmed(), Schema.minLength(1))
|
|
10
|
+
});
|
|
11
|
+
export const RawDeliveryDestinationSchema = Schema.asSchema(Schema.Struct({
|
|
12
|
+
addressId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
13
|
+
deliverability: Schema.optionalWith(Schema.String, { exact: true }),
|
|
14
|
+
deliveryDestinationId: Schema.String,
|
|
15
|
+
deliveryInstructions: Schema.optionalWith(Schema.String, { exact: true }),
|
|
16
|
+
deliveryMethod: Schema.optionalWith(DeliveryMethodSchema, { exact: true }),
|
|
17
|
+
formattedAddress: Schema.optionalWith(Schema.String, { exact: true }),
|
|
18
|
+
name: Schema.optionalWith(Schema.String, { exact: true }),
|
|
19
|
+
regionId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
20
|
+
resolvedRegionId: Schema.optionalWith(Schema.String, { exact: true })
|
|
21
|
+
}).pipe(Schema.extend(Schema.Record({ key: Schema.String, value: Schema.Unknown }))));
|
|
22
|
+
export const RawDeliveryDestinationsResponseSchema = Schema.Array(RawDeliveryDestinationSchema);
|
|
23
|
+
export const DeliveryDestinationSchema = Schema.Struct({
|
|
24
|
+
deliveryDestinationId: Schema.String,
|
|
25
|
+
deliverable: Schema.Boolean,
|
|
26
|
+
regionId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
27
|
+
deliveryMethod: Schema.optionalWith(DeliveryMethodSchema, { exact: true }),
|
|
28
|
+
addressId: Schema.optionalWith(Schema.String, { exact: true }),
|
|
29
|
+
formattedAddress: Schema.optionalWith(Schema.String, { exact: true }),
|
|
30
|
+
nickname: Schema.optionalWith(Schema.String, { exact: true }),
|
|
31
|
+
deliverability: Schema.optionalWith(Schema.String, { exact: true }),
|
|
32
|
+
deliveryInstructions: Schema.optionalWith(Schema.String, { exact: true })
|
|
33
|
+
});
|
|
34
|
+
export const NormalizedDeliveryDestinationsSchema = Schema.Struct({
|
|
35
|
+
destinations: Schema.Array(DeliveryDestinationSchema)
|
|
36
|
+
});
|
|
37
|
+
const DeliveryDestinationDiagnosticItemSchema = Schema.Struct({
|
|
38
|
+
addressId: Schema.optionalWith(Schema.Literal("[redacted]"), { exact: true }),
|
|
39
|
+
deliverability: Schema.optionalWith(Schema.String, { exact: true }),
|
|
40
|
+
deliverable: Schema.Boolean,
|
|
41
|
+
deliveryDestinationId: Schema.Literal("[redacted]"),
|
|
42
|
+
deliveryInstructions: Schema.optionalWith(Schema.Literal("[redacted]"), { exact: true }),
|
|
43
|
+
deliveryMethod: Schema.optionalWith(DeliveryMethodSchema, { exact: true }),
|
|
44
|
+
formattedAddress: Schema.optionalWith(Schema.Literal("[redacted]"), { exact: true }),
|
|
45
|
+
nickname: Schema.optionalWith(Schema.Literal("[redacted]"), { exact: true }),
|
|
46
|
+
regionId: Schema.optionalWith(Schema.Literal("[redacted]"), { exact: true })
|
|
47
|
+
});
|
|
48
|
+
export const DeliveryDestinationsDiagnosticSchema = Schema.Struct({
|
|
49
|
+
count: Schema.Number.pipe(Schema.finite(), Schema.int(), Schema.nonNegative()),
|
|
50
|
+
destinations: Schema.Array(DeliveryDestinationDiagnosticItemSchema)
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=delivery-destination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-destination.js","sourceRoot":"","sources":["../../../../src/domain/schemas/delivery-destination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAA;AAI1F,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,CAAC;IAC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AAG,EAAE,EACZ,MAAM,CAAC,WAAW,EAAE,CACrB;IACD,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,uCAAuC,CAAC;CACpE,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./auth.js";
|
|
2
|
+
export * from "./cart.js";
|
|
3
|
+
export * from "./category-page.js";
|
|
4
|
+
export * from "./category.js";
|
|
5
|
+
export * from "./checkout-summary.js";
|
|
6
|
+
export * from "./delivery-destination.js";
|
|
7
|
+
export * from "./money.js";
|
|
8
|
+
export * from "./product.js";
|
|
9
|
+
export * from "./proposition.js";
|
|
10
|
+
export * from "./search.js";
|
|
11
|
+
export * from "./session.js";
|
|
12
|
+
export * from "./slot.js";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/domain/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./auth.js";
|
|
2
|
+
export * from "./cart.js";
|
|
3
|
+
export * from "./category-page.js";
|
|
4
|
+
export * from "./category.js";
|
|
5
|
+
export * from "./checkout-summary.js";
|
|
6
|
+
export * from "./delivery-destination.js";
|
|
7
|
+
export * from "./money.js";
|
|
8
|
+
export * from "./product.js";
|
|
9
|
+
export * from "./proposition.js";
|
|
10
|
+
export * from "./search.js";
|
|
11
|
+
export * from "./session.js";
|
|
12
|
+
export * from "./slot.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const MoneySchema: Schema.Struct<{
|
|
3
|
+
amount: typeof Schema.String;
|
|
4
|
+
currency: typeof Schema.String;
|
|
5
|
+
}>;
|
|
6
|
+
export type Money = Schema.Schema.Type<typeof MoneySchema>;
|
|
7
|
+
export declare const UnitPriceSchema: Schema.Struct<{
|
|
8
|
+
price: Schema.Struct<{
|
|
9
|
+
amount: typeof Schema.String;
|
|
10
|
+
currency: typeof Schema.String;
|
|
11
|
+
}>;
|
|
12
|
+
unit: typeof Schema.String;
|
|
13
|
+
unitName: Schema.optionalWith<typeof Schema.String, {
|
|
14
|
+
exact: true;
|
|
15
|
+
}>;
|
|
16
|
+
}>;
|
|
17
|
+
export type UnitPrice = Schema.Schema.Type<typeof UnitPriceSchema>;
|
|
18
|
+
//# sourceMappingURL=money.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../../../../src/domain/schemas/money.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,eAAO,MAAM,WAAW;;;EAGtB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAA;AAE1D,eAAO,MAAM,eAAe;;;;;;;;;EAI1B,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export const MoneySchema = Schema.Struct({
|
|
3
|
+
amount: Schema.String,
|
|
4
|
+
currency: Schema.String
|
|
5
|
+
});
|
|
6
|
+
export const UnitPriceSchema = Schema.Struct({
|
|
7
|
+
price: MoneySchema,
|
|
8
|
+
unit: Schema.String,
|
|
9
|
+
unitName: Schema.optionalWith(Schema.String, { exact: true })
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=money.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"money.js","sourceRoot":"","sources":["../../../../src/domain/schemas/money.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC,MAAM;CACxB,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,WAAW;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,QAAQ,EAAE,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;CAC9D,CAAC,CAAA"}
|