@contractspec/example.marketplace 1.44.1 → 1.45.1

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 (60) hide show
  1. package/dist/entities/index.d.ts +296 -296
  2. package/dist/entities/index.d.ts.map +1 -1
  3. package/dist/entities/order.d.ts +78 -78
  4. package/dist/entities/payout.d.ts +65 -65
  5. package/dist/entities/product.d.ts +70 -70
  6. package/dist/entities/review.d.ts +56 -56
  7. package/dist/entities/store.d.ts +41 -41
  8. package/dist/example.d.ts +3 -36
  9. package/dist/example.d.ts.map +1 -1
  10. package/dist/example.js +16 -11
  11. package/dist/example.js.map +1 -1
  12. package/dist/marketplace.feature.js +63 -63
  13. package/dist/marketplace.feature.js.map +1 -1
  14. package/dist/order/order.enum.d.ts +2 -2
  15. package/dist/order/order.event.d.ts +39 -39
  16. package/dist/order/order.event.js +5 -5
  17. package/dist/order/order.event.js.map +1 -1
  18. package/dist/order/order.operations.d.ts +92 -92
  19. package/dist/order/order.operations.d.ts.map +1 -1
  20. package/dist/order/order.operations.js +4 -4
  21. package/dist/order/order.operations.js.map +1 -1
  22. package/dist/order/order.presentation.js +3 -3
  23. package/dist/order/order.presentation.js.map +1 -1
  24. package/dist/order/order.schema.d.ts +39 -39
  25. package/dist/payout/payout.enum.d.ts +2 -2
  26. package/dist/payout/payout.event.d.ts +17 -17
  27. package/dist/payout/payout.event.js +2 -2
  28. package/dist/payout/payout.event.js.map +1 -1
  29. package/dist/payout/payout.operations.d.ts +24 -24
  30. package/dist/payout/payout.operations.js +1 -1
  31. package/dist/payout/payout.operations.js.map +1 -1
  32. package/dist/payout/payout.presentation.js +2 -2
  33. package/dist/payout/payout.presentation.js.map +1 -1
  34. package/dist/product/product.enum.d.ts +2 -2
  35. package/dist/product/product.event.d.ts +19 -19
  36. package/dist/product/product.event.js +3 -3
  37. package/dist/product/product.event.js.map +1 -1
  38. package/dist/product/product.operations.d.ts +68 -68
  39. package/dist/product/product.operations.js +3 -3
  40. package/dist/product/product.operations.js.map +1 -1
  41. package/dist/product/product.presentation.js +3 -3
  42. package/dist/product/product.presentation.js.map +1 -1
  43. package/dist/product/product.schema.d.ts +52 -52
  44. package/dist/review/review.event.js +2 -2
  45. package/dist/review/review.event.js.map +1 -1
  46. package/dist/review/review.operations.d.ts +1 -1
  47. package/dist/review/review.operations.js +3 -3
  48. package/dist/review/review.operations.js.map +1 -1
  49. package/dist/review/review.presentation.js +2 -2
  50. package/dist/review/review.presentation.js.map +1 -1
  51. package/dist/store/store.enum.d.ts +2 -2
  52. package/dist/store/store.event.d.ts +13 -13
  53. package/dist/store/store.event.js +2 -2
  54. package/dist/store/store.event.js.map +1 -1
  55. package/dist/store/store.operations.d.ts +1 -1
  56. package/dist/store/store.operations.js +2 -2
  57. package/dist/store/store.operations.js.map +1 -1
  58. package/dist/store/store.presentation.js +2 -2
  59. package/dist/store/store.presentation.js.map +1 -1
  60. package/package.json +12 -12
@@ -1,143 +1,143 @@
1
- import * as _contractspec_lib_schema856 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema941 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: _contractspec_lib_schema856.SchemaModel<{
7
+ declare const ProductModel: _contractspec_lib_schema941.SchemaModel<{
8
8
  id: {
9
- type: _contractspec_lib_schema856.FieldType<string, string>;
9
+ type: _contractspec_lib_schema941.FieldType<string, string>;
10
10
  isOptional: false;
11
11
  };
12
12
  storeId: {
13
- type: _contractspec_lib_schema856.FieldType<string, string>;
13
+ type: _contractspec_lib_schema941.FieldType<string, string>;
14
14
  isOptional: false;
15
15
  };
16
16
  name: {
17
- type: _contractspec_lib_schema856.FieldType<string, string>;
17
+ type: _contractspec_lib_schema941.FieldType<string, string>;
18
18
  isOptional: false;
19
19
  };
20
20
  slug: {
21
- type: _contractspec_lib_schema856.FieldType<string, string>;
21
+ type: _contractspec_lib_schema941.FieldType<string, string>;
22
22
  isOptional: false;
23
23
  };
24
24
  description: {
25
- type: _contractspec_lib_schema856.FieldType<string, string>;
25
+ type: _contractspec_lib_schema941.FieldType<string, string>;
26
26
  isOptional: true;
27
27
  };
28
28
  status: {
29
- type: _contractspec_lib_schema856.EnumType<[string, string, string, string, string, string]>;
29
+ type: _contractspec_lib_schema941.EnumType<[string, string, string, string, string, string]>;
30
30
  isOptional: false;
31
31
  };
32
32
  price: {
33
- type: _contractspec_lib_schema856.FieldType<number, number>;
33
+ type: _contractspec_lib_schema941.FieldType<number, number>;
34
34
  isOptional: false;
35
35
  };
36
36
  currency: {
37
- type: _contractspec_lib_schema856.FieldType<string, string>;
37
+ type: _contractspec_lib_schema941.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  quantity: {
41
- type: _contractspec_lib_schema856.FieldType<number, number>;
41
+ type: _contractspec_lib_schema941.FieldType<number, number>;
42
42
  isOptional: false;
43
43
  };
44
44
  categoryId: {
45
- type: _contractspec_lib_schema856.FieldType<string, string>;
45
+ type: _contractspec_lib_schema941.FieldType<string, string>;
46
46
  isOptional: true;
47
47
  };
48
48
  primaryImageId: {
49
- type: _contractspec_lib_schema856.FieldType<string, string>;
49
+ type: _contractspec_lib_schema941.FieldType<string, string>;
50
50
  isOptional: true;
51
51
  };
52
52
  averageRating: {
53
- type: _contractspec_lib_schema856.FieldType<number, number>;
53
+ type: _contractspec_lib_schema941.FieldType<number, number>;
54
54
  isOptional: false;
55
55
  };
56
56
  totalSold: {
57
- type: _contractspec_lib_schema856.FieldType<number, number>;
57
+ type: _contractspec_lib_schema941.FieldType<number, number>;
58
58
  isOptional: false;
59
59
  };
60
60
  createdAt: {
61
- type: _contractspec_lib_schema856.FieldType<Date, string>;
61
+ type: _contractspec_lib_schema941.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: _contractspec_lib_schema856.SchemaModel<{
68
+ declare const CreateProductInputModel: _contractspec_lib_schema941.SchemaModel<{
69
69
  storeId: {
70
- type: _contractspec_lib_schema856.FieldType<string, string>;
70
+ type: _contractspec_lib_schema941.FieldType<string, string>;
71
71
  isOptional: false;
72
72
  };
73
73
  name: {
74
- type: _contractspec_lib_schema856.FieldType<string, string>;
74
+ type: _contractspec_lib_schema941.FieldType<string, string>;
75
75
  isOptional: false;
76
76
  };
77
77
  slug: {
78
- type: _contractspec_lib_schema856.FieldType<string, string>;
78
+ type: _contractspec_lib_schema941.FieldType<string, string>;
79
79
  isOptional: false;
80
80
  };
81
81
  description: {
82
- type: _contractspec_lib_schema856.FieldType<string, string>;
82
+ type: _contractspec_lib_schema941.FieldType<string, string>;
83
83
  isOptional: true;
84
84
  };
85
85
  price: {
86
- type: _contractspec_lib_schema856.FieldType<number, number>;
86
+ type: _contractspec_lib_schema941.FieldType<number, number>;
87
87
  isOptional: false;
88
88
  };
89
89
  currency: {
90
- type: _contractspec_lib_schema856.FieldType<string, string>;
90
+ type: _contractspec_lib_schema941.FieldType<string, string>;
91
91
  isOptional: true;
92
92
  };
93
93
  quantity: {
94
- type: _contractspec_lib_schema856.FieldType<number, number>;
94
+ type: _contractspec_lib_schema941.FieldType<number, number>;
95
95
  isOptional: true;
96
96
  };
97
97
  categoryId: {
98
- type: _contractspec_lib_schema856.FieldType<string, string>;
98
+ type: _contractspec_lib_schema941.FieldType<string, string>;
99
99
  isOptional: true;
100
100
  };
101
101
  sku: {
102
- type: _contractspec_lib_schema856.FieldType<string, string>;
102
+ type: _contractspec_lib_schema941.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: _contractspec_lib_schema856.SchemaModel<{
109
+ declare const ListProductsInputModel: _contractspec_lib_schema941.SchemaModel<{
110
110
  storeId: {
111
- type: _contractspec_lib_schema856.FieldType<string, string>;
111
+ type: _contractspec_lib_schema941.FieldType<string, string>;
112
112
  isOptional: true;
113
113
  };
114
114
  categoryId: {
115
- type: _contractspec_lib_schema856.FieldType<string, string>;
115
+ type: _contractspec_lib_schema941.FieldType<string, string>;
116
116
  isOptional: true;
117
117
  };
118
118
  status: {
119
- type: _contractspec_lib_schema856.EnumType<[string, string, string, string, string, string]>;
119
+ type: _contractspec_lib_schema941.EnumType<[string, string, string, string, string, string]>;
120
120
  isOptional: true;
121
121
  };
122
122
  search: {
123
- type: _contractspec_lib_schema856.FieldType<string, string>;
123
+ type: _contractspec_lib_schema941.FieldType<string, string>;
124
124
  isOptional: true;
125
125
  };
126
126
  minPrice: {
127
- type: _contractspec_lib_schema856.FieldType<number, number>;
127
+ type: _contractspec_lib_schema941.FieldType<number, number>;
128
128
  isOptional: true;
129
129
  };
130
130
  maxPrice: {
131
- type: _contractspec_lib_schema856.FieldType<number, number>;
131
+ type: _contractspec_lib_schema941.FieldType<number, number>;
132
132
  isOptional: true;
133
133
  };
134
134
  limit: {
135
- type: _contractspec_lib_schema856.FieldType<number, number>;
135
+ type: _contractspec_lib_schema941.FieldType<number, number>;
136
136
  isOptional: true;
137
137
  defaultValue: number;
138
138
  };
139
139
  offset: {
140
- type: _contractspec_lib_schema856.FieldType<number, number>;
140
+ type: _contractspec_lib_schema941.FieldType<number, number>;
141
141
  isOptional: true;
142
142
  defaultValue: number;
143
143
  };
@@ -145,63 +145,63 @@ declare const ListProductsInputModel: _contractspec_lib_schema856.SchemaModel<{
145
145
  /**
146
146
  * Output for listing products.
147
147
  */
148
- declare const ListProductsOutputModel: _contractspec_lib_schema856.SchemaModel<{
148
+ declare const ListProductsOutputModel: _contractspec_lib_schema941.SchemaModel<{
149
149
  products: {
150
- type: _contractspec_lib_schema856.SchemaModel<{
150
+ type: _contractspec_lib_schema941.SchemaModel<{
151
151
  id: {
152
- type: _contractspec_lib_schema856.FieldType<string, string>;
152
+ type: _contractspec_lib_schema941.FieldType<string, string>;
153
153
  isOptional: false;
154
154
  };
155
155
  storeId: {
156
- type: _contractspec_lib_schema856.FieldType<string, string>;
156
+ type: _contractspec_lib_schema941.FieldType<string, string>;
157
157
  isOptional: false;
158
158
  };
159
159
  name: {
160
- type: _contractspec_lib_schema856.FieldType<string, string>;
160
+ type: _contractspec_lib_schema941.FieldType<string, string>;
161
161
  isOptional: false;
162
162
  };
163
163
  slug: {
164
- type: _contractspec_lib_schema856.FieldType<string, string>;
164
+ type: _contractspec_lib_schema941.FieldType<string, string>;
165
165
  isOptional: false;
166
166
  };
167
167
  description: {
168
- type: _contractspec_lib_schema856.FieldType<string, string>;
168
+ type: _contractspec_lib_schema941.FieldType<string, string>;
169
169
  isOptional: true;
170
170
  };
171
171
  status: {
172
- type: _contractspec_lib_schema856.EnumType<[string, string, string, string, string, string]>;
172
+ type: _contractspec_lib_schema941.EnumType<[string, string, string, string, string, string]>;
173
173
  isOptional: false;
174
174
  };
175
175
  price: {
176
- type: _contractspec_lib_schema856.FieldType<number, number>;
176
+ type: _contractspec_lib_schema941.FieldType<number, number>;
177
177
  isOptional: false;
178
178
  };
179
179
  currency: {
180
- type: _contractspec_lib_schema856.FieldType<string, string>;
180
+ type: _contractspec_lib_schema941.FieldType<string, string>;
181
181
  isOptional: false;
182
182
  };
183
183
  quantity: {
184
- type: _contractspec_lib_schema856.FieldType<number, number>;
184
+ type: _contractspec_lib_schema941.FieldType<number, number>;
185
185
  isOptional: false;
186
186
  };
187
187
  categoryId: {
188
- type: _contractspec_lib_schema856.FieldType<string, string>;
188
+ type: _contractspec_lib_schema941.FieldType<string, string>;
189
189
  isOptional: true;
190
190
  };
191
191
  primaryImageId: {
192
- type: _contractspec_lib_schema856.FieldType<string, string>;
192
+ type: _contractspec_lib_schema941.FieldType<string, string>;
193
193
  isOptional: true;
194
194
  };
195
195
  averageRating: {
196
- type: _contractspec_lib_schema856.FieldType<number, number>;
196
+ type: _contractspec_lib_schema941.FieldType<number, number>;
197
197
  isOptional: false;
198
198
  };
199
199
  totalSold: {
200
- type: _contractspec_lib_schema856.FieldType<number, number>;
200
+ type: _contractspec_lib_schema941.FieldType<number, number>;
201
201
  isOptional: false;
202
202
  };
203
203
  createdAt: {
204
- type: _contractspec_lib_schema856.FieldType<Date, string>;
204
+ type: _contractspec_lib_schema941.FieldType<Date, string>;
205
205
  isOptional: false;
206
206
  };
207
207
  }>;
@@ -209,7 +209,7 @@ declare const ListProductsOutputModel: _contractspec_lib_schema856.SchemaModel<{
209
209
  isOptional: false;
210
210
  };
211
211
  total: {
212
- type: _contractspec_lib_schema856.FieldType<number, number>;
212
+ type: _contractspec_lib_schema941.FieldType<number, number>;
213
213
  isOptional: false;
214
214
  };
215
215
  }>;
@@ -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"}
@@ -81,7 +81,7 @@ declare const CreateReviewContract: _contractspec_lib_contracts16.OperationSpec<
81
81
  };
82
82
  }>, {
83
83
  key: string;
84
- version: number;
84
+ version: string;
85
85
  when: string;
86
86
  payload: _contractspec_lib_schema1006.SchemaModel<{
87
87
  id: {
@@ -9,7 +9,7 @@ const OWNERS = ["@example.marketplace"];
9
9
  const CreateReviewContract = defineCommand({
10
10
  meta: {
11
11
  key: "marketplace.review.create",
12
- version: 1,
12
+ version: "1.0.0",
13
13
  stability: "stable",
14
14
  owners: [...OWNERS],
15
15
  tags: [
@@ -29,7 +29,7 @@ const CreateReviewContract = defineCommand({
29
29
  sideEffects: {
30
30
  emits: [{
31
31
  key: "marketplace.review.created",
32
- version: 1,
32
+ version: "1.0.0",
33
33
  when: "Review is created",
34
34
  payload: ReviewModel
35
35
  }],
@@ -62,7 +62,7 @@ const CreateReviewContract = defineCommand({
62
62
  const ListReviewsContract = defineQuery({
63
63
  meta: {
64
64
  key: "marketplace.review.list",
65
- version: 1,
65
+ version: "1.0.0",
66
66
  stability: "stable",
67
67
  owners: [...OWNERS],
68
68
  tags: [
@@ -1 +1 @@
1
- {"version":3,"file":"review.operations.js","names":[],"sources":["../../src/review/review.operations.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport {\n CreateReviewInputModel,\n ListReviewsInputModel,\n ListReviewsOutputModel,\n ReviewModel,\n} from './review.schema';\n\nconst OWNERS = ['@example.marketplace'] as const;\n\n/**\n * Create a product/store review.\n */\nexport const CreateReviewContract = defineCommand({\n meta: {\n key: 'marketplace.review.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['marketplace', 'review', 'create'],\n description: 'Create a product/store review.',\n goal: 'Allow buyers to leave feedback.',\n context: 'Post-purchase.',\n },\n io: { input: CreateReviewInputModel, output: ReviewModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'marketplace.review.created',\n version: 1,\n when: 'Review is created',\n payload: ReviewModel,\n },\n ],\n audit: ['marketplace.review.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-review-happy-path',\n given: ['User purchased product'],\n when: ['User leaves a review'],\n then: ['Review is created', 'ReviewCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-5-star',\n input: { productId: 'prod-456', rating: 5, comment: 'Great product!' },\n output: { id: 'rev-789', status: 'published' },\n },\n ],\n },\n});\n\n/**\n * List reviews with filters.\n */\nexport const ListReviewsContract = defineQuery({\n meta: {\n key: 'marketplace.review.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['marketplace', 'review', 'list'],\n description: 'List reviews with filters.',\n goal: 'Display product/store reviews.',\n context: 'Product page, store page.',\n },\n io: { input: ListReviewsInputModel, output: ListReviewsOutputModel },\n policy: { auth: 'anonymous' },\n acceptance: {\n scenarios: [\n {\n key: 'list-reviews-happy-path',\n given: ['Product has reviews'],\n when: ['User views reviews'],\n then: ['List of reviews is returned'],\n },\n ],\n examples: [\n {\n key: 'list-product-reviews',\n input: { productId: 'prod-456', limit: 10 },\n output: { items: [], total: 10, hasMore: false },\n },\n ],\n },\n});\n"],"mappings":";;;;AAWA,MAAM,SAAS,CAAC,uBAAuB;;;;AAKvC,MAAa,uBAAuB,cAAc;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAU;GAAS;EACzC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAwB,QAAQ;EAAa;CAC1D,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,6BAA6B;EACtC;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,yBAAyB;GACjC,MAAM,CAAC,uBAAuB;GAC9B,MAAM,CAAC,qBAAqB,iCAAiC;GAC9D,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,WAAW;IAAY,QAAQ;IAAG,SAAS;IAAkB;GACtE,QAAQ;IAAE,IAAI;IAAW,QAAQ;IAAa;GAC/C,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAU;GAAO;EACvC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAwB;CACpE,QAAQ,EAAE,MAAM,aAAa;CAC7B,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,sBAAsB;GAC9B,MAAM,CAAC,qBAAqB;GAC5B,MAAM,CAAC,8BAA8B;GACtC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,WAAW;IAAY,OAAO;IAAI;GAC3C,QAAQ;IAAE,OAAO,EAAE;IAAE,OAAO;IAAI,SAAS;IAAO;GACjD,CACF;EACF;CACF,CAAC"}
1
+ {"version":3,"file":"review.operations.js","names":[],"sources":["../../src/review/review.operations.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport {\n CreateReviewInputModel,\n ListReviewsInputModel,\n ListReviewsOutputModel,\n ReviewModel,\n} from './review.schema';\n\nconst OWNERS = ['@example.marketplace'] as const;\n\n/**\n * Create a product/store review.\n */\nexport const CreateReviewContract = defineCommand({\n meta: {\n key: 'marketplace.review.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['marketplace', 'review', 'create'],\n description: 'Create a product/store review.',\n goal: 'Allow buyers to leave feedback.',\n context: 'Post-purchase.',\n },\n io: { input: CreateReviewInputModel, output: ReviewModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'marketplace.review.created',\n version: '1.0.0',\n when: 'Review is created',\n payload: ReviewModel,\n },\n ],\n audit: ['marketplace.review.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-review-happy-path',\n given: ['User purchased product'],\n when: ['User leaves a review'],\n then: ['Review is created', 'ReviewCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-5-star',\n input: { productId: 'prod-456', rating: 5, comment: 'Great product!' },\n output: { id: 'rev-789', status: 'published' },\n },\n ],\n },\n});\n\n/**\n * List reviews with filters.\n */\nexport const ListReviewsContract = defineQuery({\n meta: {\n key: 'marketplace.review.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['marketplace', 'review', 'list'],\n description: 'List reviews with filters.',\n goal: 'Display product/store reviews.',\n context: 'Product page, store page.',\n },\n io: { input: ListReviewsInputModel, output: ListReviewsOutputModel },\n policy: { auth: 'anonymous' },\n acceptance: {\n scenarios: [\n {\n key: 'list-reviews-happy-path',\n given: ['Product has reviews'],\n when: ['User views reviews'],\n then: ['List of reviews is returned'],\n },\n ],\n examples: [\n {\n key: 'list-product-reviews',\n input: { productId: 'prod-456', limit: 10 },\n output: { items: [], total: 10, hasMore: false },\n },\n ],\n },\n});\n"],"mappings":";;;;AAWA,MAAM,SAAS,CAAC,uBAAuB;;;;AAKvC,MAAa,uBAAuB,cAAc;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAU;GAAS;EACzC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAwB,QAAQ;EAAa;CAC1D,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,6BAA6B;EACtC;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,yBAAyB;GACjC,MAAM,CAAC,uBAAuB;GAC9B,MAAM,CAAC,qBAAqB,iCAAiC;GAC9D,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,WAAW;IAAY,QAAQ;IAAG,SAAS;IAAkB;GACtE,QAAQ;IAAE,IAAI;IAAW,QAAQ;IAAa;GAC/C,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAU;GAAO;EACvC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAwB;CACpE,QAAQ,EAAE,MAAM,aAAa;CAC7B,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,sBAAsB;GAC9B,MAAM,CAAC,qBAAqB;GAC5B,MAAM,CAAC,8BAA8B;GACtC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,WAAW;IAAY,OAAO;IAAI;GAC3C,QAAQ;IAAE,OAAO,EAAE;IAAE,OAAO;IAAI,SAAS;IAAO;GACjD,CACF;EACF;CACF,CAAC"}
@@ -5,7 +5,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
5
5
  const ReviewListPresentation = {
6
6
  meta: {
7
7
  key: "marketplace.review.list",
8
- version: 1,
8
+ version: "1.0.0",
9
9
  title: "Review List",
10
10
  description: "List of product reviews",
11
11
  domain: "marketplace",
@@ -31,7 +31,7 @@ const ReviewListPresentation = {
31
31
  const ReviewFormPresentation = {
32
32
  meta: {
33
33
  key: "marketplace.review.form",
34
- version: 1,
34
+ version: "1.0.0",
35
35
  title: "Review Form",
36
36
  description: "Form for submitting product reviews",
37
37
  domain: "marketplace",
@@ -1 +1 @@
1
- {"version":3,"file":"review.presentation.js","names":["ReviewListPresentation: PresentationSpec","ReviewFormPresentation: PresentationSpec"],"sources":["../../src/review/review.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { ReviewModel } from './review.schema';\n\nexport const ReviewListPresentation: PresentationSpec = {\n meta: {\n key: 'marketplace.review.list',\n version: 1,\n title: 'Review List',\n description: 'List of product reviews',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'review', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Show users reviews and ratings for a product.',\n context: 'Displayed on the product detail page.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ReviewList',\n props: ReviewModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['marketplace.reviews.enabled'],\n },\n};\n\nexport const ReviewFormPresentation: PresentationSpec = {\n meta: {\n key: 'marketplace.review.form',\n version: 1,\n title: 'Review Form',\n description: 'Form for submitting product reviews',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'review', 'form'],\n stability: StabilityEnum.Experimental,\n goal: 'Enable users to submit their feedback and rating for a purchase.',\n context: 'Used in the user order history or product page.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ReviewForm',\n props: ReviewModel,\n },\n targets: ['react'],\n policy: {\n flags: ['marketplace.reviews.enabled'],\n },\n};\n"],"mappings":";;;;AAIA,MAAaA,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAU;GAAO;EACvC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,8BAA8B,EACvC;CACF;AAED,MAAaC,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAU;GAAO;EACvC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,8BAA8B,EACvC;CACF"}
1
+ {"version":3,"file":"review.presentation.js","names":["ReviewListPresentation: PresentationSpec","ReviewFormPresentation: PresentationSpec"],"sources":["../../src/review/review.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { ReviewModel } from './review.schema';\n\nexport const ReviewListPresentation: PresentationSpec = {\n meta: {\n key: 'marketplace.review.list',\n version: '1.0.0',\n title: 'Review List',\n description: 'List of product reviews',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'review', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Show users reviews and ratings for a product.',\n context: 'Displayed on the product detail page.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ReviewList',\n props: ReviewModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['marketplace.reviews.enabled'],\n },\n};\n\nexport const ReviewFormPresentation: PresentationSpec = {\n meta: {\n key: 'marketplace.review.form',\n version: '1.0.0',\n title: 'Review Form',\n description: 'Form for submitting product reviews',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'review', 'form'],\n stability: StabilityEnum.Experimental,\n goal: 'Enable users to submit their feedback and rating for a purchase.',\n context: 'Used in the user order history or product page.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ReviewForm',\n props: ReviewModel,\n },\n targets: ['react'],\n policy: {\n flags: ['marketplace.reviews.enabled'],\n },\n};\n"],"mappings":";;;;AAIA,MAAaA,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAU;GAAO;EACvC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,8BAA8B,EACvC;CACF;AAED,MAAaC,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAU;GAAO;EACvC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,8BAA8B,EACvC;CACF"}
@@ -1,10 +1,10 @@
1
- import * as _contractspec_lib_schema1119 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema1107 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/store/store.enum.d.ts
4
4
  /**
5
5
  * Store status enum.
6
6
  */
7
- declare const StoreStatusEnum: _contractspec_lib_schema1119.EnumType<[string, string, string, string]>;
7
+ declare const StoreStatusEnum: _contractspec_lib_schema1107.EnumType<[string, string, string, string]>;
8
8
  //#endregion
9
9
  export { StoreStatusEnum };
10
10
  //# sourceMappingURL=store.enum.d.ts.map
@@ -1,48 +1,48 @@
1
- import * as _contractspec_lib_schema1107 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema1108 from "@contractspec/lib.schema";
2
2
  import * as _contractspec_lib_contracts18 from "@contractspec/lib.contracts";
3
3
 
4
4
  //#region src/store/store.event.d.ts
5
- declare const StoreCreatedEvent: _contractspec_lib_contracts18.EventSpec<_contractspec_lib_schema1107.SchemaModel<{
5
+ declare const StoreCreatedEvent: _contractspec_lib_contracts18.EventSpec<_contractspec_lib_schema1108.SchemaModel<{
6
6
  storeId: {
7
- type: _contractspec_lib_schema1107.FieldType<string, string>;
7
+ type: _contractspec_lib_schema1108.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  name: {
11
- type: _contractspec_lib_schema1107.FieldType<string, string>;
11
+ type: _contractspec_lib_schema1108.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  slug: {
15
- type: _contractspec_lib_schema1107.FieldType<string, string>;
15
+ type: _contractspec_lib_schema1108.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  ownerId: {
19
- type: _contractspec_lib_schema1107.FieldType<string, string>;
19
+ type: _contractspec_lib_schema1108.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  timestamp: {
23
- type: _contractspec_lib_schema1107.FieldType<Date, string>;
23
+ type: _contractspec_lib_schema1108.FieldType<Date, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  }>>;
27
- declare const StoreStatusChangedEvent: _contractspec_lib_contracts18.EventSpec<_contractspec_lib_schema1107.SchemaModel<{
27
+ declare const StoreStatusChangedEvent: _contractspec_lib_contracts18.EventSpec<_contractspec_lib_schema1108.SchemaModel<{
28
28
  storeId: {
29
- type: _contractspec_lib_schema1107.FieldType<string, string>;
29
+ type: _contractspec_lib_schema1108.FieldType<string, string>;
30
30
  isOptional: false;
31
31
  };
32
32
  previousStatus: {
33
- type: _contractspec_lib_schema1107.FieldType<string, string>;
33
+ type: _contractspec_lib_schema1108.FieldType<string, string>;
34
34
  isOptional: false;
35
35
  };
36
36
  newStatus: {
37
- type: _contractspec_lib_schema1107.FieldType<string, string>;
37
+ type: _contractspec_lib_schema1108.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  reason: {
41
- type: _contractspec_lib_schema1107.FieldType<string, string>;
41
+ type: _contractspec_lib_schema1108.FieldType<string, string>;
42
42
  isOptional: true;
43
43
  };
44
44
  timestamp: {
45
- type: _contractspec_lib_schema1107.FieldType<Date, string>;
45
+ type: _contractspec_lib_schema1108.FieldType<Date, string>;
46
46
  isOptional: false;
47
47
  };
48
48
  }>>;
@@ -55,7 +55,7 @@ const StoreStatusChangedPayload = defineSchemaModel({
55
55
  const StoreCreatedEvent = defineEvent({
56
56
  meta: {
57
57
  key: "marketplace.store.created",
58
- version: 1,
58
+ version: "1.0.0",
59
59
  description: "A new seller store has been created.",
60
60
  stability: "experimental",
61
61
  owners: ["@marketplace-team"],
@@ -66,7 +66,7 @@ const StoreCreatedEvent = defineEvent({
66
66
  const StoreStatusChangedEvent = defineEvent({
67
67
  meta: {
68
68
  key: "marketplace.store.statusChanged",
69
- version: 1,
69
+ version: "1.0.0",
70
70
  description: "A store status has changed.",
71
71
  stability: "experimental",
72
72
  owners: ["@marketplace-team"],
@@ -1 +1 @@
1
- {"version":3,"file":"store.event.js","names":[],"sources":["../../src/store/store.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst StoreCreatedPayload = defineSchemaModel({\n name: 'StoreCreatedEventPayload',\n fields: {\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 ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst StoreStatusChangedPayload = defineSchemaModel({\n name: 'StoreStatusChangedEventPayload',\n fields: {\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n previousStatus: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n newStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const StoreCreatedEvent = defineEvent({\n meta: {\n key: 'marketplace.store.created',\n version: 1,\n description: 'A new seller store has been created.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'store'],\n },\n payload: StoreCreatedPayload,\n});\n\nexport const StoreStatusChangedEvent = defineEvent({\n meta: {\n key: 'marketplace.store.statusChanged',\n version: 1,\n description: 'A store status has changed.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'store'],\n },\n payload: StoreStatusChangedPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,sBAAsB,kBAAkB;CAC5C,MAAM;CACN,QAAQ;EACN,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,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,4BAA4B,kBAAkB;CAClD,MAAM;CACN,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,oBAAoB,YAAY;CAC3C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,QAAQ;EAC/B;CACD,SAAS;CACV,CAAC;AAEF,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,QAAQ;EAC/B;CACD,SAAS;CACV,CAAC"}
1
+ {"version":3,"file":"store.event.js","names":[],"sources":["../../src/store/store.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst StoreCreatedPayload = defineSchemaModel({\n name: 'StoreCreatedEventPayload',\n fields: {\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 ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst StoreStatusChangedPayload = defineSchemaModel({\n name: 'StoreStatusChangedEventPayload',\n fields: {\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n previousStatus: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n newStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const StoreCreatedEvent = defineEvent({\n meta: {\n key: 'marketplace.store.created',\n version: '1.0.0',\n description: 'A new seller store has been created.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'store'],\n },\n payload: StoreCreatedPayload,\n});\n\nexport const StoreStatusChangedEvent = defineEvent({\n meta: {\n key: 'marketplace.store.statusChanged',\n version: '1.0.0',\n description: 'A store status has changed.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'store'],\n },\n payload: StoreStatusChangedPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,sBAAsB,kBAAkB;CAC5C,MAAM;CACN,QAAQ;EACN,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,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,4BAA4B,kBAAkB;CAClD,MAAM;CACN,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,oBAAoB,YAAY;CAC3C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,QAAQ;EAC/B;CACD,SAAS;CACV,CAAC;AAEF,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,QAAQ;EAC/B;CACD,SAAS;CACV,CAAC"}
@@ -77,7 +77,7 @@ declare const CreateStoreContract: _contractspec_lib_contracts20.OperationSpec<_
77
77
  };
78
78
  }>, {
79
79
  key: string;
80
- version: number;
80
+ version: string;
81
81
  when: string;
82
82
  payload: _contractspec_lib_schema1120.SchemaModel<{
83
83
  id: {
@@ -9,7 +9,7 @@ const OWNERS = ["@example.marketplace"];
9
9
  const CreateStoreContract = defineCommand({
10
10
  meta: {
11
11
  key: "marketplace.store.create",
12
- version: 1,
12
+ version: "1.0.0",
13
13
  stability: "stable",
14
14
  owners: [...OWNERS],
15
15
  tags: [
@@ -29,7 +29,7 @@ const CreateStoreContract = defineCommand({
29
29
  sideEffects: {
30
30
  emits: [{
31
31
  key: "marketplace.store.created",
32
- version: 1,
32
+ version: "1.0.0",
33
33
  when: "Store is created",
34
34
  payload: StoreModel
35
35
  }],
@@ -1 +1 @@
1
- {"version":3,"file":"store.operations.js","names":[],"sources":["../../src/store/store.operations.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts/operations';\nimport { StoreModel, CreateStoreInputModel } from './store.schema';\n\nconst OWNERS = ['@example.marketplace'] as const;\n\n/**\n * Create a new seller store.\n */\nexport const CreateStoreContract = defineCommand({\n meta: {\n key: 'marketplace.store.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['marketplace', 'store', 'create'],\n description: 'Create a new seller store.',\n goal: 'Allow users to become sellers on the marketplace.',\n context: 'Seller onboarding.',\n },\n io: { input: CreateStoreInputModel, output: StoreModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'marketplace.store.created',\n version: 1,\n when: 'Store is created',\n payload: StoreModel,\n },\n ],\n audit: ['marketplace.store.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-store-happy-path',\n given: ['User is authenticated'],\n when: ['User creates a new store'],\n then: ['Store is created', 'StoreCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-fashion-store',\n input: { name: 'Fashion Boutique', category: 'clothing' },\n output: { id: 'store-123', status: 'active' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,uBAAuB;;;;AAKvC,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAS;GAAS;EACxC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAY;CACxD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,4BAA4B;EACrC;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,wBAAwB;GAChC,MAAM,CAAC,2BAA2B;GAClC,MAAM,CAAC,oBAAoB,gCAAgC;GAC5D,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,MAAM;IAAoB,UAAU;IAAY;GACzD,QAAQ;IAAE,IAAI;IAAa,QAAQ;IAAU;GAC9C,CACF;EACF;CACF,CAAC"}
1
+ {"version":3,"file":"store.operations.js","names":[],"sources":["../../src/store/store.operations.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts/operations';\nimport { StoreModel, CreateStoreInputModel } from './store.schema';\n\nconst OWNERS = ['@example.marketplace'] as const;\n\n/**\n * Create a new seller store.\n */\nexport const CreateStoreContract = defineCommand({\n meta: {\n key: 'marketplace.store.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['marketplace', 'store', 'create'],\n description: 'Create a new seller store.',\n goal: 'Allow users to become sellers on the marketplace.',\n context: 'Seller onboarding.',\n },\n io: { input: CreateStoreInputModel, output: StoreModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'marketplace.store.created',\n version: '1.0.0',\n when: 'Store is created',\n payload: StoreModel,\n },\n ],\n audit: ['marketplace.store.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-store-happy-path',\n given: ['User is authenticated'],\n when: ['User creates a new store'],\n then: ['Store is created', 'StoreCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-fashion-store',\n input: { name: 'Fashion Boutique', category: 'clothing' },\n output: { id: 'store-123', status: 'active' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,uBAAuB;;;;AAKvC,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAS;GAAS;EACxC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAY;CACxD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,4BAA4B;EACrC;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,wBAAwB;GAChC,MAAM,CAAC,2BAA2B;GAClC,MAAM,CAAC,oBAAoB,gCAAgC;GAC5D,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,MAAM;IAAoB,UAAU;IAAY;GACzD,QAAQ;IAAE,IAAI;IAAa,QAAQ;IAAU;GAC9C,CACF;EACF;CACF,CAAC"}
@@ -5,7 +5,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
5
5
  const StoreProfilePresentation = {
6
6
  meta: {
7
7
  key: "marketplace.store.profile",
8
- version: 1,
8
+ version: "1.0.0",
9
9
  title: "Store Profile",
10
10
  description: "Public store profile page",
11
11
  domain: "marketplace",
@@ -31,7 +31,7 @@ const StoreProfilePresentation = {
31
31
  const SellerDashboardPresentation = {
32
32
  meta: {
33
33
  key: "marketplace.seller.dashboard",
34
- version: 1,
34
+ version: "1.0.0",
35
35
  title: "Seller Dashboard",
36
36
  description: "Seller dashboard with sales and analytics",
37
37
  domain: "marketplace",
@@ -1 +1 @@
1
- {"version":3,"file":"store.presentation.js","names":["StoreProfilePresentation: PresentationSpec","SellerDashboardPresentation: PresentationSpec"],"sources":["../../src/store/store.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { StoreModel } from './store.schema';\n\nexport const StoreProfilePresentation: PresentationSpec = {\n meta: {\n key: 'marketplace.store.profile',\n version: 1,\n title: 'Store Profile',\n description: 'Public store profile page',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'store', 'profile'],\n stability: StabilityEnum.Experimental,\n goal: 'Showcase a seller store with its products and reputation.',\n context: 'The public landing page for a marketplace seller.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'StoreProfile',\n props: StoreModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['marketplace.stores.enabled'],\n },\n};\n\nexport const SellerDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'marketplace.seller.dashboard',\n version: 1,\n title: 'Seller Dashboard',\n description: 'Seller dashboard with sales and analytics',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'seller', 'dashboard'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide sellers with an overview of their business performance.',\n context: 'The primary workspace for store owners.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SellerDashboard',\n props: StoreModel,\n },\n targets: ['react'],\n policy: {\n flags: ['marketplace.seller.enabled'],\n },\n};\n"],"mappings":";;;;AAIA,MAAaA,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAS;GAAU;EACzC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,6BAA6B,EACtC;CACF;AAED,MAAaC,8BAAgD;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAU;GAAY;EAC5C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,6BAA6B,EACtC;CACF"}
1
+ {"version":3,"file":"store.presentation.js","names":["StoreProfilePresentation: PresentationSpec","SellerDashboardPresentation: PresentationSpec"],"sources":["../../src/store/store.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { StoreModel } from './store.schema';\n\nexport const StoreProfilePresentation: PresentationSpec = {\n meta: {\n key: 'marketplace.store.profile',\n version: '1.0.0',\n title: 'Store Profile',\n description: 'Public store profile page',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'store', 'profile'],\n stability: StabilityEnum.Experimental,\n goal: 'Showcase a seller store with its products and reputation.',\n context: 'The public landing page for a marketplace seller.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'StoreProfile',\n props: StoreModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['marketplace.stores.enabled'],\n },\n};\n\nexport const SellerDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'marketplace.seller.dashboard',\n version: '1.0.0',\n title: 'Seller Dashboard',\n description: 'Seller dashboard with sales and analytics',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'seller', 'dashboard'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide sellers with an overview of their business performance.',\n context: 'The primary workspace for store owners.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SellerDashboard',\n props: StoreModel,\n },\n targets: ['react'],\n policy: {\n flags: ['marketplace.seller.enabled'],\n },\n};\n"],"mappings":";;;;AAIA,MAAaA,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAS;GAAU;EACzC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,6BAA6B,EACtC;CACF;AAED,MAAaC,8BAAgD;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAU;GAAY;EAC5C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,6BAA6B,EACtC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.marketplace",
3
- "version": "1.44.1",
3
+ "version": "1.45.1",
4
4
  "description": "Marketplace example with orders, payouts, and reviews for ContractSpec",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,20 +18,20 @@
18
18
  "lint:check": "eslint src"
19
19
  },
20
20
  "dependencies": {
21
- "@contractspec/lib.schema": "1.44.1",
22
- "@contractspec/lib.contracts": "1.44.1",
23
- "@contractspec/lib.bus": "1.44.1",
24
- "@contractspec/lib.identity-rbac": "1.44.1",
25
- "@contractspec/lib.files": "1.44.1",
26
- "@contractspec/lib.metering": "1.44.1",
27
- "@contractspec/lib.jobs": "1.44.1",
28
- "@contractspec/module.audit-trail": "1.44.1",
29
- "@contractspec/module.notifications": "1.44.1",
21
+ "@contractspec/lib.schema": "1.45.1",
22
+ "@contractspec/lib.contracts": "1.45.1",
23
+ "@contractspec/lib.bus": "1.45.1",
24
+ "@contractspec/lib.identity-rbac": "1.45.1",
25
+ "@contractspec/lib.files": "1.45.1",
26
+ "@contractspec/lib.metering": "1.45.1",
27
+ "@contractspec/lib.jobs": "1.45.1",
28
+ "@contractspec/module.audit-trail": "1.45.1",
29
+ "@contractspec/module.notifications": "1.45.1",
30
30
  "zod": "^4.1.13"
31
31
  },
32
32
  "devDependencies": {
33
- "@contractspec/tool.typescript": "1.44.1",
34
- "@contractspec/tool.tsdown": "1.44.1",
33
+ "@contractspec/tool.typescript": "1.45.1",
34
+ "@contractspec/tool.tsdown": "1.45.1",
35
35
  "typescript": "^5.9.3"
36
36
  },
37
37
  "exports": {