@contractspec/example.marketplace 1.44.0 → 1.45.0
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/entities/index.d.ts +296 -296
- package/dist/entities/order.d.ts +78 -78
- package/dist/entities/order.d.ts.map +1 -1
- package/dist/entities/payout.d.ts +65 -65
- package/dist/entities/product.d.ts +70 -70
- package/dist/entities/review.d.ts +56 -56
- package/dist/entities/store.d.ts +41 -41
- package/dist/entities/store.d.ts.map +1 -1
- package/dist/example.d.ts +3 -36
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +16 -11
- package/dist/example.js.map +1 -1
- package/dist/marketplace.feature.js +63 -63
- package/dist/marketplace.feature.js.map +1 -1
- package/dist/order/order.enum.d.ts +2 -2
- package/dist/order/order.enum.d.ts.map +1 -1
- package/dist/order/order.event.d.ts +39 -39
- package/dist/order/order.event.d.ts.map +1 -1
- package/dist/order/order.event.js +5 -5
- package/dist/order/order.event.js.map +1 -1
- package/dist/order/order.operations.d.ts +92 -92
- package/dist/order/order.operations.js +4 -4
- package/dist/order/order.operations.js.map +1 -1
- package/dist/order/order.presentation.js +3 -3
- package/dist/order/order.presentation.js.map +1 -1
- package/dist/order/order.schema.d.ts +39 -39
- package/dist/payout/payout.enum.d.ts +2 -2
- package/dist/payout/payout.event.d.ts +17 -17
- package/dist/payout/payout.event.js +2 -2
- package/dist/payout/payout.event.js.map +1 -1
- package/dist/payout/payout.operations.d.ts +24 -24
- package/dist/payout/payout.operations.d.ts.map +1 -1
- package/dist/payout/payout.operations.js +1 -1
- package/dist/payout/payout.operations.js.map +1 -1
- package/dist/payout/payout.presentation.js +2 -2
- package/dist/payout/payout.presentation.js.map +1 -1
- package/dist/payout/payout.schema.d.ts +37 -37
- package/dist/product/product.enum.d.ts +2 -2
- package/dist/product/product.event.d.ts +20 -20
- package/dist/product/product.event.js +3 -3
- package/dist/product/product.event.js.map +1 -1
- package/dist/product/product.operations.d.ts +68 -68
- package/dist/product/product.operations.js +3 -3
- package/dist/product/product.operations.js.map +1 -1
- package/dist/product/product.presentation.js +3 -3
- package/dist/product/product.presentation.js.map +1 -1
- package/dist/product/product.schema.d.ts +52 -52
- package/dist/review/review.enum.d.ts +2 -2
- package/dist/review/review.event.d.ts +14 -14
- package/dist/review/review.event.js +2 -2
- package/dist/review/review.event.js.map +1 -1
- package/dist/review/review.operations.d.ts +59 -59
- package/dist/review/review.operations.d.ts.map +1 -1
- package/dist/review/review.operations.js +3 -3
- package/dist/review/review.operations.js.map +1 -1
- package/dist/review/review.presentation.js +2 -2
- package/dist/review/review.presentation.js.map +1 -1
- package/dist/review/review.schema.d.ts +45 -45
- package/dist/review/review.schema.d.ts.map +1 -1
- package/dist/store/store.enum.d.ts +2 -2
- package/dist/store/store.enum.d.ts.map +1 -1
- package/dist/store/store.event.d.ts +13 -13
- package/dist/store/store.event.js +2 -2
- package/dist/store/store.event.js.map +1 -1
- package/dist/store/store.operations.d.ts +33 -33
- package/dist/store/store.operations.js +2 -2
- package/dist/store/store.operations.js.map +1 -1
- package/dist/store/store.presentation.js +2 -2
- package/dist/store/store.presentation.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema863 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/product/product.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A product listing.
|
|
6
6
|
*/
|
|
7
|
-
declare const ProductModel:
|
|
7
|
+
declare const ProductModel: _contractspec_lib_schema863.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
storeId: {
|
|
13
|
-
type:
|
|
13
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
name: {
|
|
17
|
-
type:
|
|
17
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
18
18
|
isOptional: false;
|
|
19
19
|
};
|
|
20
20
|
slug: {
|
|
21
|
-
type:
|
|
21
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
description: {
|
|
25
|
-
type:
|
|
25
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
26
26
|
isOptional: true;
|
|
27
27
|
};
|
|
28
28
|
status: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema863.EnumType<[string, string, string, string, string, string]>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
price: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
currency: {
|
|
37
|
-
type:
|
|
37
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
38
38
|
isOptional: false;
|
|
39
39
|
};
|
|
40
40
|
quantity: {
|
|
41
|
-
type:
|
|
41
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
42
42
|
isOptional: false;
|
|
43
43
|
};
|
|
44
44
|
categoryId: {
|
|
45
|
-
type:
|
|
45
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
46
46
|
isOptional: true;
|
|
47
47
|
};
|
|
48
48
|
primaryImageId: {
|
|
49
|
-
type:
|
|
49
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
50
50
|
isOptional: true;
|
|
51
51
|
};
|
|
52
52
|
averageRating: {
|
|
53
|
-
type:
|
|
53
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
54
54
|
isOptional: false;
|
|
55
55
|
};
|
|
56
56
|
totalSold: {
|
|
57
|
-
type:
|
|
57
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
58
58
|
isOptional: false;
|
|
59
59
|
};
|
|
60
60
|
createdAt: {
|
|
61
|
-
type:
|
|
61
|
+
type: _contractspec_lib_schema863.FieldType<Date, string>;
|
|
62
62
|
isOptional: false;
|
|
63
63
|
};
|
|
64
64
|
}>;
|
|
65
65
|
/**
|
|
66
66
|
* Input for creating a product.
|
|
67
67
|
*/
|
|
68
|
-
declare const CreateProductInputModel:
|
|
68
|
+
declare const CreateProductInputModel: _contractspec_lib_schema863.SchemaModel<{
|
|
69
69
|
storeId: {
|
|
70
|
-
type:
|
|
70
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
71
71
|
isOptional: false;
|
|
72
72
|
};
|
|
73
73
|
name: {
|
|
74
|
-
type:
|
|
74
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
75
75
|
isOptional: false;
|
|
76
76
|
};
|
|
77
77
|
slug: {
|
|
78
|
-
type:
|
|
78
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
79
79
|
isOptional: false;
|
|
80
80
|
};
|
|
81
81
|
description: {
|
|
82
|
-
type:
|
|
82
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
83
83
|
isOptional: true;
|
|
84
84
|
};
|
|
85
85
|
price: {
|
|
86
|
-
type:
|
|
86
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
87
87
|
isOptional: false;
|
|
88
88
|
};
|
|
89
89
|
currency: {
|
|
90
|
-
type:
|
|
90
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
91
91
|
isOptional: true;
|
|
92
92
|
};
|
|
93
93
|
quantity: {
|
|
94
|
-
type:
|
|
94
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
95
95
|
isOptional: true;
|
|
96
96
|
};
|
|
97
97
|
categoryId: {
|
|
98
|
-
type:
|
|
98
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
99
99
|
isOptional: true;
|
|
100
100
|
};
|
|
101
101
|
sku: {
|
|
102
|
-
type:
|
|
102
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
103
103
|
isOptional: true;
|
|
104
104
|
};
|
|
105
105
|
}>;
|
|
106
106
|
/**
|
|
107
107
|
* Input for listing products.
|
|
108
108
|
*/
|
|
109
|
-
declare const ListProductsInputModel:
|
|
109
|
+
declare const ListProductsInputModel: _contractspec_lib_schema863.SchemaModel<{
|
|
110
110
|
storeId: {
|
|
111
|
-
type:
|
|
111
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
112
112
|
isOptional: true;
|
|
113
113
|
};
|
|
114
114
|
categoryId: {
|
|
115
|
-
type:
|
|
115
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
116
116
|
isOptional: true;
|
|
117
117
|
};
|
|
118
118
|
status: {
|
|
119
|
-
type:
|
|
119
|
+
type: _contractspec_lib_schema863.EnumType<[string, string, string, string, string, string]>;
|
|
120
120
|
isOptional: true;
|
|
121
121
|
};
|
|
122
122
|
search: {
|
|
123
|
-
type:
|
|
123
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
124
124
|
isOptional: true;
|
|
125
125
|
};
|
|
126
126
|
minPrice: {
|
|
127
|
-
type:
|
|
127
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
128
128
|
isOptional: true;
|
|
129
129
|
};
|
|
130
130
|
maxPrice: {
|
|
131
|
-
type:
|
|
131
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
132
132
|
isOptional: true;
|
|
133
133
|
};
|
|
134
134
|
limit: {
|
|
135
|
-
type:
|
|
135
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
136
136
|
isOptional: true;
|
|
137
137
|
defaultValue: number;
|
|
138
138
|
};
|
|
139
139
|
offset: {
|
|
140
|
-
type:
|
|
140
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
141
141
|
isOptional: true;
|
|
142
142
|
defaultValue: number;
|
|
143
143
|
};
|
|
@@ -145,63 +145,63 @@ declare const ListProductsInputModel: _contractspec_lib_schema940.SchemaModel<{
|
|
|
145
145
|
/**
|
|
146
146
|
* Output for listing products.
|
|
147
147
|
*/
|
|
148
|
-
declare const ListProductsOutputModel:
|
|
148
|
+
declare const ListProductsOutputModel: _contractspec_lib_schema863.SchemaModel<{
|
|
149
149
|
products: {
|
|
150
|
-
type:
|
|
150
|
+
type: _contractspec_lib_schema863.SchemaModel<{
|
|
151
151
|
id: {
|
|
152
|
-
type:
|
|
152
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
153
153
|
isOptional: false;
|
|
154
154
|
};
|
|
155
155
|
storeId: {
|
|
156
|
-
type:
|
|
156
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
157
157
|
isOptional: false;
|
|
158
158
|
};
|
|
159
159
|
name: {
|
|
160
|
-
type:
|
|
160
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
161
161
|
isOptional: false;
|
|
162
162
|
};
|
|
163
163
|
slug: {
|
|
164
|
-
type:
|
|
164
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
165
165
|
isOptional: false;
|
|
166
166
|
};
|
|
167
167
|
description: {
|
|
168
|
-
type:
|
|
168
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
169
169
|
isOptional: true;
|
|
170
170
|
};
|
|
171
171
|
status: {
|
|
172
|
-
type:
|
|
172
|
+
type: _contractspec_lib_schema863.EnumType<[string, string, string, string, string, string]>;
|
|
173
173
|
isOptional: false;
|
|
174
174
|
};
|
|
175
175
|
price: {
|
|
176
|
-
type:
|
|
176
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
177
177
|
isOptional: false;
|
|
178
178
|
};
|
|
179
179
|
currency: {
|
|
180
|
-
type:
|
|
180
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
181
181
|
isOptional: false;
|
|
182
182
|
};
|
|
183
183
|
quantity: {
|
|
184
|
-
type:
|
|
184
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
185
185
|
isOptional: false;
|
|
186
186
|
};
|
|
187
187
|
categoryId: {
|
|
188
|
-
type:
|
|
188
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
189
189
|
isOptional: true;
|
|
190
190
|
};
|
|
191
191
|
primaryImageId: {
|
|
192
|
-
type:
|
|
192
|
+
type: _contractspec_lib_schema863.FieldType<string, string>;
|
|
193
193
|
isOptional: true;
|
|
194
194
|
};
|
|
195
195
|
averageRating: {
|
|
196
|
-
type:
|
|
196
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
197
197
|
isOptional: false;
|
|
198
198
|
};
|
|
199
199
|
totalSold: {
|
|
200
|
-
type:
|
|
200
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
201
201
|
isOptional: false;
|
|
202
202
|
};
|
|
203
203
|
createdAt: {
|
|
204
|
-
type:
|
|
204
|
+
type: _contractspec_lib_schema863.FieldType<Date, string>;
|
|
205
205
|
isOptional: false;
|
|
206
206
|
};
|
|
207
207
|
}>;
|
|
@@ -209,7 +209,7 @@ declare const ListProductsOutputModel: _contractspec_lib_schema940.SchemaModel<{
|
|
|
209
209
|
isOptional: false;
|
|
210
210
|
};
|
|
211
211
|
total: {
|
|
212
|
-
type:
|
|
212
|
+
type: _contractspec_lib_schema863.FieldType<number, number>;
|
|
213
213
|
isOptional: false;
|
|
214
214
|
};
|
|
215
215
|
}>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema915 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/review/review.enum.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Review status enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const ReviewStatusEnum:
|
|
7
|
+
declare const ReviewStatusEnum: _contractspec_lib_schema915.EnumType<[string, string, string, string]>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { ReviewStatusEnum };
|
|
10
10
|
//# sourceMappingURL=review.enum.d.ts.map
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema916 from "@contractspec/lib.schema";
|
|
2
2
|
import * as _contractspec_lib_contracts14 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/review/review.event.d.ts
|
|
5
|
-
declare const ReviewCreatedEvent: _contractspec_lib_contracts14.EventSpec<
|
|
5
|
+
declare const ReviewCreatedEvent: _contractspec_lib_contracts14.EventSpec<_contractspec_lib_schema916.SchemaModel<{
|
|
6
6
|
reviewId: {
|
|
7
|
-
type:
|
|
7
|
+
type: _contractspec_lib_schema916.FieldType<string, string>;
|
|
8
8
|
isOptional: false;
|
|
9
9
|
};
|
|
10
10
|
productId: {
|
|
11
|
-
type:
|
|
11
|
+
type: _contractspec_lib_schema916.FieldType<string, string>;
|
|
12
12
|
isOptional: true;
|
|
13
13
|
};
|
|
14
14
|
storeId: {
|
|
15
|
-
type:
|
|
15
|
+
type: _contractspec_lib_schema916.FieldType<string, string>;
|
|
16
16
|
isOptional: true;
|
|
17
17
|
};
|
|
18
18
|
authorId: {
|
|
19
|
-
type:
|
|
19
|
+
type: _contractspec_lib_schema916.FieldType<string, string>;
|
|
20
20
|
isOptional: false;
|
|
21
21
|
};
|
|
22
22
|
rating: {
|
|
23
|
-
type:
|
|
23
|
+
type: _contractspec_lib_schema916.FieldType<number, number>;
|
|
24
24
|
isOptional: false;
|
|
25
25
|
};
|
|
26
26
|
isVerifiedPurchase: {
|
|
27
|
-
type:
|
|
27
|
+
type: _contractspec_lib_schema916.FieldType<boolean, boolean>;
|
|
28
28
|
isOptional: false;
|
|
29
29
|
};
|
|
30
30
|
timestamp: {
|
|
31
|
-
type:
|
|
31
|
+
type: _contractspec_lib_schema916.FieldType<Date, string>;
|
|
32
32
|
isOptional: false;
|
|
33
33
|
};
|
|
34
34
|
}>>;
|
|
35
|
-
declare const ReviewRespondedEvent: _contractspec_lib_contracts14.EventSpec<
|
|
35
|
+
declare const ReviewRespondedEvent: _contractspec_lib_contracts14.EventSpec<_contractspec_lib_schema916.SchemaModel<{
|
|
36
36
|
reviewId: {
|
|
37
|
-
type:
|
|
37
|
+
type: _contractspec_lib_schema916.FieldType<string, string>;
|
|
38
38
|
isOptional: false;
|
|
39
39
|
};
|
|
40
40
|
responseId: {
|
|
41
|
-
type:
|
|
41
|
+
type: _contractspec_lib_schema916.FieldType<string, string>;
|
|
42
42
|
isOptional: false;
|
|
43
43
|
};
|
|
44
44
|
authorId: {
|
|
45
|
-
type:
|
|
45
|
+
type: _contractspec_lib_schema916.FieldType<string, string>;
|
|
46
46
|
isOptional: false;
|
|
47
47
|
};
|
|
48
48
|
timestamp: {
|
|
49
|
-
type:
|
|
49
|
+
type: _contractspec_lib_schema916.FieldType<Date, string>;
|
|
50
50
|
isOptional: false;
|
|
51
51
|
};
|
|
52
52
|
}>>;
|
|
@@ -59,7 +59,7 @@ const ReviewRespondedPayload = defineSchemaModel({
|
|
|
59
59
|
const ReviewCreatedEvent = defineEvent({
|
|
60
60
|
meta: {
|
|
61
61
|
key: "marketplace.review.created",
|
|
62
|
-
version: 1,
|
|
62
|
+
version: "1.0.0",
|
|
63
63
|
description: "A review has been created.",
|
|
64
64
|
stability: "experimental",
|
|
65
65
|
owners: ["@marketplace-team"],
|
|
@@ -70,7 +70,7 @@ const ReviewCreatedEvent = defineEvent({
|
|
|
70
70
|
const ReviewRespondedEvent = defineEvent({
|
|
71
71
|
meta: {
|
|
72
72
|
key: "marketplace.review.responded",
|
|
73
|
-
version: 1,
|
|
73
|
+
version: "1.0.0",
|
|
74
74
|
description: "A seller has responded to a review.",
|
|
75
75
|
stability: "experimental",
|
|
76
76
|
owners: ["@marketplace-team"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.event.js","names":[],"sources":["../../src/review/review.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst ReviewCreatedPayload = defineSchemaModel({\n name: 'ReviewCreatedEventPayload',\n fields: {\n reviewId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n authorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n rating: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n isVerifiedPurchase: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst ReviewRespondedPayload = defineSchemaModel({\n name: 'ReviewRespondedEventPayload',\n fields: {\n reviewId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n responseId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n authorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const ReviewCreatedEvent = defineEvent({\n meta: {\n key: 'marketplace.review.created',\n version: 1,\n description: 'A review has been created.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'review'],\n },\n payload: ReviewCreatedPayload,\n});\n\nexport const ReviewRespondedEvent = defineEvent({\n meta: {\n key: 'marketplace.review.responded',\n version: 1,\n description: 'A seller has responded to a review.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'review'],\n },\n payload: ReviewRespondedPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,uBAAuB,kBAAkB;CAC7C,MAAM;CACN,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACrE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,QAAQ;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EAClE,oBAAoB;GAAE,MAAM,eAAe,SAAS;GAAE,YAAY;GAAO;EACzE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,yBAAyB,kBAAkB;CAC/C,MAAM;CACN,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,qBAAqB,YAAY;CAC5C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,SAAS;EAChC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,SAAS;EAChC;CACD,SAAS;CACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"review.event.js","names":[],"sources":["../../src/review/review.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst ReviewCreatedPayload = defineSchemaModel({\n name: 'ReviewCreatedEventPayload',\n fields: {\n reviewId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n authorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n rating: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n isVerifiedPurchase: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst ReviewRespondedPayload = defineSchemaModel({\n name: 'ReviewRespondedEventPayload',\n fields: {\n reviewId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n responseId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n authorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const ReviewCreatedEvent = defineEvent({\n meta: {\n key: 'marketplace.review.created',\n version: '1.0.0',\n description: 'A review has been created.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'review'],\n },\n payload: ReviewCreatedPayload,\n});\n\nexport const ReviewRespondedEvent = defineEvent({\n meta: {\n key: 'marketplace.review.responded',\n version: '1.0.0',\n description: 'A seller has responded to a review.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'review'],\n },\n payload: ReviewRespondedPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,uBAAuB,kBAAkB;CAC7C,MAAM;CACN,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACrE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,QAAQ;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EAClE,oBAAoB;GAAE,MAAM,eAAe,SAAS;GAAE,YAAY;GAAO;EACzE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,yBAAyB,kBAAkB;CAC/C,MAAM;CACN,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,qBAAqB,YAAY;CAC5C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,SAAS;EAChC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,SAAS;EAChC;CACD,SAAS;CACV,CAAC"}
|