@reactionary/core 0.2.19 → 0.3.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/client/client-builder.js +3 -4
- package/decorators/reactionary.decorator.js +2 -2
- package/initialization.js +7 -1
- package/package.json +1 -1
- package/providers/analytics.provider.js +62 -1
- package/schemas/errors/invalid-input.error.js +1 -1
- package/schemas/errors/invalid-output.error.js +1 -1
- package/schemas/models/order.model.js +1 -1
- package/schemas/mutations/analytics/index.js +21 -0
- package/schemas/mutations/analytics/product-add-to-cart.mutation.js +19 -0
- package/schemas/mutations/analytics/product-details-view.mutation.js +10 -0
- package/schemas/mutations/analytics/product-summary-click.mutation.js +20 -0
- package/schemas/mutations/analytics/product-summary-view.mutation.js +19 -0
- package/schemas/mutations/analytics/purchase.mutation.js +10 -0
- package/schemas/mutations/index.js +1 -1
- package/schemas/session.schema.js +10 -2
- package/src/client/client.d.ts +2 -3
- package/src/initialization.d.ts +1 -1
- package/src/providers/analytics.provider.d.ts +14 -0
- package/src/providers/cart.provider.d.ts +3 -0
- package/src/providers/category.provider.d.ts +1 -0
- package/src/schemas/errors/invalid-input.error.d.ts +1 -1
- package/src/schemas/errors/invalid-output.error.d.ts +1 -1
- package/src/schemas/models/identifiers.model.d.ts +3 -0
- package/src/schemas/models/order.model.d.ts +1 -1
- package/src/schemas/mutations/analytics/index.d.ts +2441 -0
- package/src/schemas/mutations/analytics/product-add-to-cart.mutation.d.ts +32 -0
- package/src/schemas/mutations/analytics/product-details-view.mutation.d.ts +9 -0
- package/src/schemas/mutations/analytics/product-summary-click.mutation.d.ts +33 -0
- package/src/schemas/mutations/analytics/product-summary-view.mutation.d.ts +32 -0
- package/src/schemas/mutations/analytics/purchase.mutation.d.ts +2346 -0
- package/src/schemas/mutations/index.d.ts +1 -1
- package/src/schemas/queries/order-search.query.d.ts +3 -0
- package/src/schemas/session.schema.d.ts +43 -6
- package/src/zod-utils.d.ts +4 -1
- package/schemas/mutations/analytics.mutation.js +0 -20
- package/src/schemas/mutations/analytics.mutation.d.ts +0 -110
package/client/client-builder.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NoOpCache } from "../cache/noop-cache.js";
|
|
2
|
+
import { MulticastAnalyticsProvider } from "../providers/analytics.provider.js";
|
|
2
3
|
import {
|
|
3
4
|
RequestContextSchema
|
|
4
5
|
} from "../schemas/session.schema.js";
|
|
@@ -36,14 +37,12 @@ class ClientBuilder {
|
|
|
36
37
|
...provider
|
|
37
38
|
};
|
|
38
39
|
if (provider.analytics) {
|
|
39
|
-
mergedAnalytics.push(
|
|
40
|
+
mergedAnalytics.push(provider.analytics);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
if (mergedAnalytics.length > 0) {
|
|
43
|
-
client["analytics"] = mergedAnalytics;
|
|
44
|
-
}
|
|
45
43
|
const completeClient = {
|
|
46
44
|
...client,
|
|
45
|
+
analytics: new MulticastAnalyticsProvider(sharedCache, this.context, mergedAnalytics),
|
|
47
46
|
cache: sharedCache
|
|
48
47
|
};
|
|
49
48
|
return completeClient;
|
|
@@ -135,7 +135,7 @@ function validateInput(input, schema) {
|
|
|
135
135
|
if (!parse.success) {
|
|
136
136
|
validated = error({
|
|
137
137
|
type: "InvalidInput",
|
|
138
|
-
error: parse.error
|
|
138
|
+
error: JSON.stringify(z.flattenError(parse.error))
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
return validated;
|
|
@@ -150,7 +150,7 @@ function validateOutput(output, schema) {
|
|
|
150
150
|
if (!parse.success) {
|
|
151
151
|
validated = error({
|
|
152
152
|
type: "InvalidOutput",
|
|
153
|
-
error: parse.error
|
|
153
|
+
error: JSON.stringify(z.flattenError(parse.error))
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
}
|
package/initialization.js
CHANGED
|
@@ -13,7 +13,13 @@ function createInitialRequestContext() {
|
|
|
13
13
|
countyCode: "",
|
|
14
14
|
cityCode: ""
|
|
15
15
|
},
|
|
16
|
-
session: {
|
|
16
|
+
session: {
|
|
17
|
+
identityContext: {
|
|
18
|
+
identifier: { userId: "" },
|
|
19
|
+
lastUpdated: /* @__PURE__ */ new Date(),
|
|
20
|
+
personalizationKey: crypto.randomUUID()
|
|
21
|
+
}
|
|
22
|
+
},
|
|
17
23
|
correlationId: "",
|
|
18
24
|
isBot: false,
|
|
19
25
|
clientIp: "",
|
package/package.json
CHANGED
|
@@ -1,9 +1,70 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result)
|
|
9
|
+
__defProp(target, key, result);
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
1
12
|
import { BaseProvider } from "./base.provider.js";
|
|
13
|
+
import {
|
|
14
|
+
AnalyticsMutationSchema
|
|
15
|
+
} from "../schemas/index.js";
|
|
16
|
+
import { Reactionary } from "../decorators/reactionary.decorator.js";
|
|
2
17
|
class AnalyticsProvider extends BaseProvider {
|
|
3
18
|
getResourceName() {
|
|
4
19
|
return "analytics";
|
|
5
20
|
}
|
|
21
|
+
async track(event) {
|
|
22
|
+
switch (event.event) {
|
|
23
|
+
case "product-summary-view":
|
|
24
|
+
await this.processProductSummaryView(event);
|
|
25
|
+
break;
|
|
26
|
+
case "product-summary-click":
|
|
27
|
+
await this.processProductSummaryClick(event);
|
|
28
|
+
break;
|
|
29
|
+
case "product-details-view":
|
|
30
|
+
await this.processProductDetailsView(event);
|
|
31
|
+
break;
|
|
32
|
+
case "product-cart-add":
|
|
33
|
+
await this.processProductAddToCart(event);
|
|
34
|
+
break;
|
|
35
|
+
case "purchase":
|
|
36
|
+
await this.processPurchase(event);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async processProductSummaryView(event) {
|
|
41
|
+
}
|
|
42
|
+
async processProductSummaryClick(event) {
|
|
43
|
+
}
|
|
44
|
+
async processProductDetailsView(event) {
|
|
45
|
+
}
|
|
46
|
+
async processProductAddToCart(event) {
|
|
47
|
+
}
|
|
48
|
+
async processPurchase(event) {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
class MulticastAnalyticsProvider extends AnalyticsProvider {
|
|
52
|
+
constructor(cache, requestContext, providers) {
|
|
53
|
+
super(cache, requestContext);
|
|
54
|
+
this.providers = providers;
|
|
55
|
+
}
|
|
56
|
+
async track(event) {
|
|
57
|
+
for (const provider of this.providers) {
|
|
58
|
+
provider.track(event);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
6
61
|
}
|
|
62
|
+
__decorateClass([
|
|
63
|
+
Reactionary({
|
|
64
|
+
inputSchema: AnalyticsMutationSchema
|
|
65
|
+
})
|
|
66
|
+
], MulticastAnalyticsProvider.prototype, "track", 1);
|
|
7
67
|
export {
|
|
8
|
-
AnalyticsProvider
|
|
68
|
+
AnalyticsProvider,
|
|
69
|
+
MulticastAnalyticsProvider
|
|
9
70
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { CartIdentifierSchema,
|
|
2
|
+
import { CartIdentifierSchema, IdentityIdentifierSchema, OrderIdentifierSchema, OrderInventoryStatusSchema, OrderItemIdentifierSchema, OrderStatusSchema, ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
|
|
3
3
|
import { BaseModelSchema } from "./base.model.js";
|
|
4
4
|
import { AddressSchema } from "./profile.model.js";
|
|
5
5
|
import { ShippingMethodSchema } from "./shipping-method.model.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { AnalyticsMutationProductAddToCartEventSchema } from "./product-add-to-cart.mutation.js";
|
|
3
|
+
import { AnalyticsMutationProductDetailsViewEventSchema } from "./product-details-view.mutation.js";
|
|
4
|
+
import { AnalyticsMutationProductSummaryClickEventSchema } from "./product-summary-click.mutation.js";
|
|
5
|
+
import { AnalyticsMutationProductSummaryViewEventSchema } from "./product-summary-view.mutation.js";
|
|
6
|
+
import { AnalyticsMutationPurchaseEventSchema } from "./purchase.mutation.js";
|
|
7
|
+
const AnalyticsMutationSchema = z.discriminatedUnion("event", [
|
|
8
|
+
AnalyticsMutationProductSummaryViewEventSchema,
|
|
9
|
+
AnalyticsMutationProductSummaryClickEventSchema,
|
|
10
|
+
AnalyticsMutationProductDetailsViewEventSchema,
|
|
11
|
+
AnalyticsMutationProductAddToCartEventSchema,
|
|
12
|
+
AnalyticsMutationPurchaseEventSchema
|
|
13
|
+
]);
|
|
14
|
+
export * from "./product-add-to-cart.mutation.js";
|
|
15
|
+
export * from "./product-details-view.mutation.js";
|
|
16
|
+
export * from "./product-summary-click.mutation.js";
|
|
17
|
+
export * from "./product-summary-view.mutation.js";
|
|
18
|
+
export * from "./purchase.mutation.js";
|
|
19
|
+
export {
|
|
20
|
+
AnalyticsMutationSchema
|
|
21
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import {
|
|
3
|
+
ProductSearchIdentifierSchema,
|
|
4
|
+
ProductIdentifierSchema
|
|
5
|
+
} from "../../models/identifiers.model.js";
|
|
6
|
+
import { BaseMutationSchema } from "../base.mutation.js";
|
|
7
|
+
const AnalyticsMutationProductAddToCartEventSchema = BaseMutationSchema.extend({
|
|
8
|
+
event: z.literal("product-cart-add"),
|
|
9
|
+
source: z.discriminatedUnion("type", [
|
|
10
|
+
z.object({
|
|
11
|
+
type: z.literal("search"),
|
|
12
|
+
identifier: ProductSearchIdentifierSchema
|
|
13
|
+
})
|
|
14
|
+
]).optional(),
|
|
15
|
+
product: ProductIdentifierSchema
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
AnalyticsMutationProductAddToCartEventSchema
|
|
19
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { ProductIdentifierSchema } from "../../models/identifiers.model.js";
|
|
3
|
+
import { BaseMutationSchema } from "../base.mutation.js";
|
|
4
|
+
const AnalyticsMutationProductDetailsViewEventSchema = BaseMutationSchema.extend({
|
|
5
|
+
event: z.literal("product-details-view"),
|
|
6
|
+
product: ProductIdentifierSchema
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
AnalyticsMutationProductDetailsViewEventSchema
|
|
10
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ProductIdentifierSchema,
|
|
3
|
+
ProductSearchIdentifierSchema
|
|
4
|
+
} from "../../models/identifiers.model.js";
|
|
5
|
+
import { BaseMutationSchema } from "../base.mutation.js";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
const AnalyticsMutationProductSummaryClickEventSchema = BaseMutationSchema.extend({
|
|
8
|
+
event: z.literal("product-summary-click"),
|
|
9
|
+
product: ProductIdentifierSchema,
|
|
10
|
+
source: z.discriminatedUnion("type", [
|
|
11
|
+
z.object({
|
|
12
|
+
type: z.literal("search"),
|
|
13
|
+
identifier: ProductSearchIdentifierSchema
|
|
14
|
+
})
|
|
15
|
+
]).optional(),
|
|
16
|
+
position: z.number().min(0)
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
AnalyticsMutationProductSummaryClickEventSchema
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ProductIdentifierSchema,
|
|
3
|
+
ProductSearchIdentifierSchema
|
|
4
|
+
} from "../../models/identifiers.model.js";
|
|
5
|
+
import { BaseMutationSchema } from "../base.mutation.js";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
const AnalyticsMutationProductSummaryViewEventSchema = BaseMutationSchema.extend({
|
|
8
|
+
event: z.literal("product-summary-view"),
|
|
9
|
+
source: z.discriminatedUnion("type", [
|
|
10
|
+
z.object({
|
|
11
|
+
type: z.literal("search"),
|
|
12
|
+
identifier: ProductSearchIdentifierSchema
|
|
13
|
+
})
|
|
14
|
+
]).optional(),
|
|
15
|
+
products: z.array(ProductIdentifierSchema)
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
AnalyticsMutationProductSummaryViewEventSchema
|
|
19
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { BaseMutationSchema } from "../base.mutation.js";
|
|
3
|
+
import { OrderSchema } from "../../models/order.model.js";
|
|
4
|
+
const AnalyticsMutationPurchaseEventSchema = BaseMutationSchema.extend({
|
|
5
|
+
event: z.literal("purchase"),
|
|
6
|
+
order: OrderSchema
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
AnalyticsMutationPurchaseEventSchema
|
|
10
|
+
};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { WebStoreIdentifierSchema } from "./models/identifiers.model.js";
|
|
2
|
+
import { IdentityIdentifierSchema, WebStoreIdentifierSchema } from "./models/identifiers.model.js";
|
|
3
3
|
import { CurrencySchema } from "./models/currency.model.js";
|
|
4
4
|
const LanguageContextSchema = z.looseObject({
|
|
5
5
|
locale: z.string().default("en-US"),
|
|
6
6
|
currencyCode: CurrencySchema.default(() => CurrencySchema.parse({}))
|
|
7
7
|
});
|
|
8
|
-
const
|
|
8
|
+
const IdentityContextSchema = z.looseObject({
|
|
9
|
+
identifier: IdentityIdentifierSchema,
|
|
10
|
+
personalizationKey: z.string(),
|
|
11
|
+
lastUpdated: z.date()
|
|
12
|
+
});
|
|
13
|
+
const SessionSchema = z.record(z.string(), z.any()).and(z.object({
|
|
14
|
+
identityContext: IdentityContextSchema
|
|
15
|
+
}));
|
|
9
16
|
const TaxJurisdictionSchema = z.object({
|
|
10
17
|
countryCode: z.string().default("US"),
|
|
11
18
|
stateCode: z.string().default(""),
|
|
@@ -24,6 +31,7 @@ const RequestContextSchema = z.looseObject({
|
|
|
24
31
|
referrer: z.string().default("").describe("The referrer URL, if available.")
|
|
25
32
|
});
|
|
26
33
|
export {
|
|
34
|
+
IdentityContextSchema,
|
|
27
35
|
LanguageContextSchema,
|
|
28
36
|
RequestContextSchema,
|
|
29
37
|
SessionSchema,
|
package/src/client/client.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AnalyticsProvider } from "../providers/analytics.provider.js";
|
|
2
1
|
import type { ProductProvider } from "../providers/product.provider.js";
|
|
3
2
|
import type { ProductSearchProvider } from "../providers/product-search.provider.js";
|
|
4
3
|
import type { IdentityProvider } from '../providers/identity.provider.js';
|
|
@@ -7,7 +6,7 @@ import type { PriceProvider } from "../providers/price.provider.js";
|
|
|
7
6
|
import type { InventoryProvider } from "../providers/inventory.provider.js";
|
|
8
7
|
import type { Cache } from "../cache/cache.interface.js";
|
|
9
8
|
import type { CategoryProvider } from "../providers/category.provider.js";
|
|
10
|
-
import type { CheckoutProvider, OrderProvider, ProfileProvider, StoreProvider } from "../providers/index.js";
|
|
9
|
+
import type { AnalyticsProvider, CheckoutProvider, OrderProvider, ProfileProvider, StoreProvider } from "../providers/index.js";
|
|
11
10
|
import type { OrderSearchProvider } from "../providers/order-search.provider.js";
|
|
12
11
|
export interface Client {
|
|
13
12
|
product: ProductProvider;
|
|
@@ -16,7 +15,7 @@ export interface Client {
|
|
|
16
15
|
cache: Cache;
|
|
17
16
|
cart: CartProvider;
|
|
18
17
|
checkout: CheckoutProvider;
|
|
19
|
-
analytics:
|
|
18
|
+
analytics: AnalyticsProvider;
|
|
20
19
|
price: PriceProvider;
|
|
21
20
|
inventory: InventoryProvider;
|
|
22
21
|
category: CategoryProvider;
|
package/src/initialization.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RequestContext } from
|
|
1
|
+
import type { RequestContext } from './schemas/session.schema.js';
|
|
2
2
|
export declare function createInitialRequestContext(): RequestContext;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
import type { RequestContext } from '../schemas/session.schema.js';
|
|
1
2
|
import { BaseProvider } from './base.provider.js';
|
|
3
|
+
import type { Cache } from '../cache/cache.interface.js';
|
|
4
|
+
import { type AnalyticsMutation, type AnalyticsMutationProductAddToCartEvent, type AnalyticsMutationProductDetailsViewEvent, type AnalyticsMutationProductSummaryClickEvent, type AnalyticsMutationProductSummaryViewEvent, type AnalyticsMutationPurchaseEvent } from '../schemas/index.js';
|
|
2
5
|
export declare abstract class AnalyticsProvider extends BaseProvider {
|
|
3
6
|
protected getResourceName(): string;
|
|
7
|
+
track(event: AnalyticsMutation): Promise<void>;
|
|
8
|
+
protected processProductSummaryView(event: AnalyticsMutationProductSummaryViewEvent): Promise<void>;
|
|
9
|
+
protected processProductSummaryClick(event: AnalyticsMutationProductSummaryClickEvent): Promise<void>;
|
|
10
|
+
protected processProductDetailsView(event: AnalyticsMutationProductDetailsViewEvent): Promise<void>;
|
|
11
|
+
protected processProductAddToCart(event: AnalyticsMutationProductAddToCartEvent): Promise<void>;
|
|
12
|
+
protected processPurchase(event: AnalyticsMutationPurchaseEvent): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare class MulticastAnalyticsProvider extends AnalyticsProvider {
|
|
15
|
+
protected providers: Array<AnalyticsProvider>;
|
|
16
|
+
constructor(cache: Cache, requestContext: RequestContext, providers: Array<AnalyticsProvider>);
|
|
17
|
+
track(event: AnalyticsMutation): Promise<void>;
|
|
4
18
|
}
|
|
@@ -5,6 +5,9 @@ import type { CartMutationApplyCoupon, CartMutationChangeCurrency, CartMutationD
|
|
|
5
5
|
import type { CartQueryById } from "../schemas/queries/cart.query.js";
|
|
6
6
|
import type { Result } from "../schemas/result.js";
|
|
7
7
|
import { BaseProvider } from "./base.provider.js";
|
|
8
|
+
/**
|
|
9
|
+
* @group Providers
|
|
10
|
+
*/
|
|
8
11
|
export declare abstract class CartProvider extends BaseProvider {
|
|
9
12
|
/**
|
|
10
13
|
* Get cart by ID.
|
|
@@ -8,6 +8,7 @@ import { BaseProvider } from "./base.provider.js";
|
|
|
8
8
|
*
|
|
9
9
|
* We only allow fetching one hierachy level at a time, for now. This is to avoid development patterns of "fetch 5000 categories in one go.."
|
|
10
10
|
*
|
|
11
|
+
* @group Foo
|
|
11
12
|
*/
|
|
12
13
|
export declare abstract class CategoryProvider extends BaseProvider {
|
|
13
14
|
/**
|
|
@@ -2,6 +2,6 @@ import { z } from 'zod';
|
|
|
2
2
|
import type { InferType } from '../../zod-utils.js';
|
|
3
3
|
export declare const InvalidInputErrorSchema: z.ZodObject<{
|
|
4
4
|
type: z.ZodLiteral<"InvalidInput">;
|
|
5
|
-
error: z.
|
|
5
|
+
error: z.ZodString;
|
|
6
6
|
}, z.core.$loose>;
|
|
7
7
|
export type InvalidInputError = InferType<typeof InvalidInputErrorSchema>;
|
|
@@ -2,6 +2,6 @@ import { z } from 'zod';
|
|
|
2
2
|
import type { InferType } from '../../zod-utils.js';
|
|
3
3
|
export declare const InvalidOutputErrorSchema: z.ZodObject<{
|
|
4
4
|
type: z.ZodLiteral<"InvalidOutput">;
|
|
5
|
-
error: z.
|
|
5
|
+
error: z.ZodString;
|
|
6
6
|
}, z.core.$loose>;
|
|
7
7
|
export type InvalidOutputError = InferType<typeof InvalidOutputErrorSchema>;
|
|
@@ -128,6 +128,9 @@ export declare const ProductSearchIdentifierSchema: z.ZodObject<{
|
|
|
128
128
|
key: z.ZodString;
|
|
129
129
|
}, z.core.$strip>>;
|
|
130
130
|
}, z.core.$loose>;
|
|
131
|
+
/**
|
|
132
|
+
* Bar
|
|
133
|
+
*/
|
|
131
134
|
export declare const OrderSearchIdentifierSchema: z.ZodObject<{
|
|
132
135
|
term: z.ZodString;
|
|
133
136
|
partNumber: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -3102,7 +3102,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
3102
3102
|
key: z.ZodString;
|
|
3103
3103
|
}, z.core.$loose>>;
|
|
3104
3104
|
}, z.core.$loose>;
|
|
3105
|
-
export type OrderStatus =
|
|
3105
|
+
export type OrderStatus = z.infer<typeof OrderStatusSchema>;
|
|
3106
3106
|
export type OrderInventoryStatus = InferType<typeof OrderInventoryStatusSchema>;
|
|
3107
3107
|
export type OrderItem = InferType<typeof OrderItemSchema>;
|
|
3108
3108
|
export type Order = InferType<typeof OrderSchema>;
|