@heavybit/ecommerce-contracts 0.0.0-stage → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +158 -2
- package/dist/cjs/app.js +38 -0
- package/dist/cjs/app.js.map +1 -0
- package/dist/cjs/bindings.js +127 -0
- package/dist/cjs/bindings.js.map +1 -0
- package/dist/cjs/events/audit.js +26 -0
- package/dist/cjs/events/audit.js.map +1 -0
- package/dist/cjs/events/auth.js +68 -0
- package/dist/cjs/events/auth.js.map +1 -0
- package/dist/cjs/events/base.js +99 -0
- package/dist/cjs/events/base.js.map +1 -0
- package/dist/cjs/events/cart.js +15 -0
- package/dist/cjs/events/cart.js.map +1 -0
- package/dist/cjs/events/catalog.js +24 -0
- package/dist/cjs/events/catalog.js.map +1 -0
- package/dist/cjs/events/gateway.js +24 -0
- package/dist/cjs/events/gateway.js.map +1 -0
- package/dist/cjs/events/index.js +131 -0
- package/dist/cjs/events/index.js.map +1 -0
- package/dist/cjs/events/media.js +17 -0
- package/dist/cjs/events/media.js.map +1 -0
- package/dist/cjs/events/notification.js +43 -0
- package/dist/cjs/events/notification.js.map +1 -0
- package/dist/cjs/events/order.js +45 -0
- package/dist/cjs/events/order.js.map +1 -0
- package/dist/cjs/events/payment.js +34 -0
- package/dist/cjs/events/payment.js.map +1 -0
- package/dist/cjs/events/security.js +36 -0
- package/dist/cjs/events/security.js.map +1 -0
- package/dist/cjs/events/shipping.js +25 -0
- package/dist/cjs/events/shipping.js.map +1 -0
- package/dist/cjs/events/store.js +25 -0
- package/dist/cjs/events/store.js.map +1 -0
- package/dist/cjs/events/usage.js +17 -0
- package/dist/cjs/events/usage.js.map +1 -0
- package/dist/cjs/identity.js +52 -0
- package/dist/cjs/identity.js.map +1 -0
- package/dist/cjs/index.js +27 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/permissions.js +10 -0
- package/dist/cjs/permissions.js.map +1 -0
- package/dist/cjs/scopes.js +57 -0
- package/dist/cjs/scopes.js.map +1 -0
- package/dist/esm/app.js +35 -0
- package/dist/esm/app.js.map +1 -0
- package/dist/esm/bindings.js +115 -0
- package/dist/esm/bindings.js.map +1 -0
- package/dist/esm/events/audit.js +23 -0
- package/dist/esm/events/audit.js.map +1 -0
- package/dist/esm/events/auth.js +65 -0
- package/dist/esm/events/auth.js.map +1 -0
- package/dist/esm/events/base.js +90 -0
- package/dist/esm/events/base.js.map +1 -0
- package/dist/esm/events/cart.js +12 -0
- package/dist/esm/events/cart.js.map +1 -0
- package/dist/esm/events/catalog.js +21 -0
- package/dist/esm/events/catalog.js.map +1 -0
- package/dist/esm/events/gateway.js +21 -0
- package/dist/esm/events/gateway.js.map +1 -0
- package/dist/esm/events/index.js +100 -0
- package/dist/esm/events/index.js.map +1 -0
- package/dist/esm/events/media.js +14 -0
- package/dist/esm/events/media.js.map +1 -0
- package/dist/esm/events/notification.js +40 -0
- package/dist/esm/events/notification.js.map +1 -0
- package/dist/esm/events/order.js +42 -0
- package/dist/esm/events/order.js.map +1 -0
- package/dist/esm/events/payment.js +31 -0
- package/dist/esm/events/payment.js.map +1 -0
- package/dist/esm/events/security.js +33 -0
- package/dist/esm/events/security.js.map +1 -0
- package/dist/esm/events/shipping.js +22 -0
- package/dist/esm/events/shipping.js.map +1 -0
- package/dist/esm/events/store.js +22 -0
- package/dist/esm/events/store.js.map +1 -0
- package/dist/esm/events/usage.js +14 -0
- package/dist/esm/events/usage.js.map +1 -0
- package/dist/esm/identity.js +49 -0
- package/dist/esm/identity.js.map +1 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/permissions.js +7 -0
- package/dist/esm/permissions.js.map +1 -0
- package/dist/esm/scopes.js +52 -0
- package/dist/esm/scopes.js.map +1 -0
- package/dist/types/app.d.ts +40 -0
- package/dist/types/app.d.ts.map +1 -0
- package/dist/types/bindings.d.ts +88 -0
- package/dist/types/bindings.d.ts.map +1 -0
- package/dist/types/events/audit.d.ts +86 -0
- package/dist/types/events/audit.d.ts.map +1 -0
- package/dist/types/events/auth.d.ts +357 -0
- package/dist/types/events/auth.d.ts.map +1 -0
- package/dist/types/events/base.d.ts +108 -0
- package/dist/types/events/base.d.ts.map +1 -0
- package/dist/types/events/cart.d.ts +37 -0
- package/dist/types/events/cart.d.ts.map +1 -0
- package/dist/types/events/catalog.d.ts +126 -0
- package/dist/types/events/catalog.d.ts.map +1 -0
- package/dist/types/events/gateway.d.ts +77 -0
- package/dist/types/events/gateway.d.ts.map +1 -0
- package/dist/types/events/index.d.ts +4333 -0
- package/dist/types/events/index.d.ts.map +1 -0
- package/dist/types/events/media.d.ts +51 -0
- package/dist/types/events/media.d.ts.map +1 -0
- package/dist/types/events/notification.d.ts +270 -0
- package/dist/types/events/notification.d.ts.map +1 -0
- package/dist/types/events/order.d.ts +289 -0
- package/dist/types/events/order.d.ts.map +1 -0
- package/dist/types/events/payment.d.ts +228 -0
- package/dist/types/events/payment.d.ts.map +1 -0
- package/dist/types/events/security.d.ts +201 -0
- package/dist/types/events/security.d.ts.map +1 -0
- package/dist/types/events/shipping.d.ts +91 -0
- package/dist/types/events/shipping.d.ts.map +1 -0
- package/dist/types/events/store.d.ts +134 -0
- package/dist/types/events/store.d.ts.map +1 -0
- package/dist/types/events/usage.d.ts +59 -0
- package/dist/types/events/usage.d.ts.map +1 -0
- package/dist/types/identity.d.ts +24 -0
- package/dist/types/identity.d.ts.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/permissions.d.ts +7 -0
- package/dist/types/permissions.d.ts.map +1 -0
- package/dist/types/scopes.d.ts +57 -0
- package/dist/types/scopes.d.ts.map +1 -0
- package/package.json +44 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvF,kEAAkE;AAClE,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3F,oCAAoC;AACpC,eAAO,MAAM,gBAAgB,40FAA8D,CAAC;AAE5F;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,UAAU,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,OAAO,eAAe,CAAC,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"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** media-service events: uploads and image processing. */
|
|
2
|
+
import { z } from '@heavybit/shared-lib';
|
|
3
|
+
/** Routing keys published by media-service. */
|
|
4
|
+
export declare const MEDIA_KEYS: {
|
|
5
|
+
readonly file: {
|
|
6
|
+
readonly uploaded: "media.file.uploaded";
|
|
7
|
+
readonly processed: "media.file.processed";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
/** v1 payload schemas of the media events. */
|
|
11
|
+
export declare const MEDIA_EVENTS: {
|
|
12
|
+
readonly "media.file.uploaded": z.ZodObject<{
|
|
13
|
+
companyId: z.ZodString;
|
|
14
|
+
} & {
|
|
15
|
+
fileId: z.ZodString;
|
|
16
|
+
purpose: z.ZodString;
|
|
17
|
+
contentType: z.ZodString;
|
|
18
|
+
sizeBytes: z.ZodNumber;
|
|
19
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
20
|
+
companyId: z.ZodString;
|
|
21
|
+
} & {
|
|
22
|
+
fileId: z.ZodString;
|
|
23
|
+
purpose: z.ZodString;
|
|
24
|
+
contentType: z.ZodString;
|
|
25
|
+
sizeBytes: z.ZodNumber;
|
|
26
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
27
|
+
companyId: z.ZodString;
|
|
28
|
+
} & {
|
|
29
|
+
fileId: z.ZodString;
|
|
30
|
+
purpose: z.ZodString;
|
|
31
|
+
contentType: z.ZodString;
|
|
32
|
+
sizeBytes: z.ZodNumber;
|
|
33
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
34
|
+
readonly "media.file.processed": z.ZodObject<{
|
|
35
|
+
companyId: z.ZodString;
|
|
36
|
+
} & {
|
|
37
|
+
fileId: z.ZodString;
|
|
38
|
+
status: z.ZodEnum<["ready", "failed"]>;
|
|
39
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
40
|
+
companyId: z.ZodString;
|
|
41
|
+
} & {
|
|
42
|
+
fileId: z.ZodString;
|
|
43
|
+
status: z.ZodEnum<["ready", "failed"]>;
|
|
44
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
45
|
+
companyId: z.ZodString;
|
|
46
|
+
} & {
|
|
47
|
+
fileId: z.ZodString;
|
|
48
|
+
status: z.ZodEnum<["ready", "failed"]>;
|
|
49
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../src/events/media.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAGzC,+CAA+C;AAC/C,eAAO,MAAM,UAAU;;;;;CAEb,CAAC;AAIX,8CAA8C;AAC9C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGf,CAAC"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The notification command and socket security events.
|
|
3
|
+
*
|
|
4
|
+
* `notification.send.requested` is a **command** on the `commands` exchange (one owner:
|
|
5
|
+
* notification-service). It is the only message that carries a recipient's address, because the
|
|
6
|
+
* notification-service needs it to deliver; domain events carry user ids instead.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from '@heavybit/shared-lib';
|
|
9
|
+
/** Command routing keys (published with `enqueueOutbox(tx, key, data, { exchange: 'commands' })`). */
|
|
10
|
+
export declare const NOTIFICATION_COMMAND_KEYS: {
|
|
11
|
+
readonly send: {
|
|
12
|
+
readonly requested: "notification.send.requested";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/** Exchange kind of every key in {@link NOTIFICATION_COMMAND_KEYS} (`enqueueOutbox(..., { exchange })`, consumer bindings). */
|
|
16
|
+
export declare const COMMAND_EXCHANGE: "commands";
|
|
17
|
+
/** Exchange kind of every event in the catalogue (topic fan-out). */
|
|
18
|
+
export declare const EVENT_EXCHANGE: "events";
|
|
19
|
+
/**
|
|
20
|
+
* v1 payload of `notification.send.requested`: a dispatch in the app's vocabulary plus the company it
|
|
21
|
+
* concerns (null for account-level mail such as a sign-up code). Unknown fields pass through.
|
|
22
|
+
*/
|
|
23
|
+
export declare const notificationSendRequestedSchema: z.ZodIntersection<z.ZodObject<{
|
|
24
|
+
companyId: z.ZodNullable<z.ZodString>;
|
|
25
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
26
|
+
companyId: z.ZodNullable<z.ZodString>;
|
|
27
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
28
|
+
companyId: z.ZodNullable<z.ZodString>;
|
|
29
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodEffects<z.ZodObject<{
|
|
30
|
+
template: z.ZodString;
|
|
31
|
+
category: z.ZodEnum<["security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing", ...("security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing")[]]>;
|
|
32
|
+
recipient: z.ZodObject<{
|
|
33
|
+
email: z.ZodString;
|
|
34
|
+
name: z.ZodOptional<z.ZodString>;
|
|
35
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
locale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
email: string;
|
|
40
|
+
name?: string | undefined;
|
|
41
|
+
userId?: string | null | undefined;
|
|
42
|
+
locale?: string | null | undefined;
|
|
43
|
+
timezone?: string | null | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
email: string;
|
|
46
|
+
name?: string | undefined;
|
|
47
|
+
userId?: string | null | undefined;
|
|
48
|
+
locale?: string | null | undefined;
|
|
49
|
+
timezone?: string | null | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
channels: z.ZodEffects<z.ZodArray<z.ZodEnum<["email" | "sms" | "in_app", ...("email" | "sms" | "in_app")[]]>, "many">, ("email" | "sms" | "in_app")[], ("email" | "sms" | "in_app")[]>;
|
|
52
|
+
data: z.ZodEffects<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null> | undefined>;
|
|
53
|
+
secretKeys: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
54
|
+
bypassPreferences: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
targetPermission: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
template: string;
|
|
58
|
+
category: "security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing";
|
|
59
|
+
recipient: {
|
|
60
|
+
email: string;
|
|
61
|
+
name?: string | undefined;
|
|
62
|
+
userId?: string | null | undefined;
|
|
63
|
+
locale?: string | null | undefined;
|
|
64
|
+
timezone?: string | null | undefined;
|
|
65
|
+
};
|
|
66
|
+
channels: ("email" | "sms" | "in_app")[];
|
|
67
|
+
data: Record<string, string | number | boolean | null>;
|
|
68
|
+
secretKeys: string[];
|
|
69
|
+
bypassPreferences?: boolean | undefined;
|
|
70
|
+
targetPermission?: string | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
template: string;
|
|
73
|
+
category: "security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing";
|
|
74
|
+
recipient: {
|
|
75
|
+
email: string;
|
|
76
|
+
name?: string | undefined;
|
|
77
|
+
userId?: string | null | undefined;
|
|
78
|
+
locale?: string | null | undefined;
|
|
79
|
+
timezone?: string | null | undefined;
|
|
80
|
+
};
|
|
81
|
+
channels: ("email" | "sms" | "in_app")[];
|
|
82
|
+
data?: Record<string, string | number | boolean | null> | undefined;
|
|
83
|
+
secretKeys?: string[] | undefined;
|
|
84
|
+
bypassPreferences?: boolean | undefined;
|
|
85
|
+
targetPermission?: string | undefined;
|
|
86
|
+
}>, {
|
|
87
|
+
template: string;
|
|
88
|
+
category: "security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing";
|
|
89
|
+
recipient: {
|
|
90
|
+
email: string;
|
|
91
|
+
name?: string | undefined;
|
|
92
|
+
userId?: string | null | undefined;
|
|
93
|
+
locale?: string | null | undefined;
|
|
94
|
+
timezone?: string | null | undefined;
|
|
95
|
+
};
|
|
96
|
+
channels: ("email" | "sms" | "in_app")[];
|
|
97
|
+
data: Record<string, string | number | boolean | null>;
|
|
98
|
+
secretKeys: string[];
|
|
99
|
+
bypassPreferences?: boolean | undefined;
|
|
100
|
+
targetPermission?: string | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
template: string;
|
|
103
|
+
category: "security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing";
|
|
104
|
+
recipient: {
|
|
105
|
+
email: string;
|
|
106
|
+
name?: string | undefined;
|
|
107
|
+
userId?: string | null | undefined;
|
|
108
|
+
locale?: string | null | undefined;
|
|
109
|
+
timezone?: string | null | undefined;
|
|
110
|
+
};
|
|
111
|
+
channels: ("email" | "sms" | "in_app")[];
|
|
112
|
+
data?: Record<string, string | number | boolean | null> | undefined;
|
|
113
|
+
secretKeys?: string[] | undefined;
|
|
114
|
+
bypassPreferences?: boolean | undefined;
|
|
115
|
+
targetPermission?: string | undefined;
|
|
116
|
+
}>>;
|
|
117
|
+
/** Commands with their schemas. */
|
|
118
|
+
export declare const NOTIFICATION_COMMANDS: {
|
|
119
|
+
readonly "notification.send.requested": z.ZodIntersection<z.ZodObject<{
|
|
120
|
+
companyId: z.ZodNullable<z.ZodString>;
|
|
121
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
122
|
+
companyId: z.ZodNullable<z.ZodString>;
|
|
123
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
124
|
+
companyId: z.ZodNullable<z.ZodString>;
|
|
125
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodEffects<z.ZodObject<{
|
|
126
|
+
template: z.ZodString;
|
|
127
|
+
category: z.ZodEnum<["security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing", ...("security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing")[]]>;
|
|
128
|
+
recipient: z.ZodObject<{
|
|
129
|
+
email: z.ZodString;
|
|
130
|
+
name: z.ZodOptional<z.ZodString>;
|
|
131
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
|
+
locale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
133
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
email: string;
|
|
136
|
+
name?: string | undefined;
|
|
137
|
+
userId?: string | null | undefined;
|
|
138
|
+
locale?: string | null | undefined;
|
|
139
|
+
timezone?: string | null | undefined;
|
|
140
|
+
}, {
|
|
141
|
+
email: string;
|
|
142
|
+
name?: string | undefined;
|
|
143
|
+
userId?: string | null | undefined;
|
|
144
|
+
locale?: string | null | undefined;
|
|
145
|
+
timezone?: string | null | undefined;
|
|
146
|
+
}>;
|
|
147
|
+
channels: z.ZodEffects<z.ZodArray<z.ZodEnum<["email" | "sms" | "in_app", ...("email" | "sms" | "in_app")[]]>, "many">, ("email" | "sms" | "in_app")[], ("email" | "sms" | "in_app")[]>;
|
|
148
|
+
data: z.ZodEffects<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null> | undefined>;
|
|
149
|
+
secretKeys: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
150
|
+
bypassPreferences: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
+
targetPermission: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
template: string;
|
|
154
|
+
category: "security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing";
|
|
155
|
+
recipient: {
|
|
156
|
+
email: string;
|
|
157
|
+
name?: string | undefined;
|
|
158
|
+
userId?: string | null | undefined;
|
|
159
|
+
locale?: string | null | undefined;
|
|
160
|
+
timezone?: string | null | undefined;
|
|
161
|
+
};
|
|
162
|
+
channels: ("email" | "sms" | "in_app")[];
|
|
163
|
+
data: Record<string, string | number | boolean | null>;
|
|
164
|
+
secretKeys: string[];
|
|
165
|
+
bypassPreferences?: boolean | undefined;
|
|
166
|
+
targetPermission?: string | undefined;
|
|
167
|
+
}, {
|
|
168
|
+
template: string;
|
|
169
|
+
category: "security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing";
|
|
170
|
+
recipient: {
|
|
171
|
+
email: string;
|
|
172
|
+
name?: string | undefined;
|
|
173
|
+
userId?: string | null | undefined;
|
|
174
|
+
locale?: string | null | undefined;
|
|
175
|
+
timezone?: string | null | undefined;
|
|
176
|
+
};
|
|
177
|
+
channels: ("email" | "sms" | "in_app")[];
|
|
178
|
+
data?: Record<string, string | number | boolean | null> | undefined;
|
|
179
|
+
secretKeys?: string[] | undefined;
|
|
180
|
+
bypassPreferences?: boolean | undefined;
|
|
181
|
+
targetPermission?: string | undefined;
|
|
182
|
+
}>, {
|
|
183
|
+
template: string;
|
|
184
|
+
category: "security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing";
|
|
185
|
+
recipient: {
|
|
186
|
+
email: string;
|
|
187
|
+
name?: string | undefined;
|
|
188
|
+
userId?: string | null | undefined;
|
|
189
|
+
locale?: string | null | undefined;
|
|
190
|
+
timezone?: string | null | undefined;
|
|
191
|
+
};
|
|
192
|
+
channels: ("email" | "sms" | "in_app")[];
|
|
193
|
+
data: Record<string, string | number | boolean | null>;
|
|
194
|
+
secretKeys: string[];
|
|
195
|
+
bypassPreferences?: boolean | undefined;
|
|
196
|
+
targetPermission?: string | undefined;
|
|
197
|
+
}, {
|
|
198
|
+
template: string;
|
|
199
|
+
category: "security" | "account" | "order" | "payment" | "shipping" | "support" | "staff" | "store" | "billing";
|
|
200
|
+
recipient: {
|
|
201
|
+
email: string;
|
|
202
|
+
name?: string | undefined;
|
|
203
|
+
userId?: string | null | undefined;
|
|
204
|
+
locale?: string | null | undefined;
|
|
205
|
+
timezone?: string | null | undefined;
|
|
206
|
+
};
|
|
207
|
+
channels: ("email" | "sms" | "in_app")[];
|
|
208
|
+
data?: Record<string, string | number | boolean | null> | undefined;
|
|
209
|
+
secretKeys?: string[] | undefined;
|
|
210
|
+
bypassPreferences?: boolean | undefined;
|
|
211
|
+
targetPermission?: string | undefined;
|
|
212
|
+
}>>;
|
|
213
|
+
};
|
|
214
|
+
/** Binding pattern for security monitoring: every publisher's rejected socket handshakes. */
|
|
215
|
+
export declare const SOCKET_REJECTED_PATTERN: "*.security.socket_rejected";
|
|
216
|
+
/** `{publisher}.security.socket_rejected` for each publisher. */
|
|
217
|
+
export declare const SOCKET_REJECTED_KEYS: {
|
|
218
|
+
readonly order: "order.security.socket_rejected";
|
|
219
|
+
readonly payment: "payment.security.socket_rejected";
|
|
220
|
+
readonly shipping: "shipping.security.socket_rejected";
|
|
221
|
+
readonly store: "store.security.socket_rejected";
|
|
222
|
+
readonly auth: "auth.security.socket_rejected";
|
|
223
|
+
readonly gateway: "gateway.security.socket_rejected";
|
|
224
|
+
readonly catalog: "catalog.security.socket_rejected";
|
|
225
|
+
readonly media: "media.security.socket_rejected";
|
|
226
|
+
readonly cart: "cart.security.socket_rejected";
|
|
227
|
+
readonly notification: "notification.security.socket_rejected";
|
|
228
|
+
readonly reporting: "reporting.security.socket_rejected";
|
|
229
|
+
};
|
|
230
|
+
/** v1 payload of a rejected socket handshake (no ticket, IP or headers). */
|
|
231
|
+
export declare const socketRejectedSchema: z.ZodObject<{
|
|
232
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
+
} & {
|
|
234
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
235
|
+
namespace: z.ZodString;
|
|
236
|
+
reason: z.ZodString;
|
|
237
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
238
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
239
|
+
} & {
|
|
240
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
241
|
+
namespace: z.ZodString;
|
|
242
|
+
reason: z.ZodString;
|
|
243
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
244
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
245
|
+
} & {
|
|
246
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
247
|
+
namespace: z.ZodString;
|
|
248
|
+
reason: z.ZodString;
|
|
249
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
250
|
+
/** Every socket-rejected routing key with its schema. */
|
|
251
|
+
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<{
|
|
252
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
253
|
+
} & {
|
|
254
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
255
|
+
namespace: z.ZodString;
|
|
256
|
+
reason: z.ZodString;
|
|
257
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
258
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
259
|
+
} & {
|
|
260
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
261
|
+
namespace: z.ZodString;
|
|
262
|
+
reason: z.ZodString;
|
|
263
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
264
|
+
companyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
265
|
+
} & {
|
|
266
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
267
|
+
namespace: z.ZodString;
|
|
268
|
+
reason: z.ZodString;
|
|
269
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
270
|
+
//# sourceMappingURL=notification.d.ts.map
|
|
@@ -0,0 +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,+HAA+H;AAC/H,eAAO,MAAM,gBAAgB,EAAG,UAAmB,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,cAAc,EAAG,QAAiB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;YAsBkkG,CAAC;cAAoC,CAAC;cAA2C,CAAC;gBAA6C,CAAC;;;YAAyE,CAAC;cAAoC,CAAC;cAA2C,CAAC;gBAA6C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAtBpzG,CAAC;AAEpI,mCAAmC;AACnC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;gBAmB4kG,CAAC;kBAAoC,CAAC;kBAA2C,CAAC;oBAA6C,CAAC;;;gBAAyE,CAAC;kBAAoC,CAAC;kBAA2C,CAAC;oBAA6C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAjB76G,CAAC;AAEX,6FAA6F;AAC7F,eAAO,MAAM,uBAAuB,EAAG,4BAAqC,CAAC;AAE7E,iEAAiE;AACjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;CAA2C,CAAC;AAE7E,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;gCAI/B,CAAC;AAEH,yDAAyD;AACzD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;iCAAyD,CAAC"}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/** order-service events: orders and order issues. Customer contact details are never in payloads. */
|
|
2
|
+
import { z } from '@heavybit/shared-lib';
|
|
3
|
+
/** Routing keys published by order-service. */
|
|
4
|
+
export declare const ORDER_KEYS: {
|
|
5
|
+
readonly order: {
|
|
6
|
+
readonly created: "order.order.created";
|
|
7
|
+
readonly paid: "order.order.paid";
|
|
8
|
+
readonly statusChanged: "order.order.status_changed";
|
|
9
|
+
readonly shipped: "order.order.shipped";
|
|
10
|
+
readonly delivered: "order.order.delivered";
|
|
11
|
+
readonly cancelled: "order.order.cancelled";
|
|
12
|
+
readonly expired: "order.order.expired";
|
|
13
|
+
readonly refundRequested: "order.order.refund_requested";
|
|
14
|
+
};
|
|
15
|
+
readonly issue: {
|
|
16
|
+
readonly opened: "order.issue.opened";
|
|
17
|
+
readonly replied: "order.issue.replied";
|
|
18
|
+
readonly escalated: "order.issue.escalated";
|
|
19
|
+
readonly resolved: "order.issue.resolved";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/** v1 payload schemas of the order events. */
|
|
23
|
+
export declare const ORDER_EVENTS: {
|
|
24
|
+
readonly "order.order.created": z.ZodObject<{
|
|
25
|
+
companyId: z.ZodString;
|
|
26
|
+
} & {
|
|
27
|
+
userId: z.ZodString;
|
|
28
|
+
grandTotal: z.ZodString;
|
|
29
|
+
currency: z.ZodLiteral<"KES">;
|
|
30
|
+
orderId: z.ZodString;
|
|
31
|
+
orderNumber: z.ZodString;
|
|
32
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
33
|
+
companyId: z.ZodString;
|
|
34
|
+
} & {
|
|
35
|
+
userId: z.ZodString;
|
|
36
|
+
grandTotal: z.ZodString;
|
|
37
|
+
currency: z.ZodLiteral<"KES">;
|
|
38
|
+
orderId: z.ZodString;
|
|
39
|
+
orderNumber: z.ZodString;
|
|
40
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
41
|
+
companyId: z.ZodString;
|
|
42
|
+
} & {
|
|
43
|
+
userId: z.ZodString;
|
|
44
|
+
grandTotal: z.ZodString;
|
|
45
|
+
currency: z.ZodLiteral<"KES">;
|
|
46
|
+
orderId: z.ZodString;
|
|
47
|
+
orderNumber: z.ZodString;
|
|
48
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
49
|
+
readonly "order.order.paid": z.ZodObject<{
|
|
50
|
+
companyId: z.ZodString;
|
|
51
|
+
} & {
|
|
52
|
+
userId: z.ZodString;
|
|
53
|
+
grandTotal: z.ZodString;
|
|
54
|
+
currency: z.ZodLiteral<"KES">;
|
|
55
|
+
paidAt: z.ZodString;
|
|
56
|
+
orderId: z.ZodString;
|
|
57
|
+
orderNumber: z.ZodString;
|
|
58
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
59
|
+
companyId: z.ZodString;
|
|
60
|
+
} & {
|
|
61
|
+
userId: z.ZodString;
|
|
62
|
+
grandTotal: z.ZodString;
|
|
63
|
+
currency: z.ZodLiteral<"KES">;
|
|
64
|
+
paidAt: z.ZodString;
|
|
65
|
+
orderId: z.ZodString;
|
|
66
|
+
orderNumber: z.ZodString;
|
|
67
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
68
|
+
companyId: z.ZodString;
|
|
69
|
+
} & {
|
|
70
|
+
userId: z.ZodString;
|
|
71
|
+
grandTotal: z.ZodString;
|
|
72
|
+
currency: z.ZodLiteral<"KES">;
|
|
73
|
+
paidAt: z.ZodString;
|
|
74
|
+
orderId: z.ZodString;
|
|
75
|
+
orderNumber: z.ZodString;
|
|
76
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
77
|
+
readonly "order.order.status_changed": z.ZodObject<{
|
|
78
|
+
companyId: z.ZodString;
|
|
79
|
+
} & {
|
|
80
|
+
from: z.ZodString;
|
|
81
|
+
to: z.ZodString;
|
|
82
|
+
orderId: z.ZodString;
|
|
83
|
+
orderNumber: z.ZodString;
|
|
84
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
85
|
+
companyId: z.ZodString;
|
|
86
|
+
} & {
|
|
87
|
+
from: z.ZodString;
|
|
88
|
+
to: z.ZodString;
|
|
89
|
+
orderId: z.ZodString;
|
|
90
|
+
orderNumber: z.ZodString;
|
|
91
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
92
|
+
companyId: z.ZodString;
|
|
93
|
+
} & {
|
|
94
|
+
from: z.ZodString;
|
|
95
|
+
to: z.ZodString;
|
|
96
|
+
orderId: z.ZodString;
|
|
97
|
+
orderNumber: z.ZodString;
|
|
98
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
99
|
+
readonly "order.order.shipped": z.ZodObject<{
|
|
100
|
+
companyId: z.ZodString;
|
|
101
|
+
} & {
|
|
102
|
+
userId: z.ZodString;
|
|
103
|
+
shipmentId: z.ZodString;
|
|
104
|
+
orderId: z.ZodString;
|
|
105
|
+
orderNumber: z.ZodString;
|
|
106
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
107
|
+
companyId: z.ZodString;
|
|
108
|
+
} & {
|
|
109
|
+
userId: z.ZodString;
|
|
110
|
+
shipmentId: z.ZodString;
|
|
111
|
+
orderId: z.ZodString;
|
|
112
|
+
orderNumber: z.ZodString;
|
|
113
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
114
|
+
companyId: z.ZodString;
|
|
115
|
+
} & {
|
|
116
|
+
userId: z.ZodString;
|
|
117
|
+
shipmentId: z.ZodString;
|
|
118
|
+
orderId: z.ZodString;
|
|
119
|
+
orderNumber: z.ZodString;
|
|
120
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
121
|
+
readonly "order.order.delivered": z.ZodObject<{
|
|
122
|
+
companyId: z.ZodString;
|
|
123
|
+
} & {
|
|
124
|
+
userId: z.ZodString;
|
|
125
|
+
deliveredAt: z.ZodString;
|
|
126
|
+
orderId: z.ZodString;
|
|
127
|
+
orderNumber: z.ZodString;
|
|
128
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
129
|
+
companyId: z.ZodString;
|
|
130
|
+
} & {
|
|
131
|
+
userId: z.ZodString;
|
|
132
|
+
deliveredAt: z.ZodString;
|
|
133
|
+
orderId: z.ZodString;
|
|
134
|
+
orderNumber: z.ZodString;
|
|
135
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
136
|
+
companyId: z.ZodString;
|
|
137
|
+
} & {
|
|
138
|
+
userId: z.ZodString;
|
|
139
|
+
deliveredAt: z.ZodString;
|
|
140
|
+
orderId: z.ZodString;
|
|
141
|
+
orderNumber: z.ZodString;
|
|
142
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
143
|
+
readonly "order.order.cancelled": z.ZodObject<{
|
|
144
|
+
companyId: z.ZodString;
|
|
145
|
+
} & {
|
|
146
|
+
userId: z.ZodString;
|
|
147
|
+
reason: z.ZodString;
|
|
148
|
+
orderId: z.ZodString;
|
|
149
|
+
orderNumber: z.ZodString;
|
|
150
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
151
|
+
companyId: z.ZodString;
|
|
152
|
+
} & {
|
|
153
|
+
userId: z.ZodString;
|
|
154
|
+
reason: z.ZodString;
|
|
155
|
+
orderId: z.ZodString;
|
|
156
|
+
orderNumber: z.ZodString;
|
|
157
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
158
|
+
companyId: z.ZodString;
|
|
159
|
+
} & {
|
|
160
|
+
userId: z.ZodString;
|
|
161
|
+
reason: z.ZodString;
|
|
162
|
+
orderId: z.ZodString;
|
|
163
|
+
orderNumber: z.ZodString;
|
|
164
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
165
|
+
readonly "order.order.expired": z.ZodObject<{
|
|
166
|
+
companyId: z.ZodString;
|
|
167
|
+
} & {
|
|
168
|
+
userId: z.ZodString;
|
|
169
|
+
orderId: z.ZodString;
|
|
170
|
+
orderNumber: z.ZodString;
|
|
171
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
172
|
+
companyId: z.ZodString;
|
|
173
|
+
} & {
|
|
174
|
+
userId: z.ZodString;
|
|
175
|
+
orderId: z.ZodString;
|
|
176
|
+
orderNumber: z.ZodString;
|
|
177
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
178
|
+
companyId: z.ZodString;
|
|
179
|
+
} & {
|
|
180
|
+
userId: z.ZodString;
|
|
181
|
+
orderId: z.ZodString;
|
|
182
|
+
orderNumber: z.ZodString;
|
|
183
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
184
|
+
readonly "order.order.refund_requested": z.ZodObject<{
|
|
185
|
+
companyId: z.ZodString;
|
|
186
|
+
} & {
|
|
187
|
+
refundId: z.ZodString;
|
|
188
|
+
amount: z.ZodString;
|
|
189
|
+
currency: z.ZodLiteral<"KES">;
|
|
190
|
+
reason: z.ZodString;
|
|
191
|
+
orderId: z.ZodString;
|
|
192
|
+
orderNumber: z.ZodString;
|
|
193
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
194
|
+
companyId: z.ZodString;
|
|
195
|
+
} & {
|
|
196
|
+
refundId: z.ZodString;
|
|
197
|
+
amount: z.ZodString;
|
|
198
|
+
currency: z.ZodLiteral<"KES">;
|
|
199
|
+
reason: z.ZodString;
|
|
200
|
+
orderId: z.ZodString;
|
|
201
|
+
orderNumber: z.ZodString;
|
|
202
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
203
|
+
companyId: z.ZodString;
|
|
204
|
+
} & {
|
|
205
|
+
refundId: z.ZodString;
|
|
206
|
+
amount: z.ZodString;
|
|
207
|
+
currency: z.ZodLiteral<"KES">;
|
|
208
|
+
reason: z.ZodString;
|
|
209
|
+
orderId: z.ZodString;
|
|
210
|
+
orderNumber: z.ZodString;
|
|
211
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
212
|
+
readonly "order.issue.opened": z.ZodObject<{
|
|
213
|
+
companyId: z.ZodString;
|
|
214
|
+
} & {
|
|
215
|
+
issueId: z.ZodString;
|
|
216
|
+
orderId: z.ZodString;
|
|
217
|
+
userId: z.ZodString;
|
|
218
|
+
type: z.ZodString;
|
|
219
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
220
|
+
companyId: z.ZodString;
|
|
221
|
+
} & {
|
|
222
|
+
issueId: z.ZodString;
|
|
223
|
+
orderId: z.ZodString;
|
|
224
|
+
userId: z.ZodString;
|
|
225
|
+
type: z.ZodString;
|
|
226
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
227
|
+
companyId: z.ZodString;
|
|
228
|
+
} & {
|
|
229
|
+
issueId: z.ZodString;
|
|
230
|
+
orderId: z.ZodString;
|
|
231
|
+
userId: z.ZodString;
|
|
232
|
+
type: z.ZodString;
|
|
233
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
234
|
+
readonly "order.issue.replied": z.ZodObject<{
|
|
235
|
+
companyId: z.ZodString;
|
|
236
|
+
} & {
|
|
237
|
+
issueId: z.ZodString;
|
|
238
|
+
orderId: z.ZodString;
|
|
239
|
+
from: z.ZodEnum<["customer", "staff"]>;
|
|
240
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
241
|
+
companyId: z.ZodString;
|
|
242
|
+
} & {
|
|
243
|
+
issueId: z.ZodString;
|
|
244
|
+
orderId: z.ZodString;
|
|
245
|
+
from: z.ZodEnum<["customer", "staff"]>;
|
|
246
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
247
|
+
companyId: z.ZodString;
|
|
248
|
+
} & {
|
|
249
|
+
issueId: z.ZodString;
|
|
250
|
+
orderId: z.ZodString;
|
|
251
|
+
from: z.ZodEnum<["customer", "staff"]>;
|
|
252
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
253
|
+
readonly "order.issue.escalated": z.ZodObject<{
|
|
254
|
+
companyId: z.ZodString;
|
|
255
|
+
} & {
|
|
256
|
+
issueId: z.ZodString;
|
|
257
|
+
orderId: z.ZodString;
|
|
258
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
259
|
+
companyId: z.ZodString;
|
|
260
|
+
} & {
|
|
261
|
+
issueId: z.ZodString;
|
|
262
|
+
orderId: z.ZodString;
|
|
263
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
264
|
+
companyId: z.ZodString;
|
|
265
|
+
} & {
|
|
266
|
+
issueId: z.ZodString;
|
|
267
|
+
orderId: z.ZodString;
|
|
268
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
269
|
+
readonly "order.issue.resolved": z.ZodObject<{
|
|
270
|
+
companyId: z.ZodString;
|
|
271
|
+
} & {
|
|
272
|
+
issueId: z.ZodString;
|
|
273
|
+
orderId: z.ZodString;
|
|
274
|
+
resolution: z.ZodString;
|
|
275
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
276
|
+
companyId: z.ZodString;
|
|
277
|
+
} & {
|
|
278
|
+
issueId: z.ZodString;
|
|
279
|
+
orderId: z.ZodString;
|
|
280
|
+
resolution: z.ZodString;
|
|
281
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
282
|
+
companyId: z.ZodString;
|
|
283
|
+
} & {
|
|
284
|
+
issueId: z.ZodString;
|
|
285
|
+
orderId: z.ZodString;
|
|
286
|
+
resolution: z.ZodString;
|
|
287
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
288
|
+
};
|
|
289
|
+
//# sourceMappingURL=order.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../../src/events/order.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAC;AAGzC,+CAA+C;AAC/C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAiBb,CAAC;AAOX,8CAA8C;AAC9C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaf,CAAC"}
|