@heavybit/ecommerce-contracts 0.3.21 → 0.3.22
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/dist/cjs/internal/index.js +1 -0
- package/dist/cjs/internal/index.js.map +1 -1
- package/dist/cjs/internal/search.js +32 -0
- package/dist/cjs/internal/search.js.map +1 -0
- package/dist/esm/internal/index.js +1 -0
- package/dist/esm/internal/index.js.map +1 -1
- package/dist/esm/internal/search.js +29 -0
- package/dist/esm/internal/search.js.map +1 -0
- package/dist/types/internal/index.d.ts +1 -0
- package/dist/types/internal/index.d.ts.map +1 -1
- package/dist/types/internal/search.d.ts +270 -0
- package/dist/types/internal/search.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./catalog.js"), exports);
|
|
18
18
|
__exportStar(require("./reviews.js"), exports);
|
|
19
19
|
__exportStar(require("./moderation.js"), exports);
|
|
20
|
+
__exportStar(require("./search.js"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,kDAAgC;AAChC,8CAA4B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchDocumentPageSchema = exports.searchDocumentLookupSchema = exports.searchDocumentSchema = exports.MAX_SEARCH_DOCUMENT_PAGE = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Internal answers catalog-service gives search-service so it can build and rebuild its index (Prompt 26.1): one product
|
|
6
|
+
* as a flat search document, and pages of them. Only sellable products of active shops are ever returned.
|
|
7
|
+
*/
|
|
8
|
+
const shared_lib_1 = require("@heavybit/shared-lib");
|
|
9
|
+
/** Most documents one page of `GET /internal/search-documents` holds. */
|
|
10
|
+
exports.MAX_SEARCH_DOCUMENT_PAGE = 200;
|
|
11
|
+
/**
|
|
12
|
+
* One indexable product. `priceCents` is the lowest price a shopper pays now, in minor units (KES cents), with any running
|
|
13
|
+
* campaign applied (CHK-7), so the engine can filter and sort by an integer; the API money type stays a decimal string (D5).
|
|
14
|
+
* `rating` is the average (0 when unrated).
|
|
15
|
+
*/
|
|
16
|
+
exports.searchDocumentSchema = shared_lib_1.z.object({
|
|
17
|
+
id: shared_lib_1.idSchema,
|
|
18
|
+
companyId: shared_lib_1.idSchema,
|
|
19
|
+
name: shared_lib_1.z.string(),
|
|
20
|
+
description: shared_lib_1.z.string().nullable(),
|
|
21
|
+
categoryIds: shared_lib_1.z.array(shared_lib_1.idSchema),
|
|
22
|
+
brand: shared_lib_1.z.string().nullable(),
|
|
23
|
+
priceCents: shared_lib_1.z.number().int().nonnegative(),
|
|
24
|
+
inStock: shared_lib_1.z.boolean(),
|
|
25
|
+
rating: shared_lib_1.z.number().min(0).max(5),
|
|
26
|
+
createdAt: shared_lib_1.z.string().datetime({ offset: true }),
|
|
27
|
+
}).passthrough();
|
|
28
|
+
/** Envelope `data` of `GET /api/v1/internal/search-documents/{productId}?companyId=`: `null` when the product is not indexable (draft, disabled, deleted, no active variant, shop not active). */
|
|
29
|
+
exports.searchDocumentLookupSchema = shared_lib_1.z.object({ document: exports.searchDocumentSchema.nullable() }).passthrough();
|
|
30
|
+
/** Envelope `data` of `GET /api/v1/internal/search-documents?companyId=&cursor=&limit=`: a page and the cursor of the next one. */
|
|
31
|
+
exports.searchDocumentPageSchema = shared_lib_1.z.object({ items: shared_lib_1.z.array(exports.searchDocumentSchema), nextCursor: shared_lib_1.z.string().nullable() }).passthrough();
|
|
32
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/internal/search.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,qDAAmD;AAEnD,yEAAyE;AAC5D,QAAA,wBAAwB,GAAG,GAAG,CAAC;AAE5C;;;;GAIG;AACU,QAAA,oBAAoB,GAAG,cAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,qBAAQ;IACZ,SAAS,EAAE,qBAAQ;IACnB,IAAI,EAAE,cAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,cAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,WAAW,EAAE,cAAC,CAAC,KAAK,CAAC,qBAAQ,CAAC;IAC9B,KAAK,EAAE,cAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,UAAU,EAAE,cAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC1C,OAAO,EAAE,cAAC,CAAC,OAAO,EAAE;IACpB,MAAM,EAAE,cAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,SAAS,EAAE,cAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;CACjD,CAAC,CAAC,WAAW,EAAE,CAAC;AAEjB,kMAAkM;AACrL,QAAA,0BAA0B,GAAG,cAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,4BAAoB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAEhH,mIAAmI;AACtH,QAAA,wBAAwB,GAAG,cAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,cAAC,CAAC,KAAK,CAAC,4BAAoB,CAAC,EAAE,UAAU,EAAE,cAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal answers catalog-service gives search-service so it can build and rebuild its index (Prompt 26.1): one product
|
|
3
|
+
* as a flat search document, and pages of them. Only sellable products of active shops are ever returned.
|
|
4
|
+
*/
|
|
5
|
+
import { idSchema, z } from '@heavybit/shared-lib';
|
|
6
|
+
/** Most documents one page of `GET /internal/search-documents` holds. */
|
|
7
|
+
export const MAX_SEARCH_DOCUMENT_PAGE = 200;
|
|
8
|
+
/**
|
|
9
|
+
* One indexable product. `priceCents` is the lowest price a shopper pays now, in minor units (KES cents), with any running
|
|
10
|
+
* campaign applied (CHK-7), so the engine can filter and sort by an integer; the API money type stays a decimal string (D5).
|
|
11
|
+
* `rating` is the average (0 when unrated).
|
|
12
|
+
*/
|
|
13
|
+
export const searchDocumentSchema = z.object({
|
|
14
|
+
id: idSchema,
|
|
15
|
+
companyId: idSchema,
|
|
16
|
+
name: z.string(),
|
|
17
|
+
description: z.string().nullable(),
|
|
18
|
+
categoryIds: z.array(idSchema),
|
|
19
|
+
brand: z.string().nullable(),
|
|
20
|
+
priceCents: z.number().int().nonnegative(),
|
|
21
|
+
inStock: z.boolean(),
|
|
22
|
+
rating: z.number().min(0).max(5),
|
|
23
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
24
|
+
}).passthrough();
|
|
25
|
+
/** Envelope `data` of `GET /api/v1/internal/search-documents/{productId}?companyId=`: `null` when the product is not indexable (draft, disabled, deleted, no active variant, shop not active). */
|
|
26
|
+
export const searchDocumentLookupSchema = z.object({ document: searchDocumentSchema.nullable() }).passthrough();
|
|
27
|
+
/** Envelope `data` of `GET /api/v1/internal/search-documents?companyId=&cursor=&limit=`: a page and the cursor of the next one. */
|
|
28
|
+
export const searchDocumentPageSchema = z.object({ items: z.array(searchDocumentSchema), nextCursor: z.string().nullable() }).passthrough();
|
|
29
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/internal/search.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAEnD,yEAAyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,QAAQ;IACZ,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC9B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC1C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;CACjD,CAAC,CAAC,WAAW,EAAE,CAAC;AAEjB,kMAAkM;AAClM,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAEhH,mIAAmI;AACnI,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal answers catalog-service gives search-service so it can build and rebuild its index (Prompt 26.1): one product
|
|
3
|
+
* as a flat search document, and pages of them. Only sellable products of active shops are ever returned.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@heavybit/shared-lib';
|
|
6
|
+
/** Most documents one page of `GET /internal/search-documents` holds. */
|
|
7
|
+
export declare const MAX_SEARCH_DOCUMENT_PAGE = 200;
|
|
8
|
+
/**
|
|
9
|
+
* One indexable product. `priceCents` is the lowest price a shopper pays now, in minor units (KES cents), with any running
|
|
10
|
+
* campaign applied (CHK-7), so the engine can filter and sort by an integer; the API money type stays a decimal string (D5).
|
|
11
|
+
* `rating` is the average (0 when unrated).
|
|
12
|
+
*/
|
|
13
|
+
export declare const searchDocumentSchema: z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
companyId: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
description: z.ZodNullable<z.ZodString>;
|
|
18
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
19
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
20
|
+
priceCents: z.ZodNumber;
|
|
21
|
+
inStock: z.ZodBoolean;
|
|
22
|
+
rating: z.ZodNumber;
|
|
23
|
+
createdAt: z.ZodString;
|
|
24
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
companyId: z.ZodString;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
description: z.ZodNullable<z.ZodString>;
|
|
29
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
30
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
31
|
+
priceCents: z.ZodNumber;
|
|
32
|
+
inStock: z.ZodBoolean;
|
|
33
|
+
rating: z.ZodNumber;
|
|
34
|
+
createdAt: z.ZodString;
|
|
35
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
companyId: z.ZodString;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
description: z.ZodNullable<z.ZodString>;
|
|
40
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
41
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
42
|
+
priceCents: z.ZodNumber;
|
|
43
|
+
inStock: z.ZodBoolean;
|
|
44
|
+
rating: z.ZodNumber;
|
|
45
|
+
createdAt: z.ZodString;
|
|
46
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
47
|
+
/** Envelope `data` of `GET /api/v1/internal/search-documents/{productId}?companyId=`: `null` when the product is not indexable (draft, disabled, deleted, no active variant, shop not active). */
|
|
48
|
+
export declare const searchDocumentLookupSchema: z.ZodObject<{
|
|
49
|
+
document: z.ZodNullable<z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
companyId: z.ZodString;
|
|
52
|
+
name: z.ZodString;
|
|
53
|
+
description: z.ZodNullable<z.ZodString>;
|
|
54
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
55
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
56
|
+
priceCents: z.ZodNumber;
|
|
57
|
+
inStock: z.ZodBoolean;
|
|
58
|
+
rating: z.ZodNumber;
|
|
59
|
+
createdAt: z.ZodString;
|
|
60
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
companyId: z.ZodString;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
description: z.ZodNullable<z.ZodString>;
|
|
65
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
66
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
67
|
+
priceCents: z.ZodNumber;
|
|
68
|
+
inStock: z.ZodBoolean;
|
|
69
|
+
rating: z.ZodNumber;
|
|
70
|
+
createdAt: z.ZodString;
|
|
71
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
companyId: z.ZodString;
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
description: z.ZodNullable<z.ZodString>;
|
|
76
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
77
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
78
|
+
priceCents: z.ZodNumber;
|
|
79
|
+
inStock: z.ZodBoolean;
|
|
80
|
+
rating: z.ZodNumber;
|
|
81
|
+
createdAt: z.ZodString;
|
|
82
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
83
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
84
|
+
document: z.ZodNullable<z.ZodObject<{
|
|
85
|
+
id: z.ZodString;
|
|
86
|
+
companyId: z.ZodString;
|
|
87
|
+
name: z.ZodString;
|
|
88
|
+
description: z.ZodNullable<z.ZodString>;
|
|
89
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
90
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
91
|
+
priceCents: z.ZodNumber;
|
|
92
|
+
inStock: z.ZodBoolean;
|
|
93
|
+
rating: z.ZodNumber;
|
|
94
|
+
createdAt: z.ZodString;
|
|
95
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
companyId: z.ZodString;
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
description: z.ZodNullable<z.ZodString>;
|
|
100
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
101
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
102
|
+
priceCents: z.ZodNumber;
|
|
103
|
+
inStock: z.ZodBoolean;
|
|
104
|
+
rating: z.ZodNumber;
|
|
105
|
+
createdAt: z.ZodString;
|
|
106
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
companyId: z.ZodString;
|
|
109
|
+
name: z.ZodString;
|
|
110
|
+
description: z.ZodNullable<z.ZodString>;
|
|
111
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
112
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
113
|
+
priceCents: z.ZodNumber;
|
|
114
|
+
inStock: z.ZodBoolean;
|
|
115
|
+
rating: z.ZodNumber;
|
|
116
|
+
createdAt: z.ZodString;
|
|
117
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
118
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
119
|
+
document: z.ZodNullable<z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
companyId: z.ZodString;
|
|
122
|
+
name: z.ZodString;
|
|
123
|
+
description: z.ZodNullable<z.ZodString>;
|
|
124
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
125
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
126
|
+
priceCents: z.ZodNumber;
|
|
127
|
+
inStock: z.ZodBoolean;
|
|
128
|
+
rating: z.ZodNumber;
|
|
129
|
+
createdAt: z.ZodString;
|
|
130
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
companyId: z.ZodString;
|
|
133
|
+
name: z.ZodString;
|
|
134
|
+
description: z.ZodNullable<z.ZodString>;
|
|
135
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
136
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
137
|
+
priceCents: z.ZodNumber;
|
|
138
|
+
inStock: z.ZodBoolean;
|
|
139
|
+
rating: z.ZodNumber;
|
|
140
|
+
createdAt: z.ZodString;
|
|
141
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
companyId: z.ZodString;
|
|
144
|
+
name: z.ZodString;
|
|
145
|
+
description: z.ZodNullable<z.ZodString>;
|
|
146
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
147
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
148
|
+
priceCents: z.ZodNumber;
|
|
149
|
+
inStock: z.ZodBoolean;
|
|
150
|
+
rating: z.ZodNumber;
|
|
151
|
+
createdAt: z.ZodString;
|
|
152
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
153
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
154
|
+
/** Envelope `data` of `GET /api/v1/internal/search-documents?companyId=&cursor=&limit=`: a page and the cursor of the next one. */
|
|
155
|
+
export declare const searchDocumentPageSchema: z.ZodObject<{
|
|
156
|
+
items: z.ZodArray<z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
companyId: z.ZodString;
|
|
159
|
+
name: z.ZodString;
|
|
160
|
+
description: z.ZodNullable<z.ZodString>;
|
|
161
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
162
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
163
|
+
priceCents: z.ZodNumber;
|
|
164
|
+
inStock: z.ZodBoolean;
|
|
165
|
+
rating: z.ZodNumber;
|
|
166
|
+
createdAt: z.ZodString;
|
|
167
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
companyId: z.ZodString;
|
|
170
|
+
name: z.ZodString;
|
|
171
|
+
description: z.ZodNullable<z.ZodString>;
|
|
172
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
173
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
174
|
+
priceCents: z.ZodNumber;
|
|
175
|
+
inStock: z.ZodBoolean;
|
|
176
|
+
rating: z.ZodNumber;
|
|
177
|
+
createdAt: z.ZodString;
|
|
178
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
179
|
+
id: z.ZodString;
|
|
180
|
+
companyId: z.ZodString;
|
|
181
|
+
name: z.ZodString;
|
|
182
|
+
description: z.ZodNullable<z.ZodString>;
|
|
183
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
184
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
185
|
+
priceCents: z.ZodNumber;
|
|
186
|
+
inStock: z.ZodBoolean;
|
|
187
|
+
rating: z.ZodNumber;
|
|
188
|
+
createdAt: z.ZodString;
|
|
189
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
190
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
191
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
192
|
+
items: z.ZodArray<z.ZodObject<{
|
|
193
|
+
id: z.ZodString;
|
|
194
|
+
companyId: z.ZodString;
|
|
195
|
+
name: z.ZodString;
|
|
196
|
+
description: z.ZodNullable<z.ZodString>;
|
|
197
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
198
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
199
|
+
priceCents: z.ZodNumber;
|
|
200
|
+
inStock: z.ZodBoolean;
|
|
201
|
+
rating: z.ZodNumber;
|
|
202
|
+
createdAt: z.ZodString;
|
|
203
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
companyId: z.ZodString;
|
|
206
|
+
name: z.ZodString;
|
|
207
|
+
description: z.ZodNullable<z.ZodString>;
|
|
208
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
209
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
210
|
+
priceCents: z.ZodNumber;
|
|
211
|
+
inStock: z.ZodBoolean;
|
|
212
|
+
rating: z.ZodNumber;
|
|
213
|
+
createdAt: z.ZodString;
|
|
214
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
215
|
+
id: z.ZodString;
|
|
216
|
+
companyId: z.ZodString;
|
|
217
|
+
name: z.ZodString;
|
|
218
|
+
description: z.ZodNullable<z.ZodString>;
|
|
219
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
220
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
221
|
+
priceCents: z.ZodNumber;
|
|
222
|
+
inStock: z.ZodBoolean;
|
|
223
|
+
rating: z.ZodNumber;
|
|
224
|
+
createdAt: z.ZodString;
|
|
225
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
226
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
227
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
228
|
+
items: z.ZodArray<z.ZodObject<{
|
|
229
|
+
id: z.ZodString;
|
|
230
|
+
companyId: z.ZodString;
|
|
231
|
+
name: z.ZodString;
|
|
232
|
+
description: z.ZodNullable<z.ZodString>;
|
|
233
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
234
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
235
|
+
priceCents: z.ZodNumber;
|
|
236
|
+
inStock: z.ZodBoolean;
|
|
237
|
+
rating: z.ZodNumber;
|
|
238
|
+
createdAt: z.ZodString;
|
|
239
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
240
|
+
id: z.ZodString;
|
|
241
|
+
companyId: z.ZodString;
|
|
242
|
+
name: z.ZodString;
|
|
243
|
+
description: z.ZodNullable<z.ZodString>;
|
|
244
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
245
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
246
|
+
priceCents: z.ZodNumber;
|
|
247
|
+
inStock: z.ZodBoolean;
|
|
248
|
+
rating: z.ZodNumber;
|
|
249
|
+
createdAt: z.ZodString;
|
|
250
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
251
|
+
id: z.ZodString;
|
|
252
|
+
companyId: z.ZodString;
|
|
253
|
+
name: z.ZodString;
|
|
254
|
+
description: z.ZodNullable<z.ZodString>;
|
|
255
|
+
categoryIds: z.ZodArray<z.ZodString, "many">;
|
|
256
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
257
|
+
priceCents: z.ZodNumber;
|
|
258
|
+
inStock: z.ZodBoolean;
|
|
259
|
+
rating: z.ZodNumber;
|
|
260
|
+
createdAt: z.ZodString;
|
|
261
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
262
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
263
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
264
|
+
/** One indexable product. */
|
|
265
|
+
export type SearchDocument = z.infer<typeof searchDocumentSchema>;
|
|
266
|
+
/** Answer of the single-product lookup. */
|
|
267
|
+
export type SearchDocumentLookup = z.infer<typeof searchDocumentLookupSchema>;
|
|
268
|
+
/** Answer of the page read. */
|
|
269
|
+
export type SearchDocumentPage = z.infer<typeof searchDocumentPageSchema>;
|
|
270
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/internal/search.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAY,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAEnD,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAWjB,CAAC;AAEjB,kMAAkM;AAClM,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAwE,CAAC;AAEhH,mIAAmI;AACnI,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAsG,CAAC;AAE5I,6BAA6B;AAC7B,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,2CAA2C;AAC3C,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,+BAA+B;AAC/B,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heavybit/ecommerce-contracts",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.22",
|
|
4
4
|
"description": "The e-commerce app's shared contracts: app settings, identity and scope bindings, step-up scopes, event catalogue and v1 payload schemas. Built on @heavybit/shared-lib; no business logic.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|