@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.
- package/Readme.md +321 -0
- package/lib/containers/module.d.ts +8 -0
- package/lib/containers/module.d.ts.map +1 -1
- package/lib/containers/module.js +15 -5
- package/lib/containers/module.js.map +1 -1
- package/lib/dataloaders/index.d.ts +1 -0
- package/lib/dataloaders/index.d.ts.map +1 -0
- package/lib/demo/test-graphql-examples.d.ts +73 -0
- package/lib/demo/test-graphql-examples.d.ts.map +1 -0
- package/lib/graphql/resolvers/form-templates-resolver.d.ts +220 -0
- package/lib/graphql/resolvers/form-templates-resolver.d.ts.map +1 -0
- package/lib/graphql/resolvers/form-templates-resolver.js +170 -0
- package/lib/graphql/resolvers/form-templates-resolver.js.map +1 -0
- package/lib/graphql/resolvers/gallery-resolver.d.ts +15 -0
- package/lib/graphql/resolvers/gallery-resolver.d.ts.map +1 -0
- package/lib/graphql/resolvers/gallery-resolver.js +35 -0
- package/lib/graphql/resolvers/gallery-resolver.js.map +1 -0
- package/lib/graphql/resolvers/index.d.ts +247 -1
- package/lib/graphql/resolvers/index.d.ts.map +1 -1
- package/lib/graphql/resolvers/index.js +1 -0
- package/lib/graphql/resolvers/index.js.map +1 -0
- package/lib/graphql/resolvers/installed-extension-resolver.d.ts +5 -0
- package/lib/graphql/resolvers/installed-extension-resolver.d.ts.map +1 -0
- package/lib/graphql/resolvers/installed-extension-resolver.js +289 -0
- package/lib/graphql/resolvers/installed-extension-resolver.js.map +1 -0
- package/lib/graphql/resolvers/marketplace-form-resolver.d.ts +13 -0
- package/lib/graphql/resolvers/marketplace-form-resolver.d.ts.map +1 -0
- package/lib/graphql/resolvers/marketplace-form-resolver.js +90 -0
- package/lib/graphql/resolvers/marketplace-form-resolver.js.map +1 -0
- package/lib/graphql/resolvers/publisher-analytics-resolver.d.ts +14 -0
- package/lib/graphql/resolvers/publisher-analytics-resolver.d.ts.map +1 -0
- package/lib/graphql/resolvers/publisher-analytics-resolver.js +221 -0
- package/lib/graphql/resolvers/publisher-analytics-resolver.js.map +1 -0
- package/lib/graphql/resolvers/publisher-resolver.d.ts +5 -0
- package/lib/graphql/resolvers/publisher-resolver.d.ts.map +1 -0
- package/lib/graphql/resolvers/publisher-resolver.js +176 -0
- package/lib/graphql/resolvers/publisher-resolver.js.map +1 -0
- package/lib/graphql/resolvers/registry-extension-resolver.d.ts +5 -0
- package/lib/graphql/resolvers/registry-extension-resolver.d.ts.map +1 -0
- package/lib/graphql/resolvers/registry-extension-resolver.js +46 -0
- package/lib/graphql/resolvers/registry-extension-resolver.js.map +1 -0
- package/lib/graphql/schemas/extension-pricing.graphql +546 -0
- package/lib/graphql/schemas/extension-pricing.graphql.js +1 -0
- package/lib/graphql/schemas/extension-pricing.graphql.js.map +1 -0
- package/lib/graphql/schemas/extension-registry.graphql +107 -0
- package/lib/graphql/schemas/extension-registry.graphql.js +1 -0
- package/lib/graphql/schemas/extension-registry.graphql.js.map +1 -0
- package/lib/graphql/schemas/form-templates.graphql +269 -0
- package/lib/graphql/schemas/form-templates.graphql.js +1 -0
- package/lib/graphql/schemas/form-templates.graphql.js.map +1 -0
- package/lib/graphql/schemas/gallery-schema.graphql +247 -0
- package/lib/graphql/schemas/gallery-schema.graphql.js +1 -0
- package/lib/graphql/schemas/gallery-schema.graphql.js.map +1 -0
- package/lib/graphql/schemas/index.d.ts.map +1 -1
- package/lib/graphql/schemas/index.js +3 -4
- package/lib/graphql/schemas/index.js.map +1 -1
- package/lib/graphql/schemas/installed-extension.graphql +309 -0
- package/lib/graphql/schemas/installed-extension.graphql.js +1 -0
- package/lib/graphql/schemas/installed-extension.graphql.js.map +1 -0
- package/lib/graphql/schemas/publisher-analytics.graphql +305 -0
- package/lib/graphql/schemas/publisher-analytics.graphql.js +1 -0
- package/lib/graphql/schemas/publisher-analytics.graphql.js.map +1 -0
- package/lib/graphql/schemas/publisher.graphql +376 -0
- package/lib/graphql/schemas/publisher.graphql.js +1 -0
- package/lib/graphql/schemas/publisher.graphql.js.map +1 -0
- package/lib/graphql/schemas/service.graphql +196 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/module.d.ts +1 -1
- package/lib/module.d.ts.map +1 -1
- package/lib/module.js +10 -23
- package/lib/module.js.map +1 -1
- package/lib/plugins/extension-moleculer-service.d.ts +86 -0
- package/lib/plugins/extension-moleculer-service.d.ts.map +1 -0
- package/lib/plugins/index.d.ts +2 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/services/extension-gallery-repository.d.ts +17 -0
- package/lib/services/extension-gallery-repository.d.ts.map +1 -0
- package/lib/services/extension-gallery-repository.js +192 -0
- package/lib/services/extension-gallery-repository.js.map +1 -0
- package/lib/services/extension-gallery-service-new.d.ts +39 -0
- package/lib/services/extension-gallery-service-new.d.ts.map +1 -0
- package/lib/services/extension-gallery-service.d.ts +30 -0
- package/lib/services/extension-gallery-service.d.ts.map +1 -0
- package/lib/services/extension-gallery-service.js +311 -0
- package/lib/services/extension-gallery-service.js.map +1 -0
- package/lib/services/index.d.ts +6 -1
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/installed-extension-service-ext.d.ts +16 -0
- package/lib/services/installed-extension-service-ext.d.ts.map +1 -0
- package/lib/services/installed-extension-service-ext.js +485 -0
- package/lib/services/installed-extension-service-ext.js.map +1 -0
- package/lib/services/installed-extension-service.d.ts +96 -0
- package/lib/services/installed-extension-service.d.ts.map +1 -0
- package/lib/services/installed-extension-service.js +521 -0
- package/lib/services/installed-extension-service.js.map +1 -0
- package/lib/services/installed-extension-service.test.d.ts +1 -0
- package/lib/services/installed-extension-service.test.d.ts.map +1 -0
- package/lib/services/publisher-analytics-service.d.ts +128 -0
- package/lib/services/publisher-analytics-service.d.ts.map +1 -0
- package/lib/services/publisher-event-service.d.ts +48 -0
- package/lib/services/publisher-event-service.d.ts.map +1 -0
- package/lib/services/publisher-event-service.js +296 -0
- package/lib/services/publisher-event-service.js.map +1 -0
- package/lib/services/publisher-service-context.d.ts +1 -0
- package/lib/services/publisher-service-context.d.ts.map +1 -0
- package/lib/services/publisher-service.d.ts +60 -0
- package/lib/services/publisher-service.d.ts.map +1 -0
- package/lib/services/publisher-service.js +134 -0
- package/lib/services/publisher-service.js.map +1 -0
- package/lib/store/index.d.ts +1 -1
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/models/index.d.ts +2 -1
- package/lib/store/models/index.d.ts.map +1 -1
- package/lib/store/models/installed-extension-model.d.ts +4 -0
- package/lib/store/models/installed-extension-model.d.ts.map +1 -0
- package/lib/store/models/installed-extension-model.js +269 -0
- package/lib/store/models/installed-extension-model.js.map +1 -0
- package/lib/store/models/publisher-event-model.d.ts +11 -0
- package/lib/store/models/publisher-event-model.d.ts.map +1 -0
- package/lib/store/models/publisher-model.d.ts +5 -0
- package/lib/store/models/publisher-model.d.ts.map +1 -0
- package/lib/store/models/publisher-model.js +103 -0
- package/lib/store/models/publisher-model.js.map +1 -0
- package/lib/store/models/publisher-stats-model.d.ts +1 -0
- package/lib/store/models/publisher-stats-model.d.ts.map +1 -0
- package/lib/store/repositories/index.d.ts +3 -0
- package/lib/store/repositories/index.d.ts.map +1 -0
- package/lib/store/repositories/installed-extension-repository.d.ts +73 -0
- package/lib/store/repositories/installed-extension-repository.d.ts.map +1 -0
- package/lib/store/repositories/installed-extension-repository.js +442 -0
- package/lib/store/repositories/installed-extension-repository.js.map +1 -0
- package/lib/store/repositories/publisher-analytics-repository.d.ts +1 -0
- package/lib/store/repositories/publisher-analytics-repository.d.ts.map +1 -0
- package/lib/store/repositories/publisher-repository.d.ts +19 -0
- package/lib/store/repositories/publisher-repository.d.ts.map +1 -0
- package/lib/store/repositories/publisher-repository.js +87 -0
- package/lib/store/repositories/publisher-repository.js.map +1 -0
- package/lib/templates/constants/DB_COLL_NAMES.ts.template +5 -0
- package/lib/templates/constants/SERVER_TYPES.ts.template +10 -4
- package/lib/templates/repositories/ExtensionGalleryRepository.ts.template +44 -0
- package/lib/templates/repositories/InstalledExtensionRepository.ts.template +94 -0
- package/lib/templates/repositories/MarketplacePublisherRepository.ts.template +24 -0
- package/lib/templates/repositories/RegistryExtensionRepository.ts.template +10 -15
- package/lib/templates/services/ExtensionGalleryDataLoader.ts.template +2 -0
- package/lib/templates/services/ExtensionGalleryService.ts.template +79 -0
- package/lib/templates/services/InstalledExtensionDataLoader.ts.template +2 -0
- package/lib/templates/services/InstalledExtensionService.ts.template +181 -0
- package/lib/templates/services/MarketplacePublisherService.ts.template +49 -0
- package/lib/templates/services/PublisherEventService.ts.template +56 -0
- package/lib/templates/services/RegistryExtensionService.ts.template +62 -18
- package/lib/tests/extension-integration.test.d.ts +1 -0
- package/lib/tests/extension-integration.test.d.ts.map +1 -0
- package/lib/tests/install-extension-graphql.test.d.ts +2 -0
- package/lib/tests/install-extension-graphql.test.d.ts.map +1 -0
- package/lib/tests/test-extension-services.d.ts +1 -0
- package/lib/tests/test-extension-services.d.ts.map +1 -0
- package/lib/utils/publisherValidation.d.ts +23 -0
- package/lib/utils/publisherValidation.d.ts.map +1 -0
- package/lib/utils/publisherValidation.js +144 -0
- package/lib/utils/publisherValidation.js.map +1 -0
- package/package.json +15 -7
- package/lib/graphql/resolvers/resolvers.d.ts +0 -2
- package/lib/graphql/resolvers/resolvers.d.ts.map +0 -1
- package/lib/graphql/resolvers/resolvers.js +0 -167
- package/lib/graphql/resolvers/resolvers.js.map +0 -1
- package/lib/graphql/schemas/extension.graphql +0 -57
- package/lib/graphql/schemas/extension.graphql.js +0 -1
- package/lib/graphql/schemas/extension.graphql.js.map +0 -1
- package/lib/services/extension-service.d.ts +0 -54
- package/lib/services/extension-service.d.ts.map +0 -1
- package/lib/services/extension-service.js +0 -42
- package/lib/services/extension-service.js.map +0 -1
- package/lib/store/models/registry-extension-model.d.ts +0 -10
- package/lib/store/models/registry-extension-model.d.ts.map +0 -1
- package/lib/store/models/registry-extension-model.js +0 -62
- package/lib/store/models/registry-extension-model.js.map +0 -1
- package/lib/store/repository/index.d.ts +0 -2
- package/lib/store/repository/index.d.ts.map +0 -1
- package/lib/store/repository/registry-extension-repository.d.ts +0 -31
- package/lib/store/repository/registry-extension-repository.d.ts.map +0 -1
- package/lib/store/repository/registry-extension-repository.js +0 -135
- package/lib/store/repository/registry-extension-repository.js.map +0 -1
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Extension pricing and subscription models for the marketplace
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
enum ExtensionPricingModel {
|
|
6
|
+
"""Extension is completely free"""
|
|
7
|
+
FREE
|
|
8
|
+
|
|
9
|
+
"""One-time purchase"""
|
|
10
|
+
ONE_TIME
|
|
11
|
+
|
|
12
|
+
"""Recurring subscription"""
|
|
13
|
+
SUBSCRIPTION
|
|
14
|
+
|
|
15
|
+
"""Usage-based pricing"""
|
|
16
|
+
USAGE_BASED
|
|
17
|
+
|
|
18
|
+
"""Freemium model with paid features"""
|
|
19
|
+
FREEMIUM
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
enum ExtensionSubscriptionInterval {
|
|
23
|
+
"""Monthly subscription"""
|
|
24
|
+
MONTHLY
|
|
25
|
+
|
|
26
|
+
"""Quarterly subscription"""
|
|
27
|
+
QUARTERLY
|
|
28
|
+
|
|
29
|
+
"""Yearly subscription"""
|
|
30
|
+
YEARLY
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
enum ExtensionTrialType {
|
|
34
|
+
"""No trial period"""
|
|
35
|
+
NONE
|
|
36
|
+
|
|
37
|
+
"""Free trial with full features"""
|
|
38
|
+
FREE_TRIAL
|
|
39
|
+
|
|
40
|
+
"""Free trial with limited features"""
|
|
41
|
+
LIMITED_TRIAL
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
type ExtensionPricingTier {
|
|
45
|
+
"""Unique identifier for the pricing tier"""
|
|
46
|
+
id: ID!
|
|
47
|
+
|
|
48
|
+
"""Name of the pricing tier (e.g., Basic, Pro, Enterprise)"""
|
|
49
|
+
name: String!
|
|
50
|
+
|
|
51
|
+
"""Description of what's included in this tier"""
|
|
52
|
+
description: String
|
|
53
|
+
|
|
54
|
+
"""Price in cents (USD)"""
|
|
55
|
+
priceInCents: Int!
|
|
56
|
+
|
|
57
|
+
"""Currency code (e.g., USD, EUR)"""
|
|
58
|
+
currency: String!
|
|
59
|
+
|
|
60
|
+
"""Subscription interval for recurring payments"""
|
|
61
|
+
interval: ExtensionSubscriptionInterval
|
|
62
|
+
|
|
63
|
+
"""List of features included in this tier"""
|
|
64
|
+
features: [String!]!
|
|
65
|
+
|
|
66
|
+
"""Maximum number of users/seats for this tier"""
|
|
67
|
+
maxUsers: Int
|
|
68
|
+
|
|
69
|
+
"""API rate limits for this tier"""
|
|
70
|
+
rateLimit: Int
|
|
71
|
+
|
|
72
|
+
"""Storage limits in GB"""
|
|
73
|
+
storageLimit: Int
|
|
74
|
+
|
|
75
|
+
"""Whether this is the recommended tier"""
|
|
76
|
+
isRecommended: Boolean!
|
|
77
|
+
|
|
78
|
+
"""Whether this tier is currently available"""
|
|
79
|
+
isActive: Boolean!
|
|
80
|
+
|
|
81
|
+
"""Sort order for displaying tiers"""
|
|
82
|
+
sortOrder: Int!
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
type ExtensionPricing {
|
|
86
|
+
"""Unique identifier for the pricing configuration"""
|
|
87
|
+
id: ID!
|
|
88
|
+
|
|
89
|
+
"""Extension this pricing belongs to"""
|
|
90
|
+
extensionSlug: String!
|
|
91
|
+
|
|
92
|
+
"""Pricing model type"""
|
|
93
|
+
model: ExtensionPricingModel!
|
|
94
|
+
|
|
95
|
+
"""Available pricing tiers"""
|
|
96
|
+
tiers: [ExtensionPricingTier!]!
|
|
97
|
+
|
|
98
|
+
"""Trial configuration"""
|
|
99
|
+
trialType: ExtensionTrialType!
|
|
100
|
+
|
|
101
|
+
"""Trial duration in days"""
|
|
102
|
+
trialDurationDays: Int
|
|
103
|
+
|
|
104
|
+
"""Whether the extension offers a free tier"""
|
|
105
|
+
hasFreeTier: Boolean!
|
|
106
|
+
|
|
107
|
+
"""Free tier limitations"""
|
|
108
|
+
freeTierLimitations: String
|
|
109
|
+
|
|
110
|
+
"""Setup fee in cents (one-time)"""
|
|
111
|
+
setupFeeInCents: Int
|
|
112
|
+
|
|
113
|
+
"""Currency for pricing"""
|
|
114
|
+
currency: String!
|
|
115
|
+
|
|
116
|
+
"""Supported payment methods"""
|
|
117
|
+
supportedPaymentMethods: [String!]!
|
|
118
|
+
|
|
119
|
+
"""Billing configuration"""
|
|
120
|
+
billingConfig: ExtensionBillingConfig
|
|
121
|
+
|
|
122
|
+
"""When this pricing was created"""
|
|
123
|
+
createdAt: DateTime!
|
|
124
|
+
|
|
125
|
+
"""When this pricing was last updated"""
|
|
126
|
+
updatedAt: DateTime!
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
type ExtensionBillingConfig {
|
|
130
|
+
"""Allow annual discount"""
|
|
131
|
+
annualDiscountPercent: Float
|
|
132
|
+
|
|
133
|
+
"""Proration settings"""
|
|
134
|
+
enableProration: Boolean!
|
|
135
|
+
|
|
136
|
+
"""Grace period for failed payments (days)"""
|
|
137
|
+
gracePeriodDays: Int!
|
|
138
|
+
|
|
139
|
+
"""Auto-renewal settings"""
|
|
140
|
+
autoRenewal: Boolean!
|
|
141
|
+
|
|
142
|
+
"""Usage billing settings"""
|
|
143
|
+
usageMetrics: [ExtensionUsageMetric!]
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
type ExtensionUsageMetric {
|
|
147
|
+
"""Metric identifier (e.g., api_calls, storage_gb, users)"""
|
|
148
|
+
name: String!
|
|
149
|
+
|
|
150
|
+
"""Display name for the metric"""
|
|
151
|
+
displayName: String!
|
|
152
|
+
|
|
153
|
+
"""Unit of measurement"""
|
|
154
|
+
unit: String!
|
|
155
|
+
|
|
156
|
+
"""Price per unit in cents"""
|
|
157
|
+
pricePerUnit: Int!
|
|
158
|
+
|
|
159
|
+
"""Free tier allowance"""
|
|
160
|
+
freeTierLimit: Int
|
|
161
|
+
|
|
162
|
+
"""Whether usage can exceed the plan limit"""
|
|
163
|
+
allowOverage: Boolean!
|
|
164
|
+
|
|
165
|
+
"""Overage price per unit in cents"""
|
|
166
|
+
overagePricePerUnit: Int
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
type ExtensionSubscription {
|
|
170
|
+
"""Unique subscription identifier"""
|
|
171
|
+
id: ID!
|
|
172
|
+
|
|
173
|
+
"""User who owns this subscription"""
|
|
174
|
+
userId: String!
|
|
175
|
+
|
|
176
|
+
"""Extension being subscribed to"""
|
|
177
|
+
extensionSlug: String!
|
|
178
|
+
|
|
179
|
+
"""Current pricing tier"""
|
|
180
|
+
tierId: String!
|
|
181
|
+
|
|
182
|
+
"""Subscription status"""
|
|
183
|
+
status: ExtensionSubscriptionStatus!
|
|
184
|
+
|
|
185
|
+
"""Current billing period start"""
|
|
186
|
+
currentPeriodStart: DateTime!
|
|
187
|
+
|
|
188
|
+
"""Current billing period end"""
|
|
189
|
+
currentPeriodEnd: DateTime!
|
|
190
|
+
|
|
191
|
+
"""Next billing date"""
|
|
192
|
+
nextBillingDate: DateTime
|
|
193
|
+
|
|
194
|
+
"""Trial end date (if in trial)"""
|
|
195
|
+
trialEndDate: DateTime
|
|
196
|
+
|
|
197
|
+
"""Whether subscription will auto-renew"""
|
|
198
|
+
autoRenew: Boolean!
|
|
199
|
+
|
|
200
|
+
"""Subscription metadata"""
|
|
201
|
+
metadata: String
|
|
202
|
+
|
|
203
|
+
"""Payment method ID"""
|
|
204
|
+
paymentMethodId: String
|
|
205
|
+
|
|
206
|
+
"""Latest invoice ID"""
|
|
207
|
+
latestInvoiceId: String
|
|
208
|
+
|
|
209
|
+
"""Subscription created date"""
|
|
210
|
+
createdAt: DateTime!
|
|
211
|
+
|
|
212
|
+
"""Subscription last updated"""
|
|
213
|
+
updatedAt: DateTime!
|
|
214
|
+
|
|
215
|
+
"""Usage data for current billing period"""
|
|
216
|
+
currentUsage: [ExtensionUsageData!]
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
enum ExtensionSubscriptionStatus {
|
|
220
|
+
"""Active subscription"""
|
|
221
|
+
ACTIVE
|
|
222
|
+
|
|
223
|
+
"""In trial period"""
|
|
224
|
+
TRIALING
|
|
225
|
+
|
|
226
|
+
"""Past due payment"""
|
|
227
|
+
PAST_DUE
|
|
228
|
+
|
|
229
|
+
"""Canceled but still active until period end"""
|
|
230
|
+
CANCELED
|
|
231
|
+
|
|
232
|
+
"""Unpaid and access revoked"""
|
|
233
|
+
UNPAID
|
|
234
|
+
|
|
235
|
+
"""Paused subscription"""
|
|
236
|
+
PAUSED
|
|
237
|
+
|
|
238
|
+
"""Incomplete setup"""
|
|
239
|
+
INCOMPLETE
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
type ExtensionUsageData {
|
|
243
|
+
"""Usage metric name"""
|
|
244
|
+
metricName: String!
|
|
245
|
+
|
|
246
|
+
"""Current usage amount"""
|
|
247
|
+
currentUsage: Int!
|
|
248
|
+
|
|
249
|
+
"""Usage limit for current plan"""
|
|
250
|
+
limit: Int
|
|
251
|
+
|
|
252
|
+
"""Percentage of limit used"""
|
|
253
|
+
usagePercentage: Float!
|
|
254
|
+
|
|
255
|
+
"""Whether usage has exceeded limit"""
|
|
256
|
+
isOverLimit: Boolean!
|
|
257
|
+
|
|
258
|
+
"""Overage amount"""
|
|
259
|
+
overage: Int
|
|
260
|
+
|
|
261
|
+
"""Last updated timestamp"""
|
|
262
|
+
lastUpdated: DateTime!
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
type ExtensionRevenue {
|
|
266
|
+
"""Extension identifier"""
|
|
267
|
+
extensionSlug: String!
|
|
268
|
+
|
|
269
|
+
"""Time period for revenue calculation"""
|
|
270
|
+
period: String!
|
|
271
|
+
|
|
272
|
+
"""Total revenue in cents"""
|
|
273
|
+
totalRevenue: Int!
|
|
274
|
+
|
|
275
|
+
"""Currency"""
|
|
276
|
+
currency: String!
|
|
277
|
+
|
|
278
|
+
"""Number of active subscriptions"""
|
|
279
|
+
activeSubscriptions: Int!
|
|
280
|
+
|
|
281
|
+
"""Revenue by pricing tier"""
|
|
282
|
+
revenueByTier: [TierRevenue!]!
|
|
283
|
+
|
|
284
|
+
"""Monthly recurring revenue (MRR)"""
|
|
285
|
+
mrr: Int!
|
|
286
|
+
|
|
287
|
+
"""Annual recurring revenue (ARR)"""
|
|
288
|
+
arr: Int!
|
|
289
|
+
|
|
290
|
+
"""Revenue growth percentage"""
|
|
291
|
+
growthRate: Float
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
type TierRevenue {
|
|
295
|
+
"""Pricing tier ID"""
|
|
296
|
+
tierId: String!
|
|
297
|
+
|
|
298
|
+
"""Tier name"""
|
|
299
|
+
tierName: String!
|
|
300
|
+
|
|
301
|
+
"""Revenue from this tier"""
|
|
302
|
+
revenue: Int!
|
|
303
|
+
|
|
304
|
+
"""Subscriber count"""
|
|
305
|
+
subscriberCount: Int!
|
|
306
|
+
|
|
307
|
+
"""Average revenue per user"""
|
|
308
|
+
arpu: Float!
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
# Input Types
|
|
312
|
+
input CreateExtensionPricingInput {
|
|
313
|
+
"""Extension slug"""
|
|
314
|
+
extensionSlug: String!
|
|
315
|
+
|
|
316
|
+
"""Pricing model"""
|
|
317
|
+
model: ExtensionPricingModel!
|
|
318
|
+
|
|
319
|
+
"""Pricing tiers"""
|
|
320
|
+
tiers: [CreateExtensionPricingTierInput!]!
|
|
321
|
+
|
|
322
|
+
"""Trial configuration"""
|
|
323
|
+
trialType: ExtensionTrialType!
|
|
324
|
+
trialDurationDays: Int
|
|
325
|
+
|
|
326
|
+
"""Free tier settings"""
|
|
327
|
+
hasFreeTier: Boolean!
|
|
328
|
+
freeTierLimitations: String
|
|
329
|
+
|
|
330
|
+
"""Setup fee"""
|
|
331
|
+
setupFeeInCents: Int
|
|
332
|
+
|
|
333
|
+
"""Currency"""
|
|
334
|
+
currency: String! = "USD"
|
|
335
|
+
|
|
336
|
+
"""Supported payment methods"""
|
|
337
|
+
supportedPaymentMethods: [String!]!
|
|
338
|
+
|
|
339
|
+
"""Billing configuration"""
|
|
340
|
+
billingConfig: CreateExtensionBillingConfigInput
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
input CreateExtensionPricingTierInput {
|
|
344
|
+
"""Tier name"""
|
|
345
|
+
name: String!
|
|
346
|
+
|
|
347
|
+
"""Description"""
|
|
348
|
+
description: String
|
|
349
|
+
|
|
350
|
+
"""Price in cents"""
|
|
351
|
+
priceInCents: Int!
|
|
352
|
+
|
|
353
|
+
"""Subscription interval"""
|
|
354
|
+
interval: ExtensionSubscriptionInterval
|
|
355
|
+
|
|
356
|
+
"""Features list"""
|
|
357
|
+
features: [String!]!
|
|
358
|
+
|
|
359
|
+
"""Resource limits"""
|
|
360
|
+
maxUsers: Int
|
|
361
|
+
rateLimit: Int
|
|
362
|
+
storageLimit: Int
|
|
363
|
+
|
|
364
|
+
"""Display settings"""
|
|
365
|
+
isRecommended: Boolean! = false
|
|
366
|
+
isActive: Boolean! = true
|
|
367
|
+
sortOrder: Int!
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
input CreateExtensionBillingConfigInput {
|
|
371
|
+
"""Annual discount percentage"""
|
|
372
|
+
annualDiscountPercent: Float
|
|
373
|
+
|
|
374
|
+
"""Proration enabled"""
|
|
375
|
+
enableProration: Boolean! = true
|
|
376
|
+
|
|
377
|
+
"""Grace period for failed payments"""
|
|
378
|
+
gracePeriodDays: Int! = 3
|
|
379
|
+
|
|
380
|
+
"""Auto-renewal"""
|
|
381
|
+
autoRenewal: Boolean! = true
|
|
382
|
+
|
|
383
|
+
"""Usage metrics"""
|
|
384
|
+
usageMetrics: [CreateExtensionUsageMetricInput!]
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
input CreateExtensionUsageMetricInput {
|
|
388
|
+
"""Metric name"""
|
|
389
|
+
name: String!
|
|
390
|
+
|
|
391
|
+
"""Display name"""
|
|
392
|
+
displayName: String!
|
|
393
|
+
|
|
394
|
+
"""Unit"""
|
|
395
|
+
unit: String!
|
|
396
|
+
|
|
397
|
+
"""Price per unit"""
|
|
398
|
+
pricePerUnit: Int!
|
|
399
|
+
|
|
400
|
+
"""Free tier limit"""
|
|
401
|
+
freeTierLimit: Int
|
|
402
|
+
|
|
403
|
+
"""Allow overage"""
|
|
404
|
+
allowOverage: Boolean! = true
|
|
405
|
+
|
|
406
|
+
"""Overage price"""
|
|
407
|
+
overagePricePerUnit: Int
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
input UpdateExtensionPricingInput {
|
|
411
|
+
"""Pricing model"""
|
|
412
|
+
model: ExtensionPricingModel
|
|
413
|
+
|
|
414
|
+
"""Trial settings"""
|
|
415
|
+
trialType: ExtensionTrialType
|
|
416
|
+
trialDurationDays: Int
|
|
417
|
+
|
|
418
|
+
"""Free tier settings"""
|
|
419
|
+
hasFreeTier: Boolean
|
|
420
|
+
freeTierLimitations: String
|
|
421
|
+
|
|
422
|
+
"""Setup fee"""
|
|
423
|
+
setupFeeInCents: Int
|
|
424
|
+
|
|
425
|
+
"""Supported payment methods"""
|
|
426
|
+
supportedPaymentMethods: [String!]
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
input SubscribeToExtensionInput {
|
|
430
|
+
"""Extension to subscribe to"""
|
|
431
|
+
extensionSlug: String!
|
|
432
|
+
|
|
433
|
+
"""Pricing tier to subscribe to"""
|
|
434
|
+
tierId: String!
|
|
435
|
+
|
|
436
|
+
"""Payment method ID"""
|
|
437
|
+
paymentMethodId: String!
|
|
438
|
+
|
|
439
|
+
"""Trial settings"""
|
|
440
|
+
skipTrial: Boolean = false
|
|
441
|
+
|
|
442
|
+
"""Subscription metadata"""
|
|
443
|
+
metadata: String
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
input UpdateExtensionSubscriptionInput {
|
|
447
|
+
"""Subscription ID"""
|
|
448
|
+
subscriptionId: ID!
|
|
449
|
+
|
|
450
|
+
"""New tier ID (for upgrades/downgrades)"""
|
|
451
|
+
newTierId: String
|
|
452
|
+
|
|
453
|
+
"""Auto-renewal setting"""
|
|
454
|
+
autoRenew: Boolean
|
|
455
|
+
|
|
456
|
+
"""Payment method ID"""
|
|
457
|
+
paymentMethodId: String
|
|
458
|
+
|
|
459
|
+
"""Metadata"""
|
|
460
|
+
metadata: String
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
input CancelExtensionSubscriptionInput {
|
|
464
|
+
"""Subscription ID to cancel"""
|
|
465
|
+
subscriptionId: ID!
|
|
466
|
+
|
|
467
|
+
"""Cancel immediately or at period end"""
|
|
468
|
+
cancelAtPeriodEnd: Boolean! = true
|
|
469
|
+
|
|
470
|
+
"""Cancellation reason"""
|
|
471
|
+
reason: String
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
# Query and Mutation extensions
|
|
475
|
+
extend type Query {
|
|
476
|
+
"""Get pricing for an extension"""
|
|
477
|
+
extensionPricing(extensionSlug: String!): ExtensionPricing
|
|
478
|
+
|
|
479
|
+
"""Get all extension subscriptions for current user"""
|
|
480
|
+
myExtensionSubscriptions(status: ExtensionSubscriptionStatus): [ExtensionSubscription!]!
|
|
481
|
+
|
|
482
|
+
"""Get specific extension subscription"""
|
|
483
|
+
extensionSubscription(subscriptionId: ID!): ExtensionSubscription
|
|
484
|
+
|
|
485
|
+
"""Get extension usage data"""
|
|
486
|
+
extensionUsage(extensionSlug: String!, period: String): [ExtensionUsageData!]!
|
|
487
|
+
|
|
488
|
+
"""Get extension revenue analytics (publisher only)"""
|
|
489
|
+
extensionRevenue(extensionSlug: String!, period: String!): ExtensionRevenue
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
extend type Mutation {
|
|
493
|
+
"""Create pricing for an extension (publisher only)"""
|
|
494
|
+
createExtensionPricing(input: CreateExtensionPricingInput!): ExtensionPricing!
|
|
495
|
+
|
|
496
|
+
"""Update extension pricing (publisher only)"""
|
|
497
|
+
updateExtensionPricing(extensionSlug: String!, input: UpdateExtensionPricingInput!): ExtensionPricing!
|
|
498
|
+
|
|
499
|
+
"""Subscribe to an extension"""
|
|
500
|
+
subscribeToExtension(input: SubscribeToExtensionInput!): ExtensionSubscription!
|
|
501
|
+
|
|
502
|
+
"""Update extension subscription"""
|
|
503
|
+
updateExtensionSubscription(input: UpdateExtensionSubscriptionInput!): ExtensionSubscription!
|
|
504
|
+
|
|
505
|
+
"""Cancel extension subscription"""
|
|
506
|
+
cancelExtensionSubscription(input: CancelExtensionSubscriptionInput!): ExtensionSubscription!
|
|
507
|
+
|
|
508
|
+
"""Report extension usage (for usage-based billing)"""
|
|
509
|
+
reportExtensionUsage(extensionSlug: String!, metricName: String!, usage: Int!): Boolean!
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
extend type Subscription {
|
|
513
|
+
"""Subscribe to extension subscription events"""
|
|
514
|
+
extensionSubscriptionEvents(userId: String): ExtensionSubscriptionEvent!
|
|
515
|
+
|
|
516
|
+
"""Subscribe to extension usage events"""
|
|
517
|
+
extensionUsageEvents(extensionSlug: String!): ExtensionUsageEvent!
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
type ExtensionSubscriptionEvent {
|
|
521
|
+
"""Event type"""
|
|
522
|
+
eventType: String!
|
|
523
|
+
|
|
524
|
+
"""Subscription data"""
|
|
525
|
+
subscription: ExtensionSubscription!
|
|
526
|
+
|
|
527
|
+
"""Event timestamp"""
|
|
528
|
+
timestamp: DateTime!
|
|
529
|
+
|
|
530
|
+
"""Event metadata"""
|
|
531
|
+
metadata: String
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
type ExtensionUsageEvent {
|
|
535
|
+
"""Event type"""
|
|
536
|
+
eventType: String!
|
|
537
|
+
|
|
538
|
+
"""Extension slug"""
|
|
539
|
+
extensionSlug: String!
|
|
540
|
+
|
|
541
|
+
"""Usage data"""
|
|
542
|
+
usage: ExtensionUsageData!
|
|
543
|
+
|
|
544
|
+
"""Event timestamp"""
|
|
545
|
+
timestamp: DateTime!
|
|
546
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var extensionPricingSchema = "\"\"\"\nExtension pricing and subscription models for the marketplace\n\"\"\"\n\nenum ExtensionPricingModel {\n \"\"\"Extension is completely free\"\"\"\n FREE\n \n \"\"\"One-time purchase\"\"\"\n ONE_TIME\n \n \"\"\"Recurring subscription\"\"\"\n SUBSCRIPTION\n \n \"\"\"Usage-based pricing\"\"\"\n USAGE_BASED\n \n \"\"\"Freemium model with paid features\"\"\"\n FREEMIUM\n}\n\nenum ExtensionSubscriptionInterval {\n \"\"\"Monthly subscription\"\"\"\n MONTHLY\n \n \"\"\"Quarterly subscription\"\"\" \n QUARTERLY\n \n \"\"\"Yearly subscription\"\"\"\n YEARLY\n}\n\nenum ExtensionTrialType {\n \"\"\"No trial period\"\"\"\n NONE\n \n \"\"\"Free trial with full features\"\"\"\n FREE_TRIAL\n \n \"\"\"Free trial with limited features\"\"\"\n LIMITED_TRIAL\n}\n\ntype ExtensionPricingTier {\n \"\"\"Unique identifier for the pricing tier\"\"\"\n id: ID!\n \n \"\"\"Name of the pricing tier (e.g., Basic, Pro, Enterprise)\"\"\"\n name: String!\n \n \"\"\"Description of what's included in this tier\"\"\"\n description: String\n \n \"\"\"Price in cents (USD)\"\"\"\n priceInCents: Int!\n \n \"\"\"Currency code (e.g., USD, EUR)\"\"\"\n currency: String!\n \n \"\"\"Subscription interval for recurring payments\"\"\"\n interval: ExtensionSubscriptionInterval\n \n \"\"\"List of features included in this tier\"\"\"\n features: [String!]!\n \n \"\"\"Maximum number of users/seats for this tier\"\"\"\n maxUsers: Int\n \n \"\"\"API rate limits for this tier\"\"\"\n rateLimit: Int\n \n \"\"\"Storage limits in GB\"\"\"\n storageLimit: Int\n \n \"\"\"Whether this is the recommended tier\"\"\"\n isRecommended: Boolean!\n \n \"\"\"Whether this tier is currently available\"\"\"\n isActive: Boolean!\n \n \"\"\"Sort order for displaying tiers\"\"\"\n sortOrder: Int!\n}\n\ntype ExtensionPricing {\n \"\"\"Unique identifier for the pricing configuration\"\"\"\n id: ID!\n \n \"\"\"Extension this pricing belongs to\"\"\"\n extensionSlug: String!\n \n \"\"\"Pricing model type\"\"\"\n model: ExtensionPricingModel!\n \n \"\"\"Available pricing tiers\"\"\"\n tiers: [ExtensionPricingTier!]!\n \n \"\"\"Trial configuration\"\"\"\n trialType: ExtensionTrialType!\n \n \"\"\"Trial duration in days\"\"\"\n trialDurationDays: Int\n \n \"\"\"Whether the extension offers a free tier\"\"\"\n hasFreeTier: Boolean!\n \n \"\"\"Free tier limitations\"\"\"\n freeTierLimitations: String\n \n \"\"\"Setup fee in cents (one-time)\"\"\"\n setupFeeInCents: Int\n \n \"\"\"Currency for pricing\"\"\"\n currency: String!\n \n \"\"\"Supported payment methods\"\"\"\n supportedPaymentMethods: [String!]!\n \n \"\"\"Billing configuration\"\"\"\n billingConfig: ExtensionBillingConfig\n \n \"\"\"When this pricing was created\"\"\"\n createdAt: DateTime!\n \n \"\"\"When this pricing was last updated\"\"\"\n updatedAt: DateTime!\n}\n\ntype ExtensionBillingConfig {\n \"\"\"Allow annual discount\"\"\"\n annualDiscountPercent: Float\n \n \"\"\"Proration settings\"\"\"\n enableProration: Boolean!\n \n \"\"\"Grace period for failed payments (days)\"\"\"\n gracePeriodDays: Int!\n \n \"\"\"Auto-renewal settings\"\"\"\n autoRenewal: Boolean!\n \n \"\"\"Usage billing settings\"\"\"\n usageMetrics: [ExtensionUsageMetric!]\n}\n\ntype ExtensionUsageMetric {\n \"\"\"Metric identifier (e.g., api_calls, storage_gb, users)\"\"\"\n name: String!\n \n \"\"\"Display name for the metric\"\"\"\n displayName: String!\n \n \"\"\"Unit of measurement\"\"\"\n unit: String!\n \n \"\"\"Price per unit in cents\"\"\"\n pricePerUnit: Int!\n \n \"\"\"Free tier allowance\"\"\"\n freeTierLimit: Int\n \n \"\"\"Whether usage can exceed the plan limit\"\"\"\n allowOverage: Boolean!\n \n \"\"\"Overage price per unit in cents\"\"\"\n overagePricePerUnit: Int\n}\n\ntype ExtensionSubscription {\n \"\"\"Unique subscription identifier\"\"\"\n id: ID!\n \n \"\"\"User who owns this subscription\"\"\"\n userId: String!\n \n \"\"\"Extension being subscribed to\"\"\"\n extensionSlug: String!\n \n \"\"\"Current pricing tier\"\"\"\n tierId: String!\n \n \"\"\"Subscription status\"\"\"\n status: ExtensionSubscriptionStatus!\n \n \"\"\"Current billing period start\"\"\"\n currentPeriodStart: DateTime!\n \n \"\"\"Current billing period end\"\"\"\n currentPeriodEnd: DateTime!\n \n \"\"\"Next billing date\"\"\"\n nextBillingDate: DateTime\n \n \"\"\"Trial end date (if in trial)\"\"\"\n trialEndDate: DateTime\n \n \"\"\"Whether subscription will auto-renew\"\"\"\n autoRenew: Boolean!\n \n \"\"\"Subscription metadata\"\"\"\n metadata: String\n \n \"\"\"Payment method ID\"\"\"\n paymentMethodId: String\n \n \"\"\"Latest invoice ID\"\"\"\n latestInvoiceId: String\n \n \"\"\"Subscription created date\"\"\"\n createdAt: DateTime!\n \n \"\"\"Subscription last updated\"\"\"\n updatedAt: DateTime!\n \n \"\"\"Usage data for current billing period\"\"\"\n currentUsage: [ExtensionUsageData!]\n}\n\nenum ExtensionSubscriptionStatus {\n \"\"\"Active subscription\"\"\"\n ACTIVE\n \n \"\"\"In trial period\"\"\"\n TRIALING\n \n \"\"\"Past due payment\"\"\"\n PAST_DUE\n \n \"\"\"Canceled but still active until period end\"\"\"\n CANCELED\n \n \"\"\"Unpaid and access revoked\"\"\"\n UNPAID\n \n \"\"\"Paused subscription\"\"\"\n PAUSED\n \n \"\"\"Incomplete setup\"\"\"\n INCOMPLETE\n}\n\ntype ExtensionUsageData {\n \"\"\"Usage metric name\"\"\"\n metricName: String!\n \n \"\"\"Current usage amount\"\"\"\n currentUsage: Int!\n \n \"\"\"Usage limit for current plan\"\"\"\n limit: Int\n \n \"\"\"Percentage of limit used\"\"\"\n usagePercentage: Float!\n \n \"\"\"Whether usage has exceeded limit\"\"\"\n isOverLimit: Boolean!\n \n \"\"\"Overage amount\"\"\"\n overage: Int\n \n \"\"\"Last updated timestamp\"\"\"\n lastUpdated: DateTime!\n}\n\ntype ExtensionRevenue {\n \"\"\"Extension identifier\"\"\"\n extensionSlug: String!\n \n \"\"\"Time period for revenue calculation\"\"\"\n period: String!\n \n \"\"\"Total revenue in cents\"\"\"\n totalRevenue: Int!\n \n \"\"\"Currency\"\"\"\n currency: String!\n \n \"\"\"Number of active subscriptions\"\"\"\n activeSubscriptions: Int!\n \n \"\"\"Revenue by pricing tier\"\"\"\n revenueByTier: [TierRevenue!]!\n \n \"\"\"Monthly recurring revenue (MRR)\"\"\"\n mrr: Int!\n \n \"\"\"Annual recurring revenue (ARR)\"\"\" \n arr: Int!\n \n \"\"\"Revenue growth percentage\"\"\"\n growthRate: Float\n}\n\ntype TierRevenue {\n \"\"\"Pricing tier ID\"\"\"\n tierId: String!\n \n \"\"\"Tier name\"\"\"\n tierName: String!\n \n \"\"\"Revenue from this tier\"\"\"\n revenue: Int!\n \n \"\"\"Subscriber count\"\"\"\n subscriberCount: Int!\n \n \"\"\"Average revenue per user\"\"\"\n arpu: Float!\n}\n\n# Input Types\ninput CreateExtensionPricingInput {\n \"\"\"Extension slug\"\"\"\n extensionSlug: String!\n \n \"\"\"Pricing model\"\"\"\n model: ExtensionPricingModel!\n \n \"\"\"Pricing tiers\"\"\"\n tiers: [CreateExtensionPricingTierInput!]!\n \n \"\"\"Trial configuration\"\"\"\n trialType: ExtensionTrialType!\n trialDurationDays: Int\n \n \"\"\"Free tier settings\"\"\"\n hasFreeTier: Boolean!\n freeTierLimitations: String\n \n \"\"\"Setup fee\"\"\"\n setupFeeInCents: Int\n \n \"\"\"Currency\"\"\"\n currency: String! = \"USD\"\n \n \"\"\"Supported payment methods\"\"\"\n supportedPaymentMethods: [String!]!\n \n \"\"\"Billing configuration\"\"\"\n billingConfig: CreateExtensionBillingConfigInput\n}\n\ninput CreateExtensionPricingTierInput {\n \"\"\"Tier name\"\"\"\n name: String!\n \n \"\"\"Description\"\"\"\n description: String\n \n \"\"\"Price in cents\"\"\"\n priceInCents: Int!\n \n \"\"\"Subscription interval\"\"\"\n interval: ExtensionSubscriptionInterval\n \n \"\"\"Features list\"\"\"\n features: [String!]!\n \n \"\"\"Resource limits\"\"\"\n maxUsers: Int\n rateLimit: Int\n storageLimit: Int\n \n \"\"\"Display settings\"\"\"\n isRecommended: Boolean! = false\n isActive: Boolean! = true\n sortOrder: Int!\n}\n\ninput CreateExtensionBillingConfigInput {\n \"\"\"Annual discount percentage\"\"\"\n annualDiscountPercent: Float\n \n \"\"\"Proration enabled\"\"\"\n enableProration: Boolean! = true\n \n \"\"\"Grace period for failed payments\"\"\"\n gracePeriodDays: Int! = 3\n \n \"\"\"Auto-renewal\"\"\"\n autoRenewal: Boolean! = true\n \n \"\"\"Usage metrics\"\"\"\n usageMetrics: [CreateExtensionUsageMetricInput!]\n}\n\ninput CreateExtensionUsageMetricInput {\n \"\"\"Metric name\"\"\"\n name: String!\n \n \"\"\"Display name\"\"\"\n displayName: String!\n \n \"\"\"Unit\"\"\"\n unit: String!\n \n \"\"\"Price per unit\"\"\"\n pricePerUnit: Int!\n \n \"\"\"Free tier limit\"\"\"\n freeTierLimit: Int\n \n \"\"\"Allow overage\"\"\"\n allowOverage: Boolean! = true\n \n \"\"\"Overage price\"\"\"\n overagePricePerUnit: Int\n}\n\ninput UpdateExtensionPricingInput {\n \"\"\"Pricing model\"\"\"\n model: ExtensionPricingModel\n \n \"\"\"Trial settings\"\"\"\n trialType: ExtensionTrialType\n trialDurationDays: Int\n \n \"\"\"Free tier settings\"\"\"\n hasFreeTier: Boolean\n freeTierLimitations: String\n \n \"\"\"Setup fee\"\"\"\n setupFeeInCents: Int\n \n \"\"\"Supported payment methods\"\"\"\n supportedPaymentMethods: [String!]\n}\n\ninput SubscribeToExtensionInput {\n \"\"\"Extension to subscribe to\"\"\"\n extensionSlug: String!\n \n \"\"\"Pricing tier to subscribe to\"\"\"\n tierId: String!\n \n \"\"\"Payment method ID\"\"\"\n paymentMethodId: String!\n \n \"\"\"Trial settings\"\"\"\n skipTrial: Boolean = false\n \n \"\"\"Subscription metadata\"\"\"\n metadata: String\n}\n\ninput UpdateExtensionSubscriptionInput {\n \"\"\"Subscription ID\"\"\"\n subscriptionId: ID!\n \n \"\"\"New tier ID (for upgrades/downgrades)\"\"\"\n newTierId: String\n \n \"\"\"Auto-renewal setting\"\"\"\n autoRenew: Boolean\n \n \"\"\"Payment method ID\"\"\"\n paymentMethodId: String\n \n \"\"\"Metadata\"\"\"\n metadata: String\n}\n\ninput CancelExtensionSubscriptionInput {\n \"\"\"Subscription ID to cancel\"\"\"\n subscriptionId: ID!\n \n \"\"\"Cancel immediately or at period end\"\"\"\n cancelAtPeriodEnd: Boolean! = true\n \n \"\"\"Cancellation reason\"\"\"\n reason: String\n}\n\n# Query and Mutation extensions\nextend type Query {\n \"\"\"Get pricing for an extension\"\"\"\n extensionPricing(extensionSlug: String!): ExtensionPricing\n \n \"\"\"Get all extension subscriptions for current user\"\"\"\n myExtensionSubscriptions(status: ExtensionSubscriptionStatus): [ExtensionSubscription!]!\n \n \"\"\"Get specific extension subscription\"\"\"\n extensionSubscription(subscriptionId: ID!): ExtensionSubscription\n \n \"\"\"Get extension usage data\"\"\"\n extensionUsage(extensionSlug: String!, period: String): [ExtensionUsageData!]!\n \n \"\"\"Get extension revenue analytics (publisher only)\"\"\"\n extensionRevenue(extensionSlug: String!, period: String!): ExtensionRevenue\n}\n\nextend type Mutation {\n \"\"\"Create pricing for an extension (publisher only)\"\"\"\n createExtensionPricing(input: CreateExtensionPricingInput!): ExtensionPricing!\n \n \"\"\"Update extension pricing (publisher only)\"\"\"\n updateExtensionPricing(extensionSlug: String!, input: UpdateExtensionPricingInput!): ExtensionPricing!\n \n \"\"\"Subscribe to an extension\"\"\"\n subscribeToExtension(input: SubscribeToExtensionInput!): ExtensionSubscription!\n \n \"\"\"Update extension subscription\"\"\"\n updateExtensionSubscription(input: UpdateExtensionSubscriptionInput!): ExtensionSubscription!\n \n \"\"\"Cancel extension subscription\"\"\"\n cancelExtensionSubscription(input: CancelExtensionSubscriptionInput!): ExtensionSubscription!\n \n \"\"\"Report extension usage (for usage-based billing)\"\"\"\n reportExtensionUsage(extensionSlug: String!, metricName: String!, usage: Int!): Boolean!\n}\n\nextend type Subscription {\n \"\"\"Subscribe to extension subscription events\"\"\"\n extensionSubscriptionEvents(userId: String): ExtensionSubscriptionEvent!\n \n \"\"\"Subscribe to extension usage events\"\"\"\n extensionUsageEvents(extensionSlug: String!): ExtensionUsageEvent!\n}\n\ntype ExtensionSubscriptionEvent {\n \"\"\"Event type\"\"\"\n eventType: String!\n \n \"\"\"Subscription data\"\"\"\n subscription: ExtensionSubscription!\n \n \"\"\"Event timestamp\"\"\"\n timestamp: DateTime!\n \n \"\"\"Event metadata\"\"\"\n metadata: String\n}\n\ntype ExtensionUsageEvent {\n \"\"\"Event type\"\"\"\n eventType: String!\n \n \"\"\"Extension slug\"\"\"\n extensionSlug: String!\n \n \"\"\"Usage data\"\"\"\n usage: ExtensionUsageData!\n \n \"\"\"Event timestamp\"\"\"\n timestamp: DateTime!\n}\n";export{extensionPricingSchema as default};//# sourceMappingURL=extension-pricing.graphql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-pricing.graphql.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
|
|
2
|
+
# Form submission and validation types for marketplace operations
|
|
3
|
+
input MarketplaceFormSubmissionInput {
|
|
4
|
+
extensionSlug: String!
|
|
5
|
+
formData: String! # JSON stringified form data
|
|
6
|
+
submissionType: String! # e.g., "extension-publish", "extension-validate"
|
|
7
|
+
metadata: String # Optional metadata JSON
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type MarketplaceFormSubmissionResult {
|
|
11
|
+
success: Boolean!
|
|
12
|
+
message: String
|
|
13
|
+
errors: [String!]
|
|
14
|
+
submissionId: String
|
|
15
|
+
data: String # JSON stringified result data
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
input MarketplaceValidateExtensionInput {
|
|
19
|
+
manifest: String!
|
|
20
|
+
bundle: String
|
|
21
|
+
sourceMap: String
|
|
22
|
+
extensionSlug: String
|
|
23
|
+
version: String
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type MarketplaceValidationError {
|
|
27
|
+
field: String!
|
|
28
|
+
message: String!
|
|
29
|
+
code: String
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type MarketplaceValidationResult {
|
|
33
|
+
isValid: Boolean!
|
|
34
|
+
errors: [MarketplaceValidationError!]
|
|
35
|
+
warnings: [MarketplaceValidationError!]
|
|
36
|
+
metadata: String # JSON stringified validation metadata
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
input MarketplacePublishExtensionInput {
|
|
40
|
+
extensionSlug: String!
|
|
41
|
+
manifest: String!
|
|
42
|
+
bundle: String!
|
|
43
|
+
sourceMap: String
|
|
44
|
+
version: String!
|
|
45
|
+
releaseNotes: String
|
|
46
|
+
force: Boolean
|
|
47
|
+
preRelease: Boolean
|
|
48
|
+
sourceCollection: ExtensionSourceCollection
|
|
49
|
+
sourceDocumentId: String
|
|
50
|
+
metadata: JSON
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type MarketplacePublishExtensionResult {
|
|
54
|
+
success: Boolean!
|
|
55
|
+
extension: RegistryExtension
|
|
56
|
+
message: String
|
|
57
|
+
errors: [String!]
|
|
58
|
+
releaseId: String
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
"""
|
|
62
|
+
Marketplace-specific registry statistics with publisher and marketplace data
|
|
63
|
+
"""
|
|
64
|
+
type MarketplaceRegistryStats {
|
|
65
|
+
totalExtensions: Int!
|
|
66
|
+
totalPublishers: Int!
|
|
67
|
+
extensionsByStatus: ExtensionRegistryStatusStats!
|
|
68
|
+
recentPublications: [RegistryExtension!]
|
|
69
|
+
topPublishers: [PublisherStats!]
|
|
70
|
+
totalDownloads: Int!
|
|
71
|
+
monthlyDownloads: Int!
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
type PublisherStats {
|
|
75
|
+
"""The marketplace publisher information."""
|
|
76
|
+
publisher: MarketplacePublisher!
|
|
77
|
+
extensionCount: Int!
|
|
78
|
+
totalDownloads: Int!
|
|
79
|
+
monthlyDownloads: Int!
|
|
80
|
+
averageRating: Float
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
extend type Query {
|
|
84
|
+
"""
|
|
85
|
+
Get marketplace-specific registry statistics
|
|
86
|
+
Includes publisher data and marketplace metrics
|
|
87
|
+
"""
|
|
88
|
+
marketplaceRegistryStats: MarketplaceRegistryStats
|
|
89
|
+
|
|
90
|
+
"""
|
|
91
|
+
Get extensions by publisher for marketplace management
|
|
92
|
+
"""
|
|
93
|
+
extensionsByPublisher(publisherId: String!, first: Int): RegistryExtensionConnection!
|
|
94
|
+
|
|
95
|
+
"""
|
|
96
|
+
Get publisher performance metrics for marketplace analytics
|
|
97
|
+
"""
|
|
98
|
+
publisherExtensionStats(publisherId: String!): PublisherStats
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
extend type Mutation {
|
|
102
|
+
marketplaceFormSubmission(input: MarketplaceFormSubmissionInput!): MarketplaceFormSubmissionResult!
|
|
103
|
+
|
|
104
|
+
marketplaceValidateExtension(input: MarketplaceValidateExtensionInput!): MarketplaceValidationResult!
|
|
105
|
+
|
|
106
|
+
marketplacePublishExtension(input: MarketplacePublishExtensionInput!): MarketplacePublishExtensionResult!
|
|
107
|
+
}
|