@contractspec/example.marketplace 1.44.1 → 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.
Files changed (65) hide show
  1. package/dist/entities/order.d.ts +78 -78
  2. package/dist/entities/order.d.ts.map +1 -1
  3. package/dist/entities/payout.d.ts +65 -65
  4. package/dist/entities/product.d.ts +70 -70
  5. package/dist/entities/review.d.ts +56 -56
  6. package/dist/entities/store.d.ts +41 -41
  7. package/dist/example.d.ts +3 -36
  8. package/dist/example.d.ts.map +1 -1
  9. package/dist/example.js +16 -11
  10. package/dist/example.js.map +1 -1
  11. package/dist/marketplace.feature.js +63 -63
  12. package/dist/marketplace.feature.js.map +1 -1
  13. package/dist/order/order.enum.d.ts +2 -2
  14. package/dist/order/order.event.d.ts +39 -39
  15. package/dist/order/order.event.js +5 -5
  16. package/dist/order/order.event.js.map +1 -1
  17. package/dist/order/order.operations.d.ts +92 -92
  18. package/dist/order/order.operations.js +4 -4
  19. package/dist/order/order.operations.js.map +1 -1
  20. package/dist/order/order.presentation.js +3 -3
  21. package/dist/order/order.presentation.js.map +1 -1
  22. package/dist/order/order.schema.d.ts +39 -39
  23. package/dist/payout/payout.enum.d.ts +2 -2
  24. package/dist/payout/payout.event.d.ts +17 -17
  25. package/dist/payout/payout.event.js +2 -2
  26. package/dist/payout/payout.event.js.map +1 -1
  27. package/dist/payout/payout.operations.d.ts +24 -24
  28. package/dist/payout/payout.operations.js +1 -1
  29. package/dist/payout/payout.operations.js.map +1 -1
  30. package/dist/payout/payout.presentation.js +2 -2
  31. package/dist/payout/payout.presentation.js.map +1 -1
  32. package/dist/payout/payout.schema.d.ts +37 -37
  33. package/dist/product/product.enum.d.ts +2 -2
  34. package/dist/product/product.event.d.ts +19 -19
  35. package/dist/product/product.event.js +3 -3
  36. package/dist/product/product.event.js.map +1 -1
  37. package/dist/product/product.operations.d.ts +68 -68
  38. package/dist/product/product.operations.js +3 -3
  39. package/dist/product/product.operations.js.map +1 -1
  40. package/dist/product/product.presentation.js +3 -3
  41. package/dist/product/product.presentation.js.map +1 -1
  42. package/dist/product/product.schema.d.ts +52 -52
  43. package/dist/review/review.enum.d.ts +2 -2
  44. package/dist/review/review.event.d.ts +14 -14
  45. package/dist/review/review.event.js +2 -2
  46. package/dist/review/review.event.js.map +1 -1
  47. package/dist/review/review.operations.d.ts +59 -59
  48. package/dist/review/review.operations.d.ts.map +1 -1
  49. package/dist/review/review.operations.js +3 -3
  50. package/dist/review/review.operations.js.map +1 -1
  51. package/dist/review/review.presentation.js +2 -2
  52. package/dist/review/review.presentation.js.map +1 -1
  53. package/dist/review/review.schema.d.ts +45 -45
  54. package/dist/review/review.schema.d.ts.map +1 -1
  55. package/dist/store/store.enum.d.ts +2 -2
  56. package/dist/store/store.enum.d.ts.map +1 -1
  57. package/dist/store/store.event.d.ts +13 -13
  58. package/dist/store/store.event.js +2 -2
  59. package/dist/store/store.event.js.map +1 -1
  60. package/dist/store/store.operations.d.ts +33 -33
  61. package/dist/store/store.operations.js +2 -2
  62. package/dist/store/store.operations.js.map +1 -1
  63. package/dist/store/store.presentation.js +2 -2
  64. package/dist/store/store.presentation.js.map +1 -1
  65. package/package.json +12 -12
@@ -1,82 +1,82 @@
1
- import * as _contractspec_lib_schema820 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema578 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/payout/payout.schema.d.ts
4
4
  /**
5
5
  * A payout to seller.
6
6
  */
7
- declare const PayoutModel: _contractspec_lib_schema820.SchemaModel<{
7
+ declare const PayoutModel: _contractspec_lib_schema578.SchemaModel<{
8
8
  id: {
9
- type: _contractspec_lib_schema820.FieldType<string, string>;
9
+ type: _contractspec_lib_schema578.FieldType<string, string>;
10
10
  isOptional: false;
11
11
  };
12
12
  payoutNumber: {
13
- type: _contractspec_lib_schema820.FieldType<string, string>;
13
+ type: _contractspec_lib_schema578.FieldType<string, string>;
14
14
  isOptional: false;
15
15
  };
16
16
  storeId: {
17
- type: _contractspec_lib_schema820.FieldType<string, string>;
17
+ type: _contractspec_lib_schema578.FieldType<string, string>;
18
18
  isOptional: false;
19
19
  };
20
20
  status: {
21
- type: _contractspec_lib_schema820.EnumType<[string, string, string, string, string]>;
21
+ type: _contractspec_lib_schema578.EnumType<[string, string, string, string, string]>;
22
22
  isOptional: false;
23
23
  };
24
24
  grossAmount: {
25
- type: _contractspec_lib_schema820.FieldType<number, number>;
25
+ type: _contractspec_lib_schema578.FieldType<number, number>;
26
26
  isOptional: false;
27
27
  };
28
28
  platformFees: {
29
- type: _contractspec_lib_schema820.FieldType<number, number>;
29
+ type: _contractspec_lib_schema578.FieldType<number, number>;
30
30
  isOptional: false;
31
31
  };
32
32
  netAmount: {
33
- type: _contractspec_lib_schema820.FieldType<number, number>;
33
+ type: _contractspec_lib_schema578.FieldType<number, number>;
34
34
  isOptional: false;
35
35
  };
36
36
  currency: {
37
- type: _contractspec_lib_schema820.FieldType<string, string>;
37
+ type: _contractspec_lib_schema578.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  periodStart: {
41
- type: _contractspec_lib_schema820.FieldType<Date, string>;
41
+ type: _contractspec_lib_schema578.FieldType<Date, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  periodEnd: {
45
- type: _contractspec_lib_schema820.FieldType<Date, string>;
45
+ type: _contractspec_lib_schema578.FieldType<Date, string>;
46
46
  isOptional: false;
47
47
  };
48
48
  orderCount: {
49
- type: _contractspec_lib_schema820.FieldType<number, number>;
49
+ type: _contractspec_lib_schema578.FieldType<number, number>;
50
50
  isOptional: false;
51
51
  };
52
52
  createdAt: {
53
- type: _contractspec_lib_schema820.FieldType<Date, string>;
53
+ type: _contractspec_lib_schema578.FieldType<Date, string>;
54
54
  isOptional: false;
55
55
  };
56
56
  paidAt: {
57
- type: _contractspec_lib_schema820.FieldType<Date, string>;
57
+ type: _contractspec_lib_schema578.FieldType<Date, string>;
58
58
  isOptional: true;
59
59
  };
60
60
  }>;
61
61
  /**
62
62
  * Input for listing payouts.
63
63
  */
64
- declare const ListPayoutsInputModel: _contractspec_lib_schema820.SchemaModel<{
64
+ declare const ListPayoutsInputModel: _contractspec_lib_schema578.SchemaModel<{
65
65
  storeId: {
66
- type: _contractspec_lib_schema820.FieldType<string, string>;
66
+ type: _contractspec_lib_schema578.FieldType<string, string>;
67
67
  isOptional: false;
68
68
  };
69
69
  status: {
70
- type: _contractspec_lib_schema820.EnumType<[string, string, string, string, string]>;
70
+ type: _contractspec_lib_schema578.EnumType<[string, string, string, string, string]>;
71
71
  isOptional: true;
72
72
  };
73
73
  limit: {
74
- type: _contractspec_lib_schema820.FieldType<number, number>;
74
+ type: _contractspec_lib_schema578.FieldType<number, number>;
75
75
  isOptional: true;
76
76
  defaultValue: number;
77
77
  };
78
78
  offset: {
79
- type: _contractspec_lib_schema820.FieldType<number, number>;
79
+ type: _contractspec_lib_schema578.FieldType<number, number>;
80
80
  isOptional: true;
81
81
  defaultValue: number;
82
82
  };
@@ -84,59 +84,59 @@ declare const ListPayoutsInputModel: _contractspec_lib_schema820.SchemaModel<{
84
84
  /**
85
85
  * Output for listing payouts.
86
86
  */
87
- declare const ListPayoutsOutputModel: _contractspec_lib_schema820.SchemaModel<{
87
+ declare const ListPayoutsOutputModel: _contractspec_lib_schema578.SchemaModel<{
88
88
  payouts: {
89
- type: _contractspec_lib_schema820.SchemaModel<{
89
+ type: _contractspec_lib_schema578.SchemaModel<{
90
90
  id: {
91
- type: _contractspec_lib_schema820.FieldType<string, string>;
91
+ type: _contractspec_lib_schema578.FieldType<string, string>;
92
92
  isOptional: false;
93
93
  };
94
94
  payoutNumber: {
95
- type: _contractspec_lib_schema820.FieldType<string, string>;
95
+ type: _contractspec_lib_schema578.FieldType<string, string>;
96
96
  isOptional: false;
97
97
  };
98
98
  storeId: {
99
- type: _contractspec_lib_schema820.FieldType<string, string>;
99
+ type: _contractspec_lib_schema578.FieldType<string, string>;
100
100
  isOptional: false;
101
101
  };
102
102
  status: {
103
- type: _contractspec_lib_schema820.EnumType<[string, string, string, string, string]>;
103
+ type: _contractspec_lib_schema578.EnumType<[string, string, string, string, string]>;
104
104
  isOptional: false;
105
105
  };
106
106
  grossAmount: {
107
- type: _contractspec_lib_schema820.FieldType<number, number>;
107
+ type: _contractspec_lib_schema578.FieldType<number, number>;
108
108
  isOptional: false;
109
109
  };
110
110
  platformFees: {
111
- type: _contractspec_lib_schema820.FieldType<number, number>;
111
+ type: _contractspec_lib_schema578.FieldType<number, number>;
112
112
  isOptional: false;
113
113
  };
114
114
  netAmount: {
115
- type: _contractspec_lib_schema820.FieldType<number, number>;
115
+ type: _contractspec_lib_schema578.FieldType<number, number>;
116
116
  isOptional: false;
117
117
  };
118
118
  currency: {
119
- type: _contractspec_lib_schema820.FieldType<string, string>;
119
+ type: _contractspec_lib_schema578.FieldType<string, string>;
120
120
  isOptional: false;
121
121
  };
122
122
  periodStart: {
123
- type: _contractspec_lib_schema820.FieldType<Date, string>;
123
+ type: _contractspec_lib_schema578.FieldType<Date, string>;
124
124
  isOptional: false;
125
125
  };
126
126
  periodEnd: {
127
- type: _contractspec_lib_schema820.FieldType<Date, string>;
127
+ type: _contractspec_lib_schema578.FieldType<Date, string>;
128
128
  isOptional: false;
129
129
  };
130
130
  orderCount: {
131
- type: _contractspec_lib_schema820.FieldType<number, number>;
131
+ type: _contractspec_lib_schema578.FieldType<number, number>;
132
132
  isOptional: false;
133
133
  };
134
134
  createdAt: {
135
- type: _contractspec_lib_schema820.FieldType<Date, string>;
135
+ type: _contractspec_lib_schema578.FieldType<Date, string>;
136
136
  isOptional: false;
137
137
  };
138
138
  paidAt: {
139
- type: _contractspec_lib_schema820.FieldType<Date, string>;
139
+ type: _contractspec_lib_schema578.FieldType<Date, string>;
140
140
  isOptional: true;
141
141
  };
142
142
  }>;
@@ -144,11 +144,11 @@ declare const ListPayoutsOutputModel: _contractspec_lib_schema820.SchemaModel<{
144
144
  isOptional: false;
145
145
  };
146
146
  total: {
147
- type: _contractspec_lib_schema820.FieldType<number, number>;
147
+ type: _contractspec_lib_schema578.FieldType<number, number>;
148
148
  isOptional: false;
149
149
  };
150
150
  totalPending: {
151
- type: _contractspec_lib_schema820.FieldType<number, number>;
151
+ type: _contractspec_lib_schema578.FieldType<number, number>;
152
152
  isOptional: false;
153
153
  };
154
154
  }>;
@@ -1,10 +1,10 @@
1
- import * as _contractspec_lib_schema907 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema652 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/product/product.enum.d.ts
4
4
  /**
5
5
  * Product status enum.
6
6
  */
7
- declare const ProductStatusEnum: _contractspec_lib_schema907.EnumType<[string, string, string, string, string, string]>;
7
+ declare const ProductStatusEnum: _contractspec_lib_schema652.EnumType<[string, string, string, string, string, string]>;
8
8
  //#endregion
9
9
  export { ProductStatusEnum };
10
10
  //# sourceMappingURL=product.enum.d.ts.map
@@ -1,70 +1,70 @@
1
- import * as _contractspec_lib_schema908 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema741 from "@contractspec/lib.schema";
2
2
  import * as _contractspec_lib_contracts9 from "@contractspec/lib.contracts";
3
3
 
4
4
  //#region src/product/product.event.d.ts
5
- declare const ProductCreatedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema908.SchemaModel<{
5
+ declare const ProductCreatedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema741.SchemaModel<{
6
6
  productId: {
7
- type: _contractspec_lib_schema908.FieldType<string, string>;
7
+ type: _contractspec_lib_schema741.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  storeId: {
11
- type: _contractspec_lib_schema908.FieldType<string, string>;
11
+ type: _contractspec_lib_schema741.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  name: {
15
- type: _contractspec_lib_schema908.FieldType<string, string>;
15
+ type: _contractspec_lib_schema741.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  price: {
19
- type: _contractspec_lib_schema908.FieldType<number, number>;
19
+ type: _contractspec_lib_schema741.FieldType<number, number>;
20
20
  isOptional: false;
21
21
  };
22
22
  currency: {
23
- type: _contractspec_lib_schema908.FieldType<string, string>;
23
+ type: _contractspec_lib_schema741.FieldType<string, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  timestamp: {
27
- type: _contractspec_lib_schema908.FieldType<Date, string>;
27
+ type: _contractspec_lib_schema741.FieldType<Date, string>;
28
28
  isOptional: false;
29
29
  };
30
30
  }>>;
31
- declare const ProductPublishedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema908.SchemaModel<{
31
+ declare const ProductPublishedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema741.SchemaModel<{
32
32
  productId: {
33
- type: _contractspec_lib_schema908.FieldType<string, string>;
33
+ type: _contractspec_lib_schema741.FieldType<string, string>;
34
34
  isOptional: false;
35
35
  };
36
36
  storeId: {
37
- type: _contractspec_lib_schema908.FieldType<string, string>;
37
+ type: _contractspec_lib_schema741.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  timestamp: {
41
- type: _contractspec_lib_schema908.FieldType<Date, string>;
41
+ type: _contractspec_lib_schema741.FieldType<Date, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  }>>;
45
- declare const InventoryUpdatedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema908.SchemaModel<{
45
+ declare const InventoryUpdatedEvent: _contractspec_lib_contracts9.EventSpec<_contractspec_lib_schema741.SchemaModel<{
46
46
  productId: {
47
- type: _contractspec_lib_schema908.FieldType<string, string>;
47
+ type: _contractspec_lib_schema741.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  variantId: {
51
- type: _contractspec_lib_schema908.FieldType<string, string>;
51
+ type: _contractspec_lib_schema741.FieldType<string, string>;
52
52
  isOptional: true;
53
53
  };
54
54
  previousQuantity: {
55
- type: _contractspec_lib_schema908.FieldType<number, number>;
55
+ type: _contractspec_lib_schema741.FieldType<number, number>;
56
56
  isOptional: false;
57
57
  };
58
58
  newQuantity: {
59
- type: _contractspec_lib_schema908.FieldType<number, number>;
59
+ type: _contractspec_lib_schema741.FieldType<number, number>;
60
60
  isOptional: false;
61
61
  };
62
62
  reason: {
63
- type: _contractspec_lib_schema908.FieldType<string, string>;
63
+ type: _contractspec_lib_schema741.FieldType<string, string>;
64
64
  isOptional: false;
65
65
  };
66
66
  timestamp: {
67
- type: _contractspec_lib_schema908.FieldType<Date, string>;
67
+ type: _contractspec_lib_schema741.FieldType<Date, string>;
68
68
  isOptional: false;
69
69
  };
70
70
  }>>;
@@ -80,7 +80,7 @@ const InventoryUpdatedPayload = defineSchemaModel({
80
80
  const ProductCreatedEvent = defineEvent({
81
81
  meta: {
82
82
  key: "marketplace.product.created",
83
- version: 1,
83
+ version: "1.0.0",
84
84
  description: "A new product has been created.",
85
85
  stability: "experimental",
86
86
  owners: ["@marketplace-team"],
@@ -91,7 +91,7 @@ const ProductCreatedEvent = defineEvent({
91
91
  const ProductPublishedEvent = defineEvent({
92
92
  meta: {
93
93
  key: "marketplace.product.published",
94
- version: 1,
94
+ version: "1.0.0",
95
95
  description: "A product has been published.",
96
96
  stability: "experimental",
97
97
  owners: ["@marketplace-team"],
@@ -102,7 +102,7 @@ const ProductPublishedEvent = defineEvent({
102
102
  const InventoryUpdatedEvent = defineEvent({
103
103
  meta: {
104
104
  key: "marketplace.inventory.updated",
105
- version: 1,
105
+ version: "1.0.0",
106
106
  description: "Product inventory has been updated.",
107
107
  stability: "experimental",
108
108
  owners: ["@marketplace-team"],
@@ -1 +1 @@
1
- {"version":3,"file":"product.event.js","names":[],"sources":["../../src/product/product.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst ProductCreatedPayload = defineSchemaModel({\n name: 'ProductCreatedEventPayload',\n fields: {\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n price: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst ProductPublishedPayload = defineSchemaModel({\n name: 'ProductPublishedEventPayload',\n fields: {\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst InventoryUpdatedPayload = defineSchemaModel({\n name: 'InventoryUpdatedEventPayload',\n fields: {\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n variantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n previousQuantity: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n newQuantity: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const ProductCreatedEvent = defineEvent({\n meta: {\n key: 'marketplace.product.created',\n version: 1,\n description: 'A new product has been created.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'product'],\n },\n payload: ProductCreatedPayload,\n});\n\nexport const ProductPublishedEvent = defineEvent({\n meta: {\n key: 'marketplace.product.published',\n version: 1,\n description: 'A product has been published.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'product'],\n },\n payload: ProductPublishedPayload,\n});\n\nexport const InventoryUpdatedEvent = defineEvent({\n meta: {\n key: 'marketplace.inventory.updated',\n version: 1,\n description: 'Product inventory has been updated.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'product', 'inventory'],\n },\n payload: InventoryUpdatedP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AAC;AAEF,MAAa,wBAAwB,YAAY;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,UAAU;EACjC;CACD,SAAS;CACV,CAAC;AAEF,MAAa,wBAAwB,YAAY;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAW;GAAY;EAC9C;CACD,SAAS;CACV,CAAC"}
1
+ {"version":3,"file":"product.event.js","names":[],"sources":["../../src/product/product.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst ProductCreatedPayload = defineSchemaModel({\n name: 'ProductCreatedEventPayload',\n fields: {\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n price: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst ProductPublishedPayload = defineSchemaModel({\n name: 'ProductPublishedEventPayload',\n fields: {\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst InventoryUpdatedPayload = defineSchemaModel({\n name: 'InventoryUpdatedEventPayload',\n fields: {\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n variantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n previousQuantity: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n newQuantity: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const ProductCreatedEvent = defineEvent({\n meta: {\n key: 'marketplace.product.created',\n version: '1.0.0',\n description: 'A new product has been created.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'product'],\n },\n payload: ProductCreatedPayload,\n});\n\nexport const ProductPublishedEvent = defineEvent({\n meta: {\n key: 'marketplace.product.published',\n version: '1.0.0',\n description: 'A product has been published.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'product'],\n },\n payload: ProductPublishedPayload,\n});\n\nexport const InventoryUpdatedEvent = defineEvent({\n meta: {\n key: 'marketplace.inventory.updated',\n version: '1.0.0',\n description: 'Product inventory has been updated.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'product', 'inventory'],\n },\n payload: InventoryUpdatedPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,wBAAwB,kBAAkB;CAC9C,MAAM;CACN,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,OAAO;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,0BAA0B,kBAAkB;CAChD,MAAM;CACN,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,U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