@objectstack/spec 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +72 -4
  2. package/dist/ai/cost.zod.d.ts +1 -1
  3. package/dist/ai/devops-agent.zod.d.ts +6 -6
  4. package/dist/ai/index.d.ts +4 -0
  5. package/dist/ai/index.d.ts.map +1 -1
  6. package/dist/ai/index.js +4 -0
  7. package/dist/ai/plugin-development.zod.d.ts +415 -0
  8. package/dist/ai/plugin-development.zod.d.ts.map +1 -0
  9. package/dist/ai/plugin-development.zod.js +576 -0
  10. package/dist/ai/runtime-ops.zod.d.ts +480 -0
  11. package/dist/ai/runtime-ops.zod.d.ts.map +1 -0
  12. package/dist/ai/runtime-ops.zod.js +578 -0
  13. package/dist/api/discovery.zod.d.ts +1 -1
  14. package/dist/api/endpoint.zod.d.ts +2 -2
  15. package/dist/api/hub.zod.d.ts +74 -74
  16. package/dist/api/realtime.zod.d.ts +2 -2
  17. package/dist/api/websocket.zod.d.ts +6 -6
  18. package/dist/automation/trigger-registry.zod.d.ts +6 -6
  19. package/dist/contracts/service-registry.d.ts +1 -1
  20. package/dist/hub/hub-federation.zod.d.ts +4 -4
  21. package/dist/hub/index.d.ts +1 -0
  22. package/dist/hub/index.d.ts.map +1 -1
  23. package/dist/hub/index.js +1 -0
  24. package/dist/hub/license.zod.d.ts +1 -1
  25. package/dist/hub/marketplace-enhanced.zod.d.ts +1028 -0
  26. package/dist/hub/marketplace-enhanced.zod.d.ts.map +1 -0
  27. package/dist/hub/marketplace-enhanced.zod.js +728 -0
  28. package/dist/hub/plugin-registry.zod.d.ts +3 -3
  29. package/dist/hub/plugin-security.zod.d.ts +4 -4
  30. package/dist/hub/space.zod.d.ts +2 -2
  31. package/dist/integration/connector/database.zod.d.ts +1 -1
  32. package/dist/integration/connector/file-storage.zod.d.ts +1 -1
  33. package/dist/integration/connector/github.zod.d.ts +1 -1
  34. package/dist/integration/connector/message-queue.zod.d.ts +1 -1
  35. package/dist/integration/connector/saas.zod.d.ts +3 -3
  36. package/dist/integration/connector/vercel.zod.d.ts +4 -4
  37. package/dist/integration/connector.zod.d.ts +2 -2
  38. package/dist/stack.zod.d.ts +4768 -2542
  39. package/dist/stack.zod.d.ts.map +1 -1
  40. package/dist/stack.zod.js +20 -2
  41. package/dist/system/index.d.ts +3 -0
  42. package/dist/system/index.d.ts.map +1 -1
  43. package/dist/system/index.js +3 -0
  44. package/dist/system/logging.zod.d.ts +5 -0
  45. package/dist/system/logging.zod.d.ts.map +1 -1
  46. package/dist/system/logging.zod.js +2 -1
  47. package/dist/system/notification.zod.d.ts +1 -1
  48. package/dist/system/plugin-lifecycle-advanced.zod.d.ts +357 -0
  49. package/dist/system/plugin-lifecycle-advanced.zod.d.ts.map +1 -0
  50. package/dist/system/plugin-lifecycle-advanced.zod.js +411 -0
  51. package/dist/system/plugin-security-advanced.zod.d.ts +904 -0
  52. package/dist/system/plugin-security-advanced.zod.d.ts.map +1 -0
  53. package/dist/system/plugin-security-advanced.zod.js +606 -0
  54. package/dist/system/plugin-versioning.zod.d.ts +438 -0
  55. package/dist/system/plugin-versioning.zod.d.ts.map +1 -0
  56. package/dist/system/plugin-versioning.zod.js +397 -0
  57. package/json-schema/ai/AICodeReviewResult.json +7 -0
  58. package/json-schema/ai/AIOpsAgentConfig.json +7 -0
  59. package/json-schema/ai/AnomalyDetectionConfig.json +7 -0
  60. package/json-schema/ai/AutoScalingPolicy.json +7 -0
  61. package/json-schema/ai/CodeGenerationRequest.json +7 -0
  62. package/json-schema/ai/GeneratedCode.json +7 -0
  63. package/json-schema/ai/PerformanceOptimization.json +7 -0
  64. package/json-schema/ai/PluginCompositionRequest.json +7 -0
  65. package/json-schema/ai/PluginCompositionResult.json +7 -0
  66. package/json-schema/ai/PluginRecommendation.json +7 -0
  67. package/json-schema/ai/PluginRecommendationRequest.json +7 -0
  68. package/json-schema/ai/PluginScaffoldingTemplate.json +7 -0
  69. package/json-schema/ai/RootCauseAnalysisRequest.json +7 -0
  70. package/json-schema/ai/RootCauseAnalysisResult.json +7 -0
  71. package/json-schema/ai/SelfHealingAction.json +7 -0
  72. package/json-schema/ai/SelfHealingConfig.json +7 -0
  73. package/json-schema/hub/MarketplaceQualityMetrics.json +7 -0
  74. package/json-schema/hub/PluginCategory.json +7 -0
  75. package/json-schema/hub/PluginCertification.json +7 -0
  76. package/json-schema/hub/PluginInstallationRequest.json +7 -0
  77. package/json-schema/hub/PluginInstallationStatus.json +7 -0
  78. package/json-schema/hub/PluginLicense.json +7 -0
  79. package/json-schema/hub/PluginMarketplaceListing.json +7 -0
  80. package/json-schema/hub/PluginRating.json +7 -0
  81. package/json-schema/hub/PluginRevenueSharing.json +7 -0
  82. package/json-schema/hub/PluginSearchQuery.json +7 -0
  83. package/json-schema/hub/PluginTag.json +7 -0
  84. package/json-schema/hub/RegistryConfig.json +7 -0
  85. package/json-schema/hub/RegistrySyncPolicy.json +7 -0
  86. package/json-schema/hub/RegistryUpstream.json +7 -0
  87. package/json-schema/system/AdvancedPluginLifecycleConfig.json +7 -0
  88. package/json-schema/system/BreakingChange.json +7 -0
  89. package/json-schema/system/CompatibilityLevel.json +7 -0
  90. package/json-schema/system/CompatibilityMatrixEntry.json +7 -0
  91. package/json-schema/system/DependencyConflict.json +7 -0
  92. package/json-schema/system/DependencyResolutionResult.json +7 -0
  93. package/json-schema/system/DeprecationNotice.json +7 -0
  94. package/json-schema/system/DistributedStateConfig.json +7 -0
  95. package/json-schema/system/GracefulDegradation.json +7 -0
  96. package/json-schema/system/HotReloadConfig.json +7 -0
  97. package/json-schema/system/MultiVersionSupport.json +7 -0
  98. package/json-schema/system/Permission.json +7 -0
  99. package/json-schema/system/PermissionAction.json +7 -0
  100. package/json-schema/system/PermissionScope.json +7 -0
  101. package/json-schema/system/PermissionSet.json +7 -0
  102. package/json-schema/system/PluginCompatibilityMatrix.json +7 -0
  103. package/json-schema/system/PluginHealthCheck.json +7 -0
  104. package/json-schema/system/PluginHealthReport.json +7 -0
  105. package/json-schema/system/PluginHealthStatus.json +7 -0
  106. package/json-schema/system/PluginSecurityManifest.json +7 -0
  107. package/json-schema/system/PluginStateSnapshot.json +7 -0
  108. package/json-schema/system/PluginTrustLevel.json +7 -0
  109. package/json-schema/system/PluginUpdateStrategy.json +7 -0
  110. package/json-schema/system/PluginVersionMetadata.json +7 -0
  111. package/json-schema/system/ResourceType.json +7 -0
  112. package/json-schema/system/RuntimeConfig.json +7 -0
  113. package/json-schema/system/SandboxConfig.json +7 -0
  114. package/json-schema/system/SecurityPolicy.json +7 -0
  115. package/json-schema/system/SecurityScanResult.json +7 -0
  116. package/json-schema/system/SecurityVulnerability.json +7 -0
  117. package/json-schema/system/SemanticVersion.json +7 -0
  118. package/json-schema/system/VersionConstraint.json +7 -0
  119. package/package.json +1 -1
@@ -0,0 +1,728 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PluginRevenueSharingSchema = exports.PluginInstallationStatusSchema = exports.PluginInstallationRequestSchema = exports.PluginSearchQuerySchema = exports.PluginMarketplaceListingSchema = exports.PluginLicenseSchema = exports.PluginCertificationSchema = exports.MarketplaceQualityMetricsSchema = exports.PluginRatingSchema = exports.PluginTagSchema = exports.PluginCategorySchema = exports.RegistryConfigSchema = exports.RegistryUpstreamSchema = exports.RegistrySyncPolicySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const plugin_security_advanced_zod_1 = require("../system/plugin-security-advanced.zod");
6
+ const plugin_versioning_zod_1 = require("../system/plugin-versioning.zod");
7
+ /**
8
+ * # Enhanced Plugin Registry and Marketplace Protocol
9
+ *
10
+ * Comprehensive protocol for plugin discovery, distribution, installation,
11
+ * and lifecycle management in a centralized marketplace.
12
+ *
13
+ * Features:
14
+ * - Plugin discovery and search
15
+ * - Rating and review system
16
+ * - Quality scoring and certification
17
+ * - Automated installation and updates
18
+ * - License management
19
+ * - Revenue sharing for plugin developers
20
+ * - Registry federation for hybrid cloud deployments
21
+ */
22
+ /**
23
+ * Registry Sync Policy
24
+ * Defines how registries synchronize with upstreams
25
+ */
26
+ exports.RegistrySyncPolicySchema = zod_1.z.enum([
27
+ 'manual', // Manual synchronization only
28
+ 'auto', // Automatic synchronization
29
+ 'proxy', // Proxy requests to upstream without caching
30
+ ]).describe('Registry synchronization strategy');
31
+ /**
32
+ * Registry Upstream Configuration
33
+ * Configuration for upstream registry connection
34
+ */
35
+ exports.RegistryUpstreamSchema = zod_1.z.object({
36
+ /**
37
+ * Upstream registry URL
38
+ */
39
+ url: zod_1.z.string().url()
40
+ .describe('Upstream registry endpoint'),
41
+ /**
42
+ * Synchronization policy
43
+ */
44
+ syncPolicy: exports.RegistrySyncPolicySchema.default('auto'),
45
+ /**
46
+ * Sync interval in seconds (for auto sync)
47
+ */
48
+ syncInterval: zod_1.z.number().int().min(60).optional()
49
+ .describe('Auto-sync interval in seconds'),
50
+ /**
51
+ * Authentication credentials
52
+ */
53
+ auth: zod_1.z.object({
54
+ type: zod_1.z.enum(['none', 'basic', 'bearer', 'api-key', 'oauth2']).default('none'),
55
+ username: zod_1.z.string().optional(),
56
+ password: zod_1.z.string().optional(),
57
+ token: zod_1.z.string().optional(),
58
+ apiKey: zod_1.z.string().optional(),
59
+ }).optional(),
60
+ /**
61
+ * TLS/SSL configuration
62
+ */
63
+ tls: zod_1.z.object({
64
+ enabled: zod_1.z.boolean().default(true),
65
+ verifyCertificate: zod_1.z.boolean().default(true),
66
+ certificate: zod_1.z.string().optional(),
67
+ privateKey: zod_1.z.string().optional(),
68
+ }).optional(),
69
+ /**
70
+ * Timeout settings
71
+ */
72
+ timeout: zod_1.z.number().int().min(1000).default(30000)
73
+ .describe('Request timeout in milliseconds'),
74
+ /**
75
+ * Retry configuration
76
+ */
77
+ retry: zod_1.z.object({
78
+ maxAttempts: zod_1.z.number().int().min(0).default(3),
79
+ backoff: zod_1.z.enum(['fixed', 'linear', 'exponential']).default('exponential'),
80
+ }).optional(),
81
+ });
82
+ /**
83
+ * Registry Configuration
84
+ * Complete registry configuration supporting federation
85
+ */
86
+ exports.RegistryConfigSchema = zod_1.z.object({
87
+ /**
88
+ * Registry type
89
+ */
90
+ type: zod_1.z.enum([
91
+ 'public', // Public marketplace (e.g., plugins.objectstack.com)
92
+ 'private', // Private enterprise registry
93
+ 'hybrid', // Hybrid with upstream federation
94
+ ]).describe('Registry deployment type'),
95
+ /**
96
+ * Upstream registries (for hybrid/private registries)
97
+ */
98
+ upstream: zod_1.z.array(exports.RegistryUpstreamSchema).optional()
99
+ .describe('Upstream registries to sync from or proxy to'),
100
+ /**
101
+ * Scopes managed by this registry
102
+ */
103
+ scope: zod_1.z.array(zod_1.z.string()).optional()
104
+ .describe('npm-style scopes managed by this registry (e.g., @my-corp, @enterprise)'),
105
+ /**
106
+ * Default scope for new plugins
107
+ */
108
+ defaultScope: zod_1.z.string().optional()
109
+ .describe('Default scope prefix for new plugins'),
110
+ /**
111
+ * Registry storage configuration
112
+ */
113
+ storage: zod_1.z.object({
114
+ /**
115
+ * Storage backend type
116
+ */
117
+ backend: zod_1.z.enum(['local', 's3', 'gcs', 'azure-blob', 'oss']).default('local'),
118
+ /**
119
+ * Storage path or bucket name
120
+ */
121
+ path: zod_1.z.string().optional(),
122
+ /**
123
+ * Credentials
124
+ */
125
+ credentials: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
126
+ }).optional(),
127
+ /**
128
+ * Registry visibility
129
+ */
130
+ visibility: zod_1.z.enum(['public', 'private', 'internal']).default('private')
131
+ .describe('Who can access this registry'),
132
+ /**
133
+ * Access control
134
+ */
135
+ accessControl: zod_1.z.object({
136
+ /**
137
+ * Require authentication for read
138
+ */
139
+ requireAuthForRead: zod_1.z.boolean().default(false),
140
+ /**
141
+ * Require authentication for write
142
+ */
143
+ requireAuthForWrite: zod_1.z.boolean().default(true),
144
+ /**
145
+ * Allowed users/teams
146
+ */
147
+ allowedPrincipals: zod_1.z.array(zod_1.z.string()).optional(),
148
+ }).optional(),
149
+ /**
150
+ * Caching configuration
151
+ */
152
+ cache: zod_1.z.object({
153
+ enabled: zod_1.z.boolean().default(true),
154
+ ttl: zod_1.z.number().int().min(0).default(3600)
155
+ .describe('Cache TTL in seconds'),
156
+ maxSize: zod_1.z.number().int().optional()
157
+ .describe('Maximum cache size in bytes'),
158
+ }).optional(),
159
+ /**
160
+ * Mirroring configuration (for high availability)
161
+ */
162
+ mirrors: zod_1.z.array(zod_1.z.object({
163
+ url: zod_1.z.string().url(),
164
+ priority: zod_1.z.number().int().min(1).default(1),
165
+ })).optional()
166
+ .describe('Mirror registries for redundancy'),
167
+ });
168
+ /**
169
+ * Plugin Category
170
+ * Categorization for better discovery
171
+ */
172
+ exports.PluginCategorySchema = zod_1.z.enum([
173
+ 'data-integration', // Data connectors and integrations
174
+ 'analytics', // Analytics and BI tools
175
+ 'ai-ml', // AI and machine learning
176
+ 'automation', // Workflow automation
177
+ 'communication', // Communication tools
178
+ 'crm', // CRM extensions
179
+ 'erp', // ERP extensions
180
+ 'productivity', // Productivity tools
181
+ 'security', // Security tools
182
+ 'ui-components', // UI widgets and components
183
+ 'utilities', // Utility plugins
184
+ 'developer-tools', // Development tools
185
+ 'other', // Other categories
186
+ ]).describe('Plugin category for classification');
187
+ /**
188
+ * Plugin Tag
189
+ * Flexible tagging for discovery
190
+ */
191
+ exports.PluginTagSchema = zod_1.z.object({
192
+ name: zod_1.z.string().describe('Tag name'),
193
+ category: zod_1.z.enum(['feature', 'technology', 'industry', 'custom']).optional(),
194
+ });
195
+ /**
196
+ * Plugin Rating
197
+ * User rating for a plugin
198
+ */
199
+ exports.PluginRatingSchema = zod_1.z.object({
200
+ /**
201
+ * User who rated
202
+ */
203
+ userId: zod_1.z.string(),
204
+ /**
205
+ * Rating value (1-5 stars)
206
+ */
207
+ rating: zod_1.z.number().min(1).max(5),
208
+ /**
209
+ * Optional review text
210
+ */
211
+ review: zod_1.z.string().optional(),
212
+ /**
213
+ * Rating timestamp
214
+ */
215
+ timestamp: zod_1.z.string().datetime(),
216
+ /**
217
+ * Verified purchase
218
+ */
219
+ verifiedPurchase: zod_1.z.boolean().default(false),
220
+ /**
221
+ * Helpful votes
222
+ */
223
+ helpfulVotes: zod_1.z.number().int().min(0).default(0),
224
+ });
225
+ /**
226
+ * Plugin Quality Metrics (Marketplace)
227
+ * Objective quality measurements for marketplace listing
228
+ */
229
+ exports.MarketplaceQualityMetricsSchema = zod_1.z.object({
230
+ /**
231
+ * Code quality score (0-100)
232
+ */
233
+ codeQuality: zod_1.z.number().min(0).max(100).optional(),
234
+ /**
235
+ * Test coverage percentage
236
+ */
237
+ testCoverage: zod_1.z.number().min(0).max(100).optional(),
238
+ /**
239
+ * Documentation completeness (0-100)
240
+ */
241
+ documentation: zod_1.z.number().min(0).max(100).optional(),
242
+ /**
243
+ * Performance score (0-100)
244
+ */
245
+ performance: zod_1.z.number().min(0).max(100).optional(),
246
+ /**
247
+ * Security score (0-100)
248
+ */
249
+ security: zod_1.z.number().min(0).max(100).optional(),
250
+ /**
251
+ * Maintainability index
252
+ */
253
+ maintainability: zod_1.z.number().min(0).max(100).optional(),
254
+ /**
255
+ * Number of open issues
256
+ */
257
+ openIssues: zod_1.z.number().int().min(0).optional(),
258
+ /**
259
+ * Average issue resolution time (hours)
260
+ */
261
+ avgIssueResolutionTime: zod_1.z.number().optional(),
262
+ /**
263
+ * Update frequency (days)
264
+ */
265
+ updateFrequency: zod_1.z.number().optional(),
266
+ /**
267
+ * Last update date
268
+ */
269
+ lastUpdated: zod_1.z.string().datetime().optional(),
270
+ });
271
+ /**
272
+ * Plugin Certification
273
+ * Official certification status
274
+ */
275
+ exports.PluginCertificationSchema = zod_1.z.object({
276
+ /**
277
+ * Certification level
278
+ */
279
+ level: zod_1.z.enum([
280
+ 'verified', // Identity verified
281
+ 'tested', // Passed basic tests
282
+ 'certified', // Full certification
283
+ 'enterprise', // Enterprise-grade certification
284
+ 'partner', // Official partner
285
+ ]),
286
+ /**
287
+ * Certification date
288
+ */
289
+ certifiedDate: zod_1.z.string().datetime(),
290
+ /**
291
+ * Expiry date
292
+ */
293
+ expiryDate: zod_1.z.string().datetime().optional(),
294
+ /**
295
+ * Certification authority
296
+ */
297
+ authority: zod_1.z.string(),
298
+ /**
299
+ * Certificate ID
300
+ */
301
+ certificateId: zod_1.z.string().optional(),
302
+ /**
303
+ * Badge URL
304
+ */
305
+ badgeUrl: zod_1.z.string().url().optional(),
306
+ });
307
+ /**
308
+ * Plugin License
309
+ * Licensing information
310
+ */
311
+ exports.PluginLicenseSchema = zod_1.z.object({
312
+ /**
313
+ * License type
314
+ */
315
+ type: zod_1.z.enum([
316
+ 'free', // Free to use
317
+ 'open-source', // Open source license
318
+ 'freemium', // Free with premium features
319
+ 'trial', // Trial period
320
+ 'subscription', // Subscription-based
321
+ 'perpetual', // One-time purchase
322
+ 'enterprise', // Enterprise licensing
323
+ 'custom', // Custom licensing
324
+ ]),
325
+ /**
326
+ * SPDX license identifier
327
+ */
328
+ spdxId: zod_1.z.string().optional().describe('SPDX license identifier (e.g., MIT, Apache-2.0)'),
329
+ /**
330
+ * License text or URL
331
+ */
332
+ licenseText: zod_1.z.string().optional(),
333
+ /**
334
+ * License URL
335
+ */
336
+ licenseUrl: zod_1.z.string().url().optional(),
337
+ /**
338
+ * Commercial use allowed
339
+ */
340
+ commercialUse: zod_1.z.boolean().default(true),
341
+ /**
342
+ * Attribution required
343
+ */
344
+ attributionRequired: zod_1.z.boolean().default(false),
345
+ /**
346
+ * Pricing information
347
+ */
348
+ pricing: zod_1.z.object({
349
+ /**
350
+ * Free tier available
351
+ */
352
+ freeTier: zod_1.z.boolean().default(false),
353
+ /**
354
+ * Trial period (days)
355
+ */
356
+ trialDays: zod_1.z.number().int().min(0).optional(),
357
+ /**
358
+ * Pricing model
359
+ */
360
+ model: zod_1.z.enum(['free', 'per-user', 'per-tenant', 'usage-based', 'flat-rate']).optional(),
361
+ /**
362
+ * Price per unit (in cents)
363
+ */
364
+ pricePerUnit: zod_1.z.number().int().min(0).optional(),
365
+ /**
366
+ * Billing period
367
+ */
368
+ billingPeriod: zod_1.z.enum(['monthly', 'annually', 'one-time']).optional(),
369
+ /**
370
+ * Currency
371
+ */
372
+ currency: zod_1.z.string().default('USD'),
373
+ }).optional(),
374
+ });
375
+ /**
376
+ * Plugin Marketplace Listing
377
+ * Complete marketplace information for a plugin
378
+ */
379
+ exports.PluginMarketplaceListingSchema = zod_1.z.object({
380
+ /**
381
+ * Plugin identifier
382
+ */
383
+ pluginId: zod_1.z.string(),
384
+ /**
385
+ * Display name
386
+ */
387
+ name: zod_1.z.string(),
388
+ /**
389
+ * Short description (for listings)
390
+ */
391
+ shortDescription: zod_1.z.string().max(200),
392
+ /**
393
+ * Full description (supports markdown)
394
+ */
395
+ description: zod_1.z.string(),
396
+ /**
397
+ * Author/publisher information
398
+ */
399
+ publisher: zod_1.z.object({
400
+ id: zod_1.z.string(),
401
+ name: zod_1.z.string(),
402
+ website: zod_1.z.string().url().optional(),
403
+ email: zod_1.z.string().email().optional(),
404
+ verified: zod_1.z.boolean().default(false),
405
+ }),
406
+ /**
407
+ * Categories
408
+ */
409
+ categories: zod_1.z.array(exports.PluginCategorySchema),
410
+ /**
411
+ * Tags
412
+ */
413
+ tags: zod_1.z.array(exports.PluginTagSchema).optional(),
414
+ /**
415
+ * Version information
416
+ */
417
+ versions: zod_1.z.array(plugin_versioning_zod_1.PluginVersionMetadataSchema),
418
+ /**
419
+ * Latest stable version
420
+ */
421
+ latestVersion: zod_1.z.string(),
422
+ /**
423
+ * Icon URL
424
+ */
425
+ icon: zod_1.z.string().url().optional(),
426
+ /**
427
+ * Screenshots
428
+ */
429
+ screenshots: zod_1.z.array(zod_1.z.object({
430
+ url: zod_1.z.string().url(),
431
+ caption: zod_1.z.string().optional(),
432
+ thumbnail: zod_1.z.string().url().optional(),
433
+ })).optional(),
434
+ /**
435
+ * Demo/video URL
436
+ */
437
+ demoUrl: zod_1.z.string().url().optional(),
438
+ /**
439
+ * Documentation URL
440
+ */
441
+ documentationUrl: zod_1.z.string().url().optional(),
442
+ /**
443
+ * Source code URL
444
+ */
445
+ sourceUrl: zod_1.z.string().url().optional(),
446
+ /**
447
+ * License
448
+ */
449
+ license: exports.PluginLicenseSchema,
450
+ /**
451
+ * Ratings
452
+ */
453
+ ratings: zod_1.z.object({
454
+ average: zod_1.z.number().min(0).max(5),
455
+ count: zod_1.z.number().int().min(0),
456
+ distribution: zod_1.z.object({
457
+ '1': zod_1.z.number().int().min(0),
458
+ '2': zod_1.z.number().int().min(0),
459
+ '3': zod_1.z.number().int().min(0),
460
+ '4': zod_1.z.number().int().min(0),
461
+ '5': zod_1.z.number().int().min(0),
462
+ }),
463
+ reviews: zod_1.z.array(exports.PluginRatingSchema).optional(),
464
+ }).optional(),
465
+ /**
466
+ * Quality metrics
467
+ */
468
+ quality: exports.MarketplaceQualityMetricsSchema.optional(),
469
+ /**
470
+ * Certification
471
+ */
472
+ certification: exports.PluginCertificationSchema.optional(),
473
+ /**
474
+ * Security information
475
+ */
476
+ security: plugin_security_advanced_zod_1.PluginSecurityManifestSchema.optional(),
477
+ /**
478
+ * Statistics
479
+ */
480
+ statistics: zod_1.z.object({
481
+ downloads: zod_1.z.number().int().min(0),
482
+ activeInstallations: zod_1.z.number().int().min(0),
483
+ views: zod_1.z.number().int().min(0).optional(),
484
+ favorites: zod_1.z.number().int().min(0).optional(),
485
+ }),
486
+ /**
487
+ * Support information
488
+ */
489
+ support: zod_1.z.object({
490
+ email: zod_1.z.string().email().optional(),
491
+ url: zod_1.z.string().url().optional(),
492
+ forum: zod_1.z.string().url().optional(),
493
+ chat: zod_1.z.string().url().optional(),
494
+ phone: zod_1.z.string().optional(),
495
+ responseTime: zod_1.z.string().optional().describe('Expected response time'),
496
+ sla: zod_1.z.string().url().optional().describe('SLA document URL'),
497
+ }).optional(),
498
+ /**
499
+ * Marketplace metadata
500
+ */
501
+ marketplace: zod_1.z.object({
502
+ /**
503
+ * Featured plugin
504
+ */
505
+ featured: zod_1.z.boolean().default(false),
506
+ /**
507
+ * Editor's choice
508
+ */
509
+ editorsChoice: zod_1.z.boolean().default(false),
510
+ /**
511
+ * New release
512
+ */
513
+ newRelease: zod_1.z.boolean().default(false),
514
+ /**
515
+ * Trending
516
+ */
517
+ trending: zod_1.z.boolean().default(false),
518
+ /**
519
+ * Rank in category
520
+ */
521
+ categoryRank: zod_1.z.number().int().min(1).optional(),
522
+ /**
523
+ * Overall rank
524
+ */
525
+ overallRank: zod_1.z.number().int().min(1).optional(),
526
+ }).optional(),
527
+ /**
528
+ * First published date
529
+ */
530
+ publishedDate: zod_1.z.string().datetime(),
531
+ /**
532
+ * Last updated date
533
+ */
534
+ lastUpdated: zod_1.z.string().datetime(),
535
+ });
536
+ /**
537
+ * Plugin Search Query
538
+ * Search and filter criteria
539
+ */
540
+ exports.PluginSearchQuerySchema = zod_1.z.object({
541
+ /**
542
+ * Search text
543
+ */
544
+ query: zod_1.z.string().optional(),
545
+ /**
546
+ * Filter by category
547
+ */
548
+ category: exports.PluginCategorySchema.optional(),
549
+ /**
550
+ * Filter by tags
551
+ */
552
+ tags: zod_1.z.array(zod_1.z.string()).optional(),
553
+ /**
554
+ * Filter by license type
555
+ */
556
+ licenseType: zod_1.z.array(zod_1.z.string()).optional(),
557
+ /**
558
+ * Minimum rating
559
+ */
560
+ minRating: zod_1.z.number().min(0).max(5).optional(),
561
+ /**
562
+ * Minimum quality score
563
+ */
564
+ minQualityScore: zod_1.z.number().min(0).max(100).optional(),
565
+ /**
566
+ * Certification required
567
+ */
568
+ certifiedOnly: zod_1.z.boolean().optional(),
569
+ /**
570
+ * Free plugins only
571
+ */
572
+ freeOnly: zod_1.z.boolean().optional(),
573
+ /**
574
+ * Sort by
575
+ */
576
+ sortBy: zod_1.z.enum([
577
+ 'relevance',
578
+ 'popularity',
579
+ 'rating',
580
+ 'downloads',
581
+ 'newest',
582
+ 'updated',
583
+ 'name',
584
+ ]).optional(),
585
+ /**
586
+ * Sort order
587
+ */
588
+ sortOrder: zod_1.z.enum(['asc', 'desc']).default('desc'),
589
+ /**
590
+ * Pagination
591
+ */
592
+ page: zod_1.z.number().int().min(1).default(1),
593
+ pageSize: zod_1.z.number().int().min(1).max(100).default(20),
594
+ });
595
+ /**
596
+ * Plugin Installation Request
597
+ * Request to install a plugin
598
+ */
599
+ exports.PluginInstallationRequestSchema = zod_1.z.object({
600
+ /**
601
+ * Plugin identifier
602
+ */
603
+ pluginId: zod_1.z.string(),
604
+ /**
605
+ * Version to install
606
+ */
607
+ version: zod_1.z.string().optional().describe('If not specified, latest stable version'),
608
+ /**
609
+ * Installation configuration
610
+ */
611
+ config: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
612
+ /**
613
+ * Accept license
614
+ */
615
+ acceptLicense: zod_1.z.boolean().default(false),
616
+ /**
617
+ * Grant permissions
618
+ */
619
+ grantPermissions: zod_1.z.array(zod_1.z.string()).optional(),
620
+ /**
621
+ * Enable automatically
622
+ */
623
+ autoEnable: zod_1.z.boolean().default(true),
624
+ /**
625
+ * Installation scope
626
+ */
627
+ scope: zod_1.z.enum(['global', 'tenant', 'user']).default('global'),
628
+ /**
629
+ * Tenant ID (if scope is tenant)
630
+ */
631
+ tenantId: zod_1.z.string().optional(),
632
+ });
633
+ /**
634
+ * Plugin Installation Status
635
+ * Status of plugin installation
636
+ */
637
+ exports.PluginInstallationStatusSchema = zod_1.z.object({
638
+ /**
639
+ * Installation ID
640
+ */
641
+ installationId: zod_1.z.string(),
642
+ /**
643
+ * Plugin ID
644
+ */
645
+ pluginId: zod_1.z.string(),
646
+ /**
647
+ * Version installed
648
+ */
649
+ version: zod_1.z.string(),
650
+ /**
651
+ * Installation status
652
+ */
653
+ status: zod_1.z.enum([
654
+ 'pending',
655
+ 'downloading',
656
+ 'verifying',
657
+ 'installing',
658
+ 'configuring',
659
+ 'completed',
660
+ 'failed',
661
+ 'rollback',
662
+ ]),
663
+ /**
664
+ * Progress percentage
665
+ */
666
+ progress: zod_1.z.number().min(0).max(100).optional(),
667
+ /**
668
+ * Status message
669
+ */
670
+ message: zod_1.z.string().optional(),
671
+ /**
672
+ * Error details (if failed)
673
+ */
674
+ error: zod_1.z.object({
675
+ code: zod_1.z.string(),
676
+ message: zod_1.z.string(),
677
+ details: zod_1.z.any().optional(),
678
+ }).optional(),
679
+ /**
680
+ * Started timestamp
681
+ */
682
+ startedAt: zod_1.z.string().datetime(),
683
+ /**
684
+ * Completed timestamp
685
+ */
686
+ completedAt: zod_1.z.string().datetime().optional(),
687
+ });
688
+ /**
689
+ * Plugin Revenue Sharing
690
+ * Revenue sharing configuration for paid plugins
691
+ */
692
+ exports.PluginRevenueSharingSchema = zod_1.z.object({
693
+ /**
694
+ * Plugin ID
695
+ */
696
+ pluginId: zod_1.z.string(),
697
+ /**
698
+ * Developer share percentage
699
+ */
700
+ developerShare: zod_1.z.number().min(0).max(100).describe('Percentage going to developer'),
701
+ /**
702
+ * Platform share percentage
703
+ */
704
+ platformShare: zod_1.z.number().min(0).max(100).describe('Percentage going to platform'),
705
+ /**
706
+ * Payment schedule
707
+ */
708
+ paymentSchedule: zod_1.z.enum(['monthly', 'quarterly', 'annually']).default('monthly'),
709
+ /**
710
+ * Minimum payout threshold (in cents)
711
+ */
712
+ minimumPayout: zod_1.z.number().int().min(0).default(10000).describe('Minimum $100 default'),
713
+ /**
714
+ * Payment method
715
+ */
716
+ paymentMethod: zod_1.z.object({
717
+ type: zod_1.z.enum(['bank-transfer', 'paypal', 'stripe', 'other']),
718
+ details: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
719
+ }),
720
+ /**
721
+ * Tax information
722
+ */
723
+ taxInfo: zod_1.z.object({
724
+ taxId: zod_1.z.string().optional(),
725
+ country: zod_1.z.string(),
726
+ taxExempt: zod_1.z.boolean().default(false),
727
+ }).optional(),
728
+ });