@adminide-stack/marketplace-module-server 12.0.4-alpha.47 → 12.0.4-alpha.472

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/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 +2 -0
  7. package/lib/dataloaders/index.d.ts.map +1 -0
  8. package/lib/dataloaders/publisher-data-loader.d.ts +6 -0
  9. package/lib/dataloaders/publisher-data-loader.d.ts.map +1 -0
  10. package/lib/demo/test-graphql-examples.d.ts +73 -0
  11. package/lib/demo/test-graphql-examples.d.ts.map +1 -0
  12. package/lib/graphql/resolvers/form-templates-resolver.d.ts +220 -0
  13. package/lib/graphql/resolvers/form-templates-resolver.d.ts.map +1 -0
  14. package/lib/graphql/resolvers/form-templates-resolver.js +170 -0
  15. package/lib/graphql/resolvers/form-templates-resolver.js.map +1 -0
  16. package/lib/graphql/resolvers/gallery-resolver.d.ts +15 -0
  17. package/lib/graphql/resolvers/gallery-resolver.d.ts.map +1 -0
  18. package/lib/graphql/resolvers/gallery-resolver.js +35 -0
  19. package/lib/graphql/resolvers/gallery-resolver.js.map +1 -0
  20. package/lib/graphql/resolvers/index.d.ts +247 -1
  21. package/lib/graphql/resolvers/index.d.ts.map +1 -1
  22. package/lib/graphql/resolvers/index.js +1 -0
  23. package/lib/graphql/resolvers/index.js.map +1 -0
  24. package/lib/graphql/resolvers/installed-extension-resolver.d.ts +5 -0
  25. package/lib/graphql/resolvers/installed-extension-resolver.d.ts.map +1 -0
  26. package/lib/graphql/resolvers/installed-extension-resolver.js +309 -0
  27. package/lib/graphql/resolvers/installed-extension-resolver.js.map +1 -0
  28. package/lib/graphql/resolvers/marketplace-form-resolver.d.ts +13 -0
  29. package/lib/graphql/resolvers/marketplace-form-resolver.d.ts.map +1 -0
  30. package/lib/graphql/resolvers/marketplace-form-resolver.js +90 -0
  31. package/lib/graphql/resolvers/marketplace-form-resolver.js.map +1 -0
  32. package/lib/graphql/resolvers/publisher-analytics-resolver.d.ts +14 -0
  33. package/lib/graphql/resolvers/publisher-analytics-resolver.d.ts.map +1 -0
  34. package/lib/graphql/resolvers/publisher-analytics-resolver.js +221 -0
  35. package/lib/graphql/resolvers/publisher-analytics-resolver.js.map +1 -0
  36. package/lib/graphql/resolvers/publisher-resolver.d.ts +5 -0
  37. package/lib/graphql/resolvers/publisher-resolver.d.ts.map +1 -0
  38. package/lib/graphql/resolvers/publisher-resolver.js +186 -0
  39. package/lib/graphql/resolvers/publisher-resolver.js.map +1 -0
  40. package/lib/graphql/resolvers/registry-extension-resolver.d.ts +5 -0
  41. package/lib/graphql/resolvers/registry-extension-resolver.d.ts.map +1 -0
  42. package/lib/graphql/resolvers/registry-extension-resolver.js +46 -0
  43. package/lib/graphql/resolvers/registry-extension-resolver.js.map +1 -0
  44. package/lib/graphql/schemas/extension-pricing.graphql +546 -0
  45. package/lib/graphql/schemas/extension-pricing.graphql.js +1 -0
  46. package/lib/graphql/schemas/extension-pricing.graphql.js.map +1 -0
  47. package/lib/graphql/schemas/extension-registry.graphql +107 -0
  48. package/lib/graphql/schemas/extension-registry.graphql.js +1 -0
  49. package/lib/graphql/schemas/extension-registry.graphql.js.map +1 -0
  50. package/lib/graphql/schemas/form-templates.graphql +269 -0
  51. package/lib/graphql/schemas/form-templates.graphql.js +1 -0
  52. package/lib/graphql/schemas/form-templates.graphql.js.map +1 -0
  53. package/lib/graphql/schemas/gallery-schema.graphql +247 -0
  54. package/lib/graphql/schemas/gallery-schema.graphql.js +1 -0
  55. package/lib/graphql/schemas/gallery-schema.graphql.js.map +1 -0
  56. package/lib/graphql/schemas/index.d.ts.map +1 -1
  57. package/lib/graphql/schemas/index.js +3 -4
  58. package/lib/graphql/schemas/index.js.map +1 -1
  59. package/lib/graphql/schemas/installed-extension.graphql +324 -0
  60. package/lib/graphql/schemas/installed-extension.graphql.js +1 -0
  61. package/lib/graphql/schemas/installed-extension.graphql.js.map +1 -0
  62. package/lib/graphql/schemas/publisher-analytics.graphql +305 -0
  63. package/lib/graphql/schemas/publisher-analytics.graphql.js +1 -0
  64. package/lib/graphql/schemas/publisher-analytics.graphql.js.map +1 -0
  65. package/lib/graphql/schemas/publisher.graphql +385 -0
  66. package/lib/graphql/schemas/publisher.graphql.js +1 -0
  67. package/lib/graphql/schemas/publisher.graphql.js.map +1 -0
  68. package/lib/graphql/schemas/service.graphql +196 -0
  69. package/lib/index.d.ts +3 -1
  70. package/lib/index.d.ts.map +1 -1
  71. package/lib/index.js +1 -1
  72. package/lib/index.js.map +1 -1
  73. package/lib/module.d.ts +1 -1
  74. package/lib/module.d.ts.map +1 -1
  75. package/lib/module.js +10 -23
  76. package/lib/module.js.map +1 -1
  77. package/lib/plugins/extension-moleculer-service.d.ts +86 -0
  78. package/lib/plugins/extension-moleculer-service.d.ts.map +1 -0
  79. package/lib/plugins/index.d.ts +2 -0
  80. package/lib/plugins/index.d.ts.map +1 -0
  81. package/lib/services/extension-gallery-repository.d.ts +17 -0
  82. package/lib/services/extension-gallery-repository.d.ts.map +1 -0
  83. package/lib/services/extension-gallery-repository.js +192 -0
  84. package/lib/services/extension-gallery-repository.js.map +1 -0
  85. package/lib/services/extension-gallery-service-new.d.ts +39 -0
  86. package/lib/services/extension-gallery-service-new.d.ts.map +1 -0
  87. package/lib/services/extension-gallery-service.d.ts +30 -0
  88. package/lib/services/extension-gallery-service.d.ts.map +1 -0
  89. package/lib/services/extension-gallery-service.js +334 -0
  90. package/lib/services/extension-gallery-service.js.map +1 -0
  91. package/lib/services/index.d.ts +6 -1
  92. package/lib/services/index.d.ts.map +1 -1
  93. package/lib/services/installed-extension-service-ext.d.ts +16 -0
  94. package/lib/services/installed-extension-service-ext.d.ts.map +1 -0
  95. package/lib/services/installed-extension-service-ext.js +518 -0
  96. package/lib/services/installed-extension-service-ext.js.map +1 -0
  97. package/lib/services/installed-extension-service.d.ts +110 -0
  98. package/lib/services/installed-extension-service.d.ts.map +1 -0
  99. package/lib/services/installed-extension-service.js +617 -0
  100. package/lib/services/installed-extension-service.js.map +1 -0
  101. package/lib/services/installed-extension-service.test.d.ts +1 -0
  102. package/lib/services/installed-extension-service.test.d.ts.map +1 -0
  103. package/lib/services/publisher-analytics-service.d.ts +128 -0
  104. package/lib/services/publisher-analytics-service.d.ts.map +1 -0
  105. package/lib/services/publisher-event-service.d.ts +48 -0
  106. package/lib/services/publisher-event-service.d.ts.map +1 -0
  107. package/lib/services/publisher-event-service.js +296 -0
  108. package/lib/services/publisher-event-service.js.map +1 -0
  109. package/lib/services/publisher-service-context.d.ts +1 -0
  110. package/lib/services/publisher-service-context.d.ts.map +1 -0
  111. package/lib/services/publisher-service.d.ts +61 -0
  112. package/lib/services/publisher-service.d.ts.map +1 -0
  113. package/lib/services/publisher-service.js +135 -0
  114. package/lib/services/publisher-service.js.map +1 -0
  115. package/lib/store/index.d.ts +1 -1
  116. package/lib/store/index.d.ts.map +1 -1
  117. package/lib/store/models/index.d.ts +2 -1
  118. package/lib/store/models/index.d.ts.map +1 -1
  119. package/lib/store/models/installed-extension-model.d.ts +4 -0
  120. package/lib/store/models/installed-extension-model.d.ts.map +1 -0
  121. package/lib/store/models/installed-extension-model.js +269 -0
  122. package/lib/store/models/installed-extension-model.js.map +1 -0
  123. package/lib/store/models/publisher-event-model.d.ts +11 -0
  124. package/lib/store/models/publisher-event-model.d.ts.map +1 -0
  125. package/lib/store/models/publisher-model.d.ts +5 -0
  126. package/lib/store/models/publisher-model.d.ts.map +1 -0
  127. package/lib/store/models/publisher-model.js +117 -0
  128. package/lib/store/models/publisher-model.js.map +1 -0
  129. package/lib/store/models/publisher-stats-model.d.ts +1 -0
  130. package/lib/store/models/publisher-stats-model.d.ts.map +1 -0
  131. package/lib/store/repositories/index.d.ts +3 -0
  132. package/lib/store/repositories/index.d.ts.map +1 -0
  133. package/lib/store/repositories/installed-extension-repository.d.ts +77 -0
  134. package/lib/store/repositories/installed-extension-repository.d.ts.map +1 -0
  135. package/lib/store/repositories/installed-extension-repository.js +462 -0
  136. package/lib/store/repositories/installed-extension-repository.js.map +1 -0
  137. package/lib/store/repositories/publisher-analytics-repository.d.ts +1 -0
  138. package/lib/store/repositories/publisher-analytics-repository.d.ts.map +1 -0
  139. package/lib/store/repositories/publisher-repository.d.ts +19 -0
  140. package/lib/store/repositories/publisher-repository.d.ts.map +1 -0
  141. package/lib/store/repositories/publisher-repository.js +87 -0
  142. package/lib/store/repositories/publisher-repository.js.map +1 -0
  143. package/lib/templates/constants/DB_COLL_NAMES.ts.template +5 -0
  144. package/lib/templates/constants/SERVER_TYPES.ts.template +10 -4
  145. package/lib/templates/repositories/ExtensionGalleryRepository.ts.template +44 -0
  146. package/lib/templates/repositories/InstalledExtensionRepository.ts.template +99 -0
  147. package/lib/templates/repositories/MarketplacePublisherRepository.ts.template +24 -0
  148. package/lib/templates/repositories/RegistryExtensionRepository.ts.template +10 -15
  149. package/lib/templates/services/ExtensionGalleryDataLoader.ts.template +2 -0
  150. package/lib/templates/services/ExtensionGalleryService.ts.template +79 -0
  151. package/lib/templates/services/InstalledExtensionDataLoader.ts.template +2 -0
  152. package/lib/templates/services/InstalledExtensionService.ts.template +199 -0
  153. package/lib/templates/services/MarketplacePublisherService.ts.template +50 -0
  154. package/lib/templates/services/PublisherDataLoader.ts.template +3 -0
  155. package/lib/templates/services/PublisherEventService.ts.template +56 -0
  156. package/lib/templates/services/RegistryExtensionService.ts.template +62 -18
  157. package/lib/tests/extension-integration.test.d.ts +1 -0
  158. package/lib/tests/extension-integration.test.d.ts.map +1 -0
  159. package/lib/tests/install-extension-graphql.test.d.ts +2 -0
  160. package/lib/tests/install-extension-graphql.test.d.ts.map +1 -0
  161. package/lib/tests/test-extension-services.d.ts +1 -0
  162. package/lib/tests/test-extension-services.d.ts.map +1 -0
  163. package/lib/utils/publisherValidation.d.ts +23 -0
  164. package/lib/utils/publisherValidation.d.ts.map +1 -0
  165. package/lib/utils/publisherValidation.js +144 -0
  166. package/lib/utils/publisherValidation.js.map +1 -0
  167. package/package.json +16 -7
  168. package/lib/graphql/resolvers/resolvers.d.ts +0 -2
  169. package/lib/graphql/resolvers/resolvers.d.ts.map +0 -1
  170. package/lib/graphql/resolvers/resolvers.js +0 -167
  171. package/lib/graphql/resolvers/resolvers.js.map +0 -1
  172. package/lib/graphql/schemas/extension.graphql +0 -57
  173. package/lib/graphql/schemas/extension.graphql.js +0 -1
  174. package/lib/graphql/schemas/extension.graphql.js.map +0 -1
  175. package/lib/services/extension-service.d.ts +0 -54
  176. package/lib/services/extension-service.d.ts.map +0 -1
  177. package/lib/services/extension-service.js +0 -42
  178. package/lib/services/extension-service.js.map +0 -1
  179. package/lib/store/models/registry-extension-model.d.ts +0 -10
  180. package/lib/store/models/registry-extension-model.d.ts.map +0 -1
  181. package/lib/store/models/registry-extension-model.js +0 -62
  182. package/lib/store/models/registry-extension-model.js.map +0 -1
  183. package/lib/store/repository/index.d.ts +0 -2
  184. package/lib/store/repository/index.d.ts.map +0 -1
  185. package/lib/store/repository/registry-extension-repository.d.ts +0 -31
  186. package/lib/store/repository/registry-extension-repository.d.ts.map +0 -1
  187. package/lib/store/repository/registry-extension-repository.js +0 -135
  188. package/lib/store/repository/registry-extension-repository.js.map +0 -1
@@ -0,0 +1,385 @@
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 publisher ID (UUID)."""
9
+ publisherId: String! @column
10
+
11
+ """The unique name/slug of the publisher (e.g., 'stackflow1', 'microsoft')."""
12
+ name: String! @column
13
+
14
+ """The display name of the publisher."""
15
+ displayName: String! @column
16
+
17
+ """The publisher's description."""
18
+ description: String @column
19
+
20
+ """The publisher's website URL."""
21
+ websiteUrl: String @column
22
+
23
+ """The publisher's logo/avatar URL."""
24
+ logoUrl: String @column
25
+
26
+ """The publisher's avatar URL (alias for logoUrl)."""
27
+ avatar: String @column
28
+
29
+ """The publisher's email contact."""
30
+ email: String @column
31
+
32
+ """The tenant ID associated with this publisher."""
33
+ tenant: Tenant @column(overrideType: "ObjectId")
34
+
35
+ """Whether the publisher is verified."""
36
+ verified: Boolean! @column
37
+
38
+ """The date when the publisher was created."""
39
+ createdAt: DateTime! @column(overrideType: "Date")
40
+
41
+ """The date when the publisher was last updated."""
42
+ updatedAt: DateTime! @column(overrideType: "Date")
43
+
44
+ """The number of extensions published by this publisher."""
45
+ extensionCount: Int! @column
46
+
47
+ """The total number of downloads across all extensions."""
48
+ totalDownloads: Int! @column
49
+
50
+ """The extensions published by this publisher."""
51
+ extensions: [RegistryExtension!]! @column(overrideType: "[ObjectId]")
52
+
53
+ """Whether the current user can manage this publisher."""
54
+ viewerCanManage: Boolean!
55
+
56
+ """Real-time analytics stats (computed from time series data)."""
57
+ stats: MarketplacePublisherStats
58
+
59
+ """Historical analytics data (computed from time series data)."""
60
+ analytics(
61
+ startDate: DateTime!
62
+ endDate: DateTime!
63
+ granularity: AnalyticsGranularity!
64
+ ): [MarketplacePublisherAnalytics!]!
65
+
66
+ """Trend analysis (computed from time series data)."""
67
+ trends(days: Int = 30): MarketplacePublisherTrend
68
+ }
69
+
70
+ """
71
+ Publisher statistics and metrics
72
+ """
73
+ type PublisherStats {
74
+ """Total number of extensions."""
75
+ totalExtensions: Int!
76
+
77
+ """Total downloads across all extensions."""
78
+ totalDownloads: Int!
79
+
80
+ """Total active installations."""
81
+ totalInstallations: Int!
82
+
83
+ """Average rating across all extensions."""
84
+ averageRating: Float!
85
+
86
+ """Number of verified publishers."""
87
+ verifiedCount: Int!
88
+
89
+ """Most popular extension."""
90
+ topExtension: RegistryExtension
91
+ }
92
+
93
+ """
94
+ Real-time analytics stats for a marketplace publisher (computed from time series)
95
+ """
96
+ type MarketplacePublisherStats {
97
+ """Total number of downloads."""
98
+ totalDownloads: Int!
99
+
100
+ """Total number of installations."""
101
+ totalInstalls: Int!
102
+
103
+ """Total number of views."""
104
+ totalViews: Int!
105
+
106
+ """Average rating."""
107
+ averageRating: Float!
108
+
109
+ """Total number of ratings received."""
110
+ totalRatings: Int!
111
+
112
+ """Number of extensions published."""
113
+ extensionCount: Int!
114
+
115
+ """Last updated timestamp."""
116
+ lastUpdated: DateTime!
117
+ }
118
+
119
+ """
120
+ Historical analytics data point for a marketplace publisher (computed from time series)
121
+ """
122
+ type MarketplacePublisherAnalytics {
123
+ """The date/time for this data point."""
124
+ date: DateTime!
125
+
126
+ """Number of downloads in this period."""
127
+ downloads: Int!
128
+
129
+ """Number of installations in this period."""
130
+ installs: Int!
131
+
132
+ """Number of views in this period."""
133
+ views: Int!
134
+
135
+ """Number of ratings in this period."""
136
+ ratings: Int!
137
+
138
+ """Average rating for this period."""
139
+ averageRating: Float!
140
+
141
+ """Unique users who interacted with publisher content."""
142
+ uniqueUsers: Int!
143
+ }
144
+
145
+ """
146
+ Trend analysis for a marketplace publisher (computed from time series)
147
+ """
148
+ type MarketplacePublisherTrend {
149
+ """Download trend direction."""
150
+ downloadTrend: TrendDirection!
151
+
152
+ """Download trend percentage change."""
153
+ downloadChange: Float!
154
+
155
+ """Installation trend direction."""
156
+ installTrend: TrendDirection!
157
+
158
+ """Installation trend percentage change."""
159
+ installChange: Float!
160
+
161
+ """View trend direction."""
162
+ viewTrend: TrendDirection!
163
+
164
+ """View trend percentage change."""
165
+ viewChange: Float!
166
+
167
+ """Rating trend direction."""
168
+ ratingTrend: TrendDirection!
169
+
170
+ """Rating trend percentage change."""
171
+ ratingChange: Float!
172
+
173
+ """Overall trend score (composite metric)."""
174
+ trendScore: Float!
175
+ }
176
+
177
+ """
178
+ Analytics granularity options
179
+ """
180
+ enum AnalyticsGranularity {
181
+ HOUR
182
+ DAY
183
+ WEEK
184
+ MONTH
185
+ YEAR
186
+ }
187
+
188
+ """
189
+ Trend direction enumeration
190
+ """
191
+ enum TrendDirection {
192
+ INCREASING
193
+ DECREASING
194
+ STABLE
195
+ }
196
+
197
+ extend type Query {
198
+ """Get a publisher by name."""
199
+ publisher(name: String!): MarketplacePublisher
200
+
201
+ """Get all publishers with optional filtering."""
202
+ publishers(
203
+ """Filter by verified status."""
204
+ verified: Boolean
205
+
206
+ """Search query for publisher name or description."""
207
+ search: String
208
+
209
+ """Number of results to return (default: 20, max: 100)."""
210
+ first: Int
211
+
212
+ """Number of results to skip."""
213
+ skip: Int
214
+
215
+ """Sort order."""
216
+ orderBy: PublisherOrderBy
217
+ ): PublisherConnection!
218
+
219
+ """Get publisher statistics."""
220
+ publisherStats: PublisherStats!
221
+ }
222
+
223
+ extend type Mutation {
224
+ """Create a new publisher."""
225
+ createPublisherMutation(input: CreatePublisherInput!): CreatePublisherPayload!
226
+
227
+ """Update an existing publisher."""
228
+ updatePublisherMutation(id: ID!, input: UpdatePublisherInput!): UpdatePublisherPayload!
229
+
230
+ """Verify a publisher."""
231
+ verifyPublisherMutation(id: ID!): VerifyPublisherPayload!
232
+ }
233
+
234
+ """
235
+ Input for creating a new publisher
236
+ """
237
+ input CreatePublisherInput {
238
+ """The display name of the publisher."""
239
+ displayName: String!
240
+
241
+ """The unique name/slug of the publisher."""
242
+ publisherName: String!
243
+
244
+ """The publisher's description."""
245
+ description: String
246
+
247
+ """The publisher's website URL."""
248
+ website: String
249
+
250
+ """The publisher's email contact."""
251
+ email: String
252
+
253
+ """The publisher's domain for verification."""
254
+ domain: String
255
+
256
+ """The tenant ID associated with this publisher."""
257
+ tenant: ID
258
+ }
259
+
260
+ """
261
+ Input for updating a publisher
262
+ """
263
+ input UpdatePublisherInput {
264
+ """The display name of the publisher."""
265
+ displayName: String
266
+
267
+ """The publisher's description."""
268
+ description: String
269
+
270
+ """The publisher's website URL."""
271
+ website: String
272
+
273
+ """The publisher's logo/avatar URL."""
274
+ avatarUrl: String
275
+ }
276
+
277
+ """
278
+ Payload for create publisher mutation
279
+ """
280
+ type CreatePublisherPayload {
281
+ """The created publisher."""
282
+ publisher: MarketplacePublisher!
283
+
284
+ """Success flag."""
285
+ success: Boolean!
286
+
287
+ """Error message if any."""
288
+ error: String
289
+ }
290
+
291
+ """
292
+ Payload for update publisher mutation
293
+ """
294
+ type UpdatePublisherPayload {
295
+ """The updated publisher."""
296
+ publisher: MarketplacePublisher
297
+
298
+ """Success flag."""
299
+ success: Boolean!
300
+
301
+ """Error message if any."""
302
+ error: String
303
+ }
304
+
305
+ """
306
+ Payload for verify publisher mutation
307
+ """
308
+ type VerifyPublisherPayload {
309
+ """The verified publisher."""
310
+ publisher: MarketplacePublisher
311
+
312
+ """Success flag."""
313
+ success: Boolean!
314
+
315
+ """Error message if any."""
316
+ error: String
317
+ }
318
+
319
+ """
320
+ Publisher connection for pagination
321
+ """
322
+ type PublisherConnection {
323
+ """List of publishers."""
324
+ nodes: [MarketplacePublisher!]!
325
+
326
+ """Total count of publishers."""
327
+ totalCount: Int!
328
+
329
+ """Whether there are more results."""
330
+ hasNextPage: Boolean!
331
+
332
+ """Whether there are previous results."""
333
+ hasPreviousPage: Boolean!
334
+ }
335
+
336
+ """
337
+ Sort options for publishers
338
+ """
339
+ enum PublisherOrderBy {
340
+ """Sort by name (A-Z)."""
341
+ NAME_ASC
342
+
343
+ """Sort by name (Z-A)."""
344
+ NAME_DESC
345
+
346
+ """Sort by creation date (newest first)."""
347
+ CREATED_DESC
348
+
349
+ """Sort by creation date (oldest first)."""
350
+ CREATED_ASC
351
+
352
+ """Sort by extension count (most first)."""
353
+ EXTENSIONS_DESC
354
+
355
+ """Sort by extension count (least first)."""
356
+ EXTENSIONS_ASC
357
+
358
+ """Sort by total downloads (most first)."""
359
+ DOWNLOADS_DESC
360
+
361
+ """Sort by total downloads (least first)."""
362
+ DOWNLOADS_ASC
363
+ }
364
+
365
+ """
366
+ Extension manifest author information
367
+ """
368
+ type ExtensionManifestAuthor @entity(embedded: true) {
369
+ """The author's name."""
370
+ name: String! @column
371
+
372
+ """The author's email."""
373
+ email: String @column
374
+
375
+ """The author's website URL."""
376
+ url: String @column
377
+
378
+ """Whether the author is verified."""
379
+ verified: Boolean @column
380
+ }
381
+
382
+ extend type ExtensionManifest {
383
+ """The publisher who published this extension."""
384
+ publisherDetails: MarketplacePublisher
385
+ }
@@ -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 publisher ID (UUID).\"\"\"\n publisherId: String! @column\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 \"\"\"The tenant ID associated with this publisher.\"\"\"\n tenant: Tenant @column(overrideType: \"ObjectId\")\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 \"\"\"The tenant ID associated with this publisher.\"\"\"\n tenant: ID\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