@contractspec/example.marketplace 3.7.6 → 3.8.2

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 (86) hide show
  1. package/README.md +64 -131
  2. package/dist/browser/entities/index.js +470 -470
  3. package/dist/browser/index.js +1257 -1019
  4. package/dist/browser/marketplace.feature.js +175 -0
  5. package/dist/browser/order/index.js +155 -155
  6. package/dist/browser/order/order.event.js +1 -1
  7. package/dist/browser/payout/index.js +71 -71
  8. package/dist/browser/payout/payout.event.js +1 -1
  9. package/dist/browser/product/index.js +104 -104
  10. package/dist/browser/product/product.event.js +1 -1
  11. package/dist/browser/review/index.js +75 -75
  12. package/dist/browser/review/review.event.js +1 -1
  13. package/dist/browser/store/index.js +68 -68
  14. package/dist/browser/store/store.event.js +1 -1
  15. package/dist/browser/ui/MarketplaceDashboard.js +328 -110
  16. package/dist/browser/ui/MarketplaceDashboard.visualizations.js +216 -0
  17. package/dist/browser/ui/hooks/index.js +1 -1
  18. package/dist/browser/ui/hooks/useMarketplaceData.js +1 -1
  19. package/dist/browser/ui/index.js +590 -359
  20. package/dist/browser/ui/renderers/index.js +190 -4
  21. package/dist/browser/ui/renderers/marketplace.markdown.js +190 -4
  22. package/dist/browser/visualizations/catalog.js +126 -0
  23. package/dist/browser/visualizations/index.js +183 -0
  24. package/dist/browser/visualizations/selectors.js +177 -0
  25. package/dist/entities/index.d.ts +110 -110
  26. package/dist/entities/index.js +470 -470
  27. package/dist/index.d.ts +4 -3
  28. package/dist/index.js +1257 -1019
  29. package/dist/marketplace.feature.js +175 -0
  30. package/dist/node/entities/index.js +470 -470
  31. package/dist/node/index.js +1257 -1019
  32. package/dist/node/marketplace.feature.js +175 -0
  33. package/dist/node/order/index.js +155 -155
  34. package/dist/node/order/order.event.js +1 -1
  35. package/dist/node/payout/index.js +71 -71
  36. package/dist/node/payout/payout.event.js +1 -1
  37. package/dist/node/product/index.js +104 -104
  38. package/dist/node/product/product.event.js +1 -1
  39. package/dist/node/review/index.js +75 -75
  40. package/dist/node/review/review.event.js +1 -1
  41. package/dist/node/store/index.js +68 -68
  42. package/dist/node/store/store.event.js +1 -1
  43. package/dist/node/ui/MarketplaceDashboard.js +328 -110
  44. package/dist/node/ui/MarketplaceDashboard.visualizations.js +216 -0
  45. package/dist/node/ui/hooks/index.js +1 -1
  46. package/dist/node/ui/hooks/useMarketplaceData.js +1 -1
  47. package/dist/node/ui/index.js +590 -359
  48. package/dist/node/ui/renderers/index.js +190 -4
  49. package/dist/node/ui/renderers/marketplace.markdown.js +190 -4
  50. package/dist/node/visualizations/catalog.js +126 -0
  51. package/dist/node/visualizations/index.js +183 -0
  52. package/dist/node/visualizations/selectors.js +177 -0
  53. package/dist/order/index.d.ts +2 -2
  54. package/dist/order/index.js +155 -155
  55. package/dist/order/order.event.js +1 -1
  56. package/dist/payout/index.d.ts +2 -2
  57. package/dist/payout/index.js +71 -71
  58. package/dist/payout/payout.event.js +1 -1
  59. package/dist/product/index.d.ts +2 -2
  60. package/dist/product/index.js +104 -104
  61. package/dist/product/product.event.js +1 -1
  62. package/dist/review/index.d.ts +2 -2
  63. package/dist/review/index.js +75 -75
  64. package/dist/review/review.event.js +1 -1
  65. package/dist/store/index.d.ts +2 -2
  66. package/dist/store/index.js +68 -68
  67. package/dist/store/store.event.js +1 -1
  68. package/dist/ui/MarketplaceDashboard.js +328 -110
  69. package/dist/ui/MarketplaceDashboard.visualizations.d.ts +5 -0
  70. package/dist/ui/MarketplaceDashboard.visualizations.js +217 -0
  71. package/dist/ui/hooks/index.d.ts +1 -1
  72. package/dist/ui/hooks/index.js +1 -1
  73. package/dist/ui/hooks/useMarketplaceData.js +1 -1
  74. package/dist/ui/index.d.ts +2 -2
  75. package/dist/ui/index.js +590 -359
  76. package/dist/ui/renderers/index.d.ts +1 -1
  77. package/dist/ui/renderers/index.js +190 -4
  78. package/dist/ui/renderers/marketplace.markdown.js +190 -4
  79. package/dist/visualizations/catalog.d.ts +10 -0
  80. package/dist/visualizations/catalog.js +127 -0
  81. package/dist/visualizations/index.d.ts +2 -0
  82. package/dist/visualizations/index.js +184 -0
  83. package/dist/visualizations/selectors.d.ts +11 -0
  84. package/dist/visualizations/selectors.js +178 -0
  85. package/dist/visualizations/selectors.test.d.ts +1 -0
  86. package/package.json +66 -10
@@ -7,34 +7,83 @@ var StoreStatusEnum = defineEnum("StoreStatus", [
7
7
  "CLOSED"
8
8
  ]);
9
9
 
10
- // src/store/store.schema.ts
10
+ // src/store/store.event.ts
11
+ import { defineEvent } from "@contractspec/lib.contracts-spec";
11
12
  import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
12
- var StoreModel = defineSchemaModel({
13
- name: "StoreModel",
14
- description: "A seller store",
13
+ var StoreCreatedPayload = defineSchemaModel({
14
+ name: "StoreCreatedEventPayload",
15
15
  fields: {
16
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
16
+ storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
17
17
  name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
18
18
  slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
19
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
20
- status: { type: StoreStatusEnum, isOptional: false },
21
19
  ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
22
- logoFileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
23
- isVerified: { type: ScalarTypeEnum.Boolean(), isOptional: false },
24
- totalProducts: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
25
- averageRating: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
26
- createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
20
+ timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false }
21
+ }
22
+ });
23
+ var StoreStatusChangedPayload = defineSchemaModel({
24
+ name: "StoreStatusChangedEventPayload",
25
+ fields: {
26
+ storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
27
+ previousStatus: {
28
+ type: ScalarTypeEnum.String_unsecure(),
29
+ isOptional: false
30
+ },
31
+ newStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
32
+ reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
33
+ timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false }
34
+ }
35
+ });
36
+ var StoreCreatedEvent = defineEvent({
37
+ meta: {
38
+ key: "marketplace.store.created",
39
+ version: "1.0.0",
40
+ description: "A new seller store has been created.",
41
+ stability: "experimental",
42
+ owners: ["@marketplace-team"],
43
+ tags: ["marketplace", "store"]
44
+ },
45
+ payload: StoreCreatedPayload
46
+ });
47
+ var StoreStatusChangedEvent = defineEvent({
48
+ meta: {
49
+ key: "marketplace.store.statusChanged",
50
+ version: "1.0.0",
51
+ description: "A store status has changed.",
52
+ stability: "experimental",
53
+ owners: ["@marketplace-team"],
54
+ tags: ["marketplace", "store"]
55
+ },
56
+ payload: StoreStatusChangedPayload
57
+ });
58
+
59
+ // src/store/store.schema.ts
60
+ import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
61
+ var StoreModel = defineSchemaModel2({
62
+ name: "StoreModel",
63
+ description: "A seller store",
64
+ fields: {
65
+ id: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
66
+ name: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
67
+ slug: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
68
+ description: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
69
+ status: { type: StoreStatusEnum, isOptional: false },
70
+ ownerId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
71
+ logoFileId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
72
+ isVerified: { type: ScalarTypeEnum2.Boolean(), isOptional: false },
73
+ totalProducts: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false },
74
+ averageRating: { type: ScalarTypeEnum2.Float_unsecure(), isOptional: false },
75
+ createdAt: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
27
76
  }
28
77
  });
29
- var CreateStoreInputModel = defineSchemaModel({
78
+ var CreateStoreInputModel = defineSchemaModel2({
30
79
  name: "CreateStoreInput",
31
80
  fields: {
32
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
33
- slug: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
34
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
35
- email: { type: ScalarTypeEnum.EmailAddress(), isOptional: true },
36
- country: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
37
- currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
81
+ name: { type: ScalarTypeEnum2.NonEmptyString(), isOptional: false },
82
+ slug: { type: ScalarTypeEnum2.NonEmptyString(), isOptional: false },
83
+ description: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
84
+ email: { type: ScalarTypeEnum2.EmailAddress(), isOptional: true },
85
+ country: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
86
+ currency: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true }
38
87
  }
39
88
  });
40
89
 
@@ -83,55 +132,6 @@ var CreateStoreContract = defineCommand({
83
132
  ]
84
133
  }
85
134
  });
86
-
87
- // src/store/store.event.ts
88
- import { ScalarTypeEnum as ScalarTypeEnum2, defineSchemaModel as defineSchemaModel2 } from "@contractspec/lib.schema";
89
- import { defineEvent } from "@contractspec/lib.contracts-spec";
90
- var StoreCreatedPayload = defineSchemaModel2({
91
- name: "StoreCreatedEventPayload",
92
- fields: {
93
- storeId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
94
- name: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
95
- slug: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
96
- ownerId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
97
- timestamp: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
98
- }
99
- });
100
- var StoreStatusChangedPayload = defineSchemaModel2({
101
- name: "StoreStatusChangedEventPayload",
102
- fields: {
103
- storeId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
104
- previousStatus: {
105
- type: ScalarTypeEnum2.String_unsecure(),
106
- isOptional: false
107
- },
108
- newStatus: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
109
- reason: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
110
- timestamp: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
111
- }
112
- });
113
- var StoreCreatedEvent = defineEvent({
114
- meta: {
115
- key: "marketplace.store.created",
116
- version: "1.0.0",
117
- description: "A new seller store has been created.",
118
- stability: "experimental",
119
- owners: ["@marketplace-team"],
120
- tags: ["marketplace", "store"]
121
- },
122
- payload: StoreCreatedPayload
123
- });
124
- var StoreStatusChangedEvent = defineEvent({
125
- meta: {
126
- key: "marketplace.store.statusChanged",
127
- version: "1.0.0",
128
- description: "A store status has changed.",
129
- stability: "experimental",
130
- owners: ["@marketplace-team"],
131
- tags: ["marketplace", "store"]
132
- },
133
- payload: StoreStatusChangedPayload
134
- });
135
135
  export {
136
136
  StoreStatusEnum,
137
137
  StoreStatusChangedEvent,
@@ -1,6 +1,6 @@
1
1
  // src/store/store.event.ts
2
- import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
3
2
  import { defineEvent } from "@contractspec/lib.contracts-spec";
3
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
4
4
  var StoreCreatedPayload = defineSchemaModel({
5
5
  name: "StoreCreatedEventPayload",
6
6
  fields: {