@contractspec/example.marketplace 1.44.0 → 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.
- package/dist/entities/index.d.ts +296 -296
- package/dist/entities/order.d.ts +78 -78
- package/dist/entities/order.d.ts.map +1 -1
- package/dist/entities/payout.d.ts +65 -65
- package/dist/entities/product.d.ts +70 -70
- package/dist/entities/review.d.ts +56 -56
- package/dist/entities/store.d.ts +41 -41
- package/dist/entities/store.d.ts.map +1 -1
- package/dist/example.d.ts +3 -36
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +16 -11
- package/dist/example.js.map +1 -1
- package/dist/marketplace.feature.js +63 -63
- package/dist/marketplace.feature.js.map +1 -1
- package/dist/order/order.enum.d.ts +2 -2
- package/dist/order/order.enum.d.ts.map +1 -1
- package/dist/order/order.event.d.ts +39 -39
- package/dist/order/order.event.d.ts.map +1 -1
- package/dist/order/order.event.js +5 -5
- package/dist/order/order.event.js.map +1 -1
- package/dist/order/order.operations.d.ts +92 -92
- package/dist/order/order.operations.js +4 -4
- package/dist/order/order.operations.js.map +1 -1
- package/dist/order/order.presentation.js +3 -3
- package/dist/order/order.presentation.js.map +1 -1
- package/dist/order/order.schema.d.ts +39 -39
- package/dist/payout/payout.enum.d.ts +2 -2
- package/dist/payout/payout.event.d.ts +17 -17
- package/dist/payout/payout.event.js +2 -2
- package/dist/payout/payout.event.js.map +1 -1
- package/dist/payout/payout.operations.d.ts +24 -24
- package/dist/payout/payout.operations.d.ts.map +1 -1
- package/dist/payout/payout.operations.js +1 -1
- package/dist/payout/payout.operations.js.map +1 -1
- package/dist/payout/payout.presentation.js +2 -2
- package/dist/payout/payout.presentation.js.map +1 -1
- package/dist/payout/payout.schema.d.ts +37 -37
- package/dist/product/product.enum.d.ts +2 -2
- package/dist/product/product.event.d.ts +20 -20
- package/dist/product/product.event.js +3 -3
- package/dist/product/product.event.js.map +1 -1
- package/dist/product/product.operations.d.ts +68 -68
- package/dist/product/product.operations.js +3 -3
- package/dist/product/product.operations.js.map +1 -1
- package/dist/product/product.presentation.js +3 -3
- package/dist/product/product.presentation.js.map +1 -1
- package/dist/product/product.schema.d.ts +52 -52
- package/dist/review/review.enum.d.ts +2 -2
- package/dist/review/review.event.d.ts +14 -14
- package/dist/review/review.event.js +2 -2
- package/dist/review/review.event.js.map +1 -1
- package/dist/review/review.operations.d.ts +59 -59
- package/dist/review/review.operations.d.ts.map +1 -1
- package/dist/review/review.operations.js +3 -3
- package/dist/review/review.operations.js.map +1 -1
- package/dist/review/review.presentation.js +2 -2
- package/dist/review/review.presentation.js.map +1 -1
- package/dist/review/review.schema.d.ts +45 -45
- package/dist/review/review.schema.d.ts.map +1 -1
- package/dist/store/store.enum.d.ts +2 -2
- package/dist/store/store.enum.d.ts.map +1 -1
- package/dist/store/store.event.d.ts +13 -13
- package/dist/store/store.event.js +2 -2
- package/dist/store/store.event.js.map +1 -1
- package/dist/store/store.operations.d.ts +33 -33
- package/dist/store/store.operations.js +2 -2
- package/dist/store/store.operations.js.map +1 -1
- package/dist/store/store.presentation.js +2 -2
- package/dist/store/store.presentation.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema1031 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<
|
|
5
|
+
declare const StoreCreatedEvent: _contractspec_lib_contracts18.EventSpec<_contractspec_lib_schema1031.SchemaModel<{
|
|
6
6
|
storeId: {
|
|
7
|
-
type:
|
|
7
|
+
type: _contractspec_lib_schema1031.FieldType<string, string>;
|
|
8
8
|
isOptional: false;
|
|
9
9
|
};
|
|
10
10
|
name: {
|
|
11
|
-
type:
|
|
11
|
+
type: _contractspec_lib_schema1031.FieldType<string, string>;
|
|
12
12
|
isOptional: false;
|
|
13
13
|
};
|
|
14
14
|
slug: {
|
|
15
|
-
type:
|
|
15
|
+
type: _contractspec_lib_schema1031.FieldType<string, string>;
|
|
16
16
|
isOptional: false;
|
|
17
17
|
};
|
|
18
18
|
ownerId: {
|
|
19
|
-
type:
|
|
19
|
+
type: _contractspec_lib_schema1031.FieldType<string, string>;
|
|
20
20
|
isOptional: false;
|
|
21
21
|
};
|
|
22
22
|
timestamp: {
|
|
23
|
-
type:
|
|
23
|
+
type: _contractspec_lib_schema1031.FieldType<Date, string>;
|
|
24
24
|
isOptional: false;
|
|
25
25
|
};
|
|
26
26
|
}>>;
|
|
27
|
-
declare const StoreStatusChangedEvent: _contractspec_lib_contracts18.EventSpec<
|
|
27
|
+
declare const StoreStatusChangedEvent: _contractspec_lib_contracts18.EventSpec<_contractspec_lib_schema1031.SchemaModel<{
|
|
28
28
|
storeId: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema1031.FieldType<string, string>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
previousStatus: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema1031.FieldType<string, string>;
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
newStatus: {
|
|
37
|
-
type:
|
|
37
|
+
type: _contractspec_lib_schema1031.FieldType<string, string>;
|
|
38
38
|
isOptional: false;
|
|
39
39
|
};
|
|
40
40
|
reason: {
|
|
41
|
-
type:
|
|
41
|
+
type: _contractspec_lib_schema1031.FieldType<string, string>;
|
|
42
42
|
isOptional: true;
|
|
43
43
|
};
|
|
44
44
|
timestamp: {
|
|
45
|
-
type:
|
|
45
|
+
type: _contractspec_lib_schema1031.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"}
|
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema1043 from "@contractspec/lib.schema";
|
|
2
2
|
import * as _contractspec_lib_contracts20 from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/store/store.operations.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Create a new seller store.
|
|
7
7
|
*/
|
|
8
|
-
declare const CreateStoreContract: _contractspec_lib_contracts20.OperationSpec<
|
|
8
|
+
declare const CreateStoreContract: _contractspec_lib_contracts20.OperationSpec<_contractspec_lib_schema1043.SchemaModel<{
|
|
9
9
|
name: {
|
|
10
|
-
type:
|
|
10
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
13
|
slug: {
|
|
14
|
-
type:
|
|
14
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
15
15
|
isOptional: false;
|
|
16
16
|
};
|
|
17
17
|
description: {
|
|
18
|
-
type:
|
|
18
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
19
19
|
isOptional: true;
|
|
20
20
|
};
|
|
21
21
|
email: {
|
|
22
|
-
type:
|
|
22
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
23
23
|
isOptional: true;
|
|
24
24
|
};
|
|
25
25
|
country: {
|
|
26
|
-
type:
|
|
26
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
27
27
|
isOptional: true;
|
|
28
28
|
};
|
|
29
29
|
currency: {
|
|
30
|
-
type:
|
|
30
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
31
31
|
isOptional: true;
|
|
32
32
|
};
|
|
33
|
-
}>,
|
|
33
|
+
}>, _contractspec_lib_schema1043.SchemaModel<{
|
|
34
34
|
id: {
|
|
35
|
-
type:
|
|
35
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
36
36
|
isOptional: false;
|
|
37
37
|
};
|
|
38
38
|
name: {
|
|
39
|
-
type:
|
|
39
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
40
40
|
isOptional: false;
|
|
41
41
|
};
|
|
42
42
|
slug: {
|
|
43
|
-
type:
|
|
43
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
44
44
|
isOptional: false;
|
|
45
45
|
};
|
|
46
46
|
description: {
|
|
47
|
-
type:
|
|
47
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
48
48
|
isOptional: true;
|
|
49
49
|
};
|
|
50
50
|
status: {
|
|
51
|
-
type:
|
|
51
|
+
type: _contractspec_lib_schema1043.EnumType<[string, string, string, string]>;
|
|
52
52
|
isOptional: false;
|
|
53
53
|
};
|
|
54
54
|
ownerId: {
|
|
55
|
-
type:
|
|
55
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
56
56
|
isOptional: false;
|
|
57
57
|
};
|
|
58
58
|
logoFileId: {
|
|
59
|
-
type:
|
|
59
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
60
60
|
isOptional: true;
|
|
61
61
|
};
|
|
62
62
|
isVerified: {
|
|
63
|
-
type:
|
|
63
|
+
type: _contractspec_lib_schema1043.FieldType<boolean, boolean>;
|
|
64
64
|
isOptional: false;
|
|
65
65
|
};
|
|
66
66
|
totalProducts: {
|
|
67
|
-
type:
|
|
67
|
+
type: _contractspec_lib_schema1043.FieldType<number, number>;
|
|
68
68
|
isOptional: false;
|
|
69
69
|
};
|
|
70
70
|
averageRating: {
|
|
71
|
-
type:
|
|
71
|
+
type: _contractspec_lib_schema1043.FieldType<number, number>;
|
|
72
72
|
isOptional: false;
|
|
73
73
|
};
|
|
74
74
|
createdAt: {
|
|
75
|
-
type:
|
|
75
|
+
type: _contractspec_lib_schema1043.FieldType<Date, string>;
|
|
76
76
|
isOptional: false;
|
|
77
77
|
};
|
|
78
78
|
}>, {
|
|
79
79
|
key: string;
|
|
80
|
-
version:
|
|
80
|
+
version: string;
|
|
81
81
|
when: string;
|
|
82
|
-
payload:
|
|
82
|
+
payload: _contractspec_lib_schema1043.SchemaModel<{
|
|
83
83
|
id: {
|
|
84
|
-
type:
|
|
84
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
85
85
|
isOptional: false;
|
|
86
86
|
};
|
|
87
87
|
name: {
|
|
88
|
-
type:
|
|
88
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
89
89
|
isOptional: false;
|
|
90
90
|
};
|
|
91
91
|
slug: {
|
|
92
|
-
type:
|
|
92
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
93
93
|
isOptional: false;
|
|
94
94
|
};
|
|
95
95
|
description: {
|
|
96
|
-
type:
|
|
96
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
97
97
|
isOptional: true;
|
|
98
98
|
};
|
|
99
99
|
status: {
|
|
100
|
-
type:
|
|
100
|
+
type: _contractspec_lib_schema1043.EnumType<[string, string, string, string]>;
|
|
101
101
|
isOptional: false;
|
|
102
102
|
};
|
|
103
103
|
ownerId: {
|
|
104
|
-
type:
|
|
104
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
105
105
|
isOptional: false;
|
|
106
106
|
};
|
|
107
107
|
logoFileId: {
|
|
108
|
-
type:
|
|
108
|
+
type: _contractspec_lib_schema1043.FieldType<string, string>;
|
|
109
109
|
isOptional: true;
|
|
110
110
|
};
|
|
111
111
|
isVerified: {
|
|
112
|
-
type:
|
|
112
|
+
type: _contractspec_lib_schema1043.FieldType<boolean, boolean>;
|
|
113
113
|
isOptional: false;
|
|
114
114
|
};
|
|
115
115
|
totalProducts: {
|
|
116
|
-
type:
|
|
116
|
+
type: _contractspec_lib_schema1043.FieldType<number, number>;
|
|
117
117
|
isOptional: false;
|
|
118
118
|
};
|
|
119
119
|
averageRating: {
|
|
120
|
-
type:
|
|
120
|
+
type: _contractspec_lib_schema1043.FieldType<number, number>;
|
|
121
121
|
isOptional: false;
|
|
122
122
|
};
|
|
123
123
|
createdAt: {
|
|
124
|
-
type:
|
|
124
|
+
type: _contractspec_lib_schema1043.FieldType<Date, string>;
|
|
125
125
|
isOptional: false;
|
|
126
126
|
};
|
|
127
127
|
}>;
|
|
@@ -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.
|
|
3
|
+
"version": "1.45.0",
|
|
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.
|
|
22
|
-
"@contractspec/lib.contracts": "1.
|
|
23
|
-
"@contractspec/lib.bus": "1.
|
|
24
|
-
"@contractspec/lib.identity-rbac": "1.
|
|
25
|
-
"@contractspec/lib.files": "1.
|
|
26
|
-
"@contractspec/lib.metering": "1.
|
|
27
|
-
"@contractspec/lib.jobs": "1.
|
|
28
|
-
"@contractspec/module.audit-trail": "1.
|
|
29
|
-
"@contractspec/module.notifications": "1.
|
|
21
|
+
"@contractspec/lib.schema": "1.45.0",
|
|
22
|
+
"@contractspec/lib.contracts": "1.45.0",
|
|
23
|
+
"@contractspec/lib.bus": "1.45.0",
|
|
24
|
+
"@contractspec/lib.identity-rbac": "1.45.0",
|
|
25
|
+
"@contractspec/lib.files": "1.45.0",
|
|
26
|
+
"@contractspec/lib.metering": "1.45.0",
|
|
27
|
+
"@contractspec/lib.jobs": "1.45.0",
|
|
28
|
+
"@contractspec/module.audit-trail": "1.45.0",
|
|
29
|
+
"@contractspec/module.notifications": "1.45.0",
|
|
30
30
|
"zod": "^4.1.13"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@contractspec/tool.typescript": "1.
|
|
34
|
-
"@contractspec/tool.tsdown": "1.
|
|
33
|
+
"@contractspec/tool.typescript": "1.45.0",
|
|
34
|
+
"@contractspec/tool.tsdown": "1.45.0",
|
|
35
35
|
"typescript": "^5.9.3"
|
|
36
36
|
},
|
|
37
37
|
"exports": {
|