@contractspec/example.marketplace 1.44.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.
Files changed (152) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +141 -0
  3. package/dist/docs/index.d.ts +1 -0
  4. package/dist/docs/index.js +1 -0
  5. package/dist/docs/marketplace.docblock.d.ts +1 -0
  6. package/dist/docs/marketplace.docblock.js +115 -0
  7. package/dist/docs/marketplace.docblock.js.map +1 -0
  8. package/dist/entities/index.d.ts +309 -0
  9. package/dist/entities/index.d.ts.map +1 -0
  10. package/dist/entities/index.js +46 -0
  11. package/dist/entities/index.js.map +1 -0
  12. package/dist/entities/order.d.ts +105 -0
  13. package/dist/entities/order.d.ts.map +1 -0
  14. package/dist/entities/order.js +173 -0
  15. package/dist/entities/order.js.map +1 -0
  16. package/dist/entities/payout.d.ts +92 -0
  17. package/dist/entities/payout.d.ts.map +1 -0
  18. package/dist/entities/payout.js +162 -0
  19. package/dist/entities/payout.js.map +1 -0
  20. package/dist/entities/product.d.ts +93 -0
  21. package/dist/entities/product.d.ts.map +1 -0
  22. package/dist/entities/product.js +161 -0
  23. package/dist/entities/product.js.map +1 -0
  24. package/dist/entities/review.d.ts +83 -0
  25. package/dist/entities/review.d.ts.map +1 -0
  26. package/dist/entities/review.js +152 -0
  27. package/dist/entities/review.js.map +1 -0
  28. package/dist/entities/store.d.ts +60 -0
  29. package/dist/entities/store.d.ts.map +1 -0
  30. package/dist/entities/store.js +110 -0
  31. package/dist/entities/store.js.map +1 -0
  32. package/dist/example.d.ts +40 -0
  33. package/dist/example.d.ts.map +1 -0
  34. package/dist/example.js +51 -0
  35. package/dist/example.js.map +1 -0
  36. package/dist/index.d.ts +26 -0
  37. package/dist/index.js +27 -0
  38. package/dist/marketplace.feature.d.ts +12 -0
  39. package/dist/marketplace.feature.d.ts.map +1 -0
  40. package/dist/marketplace.feature.js +310 -0
  41. package/dist/marketplace.feature.js.map +1 -0
  42. package/dist/order/index.d.ts +5 -0
  43. package/dist/order/index.js +6 -0
  44. package/dist/order/order.enum.d.ts +10 -0
  45. package/dist/order/order.enum.d.ts.map +1 -0
  46. package/dist/order/order.enum.js +22 -0
  47. package/dist/order/order.enum.js.map +1 -0
  48. package/dist/order/order.event.d.ts +145 -0
  49. package/dist/order/order.event.d.ts.map +1 -0
  50. package/dist/order/order.event.js +216 -0
  51. package/dist/order/order.event.js.map +1 -0
  52. package/dist/order/order.operations.d.ts +368 -0
  53. package/dist/order/order.operations.d.ts.map +1 -0
  54. package/dist/order/order.operations.js +119 -0
  55. package/dist/order/order.operations.js.map +1 -0
  56. package/dist/order/order.presentation.d.ts +9 -0
  57. package/dist/order/order.presentation.d.ts.map +1 -0
  58. package/dist/order/order.presentation.js +86 -0
  59. package/dist/order/order.presentation.js.map +1 -0
  60. package/dist/order/order.schema.d.ts +165 -0
  61. package/dist/order/order.schema.d.ts.map +1 -0
  62. package/dist/order/order.schema.js +155 -0
  63. package/dist/order/order.schema.js.map +1 -0
  64. package/dist/payout/index.d.ts +5 -0
  65. package/dist/payout/index.js +6 -0
  66. package/dist/payout/payout.enum.d.ts +10 -0
  67. package/dist/payout/payout.enum.d.ts.map +1 -0
  68. package/dist/payout/payout.enum.js +17 -0
  69. package/dist/payout/payout.enum.js.map +1 -0
  70. package/dist/payout/payout.event.d.ts +63 -0
  71. package/dist/payout/payout.event.d.ts.map +1 -0
  72. package/dist/payout/payout.event.js +92 -0
  73. package/dist/payout/payout.event.js.map +1 -0
  74. package/dist/payout/payout.operations.d.ts +97 -0
  75. package/dist/payout/payout.operations.d.ts.map +1 -0
  76. package/dist/payout/payout.operations.js +53 -0
  77. package/dist/payout/payout.operations.js.map +1 -0
  78. package/dist/payout/payout.presentation.d.ts +8 -0
  79. package/dist/payout/payout.presentation.d.ts.map +1 -0
  80. package/dist/payout/payout.presentation.js +60 -0
  81. package/dist/payout/payout.presentation.js.map +1 -0
  82. package/dist/payout/payout.schema.d.ts +157 -0
  83. package/dist/payout/payout.schema.d.ts.map +1 -0
  84. package/dist/payout/payout.schema.js +116 -0
  85. package/dist/payout/payout.schema.js.map +1 -0
  86. package/dist/product/index.d.ts +5 -0
  87. package/dist/product/index.js +6 -0
  88. package/dist/product/product.enum.d.ts +10 -0
  89. package/dist/product/product.enum.d.ts.map +1 -0
  90. package/dist/product/product.enum.js +18 -0
  91. package/dist/product/product.enum.js.map +1 -0
  92. package/dist/product/product.event.d.ts +73 -0
  93. package/dist/product/product.event.d.ts.map +1 -0
  94. package/dist/product/product.event.js +120 -0
  95. package/dist/product/product.event.js.map +1 -0
  96. package/dist/product/product.operations.d.ts +273 -0
  97. package/dist/product/product.operations.d.ts.map +1 -0
  98. package/dist/product/product.operations.js +108 -0
  99. package/dist/product/product.operations.js.map +1 -0
  100. package/dist/product/product.presentation.d.ts +9 -0
  101. package/dist/product/product.presentation.d.ts.map +1 -0
  102. package/dist/product/product.presentation.js +86 -0
  103. package/dist/product/product.presentation.js.map +1 -0
  104. package/dist/product/product.schema.d.ts +218 -0
  105. package/dist/product/product.schema.d.ts.map +1 -0
  106. package/dist/product/product.schema.js +176 -0
  107. package/dist/product/product.schema.js.map +1 -0
  108. package/dist/review/index.d.ts +5 -0
  109. package/dist/review/index.js +6 -0
  110. package/dist/review/review.enum.d.ts +10 -0
  111. package/dist/review/review.enum.d.ts.map +1 -0
  112. package/dist/review/review.enum.js +16 -0
  113. package/dist/review/review.enum.js.map +1 -0
  114. package/dist/review/review.event.d.ts +55 -0
  115. package/dist/review/review.event.d.ts.map +1 -0
  116. package/dist/review/review.event.js +84 -0
  117. package/dist/review/review.event.js.map +1 -0
  118. package/dist/review/review.operations.d.ts +237 -0
  119. package/dist/review/review.operations.d.ts.map +1 -0
  120. package/dist/review/review.operations.js +106 -0
  121. package/dist/review/review.operations.js.map +1 -0
  122. package/dist/review/review.presentation.d.ts +8 -0
  123. package/dist/review/review.presentation.d.ts.map +1 -0
  124. package/dist/review/review.presentation.js +60 -0
  125. package/dist/review/review.presentation.js.map +1 -0
  126. package/dist/review/review.schema.d.ts +190 -0
  127. package/dist/review/review.schema.d.ts.map +1 -0
  128. package/dist/review/review.schema.js +156 -0
  129. package/dist/review/review.schema.js.map +1 -0
  130. package/dist/store/index.d.ts +5 -0
  131. package/dist/store/index.js +6 -0
  132. package/dist/store/store.enum.d.ts +10 -0
  133. package/dist/store/store.enum.d.ts.map +1 -0
  134. package/dist/store/store.enum.js +16 -0
  135. package/dist/store/store.enum.js.map +1 -0
  136. package/dist/store/store.event.d.ts +51 -0
  137. package/dist/store/store.event.d.ts.map +1 -0
  138. package/dist/store/store.event.js +80 -0
  139. package/dist/store/store.event.js.map +1 -0
  140. package/dist/store/store.operations.d.ts +131 -0
  141. package/dist/store/store.operations.d.ts.map +1 -0
  142. package/dist/store/store.operations.js +61 -0
  143. package/dist/store/store.operations.js.map +1 -0
  144. package/dist/store/store.presentation.d.ts +8 -0
  145. package/dist/store/store.presentation.d.ts.map +1 -0
  146. package/dist/store/store.presentation.js +60 -0
  147. package/dist/store/store.presentation.js.map +1 -0
  148. package/dist/store/store.schema.d.ts +84 -0
  149. package/dist/store/store.schema.d.ts.map +1 -0
  150. package/dist/store/store.schema.js +93 -0
  151. package/dist/store/store.schema.js.map +1 -0
  152. package/package.json +141 -0
@@ -0,0 +1,218 @@
1
+ import * as _contractspec_lib_schema940 from "@contractspec/lib.schema";
2
+
3
+ //#region src/product/product.schema.d.ts
4
+ /**
5
+ * A product listing.
6
+ */
7
+ declare const ProductModel: _contractspec_lib_schema940.SchemaModel<{
8
+ id: {
9
+ type: _contractspec_lib_schema940.FieldType<string, string>;
10
+ isOptional: false;
11
+ };
12
+ storeId: {
13
+ type: _contractspec_lib_schema940.FieldType<string, string>;
14
+ isOptional: false;
15
+ };
16
+ name: {
17
+ type: _contractspec_lib_schema940.FieldType<string, string>;
18
+ isOptional: false;
19
+ };
20
+ slug: {
21
+ type: _contractspec_lib_schema940.FieldType<string, string>;
22
+ isOptional: false;
23
+ };
24
+ description: {
25
+ type: _contractspec_lib_schema940.FieldType<string, string>;
26
+ isOptional: true;
27
+ };
28
+ status: {
29
+ type: _contractspec_lib_schema940.EnumType<[string, string, string, string, string, string]>;
30
+ isOptional: false;
31
+ };
32
+ price: {
33
+ type: _contractspec_lib_schema940.FieldType<number, number>;
34
+ isOptional: false;
35
+ };
36
+ currency: {
37
+ type: _contractspec_lib_schema940.FieldType<string, string>;
38
+ isOptional: false;
39
+ };
40
+ quantity: {
41
+ type: _contractspec_lib_schema940.FieldType<number, number>;
42
+ isOptional: false;
43
+ };
44
+ categoryId: {
45
+ type: _contractspec_lib_schema940.FieldType<string, string>;
46
+ isOptional: true;
47
+ };
48
+ primaryImageId: {
49
+ type: _contractspec_lib_schema940.FieldType<string, string>;
50
+ isOptional: true;
51
+ };
52
+ averageRating: {
53
+ type: _contractspec_lib_schema940.FieldType<number, number>;
54
+ isOptional: false;
55
+ };
56
+ totalSold: {
57
+ type: _contractspec_lib_schema940.FieldType<number, number>;
58
+ isOptional: false;
59
+ };
60
+ createdAt: {
61
+ type: _contractspec_lib_schema940.FieldType<Date, string>;
62
+ isOptional: false;
63
+ };
64
+ }>;
65
+ /**
66
+ * Input for creating a product.
67
+ */
68
+ declare const CreateProductInputModel: _contractspec_lib_schema940.SchemaModel<{
69
+ storeId: {
70
+ type: _contractspec_lib_schema940.FieldType<string, string>;
71
+ isOptional: false;
72
+ };
73
+ name: {
74
+ type: _contractspec_lib_schema940.FieldType<string, string>;
75
+ isOptional: false;
76
+ };
77
+ slug: {
78
+ type: _contractspec_lib_schema940.FieldType<string, string>;
79
+ isOptional: false;
80
+ };
81
+ description: {
82
+ type: _contractspec_lib_schema940.FieldType<string, string>;
83
+ isOptional: true;
84
+ };
85
+ price: {
86
+ type: _contractspec_lib_schema940.FieldType<number, number>;
87
+ isOptional: false;
88
+ };
89
+ currency: {
90
+ type: _contractspec_lib_schema940.FieldType<string, string>;
91
+ isOptional: true;
92
+ };
93
+ quantity: {
94
+ type: _contractspec_lib_schema940.FieldType<number, number>;
95
+ isOptional: true;
96
+ };
97
+ categoryId: {
98
+ type: _contractspec_lib_schema940.FieldType<string, string>;
99
+ isOptional: true;
100
+ };
101
+ sku: {
102
+ type: _contractspec_lib_schema940.FieldType<string, string>;
103
+ isOptional: true;
104
+ };
105
+ }>;
106
+ /**
107
+ * Input for listing products.
108
+ */
109
+ declare const ListProductsInputModel: _contractspec_lib_schema940.SchemaModel<{
110
+ storeId: {
111
+ type: _contractspec_lib_schema940.FieldType<string, string>;
112
+ isOptional: true;
113
+ };
114
+ categoryId: {
115
+ type: _contractspec_lib_schema940.FieldType<string, string>;
116
+ isOptional: true;
117
+ };
118
+ status: {
119
+ type: _contractspec_lib_schema940.EnumType<[string, string, string, string, string, string]>;
120
+ isOptional: true;
121
+ };
122
+ search: {
123
+ type: _contractspec_lib_schema940.FieldType<string, string>;
124
+ isOptional: true;
125
+ };
126
+ minPrice: {
127
+ type: _contractspec_lib_schema940.FieldType<number, number>;
128
+ isOptional: true;
129
+ };
130
+ maxPrice: {
131
+ type: _contractspec_lib_schema940.FieldType<number, number>;
132
+ isOptional: true;
133
+ };
134
+ limit: {
135
+ type: _contractspec_lib_schema940.FieldType<number, number>;
136
+ isOptional: true;
137
+ defaultValue: number;
138
+ };
139
+ offset: {
140
+ type: _contractspec_lib_schema940.FieldType<number, number>;
141
+ isOptional: true;
142
+ defaultValue: number;
143
+ };
144
+ }>;
145
+ /**
146
+ * Output for listing products.
147
+ */
148
+ declare const ListProductsOutputModel: _contractspec_lib_schema940.SchemaModel<{
149
+ products: {
150
+ type: _contractspec_lib_schema940.SchemaModel<{
151
+ id: {
152
+ type: _contractspec_lib_schema940.FieldType<string, string>;
153
+ isOptional: false;
154
+ };
155
+ storeId: {
156
+ type: _contractspec_lib_schema940.FieldType<string, string>;
157
+ isOptional: false;
158
+ };
159
+ name: {
160
+ type: _contractspec_lib_schema940.FieldType<string, string>;
161
+ isOptional: false;
162
+ };
163
+ slug: {
164
+ type: _contractspec_lib_schema940.FieldType<string, string>;
165
+ isOptional: false;
166
+ };
167
+ description: {
168
+ type: _contractspec_lib_schema940.FieldType<string, string>;
169
+ isOptional: true;
170
+ };
171
+ status: {
172
+ type: _contractspec_lib_schema940.EnumType<[string, string, string, string, string, string]>;
173
+ isOptional: false;
174
+ };
175
+ price: {
176
+ type: _contractspec_lib_schema940.FieldType<number, number>;
177
+ isOptional: false;
178
+ };
179
+ currency: {
180
+ type: _contractspec_lib_schema940.FieldType<string, string>;
181
+ isOptional: false;
182
+ };
183
+ quantity: {
184
+ type: _contractspec_lib_schema940.FieldType<number, number>;
185
+ isOptional: false;
186
+ };
187
+ categoryId: {
188
+ type: _contractspec_lib_schema940.FieldType<string, string>;
189
+ isOptional: true;
190
+ };
191
+ primaryImageId: {
192
+ type: _contractspec_lib_schema940.FieldType<string, string>;
193
+ isOptional: true;
194
+ };
195
+ averageRating: {
196
+ type: _contractspec_lib_schema940.FieldType<number, number>;
197
+ isOptional: false;
198
+ };
199
+ totalSold: {
200
+ type: _contractspec_lib_schema940.FieldType<number, number>;
201
+ isOptional: false;
202
+ };
203
+ createdAt: {
204
+ type: _contractspec_lib_schema940.FieldType<Date, string>;
205
+ isOptional: false;
206
+ };
207
+ }>;
208
+ isArray: true;
209
+ isOptional: false;
210
+ };
211
+ total: {
212
+ type: _contractspec_lib_schema940.FieldType<number, number>;
213
+ isOptional: false;
214
+ };
215
+ }>;
216
+ //#endregion
217
+ export { CreateProductInputModel, ListProductsInputModel, ListProductsOutputModel, ProductModel };
218
+ //# sourceMappingURL=product.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.schema.d.ts","names":[],"sources":["../../src/product/product.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,YAsBX,8BAtBuB,WAsBvB,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;;;;;;;;;;EAtBuB,WAAA,EAAA;IA2BZ,IAAA,uCAaX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;;;;EAbkC,QAAA,EAAA;IAkBvB,IAAA,uCAoBX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;EApBiC,CAAA;EAyBtB,cAAA,EAAA;IAMX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;cAjDW,qDAAuB;;UAalC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,oDAAsB;;UAoBjC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,qDAAuB;;;;cAMlC,2BAAA,CAAA"}
@@ -0,0 +1,176 @@
1
+ import { ProductStatusEnum } from "./product.enum.js";
2
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
3
+
4
+ //#region src/product/product.schema.ts
5
+ /**
6
+ * A product listing.
7
+ */
8
+ const ProductModel = defineSchemaModel({
9
+ name: "ProductModel",
10
+ description: "A product listing",
11
+ fields: {
12
+ id: {
13
+ type: ScalarTypeEnum.String_unsecure(),
14
+ isOptional: false
15
+ },
16
+ storeId: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: false
19
+ },
20
+ name: {
21
+ type: ScalarTypeEnum.String_unsecure(),
22
+ isOptional: false
23
+ },
24
+ slug: {
25
+ type: ScalarTypeEnum.String_unsecure(),
26
+ isOptional: false
27
+ },
28
+ description: {
29
+ type: ScalarTypeEnum.String_unsecure(),
30
+ isOptional: true
31
+ },
32
+ status: {
33
+ type: ProductStatusEnum,
34
+ isOptional: false
35
+ },
36
+ price: {
37
+ type: ScalarTypeEnum.Float_unsecure(),
38
+ isOptional: false
39
+ },
40
+ currency: {
41
+ type: ScalarTypeEnum.String_unsecure(),
42
+ isOptional: false
43
+ },
44
+ quantity: {
45
+ type: ScalarTypeEnum.Int_unsecure(),
46
+ isOptional: false
47
+ },
48
+ categoryId: {
49
+ type: ScalarTypeEnum.String_unsecure(),
50
+ isOptional: true
51
+ },
52
+ primaryImageId: {
53
+ type: ScalarTypeEnum.String_unsecure(),
54
+ isOptional: true
55
+ },
56
+ averageRating: {
57
+ type: ScalarTypeEnum.Float_unsecure(),
58
+ isOptional: false
59
+ },
60
+ totalSold: {
61
+ type: ScalarTypeEnum.Int_unsecure(),
62
+ isOptional: false
63
+ },
64
+ createdAt: {
65
+ type: ScalarTypeEnum.DateTime(),
66
+ isOptional: false
67
+ }
68
+ }
69
+ });
70
+ /**
71
+ * Input for creating a product.
72
+ */
73
+ const CreateProductInputModel = defineSchemaModel({
74
+ name: "CreateProductInput",
75
+ fields: {
76
+ storeId: {
77
+ type: ScalarTypeEnum.String_unsecure(),
78
+ isOptional: false
79
+ },
80
+ name: {
81
+ type: ScalarTypeEnum.NonEmptyString(),
82
+ isOptional: false
83
+ },
84
+ slug: {
85
+ type: ScalarTypeEnum.NonEmptyString(),
86
+ isOptional: false
87
+ },
88
+ description: {
89
+ type: ScalarTypeEnum.String_unsecure(),
90
+ isOptional: true
91
+ },
92
+ price: {
93
+ type: ScalarTypeEnum.Float_unsecure(),
94
+ isOptional: false
95
+ },
96
+ currency: {
97
+ type: ScalarTypeEnum.String_unsecure(),
98
+ isOptional: true
99
+ },
100
+ quantity: {
101
+ type: ScalarTypeEnum.Int_unsecure(),
102
+ isOptional: true
103
+ },
104
+ categoryId: {
105
+ type: ScalarTypeEnum.String_unsecure(),
106
+ isOptional: true
107
+ },
108
+ sku: {
109
+ type: ScalarTypeEnum.String_unsecure(),
110
+ isOptional: true
111
+ }
112
+ }
113
+ });
114
+ /**
115
+ * Input for listing products.
116
+ */
117
+ const ListProductsInputModel = defineSchemaModel({
118
+ name: "ListProductsInput",
119
+ fields: {
120
+ storeId: {
121
+ type: ScalarTypeEnum.String_unsecure(),
122
+ isOptional: true
123
+ },
124
+ categoryId: {
125
+ type: ScalarTypeEnum.String_unsecure(),
126
+ isOptional: true
127
+ },
128
+ status: {
129
+ type: ProductStatusEnum,
130
+ isOptional: true
131
+ },
132
+ search: {
133
+ type: ScalarTypeEnum.String_unsecure(),
134
+ isOptional: true
135
+ },
136
+ minPrice: {
137
+ type: ScalarTypeEnum.Float_unsecure(),
138
+ isOptional: true
139
+ },
140
+ maxPrice: {
141
+ type: ScalarTypeEnum.Float_unsecure(),
142
+ isOptional: true
143
+ },
144
+ limit: {
145
+ type: ScalarTypeEnum.Int_unsecure(),
146
+ isOptional: true,
147
+ defaultValue: 20
148
+ },
149
+ offset: {
150
+ type: ScalarTypeEnum.Int_unsecure(),
151
+ isOptional: true,
152
+ defaultValue: 0
153
+ }
154
+ }
155
+ });
156
+ /**
157
+ * Output for listing products.
158
+ */
159
+ const ListProductsOutputModel = defineSchemaModel({
160
+ name: "ListProductsOutput",
161
+ fields: {
162
+ products: {
163
+ type: ProductModel,
164
+ isArray: true,
165
+ isOptional: false
166
+ },
167
+ total: {
168
+ type: ScalarTypeEnum.Int_unsecure(),
169
+ isOptional: false
170
+ }
171
+ }
172
+ });
173
+
174
+ //#endregion
175
+ export { CreateProductInputModel, ListProductsInputModel, ListProductsOutputModel, ProductModel };
176
+ //# sourceMappingURL=product.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.schema.js","names":[],"sources":["../../src/product/product.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { ProductStatusEnum } from './product.enum';\n\n/**\n * A product listing.\n */\nexport const ProductModel = defineSchemaModel({\n name: 'ProductModel',\n description: 'A product listing',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ProductStatusEnum, isOptional: false },\n price: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n quantity: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n categoryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n primaryImageId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n averageRating: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n totalSold: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a product.\n */\nexport const CreateProductInputModel = defineSchemaModel({\n name: 'CreateProductInput',\n fields: {\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n price: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n quantity: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n categoryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sku: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n/**\n * Input for listing products.\n */\nexport const ListProductsInputModel = defineSchemaModel({\n name: 'ListProductsInput',\n fields: {\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n categoryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ProductStatusEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n minPrice: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n maxPrice: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n});\n\n/**\n * Output for listing products.\n */\nexport const ListProductsOutputModel = defineSchemaModel({\n name: 'ListProductsOutput',\n fields: {\n products: { type: ProductModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n"],"mappings":";;;;;;;AAMA,MAAa,eAAe,kBAAkB;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,QAAQ;GAAE,MAAM;GAAmB,YAAY;GAAO;EACtD,OAAO;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,UAAU;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACpE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,eAAe;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EAC3E,WAAW;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACrE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,kBAAkB;CACvD,MAAM;CACN,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,MAAM;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EAClE,MAAM;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EAClE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,OAAO;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACtE,UAAU;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EACnE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE,KAAK;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAClE;CACF,CAAC;;;;AAKF,MAAa,yBAAyB,kBAAkB;CACtD,MAAM;CACN,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACrE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE,QAAQ;GAAE,MAAM;GAAmB,YAAY;GAAM;EACrD,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,UAAU;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAM;EACrE,UAAU;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAM;EACrE,OAAO;GACL,MAAM,eAAe,cAAc;GACnC,YAAY;GACZ,cAAc;GACf;EACD,QAAQ;GACN,MAAM,eAAe,cAAc;GACnC,YAAY;GACZ,cAAc;GACf;EACF;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,kBAAkB;CACvD,MAAM;CACN,QAAQ;EACN,UAAU;GAAE,MAAM;GAAc,SAAS;GAAM,YAAY;GAAO;EAClE,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EAClE;CACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ReviewStatusEnum } from "./review.enum.js";
2
+ import { CreateReviewInputModel, ListReviewsInputModel, ListReviewsOutputModel, ReviewModel } from "./review.schema.js";
3
+ import { CreateReviewContract, ListReviewsContract } from "./review.operations.js";
4
+ import { ReviewCreatedEvent, ReviewRespondedEvent } from "./review.event.js";
5
+ export { CreateReviewContract, CreateReviewInputModel, ListReviewsContract, ListReviewsInputModel, ListReviewsOutputModel, ReviewCreatedEvent, ReviewModel, ReviewRespondedEvent, ReviewStatusEnum };
@@ -0,0 +1,6 @@
1
+ import { ReviewStatusEnum } from "./review.enum.js";
2
+ import { CreateReviewInputModel, ListReviewsInputModel, ListReviewsOutputModel, ReviewModel } from "./review.schema.js";
3
+ import { CreateReviewContract, ListReviewsContract } from "./review.operations.js";
4
+ import { ReviewCreatedEvent, ReviewRespondedEvent } from "./review.event.js";
5
+
6
+ export { CreateReviewContract, CreateReviewInputModel, ListReviewsContract, ListReviewsInputModel, ListReviewsOutputModel, ReviewCreatedEvent, ReviewModel, ReviewRespondedEvent, ReviewStatusEnum };
@@ -0,0 +1,10 @@
1
+ import * as _contractspec_lib_schema992 from "@contractspec/lib.schema";
2
+
3
+ //#region src/review/review.enum.d.ts
4
+ /**
5
+ * Review status enum.
6
+ */
7
+ declare const ReviewStatusEnum: _contractspec_lib_schema992.EnumType<[string, string, string, string]>;
8
+ //#endregion
9
+ export { ReviewStatusEnum };
10
+ //# sourceMappingURL=review.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.enum.d.ts","names":[],"sources":["../../src/review/review.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,gBAKX,EAAA,2BAAA,CAL2B,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { defineEnum } from "@contractspec/lib.schema";
2
+
3
+ //#region src/review/review.enum.ts
4
+ /**
5
+ * Review status enum.
6
+ */
7
+ const ReviewStatusEnum = defineEnum("ReviewStatus", [
8
+ "PENDING",
9
+ "APPROVED",
10
+ "REJECTED",
11
+ "FLAGGED"
12
+ ]);
13
+
14
+ //#endregion
15
+ export { ReviewStatusEnum };
16
+ //# sourceMappingURL=review.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.enum.js","names":[],"sources":["../../src/review/review.enum.ts"],"sourcesContent":["import { defineEnum } from '@contractspec/lib.schema';\n\n/**\n * Review status enum.\n */\nexport const ReviewStatusEnum = defineEnum('ReviewStatus', [\n 'PENDING',\n 'APPROVED',\n 'REJECTED',\n 'FLAGGED',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,mBAAmB,WAAW,gBAAgB;CACzD;CACA;CACA;CACA;CACD,CAAC"}
@@ -0,0 +1,55 @@
1
+ import * as _contractspec_lib_schema993 from "@contractspec/lib.schema";
2
+ import * as _contractspec_lib_contracts14 from "@contractspec/lib.contracts";
3
+
4
+ //#region src/review/review.event.d.ts
5
+ declare const ReviewCreatedEvent: _contractspec_lib_contracts14.EventSpec<_contractspec_lib_schema993.SchemaModel<{
6
+ reviewId: {
7
+ type: _contractspec_lib_schema993.FieldType<string, string>;
8
+ isOptional: false;
9
+ };
10
+ productId: {
11
+ type: _contractspec_lib_schema993.FieldType<string, string>;
12
+ isOptional: true;
13
+ };
14
+ storeId: {
15
+ type: _contractspec_lib_schema993.FieldType<string, string>;
16
+ isOptional: true;
17
+ };
18
+ authorId: {
19
+ type: _contractspec_lib_schema993.FieldType<string, string>;
20
+ isOptional: false;
21
+ };
22
+ rating: {
23
+ type: _contractspec_lib_schema993.FieldType<number, number>;
24
+ isOptional: false;
25
+ };
26
+ isVerifiedPurchase: {
27
+ type: _contractspec_lib_schema993.FieldType<boolean, boolean>;
28
+ isOptional: false;
29
+ };
30
+ timestamp: {
31
+ type: _contractspec_lib_schema993.FieldType<Date, string>;
32
+ isOptional: false;
33
+ };
34
+ }>>;
35
+ declare const ReviewRespondedEvent: _contractspec_lib_contracts14.EventSpec<_contractspec_lib_schema993.SchemaModel<{
36
+ reviewId: {
37
+ type: _contractspec_lib_schema993.FieldType<string, string>;
38
+ isOptional: false;
39
+ };
40
+ responseId: {
41
+ type: _contractspec_lib_schema993.FieldType<string, string>;
42
+ isOptional: false;
43
+ };
44
+ authorId: {
45
+ type: _contractspec_lib_schema993.FieldType<string, string>;
46
+ isOptional: false;
47
+ };
48
+ timestamp: {
49
+ type: _contractspec_lib_schema993.FieldType<Date, string>;
50
+ isOptional: false;
51
+ };
52
+ }>>;
53
+ //#endregion
54
+ export { ReviewCreatedEvent, ReviewRespondedEvent };
55
+ //# sourceMappingURL=review.event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.event.d.ts","names":[],"sources":["../../src/review/review.event.ts"],"sourcesContent":[],"mappings":";;;;cA0Ba,oBAAkB,6BAAA,CAAA,sCAAA;;UAU7B,2BAAA,CAAA;;EAVW,CAAA;EAUX,SAAA,EAAA;;;;;;;;;IAV6B,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAYlB,CAAA;EAUX,MAAA,EAAA;;;;;+CAV+B,CAAA,OAAA,EAAA,OAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAAA,CAAA;;;;;;cAApB,sBAAoB,6BAAA,CAAA,sCAAA;;UAU/B,2BAAA,CAAA"}
@@ -0,0 +1,84 @@
1
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
2
+ import { defineEvent } from "@contractspec/lib.contracts";
3
+
4
+ //#region src/review/review.event.ts
5
+ const ReviewCreatedPayload = defineSchemaModel({
6
+ name: "ReviewCreatedEventPayload",
7
+ fields: {
8
+ reviewId: {
9
+ type: ScalarTypeEnum.String_unsecure(),
10
+ isOptional: false
11
+ },
12
+ productId: {
13
+ type: ScalarTypeEnum.String_unsecure(),
14
+ isOptional: true
15
+ },
16
+ storeId: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: true
19
+ },
20
+ authorId: {
21
+ type: ScalarTypeEnum.String_unsecure(),
22
+ isOptional: false
23
+ },
24
+ rating: {
25
+ type: ScalarTypeEnum.Int_unsecure(),
26
+ isOptional: false
27
+ },
28
+ isVerifiedPurchase: {
29
+ type: ScalarTypeEnum.Boolean(),
30
+ isOptional: false
31
+ },
32
+ timestamp: {
33
+ type: ScalarTypeEnum.DateTime(),
34
+ isOptional: false
35
+ }
36
+ }
37
+ });
38
+ const ReviewRespondedPayload = defineSchemaModel({
39
+ name: "ReviewRespondedEventPayload",
40
+ fields: {
41
+ reviewId: {
42
+ type: ScalarTypeEnum.String_unsecure(),
43
+ isOptional: false
44
+ },
45
+ responseId: {
46
+ type: ScalarTypeEnum.String_unsecure(),
47
+ isOptional: false
48
+ },
49
+ authorId: {
50
+ type: ScalarTypeEnum.String_unsecure(),
51
+ isOptional: false
52
+ },
53
+ timestamp: {
54
+ type: ScalarTypeEnum.DateTime(),
55
+ isOptional: false
56
+ }
57
+ }
58
+ });
59
+ const ReviewCreatedEvent = defineEvent({
60
+ meta: {
61
+ key: "marketplace.review.created",
62
+ version: 1,
63
+ description: "A review has been created.",
64
+ stability: "experimental",
65
+ owners: ["@marketplace-team"],
66
+ tags: ["marketplace", "review"]
67
+ },
68
+ payload: ReviewCreatedPayload
69
+ });
70
+ const ReviewRespondedEvent = defineEvent({
71
+ meta: {
72
+ key: "marketplace.review.responded",
73
+ version: 1,
74
+ description: "A seller has responded to a review.",
75
+ stability: "experimental",
76
+ owners: ["@marketplace-team"],
77
+ tags: ["marketplace", "review"]
78
+ },
79
+ payload: ReviewRespondedPayload
80
+ });
81
+
82
+ //#endregion
83
+ export { ReviewCreatedEvent, ReviewRespondedEvent };
84
+ //# sourceMappingURL=review.event.js.map
@@ -0,0 +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"}