@heavybit/ecommerce-contracts 0.3.12 → 0.3.16
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/events/base.js +1 -1
- package/dist/cjs/events/base.js.map +1 -1
- package/dist/cjs/events/engagement.js +52 -0
- package/dist/cjs/events/engagement.js.map +1 -0
- package/dist/cjs/events/index.js +6 -0
- package/dist/cjs/events/index.js.map +1 -1
- package/dist/cjs/events/notification.js +9 -2
- package/dist/cjs/events/notification.js.map +1 -1
- package/dist/cjs/events/promotion.js +17 -0
- package/dist/cjs/events/promotion.js.map +1 -0
- package/dist/cjs/internal/catalog.js +2 -0
- package/dist/cjs/internal/catalog.js.map +1 -1
- package/dist/cjs/internal/index.js +2 -0
- package/dist/cjs/internal/index.js.map +1 -1
- package/dist/cjs/internal/moderation.js +20 -0
- package/dist/cjs/internal/moderation.js.map +1 -0
- package/dist/cjs/internal/reviews.js +26 -0
- package/dist/cjs/internal/reviews.js.map +1 -0
- package/dist/cjs/permissions.js +2 -0
- package/dist/cjs/permissions.js.map +1 -1
- package/dist/esm/events/base.js +1 -1
- package/dist/esm/events/base.js.map +1 -1
- package/dist/esm/events/engagement.js +49 -0
- package/dist/esm/events/engagement.js.map +1 -0
- package/dist/esm/events/index.js +6 -0
- package/dist/esm/events/index.js.map +1 -1
- package/dist/esm/events/notification.js +8 -1
- package/dist/esm/events/notification.js.map +1 -1
- package/dist/esm/events/promotion.js +14 -0
- package/dist/esm/events/promotion.js.map +1 -0
- package/dist/esm/internal/catalog.js +2 -0
- package/dist/esm/internal/catalog.js.map +1 -1
- package/dist/esm/internal/index.js +2 -0
- package/dist/esm/internal/index.js.map +1 -1
- package/dist/esm/internal/moderation.js +17 -0
- package/dist/esm/internal/moderation.js.map +1 -0
- package/dist/esm/internal/reviews.js +23 -0
- package/dist/esm/internal/reviews.js.map +1 -0
- package/dist/esm/permissions.js +2 -0
- package/dist/esm/permissions.js.map +1 -1
- package/dist/types/events/audit.d.ts +3 -1
- package/dist/types/events/audit.d.ts.map +1 -1
- package/dist/types/events/base.d.ts +1 -1
- package/dist/types/events/base.d.ts.map +1 -1
- package/dist/types/events/engagement.d.ts +161 -0
- package/dist/types/events/engagement.d.ts.map +1 -0
- package/dist/types/events/index.d.ts +605 -1
- package/dist/types/events/index.d.ts.map +1 -1
- package/dist/types/events/notification.d.ts +41 -1
- package/dist/types/events/notification.d.ts.map +1 -1
- package/dist/types/events/promotion.d.ts +67 -0
- package/dist/types/events/promotion.d.ts.map +1 -0
- package/dist/types/internal/catalog.d.ts +24 -0
- package/dist/types/internal/catalog.d.ts.map +1 -1
- package/dist/types/internal/index.d.ts +2 -0
- package/dist/types/internal/index.d.ts.map +1 -1
- package/dist/types/internal/moderation.d.ts +38 -0
- package/dist/types/internal/moderation.d.ts.map +1 -0
- package/dist/types/internal/reviews.d.ts +54 -0
- package/dist/types/internal/reviews.d.ts.map +1 -0
- package/dist/types/permissions.d.ts +2 -0
- package/dist/types/permissions.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAC;AA0B9C,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,+BAA+B,EAC/B,oBAAoB,GACrB,MAAM,m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C,CAAC,CAAC,CAAC,CAG1F;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,CAAC;;;;;;;;;;;;IAExE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAIpE"}
|
|
@@ -16,6 +16,7 @@ export declare const NOTIFICATION_COMMAND_KEYS: {
|
|
|
16
16
|
export declare const NOTIFICATION_EVENT_KEYS: {
|
|
17
17
|
readonly email: {
|
|
18
18
|
readonly suppressed: "notification.email.suppressed";
|
|
19
|
+
readonly unsubscribed: "notification.email.unsubscribed";
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
22
|
/** Exchange kind of every key in {@link NOTIFICATION_COMMAND_KEYS} (`enqueueOutbox(..., { exchange })`, consumer bindings). */
|
|
@@ -232,6 +233,8 @@ export declare const SOCKET_REJECTED_KEYS: {
|
|
|
232
233
|
readonly cart: "cart.security.socket_rejected";
|
|
233
234
|
readonly notification: "notification.security.socket_rejected";
|
|
234
235
|
readonly reporting: "reporting.security.socket_rejected";
|
|
236
|
+
readonly promotion: "promotion.security.socket_rejected";
|
|
237
|
+
readonly engagement: "engagement.security.socket_rejected";
|
|
235
238
|
};
|
|
236
239
|
/** v1 payload of a rejected socket handshake (no ticket, IP or headers). */
|
|
237
240
|
export declare const socketRejectedSchema: z.ZodObject<{
|
|
@@ -254,7 +257,7 @@ export declare const socketRejectedSchema: z.ZodObject<{
|
|
|
254
257
|
reason: z.ZodString;
|
|
255
258
|
}, z.ZodTypeAny, "passthrough">>;
|
|
256
259
|
/** Every socket-rejected routing key with its schema. */
|
|
257
|
-
export declare const SOCKET_REJECTED_EVENTS: Record<"order.security.socket_rejected" | "payment.security.socket_rejected" | "shipping.security.socket_rejected" | "store.security.socket_rejected" | "auth.security.socket_rejected" | "gateway.security.socket_rejected" | "catalog.security.socket_rejected" | "media.security.socket_rejected" | "cart.security.socket_rejected" | "notification.security.socket_rejected" | "reporting.security.socket_rejected", z.ZodObject<{
|
|
260
|
+
export declare const SOCKET_REJECTED_EVENTS: Record<"order.security.socket_rejected" | "payment.security.socket_rejected" | "shipping.security.socket_rejected" | "store.security.socket_rejected" | "auth.security.socket_rejected" | "gateway.security.socket_rejected" | "catalog.security.socket_rejected" | "media.security.socket_rejected" | "cart.security.socket_rejected" | "notification.security.socket_rejected" | "reporting.security.socket_rejected" | "promotion.security.socket_rejected" | "engagement.security.socket_rejected", z.ZodObject<{
|
|
258
261
|
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
259
262
|
} & {
|
|
260
263
|
userId: z.ZodNullable<z.ZodString>;
|
|
@@ -288,6 +291,27 @@ export declare const emailSuppressedSchema: z.ZodObject<{
|
|
|
288
291
|
userId: z.ZodString;
|
|
289
292
|
reason: z.ZodEnum<["bounce", "complaint"]>;
|
|
290
293
|
}, z.ZodTypeAny, "passthrough">>;
|
|
294
|
+
/**
|
|
295
|
+
* v1 payload of `notification.email.unsubscribed`: a person spent an unsubscribe link of marketing mail (NOT-8), so email of
|
|
296
|
+
* message type `type` is off for them. `companyId` is the shop whose mail carried the link (null for platform mail); engagement-service
|
|
297
|
+
* withdraws that shop's marketing consent. No address in the event.
|
|
298
|
+
*/
|
|
299
|
+
export declare const emailUnsubscribedSchema: z.ZodObject<{
|
|
300
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
|
+
} & {
|
|
302
|
+
userId: z.ZodString;
|
|
303
|
+
type: z.ZodString;
|
|
304
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
305
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
306
|
+
} & {
|
|
307
|
+
userId: z.ZodString;
|
|
308
|
+
type: z.ZodString;
|
|
309
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
310
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
311
|
+
} & {
|
|
312
|
+
userId: z.ZodString;
|
|
313
|
+
type: z.ZodString;
|
|
314
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
291
315
|
/** Events published by notification-service with their schemas. */
|
|
292
316
|
export declare const NOTIFICATION_EVENTS: {
|
|
293
317
|
readonly "notification.email.suppressed": z.ZodObject<{
|
|
@@ -300,5 +324,21 @@ export declare const NOTIFICATION_EVENTS: {
|
|
|
300
324
|
userId: z.ZodString;
|
|
301
325
|
reason: z.ZodEnum<["bounce", "complaint"]>;
|
|
302
326
|
}, z.ZodTypeAny, "passthrough">>;
|
|
327
|
+
readonly "notification.email.unsubscribed": z.ZodObject<{
|
|
328
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
329
|
+
} & {
|
|
330
|
+
userId: z.ZodString;
|
|
331
|
+
type: z.ZodString;
|
|
332
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
333
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
334
|
+
} & {
|
|
335
|
+
userId: z.ZodString;
|
|
336
|
+
type: z.ZodString;
|
|
337
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
338
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
|
+
} & {
|
|
340
|
+
userId: z.ZodString;
|
|
341
|
+
type: z.ZodString;
|
|
342
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
303
343
|
};
|
|
304
344
|
//# sourceMappingURL=notification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/events/notification.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAIzC,sGAAsG;AACtG,eAAO,MAAM,yBAAyB;;;;CAE5B,CAAC;AAEX,uFAAuF;AACvF,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"notification.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;;;;;;;;;gCAAuE,CAAC;AAE1G;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;gCAAyE,CAAC;AAE9G,mEAAmE;AACnE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGtB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** promotion-service events: coupon redemptions and campaign lifecycle (Phase 21). */
|
|
2
|
+
import { z } from '@heavybit/shared-lib';
|
|
3
|
+
/** Routing keys published by promotion-service. */
|
|
4
|
+
export declare const PROMOTION_KEYS: {
|
|
5
|
+
readonly coupon: {
|
|
6
|
+
readonly redeemed: "promotion.coupon.redeemed";
|
|
7
|
+
};
|
|
8
|
+
readonly campaign: {
|
|
9
|
+
readonly started: "promotion.campaign.started";
|
|
10
|
+
readonly ended: "promotion.campaign.ended";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/** v1 payload schemas of the promotion events. */
|
|
14
|
+
export declare const PROMOTION_EVENTS: {
|
|
15
|
+
readonly "promotion.coupon.redeemed": z.ZodObject<{
|
|
16
|
+
companyId: z.ZodString;
|
|
17
|
+
} & {
|
|
18
|
+
couponId: z.ZodString;
|
|
19
|
+
redemptionId: z.ZodString;
|
|
20
|
+
orderId: z.ZodString;
|
|
21
|
+
userId: z.ZodString;
|
|
22
|
+
discountAmount: z.ZodString;
|
|
23
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
24
|
+
companyId: z.ZodString;
|
|
25
|
+
} & {
|
|
26
|
+
couponId: z.ZodString;
|
|
27
|
+
redemptionId: z.ZodString;
|
|
28
|
+
orderId: z.ZodString;
|
|
29
|
+
userId: z.ZodString;
|
|
30
|
+
discountAmount: z.ZodString;
|
|
31
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
32
|
+
companyId: z.ZodString;
|
|
33
|
+
} & {
|
|
34
|
+
couponId: z.ZodString;
|
|
35
|
+
redemptionId: z.ZodString;
|
|
36
|
+
orderId: z.ZodString;
|
|
37
|
+
userId: z.ZodString;
|
|
38
|
+
discountAmount: z.ZodString;
|
|
39
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
40
|
+
readonly "promotion.campaign.started": z.ZodObject<{
|
|
41
|
+
companyId: z.ZodString;
|
|
42
|
+
} & {
|
|
43
|
+
campaignId: z.ZodString;
|
|
44
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
45
|
+
companyId: z.ZodString;
|
|
46
|
+
} & {
|
|
47
|
+
campaignId: z.ZodString;
|
|
48
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
49
|
+
companyId: z.ZodString;
|
|
50
|
+
} & {
|
|
51
|
+
campaignId: z.ZodString;
|
|
52
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
53
|
+
readonly "promotion.campaign.ended": z.ZodObject<{
|
|
54
|
+
companyId: z.ZodString;
|
|
55
|
+
} & {
|
|
56
|
+
campaignId: z.ZodString;
|
|
57
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
58
|
+
companyId: z.ZodString;
|
|
59
|
+
} & {
|
|
60
|
+
campaignId: z.ZodString;
|
|
61
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
62
|
+
companyId: z.ZodString;
|
|
63
|
+
} & {
|
|
64
|
+
campaignId: z.ZodString;
|
|
65
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=promotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion.d.ts","sourceRoot":"","sources":["../../../src/events/promotion.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAGzC,mDAAmD;AACnD,eAAO,MAAM,cAAc;;;;;;;;CAGjB,CAAC;AAIX,kDAAkD;AAClD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAInB,CAAC"}
|
|
@@ -88,6 +88,8 @@ export declare const priceQuoteLineSchema: z.ZodObject<{
|
|
|
88
88
|
/** "Was" price shown struck through, or null. */
|
|
89
89
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
90
90
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
91
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
92
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
91
93
|
available: z.ZodBoolean;
|
|
92
94
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
93
95
|
availableQuantity: z.ZodNumber;
|
|
@@ -108,6 +110,8 @@ export declare const priceQuoteLineSchema: z.ZodObject<{
|
|
|
108
110
|
/** "Was" price shown struck through, or null. */
|
|
109
111
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
110
112
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
113
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
114
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
111
115
|
available: z.ZodBoolean;
|
|
112
116
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
113
117
|
availableQuantity: z.ZodNumber;
|
|
@@ -128,6 +132,8 @@ export declare const priceQuoteLineSchema: z.ZodObject<{
|
|
|
128
132
|
/** "Was" price shown struck through, or null. */
|
|
129
133
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
130
134
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
135
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
136
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
131
137
|
available: z.ZodBoolean;
|
|
132
138
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
133
139
|
availableQuantity: z.ZodNumber;
|
|
@@ -153,6 +159,8 @@ export declare const priceQuoteResponseSchema: z.ZodObject<{
|
|
|
153
159
|
/** "Was" price shown struck through, or null. */
|
|
154
160
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
155
161
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
162
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
163
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
156
164
|
available: z.ZodBoolean;
|
|
157
165
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
158
166
|
availableQuantity: z.ZodNumber;
|
|
@@ -173,6 +181,8 @@ export declare const priceQuoteResponseSchema: z.ZodObject<{
|
|
|
173
181
|
/** "Was" price shown struck through, or null. */
|
|
174
182
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
175
183
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
184
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
185
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
176
186
|
available: z.ZodBoolean;
|
|
177
187
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
178
188
|
availableQuantity: z.ZodNumber;
|
|
@@ -193,6 +203,8 @@ export declare const priceQuoteResponseSchema: z.ZodObject<{
|
|
|
193
203
|
/** "Was" price shown struck through, or null. */
|
|
194
204
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
195
205
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
206
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
207
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
196
208
|
available: z.ZodBoolean;
|
|
197
209
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
198
210
|
availableQuantity: z.ZodNumber;
|
|
@@ -217,6 +229,8 @@ export declare const priceQuoteResponseSchema: z.ZodObject<{
|
|
|
217
229
|
/** "Was" price shown struck through, or null. */
|
|
218
230
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
219
231
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
232
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
233
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
220
234
|
available: z.ZodBoolean;
|
|
221
235
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
222
236
|
availableQuantity: z.ZodNumber;
|
|
@@ -237,6 +251,8 @@ export declare const priceQuoteResponseSchema: z.ZodObject<{
|
|
|
237
251
|
/** "Was" price shown struck through, or null. */
|
|
238
252
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
239
253
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
254
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
255
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
240
256
|
available: z.ZodBoolean;
|
|
241
257
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
242
258
|
availableQuantity: z.ZodNumber;
|
|
@@ -257,6 +273,8 @@ export declare const priceQuoteResponseSchema: z.ZodObject<{
|
|
|
257
273
|
/** "Was" price shown struck through, or null. */
|
|
258
274
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
259
275
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
276
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
277
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
260
278
|
available: z.ZodBoolean;
|
|
261
279
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
262
280
|
availableQuantity: z.ZodNumber;
|
|
@@ -281,6 +299,8 @@ export declare const priceQuoteResponseSchema: z.ZodObject<{
|
|
|
281
299
|
/** "Was" price shown struck through, or null. */
|
|
282
300
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
283
301
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
302
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
303
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
284
304
|
available: z.ZodBoolean;
|
|
285
305
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
286
306
|
availableQuantity: z.ZodNumber;
|
|
@@ -301,6 +321,8 @@ export declare const priceQuoteResponseSchema: z.ZodObject<{
|
|
|
301
321
|
/** "Was" price shown struck through, or null. */
|
|
302
322
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
303
323
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
324
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
325
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
304
326
|
available: z.ZodBoolean;
|
|
305
327
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
306
328
|
availableQuantity: z.ZodNumber;
|
|
@@ -321,6 +343,8 @@ export declare const priceQuoteResponseSchema: z.ZodObject<{
|
|
|
321
343
|
/** "Was" price shown struck through, or null. */
|
|
322
344
|
compareAtPrice: z.ZodNullable<z.ZodString>;
|
|
323
345
|
taxClass: z.ZodNullable<z.ZodEnum<["standard", "zero_rated", "exempt"]>>;
|
|
346
|
+
/** Every category the product is listed under (main plus extra), so category-scoped coupons can match (CR-21-04). Additive (MS-4): absent from older catalogs. */
|
|
347
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
324
348
|
available: z.ZodBoolean;
|
|
325
349
|
/** Units that can be sold now (stock − reserved, 0 when not sellable). */
|
|
326
350
|
availableQuantity: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/internal/catalog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAY,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAGnD,wCAAwC;AACxC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,sDAAsD;AACtD,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,6GAA8G,CAAC;AAE/I,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,kEAAkE;AAClE,eAAO,MAAM,WAAW,+CAAgD,CAAC;AAEzE,0BAA0B;AAC1B,eAAO,MAAM,2BAA2B;;;;;;;;;EAG7B,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC;AAEZ;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;IAO/B,iDAAiD;;IAEjD,2GAA2G;;IAE3G,8EAA8E;;IAE9E,iDAAiD
|
|
1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CAAC;AAClE,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,4CAA4C;AAC5C,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,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"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal request engagement-service sends catalog-service when the platform upholds a report against a product (Prompt 22.3).
|
|
3
|
+
*/
|
|
4
|
+
import { z } from '@heavybit/shared-lib';
|
|
5
|
+
/**
|
|
6
|
+
* Body of catalog-service `POST /api/v1/internal/products/{id}/disable` (caller engagement-service): turn the product off
|
|
7
|
+
* ("disabled") for every shopper because of a platform moderation decision. The shop comes in the body because the internal
|
|
8
|
+
* caller is trusted, not a user (the product id alone is never enough to find the shop's rows, TEN-2).
|
|
9
|
+
*/
|
|
10
|
+
export declare const productDisableRequestSchema: z.ZodObject<{
|
|
11
|
+
companyId: z.ZodString;
|
|
12
|
+
reason: z.ZodString;
|
|
13
|
+
actorUserId: z.ZodString;
|
|
14
|
+
}, "strict", z.ZodTypeAny, {
|
|
15
|
+
companyId: string;
|
|
16
|
+
actorUserId: string;
|
|
17
|
+
reason: string;
|
|
18
|
+
}, {
|
|
19
|
+
companyId: string;
|
|
20
|
+
actorUserId: string;
|
|
21
|
+
reason: string;
|
|
22
|
+
}>;
|
|
23
|
+
/** Envelope `data` of the disable call: `disabled` is false when the product was already off (idempotent). */
|
|
24
|
+
export declare const productDisableResultSchema: z.ZodObject<{
|
|
25
|
+
productId: z.ZodString;
|
|
26
|
+
disabled: z.ZodBoolean;
|
|
27
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
28
|
+
productId: z.ZodString;
|
|
29
|
+
disabled: z.ZodBoolean;
|
|
30
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
31
|
+
productId: z.ZodString;
|
|
32
|
+
disabled: z.ZodBoolean;
|
|
33
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
34
|
+
/** Request of the product disable call. */
|
|
35
|
+
export type ProductDisableRequest = z.infer<typeof productDisableRequestSchema>;
|
|
36
|
+
/** Answer of the product disable call. */
|
|
37
|
+
export type ProductDisableResult = z.infer<typeof productDisableResultSchema>;
|
|
38
|
+
//# sourceMappingURL=moderation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moderation.d.ts","sourceRoot":"","sources":["../../../src/internal/moderation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAY,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EAI7B,CAAC;AAEZ,8GAA8G;AAC9G,eAAO,MAAM,0BAA0B;;;;;;;;;gCAAyE,CAAC;AAEjH,2CAA2C;AAC3C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,0CAA0C;AAC1C,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal answers engagement-service reads to publish verified-purchase reviews (Prompt 22.2): the order line a shopper
|
|
3
|
+
* wants to review (order-service) and the product behind a storefront slug (catalog-service).
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@heavybit/shared-lib';
|
|
6
|
+
/**
|
|
7
|
+
* Envelope `data` of order-service `GET /api/v1/internal/order-items/{id}?userId=` (caller engagement-service): the line,
|
|
8
|
+
* but only when the order belongs to `userId` (otherwise 404, so a stranger's line id is never confirmed). `deliveredAt`
|
|
9
|
+
* is null until the order is delivered; a review needs it (REV-1). The line copies the product at checkout (MS-3).
|
|
10
|
+
*/
|
|
11
|
+
export declare const orderItemLookupSchema: z.ZodObject<{
|
|
12
|
+
orderItemId: z.ZodString;
|
|
13
|
+
orderId: z.ZodString;
|
|
14
|
+
companyId: z.ZodString;
|
|
15
|
+
userId: z.ZodString;
|
|
16
|
+
productId: z.ZodString;
|
|
17
|
+
productName: z.ZodString;
|
|
18
|
+
status: z.ZodString;
|
|
19
|
+
deliveredAt: z.ZodNullable<z.ZodString>;
|
|
20
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
21
|
+
orderItemId: z.ZodString;
|
|
22
|
+
orderId: z.ZodString;
|
|
23
|
+
companyId: z.ZodString;
|
|
24
|
+
userId: z.ZodString;
|
|
25
|
+
productId: z.ZodString;
|
|
26
|
+
productName: z.ZodString;
|
|
27
|
+
status: z.ZodString;
|
|
28
|
+
deliveredAt: z.ZodNullable<z.ZodString>;
|
|
29
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
30
|
+
orderItemId: z.ZodString;
|
|
31
|
+
orderId: z.ZodString;
|
|
32
|
+
companyId: z.ZodString;
|
|
33
|
+
userId: z.ZodString;
|
|
34
|
+
productId: z.ZodString;
|
|
35
|
+
productName: z.ZodString;
|
|
36
|
+
status: z.ZodString;
|
|
37
|
+
deliveredAt: z.ZodNullable<z.ZodString>;
|
|
38
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
39
|
+
/** Envelope `data` of catalog-service `GET /api/v1/internal/products/resolve?companyId=&slug=` (caller engagement-service). */
|
|
40
|
+
export declare const productResolveSchema: z.ZodObject<{
|
|
41
|
+
productId: z.ZodString;
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
44
|
+
productId: z.ZodString;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
47
|
+
productId: z.ZodString;
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
50
|
+
/** Answer of the order line lookup. */
|
|
51
|
+
export type OrderItemLookup = z.infer<typeof orderItemLookupSchema>;
|
|
52
|
+
/** Answer of the product slug lookup. */
|
|
53
|
+
export type ProductResolve = z.infer<typeof productResolveSchema>;
|
|
54
|
+
//# sourceMappingURL=reviews.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../../src/internal/reviews.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAY,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;gCASlB,CAAC;AAEjB,+HAA+H;AAC/H,eAAO,MAAM,oBAAoB;;;;;;;;;gCAAoE,CAAC;AAEtG,uCAAuC;AACvC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,yCAAyC;AACzC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -56,6 +56,8 @@ export declare const PERMISSIONS: {
|
|
|
56
56
|
readonly platformSettingsManage: "platform:settings:manage";
|
|
57
57
|
readonly platformOperationsManage: "platform:operations:manage";
|
|
58
58
|
readonly platformSupportAccess: "platform:support:access";
|
|
59
|
+
/** Decide content reports (hide a review, disable a product platform-wide, dismiss): trust and safety (22.3). */
|
|
60
|
+
readonly platformModerationManage: "platform:moderation:manage";
|
|
59
61
|
};
|
|
60
62
|
export type PermissionName = (typeof PERMISSIONS)[keyof typeof PERMISSIONS];
|
|
61
63
|
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/permissions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,yFAAyF;AACzF,eAAO,MAAM,mBAAmB,EAAG,4BAAqC,CAAC;AAEzE,mEAAmE;AACnE,eAAO,MAAM,oBAAoB,EAAG,aAAsB,CAAC;AAE3D,8HAA8H;AAC9H,eAAO,MAAM,0BAA0B,EAAG,iBAA0B,CAAC;AAErE,iEAAiE;AACjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/permissions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,yFAAyF;AACzF,eAAO,MAAM,mBAAmB,EAAG,4BAAqC,CAAC;AAEzE,mEAAmE;AACnE,eAAO,MAAM,oBAAoB,EAAG,aAAsB,CAAC;AAE3D,8HAA8H;AAC9H,eAAO,MAAM,0BAA0B,EAAG,iBAA0B,CAAC;AAErE,iEAAiE;AACjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+CtB,iHAAiH;;CAEzG,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,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.16",
|
|
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",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepublishOnly": "npm test && npm run build"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@heavybit/shared-lib": "^2.
|
|
34
|
+
"@heavybit/shared-lib": "^2.10.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/jest": "^29.5.14",
|