@classytic/cart 0.1.0 → 0.1.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 +1 -10
- package/dist/{create-cart-q3CXxPP7.mjs → create-cart-DRYSw5Bj.mjs} +585 -539
- package/dist/domain/errors/index.d.mts +1 -1
- package/dist/domain/errors/index.mjs +2 -2
- package/dist/domain/events/index.mjs +1 -1
- package/dist/domain/index.d.mts +8 -8
- package/dist/domain/index.mjs +5 -5
- package/dist/domain/ports/index.d.mts +2 -2
- package/dist/domain/saga/index.d.mts +2 -2
- package/dist/domain/saga/index.mjs +2 -2
- package/dist/engine/index.d.mts +1 -1
- package/dist/engine/index.mjs +1 -1
- package/dist/{errors-CHR9RlbY.mjs → errors-iFWUnl8m.mjs} +26 -26
- package/dist/{index-Doi5uzux.d.mts → index-PD-kf5pR.d.mts} +67 -67
- package/dist/index.d.mts +70 -55
- package/dist/index.mjs +44 -44
- package/dist/{internal-event-bus-IkUfQJxn.d.mts → internal-event-bus-BGcwAeqK.d.mts} +108 -83
- package/dist/{line-item.entity-B3M_i-pw.d.mts → kind-registry-CqOJHV-2.d.mts} +52 -52
- package/dist/kinds/index.d.mts +1 -1
- package/dist/kinds/index.mjs +1 -1
- package/dist/{line-kind-Bndo6IS8.d.mts → line-kind-DOYygKG4.d.mts} +1 -1
- package/dist/{cart-event-catalog-BOP9aDhL.mjs → outbox-store-bP30uBXd.mjs} +30 -30
- package/dist/{idempotency-record.entity-DIFXjN1V.d.mts → reservation.entity-gmeCFe8a.d.mts} +71 -71
- package/dist/{saga-steps-B27LI7xp.mjs → saga-steps-aP8iTHT3.mjs} +1 -2
- package/dist/{shipping.bridge-DD4A_O0O.d.mts → shipping.bridge-_VwuKCSE.d.mts} +82 -82
- package/dist/{not-found.error-B6WYnAjX.mjs → state-transition.error-CML7cQSd.mjs} +22 -22
- package/dist/{saga-step-fn-Cyob38iU.d.mts → state-transitions-CbPYzeca.d.mts} +20 -29
- package/dist/{bundle.kind-DFydSxV_.mjs → variant.kind-BpEzENX-.mjs} +132 -132
- package/dist/{bundle.kind-BdgnyKZt.d.mts → variant.kind-CCwwWAB6.d.mts} +51 -51
- package/package.json +12 -5
- /package/dist/{id.port-DPXLrqb2.d.mts → id.port-CpYO7sc1.d.mts} +0 -0
- /package/dist/{index-DEHBdV_z.d.mts → index-DNLi60D-.d.mts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as SagaError, c as PriceChangedError, d as UnknownKindError, f as ConcurrencyError, i as IdempotencyStorageError, l as NotFoundError, m as CartErrorCategory, n as StaleQuoteError, o as SagaFailurePhase, p as CartError, r as IdempotencyBusyError, s as ReservationError, t as StateTransitionError, u as KindError } from "../../index-PD-kf5pR.mjs";
|
|
2
2
|
export { CartError, CartErrorCategory, ConcurrencyError, IdempotencyBusyError, IdempotencyStorageError, KindError, NotFoundError, PriceChangedError, ReservationError, SagaError, SagaFailurePhase, StaleQuoteError, StateTransitionError, UnknownKindError };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as UnknownKindError, r as CartError, t as KindError } from "../../kind.error-CCjTB6kW.mjs";
|
|
2
|
-
import { i as ConcurrencyError, n as
|
|
3
|
-
import { a as ReservationError, i as
|
|
2
|
+
import { i as ConcurrencyError, n as PriceChangedError, r as NotFoundError, t as StateTransitionError } from "../../state-transition.error-CML7cQSd.mjs";
|
|
3
|
+
import { a as ReservationError, i as SagaError, n as IdempotencyBusyError, r as IdempotencyStorageError, t as StaleQuoteError } from "../../errors-iFWUnl8m.mjs";
|
|
4
4
|
export { CartError, ConcurrencyError, IdempotencyBusyError, IdempotencyStorageError, KindError, NotFoundError, PriceChangedError, ReservationError, SagaError, StaleQuoteError, StateTransitionError, UnknownKindError };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as CartEvents, t as createCartEvent } from "../../domain-event-DHNkz15G.mjs";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as cartEventsByName, i as cartEventDefinitions, n as MemoryOutboxStore, o as createCartEventRegistry, r as OutboxOwnershipError, s as defineCartEvent, t as InvalidOutboxEventError } from "../../outbox-store-bP30uBXd.mjs";
|
|
3
3
|
export { CartEvents, InvalidOutboxEventError, MemoryOutboxStore, OutboxOwnershipError, cartEventDefinitions, cartEventsByName, createCartEvent, createCartEventRegistry, defineCartEvent };
|
package/dist/domain/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as SagaError, c as PriceChangedError, d as UnknownKindError, f as ConcurrencyError, i as IdempotencyStorageError, l as NotFoundError, m as CartErrorCategory, n as StaleQuoteError, o as SagaFailurePhase, p as CartError, r as IdempotencyBusyError, s as ReservationError, t as StateTransitionError, u as KindError } from "../index-PD-kf5pR.mjs";
|
|
2
2
|
import { n as DraftStatus, r as ReservationStatus, t as CheckoutState } from "../cart-status.vo-2iisZGhb.mjs";
|
|
3
3
|
import { S as CartEvents, _ as CartEventMeta, a as OutboxErrorInfo, b as CartEventName, c as OutboxFailureDecision, d as OutboxStore, f as OutboxStoreWriteOptions, g as CartEventAggregate, h as CartDomainEvent, i as OutboxClaimOptions, l as OutboxFailurePolicy, m as CartAggregateType, n as MemoryOutboxStore, o as OutboxFailOptions, p as OutboxWriteOptions, r as OutboxAcknowledgeOptions, s as OutboxFailureContext, t as InvalidOutboxEventError, u as OutboxOwnershipError, v as createCartEvent, x as CartEventPayload, y as CartEventMap } from "../outbox-store-CTWz9pvG.mjs";
|
|
4
4
|
import { a as CartEventRegistry, c as defineCartEvent, d as EventValidationResult, f as EventValidator, i as CartEventDefinitionInput, l as EventSchema, n as cartEventsByName, o as PayloadOf, r as CartEventDefinition, s as createCartEventRegistry, t as cartEventDefinitions, u as EventSchemaProperty } from "../cart-event-catalog-BIbi2Q_n.mjs";
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import { a as
|
|
9
|
-
import { a as
|
|
10
|
-
import { a as
|
|
5
|
+
import { C as PricingSnapshot, S as PricedLine, _ as PromotionsBridge, a as TaxBreakdown, b as BridgeStatus, c as TaxCalculationResult, d as ReservationRequest, f as CatalogBridge, g as PromotionResult, h as CartSnapshot, i as ShippingQuoteRequest, l as InventoryBridge, m as AdjustmentSpec, n as ShippingMethod, o as TaxBridge, p as ProductSummary, r as ShippingQuote, s as TaxCalculationRequest, t as ShippingBridge, u as ReservationRef, x as OperationContext, y as BridgeRef } from "../shipping.bridge-_VwuKCSE.mjs";
|
|
6
|
+
import { a as Adjustment, i as Checkout, n as IdempotencyRecord, r as Draft, t as Reservation } from "../reservation.entity-gmeCFe8a.mjs";
|
|
7
|
+
import { a as CheckoutFlowState, i as SagaStepFn, n as isLegalCheckoutTransition, o as CheckoutStep, r as SagaDependencies, s as CheckoutStepNumber, t as CHECKOUT_STATE_TRANSITIONS } from "../state-transitions-CbPYzeca.mjs";
|
|
8
|
+
import { a as RevalidationResult, c as ValidityPolicy, i as LineLike, l as LineDisplay, n as KindContext, o as StaleBehavior, r as LineKind, s as StaleTrigger, t as KindBridges } from "../line-kind-DOYygKG4.mjs";
|
|
9
|
+
import { a as IdempotencyReplay, c as LineItem, i as IdempotencyIdentity, n as createKindRegistry, o as OperationName, r as CART_REF_NEW, s as TotalsSnapshot, t as KindRegistry } from "../kind-registry-CqOJHV-2.mjs";
|
|
10
|
+
import { a as systemClock, i as ClockPort, n as createCounterIdPort, r as cryptoIdPort, t as IdPort } from "../id.port-CpYO7sc1.mjs";
|
|
11
11
|
import { Money, addMoney, fromMajor, money, multiplyMoney, subtractMoney, sumMoney, toMajor } from "@classytic/primitives/money";
|
|
12
|
-
export { type Adjustment, AdjustmentSpec, BridgeRef, BridgeStatus, CART_REF_NEW, CHECKOUT_STATE_TRANSITIONS, CartAggregateType, CartDomainEvent, CartError, CartErrorCategory, CartEventAggregate, CartEventDefinition, CartEventDefinitionInput, CartEventMap, CartEventMeta, CartEventName, CartEventPayload, CartEventRegistry, CartEvents, CartSnapshot, CatalogBridge, type Checkout, CheckoutFlowState, type CheckoutState, CheckoutStep, CheckoutStepNumber, ClockPort, ConcurrencyError, type Draft, type DraftStatus, EventSchema, EventSchemaProperty, EventValidationResult, EventValidator, IdPort, IdempotencyBusyError, type IdempotencyIdentity, type IdempotencyRecord, type IdempotencyReplay, IdempotencyStorageError, InvalidOutboxEventError, InventoryBridge, type KindBridges, type KindContext, KindError, type KindRegistry, type LineDisplay, type LineItem, type LineKind, type LineLike, MemoryOutboxStore, type Money, NotFoundError, OperationContext, type OperationName, OutboxAcknowledgeOptions, OutboxClaimOptions, OutboxErrorInfo, OutboxFailOptions, OutboxFailureContext, OutboxFailureDecision, OutboxFailurePolicy, OutboxOwnershipError, OutboxStore, OutboxStoreWriteOptions, OutboxWriteOptions, PayloadOf, PriceChangedError, type PricedLine, type PricingSnapshot, ProductSummary, PromotionResult, PromotionsBridge, type Reservation, ReservationError, ReservationRef, ReservationRequest, type ReservationStatus, type RevalidationResult, SagaDependencies, SagaError, SagaFailurePhase,
|
|
12
|
+
export { type Adjustment, AdjustmentSpec, BridgeRef, BridgeStatus, CART_REF_NEW, CHECKOUT_STATE_TRANSITIONS, CartAggregateType, CartDomainEvent, CartError, CartErrorCategory, CartEventAggregate, CartEventDefinition, CartEventDefinitionInput, CartEventMap, CartEventMeta, CartEventName, CartEventPayload, CartEventRegistry, CartEvents, CartSnapshot, CatalogBridge, type Checkout, CheckoutFlowState, type CheckoutState, CheckoutStep, CheckoutStepNumber, ClockPort, ConcurrencyError, type Draft, type DraftStatus, EventSchema, EventSchemaProperty, EventValidationResult, EventValidator, IdPort, IdempotencyBusyError, type IdempotencyIdentity, type IdempotencyRecord, type IdempotencyReplay, IdempotencyStorageError, InvalidOutboxEventError, InventoryBridge, type KindBridges, type KindContext, KindError, type KindRegistry, type LineDisplay, type LineItem, type LineKind, type LineLike, MemoryOutboxStore, type Money, NotFoundError, OperationContext, type OperationName, OutboxAcknowledgeOptions, OutboxClaimOptions, OutboxErrorInfo, OutboxFailOptions, OutboxFailureContext, OutboxFailureDecision, OutboxFailurePolicy, OutboxOwnershipError, OutboxStore, OutboxStoreWriteOptions, OutboxWriteOptions, PayloadOf, PriceChangedError, type PricedLine, type PricingSnapshot, ProductSummary, PromotionResult, PromotionsBridge, type Reservation, ReservationError, ReservationRef, ReservationRequest, type ReservationStatus, type RevalidationResult, SagaDependencies, SagaError, SagaFailurePhase, SagaStepFn, ShippingBridge, ShippingMethod, ShippingQuote, ShippingQuoteRequest, type StaleBehavior, StaleQuoteError, type StaleTrigger, StateTransitionError, TaxBreakdown, TaxBridge, TaxCalculationRequest, TaxCalculationResult, type TotalsSnapshot, UnknownKindError, type ValidityPolicy, addMoney, cartEventDefinitions, cartEventsByName, createCartEvent, createCartEventRegistry, createCounterIdPort, createKindRegistry, cryptoIdPort, defineCartEvent, fromMajor, isLegalCheckoutTransition, money, multiplyMoney, subtractMoney, sumMoney, systemClock, toMajor };
|
package/dist/domain/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as CART_REF_NEW } from "../idempotency-key.vo-D0lJsvGn.mjs";
|
|
2
2
|
import { n as UnknownKindError, r as CartError, t as KindError } from "../kind.error-CCjTB6kW.mjs";
|
|
3
|
-
import { i as ConcurrencyError, n as
|
|
4
|
-
import { a as ReservationError, i as
|
|
3
|
+
import { i as ConcurrencyError, n as PriceChangedError, r as NotFoundError, t as StateTransitionError } from "../state-transition.error-CML7cQSd.mjs";
|
|
4
|
+
import { a as ReservationError, i as SagaError, n as IdempotencyBusyError, r as IdempotencyStorageError, t as StaleQuoteError } from "../errors-iFWUnl8m.mjs";
|
|
5
5
|
import { n as CartEvents, t as createCartEvent } from "../domain-event-DHNkz15G.mjs";
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as cartEventsByName, i as cartEventDefinitions, n as MemoryOutboxStore, o as createCartEventRegistry, r as OutboxOwnershipError, s as defineCartEvent, t as InvalidOutboxEventError } from "../outbox-store-bP30uBXd.mjs";
|
|
7
7
|
import { n as cryptoIdPort, r as systemClock, t as createCounterIdPort } from "../id.port-C3rlDAKP.mjs";
|
|
8
8
|
import { t as createKindRegistry } from "../kind-registry-Ba4PO4WC.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { t as CheckoutStep } from "../saga-steps-aP8iTHT3.mjs";
|
|
10
10
|
import { n as isLegalCheckoutTransition, t as CHECKOUT_STATE_TRANSITIONS } from "../state-transitions-CpJpZZTK.mjs";
|
|
11
11
|
import "./events/index.mjs";
|
|
12
12
|
import "./ports/index.mjs";
|
|
13
13
|
import "./saga/index.mjs";
|
|
14
14
|
import { addMoney, fromMajor, money, multiplyMoney, subtractMoney, sumMoney, toMajor } from "@classytic/primitives/money";
|
|
15
|
-
export { CART_REF_NEW, CHECKOUT_STATE_TRANSITIONS, CartError, CartEvents, CheckoutStep, ConcurrencyError, IdempotencyBusyError, IdempotencyStorageError, InvalidOutboxEventError, KindError, MemoryOutboxStore, NotFoundError, OutboxOwnershipError, PriceChangedError, ReservationError, SagaError,
|
|
15
|
+
export { CART_REF_NEW, CHECKOUT_STATE_TRANSITIONS, CartError, CartEvents, CheckoutStep, ConcurrencyError, IdempotencyBusyError, IdempotencyStorageError, InvalidOutboxEventError, KindError, MemoryOutboxStore, NotFoundError, OutboxOwnershipError, PriceChangedError, ReservationError, SagaError, StaleQuoteError, StateTransitionError, UnknownKindError, addMoney, cartEventDefinitions, cartEventsByName, createCartEvent, createCartEventRegistry, createCounterIdPort, createKindRegistry, cryptoIdPort, defineCartEvent, fromMajor, isLegalCheckoutTransition, money, multiplyMoney, subtractMoney, sumMoney, systemClock, toMajor };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { a as systemClock, i as ClockPort, n as createCounterIdPort, r as cryptoIdPort, t as IdPort } from "../../id.port-
|
|
1
|
+
import { _ as PromotionsBridge, a as TaxBreakdown, b as BridgeStatus, c as TaxCalculationResult, d as ReservationRequest, f as CatalogBridge, g as PromotionResult, h as CartSnapshot, i as ShippingQuoteRequest, l as InventoryBridge, m as AdjustmentSpec, n as ShippingMethod, o as TaxBridge, p as ProductSummary, r as ShippingQuote, s as TaxCalculationRequest, t as ShippingBridge, u as ReservationRef, x as OperationContext, y as BridgeRef } from "../../shipping.bridge-_VwuKCSE.mjs";
|
|
2
|
+
import { a as systemClock, i as ClockPort, n as createCounterIdPort, r as cryptoIdPort, t as IdPort } from "../../id.port-CpYO7sc1.mjs";
|
|
3
3
|
export { AdjustmentSpec, BridgeRef, BridgeStatus, CartSnapshot, CatalogBridge, ClockPort, IdPort, InventoryBridge, OperationContext, ProductSummary, PromotionResult, PromotionsBridge, ReservationRef, ReservationRequest, ShippingBridge, ShippingMethod, ShippingQuote, ShippingQuoteRequest, TaxBreakdown, TaxBridge, TaxCalculationRequest, TaxCalculationResult, createCounterIdPort, cryptoIdPort, systemClock };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CheckoutFlowState,
|
|
2
|
-
export { CHECKOUT_STATE_TRANSITIONS, type CheckoutFlowState, CheckoutStep, type CheckoutStepNumber, type SagaDependencies, type
|
|
1
|
+
import { a as CheckoutFlowState, i as SagaStepFn, n as isLegalCheckoutTransition, o as CheckoutStep, r as SagaDependencies, s as CheckoutStepNumber, t as CHECKOUT_STATE_TRANSITIONS } from "../../state-transitions-CbPYzeca.mjs";
|
|
2
|
+
export { CHECKOUT_STATE_TRANSITIONS, type CheckoutFlowState, CheckoutStep, type CheckoutStepNumber, type SagaDependencies, type SagaStepFn, isLegalCheckoutTransition };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as CheckoutStep } from "../../saga-steps-aP8iTHT3.mjs";
|
|
2
2
|
import { n as isLegalCheckoutTransition, t as CHECKOUT_STATE_TRANSITIONS } from "../../state-transitions-CpJpZZTK.mjs";
|
|
3
|
-
export { CHECKOUT_STATE_TRANSITIONS, CheckoutStep,
|
|
3
|
+
export { CHECKOUT_STATE_TRANSITIONS, CheckoutStep, isLegalCheckoutTransition };
|
package/dist/engine/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CartConfigShape, cartConfigSchema, idempotencyConfigSchema, reservationConfigSchema, scopeConfigSchema } from "./cart-config.schema.mjs";
|
|
2
|
-
import { a as CartEngine, i as CartConfig, n as createCart, r as CartBridges, t as InProcessCartEventBus } from "../internal-event-bus-
|
|
2
|
+
import { a as CartEngine, i as CartConfig, n as createCart, r as CartBridges, t as InProcessCartEventBus } from "../internal-event-bus-BGcwAeqK.mjs";
|
|
3
3
|
export { type CartBridges, type CartConfig, type CartConfigShape, type CartEngine, InProcessCartEventBus, cartConfigSchema, createCart, idempotencyConfigSchema, reservationConfigSchema, scopeConfigSchema };
|
package/dist/engine/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as InProcessCartEventBus, t as createCart } from "../create-cart-
|
|
1
|
+
import { n as InProcessCartEventBus, t as createCart } from "../create-cart-DRYSw5Bj.mjs";
|
|
2
2
|
import { cartConfigSchema, idempotencyConfigSchema, reservationConfigSchema, scopeConfigSchema } from "./cart-config.schema.mjs";
|
|
3
3
|
export { InProcessCartEventBus, cartConfigSchema, createCart, idempotencyConfigSchema, reservationConfigSchema, scopeConfigSchema };
|
|
@@ -21,31 +21,6 @@ var ReservationError = class extends CartError {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
24
|
-
//#region src/domain/errors/stale-quote.error.ts
|
|
25
|
-
/**
|
|
26
|
-
* A priced line's validity window has elapsed and its LineKind's revalidate()
|
|
27
|
-
* returned `invalid`. Fired from the saga's step 2 (revalidation).
|
|
28
|
-
*
|
|
29
|
-
* Example: a bid line whose underlying auction moved to a new highest bid
|
|
30
|
-
* while the user was reviewing the cart.
|
|
31
|
-
*
|
|
32
|
-
* Clients should re-read the cart, show the updated state, and confirm again.
|
|
33
|
-
* Retryable with a new idempotency key.
|
|
34
|
-
*/
|
|
35
|
-
var StaleQuoteError = class extends CartError {
|
|
36
|
-
code = "cart/stale_quote";
|
|
37
|
-
category = "validation";
|
|
38
|
-
retryable = true;
|
|
39
|
-
constructor(lineId, kind, reason, details) {
|
|
40
|
-
super(`Line ${lineId} (${kind}) is no longer valid: ${reason}`, {
|
|
41
|
-
lineId,
|
|
42
|
-
kind,
|
|
43
|
-
reason,
|
|
44
|
-
...details
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
//#endregion
|
|
49
24
|
//#region src/domain/errors/saga.error.ts
|
|
50
25
|
var SagaError = class extends CartError {
|
|
51
26
|
code = "cart/saga_failure";
|
|
@@ -94,4 +69,29 @@ var IdempotencyStorageError = class extends CartError {
|
|
|
94
69
|
}
|
|
95
70
|
};
|
|
96
71
|
//#endregion
|
|
97
|
-
|
|
72
|
+
//#region src/domain/errors/stale-quote.error.ts
|
|
73
|
+
/**
|
|
74
|
+
* A priced line's validity window has elapsed and its LineKind's revalidate()
|
|
75
|
+
* returned `invalid`. Fired from the saga's step 2 (revalidation).
|
|
76
|
+
*
|
|
77
|
+
* Example: a bid line whose underlying auction moved to a new highest bid
|
|
78
|
+
* while the user was reviewing the cart.
|
|
79
|
+
*
|
|
80
|
+
* Clients should re-read the cart, show the updated state, and confirm again.
|
|
81
|
+
* Retryable with a new idempotency key.
|
|
82
|
+
*/
|
|
83
|
+
var StaleQuoteError = class extends CartError {
|
|
84
|
+
code = "cart/stale_quote";
|
|
85
|
+
category = "validation";
|
|
86
|
+
retryable = true;
|
|
87
|
+
constructor(lineId, kind, reason, details) {
|
|
88
|
+
super(`Line ${lineId} (${kind}) is no longer valid: ${reason}`, {
|
|
89
|
+
lineId,
|
|
90
|
+
kind,
|
|
91
|
+
reason,
|
|
92
|
+
...details
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
//#endregion
|
|
97
|
+
export { ReservationError as a, SagaError as i, IdempotencyBusyError as n, IdempotencyStorageError as r, StaleQuoteError as t };
|
|
@@ -53,42 +53,52 @@ declare class ConcurrencyError extends CartError {
|
|
|
53
53
|
constructor(resource: 'draft' | 'checkout' | 'reservation', expectedVersion: number, resourceId: string);
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
|
-
//#region src/domain/errors/
|
|
56
|
+
//#region src/domain/errors/kind.error.d.ts
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
59
|
-
* step 5 (InventoryBridge.reserve) and from compensating `release` when the
|
|
60
|
-
* bridge reports the reservation no longer exists.
|
|
58
|
+
* A LineKind rejected a line during validate() or price().
|
|
61
59
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
60
|
+
* Used for both:
|
|
61
|
+
* - User-facing validation failures ("quantity exceeds max per line")
|
|
62
|
+
* - Configuration failures ("kind 'timeslot' is not registered")
|
|
63
|
+
*
|
|
64
|
+
* `retryable: false` by default because changing the input will require a
|
|
65
|
+
* new idempotency key anyway.
|
|
64
66
|
*/
|
|
65
|
-
declare class
|
|
66
|
-
readonly code
|
|
67
|
+
declare class KindError extends CartError {
|
|
68
|
+
readonly code: string;
|
|
67
69
|
readonly category: CartErrorCategory;
|
|
68
|
-
readonly retryable
|
|
69
|
-
constructor(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
lineIds?: string[];
|
|
70
|
+
readonly retryable = false;
|
|
71
|
+
constructor(kind: string, reason: string, opts?: {
|
|
72
|
+
code?: string;
|
|
73
|
+
details?: Record<string, unknown>;
|
|
73
74
|
});
|
|
74
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* A kind referenced by a line is not registered in the engine's kind
|
|
78
|
+
* registry. This is a configuration bug — the host forgot to register the
|
|
79
|
+
* kind or registered it under a different name. Always fatal, never
|
|
80
|
+
* retryable.
|
|
81
|
+
*/
|
|
82
|
+
declare class UnknownKindError extends CartError {
|
|
83
|
+
readonly code = "cart/unknown_kind";
|
|
84
|
+
readonly category: CartErrorCategory;
|
|
85
|
+
readonly retryable = false;
|
|
86
|
+
constructor(kind: string, registered: string[]);
|
|
87
|
+
}
|
|
75
88
|
//#endregion
|
|
76
|
-
//#region src/domain/errors/
|
|
89
|
+
//#region src/domain/errors/not-found.error.d.ts
|
|
77
90
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* Example: a bid line whose underlying auction moved to a new highest bid
|
|
82
|
-
* while the user was reviewing the cart.
|
|
91
|
+
* The requested draft, checkout, or reservation does not exist (or is not
|
|
92
|
+
* visible under the caller's organizationId scope).
|
|
83
93
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
94
|
+
* Retryable is false — the resource simply does not exist. If the host
|
|
95
|
+
* thinks it should, the bug is upstream.
|
|
86
96
|
*/
|
|
87
|
-
declare class
|
|
88
|
-
readonly code = "cart/
|
|
97
|
+
declare class NotFoundError extends CartError {
|
|
98
|
+
readonly code = "cart/not_found";
|
|
89
99
|
readonly category: CartErrorCategory;
|
|
90
|
-
readonly retryable =
|
|
91
|
-
constructor(
|
|
100
|
+
readonly retryable = false;
|
|
101
|
+
constructor(resource: 'draft' | 'checkout' | 'reservation' | 'line', ref: string, organizationId?: string);
|
|
92
102
|
}
|
|
93
103
|
//#endregion
|
|
94
104
|
//#region src/domain/errors/price-changed.error.d.ts
|
|
@@ -111,6 +121,26 @@ declare class PriceChangedError extends CartError {
|
|
|
111
121
|
constructor(expectedHash: string, actualHash: string, context?: Record<string, unknown>);
|
|
112
122
|
}
|
|
113
123
|
//#endregion
|
|
124
|
+
//#region src/domain/errors/reservation.error.d.ts
|
|
125
|
+
/**
|
|
126
|
+
* Inventory / slot reservation could not be secured. Thrown from the saga's
|
|
127
|
+
* step 5 (InventoryBridge.reserve) and from compensating `release` when the
|
|
128
|
+
* bridge reports the reservation no longer exists.
|
|
129
|
+
*
|
|
130
|
+
* Category is `external` because the decision is owned by the inventory
|
|
131
|
+
* system, not cart.
|
|
132
|
+
*/
|
|
133
|
+
declare class ReservationError extends CartError {
|
|
134
|
+
readonly code = "cart/reservation_failed";
|
|
135
|
+
readonly category: CartErrorCategory;
|
|
136
|
+
readonly retryable: boolean;
|
|
137
|
+
constructor(message: string, opts: {
|
|
138
|
+
retryable: boolean;
|
|
139
|
+
bridgeError?: unknown;
|
|
140
|
+
lineIds?: string[];
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
114
144
|
//#region src/domain/errors/saga.error.d.ts
|
|
115
145
|
/**
|
|
116
146
|
* Structured failure in the finalization saga.
|
|
@@ -162,37 +192,22 @@ declare class IdempotencyStorageError extends CartError {
|
|
|
162
192
|
constructor(message: string, context: Record<string, unknown>);
|
|
163
193
|
}
|
|
164
194
|
//#endregion
|
|
165
|
-
//#region src/domain/errors/
|
|
195
|
+
//#region src/domain/errors/stale-quote.error.d.ts
|
|
166
196
|
/**
|
|
167
|
-
* A
|
|
197
|
+
* A priced line's validity window has elapsed and its LineKind's revalidate()
|
|
198
|
+
* returned `invalid`. Fired from the saga's step 2 (revalidation).
|
|
168
199
|
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* - Configuration failures ("kind 'timeslot' is not registered")
|
|
200
|
+
* Example: a bid line whose underlying auction moved to a new highest bid
|
|
201
|
+
* while the user was reviewing the cart.
|
|
172
202
|
*
|
|
173
|
-
*
|
|
174
|
-
* new idempotency key
|
|
175
|
-
*/
|
|
176
|
-
declare class KindError extends CartError {
|
|
177
|
-
readonly code: string;
|
|
178
|
-
readonly category: CartErrorCategory;
|
|
179
|
-
readonly retryable = false;
|
|
180
|
-
constructor(kind: string, reason: string, opts?: {
|
|
181
|
-
code?: string;
|
|
182
|
-
details?: Record<string, unknown>;
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* A kind referenced by a line is not registered in the engine's kind
|
|
187
|
-
* registry. This is a configuration bug — the host forgot to register the
|
|
188
|
-
* kind or registered it under a different name. Always fatal, never
|
|
189
|
-
* retryable.
|
|
203
|
+
* Clients should re-read the cart, show the updated state, and confirm again.
|
|
204
|
+
* Retryable with a new idempotency key.
|
|
190
205
|
*/
|
|
191
|
-
declare class
|
|
192
|
-
readonly code = "cart/
|
|
206
|
+
declare class StaleQuoteError extends CartError {
|
|
207
|
+
readonly code = "cart/stale_quote";
|
|
193
208
|
readonly category: CartErrorCategory;
|
|
194
|
-
readonly retryable =
|
|
195
|
-
constructor(kind: string,
|
|
209
|
+
readonly retryable = true;
|
|
210
|
+
constructor(lineId: string, kind: string, reason: string, details?: Record<string, unknown>);
|
|
196
211
|
}
|
|
197
212
|
//#endregion
|
|
198
213
|
//#region src/domain/errors/state-transition.error.d.ts
|
|
@@ -213,19 +228,4 @@ declare class StateTransitionError extends CartError {
|
|
|
213
228
|
constructor(checkoutId: string, from: CheckoutState, to: CheckoutState);
|
|
214
229
|
}
|
|
215
230
|
//#endregion
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* The requested draft, checkout, or reservation does not exist (or is not
|
|
219
|
-
* visible under the caller's organizationId scope).
|
|
220
|
-
*
|
|
221
|
-
* Retryable is false — the resource simply does not exist. If the host
|
|
222
|
-
* thinks it should, the bug is upstream.
|
|
223
|
-
*/
|
|
224
|
-
declare class NotFoundError extends CartError {
|
|
225
|
-
readonly code = "cart/not_found";
|
|
226
|
-
readonly category: CartErrorCategory;
|
|
227
|
-
readonly retryable = false;
|
|
228
|
-
constructor(resource: 'draft' | 'checkout' | 'reservation' | 'line', ref: string, organizationId?: string);
|
|
229
|
-
}
|
|
230
|
-
//#endregion
|
|
231
|
-
export { IdempotencyBusyError as a, SagaFailurePhase as c, ReservationError as d, ConcurrencyError as f, UnknownKindError as i, PriceChangedError as l, CartErrorCategory as m, StateTransitionError as n, IdempotencyStorageError as o, CartError as p, KindError as r, SagaError as s, NotFoundError as t, StaleQuoteError as u };
|
|
231
|
+
export { SagaError as a, PriceChangedError as c, UnknownKindError as d, ConcurrencyError as f, IdempotencyStorageError as i, NotFoundError as l, CartErrorCategory as m, StaleQuoteError as n, SagaFailurePhase as o, CartError as p, IdempotencyBusyError as r, ReservationError as s, StateTransitionError as t, KindError as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,19 +1,69 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as SagaError, c as PriceChangedError, d as UnknownKindError, f as ConcurrencyError, i as IdempotencyStorageError, l as NotFoundError, m as CartErrorCategory, n as StaleQuoteError, o as SagaFailurePhase, p as CartError, r as IdempotencyBusyError, s as ReservationError, t as StateTransitionError, u as KindError } from "./index-PD-kf5pR.mjs";
|
|
2
2
|
import { n as DraftStatus, r as ReservationStatus, t as CheckoutState } from "./cart-status.vo-2iisZGhb.mjs";
|
|
3
3
|
import { S as CartEvents, _ as CartEventMeta, a as OutboxErrorInfo, b as CartEventName, c as OutboxFailureDecision, d as OutboxStore, f as OutboxStoreWriteOptions, g as CartEventAggregate, h as CartDomainEvent, i as OutboxClaimOptions, l as OutboxFailurePolicy, m as CartAggregateType, n as MemoryOutboxStore, o as OutboxFailOptions, p as OutboxWriteOptions, r as OutboxAcknowledgeOptions, s as OutboxFailureContext, t as InvalidOutboxEventError, u as OutboxOwnershipError, v as createCartEvent, x as CartEventPayload, y as CartEventMap } from "./outbox-store-CTWz9pvG.mjs";
|
|
4
4
|
import { a as CartEventRegistry, c as defineCartEvent, d as EventValidationResult, f as EventValidator, i as CartEventDefinitionInput, l as EventSchema, n as cartEventsByName, o as PayloadOf, r as CartEventDefinition, s as createCartEventRegistry, t as cartEventDefinitions, u as EventSchemaProperty } from "./cart-event-catalog-BIbi2Q_n.mjs";
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import { a as
|
|
9
|
-
import { a as
|
|
10
|
-
import { a as
|
|
5
|
+
import { C as PricingSnapshot, S as PricedLine, _ as PromotionsBridge, a as TaxBreakdown, b as BridgeStatus, c as TaxCalculationResult, d as ReservationRequest, f as CatalogBridge, g as PromotionResult, h as CartSnapshot, i as ShippingQuoteRequest, l as InventoryBridge, m as AdjustmentSpec, n as ShippingMethod, o as TaxBridge, p as ProductSummary, r as ShippingQuote, s as TaxCalculationRequest, t as ShippingBridge, u as ReservationRef, v as Address, x as OperationContext, y as BridgeRef } from "./shipping.bridge-_VwuKCSE.mjs";
|
|
6
|
+
import { a as Adjustment, i as Checkout, n as IdempotencyRecord, r as Draft, t as Reservation } from "./reservation.entity-gmeCFe8a.mjs";
|
|
7
|
+
import { a as CheckoutFlowState, i as SagaStepFn, n as isLegalCheckoutTransition, o as CheckoutStep, r as SagaDependencies, s as CheckoutStepNumber, t as CHECKOUT_STATE_TRANSITIONS } from "./state-transitions-CbPYzeca.mjs";
|
|
8
|
+
import { a as RevalidationResult, c as ValidityPolicy, i as LineLike, l as LineDisplay, n as KindContext, o as StaleBehavior, r as LineKind, s as StaleTrigger, t as KindBridges } from "./line-kind-DOYygKG4.mjs";
|
|
9
|
+
import { a as IdempotencyReplay, c as LineItem, i as IdempotencyIdentity, n as createKindRegistry, o as OperationName, r as CART_REF_NEW, s as TotalsSnapshot, t as KindRegistry } from "./kind-registry-CqOJHV-2.mjs";
|
|
10
|
+
import { a as systemClock, i as ClockPort, n as createCounterIdPort, r as cryptoIdPort, t as IdPort } from "./id.port-CpYO7sc1.mjs";
|
|
11
11
|
import { CartConfigShape, cartConfigSchema, idempotencyConfigSchema, reservationConfigSchema, scopeConfigSchema } from "./engine/cart-config.schema.mjs";
|
|
12
|
-
import { C as
|
|
13
|
-
import { a as
|
|
12
|
+
import { C as IdempotencyDocument, D as CheckoutDocument, E as createDraftModel, O as createCheckoutModel, S as createReservationModel, T as DraftDocument, _ as CartModelName, a as CartEngine, b as createCartModels, c as CreateCartRepositoriesConfig, d as IdempotencyRepository, f as CheckoutRepository, g as CartEventPublisherDeps, h as DraftRepositoryDeps, i as CartConfig, l as createCartRepositories, m as DraftRepository, n as createCart, o as CartRepositories, p as CheckoutRepositoryDeps, r as CartBridges, s as CartRepositoryPluginBundle, t as InProcessCartEventBus, u as ReservationRepository, v as CartModels, w as createIdempotencyModel, x as ReservationDocument, y as CreateCartModelsOptions } from "./internal-event-bus-BGcwAeqK.mjs";
|
|
13
|
+
import { a as timeslotKind, c as skuKind, d as BundlePayload, f as bundleKind, i as TimeslotPayload, l as skuPayloadSchema, n as variantKind, o as timeslotPayloadSchema, p as bundlePayloadSchema, r as variantPayloadSchema, s as SkuPayload, t as VariantPayload, u as BundleComponent } from "./variant.kind-CCwwWAB6.mjs";
|
|
14
14
|
import { Money, addMoney, fromMajor, money, multiplyMoney, subtractMoney, sumMoney, toMajor } from "@classytic/primitives/money";
|
|
15
15
|
import { EventHandler, EventTransport, PublishManyResult } from "@classytic/primitives/events";
|
|
16
|
+
import { Schema } from "mongoose";
|
|
17
|
+
import { ResolvedTenantConfig, TenantConfig } from "@classytic/primitives/tenant";
|
|
16
18
|
|
|
19
|
+
//#region src/services/abandonment.service.d.ts
|
|
20
|
+
/**
|
|
21
|
+
* Abandonment query primitives. Hosts call these from their own cron
|
|
22
|
+
* or worker — cart does not ship a scheduler.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Find drafts that have been active but not updated since `cutoff`.
|
|
26
|
+
* Returns up to `limit` drafts, sorted by `updatedAt` ascending (oldest
|
|
27
|
+
* first). Routes through mongokit's `getAll` so the multi-tenant plugin
|
|
28
|
+
* scopes the query at POLICY priority — pass `skipTenant: true` on `ctx`
|
|
29
|
+
* for cross-tenant admin sweeps.
|
|
30
|
+
*/
|
|
31
|
+
declare function findAbandonedDrafts(opts: {
|
|
32
|
+
repo: DraftRepository;
|
|
33
|
+
cutoff: Date;
|
|
34
|
+
limit?: number;
|
|
35
|
+
ctx: OperationContext;
|
|
36
|
+
}): Promise<DraftDocument[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Mark a batch of drafts as abandoned. Returns the count of drafts
|
|
39
|
+
* successfully transitioned.
|
|
40
|
+
*/
|
|
41
|
+
declare function markAbandoned(opts: {
|
|
42
|
+
repo: DraftRepository;
|
|
43
|
+
draftIds: string[];
|
|
44
|
+
ctx: OperationContext;
|
|
45
|
+
}): Promise<number>;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/services/merge.service.d.ts
|
|
48
|
+
/**
|
|
49
|
+
* Merge a guest (session-scoped) draft into an authenticated user's
|
|
50
|
+
* active draft on login.
|
|
51
|
+
*
|
|
52
|
+
* Merge strategy: iterate the source's lines. For each line, if a line
|
|
53
|
+
* with the same `(kind, skuRef)` exists in the target, increment the
|
|
54
|
+
* target's quantity. Otherwise, append. Display snapshots carry over
|
|
55
|
+
* from the source since they're already captured.
|
|
56
|
+
*
|
|
57
|
+
* After merging, the source draft is marked `abandoned` so it's no
|
|
58
|
+
* longer active.
|
|
59
|
+
*/
|
|
60
|
+
declare function mergeDrafts(opts: {
|
|
61
|
+
repo: DraftRepository;
|
|
62
|
+
sourcePublicId: string;
|
|
63
|
+
targetActorRef: string;
|
|
64
|
+
ctx: OperationContext;
|
|
65
|
+
}): Promise<DraftDocument>;
|
|
66
|
+
//#endregion
|
|
17
67
|
//#region src/services/pricing.service.d.ts
|
|
18
68
|
/**
|
|
19
69
|
* Pricing pipeline — composable, bridge-activated.
|
|
@@ -52,52 +102,17 @@ declare function runPricing(opts: {
|
|
|
52
102
|
adjustments: Adjustment[];
|
|
53
103
|
}>;
|
|
54
104
|
//#endregion
|
|
55
|
-
//#region src/
|
|
56
|
-
/**
|
|
57
|
-
* Merge a guest (session-scoped) draft into an authenticated user's
|
|
58
|
-
* active draft on login.
|
|
59
|
-
*
|
|
60
|
-
* Merge strategy: iterate the source's lines. For each line, if a line
|
|
61
|
-
* with the same `(kind, skuRef)` exists in the target, increment the
|
|
62
|
-
* target's quantity. Otherwise, append. Display snapshots carry over
|
|
63
|
-
* from the source since they're already captured.
|
|
64
|
-
*
|
|
65
|
-
* After merging, the source draft is marked `abandoned` so it's no
|
|
66
|
-
* longer active.
|
|
67
|
-
*/
|
|
68
|
-
declare function mergeDrafts(opts: {
|
|
69
|
-
repo: DraftRepository;
|
|
70
|
-
sourcePublicId: string;
|
|
71
|
-
targetActorRef: string;
|
|
72
|
-
ctx: OperationContext;
|
|
73
|
-
}): Promise<DraftDocument>;
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/services/abandonment.service.d.ts
|
|
76
|
-
/**
|
|
77
|
-
* Abandonment query primitives. Hosts call these from their own cron
|
|
78
|
-
* or worker — cart does not ship a scheduler.
|
|
79
|
-
*/
|
|
105
|
+
//#region src/models/inject-tenant.d.ts
|
|
80
106
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* scopes the query at POLICY priority — pass `skipTenant: true` on `ctx`
|
|
85
|
-
* for cross-tenant admin sweeps.
|
|
107
|
+
* Accept the same config surface other packages use (TenantConfig | boolean),
|
|
108
|
+
* and additionally support the legacy `{ tenantFieldType, multiTenant }` shape
|
|
109
|
+
* so the engine factory can forward its own config shorthand.
|
|
86
110
|
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Mark a batch of drafts as abandoned. Returns the count of drafts
|
|
95
|
-
* successfully transitioned.
|
|
96
|
-
*/
|
|
97
|
-
declare function markAbandoned(opts: {
|
|
98
|
-
repo: DraftRepository;
|
|
99
|
-
draftIds: string[];
|
|
100
|
-
ctx: OperationContext;
|
|
101
|
-
}): Promise<number>;
|
|
111
|
+
type CartTenantInput = TenantConfig | boolean | {
|
|
112
|
+
tenantFieldType?: 'objectId' | 'string';
|
|
113
|
+
multiTenant?: boolean;
|
|
114
|
+
};
|
|
115
|
+
/** Re-export of primitives' resolved shape under the legacy name. */
|
|
116
|
+
type ResolvedTenant = ResolvedTenantConfig;
|
|
102
117
|
//#endregion
|
|
103
|
-
export { type Address, type Adjustment, type AdjustmentSpec, type BridgeRef, type BridgeStatus, type BundleComponent, type BundlePayload, CART_REF_NEW, CHECKOUT_STATE_TRANSITIONS, type CartAggregateType, type CartBridges, type CartConfig, type CartConfigShape, type CartDomainEvent, type CartEngine, CartError, type CartErrorCategory, type CartEventAggregate, type CartEventDefinition, type CartEventDefinitionInput, type CartEventMap, type CartEventMeta, type CartEventName, type CartEventPayload, type CartEventRegistry, CartEvents, type CartModelName, type CartModels, type CartRepositories, type CartRepositoryPluginBundle, type CartSnapshot, type CatalogBridge, type Checkout, type CheckoutDocument, type CheckoutFlowState, CheckoutRepository, type CheckoutState, CheckoutStep, type CheckoutStepNumber, type ClockPort, ConcurrencyError, type CreateCartModelsOptions, type Draft, type DraftDocument, DraftRepository, type DraftStatus, type EventHandler, type EventSchema, type EventSchemaProperty, type EventTransport, type EventValidationResult, type EventValidator, type IdPort, IdempotencyBusyError, type IdempotencyDocument, type IdempotencyIdentity, type IdempotencyRecord, type IdempotencyReplay, IdempotencyRepository, IdempotencyStorageError, InProcessCartEventBus, InvalidOutboxEventError, type InventoryBridge, type KindBridges, type KindContext, KindError, type KindRegistry, type LineDisplay, type LineItem, type LineKind, type LineLike, MemoryOutboxStore, type Money, NotFoundError, type OperationContext, type OperationName, type OutboxAcknowledgeOptions, type OutboxClaimOptions, type OutboxErrorInfo, type OutboxFailOptions, type OutboxFailureContext, type OutboxFailureDecision, type OutboxFailurePolicy, OutboxOwnershipError, type OutboxStore, type OutboxStoreWriteOptions, type OutboxWriteOptions, type PayloadOf, PriceChangedError, type PricedLine, type PricingSnapshot, type ProductSummary, type PromotionResult, type PromotionsBridge, type PublishManyResult, type Reservation, type ReservationDocument, ReservationError, type ReservationRef, ReservationRepository, type ReservationRequest, type ReservationStatus, type RevalidationResult, type SagaDependencies, SagaError, type SagaFailurePhase, type
|
|
118
|
+
export { type Address, type Adjustment, type AdjustmentSpec, type BridgeRef, type BridgeStatus, type BundleComponent, type BundlePayload, CART_REF_NEW, CHECKOUT_STATE_TRANSITIONS, type CartAggregateType, type CartBridges, type CartConfig, type CartConfigShape, type CartDomainEvent, type CartEngine, CartError, type CartErrorCategory, type CartEventAggregate, type CartEventDefinition, type CartEventDefinitionInput, type CartEventMap, type CartEventMeta, type CartEventName, type CartEventPayload, type CartEventPublisherDeps, type CartEventRegistry, CartEvents, type CartModelName, type CartModels, type CartRepositories, type CartRepositoryPluginBundle, type CartSnapshot, type CartTenantInput, type CatalogBridge, type Checkout, type CheckoutDocument, type CheckoutFlowState, CheckoutRepository, type CheckoutRepositoryDeps, type CheckoutState, CheckoutStep, type CheckoutStepNumber, type ClockPort, ConcurrencyError, type CreateCartModelsOptions, type CreateCartRepositoriesConfig, type Draft, type DraftDocument, DraftRepository, type DraftRepositoryDeps, type DraftStatus, type EventHandler, type EventSchema, type EventSchemaProperty, type EventTransport, type EventValidationResult, type EventValidator, type IdPort, IdempotencyBusyError, type IdempotencyDocument, type IdempotencyIdentity, type IdempotencyRecord, type IdempotencyReplay, IdempotencyRepository, IdempotencyStorageError, InProcessCartEventBus, InvalidOutboxEventError, type InventoryBridge, type KindBridges, type KindContext, KindError, type KindRegistry, type LineDisplay, type LineItem, type LineKind, type LineLike, MemoryOutboxStore, type Money, NotFoundError, type OperationContext, type OperationName, type OutboxAcknowledgeOptions, type OutboxClaimOptions, type OutboxErrorInfo, type OutboxFailOptions, type OutboxFailureContext, type OutboxFailureDecision, type OutboxFailurePolicy, OutboxOwnershipError, type OutboxStore, type OutboxStoreWriteOptions, type OutboxWriteOptions, type PayloadOf, PriceChangedError, type PricedLine, type PricingSnapshot, type ProductSummary, type PromotionResult, type PromotionsBridge, type PublishManyResult, type Reservation, type ReservationDocument, ReservationError, type ReservationRef, ReservationRepository, type ReservationRequest, type ReservationStatus, type ResolvedTenant, type RevalidationResult, type SagaDependencies, SagaError, type SagaFailurePhase, type SagaStepFn, type ShippingBridge, type ShippingMethod, type ShippingQuote, type ShippingQuoteRequest, type SkuPayload, type StaleBehavior, StaleQuoteError, type StaleTrigger, StateTransitionError, type TaxBreakdown, type TaxBridge, type TaxCalculationRequest, type TaxCalculationResult, type TimeslotPayload, type TotalsSnapshot, UnknownKindError, type ValidityPolicy, type VariantPayload, addMoney, bundleKind, bundlePayloadSchema, cartConfigSchema, cartEventDefinitions, cartEventsByName, createCart, createCartEvent, createCartEventRegistry, createCartModels, createCartRepositories, createCheckoutModel, createCounterIdPort, createDraftModel, createIdempotencyModel, createKindRegistry, createReservationModel, cryptoIdPort, defineCartEvent, findAbandonedDrafts, fromMajor, idempotencyConfigSchema, isLegalCheckoutTransition, markAbandoned, mergeDrafts, money, multiplyMoney, reservationConfigSchema, runPricing, scopeConfigSchema, skuKind, skuPayloadSchema, subtractMoney, sumMoney, systemClock, timeslotKind, timeslotPayloadSchema, toMajor, variantKind, variantPayloadSchema };
|