@reactionary/core 0.2.2 → 0.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactionary/core",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "dependencies": {
@@ -11,3 +11,4 @@ export * from "./profile.provider.js";
11
11
  export * from "./product-search.provider.js";
12
12
  export * from "./store.provider.js";
13
13
  export * from "./order.provider.js";
14
+ export * from "./order-search.provider.js";
@@ -0,0 +1,9 @@
1
+ import { BaseProvider } from "./base.provider.js";
2
+ class OrderSearchProvider extends BaseProvider {
3
+ getResourceName() {
4
+ return "order-search";
5
+ }
6
+ }
7
+ export {
8
+ OrderSearchProvider
9
+ };
@@ -7,6 +7,7 @@ const CapabilitiesSchema = z.looseObject({
7
7
  cart: z.boolean(),
8
8
  checkout: z.boolean(),
9
9
  order: z.boolean(),
10
+ orderSearch: z.boolean(),
10
11
  inventory: z.boolean(),
11
12
  price: z.boolean(),
12
13
  category: z.boolean(),
@@ -1,5 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { PaginationOptionsSchema } from "./base.model.js";
3
+ const OrderStatusSchema = z.enum(["AwaitingPayment", "ReleasedToFulfillment", "Shipped", "Cancelled"]).describe("The current status of the order.");
4
+ const OrderInventoryStatusSchema = z.enum(["NotAllocated", "Allocated", "Backordered", "Preordered"]).describe("The inventory release status of the order.");
3
5
  const FacetIdentifierSchema = z.looseObject({
4
6
  key: z.string()
5
7
  });
@@ -90,6 +92,16 @@ const ProductSearchIdentifierSchema = z.looseObject({
90
92
  paginationOptions: PaginationOptionsSchema.describe("Pagination options for the search results."),
91
93
  categoryFilter: FacetValueIdentifierSchema.optional().describe("An optional category filter applied to the search results.")
92
94
  });
95
+ const OrderSearchIdentifierSchema = z.looseObject({
96
+ term: z.string().describe("The search term used to find orders. Not all providers may support term-based search for orders."),
97
+ partNumber: z.array(z.string()).optional().describe("An optional list part number to filter orders by specific products. Will be ANDed together."),
98
+ orderStatus: z.array(OrderStatusSchema).optional().describe("An optional list of order statuses to filter the search results."),
99
+ userId: IdentityIdentifierSchema.optional().describe("An optional user ID to filter orders by specific users. Mostly for b2b usecases with hierachial order access"),
100
+ startDate: z.string().optional().describe("An optional start date to filter orders from a specific date onwards. ISO8601"),
101
+ endDate: z.string().optional().describe("An optional end date to filter orders up to a specific date. ISO8601"),
102
+ filters: z.array(z.string()).describe("Additional filters applied to the search results."),
103
+ paginationOptions: PaginationOptionsSchema.describe("Pagination options for the search results.")
104
+ });
93
105
  export {
94
106
  AddressIdentifierSchema,
95
107
  CartIdentifierSchema,
@@ -103,7 +115,10 @@ export {
103
115
  IdentityIdentifierSchema,
104
116
  InventoryIdentifierSchema,
105
117
  OrderIdentifierSchema,
118
+ OrderInventoryStatusSchema,
106
119
  OrderItemIdentifierSchema,
120
+ OrderSearchIdentifierSchema,
121
+ OrderStatusSchema,
107
122
  PaymentInstructionIdentifierSchema,
108
123
  PaymentMethodIdentifierSchema,
109
124
  PickupPointIdentifierSchema,
@@ -17,3 +17,4 @@ export * from "./order.model.js";
17
17
  export * from "./cost.model.js";
18
18
  export * from "./checkout.model.js";
19
19
  export * from "./payment.model.js";
20
+ export * from "./order-search.model.js";
@@ -0,0 +1,22 @@
1
+ import z from "zod";
2
+ import { BaseModelSchema, createPaginatedResponseSchema } from "./base.model.js";
3
+ import { IdentityIdentifierSchema, OrderIdentifierSchema, OrderInventoryStatusSchema, OrderSearchIdentifierSchema, OrderStatusSchema } from "./identifiers.model.js";
4
+ import { MonetaryAmountSchema } from "./price.model.js";
5
+ import { AddressSchema } from "./profile.model.js";
6
+ const OrderSearchResultItemSchema = BaseModelSchema.extend({
7
+ identifier: OrderIdentifierSchema,
8
+ userId: IdentityIdentifierSchema,
9
+ customerName: z.string(),
10
+ shippingAddress: AddressSchema.optional(),
11
+ orderDate: z.string(),
12
+ orderStatus: OrderStatusSchema,
13
+ inventoryStatus: OrderInventoryStatusSchema,
14
+ totalAmount: MonetaryAmountSchema
15
+ });
16
+ const OrderSearchResultSchema = createPaginatedResponseSchema(OrderSearchResultItemSchema).extend({
17
+ identifier: OrderSearchIdentifierSchema
18
+ });
19
+ export {
20
+ OrderSearchResultItemSchema,
21
+ OrderSearchResultSchema
22
+ };
@@ -1,21 +1,19 @@
1
1
  import { z } from "zod";
2
- import { CartIdentifierSchema, CartItemIdentifierSchema, IdentityIdentifierSchema, ProductVariantIdentifierSchema } from "../models/identifiers.model.js";
2
+ import { CartIdentifierSchema, CartItemIdentifierSchema, 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";
6
6
  import { CostBreakDownSchema, ItemCostBreakdownSchema } from "./cost.model.js";
7
7
  import { PaymentInstructionSchema } from "./payment.model.js";
8
- const OrderStatusSchema = z.enum(["AwaitingPayment", "ReleasedToFulfillment", "Shipped", "Cancelled"]).describe("The current status of the order.");
9
- const OrderInventoryStatusSchema = z.enum(["NotAllocated", "Allocated", "Backordered", "Preordered"]).describe("The inventory release status of the order.");
10
8
  const OrderItemSchema = z.looseObject({
11
- identifier: CartItemIdentifierSchema,
9
+ identifier: OrderItemIdentifierSchema,
12
10
  variant: ProductVariantIdentifierSchema,
13
11
  quantity: z.number(),
14
12
  price: ItemCostBreakdownSchema,
15
13
  inventoryStatus: OrderInventoryStatusSchema.describe("The inventory release status of the order item.")
16
14
  });
17
15
  const OrderSchema = BaseModelSchema.extend({
18
- identifier: CartIdentifierSchema,
16
+ identifier: OrderIdentifierSchema,
19
17
  userId: IdentityIdentifierSchema,
20
18
  items: z.array(OrderItemSchema),
21
19
  price: CostBreakDownSchema,
@@ -30,8 +28,6 @@ const OrderSchema = BaseModelSchema.extend({
30
28
  cartReference: CartIdentifierSchema.optional().describe("Reference to the cart from which this order was created.")
31
29
  });
32
30
  export {
33
- OrderInventoryStatusSchema,
34
31
  OrderItemSchema,
35
- OrderSchema,
36
- OrderStatusSchema
32
+ OrderSchema
37
33
  };
@@ -11,3 +11,4 @@ export * from "./product-search.query.js";
11
11
  export * from "./store.query.js";
12
12
  export * from "./order.query.js";
13
13
  export * from "./checkout.query.js";
14
+ export * from "./order-search.query.js";
@@ -0,0 +1,8 @@
1
+ import { OrderSearchIdentifierSchema } from "../models/identifiers.model.js";
2
+ import { BaseQuerySchema } from "./base.query.js";
3
+ const OrderSearchQueryByTermSchema = BaseQuerySchema.extend({
4
+ search: OrderSearchIdentifierSchema
5
+ });
6
+ export {
7
+ OrderSearchQueryByTermSchema
8
+ };
@@ -8,6 +8,7 @@ import type { InventoryProvider } from "../providers/inventory.provider.js";
8
8
  import type { Cache } from "../cache/cache.interface.js";
9
9
  import type { CategoryProvider } from "../providers/category.provider.js";
10
10
  import type { CheckoutProvider, OrderProvider, ProfileProvider, StoreProvider } from "../providers/index.js";
11
+ import type { OrderSearchProvider } from "../providers/order-search.provider.js";
11
12
  export interface Client {
12
13
  product: ProductProvider;
13
14
  productSearch: ProductSearchProvider;
@@ -22,4 +23,5 @@ export interface Client {
22
23
  profile: ProfileProvider;
23
24
  store: StoreProvider;
24
25
  order: OrderProvider;
26
+ orderSearch: OrderSearchProvider;
25
27
  }
@@ -11,3 +11,4 @@ export * from './profile.provider.js';
11
11
  export * from './product-search.provider.js';
12
12
  export * from './store.provider.js';
13
13
  export * from './order.provider.js';
14
+ export * from './order-search.provider.js';
@@ -0,0 +1,21 @@
1
+ import type { OrderSearchResult } from "../schemas/models/order-search.model.js";
2
+ import type { OrderSearchQueryByTerm } from "../schemas/queries/order-search.query.js";
3
+ import type { Result } from "../schemas/result.js";
4
+ import { BaseProvider } from "./base.provider.js";
5
+ /**
6
+ * This provider handles order search operations. In some situations you may have different providers for order history listing and detail retrieval.
7
+ * The order search is primarily focused on searching and listing orders based on various criteria, and returns only summary information about each order.
8
+ *
9
+ * Usecase: An e-commerce platform wants to provide customers with a way to search through their past orders using filters like date range, order status, or total amount spent.
10
+ */
11
+ export declare abstract class OrderSearchProvider extends BaseProvider {
12
+ protected getResourceName(): string;
13
+ /**
14
+ * Queries orders based on the provided search criteria.
15
+ *
16
+ * Usecase: A customer is in the My Account section, and wants to search for orders placed within the last month that are marked as "shipped".
17
+ * Usecase: A widget on the frontpage after login, shows the last 5 orders placed by the customer.
18
+ * @param payload The search criteria for querying orders.
19
+ */
20
+ abstract queryByTerm(payload: OrderSearchQueryByTerm): Promise<Result<OrderSearchResult>>;
21
+ }
@@ -9,6 +9,7 @@ export declare const CapabilitiesSchema: z.ZodObject<{
9
9
  cart: z.ZodBoolean;
10
10
  checkout: z.ZodBoolean;
11
11
  order: z.ZodBoolean;
12
+ orderSearch: z.ZodBoolean;
12
13
  inventory: z.ZodBoolean;
13
14
  price: z.ZodBoolean;
14
15
  category: z.ZodBoolean;
@@ -1,5 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  import type { InferType } from '../../zod-utils.js';
3
+ export declare const OrderStatusSchema: z.ZodEnum<{
4
+ AwaitingPayment: "AwaitingPayment";
5
+ ReleasedToFulfillment: "ReleasedToFulfillment";
6
+ Shipped: "Shipped";
7
+ Cancelled: "Cancelled";
8
+ }>;
9
+ export declare const OrderInventoryStatusSchema: z.ZodEnum<{
10
+ NotAllocated: "NotAllocated";
11
+ Allocated: "Allocated";
12
+ Backordered: "Backordered";
13
+ Preordered: "Preordered";
14
+ }>;
3
15
  export declare const FacetIdentifierSchema: z.ZodObject<{
4
16
  key: z.ZodString;
5
17
  }, z.core.$loose>;
@@ -116,6 +128,27 @@ export declare const ProductSearchIdentifierSchema: z.ZodObject<{
116
128
  key: z.ZodString;
117
129
  }, z.core.$strip>>;
118
130
  }, z.core.$loose>;
131
+ export declare const OrderSearchIdentifierSchema: z.ZodObject<{
132
+ term: z.ZodString;
133
+ partNumber: z.ZodOptional<z.ZodArray<z.ZodString>>;
134
+ orderStatus: z.ZodOptional<z.ZodArray<z.ZodEnum<{
135
+ AwaitingPayment: "AwaitingPayment";
136
+ ReleasedToFulfillment: "ReleasedToFulfillment";
137
+ Shipped: "Shipped";
138
+ Cancelled: "Cancelled";
139
+ }>>>;
140
+ userId: z.ZodOptional<z.ZodObject<{
141
+ userId: z.ZodString;
142
+ }, z.core.$loose>>;
143
+ startDate: z.ZodOptional<z.ZodString>;
144
+ endDate: z.ZodOptional<z.ZodString>;
145
+ filters: z.ZodArray<z.ZodString>;
146
+ paginationOptions: z.ZodObject<{
147
+ pageNumber: z.ZodDefault<z.ZodNumber>;
148
+ pageSize: z.ZodDefault<z.ZodNumber>;
149
+ }, z.core.$loose>;
150
+ }, z.core.$loose>;
151
+ export type OrderSearchIdentifier = InferType<typeof OrderSearchIdentifierSchema>;
119
152
  export type ProductIdentifier = InferType<typeof ProductIdentifierSchema>;
120
153
  export type ProductVariantIdentifier = InferType<typeof ProductVariantIdentifierSchema>;
121
154
  export type SearchIdentifier = InferType<typeof ProductSearchIdentifierSchema>;
@@ -17,3 +17,4 @@ export * from './order.model.js';
17
17
  export * from './cost.model.js';
18
18
  export * from './checkout.model.js';
19
19
  export * from './payment.model.js';
20
+ export * from './order-search.model.js';
@@ -0,0 +1,472 @@
1
+ import z from "zod";
2
+ import type { InferType } from "../../zod-utils.js";
3
+ export declare const OrderSearchResultItemSchema: z.ZodObject<{
4
+ identifier: z.ZodObject<{
5
+ key: z.ZodString;
6
+ }, z.z.core.$loose>;
7
+ userId: z.ZodObject<{
8
+ userId: z.ZodString;
9
+ }, z.z.core.$loose>;
10
+ customerName: z.ZodString;
11
+ shippingAddress: z.ZodOptional<z.ZodObject<{
12
+ identifier: z.ZodDefault<z.ZodObject<{
13
+ nickName: z.ZodString;
14
+ }, z.z.core.$loose>>;
15
+ firstName: z.ZodString;
16
+ lastName: z.ZodString;
17
+ streetAddress: z.ZodString;
18
+ streetNumber: z.ZodString;
19
+ city: z.ZodString;
20
+ region: z.ZodString;
21
+ postalCode: z.ZodString;
22
+ countryCode: z.ZodString;
23
+ }, z.z.core.$loose>>;
24
+ orderDate: z.ZodString;
25
+ orderStatus: z.ZodEnum<{
26
+ AwaitingPayment: "AwaitingPayment";
27
+ ReleasedToFulfillment: "ReleasedToFulfillment";
28
+ Shipped: "Shipped";
29
+ Cancelled: "Cancelled";
30
+ }>;
31
+ inventoryStatus: z.ZodEnum<{
32
+ NotAllocated: "NotAllocated";
33
+ Allocated: "Allocated";
34
+ Backordered: "Backordered";
35
+ Preordered: "Preordered";
36
+ }>;
37
+ totalAmount: z.ZodObject<{
38
+ value: z.ZodNumber;
39
+ currency: z.ZodEnum<{
40
+ AED: "AED";
41
+ AFN: "AFN";
42
+ ALL: "ALL";
43
+ AMD: "AMD";
44
+ ANG: "ANG";
45
+ AOA: "AOA";
46
+ ARS: "ARS";
47
+ AUD: "AUD";
48
+ AWG: "AWG";
49
+ AZN: "AZN";
50
+ BAM: "BAM";
51
+ BBD: "BBD";
52
+ BDT: "BDT";
53
+ BGN: "BGN";
54
+ BHD: "BHD";
55
+ BIF: "BIF";
56
+ BMD: "BMD";
57
+ BND: "BND";
58
+ BOB: "BOB";
59
+ BOV: "BOV";
60
+ BRL: "BRL";
61
+ BSD: "BSD";
62
+ BTN: "BTN";
63
+ BWP: "BWP";
64
+ BYN: "BYN";
65
+ BZD: "BZD";
66
+ CAD: "CAD";
67
+ CDF: "CDF";
68
+ CHE: "CHE";
69
+ CHF: "CHF";
70
+ CHW: "CHW";
71
+ CLF: "CLF";
72
+ CLP: "CLP";
73
+ CNY: "CNY";
74
+ COP: "COP";
75
+ COU: "COU";
76
+ CRC: "CRC";
77
+ CUC: "CUC";
78
+ CUP: "CUP";
79
+ CVE: "CVE";
80
+ CZK: "CZK";
81
+ DJF: "DJF";
82
+ DKK: "DKK";
83
+ DOP: "DOP";
84
+ DZD: "DZD";
85
+ EGP: "EGP";
86
+ ERN: "ERN";
87
+ ETB: "ETB";
88
+ EUR: "EUR";
89
+ FJD: "FJD";
90
+ FKP: "FKP";
91
+ GBP: "GBP";
92
+ GEL: "GEL";
93
+ GHS: "GHS";
94
+ GIP: "GIP";
95
+ GMD: "GMD";
96
+ GNF: "GNF";
97
+ GTQ: "GTQ";
98
+ GYD: "GYD";
99
+ HKD: "HKD";
100
+ HNL: "HNL";
101
+ HRK: "HRK";
102
+ HTG: "HTG";
103
+ HUF: "HUF";
104
+ IDR: "IDR";
105
+ ILS: "ILS";
106
+ INR: "INR";
107
+ IQD: "IQD";
108
+ IRR: "IRR";
109
+ ISK: "ISK";
110
+ JMD: "JMD";
111
+ JOD: "JOD";
112
+ JPY: "JPY";
113
+ KES: "KES";
114
+ KGS: "KGS";
115
+ KHR: "KHR";
116
+ KMF: "KMF";
117
+ KPW: "KPW";
118
+ KRW: "KRW";
119
+ KWD: "KWD";
120
+ KYD: "KYD";
121
+ KZT: "KZT";
122
+ LAK: "LAK";
123
+ LBP: "LBP";
124
+ LKR: "LKR";
125
+ LRD: "LRD";
126
+ LSL: "LSL";
127
+ LYD: "LYD";
128
+ MAD: "MAD";
129
+ MDL: "MDL";
130
+ MGA: "MGA";
131
+ MKD: "MKD";
132
+ MMK: "MMK";
133
+ MNT: "MNT";
134
+ MOP: "MOP";
135
+ MRU: "MRU";
136
+ MUR: "MUR";
137
+ MVR: "MVR";
138
+ MWK: "MWK";
139
+ MXN: "MXN";
140
+ MXV: "MXV";
141
+ MYR: "MYR";
142
+ MZN: "MZN";
143
+ NAD: "NAD";
144
+ NGN: "NGN";
145
+ NIO: "NIO";
146
+ NOK: "NOK";
147
+ NPR: "NPR";
148
+ NZD: "NZD";
149
+ OMR: "OMR";
150
+ PAB: "PAB";
151
+ PEN: "PEN";
152
+ PGK: "PGK";
153
+ PHP: "PHP";
154
+ PKR: "PKR";
155
+ PLN: "PLN";
156
+ PYG: "PYG";
157
+ QAR: "QAR";
158
+ RON: "RON";
159
+ RSD: "RSD";
160
+ RUB: "RUB";
161
+ RWF: "RWF";
162
+ SAR: "SAR";
163
+ SBD: "SBD";
164
+ SCR: "SCR";
165
+ SDG: "SDG";
166
+ SEK: "SEK";
167
+ SGD: "SGD";
168
+ SHP: "SHP";
169
+ SLE: "SLE";
170
+ SLL: "SLL";
171
+ SOS: "SOS";
172
+ SRD: "SRD";
173
+ SSP: "SSP";
174
+ STN: "STN";
175
+ SYP: "SYP";
176
+ SZL: "SZL";
177
+ THB: "THB";
178
+ TJS: "TJS";
179
+ TMT: "TMT";
180
+ TND: "TND";
181
+ TOP: "TOP";
182
+ TRY: "TRY";
183
+ TTD: "TTD";
184
+ TVD: "TVD";
185
+ TWD: "TWD";
186
+ TZS: "TZS";
187
+ UAH: "UAH";
188
+ UGX: "UGX";
189
+ USD: "USD";
190
+ USN: "USN";
191
+ UYI: "UYI";
192
+ UYU: "UYU";
193
+ UYW: "UYW";
194
+ UZS: "UZS";
195
+ VED: "VED";
196
+ VES: "VES";
197
+ VND: "VND";
198
+ VUV: "VUV";
199
+ WST: "WST";
200
+ XAF: "XAF";
201
+ XAG: "XAG";
202
+ XAU: "XAU";
203
+ XBA: "XBA";
204
+ XBB: "XBB";
205
+ XBC: "XBC";
206
+ XBD: "XBD";
207
+ XCD: "XCD";
208
+ XDR: "XDR";
209
+ XOF: "XOF";
210
+ XPD: "XPD";
211
+ XPF: "XPF";
212
+ XPT: "XPT";
213
+ XSU: "XSU";
214
+ XTS: "XTS";
215
+ XUA: "XUA";
216
+ XXX: "XXX";
217
+ YER: "YER";
218
+ ZAR: "ZAR";
219
+ ZMW: "ZMW";
220
+ ZWL: "ZWL";
221
+ }>;
222
+ }, z.z.core.$loose>;
223
+ }, z.z.core.$loose>;
224
+ export declare const OrderSearchResultSchema: z.ZodObject<{
225
+ pageNumber: z.ZodNumber;
226
+ pageSize: z.ZodNumber;
227
+ totalCount: z.ZodNumber;
228
+ totalPages: z.ZodNumber;
229
+ items: z.ZodArray<z.ZodObject<{
230
+ identifier: z.ZodObject<{
231
+ key: z.ZodString;
232
+ }, z.z.core.$loose>;
233
+ userId: z.ZodObject<{
234
+ userId: z.ZodString;
235
+ }, z.z.core.$loose>;
236
+ customerName: z.ZodString;
237
+ shippingAddress: z.ZodOptional<z.ZodObject<{
238
+ identifier: z.ZodDefault<z.ZodObject<{
239
+ nickName: z.ZodString;
240
+ }, z.z.core.$loose>>;
241
+ firstName: z.ZodString;
242
+ lastName: z.ZodString;
243
+ streetAddress: z.ZodString;
244
+ streetNumber: z.ZodString;
245
+ city: z.ZodString;
246
+ region: z.ZodString;
247
+ postalCode: z.ZodString;
248
+ countryCode: z.ZodString;
249
+ }, z.z.core.$loose>>;
250
+ orderDate: z.ZodString;
251
+ orderStatus: z.ZodEnum<{
252
+ AwaitingPayment: "AwaitingPayment";
253
+ ReleasedToFulfillment: "ReleasedToFulfillment";
254
+ Shipped: "Shipped";
255
+ Cancelled: "Cancelled";
256
+ }>;
257
+ inventoryStatus: z.ZodEnum<{
258
+ NotAllocated: "NotAllocated";
259
+ Allocated: "Allocated";
260
+ Backordered: "Backordered";
261
+ Preordered: "Preordered";
262
+ }>;
263
+ totalAmount: z.ZodObject<{
264
+ value: z.ZodNumber;
265
+ currency: z.ZodEnum<{
266
+ AED: "AED";
267
+ AFN: "AFN";
268
+ ALL: "ALL";
269
+ AMD: "AMD";
270
+ ANG: "ANG";
271
+ AOA: "AOA";
272
+ ARS: "ARS";
273
+ AUD: "AUD";
274
+ AWG: "AWG";
275
+ AZN: "AZN";
276
+ BAM: "BAM";
277
+ BBD: "BBD";
278
+ BDT: "BDT";
279
+ BGN: "BGN";
280
+ BHD: "BHD";
281
+ BIF: "BIF";
282
+ BMD: "BMD";
283
+ BND: "BND";
284
+ BOB: "BOB";
285
+ BOV: "BOV";
286
+ BRL: "BRL";
287
+ BSD: "BSD";
288
+ BTN: "BTN";
289
+ BWP: "BWP";
290
+ BYN: "BYN";
291
+ BZD: "BZD";
292
+ CAD: "CAD";
293
+ CDF: "CDF";
294
+ CHE: "CHE";
295
+ CHF: "CHF";
296
+ CHW: "CHW";
297
+ CLF: "CLF";
298
+ CLP: "CLP";
299
+ CNY: "CNY";
300
+ COP: "COP";
301
+ COU: "COU";
302
+ CRC: "CRC";
303
+ CUC: "CUC";
304
+ CUP: "CUP";
305
+ CVE: "CVE";
306
+ CZK: "CZK";
307
+ DJF: "DJF";
308
+ DKK: "DKK";
309
+ DOP: "DOP";
310
+ DZD: "DZD";
311
+ EGP: "EGP";
312
+ ERN: "ERN";
313
+ ETB: "ETB";
314
+ EUR: "EUR";
315
+ FJD: "FJD";
316
+ FKP: "FKP";
317
+ GBP: "GBP";
318
+ GEL: "GEL";
319
+ GHS: "GHS";
320
+ GIP: "GIP";
321
+ GMD: "GMD";
322
+ GNF: "GNF";
323
+ GTQ: "GTQ";
324
+ GYD: "GYD";
325
+ HKD: "HKD";
326
+ HNL: "HNL";
327
+ HRK: "HRK";
328
+ HTG: "HTG";
329
+ HUF: "HUF";
330
+ IDR: "IDR";
331
+ ILS: "ILS";
332
+ INR: "INR";
333
+ IQD: "IQD";
334
+ IRR: "IRR";
335
+ ISK: "ISK";
336
+ JMD: "JMD";
337
+ JOD: "JOD";
338
+ JPY: "JPY";
339
+ KES: "KES";
340
+ KGS: "KGS";
341
+ KHR: "KHR";
342
+ KMF: "KMF";
343
+ KPW: "KPW";
344
+ KRW: "KRW";
345
+ KWD: "KWD";
346
+ KYD: "KYD";
347
+ KZT: "KZT";
348
+ LAK: "LAK";
349
+ LBP: "LBP";
350
+ LKR: "LKR";
351
+ LRD: "LRD";
352
+ LSL: "LSL";
353
+ LYD: "LYD";
354
+ MAD: "MAD";
355
+ MDL: "MDL";
356
+ MGA: "MGA";
357
+ MKD: "MKD";
358
+ MMK: "MMK";
359
+ MNT: "MNT";
360
+ MOP: "MOP";
361
+ MRU: "MRU";
362
+ MUR: "MUR";
363
+ MVR: "MVR";
364
+ MWK: "MWK";
365
+ MXN: "MXN";
366
+ MXV: "MXV";
367
+ MYR: "MYR";
368
+ MZN: "MZN";
369
+ NAD: "NAD";
370
+ NGN: "NGN";
371
+ NIO: "NIO";
372
+ NOK: "NOK";
373
+ NPR: "NPR";
374
+ NZD: "NZD";
375
+ OMR: "OMR";
376
+ PAB: "PAB";
377
+ PEN: "PEN";
378
+ PGK: "PGK";
379
+ PHP: "PHP";
380
+ PKR: "PKR";
381
+ PLN: "PLN";
382
+ PYG: "PYG";
383
+ QAR: "QAR";
384
+ RON: "RON";
385
+ RSD: "RSD";
386
+ RUB: "RUB";
387
+ RWF: "RWF";
388
+ SAR: "SAR";
389
+ SBD: "SBD";
390
+ SCR: "SCR";
391
+ SDG: "SDG";
392
+ SEK: "SEK";
393
+ SGD: "SGD";
394
+ SHP: "SHP";
395
+ SLE: "SLE";
396
+ SLL: "SLL";
397
+ SOS: "SOS";
398
+ SRD: "SRD";
399
+ SSP: "SSP";
400
+ STN: "STN";
401
+ SYP: "SYP";
402
+ SZL: "SZL";
403
+ THB: "THB";
404
+ TJS: "TJS";
405
+ TMT: "TMT";
406
+ TND: "TND";
407
+ TOP: "TOP";
408
+ TRY: "TRY";
409
+ TTD: "TTD";
410
+ TVD: "TVD";
411
+ TWD: "TWD";
412
+ TZS: "TZS";
413
+ UAH: "UAH";
414
+ UGX: "UGX";
415
+ USD: "USD";
416
+ USN: "USN";
417
+ UYI: "UYI";
418
+ UYU: "UYU";
419
+ UYW: "UYW";
420
+ UZS: "UZS";
421
+ VED: "VED";
422
+ VES: "VES";
423
+ VND: "VND";
424
+ VUV: "VUV";
425
+ WST: "WST";
426
+ XAF: "XAF";
427
+ XAG: "XAG";
428
+ XAU: "XAU";
429
+ XBA: "XBA";
430
+ XBB: "XBB";
431
+ XBC: "XBC";
432
+ XBD: "XBD";
433
+ XCD: "XCD";
434
+ XDR: "XDR";
435
+ XOF: "XOF";
436
+ XPD: "XPD";
437
+ XPF: "XPF";
438
+ XPT: "XPT";
439
+ XSU: "XSU";
440
+ XTS: "XTS";
441
+ XUA: "XUA";
442
+ XXX: "XXX";
443
+ YER: "YER";
444
+ ZAR: "ZAR";
445
+ ZMW: "ZMW";
446
+ ZWL: "ZWL";
447
+ }>;
448
+ }, z.z.core.$loose>;
449
+ }, z.z.core.$loose>>;
450
+ identifier: z.ZodObject<{
451
+ term: z.ZodString;
452
+ partNumber: z.ZodOptional<z.ZodArray<z.ZodString>>;
453
+ orderStatus: z.ZodOptional<z.ZodArray<z.ZodEnum<{
454
+ AwaitingPayment: "AwaitingPayment";
455
+ ReleasedToFulfillment: "ReleasedToFulfillment";
456
+ Shipped: "Shipped";
457
+ Cancelled: "Cancelled";
458
+ }>>>;
459
+ userId: z.ZodOptional<z.ZodObject<{
460
+ userId: z.ZodString;
461
+ }, z.z.core.$loose>>;
462
+ startDate: z.ZodOptional<z.ZodString>;
463
+ endDate: z.ZodOptional<z.ZodString>;
464
+ filters: z.ZodArray<z.ZodString>;
465
+ paginationOptions: z.ZodObject<{
466
+ pageNumber: z.ZodDefault<z.ZodNumber>;
467
+ pageSize: z.ZodDefault<z.ZodNumber>;
468
+ }, z.z.core.$loose>;
469
+ }, z.z.core.$loose>;
470
+ }, z.z.core.$strip>;
471
+ export type OrderSearchResult = InferType<typeof OrderSearchResultSchema>;
472
+ export type OrderSearchResultItem = InferType<typeof OrderSearchResultItemSchema>;
@@ -1,17 +1,6 @@
1
1
  import { z } from 'zod';
2
+ import { OrderInventoryStatusSchema, OrderStatusSchema } from '../models/identifiers.model.js';
2
3
  import type { InferType } from '../../zod-utils.js';
3
- export declare const OrderStatusSchema: z.ZodEnum<{
4
- AwaitingPayment: "AwaitingPayment";
5
- ReleasedToFulfillment: "ReleasedToFulfillment";
6
- Shipped: "Shipped";
7
- Cancelled: "Cancelled";
8
- }>;
9
- export declare const OrderInventoryStatusSchema: z.ZodEnum<{
10
- NotAllocated: "NotAllocated";
11
- Allocated: "Allocated";
12
- Backordered: "Backordered";
13
- Preordered: "Preordered";
14
- }>;
15
4
  export declare const OrderItemSchema: z.ZodObject<{
16
5
  identifier: z.ZodObject<{
17
6
  key: z.ZodString;
@@ -11,3 +11,4 @@ export * from './product-search.query.js';
11
11
  export * from './store.query.js';
12
12
  export * from './order.query.js';
13
13
  export * from './checkout.query.js';
14
+ export * from './order-search.query.js';
@@ -0,0 +1,24 @@
1
+ import type { InferType } from "../../zod-utils.js";
2
+ export declare const OrderSearchQueryByTermSchema: import("zod").ZodObject<{
3
+ search: import("zod").ZodObject<{
4
+ term: import("zod").ZodString;
5
+ partNumber: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
6
+ orderStatus: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
7
+ AwaitingPayment: "AwaitingPayment";
8
+ ReleasedToFulfillment: "ReleasedToFulfillment";
9
+ Shipped: "Shipped";
10
+ Cancelled: "Cancelled";
11
+ }>>>;
12
+ userId: import("zod").ZodOptional<import("zod").ZodObject<{
13
+ userId: import("zod").ZodString;
14
+ }, import("zod/v4/core").$loose>>;
15
+ startDate: import("zod").ZodOptional<import("zod").ZodString>;
16
+ endDate: import("zod").ZodOptional<import("zod").ZodString>;
17
+ filters: import("zod").ZodArray<import("zod").ZodString>;
18
+ paginationOptions: import("zod").ZodObject<{
19
+ pageNumber: import("zod").ZodDefault<import("zod").ZodNumber>;
20
+ pageSize: import("zod").ZodDefault<import("zod").ZodNumber>;
21
+ }, import("zod/v4/core").$loose>;
22
+ }, import("zod/v4/core").$loose>;
23
+ }, import("zod/v4/core").$loose>;
24
+ export type OrderSearchQueryByTerm = InferType<typeof OrderSearchQueryByTermSchema>;