@adminide-stack/marketplace-module-server 12.0.4-alpha.4 → 12.0.4-alpha.402

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 (185) hide show
  1. package/Readme.md +321 -0
  2. package/lib/containers/module.d.ts +8 -0
  3. package/lib/containers/module.d.ts.map +1 -1
  4. package/lib/containers/module.js +15 -5
  5. package/lib/containers/module.js.map +1 -1
  6. package/lib/dataloaders/index.d.ts +1 -0
  7. package/lib/dataloaders/index.d.ts.map +1 -0
  8. package/lib/demo/test-graphql-examples.d.ts +73 -0
  9. package/lib/demo/test-graphql-examples.d.ts.map +1 -0
  10. package/lib/graphql/resolvers/form-templates-resolver.d.ts +220 -0
  11. package/lib/graphql/resolvers/form-templates-resolver.d.ts.map +1 -0
  12. package/lib/graphql/resolvers/form-templates-resolver.js +170 -0
  13. package/lib/graphql/resolvers/form-templates-resolver.js.map +1 -0
  14. package/lib/graphql/resolvers/gallery-resolver.d.ts +15 -0
  15. package/lib/graphql/resolvers/gallery-resolver.d.ts.map +1 -0
  16. package/lib/graphql/resolvers/gallery-resolver.js +35 -0
  17. package/lib/graphql/resolvers/gallery-resolver.js.map +1 -0
  18. package/lib/graphql/resolvers/index.d.ts +247 -1
  19. package/lib/graphql/resolvers/index.d.ts.map +1 -1
  20. package/lib/graphql/resolvers/index.js +1 -0
  21. package/lib/graphql/resolvers/index.js.map +1 -0
  22. package/lib/graphql/resolvers/installed-extension-resolver.d.ts +5 -0
  23. package/lib/graphql/resolvers/installed-extension-resolver.d.ts.map +1 -0
  24. package/lib/graphql/resolvers/installed-extension-resolver.js +289 -0
  25. package/lib/graphql/resolvers/installed-extension-resolver.js.map +1 -0
  26. package/lib/graphql/resolvers/marketplace-form-resolver.d.ts +13 -0
  27. package/lib/graphql/resolvers/marketplace-form-resolver.d.ts.map +1 -0
  28. package/lib/graphql/resolvers/marketplace-form-resolver.js +90 -0
  29. package/lib/graphql/resolvers/marketplace-form-resolver.js.map +1 -0
  30. package/lib/graphql/resolvers/publisher-analytics-resolver.d.ts +14 -0
  31. package/lib/graphql/resolvers/publisher-analytics-resolver.d.ts.map +1 -0
  32. package/lib/graphql/resolvers/publisher-analytics-resolver.js +221 -0
  33. package/lib/graphql/resolvers/publisher-analytics-resolver.js.map +1 -0
  34. package/lib/graphql/resolvers/publisher-resolver.d.ts +5 -0
  35. package/lib/graphql/resolvers/publisher-resolver.d.ts.map +1 -0
  36. package/lib/graphql/resolvers/publisher-resolver.js +176 -0
  37. package/lib/graphql/resolvers/publisher-resolver.js.map +1 -0
  38. package/lib/graphql/resolvers/registry-extension-resolver.d.ts +5 -0
  39. package/lib/graphql/resolvers/registry-extension-resolver.d.ts.map +1 -0
  40. package/lib/graphql/resolvers/registry-extension-resolver.js +46 -0
  41. package/lib/graphql/resolvers/registry-extension-resolver.js.map +1 -0
  42. package/lib/graphql/schemas/extension-pricing.graphql +546 -0
  43. package/lib/graphql/schemas/extension-pricing.graphql.js +1 -0
  44. package/lib/graphql/schemas/extension-pricing.graphql.js.map +1 -0
  45. package/lib/graphql/schemas/extension-registry.graphql +107 -0
  46. package/lib/graphql/schemas/extension-registry.graphql.js +1 -0
  47. package/lib/graphql/schemas/extension-registry.graphql.js.map +1 -0
  48. package/lib/graphql/schemas/form-templates.graphql +269 -0
  49. package/lib/graphql/schemas/form-templates.graphql.js +1 -0
  50. package/lib/graphql/schemas/form-templates.graphql.js.map +1 -0
  51. package/lib/graphql/schemas/gallery-schema.graphql +247 -0
  52. package/lib/graphql/schemas/gallery-schema.graphql.js +1 -0
  53. package/lib/graphql/schemas/gallery-schema.graphql.js.map +1 -0
  54. package/lib/graphql/schemas/index.d.ts.map +1 -1
  55. package/lib/graphql/schemas/index.js +3 -4
  56. package/lib/graphql/schemas/index.js.map +1 -1
  57. package/lib/graphql/schemas/installed-extension.graphql +309 -0
  58. package/lib/graphql/schemas/installed-extension.graphql.js +1 -0
  59. package/lib/graphql/schemas/installed-extension.graphql.js.map +1 -0
  60. package/lib/graphql/schemas/publisher-analytics.graphql +305 -0
  61. package/lib/graphql/schemas/publisher-analytics.graphql.js +1 -0
  62. package/lib/graphql/schemas/publisher-analytics.graphql.js.map +1 -0
  63. package/lib/graphql/schemas/publisher.graphql +376 -0
  64. package/lib/graphql/schemas/publisher.graphql.js +1 -0
  65. package/lib/graphql/schemas/publisher.graphql.js.map +1 -0
  66. package/lib/graphql/schemas/service.graphql +196 -0
  67. package/lib/index.d.ts +3 -1
  68. package/lib/index.d.ts.map +1 -1
  69. package/lib/index.js +1 -1
  70. package/lib/index.js.map +1 -1
  71. package/lib/module.d.ts +1 -1
  72. package/lib/module.d.ts.map +1 -1
  73. package/lib/module.js +10 -23
  74. package/lib/module.js.map +1 -1
  75. package/lib/plugins/extension-moleculer-service.d.ts +86 -0
  76. package/lib/plugins/extension-moleculer-service.d.ts.map +1 -0
  77. package/lib/plugins/index.d.ts +2 -0
  78. package/lib/plugins/index.d.ts.map +1 -0
  79. package/lib/services/extension-gallery-repository.d.ts +17 -0
  80. package/lib/services/extension-gallery-repository.d.ts.map +1 -0
  81. package/lib/services/extension-gallery-repository.js +192 -0
  82. package/lib/services/extension-gallery-repository.js.map +1 -0
  83. package/lib/services/extension-gallery-service-new.d.ts +39 -0
  84. package/lib/services/extension-gallery-service-new.d.ts.map +1 -0
  85. package/lib/services/extension-gallery-service.d.ts +30 -0
  86. package/lib/services/extension-gallery-service.d.ts.map +1 -0
  87. package/lib/services/extension-gallery-service.js +311 -0
  88. package/lib/services/extension-gallery-service.js.map +1 -0
  89. package/lib/services/index.d.ts +6 -1
  90. package/lib/services/index.d.ts.map +1 -1
  91. package/lib/services/installed-extension-service-ext.d.ts +16 -0
  92. package/lib/services/installed-extension-service-ext.d.ts.map +1 -0
  93. package/lib/services/installed-extension-service-ext.js +485 -0
  94. package/lib/services/installed-extension-service-ext.js.map +1 -0
  95. package/lib/services/installed-extension-service.d.ts +96 -0
  96. package/lib/services/installed-extension-service.d.ts.map +1 -0
  97. package/lib/services/installed-extension-service.js +521 -0
  98. package/lib/services/installed-extension-service.js.map +1 -0
  99. package/lib/services/installed-extension-service.test.d.ts +1 -0
  100. package/lib/services/installed-extension-service.test.d.ts.map +1 -0
  101. package/lib/services/publisher-analytics-service.d.ts +128 -0
  102. package/lib/services/publisher-analytics-service.d.ts.map +1 -0
  103. package/lib/services/publisher-event-service.d.ts +48 -0
  104. package/lib/services/publisher-event-service.d.ts.map +1 -0
  105. package/lib/services/publisher-event-service.js +296 -0
  106. package/lib/services/publisher-event-service.js.map +1 -0
  107. package/lib/services/publisher-service-context.d.ts +1 -0
  108. package/lib/services/publisher-service-context.d.ts.map +1 -0
  109. package/lib/services/publisher-service.d.ts +60 -0
  110. package/lib/services/publisher-service.d.ts.map +1 -0
  111. package/lib/services/publisher-service.js +134 -0
  112. package/lib/services/publisher-service.js.map +1 -0
  113. package/lib/store/index.d.ts +1 -1
  114. package/lib/store/index.d.ts.map +1 -1
  115. package/lib/store/models/index.d.ts +2 -1
  116. package/lib/store/models/index.d.ts.map +1 -1
  117. package/lib/store/models/installed-extension-model.d.ts +4 -0
  118. package/lib/store/models/installed-extension-model.d.ts.map +1 -0
  119. package/lib/store/models/installed-extension-model.js +269 -0
  120. package/lib/store/models/installed-extension-model.js.map +1 -0
  121. package/lib/store/models/publisher-event-model.d.ts +11 -0
  122. package/lib/store/models/publisher-event-model.d.ts.map +1 -0
  123. package/lib/store/models/publisher-model.d.ts +5 -0
  124. package/lib/store/models/publisher-model.d.ts.map +1 -0
  125. package/lib/store/models/publisher-model.js +103 -0
  126. package/lib/store/models/publisher-model.js.map +1 -0
  127. package/lib/store/models/publisher-stats-model.d.ts +1 -0
  128. package/lib/store/models/publisher-stats-model.d.ts.map +1 -0
  129. package/lib/store/repositories/index.d.ts +3 -0
  130. package/lib/store/repositories/index.d.ts.map +1 -0
  131. package/lib/store/repositories/installed-extension-repository.d.ts +73 -0
  132. package/lib/store/repositories/installed-extension-repository.d.ts.map +1 -0
  133. package/lib/store/repositories/installed-extension-repository.js +442 -0
  134. package/lib/store/repositories/installed-extension-repository.js.map +1 -0
  135. package/lib/store/repositories/publisher-analytics-repository.d.ts +1 -0
  136. package/lib/store/repositories/publisher-analytics-repository.d.ts.map +1 -0
  137. package/lib/store/repositories/publisher-repository.d.ts +19 -0
  138. package/lib/store/repositories/publisher-repository.d.ts.map +1 -0
  139. package/lib/store/repositories/publisher-repository.js +87 -0
  140. package/lib/store/repositories/publisher-repository.js.map +1 -0
  141. package/lib/templates/constants/DB_COLL_NAMES.ts.template +5 -0
  142. package/lib/templates/constants/SERVER_TYPES.ts.template +10 -4
  143. package/lib/templates/repositories/ExtensionGalleryRepository.ts.template +44 -0
  144. package/lib/templates/repositories/InstalledExtensionRepository.ts.template +94 -0
  145. package/lib/templates/repositories/MarketplacePublisherRepository.ts.template +24 -0
  146. package/lib/templates/repositories/RegistryExtensionRepository.ts.template +10 -15
  147. package/lib/templates/services/ExtensionGalleryDataLoader.ts.template +2 -0
  148. package/lib/templates/services/ExtensionGalleryService.ts.template +79 -0
  149. package/lib/templates/services/InstalledExtensionDataLoader.ts.template +2 -0
  150. package/lib/templates/services/InstalledExtensionService.ts.template +181 -0
  151. package/lib/templates/services/MarketplacePublisherService.ts.template +49 -0
  152. package/lib/templates/services/PublisherEventService.ts.template +56 -0
  153. package/lib/templates/services/RegistryExtensionService.ts.template +62 -18
  154. package/lib/tests/extension-integration.test.d.ts +1 -0
  155. package/lib/tests/extension-integration.test.d.ts.map +1 -0
  156. package/lib/tests/install-extension-graphql.test.d.ts +2 -0
  157. package/lib/tests/install-extension-graphql.test.d.ts.map +1 -0
  158. package/lib/tests/test-extension-services.d.ts +1 -0
  159. package/lib/tests/test-extension-services.d.ts.map +1 -0
  160. package/lib/utils/publisherValidation.d.ts +23 -0
  161. package/lib/utils/publisherValidation.d.ts.map +1 -0
  162. package/lib/utils/publisherValidation.js +144 -0
  163. package/lib/utils/publisherValidation.js.map +1 -0
  164. package/package.json +15 -7
  165. package/lib/graphql/resolvers/resolvers.d.ts +0 -2
  166. package/lib/graphql/resolvers/resolvers.d.ts.map +0 -1
  167. package/lib/graphql/resolvers/resolvers.js +0 -167
  168. package/lib/graphql/resolvers/resolvers.js.map +0 -1
  169. package/lib/graphql/schemas/extension.graphql +0 -57
  170. package/lib/graphql/schemas/extension.graphql.js +0 -1
  171. package/lib/graphql/schemas/extension.graphql.js.map +0 -1
  172. package/lib/services/extension-service.d.ts +0 -54
  173. package/lib/services/extension-service.d.ts.map +0 -1
  174. package/lib/services/extension-service.js +0 -42
  175. package/lib/services/extension-service.js.map +0 -1
  176. package/lib/store/models/registry-extension-model.d.ts +0 -10
  177. package/lib/store/models/registry-extension-model.d.ts.map +0 -1
  178. package/lib/store/models/registry-extension-model.js +0 -62
  179. package/lib/store/models/registry-extension-model.js.map +0 -1
  180. package/lib/store/repository/index.d.ts +0 -2
  181. package/lib/store/repository/index.d.ts.map +0 -1
  182. package/lib/store/repository/registry-extension-repository.d.ts +0 -31
  183. package/lib/store/repository/registry-extension-repository.d.ts.map +0 -1
  184. package/lib/store/repository/registry-extension-repository.js +0 -135
  185. package/lib/store/repository/registry-extension-repository.js.map +0 -1
@@ -0,0 +1,376 @@
1
+ """
2
+ A publisher represents an organization or individual who publishes extensions
3
+ """
4
+ type MarketplacePublisher implements Node @entity {
5
+ """The unique identifier of the publisher."""
6
+ id: ID! @id
7
+
8
+ """The unique name/slug of the publisher (e.g., 'stackflow1', 'microsoft')."""
9
+ name: String! @column
10
+
11
+ """The display name of the publisher."""
12
+ displayName: String! @column
13
+
14
+ """The publisher's description."""
15
+ description: String @column
16
+
17
+ """The publisher's website URL."""
18
+ websiteUrl: String @column
19
+
20
+ """The publisher's logo/avatar URL."""
21
+ logoUrl: String @column
22
+
23
+ """The publisher's avatar URL (alias for logoUrl)."""
24
+ avatar: String @column
25
+
26
+ """The publisher's email contact."""
27
+ email: String @column
28
+
29
+ """Whether the publisher is verified."""
30
+ verified: Boolean! @column
31
+
32
+ """The date when the publisher was created."""
33
+ createdAt: DateTime! @column(overrideType: "Date")
34
+
35
+ """The date when the publisher was last updated."""
36
+ updatedAt: DateTime! @column(overrideType: "Date")
37
+
38
+ """The number of extensions published by this publisher."""
39
+ extensionCount: Int! @column
40
+
41
+ """The total number of downloads across all extensions."""
42
+ totalDownloads: Int! @column
43
+
44
+ """The extensions published by this publisher."""
45
+ extensions: [RegistryExtension!]! @column(overrideType: "[ObjectId]")
46
+
47
+ """Whether the current user can manage this publisher."""
48
+ viewerCanManage: Boolean!
49
+
50
+ """Real-time analytics stats (computed from time series data)."""
51
+ stats: MarketplacePublisherStats
52
+
53
+ """Historical analytics data (computed from time series data)."""
54
+ analytics(
55
+ startDate: DateTime!
56
+ endDate: DateTime!
57
+ granularity: AnalyticsGranularity!
58
+ ): [MarketplacePublisherAnalytics!]!
59
+
60
+ """Trend analysis (computed from time series data)."""
61
+ trends(days: Int = 30): MarketplacePublisherTrend
62
+ }
63
+
64
+ """
65
+ Publisher statistics and metrics
66
+ """
67
+ type PublisherStats {
68
+ """Total number of extensions."""
69
+ totalExtensions: Int!
70
+
71
+ """Total downloads across all extensions."""
72
+ totalDownloads: Int!
73
+
74
+ """Total active installations."""
75
+ totalInstallations: Int!
76
+
77
+ """Average rating across all extensions."""
78
+ averageRating: Float!
79
+
80
+ """Number of verified publishers."""
81
+ verifiedCount: Int!
82
+
83
+ """Most popular extension."""
84
+ topExtension: RegistryExtension
85
+ }
86
+
87
+ """
88
+ Real-time analytics stats for a marketplace publisher (computed from time series)
89
+ """
90
+ type MarketplacePublisherStats {
91
+ """Total number of downloads."""
92
+ totalDownloads: Int!
93
+
94
+ """Total number of installations."""
95
+ totalInstalls: Int!
96
+
97
+ """Total number of views."""
98
+ totalViews: Int!
99
+
100
+ """Average rating."""
101
+ averageRating: Float!
102
+
103
+ """Total number of ratings received."""
104
+ totalRatings: Int!
105
+
106
+ """Number of extensions published."""
107
+ extensionCount: Int!
108
+
109
+ """Last updated timestamp."""
110
+ lastUpdated: DateTime!
111
+ }
112
+
113
+ """
114
+ Historical analytics data point for a marketplace publisher (computed from time series)
115
+ """
116
+ type MarketplacePublisherAnalytics {
117
+ """The date/time for this data point."""
118
+ date: DateTime!
119
+
120
+ """Number of downloads in this period."""
121
+ downloads: Int!
122
+
123
+ """Number of installations in this period."""
124
+ installs: Int!
125
+
126
+ """Number of views in this period."""
127
+ views: Int!
128
+
129
+ """Number of ratings in this period."""
130
+ ratings: Int!
131
+
132
+ """Average rating for this period."""
133
+ averageRating: Float!
134
+
135
+ """Unique users who interacted with publisher content."""
136
+ uniqueUsers: Int!
137
+ }
138
+
139
+ """
140
+ Trend analysis for a marketplace publisher (computed from time series)
141
+ """
142
+ type MarketplacePublisherTrend {
143
+ """Download trend direction."""
144
+ downloadTrend: TrendDirection!
145
+
146
+ """Download trend percentage change."""
147
+ downloadChange: Float!
148
+
149
+ """Installation trend direction."""
150
+ installTrend: TrendDirection!
151
+
152
+ """Installation trend percentage change."""
153
+ installChange: Float!
154
+
155
+ """View trend direction."""
156
+ viewTrend: TrendDirection!
157
+
158
+ """View trend percentage change."""
159
+ viewChange: Float!
160
+
161
+ """Rating trend direction."""
162
+ ratingTrend: TrendDirection!
163
+
164
+ """Rating trend percentage change."""
165
+ ratingChange: Float!
166
+
167
+ """Overall trend score (composite metric)."""
168
+ trendScore: Float!
169
+ }
170
+
171
+ """
172
+ Analytics granularity options
173
+ """
174
+ enum AnalyticsGranularity {
175
+ HOUR
176
+ DAY
177
+ WEEK
178
+ MONTH
179
+ YEAR
180
+ }
181
+
182
+ """
183
+ Trend direction enumeration
184
+ """
185
+ enum TrendDirection {
186
+ INCREASING
187
+ DECREASING
188
+ STABLE
189
+ }
190
+
191
+ extend type Query {
192
+ """Get a publisher by name."""
193
+ publisher(name: String!): MarketplacePublisher
194
+
195
+ """Get all publishers with optional filtering."""
196
+ publishers(
197
+ """Filter by verified status."""
198
+ verified: Boolean
199
+
200
+ """Search query for publisher name or description."""
201
+ search: String
202
+
203
+ """Number of results to return (default: 20, max: 100)."""
204
+ first: Int
205
+
206
+ """Number of results to skip."""
207
+ skip: Int
208
+
209
+ """Sort order."""
210
+ orderBy: PublisherOrderBy
211
+ ): PublisherConnection!
212
+
213
+ """Get publisher statistics."""
214
+ publisherStats: PublisherStats!
215
+ }
216
+
217
+ extend type Mutation {
218
+ """Create a new publisher."""
219
+ createPublisherMutation(input: CreatePublisherInput!): CreatePublisherPayload!
220
+
221
+ """Update an existing publisher."""
222
+ updatePublisherMutation(id: ID!, input: UpdatePublisherInput!): UpdatePublisherPayload!
223
+
224
+ """Verify a publisher."""
225
+ verifyPublisherMutation(id: ID!): VerifyPublisherPayload!
226
+ }
227
+
228
+ """
229
+ Input for creating a new publisher
230
+ """
231
+ input CreatePublisherInput {
232
+ """The display name of the publisher."""
233
+ displayName: String!
234
+
235
+ """The unique name/slug of the publisher."""
236
+ publisherName: String!
237
+
238
+ """The publisher's description."""
239
+ description: String
240
+
241
+ """The publisher's website URL."""
242
+ website: String
243
+
244
+ """The publisher's email contact."""
245
+ email: String
246
+
247
+ """The publisher's domain for verification."""
248
+ domain: String
249
+ }
250
+
251
+ """
252
+ Input for updating a publisher
253
+ """
254
+ input UpdatePublisherInput {
255
+ """The display name of the publisher."""
256
+ displayName: String
257
+
258
+ """The publisher's description."""
259
+ description: String
260
+
261
+ """The publisher's website URL."""
262
+ website: String
263
+
264
+ """The publisher's logo/avatar URL."""
265
+ avatarUrl: String
266
+ }
267
+
268
+ """
269
+ Payload for create publisher mutation
270
+ """
271
+ type CreatePublisherPayload {
272
+ """The created publisher."""
273
+ publisher: MarketplacePublisher!
274
+
275
+ """Success flag."""
276
+ success: Boolean!
277
+
278
+ """Error message if any."""
279
+ error: String
280
+ }
281
+
282
+ """
283
+ Payload for update publisher mutation
284
+ """
285
+ type UpdatePublisherPayload {
286
+ """The updated publisher."""
287
+ publisher: MarketplacePublisher
288
+
289
+ """Success flag."""
290
+ success: Boolean!
291
+
292
+ """Error message if any."""
293
+ error: String
294
+ }
295
+
296
+ """
297
+ Payload for verify publisher mutation
298
+ """
299
+ type VerifyPublisherPayload {
300
+ """The verified publisher."""
301
+ publisher: MarketplacePublisher
302
+
303
+ """Success flag."""
304
+ success: Boolean!
305
+
306
+ """Error message if any."""
307
+ error: String
308
+ }
309
+
310
+ """
311
+ Publisher connection for pagination
312
+ """
313
+ type PublisherConnection {
314
+ """List of publishers."""
315
+ nodes: [MarketplacePublisher!]!
316
+
317
+ """Total count of publishers."""
318
+ totalCount: Int!
319
+
320
+ """Whether there are more results."""
321
+ hasNextPage: Boolean!
322
+
323
+ """Whether there are previous results."""
324
+ hasPreviousPage: Boolean!
325
+ }
326
+
327
+ """
328
+ Sort options for publishers
329
+ """
330
+ enum PublisherOrderBy {
331
+ """Sort by name (A-Z)."""
332
+ NAME_ASC
333
+
334
+ """Sort by name (Z-A)."""
335
+ NAME_DESC
336
+
337
+ """Sort by creation date (newest first)."""
338
+ CREATED_DESC
339
+
340
+ """Sort by creation date (oldest first)."""
341
+ CREATED_ASC
342
+
343
+ """Sort by extension count (most first)."""
344
+ EXTENSIONS_DESC
345
+
346
+ """Sort by extension count (least first)."""
347
+ EXTENSIONS_ASC
348
+
349
+ """Sort by total downloads (most first)."""
350
+ DOWNLOADS_DESC
351
+
352
+ """Sort by total downloads (least first)."""
353
+ DOWNLOADS_ASC
354
+ }
355
+
356
+ """
357
+ Extension manifest author information
358
+ """
359
+ type ExtensionManifestAuthor @entity(embedded: true) {
360
+ """The author's name."""
361
+ name: String! @column
362
+
363
+ """The author's email."""
364
+ email: String @column
365
+
366
+ """The author's website URL."""
367
+ url: String @column
368
+
369
+ """Whether the author is verified."""
370
+ verified: Boolean @column
371
+ }
372
+
373
+ extend type ExtensionManifest {
374
+ """The publisher who published this extension."""
375
+ publisherDetails: MarketplacePublisher
376
+ }
@@ -0,0 +1 @@
1
+ var publisherSchema = "\"\"\"\nA publisher represents an organization or individual who publishes extensions\n\"\"\"\ntype MarketplacePublisher implements Node @entity {\n \"\"\"The unique identifier of the publisher.\"\"\"\n id: ID! @id\n\n \"\"\"The unique name/slug of the publisher (e.g., 'stackflow1', 'microsoft').\"\"\"\n name: String! @column\n\n \"\"\"The display name of the publisher.\"\"\"\n displayName: String! @column\n\n \"\"\"The publisher's description.\"\"\"\n description: String @column\n\n \"\"\"The publisher's website URL.\"\"\"\n websiteUrl: String @column\n\n \"\"\"The publisher's logo/avatar URL.\"\"\"\n logoUrl: String @column\n\n \"\"\"The publisher's avatar URL (alias for logoUrl).\"\"\"\n avatar: String @column\n\n \"\"\"The publisher's email contact.\"\"\"\n email: String @column\n\n \"\"\"Whether the publisher is verified.\"\"\"\n verified: Boolean! @column\n\n \"\"\"The date when the publisher was created.\"\"\"\n createdAt: DateTime! @column(overrideType: \"Date\")\n\n \"\"\"The date when the publisher was last updated.\"\"\"\n updatedAt: DateTime! @column(overrideType: \"Date\")\n\n \"\"\"The number of extensions published by this publisher.\"\"\"\n extensionCount: Int! @column\n\n \"\"\"The total number of downloads across all extensions.\"\"\"\n totalDownloads: Int! @column\n\n \"\"\"The extensions published by this publisher.\"\"\"\n extensions: [RegistryExtension!]! @column(overrideType: \"[ObjectId]\")\n\n \"\"\"Whether the current user can manage this publisher.\"\"\"\n viewerCanManage: Boolean!\n\n \"\"\"Real-time analytics stats (computed from time series data).\"\"\"\n stats: MarketplacePublisherStats\n\n \"\"\"Historical analytics data (computed from time series data).\"\"\"\n analytics(\n startDate: DateTime!\n endDate: DateTime!\n granularity: AnalyticsGranularity!\n ): [MarketplacePublisherAnalytics!]!\n\n \"\"\"Trend analysis (computed from time series data).\"\"\"\n trends(days: Int = 30): MarketplacePublisherTrend\n}\n\n\"\"\"\nPublisher statistics and metrics\n\"\"\"\ntype PublisherStats {\n \"\"\"Total number of extensions.\"\"\"\n totalExtensions: Int!\n\n \"\"\"Total downloads across all extensions.\"\"\"\n totalDownloads: Int!\n\n \"\"\"Total active installations.\"\"\"\n totalInstallations: Int!\n\n \"\"\"Average rating across all extensions.\"\"\"\n averageRating: Float!\n\n \"\"\"Number of verified publishers.\"\"\"\n verifiedCount: Int!\n\n \"\"\"Most popular extension.\"\"\"\n topExtension: RegistryExtension\n}\n\n\"\"\"\nReal-time analytics stats for a marketplace publisher (computed from time series)\n\"\"\"\ntype MarketplacePublisherStats {\n \"\"\"Total number of downloads.\"\"\"\n totalDownloads: Int!\n\n \"\"\"Total number of installations.\"\"\"\n totalInstalls: Int!\n\n \"\"\"Total number of views.\"\"\"\n totalViews: Int!\n\n \"\"\"Average rating.\"\"\"\n averageRating: Float!\n\n \"\"\"Total number of ratings received.\"\"\"\n totalRatings: Int!\n\n \"\"\"Number of extensions published.\"\"\"\n extensionCount: Int!\n\n \"\"\"Last updated timestamp.\"\"\"\n lastUpdated: DateTime!\n}\n\n\"\"\"\nHistorical analytics data point for a marketplace publisher (computed from time series)\n\"\"\"\ntype MarketplacePublisherAnalytics {\n \"\"\"The date/time for this data point.\"\"\"\n date: DateTime!\n\n \"\"\"Number of downloads in this period.\"\"\"\n downloads: Int!\n\n \"\"\"Number of installations in this period.\"\"\"\n installs: Int!\n\n \"\"\"Number of views in this period.\"\"\"\n views: Int!\n\n \"\"\"Number of ratings in this period.\"\"\"\n ratings: Int!\n\n \"\"\"Average rating for this period.\"\"\"\n averageRating: Float!\n\n \"\"\"Unique users who interacted with publisher content.\"\"\"\n uniqueUsers: Int!\n}\n\n\"\"\"\nTrend analysis for a marketplace publisher (computed from time series)\n\"\"\"\ntype MarketplacePublisherTrend {\n \"\"\"Download trend direction.\"\"\"\n downloadTrend: TrendDirection!\n\n \"\"\"Download trend percentage change.\"\"\"\n downloadChange: Float!\n\n \"\"\"Installation trend direction.\"\"\"\n installTrend: TrendDirection!\n\n \"\"\"Installation trend percentage change.\"\"\"\n installChange: Float!\n\n \"\"\"View trend direction.\"\"\"\n viewTrend: TrendDirection!\n\n \"\"\"View trend percentage change.\"\"\"\n viewChange: Float!\n\n \"\"\"Rating trend direction.\"\"\"\n ratingTrend: TrendDirection!\n\n \"\"\"Rating trend percentage change.\"\"\"\n ratingChange: Float!\n\n \"\"\"Overall trend score (composite metric).\"\"\"\n trendScore: Float!\n}\n\n\"\"\"\nAnalytics granularity options\n\"\"\"\nenum AnalyticsGranularity {\n HOUR\n DAY\n WEEK\n MONTH\n YEAR\n}\n\n\"\"\"\nTrend direction enumeration\n\"\"\"\nenum TrendDirection {\n INCREASING\n DECREASING\n STABLE\n}\n\nextend type Query {\n \"\"\"Get a publisher by name.\"\"\"\n publisher(name: String!): MarketplacePublisher\n\n \"\"\"Get all publishers with optional filtering.\"\"\"\n publishers(\n \"\"\"Filter by verified status.\"\"\"\n verified: Boolean\n \n \"\"\"Search query for publisher name or description.\"\"\"\n search: String\n \n \"\"\"Number of results to return (default: 20, max: 100).\"\"\"\n first: Int\n \n \"\"\"Number of results to skip.\"\"\"\n skip: Int\n \n \"\"\"Sort order.\"\"\"\n orderBy: PublisherOrderBy\n ): PublisherConnection!\n\n \"\"\"Get publisher statistics.\"\"\"\n publisherStats: PublisherStats!\n}\n\nextend type Mutation {\n \"\"\"Create a new publisher.\"\"\"\n createPublisherMutation(input: CreatePublisherInput!): CreatePublisherPayload!\n\n \"\"\"Update an existing publisher.\"\"\"\n updatePublisherMutation(id: ID!, input: UpdatePublisherInput!): UpdatePublisherPayload!\n\n \"\"\"Verify a publisher.\"\"\"\n verifyPublisherMutation(id: ID!): VerifyPublisherPayload!\n}\n\n\"\"\"\nInput for creating a new publisher\n\"\"\"\ninput CreatePublisherInput {\n \"\"\"The display name of the publisher.\"\"\"\n displayName: String!\n\n \"\"\"The unique name/slug of the publisher.\"\"\"\n publisherName: String!\n\n \"\"\"The publisher's description.\"\"\"\n description: String\n\n \"\"\"The publisher's website URL.\"\"\"\n website: String\n\n \"\"\"The publisher's email contact.\"\"\"\n email: String\n\n \"\"\"The publisher's domain for verification.\"\"\"\n domain: String\n}\n\n\"\"\"\nInput for updating a publisher\n\"\"\"\ninput UpdatePublisherInput {\n \"\"\"The display name of the publisher.\"\"\"\n displayName: String\n\n \"\"\"The publisher's description.\"\"\"\n description: String\n\n \"\"\"The publisher's website URL.\"\"\"\n website: String\n\n \"\"\"The publisher's logo/avatar URL.\"\"\"\n avatarUrl: String\n}\n\n\"\"\"\nPayload for create publisher mutation\n\"\"\"\ntype CreatePublisherPayload {\n \"\"\"The created publisher.\"\"\"\n publisher: MarketplacePublisher!\n\n \"\"\"Success flag.\"\"\"\n success: Boolean!\n\n \"\"\"Error message if any.\"\"\"\n error: String\n}\n\n\"\"\"\nPayload for update publisher mutation\n\"\"\"\ntype UpdatePublisherPayload {\n \"\"\"The updated publisher.\"\"\"\n publisher: MarketplacePublisher\n\n \"\"\"Success flag.\"\"\"\n success: Boolean!\n\n \"\"\"Error message if any.\"\"\"\n error: String\n}\n\n\"\"\"\nPayload for verify publisher mutation\n\"\"\"\ntype VerifyPublisherPayload {\n \"\"\"The verified publisher.\"\"\"\n publisher: MarketplacePublisher\n\n \"\"\"Success flag.\"\"\"\n success: Boolean!\n\n \"\"\"Error message if any.\"\"\"\n error: String\n}\n\n\"\"\"\nPublisher connection for pagination\n\"\"\"\ntype PublisherConnection {\n \"\"\"List of publishers.\"\"\"\n nodes: [MarketplacePublisher!]!\n \n \"\"\"Total count of publishers.\"\"\"\n totalCount: Int!\n \n \"\"\"Whether there are more results.\"\"\"\n hasNextPage: Boolean!\n \n \"\"\"Whether there are previous results.\"\"\"\n hasPreviousPage: Boolean!\n}\n\n\"\"\"\nSort options for publishers\n\"\"\"\nenum PublisherOrderBy {\n \"\"\"Sort by name (A-Z).\"\"\"\n NAME_ASC\n \n \"\"\"Sort by name (Z-A).\"\"\"\n NAME_DESC\n \n \"\"\"Sort by creation date (newest first).\"\"\"\n CREATED_DESC\n \n \"\"\"Sort by creation date (oldest first).\"\"\"\n CREATED_ASC\n \n \"\"\"Sort by extension count (most first).\"\"\"\n EXTENSIONS_DESC\n \n \"\"\"Sort by extension count (least first).\"\"\"\n EXTENSIONS_ASC\n \n \"\"\"Sort by total downloads (most first).\"\"\"\n DOWNLOADS_DESC\n \n \"\"\"Sort by total downloads (least first).\"\"\"\n DOWNLOADS_ASC\n}\n\n\"\"\"\nExtension manifest author information\n\"\"\"\ntype ExtensionManifestAuthor @entity(embedded: true) {\n \"\"\"The author's name.\"\"\"\n name: String! @column\n \n \"\"\"The author's email.\"\"\"\n email: String @column\n \n \"\"\"The author's website URL.\"\"\"\n url: String @column\n \n \"\"\"Whether the author is verified.\"\"\"\n verified: Boolean @column\n}\n\nextend type ExtensionManifest {\n \"\"\"The publisher who published this extension.\"\"\"\n publisherDetails: MarketplacePublisher\n}\n";export{publisherSchema as default};//# sourceMappingURL=publisher.graphql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publisher.graphql.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,196 @@
1
+
2
+ extend enum MoleculerServiceName {
3
+ ExtensionService
4
+ }
5
+
6
+ extend enum SlotFillPluginName {
7
+ extension_publish_page_slot_fill
8
+ }
9
+
10
+ extend enum SlotFillEnum {
11
+ ExtensionPublishPageSlotFill
12
+ }
13
+
14
+ enum ExtensionServiceAction {
15
+ OnExtensionInstalled
16
+ OnExtensionUninstalled
17
+ OnExtensionEnabled
18
+ OnExtensionDisabled
19
+ OnExtensionUpdated
20
+ OnExtensionVersionUpdated
21
+ OnExtensionConfigurationUpdated
22
+ OnExtensionSyncCompleted
23
+ OnExtensionCleanupCompleted
24
+ OnExtensionStatusChanged
25
+ OnExtensionActivationFailed
26
+ OnExtensionDeprecated
27
+ OnExtensionOrphaned
28
+ }
29
+
30
+ # Extension Event Types for codegen
31
+
32
+ """
33
+ Event fired when an extension is installed
34
+ """
35
+ type ExtensionInstalledEvent {
36
+ extensionSlug: String!
37
+ tenantId: String!
38
+ installedBy: String!
39
+ installedVersion: String!
40
+ registryRef: String!
41
+ installedAt: String!
42
+ policies: JSON
43
+ settings: JSON
44
+ }
45
+
46
+ """
47
+ Event fired when an extension is uninstalled
48
+ """
49
+ type ExtensionUninstalledEvent {
50
+ extensionSlug: String!
51
+ tenantId: String!
52
+ uninstalledBy: String!
53
+ uninstalledAt: String!
54
+ wasEnabled: Boolean!
55
+ dependencies: [String!]
56
+ }
57
+
58
+ """
59
+ Event fired when an extension is enabled
60
+ """
61
+ type ExtensionEnabledEvent {
62
+ extensionSlug: String!
63
+ tenantId: String!
64
+ enabledBy: String!
65
+ enabledAt: String!
66
+ previousState: String!
67
+ }
68
+
69
+ """
70
+ Event fired when an extension is disabled
71
+ """
72
+ type ExtensionDisabledEvent {
73
+ extensionSlug: String!
74
+ tenantId: String!
75
+ disabledBy: String!
76
+ disabledAt: String!
77
+ reason: String! # 'user', 'admin', 'policy', 'system'
78
+ }
79
+
80
+ extend enum SlotFillPluginName {
81
+ extension_publish_page_slot_fill
82
+ }
83
+
84
+ extend enum SlotFillEnum {
85
+ ExtensionPublishPageSlotFill
86
+ }
87
+ """
88
+ Event fired when an extension is updated
89
+ """
90
+ type ExtensionUpdatedEvent {
91
+ extensionSlug: String!
92
+ tenantId: String!
93
+ updatedBy: String!
94
+ updatedAt: String!
95
+ changes: JSON! # { status?, settings?, policies?, runtime? }
96
+ previousVersion: String
97
+ newVersion: String
98
+ }
99
+
100
+ """
101
+ Event fired when an extension version is updated
102
+ """
103
+ type ExtensionVersionUpdatedEvent {
104
+ extensionSlug: String!
105
+ tenantId: String!
106
+ updatedBy: String!
107
+ fromVersion: String!
108
+ toVersion: String!
109
+ updatedAt: String!
110
+ isSecurityUpdate: Boolean!
111
+ }
112
+
113
+ """
114
+ Event fired when extension configuration is updated
115
+ """
116
+ type ExtensionConfigurationUpdatedEvent {
117
+ tenantId: String!
118
+ extensionSlug: String!
119
+ updatedBy: String!
120
+ updatedAt: String!
121
+ configType: String! # 'user' or 'system'
122
+ previousConfig: JSON
123
+ newConfig: JSON!
124
+ }
125
+
126
+ """
127
+ Event fired when extension sync with registry is completed
128
+ """
129
+ type ExtensionSyncCompletedEvent {
130
+ tenantId: String!
131
+ syncedAt: String!
132
+ extensionsChecked: Int!
133
+ extensionsUpdated: Int!
134
+ extensionsOrphaned: Int!
135
+ errors: [String!]
136
+ }
137
+
138
+ """
139
+ Event fired when extension cleanup is completed
140
+ """
141
+ type ExtensionCleanupCompletedEvent {
142
+ tenantId: String!
143
+ cleanedAt: String!
144
+ extensionsRemoved: [String!]!
145
+ extensionsDeprecated: [String!]!
146
+ warnings: [String!]
147
+ dryRun: Boolean!
148
+ }
149
+
150
+ """
151
+ Event fired when extension status changes
152
+ """
153
+ type ExtensionStatusChangedEvent {
154
+ tenantId: String!
155
+ extensionSlug: String!
156
+ previousStatus: String!
157
+ newStatus: String!
158
+ changedBy: String
159
+ changedAt: String!
160
+ reason: String
161
+ }
162
+
163
+ """
164
+ Event fired when extension activation fails
165
+ """
166
+ type ExtensionActivationFailedEvent {
167
+ tenantId: String!
168
+ extensionSlug: String!
169
+ failedAt: String!
170
+ error: JSON! # { message, code, stack }
171
+ attemptCount: Int!
172
+ willRetry: Boolean!
173
+ }
174
+
175
+ """
176
+ Event fired when an extension is deprecated
177
+ """
178
+ type ExtensionDeprecatedEvent {
179
+ tenantId: String!
180
+ extensionSlug: String!
181
+ deprecatedAt: String!
182
+ deprecationInfo: JSON! # { reason, alternative, gracePeriod }
183
+ affectedInstallations: Int!
184
+ }
185
+
186
+ """
187
+ Event fired when an extension becomes orphaned (removed from registry)
188
+ """
189
+ type ExtensionOrphanedEvent {
190
+ tenantId: String!
191
+ extensionSlug: String!
192
+ orphanedAt: String!
193
+ lastKnownVersion: String!
194
+ removalReason: String
195
+ policyAction: String! # 'keep', 'disable', 'remove'
196
+ }
package/lib/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { Feature } from '@common-stack/server-core';
2
- declare const _default: Feature<import("@common-stack/server-core").ConfigurationScope, any>;
2
+ declare const _default: Feature<any, any>;
3
3
  export default _default;
4
+ export * from './services';
5
+ export * from './store';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;;AAGpD,wBAAmC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;;AAGpD,wBAAmC;AAEnC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- import {Feature}from'@common-stack/server-core';import module from'./module.js';var index = new Feature(module);export{index as default};//# sourceMappingURL=index.js.map
1
+ import {Feature}from'@common-stack/server-core';import module from'./module.js';export{InstalledExtensionService}from'./services/installed-extension-service.js';export{InstalledExtensionServiceExt}from'./services/installed-extension-service-ext.js';export{MarketplacePublisherService}from'./services/publisher-service.js';export{PublisherEventService}from'./services/publisher-event-service.js';export{ExtensionGalleryService}from'./services/extension-gallery-service.js';export{ExtensionGalleryRepository}from'./services/extension-gallery-repository.js';export{InstalledExtensionModelFunc}from'./store/models/installed-extension-model.js';export{PublisherModelFunc,PublisherSchema}from'./store/models/publisher-model.js';export{InstalledExtensionRepository}from'./store/repositories/installed-extension-repository.js';export{MarketplacePublisherRepository}from'./store/repositories/publisher-repository.js';var index = new Feature(module);export{index as default};//# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"gFAGA,YAAmC,IAAA,OAAA,CAAA,MAAA,CAAA"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"44BAGA,YAAA,IAAA,OAAmC,CAAA,MAAA,CAAA"}
package/lib/module.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Feature } from '@common-stack/server-core';
2
- declare const _default: Feature<import("@common-stack/server-core").ConfigurationScope, any>;
2
+ declare const _default: Feature<any, any>;
3
3
  export default _default;
4
4
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;;AAYpD,wBAuBG"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;;AAmBpD,wBAWG"}
package/lib/module.js CHANGED
@@ -1,29 +1,16 @@
1
- import {find,get}from'lodash-es';import {Feature}from'@common-stack/server-core';import {SERVER_TYPES}from'common/server';import {resolver}from'./graphql/resolvers/resolvers.js';import {schema}from'./graphql/schemas/index.js';import {extensionModule}from'./containers/module.js';const extensionServiceGen = container => {
2
- container.get('Environment');
3
- return {
4
- registryExtensionService: container.get(SERVER_TYPES.IRegistryExtensionService)
5
- };
6
- };
1
+ import {Feature}from'@common-stack/server-core';import {SERVER_TYPES}from'common/server';import {resolvers}from'./graphql/resolvers/index.js';import {schema}from'./graphql/schemas/index.js';import {extensionModule}from'./containers/module.js';const extensionServiceGen = container => ({
2
+ installedExtensionService: container.get(SERVER_TYPES.IInstalledExtensionService),
3
+ publisherEventService: container.get(SERVER_TYPES.IPublisherEventService),
4
+ marketplacePublisherService: container.get(SERVER_TYPES.IMarketplacePublisherService),
5
+ extensionGalleryService: container.get(SERVER_TYPES.IExtensionGalleryService)
6
+ });
7
7
  var module = new Feature({
8
8
  schema,
9
- createResolversFunc: resolver,
9
+ createResolversFunc: resolvers,
10
10
  createContainerFunc: [extensionModule],
11
11
  createServiceFunc: extensionServiceGen,
12
- middleware: [app => {
13
- app.get('/_registry/:accountName/:extension/:version?', (req, res, next) => {
14
- // TODO: Add validation of all params exist or not.
15
- // for example, if `extension` is missing we should throw some valid error.
16
- req.services.registryExtensionService.findExtension(`${req.params.accountName}/${req.params.extension}`, req.params.version).then(data => {
17
- const release = find(data.releases, {
18
- version: req.params.version || data.version
19
- });
20
- const bundle = get(release, 'bundle');
21
- res.set('content-type', 'text/javascript');
22
- res.send(bundle);
23
- }).catch(err => res.status(500).json({
24
- ok: false,
25
- error: err.stack
26
- }));
27
- });
12
+ middleware: [() => {
13
+ // Registry extension middleware has been moved to the extension module
14
+ // This marketplace module now focuses on marketplace-specific functionality
28
15
  }]
29
16
  });export{module as default};//# sourceMappingURL=module.js.map
package/lib/module.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"module.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}