@contractspec/example.marketplace 1.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +141 -0
  3. package/dist/docs/index.d.ts +1 -0
  4. package/dist/docs/index.js +1 -0
  5. package/dist/docs/marketplace.docblock.d.ts +1 -0
  6. package/dist/docs/marketplace.docblock.js +115 -0
  7. package/dist/docs/marketplace.docblock.js.map +1 -0
  8. package/dist/entities/index.d.ts +309 -0
  9. package/dist/entities/index.d.ts.map +1 -0
  10. package/dist/entities/index.js +46 -0
  11. package/dist/entities/index.js.map +1 -0
  12. package/dist/entities/order.d.ts +105 -0
  13. package/dist/entities/order.d.ts.map +1 -0
  14. package/dist/entities/order.js +173 -0
  15. package/dist/entities/order.js.map +1 -0
  16. package/dist/entities/payout.d.ts +92 -0
  17. package/dist/entities/payout.d.ts.map +1 -0
  18. package/dist/entities/payout.js +162 -0
  19. package/dist/entities/payout.js.map +1 -0
  20. package/dist/entities/product.d.ts +93 -0
  21. package/dist/entities/product.d.ts.map +1 -0
  22. package/dist/entities/product.js +161 -0
  23. package/dist/entities/product.js.map +1 -0
  24. package/dist/entities/review.d.ts +83 -0
  25. package/dist/entities/review.d.ts.map +1 -0
  26. package/dist/entities/review.js +152 -0
  27. package/dist/entities/review.js.map +1 -0
  28. package/dist/entities/store.d.ts +60 -0
  29. package/dist/entities/store.d.ts.map +1 -0
  30. package/dist/entities/store.js +110 -0
  31. package/dist/entities/store.js.map +1 -0
  32. package/dist/example.d.ts +40 -0
  33. package/dist/example.d.ts.map +1 -0
  34. package/dist/example.js +51 -0
  35. package/dist/example.js.map +1 -0
  36. package/dist/index.d.ts +26 -0
  37. package/dist/index.js +27 -0
  38. package/dist/marketplace.feature.d.ts +12 -0
  39. package/dist/marketplace.feature.d.ts.map +1 -0
  40. package/dist/marketplace.feature.js +310 -0
  41. package/dist/marketplace.feature.js.map +1 -0
  42. package/dist/order/index.d.ts +5 -0
  43. package/dist/order/index.js +6 -0
  44. package/dist/order/order.enum.d.ts +10 -0
  45. package/dist/order/order.enum.d.ts.map +1 -0
  46. package/dist/order/order.enum.js +22 -0
  47. package/dist/order/order.enum.js.map +1 -0
  48. package/dist/order/order.event.d.ts +145 -0
  49. package/dist/order/order.event.d.ts.map +1 -0
  50. package/dist/order/order.event.js +216 -0
  51. package/dist/order/order.event.js.map +1 -0
  52. package/dist/order/order.operations.d.ts +368 -0
  53. package/dist/order/order.operations.d.ts.map +1 -0
  54. package/dist/order/order.operations.js +119 -0
  55. package/dist/order/order.operations.js.map +1 -0
  56. package/dist/order/order.presentation.d.ts +9 -0
  57. package/dist/order/order.presentation.d.ts.map +1 -0
  58. package/dist/order/order.presentation.js +86 -0
  59. package/dist/order/order.presentation.js.map +1 -0
  60. package/dist/order/order.schema.d.ts +165 -0
  61. package/dist/order/order.schema.d.ts.map +1 -0
  62. package/dist/order/order.schema.js +155 -0
  63. package/dist/order/order.schema.js.map +1 -0
  64. package/dist/payout/index.d.ts +5 -0
  65. package/dist/payout/index.js +6 -0
  66. package/dist/payout/payout.enum.d.ts +10 -0
  67. package/dist/payout/payout.enum.d.ts.map +1 -0
  68. package/dist/payout/payout.enum.js +17 -0
  69. package/dist/payout/payout.enum.js.map +1 -0
  70. package/dist/payout/payout.event.d.ts +63 -0
  71. package/dist/payout/payout.event.d.ts.map +1 -0
  72. package/dist/payout/payout.event.js +92 -0
  73. package/dist/payout/payout.event.js.map +1 -0
  74. package/dist/payout/payout.operations.d.ts +97 -0
  75. package/dist/payout/payout.operations.d.ts.map +1 -0
  76. package/dist/payout/payout.operations.js +53 -0
  77. package/dist/payout/payout.operations.js.map +1 -0
  78. package/dist/payout/payout.presentation.d.ts +8 -0
  79. package/dist/payout/payout.presentation.d.ts.map +1 -0
  80. package/dist/payout/payout.presentation.js +60 -0
  81. package/dist/payout/payout.presentation.js.map +1 -0
  82. package/dist/payout/payout.schema.d.ts +157 -0
  83. package/dist/payout/payout.schema.d.ts.map +1 -0
  84. package/dist/payout/payout.schema.js +116 -0
  85. package/dist/payout/payout.schema.js.map +1 -0
  86. package/dist/product/index.d.ts +5 -0
  87. package/dist/product/index.js +6 -0
  88. package/dist/product/product.enum.d.ts +10 -0
  89. package/dist/product/product.enum.d.ts.map +1 -0
  90. package/dist/product/product.enum.js +18 -0
  91. package/dist/product/product.enum.js.map +1 -0
  92. package/dist/product/product.event.d.ts +73 -0
  93. package/dist/product/product.event.d.ts.map +1 -0
  94. package/dist/product/product.event.js +120 -0
  95. package/dist/product/product.event.js.map +1 -0
  96. package/dist/product/product.operations.d.ts +273 -0
  97. package/dist/product/product.operations.d.ts.map +1 -0
  98. package/dist/product/product.operations.js +108 -0
  99. package/dist/product/product.operations.js.map +1 -0
  100. package/dist/product/product.presentation.d.ts +9 -0
  101. package/dist/product/product.presentation.d.ts.map +1 -0
  102. package/dist/product/product.presentation.js +86 -0
  103. package/dist/product/product.presentation.js.map +1 -0
  104. package/dist/product/product.schema.d.ts +218 -0
  105. package/dist/product/product.schema.d.ts.map +1 -0
  106. package/dist/product/product.schema.js +176 -0
  107. package/dist/product/product.schema.js.map +1 -0
  108. package/dist/review/index.d.ts +5 -0
  109. package/dist/review/index.js +6 -0
  110. package/dist/review/review.enum.d.ts +10 -0
  111. package/dist/review/review.enum.d.ts.map +1 -0
  112. package/dist/review/review.enum.js +16 -0
  113. package/dist/review/review.enum.js.map +1 -0
  114. package/dist/review/review.event.d.ts +55 -0
  115. package/dist/review/review.event.d.ts.map +1 -0
  116. package/dist/review/review.event.js +84 -0
  117. package/dist/review/review.event.js.map +1 -0
  118. package/dist/review/review.operations.d.ts +237 -0
  119. package/dist/review/review.operations.d.ts.map +1 -0
  120. package/dist/review/review.operations.js +106 -0
  121. package/dist/review/review.operations.js.map +1 -0
  122. package/dist/review/review.presentation.d.ts +8 -0
  123. package/dist/review/review.presentation.d.ts.map +1 -0
  124. package/dist/review/review.presentation.js +60 -0
  125. package/dist/review/review.presentation.js.map +1 -0
  126. package/dist/review/review.schema.d.ts +190 -0
  127. package/dist/review/review.schema.d.ts.map +1 -0
  128. package/dist/review/review.schema.js +156 -0
  129. package/dist/review/review.schema.js.map +1 -0
  130. package/dist/store/index.d.ts +5 -0
  131. package/dist/store/index.js +6 -0
  132. package/dist/store/store.enum.d.ts +10 -0
  133. package/dist/store/store.enum.d.ts.map +1 -0
  134. package/dist/store/store.enum.js +16 -0
  135. package/dist/store/store.enum.js.map +1 -0
  136. package/dist/store/store.event.d.ts +51 -0
  137. package/dist/store/store.event.d.ts.map +1 -0
  138. package/dist/store/store.event.js +80 -0
  139. package/dist/store/store.event.js.map +1 -0
  140. package/dist/store/store.operations.d.ts +131 -0
  141. package/dist/store/store.operations.d.ts.map +1 -0
  142. package/dist/store/store.operations.js +61 -0
  143. package/dist/store/store.operations.js.map +1 -0
  144. package/dist/store/store.presentation.d.ts +8 -0
  145. package/dist/store/store.presentation.d.ts.map +1 -0
  146. package/dist/store/store.presentation.js +60 -0
  147. package/dist/store/store.presentation.js.map +1 -0
  148. package/dist/store/store.schema.d.ts +84 -0
  149. package/dist/store/store.schema.d.ts.map +1 -0
  150. package/dist/store/store.schema.js +93 -0
  151. package/dist/store/store.schema.js.map +1 -0
  152. package/package.json +141 -0
@@ -0,0 +1,165 @@
1
+ import * as _contractspec_lib_schema620 from "@contractspec/lib.schema";
2
+
3
+ //#region src/order/order.schema.d.ts
4
+ /**
5
+ * An order item.
6
+ */
7
+ declare const OrderItemModel: _contractspec_lib_schema620.SchemaModel<{
8
+ id: {
9
+ type: _contractspec_lib_schema620.FieldType<string, string>;
10
+ isOptional: false;
11
+ };
12
+ productId: {
13
+ type: _contractspec_lib_schema620.FieldType<string, string>;
14
+ isOptional: false;
15
+ };
16
+ productName: {
17
+ type: _contractspec_lib_schema620.FieldType<string, string>;
18
+ isOptional: false;
19
+ };
20
+ unitPrice: {
21
+ type: _contractspec_lib_schema620.FieldType<number, number>;
22
+ isOptional: false;
23
+ };
24
+ quantity: {
25
+ type: _contractspec_lib_schema620.FieldType<number, number>;
26
+ isOptional: false;
27
+ };
28
+ subtotal: {
29
+ type: _contractspec_lib_schema620.FieldType<number, number>;
30
+ isOptional: false;
31
+ };
32
+ }>;
33
+ /**
34
+ * An order.
35
+ */
36
+ declare const OrderModel: _contractspec_lib_schema620.SchemaModel<{
37
+ id: {
38
+ type: _contractspec_lib_schema620.FieldType<string, string>;
39
+ isOptional: false;
40
+ };
41
+ orderNumber: {
42
+ type: _contractspec_lib_schema620.FieldType<string, string>;
43
+ isOptional: false;
44
+ };
45
+ buyerId: {
46
+ type: _contractspec_lib_schema620.FieldType<string, string>;
47
+ isOptional: false;
48
+ };
49
+ storeId: {
50
+ type: _contractspec_lib_schema620.FieldType<string, string>;
51
+ isOptional: false;
52
+ };
53
+ status: {
54
+ type: _contractspec_lib_schema620.EnumType<[string, string, string, string, string, string, string, string, string, string]>;
55
+ isOptional: false;
56
+ };
57
+ subtotal: {
58
+ type: _contractspec_lib_schema620.FieldType<number, number>;
59
+ isOptional: false;
60
+ };
61
+ shippingTotal: {
62
+ type: _contractspec_lib_schema620.FieldType<number, number>;
63
+ isOptional: false;
64
+ };
65
+ taxTotal: {
66
+ type: _contractspec_lib_schema620.FieldType<number, number>;
67
+ isOptional: false;
68
+ };
69
+ total: {
70
+ type: _contractspec_lib_schema620.FieldType<number, number>;
71
+ isOptional: false;
72
+ };
73
+ currency: {
74
+ type: _contractspec_lib_schema620.FieldType<string, string>;
75
+ isOptional: false;
76
+ };
77
+ items: {
78
+ type: _contractspec_lib_schema620.SchemaModel<{
79
+ id: {
80
+ type: _contractspec_lib_schema620.FieldType<string, string>;
81
+ isOptional: false;
82
+ };
83
+ productId: {
84
+ type: _contractspec_lib_schema620.FieldType<string, string>;
85
+ isOptional: false;
86
+ };
87
+ productName: {
88
+ type: _contractspec_lib_schema620.FieldType<string, string>;
89
+ isOptional: false;
90
+ };
91
+ unitPrice: {
92
+ type: _contractspec_lib_schema620.FieldType<number, number>;
93
+ isOptional: false;
94
+ };
95
+ quantity: {
96
+ type: _contractspec_lib_schema620.FieldType<number, number>;
97
+ isOptional: false;
98
+ };
99
+ subtotal: {
100
+ type: _contractspec_lib_schema620.FieldType<number, number>;
101
+ isOptional: false;
102
+ };
103
+ }>;
104
+ isArray: true;
105
+ isOptional: true;
106
+ };
107
+ createdAt: {
108
+ type: _contractspec_lib_schema620.FieldType<Date, string>;
109
+ isOptional: false;
110
+ };
111
+ }>;
112
+ /**
113
+ * Input for creating an order.
114
+ */
115
+ declare const CreateOrderInputModel: _contractspec_lib_schema620.SchemaModel<{
116
+ storeId: {
117
+ type: _contractspec_lib_schema620.FieldType<string, string>;
118
+ isOptional: false;
119
+ };
120
+ items: {
121
+ type: _contractspec_lib_schema620.FieldType<unknown, unknown>;
122
+ isOptional: false;
123
+ description: string;
124
+ };
125
+ shippingAddress: {
126
+ type: _contractspec_lib_schema620.FieldType<unknown, unknown>;
127
+ isOptional: true;
128
+ };
129
+ billingAddress: {
130
+ type: _contractspec_lib_schema620.FieldType<unknown, unknown>;
131
+ isOptional: true;
132
+ };
133
+ buyerNote: {
134
+ type: _contractspec_lib_schema620.FieldType<string, string>;
135
+ isOptional: true;
136
+ };
137
+ }>;
138
+ /**
139
+ * Input for updating order status.
140
+ */
141
+ declare const UpdateOrderStatusInputModel: _contractspec_lib_schema620.SchemaModel<{
142
+ orderId: {
143
+ type: _contractspec_lib_schema620.FieldType<string, string>;
144
+ isOptional: false;
145
+ };
146
+ status: {
147
+ type: _contractspec_lib_schema620.EnumType<[string, string, string, string, string, string, string, string, string, string]>;
148
+ isOptional: false;
149
+ };
150
+ trackingNumber: {
151
+ type: _contractspec_lib_schema620.FieldType<string, string>;
152
+ isOptional: true;
153
+ };
154
+ trackingUrl: {
155
+ type: _contractspec_lib_schema620.FieldType<string, string>;
156
+ isOptional: true;
157
+ };
158
+ note: {
159
+ type: _contractspec_lib_schema620.FieldType<string, string>;
160
+ isOptional: true;
161
+ };
162
+ }>;
163
+ //#endregion
164
+ export { CreateOrderInputModel, OrderItemModel, OrderModel, UpdateOrderStatusInputModel };
165
+ //# sourceMappingURL=order.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.schema.d.ts","names":[],"sources":["../../src/order/order.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,cAUX,8BAVyB,WAUzB,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;EAVyB,CAAA;EAed,WAAA,EAiBX;IAAA,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;cAjBW,UAAU,8BAAA,WAAA,CAAA;EAAA,EAAA,EAAA;IAsBV,IAAA,EALX,2BAAA,CAAA,SAkBA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;EAbgC,OAAA,EAAA;IAkBrB,IAAA,uCAYX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;EAZsC,MAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAlB3B,mDAAqB;;UAahC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;cAKW,yDAA2B;;UAYtC,2BAAA,CAAA"}
@@ -0,0 +1,155 @@
1
+ import { OrderStatusEnum } from "./order.enum.js";
2
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
3
+
4
+ //#region src/order/order.schema.ts
5
+ /**
6
+ * An order item.
7
+ */
8
+ const OrderItemModel = defineSchemaModel({
9
+ name: "OrderItemModel",
10
+ fields: {
11
+ id: {
12
+ type: ScalarTypeEnum.String_unsecure(),
13
+ isOptional: false
14
+ },
15
+ productId: {
16
+ type: ScalarTypeEnum.String_unsecure(),
17
+ isOptional: false
18
+ },
19
+ productName: {
20
+ type: ScalarTypeEnum.String_unsecure(),
21
+ isOptional: false
22
+ },
23
+ unitPrice: {
24
+ type: ScalarTypeEnum.Float_unsecure(),
25
+ isOptional: false
26
+ },
27
+ quantity: {
28
+ type: ScalarTypeEnum.Int_unsecure(),
29
+ isOptional: false
30
+ },
31
+ subtotal: {
32
+ type: ScalarTypeEnum.Float_unsecure(),
33
+ isOptional: false
34
+ }
35
+ }
36
+ });
37
+ /**
38
+ * An order.
39
+ */
40
+ const OrderModel = defineSchemaModel({
41
+ name: "OrderModel",
42
+ description: "An order",
43
+ fields: {
44
+ id: {
45
+ type: ScalarTypeEnum.String_unsecure(),
46
+ isOptional: false
47
+ },
48
+ orderNumber: {
49
+ type: ScalarTypeEnum.String_unsecure(),
50
+ isOptional: false
51
+ },
52
+ buyerId: {
53
+ type: ScalarTypeEnum.String_unsecure(),
54
+ isOptional: false
55
+ },
56
+ storeId: {
57
+ type: ScalarTypeEnum.String_unsecure(),
58
+ isOptional: false
59
+ },
60
+ status: {
61
+ type: OrderStatusEnum,
62
+ isOptional: false
63
+ },
64
+ subtotal: {
65
+ type: ScalarTypeEnum.Float_unsecure(),
66
+ isOptional: false
67
+ },
68
+ shippingTotal: {
69
+ type: ScalarTypeEnum.Float_unsecure(),
70
+ isOptional: false
71
+ },
72
+ taxTotal: {
73
+ type: ScalarTypeEnum.Float_unsecure(),
74
+ isOptional: false
75
+ },
76
+ total: {
77
+ type: ScalarTypeEnum.Float_unsecure(),
78
+ isOptional: false
79
+ },
80
+ currency: {
81
+ type: ScalarTypeEnum.String_unsecure(),
82
+ isOptional: false
83
+ },
84
+ items: {
85
+ type: OrderItemModel,
86
+ isArray: true,
87
+ isOptional: true
88
+ },
89
+ createdAt: {
90
+ type: ScalarTypeEnum.DateTime(),
91
+ isOptional: false
92
+ }
93
+ }
94
+ });
95
+ /**
96
+ * Input for creating an order.
97
+ */
98
+ const CreateOrderInputModel = defineSchemaModel({
99
+ name: "CreateOrderInput",
100
+ fields: {
101
+ storeId: {
102
+ type: ScalarTypeEnum.String_unsecure(),
103
+ isOptional: false
104
+ },
105
+ items: {
106
+ type: ScalarTypeEnum.JSON(),
107
+ isOptional: false,
108
+ description: "Array of {productId, variantId?, quantity}"
109
+ },
110
+ shippingAddress: {
111
+ type: ScalarTypeEnum.JSON(),
112
+ isOptional: true
113
+ },
114
+ billingAddress: {
115
+ type: ScalarTypeEnum.JSON(),
116
+ isOptional: true
117
+ },
118
+ buyerNote: {
119
+ type: ScalarTypeEnum.String_unsecure(),
120
+ isOptional: true
121
+ }
122
+ }
123
+ });
124
+ /**
125
+ * Input for updating order status.
126
+ */
127
+ const UpdateOrderStatusInputModel = defineSchemaModel({
128
+ name: "UpdateOrderStatusInput",
129
+ fields: {
130
+ orderId: {
131
+ type: ScalarTypeEnum.String_unsecure(),
132
+ isOptional: false
133
+ },
134
+ status: {
135
+ type: OrderStatusEnum,
136
+ isOptional: false
137
+ },
138
+ trackingNumber: {
139
+ type: ScalarTypeEnum.String_unsecure(),
140
+ isOptional: true
141
+ },
142
+ trackingUrl: {
143
+ type: ScalarTypeEnum.String_unsecure(),
144
+ isOptional: true
145
+ },
146
+ note: {
147
+ type: ScalarTypeEnum.String_unsecure(),
148
+ isOptional: true
149
+ }
150
+ }
151
+ });
152
+
153
+ //#endregion
154
+ export { CreateOrderInputModel, OrderItemModel, OrderModel, UpdateOrderStatusInputModel };
155
+ //# sourceMappingURL=order.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.schema.js","names":[],"sources":["../../src/order/order.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { OrderStatusEnum } from './order.enum';\n\n/**\n * An order item.\n */\nexport const OrderItemModel = defineSchemaModel({\n name: 'OrderItemModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n productName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n unitPrice: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n quantity: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n subtotal: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n },\n});\n\n/**\n * An order.\n */\nexport const OrderModel = defineSchemaModel({\n name: 'OrderModel',\n description: 'An order',\n fields: {\n id: { 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 status: { type: OrderStatusEnum, isOptional: false },\n subtotal: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n shippingTotal: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n taxTotal: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n total: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n items: { type: OrderItemModel, isArray: true, isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating an order.\n */\nexport const CreateOrderInputModel = defineSchemaModel({\n name: 'CreateOrderInput',\n fields: {\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n items: {\n type: ScalarTypeEnum.JSON(),\n isOptional: false,\n description: 'Array of {productId, variantId?, quantity}',\n },\n shippingAddress: { type: ScalarTypeEnum.JSON(), isOptional: true },\n billingAddress: { type: ScalarTypeEnum.JSON(), isOptional: true },\n buyerNote: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n/**\n * Input for updating order status.\n */\nexport const UpdateOrderStatusInputModel = defineSchemaModel({\n name: 'UpdateOrderStatusInput',\n fields: {\n orderId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: OrderStatusEnum, isOptional: false },\n trackingNumber: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n trackingUrl: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n note: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;;AAMA,MAAa,iBAAiB,kBAAkB;CAC9C,MAAM;CACN,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,WAAW;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACvE,UAAU;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACpE,UAAU;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACvE;CACF,CAAC;;;;AAKF,MAAa,aAAa,kBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,QAAQ;GAAE,MAAM;GAAiB,YAAY;GAAO;EACpD,UAAU;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACtE,eAAe;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EAC3E,UAAU;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACtE,OAAO;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,OAAO;GAAE,MAAM;GAAgB,SAAS;GAAM,YAAY;GAAM;EAChE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,wBAAwB,kBAAkB;CACrD,MAAM;CACN,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,OAAO;GACL,MAAM,eAAe,MAAM;GAC3B,YAAY;GACZ,aAAa;GACd;EACD,iBAAiB;GAAE,MAAM,eAAe,MAAM;GAAE,YAAY;GAAM;EAClE,gBAAgB;GAAE,MAAM,eAAe,MAAM;GAAE,YAAY;GAAM;EACjE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE;CACF,CAAC;;;;AAKF,MAAa,8BAA8B,kBAAkB;CAC3D,MAAM;CACN,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,QAAQ;GAAE,MAAM;GAAiB,YAAY;GAAO;EACpD,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACnE;CACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { PayoutStatusEnum } from "./payout.enum.js";
2
+ import { ListPayoutsInputModel, ListPayoutsOutputModel, PayoutModel } from "./payout.schema.js";
3
+ import { ListPayoutsContract } from "./payout.operations.js";
4
+ import { PayoutCreatedEvent, PayoutPaidEvent } from "./payout.event.js";
5
+ export { ListPayoutsContract, ListPayoutsInputModel, ListPayoutsOutputModel, PayoutCreatedEvent, PayoutModel, PayoutPaidEvent, PayoutStatusEnum };
@@ -0,0 +1,6 @@
1
+ import { PayoutStatusEnum } from "./payout.enum.js";
2
+ import { ListPayoutsInputModel, ListPayoutsOutputModel, PayoutModel } from "./payout.schema.js";
3
+ import { ListPayoutsContract } from "./payout.operations.js";
4
+ import { PayoutCreatedEvent, PayoutPaidEvent } from "./payout.event.js";
5
+
6
+ export { ListPayoutsContract, ListPayoutsInputModel, ListPayoutsOutputModel, PayoutCreatedEvent, PayoutModel, PayoutPaidEvent, PayoutStatusEnum };
@@ -0,0 +1,10 @@
1
+ import * as _contractspec_lib_schema782 from "@contractspec/lib.schema";
2
+
3
+ //#region src/payout/payout.enum.d.ts
4
+ /**
5
+ * Payout status enum.
6
+ */
7
+ declare const PayoutStatusEnum: _contractspec_lib_schema782.EnumType<[string, string, string, string, string]>;
8
+ //#endregion
9
+ export { PayoutStatusEnum };
10
+ //# sourceMappingURL=payout.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payout.enum.d.ts","names":[],"sources":["../../src/payout/payout.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,gBAMX,EAAA,2BAAA,CAN2B,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { defineEnum } from "@contractspec/lib.schema";
2
+
3
+ //#region src/payout/payout.enum.ts
4
+ /**
5
+ * Payout status enum.
6
+ */
7
+ const PayoutStatusEnum = defineEnum("PayoutStatus", [
8
+ "PENDING",
9
+ "PROCESSING",
10
+ "PAID",
11
+ "FAILED",
12
+ "CANCELLED"
13
+ ]);
14
+
15
+ //#endregion
16
+ export { PayoutStatusEnum };
17
+ //# sourceMappingURL=payout.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payout.enum.js","names":[],"sources":["../../src/payout/payout.enum.ts"],"sourcesContent":["import { defineEnum } from '@contractspec/lib.schema';\n\n/**\n * Payout status enum.\n */\nexport const PayoutStatusEnum = defineEnum('PayoutStatus', [\n 'PENDING',\n 'PROCESSING',\n 'PAID',\n 'FAILED',\n 'CANCELLED',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,mBAAmB,WAAW,gBAAgB;CACzD;CACA;CACA;CACA;CACA;CACD,CAAC"}
@@ -0,0 +1,63 @@
1
+ import * as _contractspec_lib_schema783 from "@contractspec/lib.schema";
2
+ import * as _contractspec_lib_contracts6 from "@contractspec/lib.contracts";
3
+
4
+ //#region src/payout/payout.event.d.ts
5
+ declare const PayoutCreatedEvent: _contractspec_lib_contracts6.EventSpec<_contractspec_lib_schema783.SchemaModel<{
6
+ payoutId: {
7
+ type: _contractspec_lib_schema783.FieldType<string, string>;
8
+ isOptional: false;
9
+ };
10
+ payoutNumber: {
11
+ type: _contractspec_lib_schema783.FieldType<string, string>;
12
+ isOptional: false;
13
+ };
14
+ storeId: {
15
+ type: _contractspec_lib_schema783.FieldType<string, string>;
16
+ isOptional: false;
17
+ };
18
+ netAmount: {
19
+ type: _contractspec_lib_schema783.FieldType<number, number>;
20
+ isOptional: false;
21
+ };
22
+ currency: {
23
+ type: _contractspec_lib_schema783.FieldType<string, string>;
24
+ isOptional: false;
25
+ };
26
+ orderCount: {
27
+ type: _contractspec_lib_schema783.FieldType<number, number>;
28
+ isOptional: false;
29
+ };
30
+ timestamp: {
31
+ type: _contractspec_lib_schema783.FieldType<Date, string>;
32
+ isOptional: false;
33
+ };
34
+ }>>;
35
+ declare const PayoutPaidEvent: _contractspec_lib_contracts6.EventSpec<_contractspec_lib_schema783.SchemaModel<{
36
+ payoutId: {
37
+ type: _contractspec_lib_schema783.FieldType<string, string>;
38
+ isOptional: false;
39
+ };
40
+ payoutNumber: {
41
+ type: _contractspec_lib_schema783.FieldType<string, string>;
42
+ isOptional: false;
43
+ };
44
+ storeId: {
45
+ type: _contractspec_lib_schema783.FieldType<string, string>;
46
+ isOptional: false;
47
+ };
48
+ netAmount: {
49
+ type: _contractspec_lib_schema783.FieldType<number, number>;
50
+ isOptional: false;
51
+ };
52
+ paymentReference: {
53
+ type: _contractspec_lib_schema783.FieldType<string, string>;
54
+ isOptional: true;
55
+ };
56
+ timestamp: {
57
+ type: _contractspec_lib_schema783.FieldType<Date, string>;
58
+ isOptional: false;
59
+ };
60
+ }>>;
61
+ //#endregion
62
+ export { PayoutCreatedEvent, PayoutPaidEvent };
63
+ //# sourceMappingURL=payout.event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payout.event.d.ts","names":[],"sources":["../../src/payout/payout.event.ts"],"sourcesContent":[],"mappings":";;;;cA+Ba,oBAAkB,4BAAA,CAAA,sCAAA;;UAU7B,2BAAA,CAAA;;EAVW,CAAA;EAUX,YAAA,EAAA;;;;;;;;;IAV6B,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAYlB,CAAA;EAUX,QAAA,EAAA;;;;;;;;EAV0B,SAAA,EAAA;IAAA,IAAA,uCAAA,KAAA,EAAA,MAAA,CAAA;;;;cAAf,iBAAe,4BAAA,CAAA,sCAAA;;UAU1B,2BAAA,CAAA"}
@@ -0,0 +1,92 @@
1
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
2
+ import { defineEvent } from "@contractspec/lib.contracts";
3
+
4
+ //#region src/payout/payout.event.ts
5
+ const PayoutCreatedPayload = defineSchemaModel({
6
+ name: "PayoutCreatedEventPayload",
7
+ fields: {
8
+ payoutId: {
9
+ type: ScalarTypeEnum.String_unsecure(),
10
+ isOptional: false
11
+ },
12
+ payoutNumber: {
13
+ type: ScalarTypeEnum.String_unsecure(),
14
+ isOptional: false
15
+ },
16
+ storeId: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: false
19
+ },
20
+ netAmount: {
21
+ type: ScalarTypeEnum.Float_unsecure(),
22
+ isOptional: false
23
+ },
24
+ currency: {
25
+ type: ScalarTypeEnum.String_unsecure(),
26
+ isOptional: false
27
+ },
28
+ orderCount: {
29
+ type: ScalarTypeEnum.Int_unsecure(),
30
+ isOptional: false
31
+ },
32
+ timestamp: {
33
+ type: ScalarTypeEnum.DateTime(),
34
+ isOptional: false
35
+ }
36
+ }
37
+ });
38
+ const PayoutPaidPayload = defineSchemaModel({
39
+ name: "PayoutPaidEventPayload",
40
+ fields: {
41
+ payoutId: {
42
+ type: ScalarTypeEnum.String_unsecure(),
43
+ isOptional: false
44
+ },
45
+ payoutNumber: {
46
+ type: ScalarTypeEnum.String_unsecure(),
47
+ isOptional: false
48
+ },
49
+ storeId: {
50
+ type: ScalarTypeEnum.String_unsecure(),
51
+ isOptional: false
52
+ },
53
+ netAmount: {
54
+ type: ScalarTypeEnum.Float_unsecure(),
55
+ isOptional: false
56
+ },
57
+ paymentReference: {
58
+ type: ScalarTypeEnum.String_unsecure(),
59
+ isOptional: true
60
+ },
61
+ timestamp: {
62
+ type: ScalarTypeEnum.DateTime(),
63
+ isOptional: false
64
+ }
65
+ }
66
+ });
67
+ const PayoutCreatedEvent = defineEvent({
68
+ meta: {
69
+ key: "marketplace.payout.created",
70
+ version: 1,
71
+ description: "A payout has been created.",
72
+ stability: "experimental",
73
+ owners: ["@marketplace-team"],
74
+ tags: ["marketplace", "payout"]
75
+ },
76
+ payload: PayoutCreatedPayload
77
+ });
78
+ const PayoutPaidEvent = defineEvent({
79
+ meta: {
80
+ key: "marketplace.payout.paid",
81
+ version: 1,
82
+ description: "A payout has been sent.",
83
+ stability: "experimental",
84
+ owners: ["@marketplace-team"],
85
+ tags: ["marketplace", "payout"]
86
+ },
87
+ payload: PayoutPaidPayload
88
+ });
89
+
90
+ //#endregion
91
+ export { PayoutCreatedEvent, PayoutPaidEvent };
92
+ //# sourceMappingURL=payout.event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payout.event.js","names":[],"sources":["../../src/payout/payout.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\nconst PayoutCreatedPayload = defineSchemaModel({\n name: 'PayoutCreatedEventPayload',\n fields: {\n payoutId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n payoutNumber: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n netAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orderCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst PayoutPaidPayload = defineSchemaModel({\n name: 'PayoutPaidEventPayload',\n fields: {\n payoutId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n payoutNumber: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n netAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n paymentReference: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const PayoutCreatedEvent = defineEvent({\n meta: {\n key: 'marketplace.payout.created',\n version: 1,\n description: 'A payout has been created.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'payout'],\n },\n payload: PayoutCreatedPayload,\n});\n\nexport const PayoutPaidEvent = defineEvent({\n meta: {\n key: 'marketplace.payout.paid',\n version: 1,\n description: 'A payout has been sent.',\n stability: 'experimental',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'payout'],\n },\n payload: PayoutPaidPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,uBAAuB,kBAAkB;CAC7C,MAAM;CACN,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACvE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,YAAY;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAM,oBAAoB,kBAAkB;CAC1C,MAAM;CACN,QAAQ;EACN,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACvE,kBAAkB;GAChB,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,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,kBAAkB,YAAY;CACzC,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,SAAS;EAChC;CACD,SAAS;CACV,CAAC"}
@@ -0,0 +1,97 @@
1
+ import * as _contractspec_lib_schema816 from "@contractspec/lib.schema";
2
+ import * as _contractspec_lib_contracts11 from "@contractspec/lib.contracts";
3
+
4
+ //#region src/payout/payout.operations.d.ts
5
+ /**
6
+ * List payouts for a store.
7
+ */
8
+ declare const ListPayoutsContract: _contractspec_lib_contracts11.OperationSpec<_contractspec_lib_schema816.SchemaModel<{
9
+ storeId: {
10
+ type: _contractspec_lib_schema816.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ status: {
14
+ type: _contractspec_lib_schema816.EnumType<[string, string, string, string, string]>;
15
+ isOptional: true;
16
+ };
17
+ limit: {
18
+ type: _contractspec_lib_schema816.FieldType<number, number>;
19
+ isOptional: true;
20
+ defaultValue: number;
21
+ };
22
+ offset: {
23
+ type: _contractspec_lib_schema816.FieldType<number, number>;
24
+ isOptional: true;
25
+ defaultValue: number;
26
+ };
27
+ }>, _contractspec_lib_schema816.SchemaModel<{
28
+ payouts: {
29
+ type: _contractspec_lib_schema816.SchemaModel<{
30
+ id: {
31
+ type: _contractspec_lib_schema816.FieldType<string, string>;
32
+ isOptional: false;
33
+ };
34
+ payoutNumber: {
35
+ type: _contractspec_lib_schema816.FieldType<string, string>;
36
+ isOptional: false;
37
+ };
38
+ storeId: {
39
+ type: _contractspec_lib_schema816.FieldType<string, string>;
40
+ isOptional: false;
41
+ };
42
+ status: {
43
+ type: _contractspec_lib_schema816.EnumType<[string, string, string, string, string]>;
44
+ isOptional: false;
45
+ };
46
+ grossAmount: {
47
+ type: _contractspec_lib_schema816.FieldType<number, number>;
48
+ isOptional: false;
49
+ };
50
+ platformFees: {
51
+ type: _contractspec_lib_schema816.FieldType<number, number>;
52
+ isOptional: false;
53
+ };
54
+ netAmount: {
55
+ type: _contractspec_lib_schema816.FieldType<number, number>;
56
+ isOptional: false;
57
+ };
58
+ currency: {
59
+ type: _contractspec_lib_schema816.FieldType<string, string>;
60
+ isOptional: false;
61
+ };
62
+ periodStart: {
63
+ type: _contractspec_lib_schema816.FieldType<Date, string>;
64
+ isOptional: false;
65
+ };
66
+ periodEnd: {
67
+ type: _contractspec_lib_schema816.FieldType<Date, string>;
68
+ isOptional: false;
69
+ };
70
+ orderCount: {
71
+ type: _contractspec_lib_schema816.FieldType<number, number>;
72
+ isOptional: false;
73
+ };
74
+ createdAt: {
75
+ type: _contractspec_lib_schema816.FieldType<Date, string>;
76
+ isOptional: false;
77
+ };
78
+ paidAt: {
79
+ type: _contractspec_lib_schema816.FieldType<Date, string>;
80
+ isOptional: true;
81
+ };
82
+ }>;
83
+ isArray: true;
84
+ isOptional: false;
85
+ };
86
+ total: {
87
+ type: _contractspec_lib_schema816.FieldType<number, number>;
88
+ isOptional: false;
89
+ };
90
+ totalPending: {
91
+ type: _contractspec_lib_schema816.FieldType<number, number>;
92
+ isOptional: false;
93
+ };
94
+ }>, undefined>;
95
+ //#endregion
96
+ export { ListPayoutsContract };
97
+ //# sourceMappingURL=payout.operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payout.operations.d.ts","names":[],"sources":["../../src/payout/payout.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAQa,mDAAmB,0CAAA;EAAnB,OAAA,EAAA;IA8BX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;8CA9B8B,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;;;;;;;;;;cAAA,2BAAA,CAAA;;;;;yBAAA;MAAA,CAAA"}