@contractspec/example.marketplace 0.0.0-canary-20260113170453

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 (188) 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 +7 -0
  33. package/dist/example.d.ts.map +1 -0
  34. package/dist/example.js +58 -0
  35. package/dist/example.js.map +1 -0
  36. package/dist/handlers/index.d.ts +2 -0
  37. package/dist/handlers/index.js +3 -0
  38. package/dist/handlers/marketplace.handlers.d.ts +155 -0
  39. package/dist/handlers/marketplace.handlers.d.ts.map +1 -0
  40. package/dist/handlers/marketplace.handlers.js +329 -0
  41. package/dist/handlers/marketplace.handlers.js.map +1 -0
  42. package/dist/index.d.ts +31 -0
  43. package/dist/index.js +32 -0
  44. package/dist/marketplace.capability.d.ts +9 -0
  45. package/dist/marketplace.capability.d.ts.map +1 -0
  46. package/dist/marketplace.capability.js +34 -0
  47. package/dist/marketplace.capability.js.map +1 -0
  48. package/dist/marketplace.feature.d.ts +12 -0
  49. package/dist/marketplace.feature.d.ts.map +1 -0
  50. package/dist/marketplace.feature.js +315 -0
  51. package/dist/marketplace.feature.js.map +1 -0
  52. package/dist/order/index.d.ts +5 -0
  53. package/dist/order/index.js +6 -0
  54. package/dist/order/order.enum.d.ts +10 -0
  55. package/dist/order/order.enum.d.ts.map +1 -0
  56. package/dist/order/order.enum.js +22 -0
  57. package/dist/order/order.enum.js.map +1 -0
  58. package/dist/order/order.event.d.ts +145 -0
  59. package/dist/order/order.event.d.ts.map +1 -0
  60. package/dist/order/order.event.js +216 -0
  61. package/dist/order/order.event.js.map +1 -0
  62. package/dist/order/order.operations.d.ts +368 -0
  63. package/dist/order/order.operations.d.ts.map +1 -0
  64. package/dist/order/order.operations.js +119 -0
  65. package/dist/order/order.operations.js.map +1 -0
  66. package/dist/order/order.presentation.d.ts +9 -0
  67. package/dist/order/order.presentation.d.ts.map +1 -0
  68. package/dist/order/order.presentation.js +86 -0
  69. package/dist/order/order.presentation.js.map +1 -0
  70. package/dist/order/order.schema.d.ts +165 -0
  71. package/dist/order/order.schema.d.ts.map +1 -0
  72. package/dist/order/order.schema.js +155 -0
  73. package/dist/order/order.schema.js.map +1 -0
  74. package/dist/payout/index.d.ts +5 -0
  75. package/dist/payout/index.js +6 -0
  76. package/dist/payout/payout.enum.d.ts +10 -0
  77. package/dist/payout/payout.enum.d.ts.map +1 -0
  78. package/dist/payout/payout.enum.js +17 -0
  79. package/dist/payout/payout.enum.js.map +1 -0
  80. package/dist/payout/payout.event.d.ts +63 -0
  81. package/dist/payout/payout.event.d.ts.map +1 -0
  82. package/dist/payout/payout.event.js +92 -0
  83. package/dist/payout/payout.event.js.map +1 -0
  84. package/dist/payout/payout.operations.d.ts +97 -0
  85. package/dist/payout/payout.operations.d.ts.map +1 -0
  86. package/dist/payout/payout.operations.js +53 -0
  87. package/dist/payout/payout.operations.js.map +1 -0
  88. package/dist/payout/payout.presentation.d.ts +8 -0
  89. package/dist/payout/payout.presentation.d.ts.map +1 -0
  90. package/dist/payout/payout.presentation.js +60 -0
  91. package/dist/payout/payout.presentation.js.map +1 -0
  92. package/dist/payout/payout.schema.d.ts +157 -0
  93. package/dist/payout/payout.schema.d.ts.map +1 -0
  94. package/dist/payout/payout.schema.js +116 -0
  95. package/dist/payout/payout.schema.js.map +1 -0
  96. package/dist/product/index.d.ts +5 -0
  97. package/dist/product/index.js +6 -0
  98. package/dist/product/product.enum.d.ts +10 -0
  99. package/dist/product/product.enum.d.ts.map +1 -0
  100. package/dist/product/product.enum.js +18 -0
  101. package/dist/product/product.enum.js.map +1 -0
  102. package/dist/product/product.event.d.ts +73 -0
  103. package/dist/product/product.event.d.ts.map +1 -0
  104. package/dist/product/product.event.js +120 -0
  105. package/dist/product/product.event.js.map +1 -0
  106. package/dist/product/product.operations.d.ts +273 -0
  107. package/dist/product/product.operations.d.ts.map +1 -0
  108. package/dist/product/product.operations.js +108 -0
  109. package/dist/product/product.operations.js.map +1 -0
  110. package/dist/product/product.presentation.d.ts +9 -0
  111. package/dist/product/product.presentation.d.ts.map +1 -0
  112. package/dist/product/product.presentation.js +86 -0
  113. package/dist/product/product.presentation.js.map +1 -0
  114. package/dist/product/product.schema.d.ts +218 -0
  115. package/dist/product/product.schema.d.ts.map +1 -0
  116. package/dist/product/product.schema.js +176 -0
  117. package/dist/product/product.schema.js.map +1 -0
  118. package/dist/review/index.d.ts +5 -0
  119. package/dist/review/index.js +6 -0
  120. package/dist/review/review.enum.d.ts +10 -0
  121. package/dist/review/review.enum.d.ts.map +1 -0
  122. package/dist/review/review.enum.js +16 -0
  123. package/dist/review/review.enum.js.map +1 -0
  124. package/dist/review/review.event.d.ts +55 -0
  125. package/dist/review/review.event.d.ts.map +1 -0
  126. package/dist/review/review.event.js +84 -0
  127. package/dist/review/review.event.js.map +1 -0
  128. package/dist/review/review.operations.d.ts +237 -0
  129. package/dist/review/review.operations.d.ts.map +1 -0
  130. package/dist/review/review.operations.js +106 -0
  131. package/dist/review/review.operations.js.map +1 -0
  132. package/dist/review/review.presentation.d.ts +8 -0
  133. package/dist/review/review.presentation.d.ts.map +1 -0
  134. package/dist/review/review.presentation.js +60 -0
  135. package/dist/review/review.presentation.js.map +1 -0
  136. package/dist/review/review.schema.d.ts +190 -0
  137. package/dist/review/review.schema.d.ts.map +1 -0
  138. package/dist/review/review.schema.js +156 -0
  139. package/dist/review/review.schema.js.map +1 -0
  140. package/dist/seeders/index.d.ts +10 -0
  141. package/dist/seeders/index.d.ts.map +1 -0
  142. package/dist/seeders/index.js +18 -0
  143. package/dist/seeders/index.js.map +1 -0
  144. package/dist/store/index.d.ts +5 -0
  145. package/dist/store/index.js +6 -0
  146. package/dist/store/store.enum.d.ts +10 -0
  147. package/dist/store/store.enum.d.ts.map +1 -0
  148. package/dist/store/store.enum.js +16 -0
  149. package/dist/store/store.enum.js.map +1 -0
  150. package/dist/store/store.event.d.ts +51 -0
  151. package/dist/store/store.event.d.ts.map +1 -0
  152. package/dist/store/store.event.js +80 -0
  153. package/dist/store/store.event.js.map +1 -0
  154. package/dist/store/store.operations.d.ts +131 -0
  155. package/dist/store/store.operations.d.ts.map +1 -0
  156. package/dist/store/store.operations.js +61 -0
  157. package/dist/store/store.operations.js.map +1 -0
  158. package/dist/store/store.presentation.d.ts +8 -0
  159. package/dist/store/store.presentation.d.ts.map +1 -0
  160. package/dist/store/store.presentation.js +60 -0
  161. package/dist/store/store.presentation.js.map +1 -0
  162. package/dist/store/store.schema.d.ts +84 -0
  163. package/dist/store/store.schema.d.ts.map +1 -0
  164. package/dist/store/store.schema.js +93 -0
  165. package/dist/store/store.schema.js.map +1 -0
  166. package/dist/tests/operations.test-spec.d.ts +11 -0
  167. package/dist/tests/operations.test-spec.d.ts.map +1 -0
  168. package/dist/tests/operations.test-spec.js +152 -0
  169. package/dist/tests/operations.test-spec.js.map +1 -0
  170. package/dist/ui/MarketplaceDashboard.d.ts +7 -0
  171. package/dist/ui/MarketplaceDashboard.d.ts.map +1 -0
  172. package/dist/ui/MarketplaceDashboard.js +319 -0
  173. package/dist/ui/MarketplaceDashboard.js.map +1 -0
  174. package/dist/ui/hooks/index.d.ts +2 -0
  175. package/dist/ui/hooks/index.js +5 -0
  176. package/dist/ui/hooks/useMarketplaceData.d.ts +23 -0
  177. package/dist/ui/hooks/useMarketplaceData.d.ts.map +1 -0
  178. package/dist/ui/hooks/useMarketplaceData.js +64 -0
  179. package/dist/ui/hooks/useMarketplaceData.js.map +1 -0
  180. package/dist/ui/index.d.ts +6 -0
  181. package/dist/ui/index.js +6 -0
  182. package/dist/ui/renderers/index.d.ts +2 -0
  183. package/dist/ui/renderers/index.js +3 -0
  184. package/dist/ui/renderers/marketplace.markdown.d.ts +28 -0
  185. package/dist/ui/renderers/marketplace.markdown.d.ts.map +1 -0
  186. package/dist/ui/renderers/marketplace.markdown.js +244 -0
  187. package/dist/ui/renderers/marketplace.markdown.js.map +1 -0
  188. package/package.json +149 -0
@@ -0,0 +1,216 @@
1
+ import { defineEvent } from "@contractspec/lib.contracts";
2
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
3
+
4
+ //#region src/order/order.event.ts
5
+ const OrderCreatedPayload = defineSchemaModel({
6
+ name: "OrderCreatedEventPayload",
7
+ fields: {
8
+ orderId: {
9
+ type: ScalarTypeEnum.String_unsecure(),
10
+ isOptional: false
11
+ },
12
+ orderNumber: {
13
+ type: ScalarTypeEnum.String_unsecure(),
14
+ isOptional: false
15
+ },
16
+ buyerId: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: false
19
+ },
20
+ storeId: {
21
+ type: ScalarTypeEnum.String_unsecure(),
22
+ isOptional: false
23
+ },
24
+ total: {
25
+ type: ScalarTypeEnum.Float_unsecure(),
26
+ isOptional: false
27
+ },
28
+ currency: {
29
+ type: ScalarTypeEnum.String_unsecure(),
30
+ isOptional: false
31
+ },
32
+ itemCount: {
33
+ type: ScalarTypeEnum.Int_unsecure(),
34
+ isOptional: false
35
+ },
36
+ timestamp: {
37
+ type: ScalarTypeEnum.DateTime(),
38
+ isOptional: false
39
+ }
40
+ }
41
+ });
42
+ const OrderPaidPayload = defineSchemaModel({
43
+ name: "OrderPaidEventPayload",
44
+ fields: {
45
+ orderId: {
46
+ type: ScalarTypeEnum.String_unsecure(),
47
+ isOptional: false
48
+ },
49
+ orderNumber: {
50
+ type: ScalarTypeEnum.String_unsecure(),
51
+ isOptional: false
52
+ },
53
+ total: {
54
+ type: ScalarTypeEnum.Float_unsecure(),
55
+ isOptional: false
56
+ },
57
+ paymentMethod: {
58
+ type: ScalarTypeEnum.String_unsecure(),
59
+ isOptional: false
60
+ },
61
+ timestamp: {
62
+ type: ScalarTypeEnum.DateTime(),
63
+ isOptional: false
64
+ }
65
+ }
66
+ });
67
+ const OrderStatusUpdatedPayload = defineSchemaModel({
68
+ name: "OrderStatusUpdatedEventPayload",
69
+ fields: {
70
+ orderId: {
71
+ type: ScalarTypeEnum.String_unsecure(),
72
+ isOptional: false
73
+ },
74
+ orderNumber: {
75
+ type: ScalarTypeEnum.String_unsecure(),
76
+ isOptional: false
77
+ },
78
+ previousStatus: {
79
+ type: ScalarTypeEnum.String_unsecure(),
80
+ isOptional: false
81
+ },
82
+ newStatus: {
83
+ type: ScalarTypeEnum.String_unsecure(),
84
+ isOptional: false
85
+ },
86
+ updatedBy: {
87
+ type: ScalarTypeEnum.String_unsecure(),
88
+ isOptional: false
89
+ },
90
+ timestamp: {
91
+ type: ScalarTypeEnum.DateTime(),
92
+ isOptional: false
93
+ }
94
+ }
95
+ });
96
+ const OrderShippedPayload = defineSchemaModel({
97
+ name: "OrderShippedEventPayload",
98
+ fields: {
99
+ orderId: {
100
+ type: ScalarTypeEnum.String_unsecure(),
101
+ isOptional: false
102
+ },
103
+ orderNumber: {
104
+ type: ScalarTypeEnum.String_unsecure(),
105
+ isOptional: false
106
+ },
107
+ trackingNumber: {
108
+ type: ScalarTypeEnum.String_unsecure(),
109
+ isOptional: true
110
+ },
111
+ trackingUrl: {
112
+ type: ScalarTypeEnum.String_unsecure(),
113
+ isOptional: true
114
+ },
115
+ carrier: {
116
+ type: ScalarTypeEnum.String_unsecure(),
117
+ isOptional: true
118
+ },
119
+ timestamp: {
120
+ type: ScalarTypeEnum.DateTime(),
121
+ isOptional: false
122
+ }
123
+ }
124
+ });
125
+ const OrderCompletedPayload = defineSchemaModel({
126
+ name: "OrderCompletedEventPayload",
127
+ fields: {
128
+ orderId: {
129
+ type: ScalarTypeEnum.String_unsecure(),
130
+ isOptional: false
131
+ },
132
+ orderNumber: {
133
+ type: ScalarTypeEnum.String_unsecure(),
134
+ isOptional: false
135
+ },
136
+ buyerId: {
137
+ type: ScalarTypeEnum.String_unsecure(),
138
+ isOptional: false
139
+ },
140
+ storeId: {
141
+ type: ScalarTypeEnum.String_unsecure(),
142
+ isOptional: false
143
+ },
144
+ total: {
145
+ type: ScalarTypeEnum.Float_unsecure(),
146
+ isOptional: false
147
+ },
148
+ sellerPayout: {
149
+ type: ScalarTypeEnum.Float_unsecure(),
150
+ isOptional: false
151
+ },
152
+ timestamp: {
153
+ type: ScalarTypeEnum.DateTime(),
154
+ isOptional: false
155
+ }
156
+ }
157
+ });
158
+ const OrderCreatedEvent = defineEvent({
159
+ meta: {
160
+ key: "marketplace.order.created",
161
+ version: "1.0.0",
162
+ description: "A new order has been created.",
163
+ stability: "experimental",
164
+ owners: ["@marketplace-team"],
165
+ tags: ["marketplace", "order"]
166
+ },
167
+ payload: OrderCreatedPayload
168
+ });
169
+ const OrderPaidEvent = defineEvent({
170
+ meta: {
171
+ key: "marketplace.order.paid",
172
+ version: "1.0.0",
173
+ description: "An order has been paid.",
174
+ stability: "experimental",
175
+ owners: ["@marketplace-team"],
176
+ tags: ["marketplace", "order"]
177
+ },
178
+ payload: OrderPaidPayload
179
+ });
180
+ const OrderStatusUpdatedEvent = defineEvent({
181
+ meta: {
182
+ key: "marketplace.order.statusUpdated",
183
+ version: "1.0.0",
184
+ description: "An order status has been updated.",
185
+ stability: "experimental",
186
+ owners: ["@marketplace-team"],
187
+ tags: ["marketplace", "order"]
188
+ },
189
+ payload: OrderStatusUpdatedPayload
190
+ });
191
+ const OrderShippedEvent = defineEvent({
192
+ meta: {
193
+ key: "marketplace.order.shipped",
194
+ version: "1.0.0",
195
+ description: "An order has been shipped.",
196
+ stability: "experimental",
197
+ owners: ["@marketplace-team"],
198
+ tags: ["marketplace", "order"]
199
+ },
200
+ payload: OrderShippedPayload
201
+ });
202
+ const OrderCompletedEvent = defineEvent({
203
+ meta: {
204
+ key: "marketplace.order.completed",
205
+ version: "1.0.0",
206
+ description: "An order has been completed.",
207
+ stability: "experimental",
208
+ owners: ["@marketplace-team"],
209
+ tags: ["marketplace", "order"]
210
+ },
211
+ payload: OrderCompletedPayload
212
+ });
213
+
214
+ //#endregion
215
+ export { OrderCompletedEvent, OrderCreatedEvent, OrderPaidEvent, OrderShippedEvent, OrderStatusUpdatedEvent };
216
+ //# sourceMappingURL=order.event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.event.js","names":[],"sources":["../../src/order/order.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst OrderCreatedPayload = defineSchemaModel({\n name: 'OrderCreatedEventPayload',\n fields: {\n orderId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orderNumber: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n buyerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n total: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n itemCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst OrderPaidPayload = defineSchemaModel({\n name: 'OrderPaidEventPayload',\n fields: {\n orderId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orderNumber: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n total: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n paymentMethod: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst OrderStatusUpdatedPayload = defineSchemaModel({\n name: 'OrderStatusUpdatedEventPayload',\n fields: {\n orderId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orderNumber: { 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 updatedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst OrderShippedPayload = defineSchemaModel({\n name: 'OrderShippedEventPayload',\n fields: {\n orderId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orderNumber: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n trackingNumber: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n trackingUrl: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n carrier: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst OrderCompletedPayload = defineSchemaModel({\n name: 'OrderCompletedEventPayload',\n fields: {\n orderId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orderNumber: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n buyerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n total: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n sellerPayout: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const OrderCreatedEvent = defineEvent({\n meta: {\n key: 'marketplace.order.created',\n version: '1.0.0',\n description: 'A new order has been created.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'order'],\n },\n payload: OrderCreatedPayload,\n});\n\nexport const OrderPaidEvent = defineEvent({\n meta: {\n key: 'marketplace.order.paid',\n version: '1.0.0',\n description: 'An order has been paid.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'order'],\n },\n payload: OrderPaidPayload,\n});\n\nexport const OrderStatusUpdatedEvent = defineEvent({\n meta: {\n key: 'marketplace.order.statusUpdated',\n version: '1.0.0',\n description: 'An order status has been updated.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'order'],\n },\n payload: OrderStatusUpdatedPayload,\n});\n\nexport const OrderShippedEvent = defineEvent({\n meta: {\n key: 'marketplace.order.shipped',\n version: '1.0.0',\n description: 'An order has been shipped.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'order'],\n },\n payload: OrderShippedPayload,\n});\n\nexport const OrderCompletedEvent = defineEvent({\n meta: {\n key: 'marketplace.order.completed',\n version: '1.0.0',\n description: 'An order has been completed.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'order'],\n },\n payload: OrderCompletedPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,sBAAsB,kBAAkB;CAC5C,MAAM;CACN,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,aAAa;GAAE,MAAM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AC7B,MAAM,CAAC,eAAe,QAAQ;EAC/B;CACD,SAAS;CACV,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,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,QAAQ;EAC/B;CACD,SAAS;CACV,CAAC"}
@@ -0,0 +1,368 @@
1
+ import * as _contractspec_lib_contracts10 from "@contractspec/lib.contracts";
2
+ import * as _contractspec_lib_schema73 from "@contractspec/lib.schema";
3
+
4
+ //#region src/order/order.operations.d.ts
5
+ /**
6
+ * Create a new order.
7
+ */
8
+ declare const CreateOrderContract: _contractspec_lib_contracts10.OperationSpec<_contractspec_lib_schema73.SchemaModel<{
9
+ storeId: {
10
+ type: _contractspec_lib_schema73.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ items: {
14
+ type: _contractspec_lib_schema73.FieldType<unknown, unknown>;
15
+ isOptional: false;
16
+ description: string;
17
+ };
18
+ shippingAddress: {
19
+ type: _contractspec_lib_schema73.FieldType<unknown, unknown>;
20
+ isOptional: true;
21
+ };
22
+ billingAddress: {
23
+ type: _contractspec_lib_schema73.FieldType<unknown, unknown>;
24
+ isOptional: true;
25
+ };
26
+ buyerNote: {
27
+ type: _contractspec_lib_schema73.FieldType<string, string>;
28
+ isOptional: true;
29
+ };
30
+ }>, _contractspec_lib_schema73.SchemaModel<{
31
+ id: {
32
+ type: _contractspec_lib_schema73.FieldType<string, string>;
33
+ isOptional: false;
34
+ };
35
+ orderNumber: {
36
+ type: _contractspec_lib_schema73.FieldType<string, string>;
37
+ isOptional: false;
38
+ };
39
+ buyerId: {
40
+ type: _contractspec_lib_schema73.FieldType<string, string>;
41
+ isOptional: false;
42
+ };
43
+ storeId: {
44
+ type: _contractspec_lib_schema73.FieldType<string, string>;
45
+ isOptional: false;
46
+ };
47
+ status: {
48
+ type: _contractspec_lib_schema73.EnumType<[string, string, string, string, string, string, string, string, string, string]>;
49
+ isOptional: false;
50
+ };
51
+ subtotal: {
52
+ type: _contractspec_lib_schema73.FieldType<number, number>;
53
+ isOptional: false;
54
+ };
55
+ shippingTotal: {
56
+ type: _contractspec_lib_schema73.FieldType<number, number>;
57
+ isOptional: false;
58
+ };
59
+ taxTotal: {
60
+ type: _contractspec_lib_schema73.FieldType<number, number>;
61
+ isOptional: false;
62
+ };
63
+ total: {
64
+ type: _contractspec_lib_schema73.FieldType<number, number>;
65
+ isOptional: false;
66
+ };
67
+ currency: {
68
+ type: _contractspec_lib_schema73.FieldType<string, string>;
69
+ isOptional: false;
70
+ };
71
+ items: {
72
+ type: _contractspec_lib_schema73.SchemaModel<{
73
+ id: {
74
+ type: _contractspec_lib_schema73.FieldType<string, string>;
75
+ isOptional: false;
76
+ };
77
+ productId: {
78
+ type: _contractspec_lib_schema73.FieldType<string, string>;
79
+ isOptional: false;
80
+ };
81
+ productName: {
82
+ type: _contractspec_lib_schema73.FieldType<string, string>;
83
+ isOptional: false;
84
+ };
85
+ unitPrice: {
86
+ type: _contractspec_lib_schema73.FieldType<number, number>;
87
+ isOptional: false;
88
+ };
89
+ quantity: {
90
+ type: _contractspec_lib_schema73.FieldType<number, number>;
91
+ isOptional: false;
92
+ };
93
+ subtotal: {
94
+ type: _contractspec_lib_schema73.FieldType<number, number>;
95
+ isOptional: false;
96
+ };
97
+ }>;
98
+ isArray: true;
99
+ isOptional: true;
100
+ };
101
+ createdAt: {
102
+ type: _contractspec_lib_schema73.FieldType<Date, string>;
103
+ isOptional: false;
104
+ };
105
+ }>, {
106
+ key: string;
107
+ version: string;
108
+ when: string;
109
+ payload: _contractspec_lib_schema73.SchemaModel<{
110
+ id: {
111
+ type: _contractspec_lib_schema73.FieldType<string, string>;
112
+ isOptional: false;
113
+ };
114
+ orderNumber: {
115
+ type: _contractspec_lib_schema73.FieldType<string, string>;
116
+ isOptional: false;
117
+ };
118
+ buyerId: {
119
+ type: _contractspec_lib_schema73.FieldType<string, string>;
120
+ isOptional: false;
121
+ };
122
+ storeId: {
123
+ type: _contractspec_lib_schema73.FieldType<string, string>;
124
+ isOptional: false;
125
+ };
126
+ status: {
127
+ type: _contractspec_lib_schema73.EnumType<[string, string, string, string, string, string, string, string, string, string]>;
128
+ isOptional: false;
129
+ };
130
+ subtotal: {
131
+ type: _contractspec_lib_schema73.FieldType<number, number>;
132
+ isOptional: false;
133
+ };
134
+ shippingTotal: {
135
+ type: _contractspec_lib_schema73.FieldType<number, number>;
136
+ isOptional: false;
137
+ };
138
+ taxTotal: {
139
+ type: _contractspec_lib_schema73.FieldType<number, number>;
140
+ isOptional: false;
141
+ };
142
+ total: {
143
+ type: _contractspec_lib_schema73.FieldType<number, number>;
144
+ isOptional: false;
145
+ };
146
+ currency: {
147
+ type: _contractspec_lib_schema73.FieldType<string, string>;
148
+ isOptional: false;
149
+ };
150
+ items: {
151
+ type: _contractspec_lib_schema73.SchemaModel<{
152
+ id: {
153
+ type: _contractspec_lib_schema73.FieldType<string, string>;
154
+ isOptional: false;
155
+ };
156
+ productId: {
157
+ type: _contractspec_lib_schema73.FieldType<string, string>;
158
+ isOptional: false;
159
+ };
160
+ productName: {
161
+ type: _contractspec_lib_schema73.FieldType<string, string>;
162
+ isOptional: false;
163
+ };
164
+ unitPrice: {
165
+ type: _contractspec_lib_schema73.FieldType<number, number>;
166
+ isOptional: false;
167
+ };
168
+ quantity: {
169
+ type: _contractspec_lib_schema73.FieldType<number, number>;
170
+ isOptional: false;
171
+ };
172
+ subtotal: {
173
+ type: _contractspec_lib_schema73.FieldType<number, number>;
174
+ isOptional: false;
175
+ };
176
+ }>;
177
+ isArray: true;
178
+ isOptional: true;
179
+ };
180
+ createdAt: {
181
+ type: _contractspec_lib_schema73.FieldType<Date, string>;
182
+ isOptional: false;
183
+ };
184
+ }>;
185
+ }[]>;
186
+ /**
187
+ * Update order status.
188
+ */
189
+ declare const UpdateOrderStatusContract: _contractspec_lib_contracts10.OperationSpec<_contractspec_lib_schema73.SchemaModel<{
190
+ orderId: {
191
+ type: _contractspec_lib_schema73.FieldType<string, string>;
192
+ isOptional: false;
193
+ };
194
+ status: {
195
+ type: _contractspec_lib_schema73.EnumType<[string, string, string, string, string, string, string, string, string, string]>;
196
+ isOptional: false;
197
+ };
198
+ trackingNumber: {
199
+ type: _contractspec_lib_schema73.FieldType<string, string>;
200
+ isOptional: true;
201
+ };
202
+ trackingUrl: {
203
+ type: _contractspec_lib_schema73.FieldType<string, string>;
204
+ isOptional: true;
205
+ };
206
+ note: {
207
+ type: _contractspec_lib_schema73.FieldType<string, string>;
208
+ isOptional: true;
209
+ };
210
+ }>, _contractspec_lib_schema73.SchemaModel<{
211
+ id: {
212
+ type: _contractspec_lib_schema73.FieldType<string, string>;
213
+ isOptional: false;
214
+ };
215
+ orderNumber: {
216
+ type: _contractspec_lib_schema73.FieldType<string, string>;
217
+ isOptional: false;
218
+ };
219
+ buyerId: {
220
+ type: _contractspec_lib_schema73.FieldType<string, string>;
221
+ isOptional: false;
222
+ };
223
+ storeId: {
224
+ type: _contractspec_lib_schema73.FieldType<string, string>;
225
+ isOptional: false;
226
+ };
227
+ status: {
228
+ type: _contractspec_lib_schema73.EnumType<[string, string, string, string, string, string, string, string, string, string]>;
229
+ isOptional: false;
230
+ };
231
+ subtotal: {
232
+ type: _contractspec_lib_schema73.FieldType<number, number>;
233
+ isOptional: false;
234
+ };
235
+ shippingTotal: {
236
+ type: _contractspec_lib_schema73.FieldType<number, number>;
237
+ isOptional: false;
238
+ };
239
+ taxTotal: {
240
+ type: _contractspec_lib_schema73.FieldType<number, number>;
241
+ isOptional: false;
242
+ };
243
+ total: {
244
+ type: _contractspec_lib_schema73.FieldType<number, number>;
245
+ isOptional: false;
246
+ };
247
+ currency: {
248
+ type: _contractspec_lib_schema73.FieldType<string, string>;
249
+ isOptional: false;
250
+ };
251
+ items: {
252
+ type: _contractspec_lib_schema73.SchemaModel<{
253
+ id: {
254
+ type: _contractspec_lib_schema73.FieldType<string, string>;
255
+ isOptional: false;
256
+ };
257
+ productId: {
258
+ type: _contractspec_lib_schema73.FieldType<string, string>;
259
+ isOptional: false;
260
+ };
261
+ productName: {
262
+ type: _contractspec_lib_schema73.FieldType<string, string>;
263
+ isOptional: false;
264
+ };
265
+ unitPrice: {
266
+ type: _contractspec_lib_schema73.FieldType<number, number>;
267
+ isOptional: false;
268
+ };
269
+ quantity: {
270
+ type: _contractspec_lib_schema73.FieldType<number, number>;
271
+ isOptional: false;
272
+ };
273
+ subtotal: {
274
+ type: _contractspec_lib_schema73.FieldType<number, number>;
275
+ isOptional: false;
276
+ };
277
+ }>;
278
+ isArray: true;
279
+ isOptional: true;
280
+ };
281
+ createdAt: {
282
+ type: _contractspec_lib_schema73.FieldType<Date, string>;
283
+ isOptional: false;
284
+ };
285
+ }>, {
286
+ key: string;
287
+ version: string;
288
+ when: string;
289
+ payload: _contractspec_lib_schema73.SchemaModel<{
290
+ id: {
291
+ type: _contractspec_lib_schema73.FieldType<string, string>;
292
+ isOptional: false;
293
+ };
294
+ orderNumber: {
295
+ type: _contractspec_lib_schema73.FieldType<string, string>;
296
+ isOptional: false;
297
+ };
298
+ buyerId: {
299
+ type: _contractspec_lib_schema73.FieldType<string, string>;
300
+ isOptional: false;
301
+ };
302
+ storeId: {
303
+ type: _contractspec_lib_schema73.FieldType<string, string>;
304
+ isOptional: false;
305
+ };
306
+ status: {
307
+ type: _contractspec_lib_schema73.EnumType<[string, string, string, string, string, string, string, string, string, string]>;
308
+ isOptional: false;
309
+ };
310
+ subtotal: {
311
+ type: _contractspec_lib_schema73.FieldType<number, number>;
312
+ isOptional: false;
313
+ };
314
+ shippingTotal: {
315
+ type: _contractspec_lib_schema73.FieldType<number, number>;
316
+ isOptional: false;
317
+ };
318
+ taxTotal: {
319
+ type: _contractspec_lib_schema73.FieldType<number, number>;
320
+ isOptional: false;
321
+ };
322
+ total: {
323
+ type: _contractspec_lib_schema73.FieldType<number, number>;
324
+ isOptional: false;
325
+ };
326
+ currency: {
327
+ type: _contractspec_lib_schema73.FieldType<string, string>;
328
+ isOptional: false;
329
+ };
330
+ items: {
331
+ type: _contractspec_lib_schema73.SchemaModel<{
332
+ id: {
333
+ type: _contractspec_lib_schema73.FieldType<string, string>;
334
+ isOptional: false;
335
+ };
336
+ productId: {
337
+ type: _contractspec_lib_schema73.FieldType<string, string>;
338
+ isOptional: false;
339
+ };
340
+ productName: {
341
+ type: _contractspec_lib_schema73.FieldType<string, string>;
342
+ isOptional: false;
343
+ };
344
+ unitPrice: {
345
+ type: _contractspec_lib_schema73.FieldType<number, number>;
346
+ isOptional: false;
347
+ };
348
+ quantity: {
349
+ type: _contractspec_lib_schema73.FieldType<number, number>;
350
+ isOptional: false;
351
+ };
352
+ subtotal: {
353
+ type: _contractspec_lib_schema73.FieldType<number, number>;
354
+ isOptional: false;
355
+ };
356
+ }>;
357
+ isArray: true;
358
+ isOptional: true;
359
+ };
360
+ createdAt: {
361
+ type: _contractspec_lib_schema73.FieldType<Date, string>;
362
+ isOptional: false;
363
+ };
364
+ }>;
365
+ }[]>;
366
+ //#endregion
367
+ export { CreateOrderContract, UpdateOrderStatusContract };
368
+ //# sourceMappingURL=order.operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.operations.d.ts","names":[],"sources":["../../src/order/order.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAYa,mDAAmB,yCAAA;EAAnB,OAAA,EAAA;IA4CX,IAAA,EAAA,0BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;IA5C8B,WAAA,EAAA,MAAA;;;;;;;;;;;;;;;;UAAA,0BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;8CAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAiDnB,CAAA;EA6CX,QAAA,EAAA;;;;;8CA7CoC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,GAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAzB,yDAAyB,yCAAA;;UA6CpC,0BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;UA7CoC,0BAAA,CAAA"}