digital-products 2.0.1

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 (110) hide show
  1. package/.turbo/turbo-build.log +5 -0
  2. package/CHANGELOG.md +9 -0
  3. package/README.md +535 -0
  4. package/dist/api.d.ts +99 -0
  5. package/dist/api.d.ts.map +1 -0
  6. package/dist/api.js +129 -0
  7. package/dist/api.js.map +1 -0
  8. package/dist/app.d.ts +79 -0
  9. package/dist/app.d.ts.map +1 -0
  10. package/dist/app.js +107 -0
  11. package/dist/app.js.map +1 -0
  12. package/dist/content.d.ts +58 -0
  13. package/dist/content.d.ts.map +1 -0
  14. package/dist/content.js +78 -0
  15. package/dist/content.js.map +1 -0
  16. package/dist/data.d.ts +67 -0
  17. package/dist/data.d.ts.map +1 -0
  18. package/dist/data.js +107 -0
  19. package/dist/data.js.map +1 -0
  20. package/dist/dataset.d.ts +32 -0
  21. package/dist/dataset.d.ts.map +1 -0
  22. package/dist/dataset.js +50 -0
  23. package/dist/dataset.js.map +1 -0
  24. package/dist/entities/ai.d.ts +53 -0
  25. package/dist/entities/ai.d.ts.map +1 -0
  26. package/dist/entities/ai.js +859 -0
  27. package/dist/entities/ai.js.map +1 -0
  28. package/dist/entities/content.d.ts +52 -0
  29. package/dist/entities/content.d.ts.map +1 -0
  30. package/dist/entities/content.js +784 -0
  31. package/dist/entities/content.js.map +1 -0
  32. package/dist/entities/index.d.ts +112 -0
  33. package/dist/entities/index.d.ts.map +1 -0
  34. package/dist/entities/index.js +89 -0
  35. package/dist/entities/index.js.map +1 -0
  36. package/dist/entities/interfaces.d.ts +67 -0
  37. package/dist/entities/interfaces.d.ts.map +1 -0
  38. package/dist/entities/interfaces.js +930 -0
  39. package/dist/entities/interfaces.js.map +1 -0
  40. package/dist/entities/lifecycle.d.ts +51 -0
  41. package/dist/entities/lifecycle.d.ts.map +1 -0
  42. package/dist/entities/lifecycle.js +804 -0
  43. package/dist/entities/lifecycle.js.map +1 -0
  44. package/dist/entities/products.d.ts +53 -0
  45. package/dist/entities/products.d.ts.map +1 -0
  46. package/dist/entities/products.js +798 -0
  47. package/dist/entities/products.js.map +1 -0
  48. package/dist/entities/web.d.ts +44 -0
  49. package/dist/entities/web.d.ts.map +1 -0
  50. package/dist/entities/web.js +658 -0
  51. package/dist/entities/web.js.map +1 -0
  52. package/dist/index.d.ts +29 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +36 -0
  55. package/dist/index.js.map +1 -0
  56. package/dist/mcp.d.ts +101 -0
  57. package/dist/mcp.d.ts.map +1 -0
  58. package/dist/mcp.js +140 -0
  59. package/dist/mcp.js.map +1 -0
  60. package/dist/product.d.ts +37 -0
  61. package/dist/product.d.ts.map +1 -0
  62. package/dist/product.js +54 -0
  63. package/dist/product.js.map +1 -0
  64. package/dist/registry.d.ts +9 -0
  65. package/dist/registry.d.ts.map +1 -0
  66. package/dist/registry.js +32 -0
  67. package/dist/registry.js.map +1 -0
  68. package/dist/sdk.d.ts +99 -0
  69. package/dist/sdk.d.ts.map +1 -0
  70. package/dist/sdk.js +128 -0
  71. package/dist/sdk.js.map +1 -0
  72. package/dist/site.d.ts +85 -0
  73. package/dist/site.d.ts.map +1 -0
  74. package/dist/site.js +113 -0
  75. package/dist/site.js.map +1 -0
  76. package/dist/types.d.ts +528 -0
  77. package/dist/types.d.ts.map +1 -0
  78. package/dist/types.js +5 -0
  79. package/dist/types.js.map +1 -0
  80. package/example.ts +236 -0
  81. package/package.json +35 -0
  82. package/src/api.ts +140 -0
  83. package/src/app.ts +117 -0
  84. package/src/content.ts +82 -0
  85. package/src/data.ts +129 -0
  86. package/src/dataset.ts +53 -0
  87. package/src/entities/ai.ts +932 -0
  88. package/src/entities/content.ts +851 -0
  89. package/src/entities/index.ts +156 -0
  90. package/src/entities/interfaces.ts +1017 -0
  91. package/src/entities/lifecycle.ts +872 -0
  92. package/src/entities/products.ts +867 -0
  93. package/src/entities/web.ts +719 -0
  94. package/src/index.ts +55 -0
  95. package/src/mcp.ts +163 -0
  96. package/src/product.ts +59 -0
  97. package/src/registry.ts +41 -0
  98. package/src/sdk.ts +148 -0
  99. package/src/site.ts +127 -0
  100. package/src/types.ts +558 -0
  101. package/test/api.test.ts +247 -0
  102. package/test/app.test.ts +220 -0
  103. package/test/content.test.ts +171 -0
  104. package/test/data.test.ts +201 -0
  105. package/test/dataset.test.ts +181 -0
  106. package/test/mcp.test.ts +230 -0
  107. package/test/product.test.ts +200 -0
  108. package/test/sdk.test.ts +236 -0
  109. package/test/site.test.ts +245 -0
  110. package/tsconfig.json +9 -0
@@ -0,0 +1,798 @@
1
+ /**
2
+ * Core Product Entity Types (Nouns)
3
+ *
4
+ * Base digital product definitions and primary product types:
5
+ * DigitalProduct, SaaSProduct, App, Platform, Marketplace
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ // =============================================================================
10
+ // DigitalProduct
11
+ // =============================================================================
12
+ /**
13
+ * DigitalProduct entity
14
+ *
15
+ * Base entity for all digital products.
16
+ */
17
+ export const DigitalProduct = {
18
+ singular: 'digital-product',
19
+ plural: 'digital-products',
20
+ description: 'A digital product or software offering',
21
+ properties: {
22
+ // Identity
23
+ name: {
24
+ type: 'string',
25
+ description: 'Product name',
26
+ },
27
+ slug: {
28
+ type: 'string',
29
+ optional: true,
30
+ description: 'URL-friendly identifier',
31
+ },
32
+ description: {
33
+ type: 'string',
34
+ optional: true,
35
+ description: 'Product description',
36
+ },
37
+ tagline: {
38
+ type: 'string',
39
+ optional: true,
40
+ description: 'Short marketing tagline',
41
+ },
42
+ // Classification
43
+ type: {
44
+ type: 'string',
45
+ description: 'Product type',
46
+ examples: ['saas', 'app', 'api', 'platform', 'marketplace', 'content', 'data', 'sdk', 'plugin', 'ai'],
47
+ },
48
+ category: {
49
+ type: 'string',
50
+ optional: true,
51
+ description: 'Product category',
52
+ },
53
+ tags: {
54
+ type: 'string',
55
+ array: true,
56
+ optional: true,
57
+ description: 'Product tags',
58
+ },
59
+ // Versioning
60
+ version: {
61
+ type: 'string',
62
+ optional: true,
63
+ description: 'Current version',
64
+ },
65
+ // Market
66
+ targetAudience: {
67
+ type: 'string',
68
+ optional: true,
69
+ description: 'Target audience description',
70
+ },
71
+ valueProposition: {
72
+ type: 'string',
73
+ optional: true,
74
+ description: 'Core value proposition',
75
+ },
76
+ useCases: {
77
+ type: 'string',
78
+ array: true,
79
+ optional: true,
80
+ description: 'Primary use cases',
81
+ },
82
+ // Pricing
83
+ pricingModel: {
84
+ type: 'string',
85
+ optional: true,
86
+ description: 'Pricing model',
87
+ examples: ['free', 'freemium', 'subscription', 'one-time', 'usage-based', 'tiered', 'per-seat'],
88
+ },
89
+ price: {
90
+ type: 'number',
91
+ optional: true,
92
+ description: 'Base price',
93
+ },
94
+ currency: {
95
+ type: 'string',
96
+ optional: true,
97
+ description: 'Currency code (ISO 4217)',
98
+ },
99
+ // Lifecycle
100
+ stage: {
101
+ type: 'string',
102
+ optional: true,
103
+ description: 'Product lifecycle stage',
104
+ examples: ['concept', 'development', 'alpha', 'beta', 'ga', 'growth', 'mature', 'sunset'],
105
+ },
106
+ launchedAt: {
107
+ type: 'date',
108
+ optional: true,
109
+ description: 'Launch date',
110
+ },
111
+ // Status
112
+ status: {
113
+ type: 'string',
114
+ description: 'Product status',
115
+ examples: ['draft', 'active', 'paused', 'deprecated', 'archived'],
116
+ },
117
+ visibility: {
118
+ type: 'string',
119
+ optional: true,
120
+ description: 'Visibility level',
121
+ examples: ['public', 'private', 'unlisted', 'beta', 'waitlist'],
122
+ },
123
+ // URLs
124
+ websiteUrl: {
125
+ type: 'string',
126
+ optional: true,
127
+ description: 'Product website URL',
128
+ },
129
+ documentationUrl: {
130
+ type: 'string',
131
+ optional: true,
132
+ description: 'Documentation URL',
133
+ },
134
+ repositoryUrl: {
135
+ type: 'string',
136
+ optional: true,
137
+ description: 'Source repository URL',
138
+ },
139
+ },
140
+ relationships: {
141
+ owner: {
142
+ type: 'Organization',
143
+ required: false,
144
+ description: 'Owning organization',
145
+ },
146
+ team: {
147
+ type: 'Team',
148
+ required: false,
149
+ description: 'Product team',
150
+ },
151
+ features: {
152
+ type: 'Feature[]',
153
+ description: 'Product features',
154
+ },
155
+ versions: {
156
+ type: 'Version[]',
157
+ description: 'Product versions',
158
+ },
159
+ deployments: {
160
+ type: 'Deployment[]',
161
+ description: 'Active deployments',
162
+ },
163
+ },
164
+ actions: [
165
+ 'create',
166
+ 'update',
167
+ 'launch',
168
+ 'release',
169
+ 'deploy',
170
+ 'pause',
171
+ 'resume',
172
+ 'deprecate',
173
+ 'archive',
174
+ ],
175
+ events: [
176
+ 'created',
177
+ 'updated',
178
+ 'launched',
179
+ 'released',
180
+ 'deployed',
181
+ 'paused',
182
+ 'resumed',
183
+ 'deprecated',
184
+ 'archived',
185
+ ],
186
+ };
187
+ // =============================================================================
188
+ // SaaSProduct
189
+ // =============================================================================
190
+ /**
191
+ * SaaSProduct entity
192
+ *
193
+ * Software-as-a-Service product with subscription model.
194
+ */
195
+ export const SaaSProduct = {
196
+ singular: 'saas-product',
197
+ plural: 'saas-products',
198
+ description: 'A Software-as-a-Service product',
199
+ properties: {
200
+ // Identity
201
+ name: {
202
+ type: 'string',
203
+ description: 'Product name',
204
+ },
205
+ slug: {
206
+ type: 'string',
207
+ optional: true,
208
+ description: 'URL-friendly identifier',
209
+ },
210
+ description: {
211
+ type: 'string',
212
+ optional: true,
213
+ description: 'Product description',
214
+ },
215
+ // SaaS Specific
216
+ multiTenant: {
217
+ type: 'boolean',
218
+ optional: true,
219
+ description: 'Multi-tenant architecture',
220
+ },
221
+ selfService: {
222
+ type: 'boolean',
223
+ optional: true,
224
+ description: 'Self-service signup available',
225
+ },
226
+ trialDays: {
227
+ type: 'number',
228
+ optional: true,
229
+ description: 'Free trial period in days',
230
+ },
231
+ // Infrastructure
232
+ hostingModel: {
233
+ type: 'string',
234
+ optional: true,
235
+ description: 'Hosting model',
236
+ examples: ['cloud', 'hybrid', 'on-premise', 'self-hosted'],
237
+ },
238
+ regions: {
239
+ type: 'string',
240
+ array: true,
241
+ optional: true,
242
+ description: 'Available regions',
243
+ },
244
+ // Compliance
245
+ certifications: {
246
+ type: 'string',
247
+ array: true,
248
+ optional: true,
249
+ description: 'Security certifications',
250
+ examples: ['SOC2', 'HIPAA', 'GDPR', 'ISO27001', 'PCI-DSS'],
251
+ },
252
+ dataResidency: {
253
+ type: 'string',
254
+ array: true,
255
+ optional: true,
256
+ description: 'Data residency options',
257
+ },
258
+ // Usage
259
+ activeUsers: {
260
+ type: 'number',
261
+ optional: true,
262
+ description: 'Active user count',
263
+ },
264
+ monthlyActiveUsers: {
265
+ type: 'number',
266
+ optional: true,
267
+ description: 'Monthly active users',
268
+ },
269
+ // Revenue
270
+ mrr: {
271
+ type: 'number',
272
+ optional: true,
273
+ description: 'Monthly recurring revenue',
274
+ },
275
+ arr: {
276
+ type: 'number',
277
+ optional: true,
278
+ description: 'Annual recurring revenue',
279
+ },
280
+ churnRate: {
281
+ type: 'number',
282
+ optional: true,
283
+ description: 'Monthly churn rate',
284
+ },
285
+ // Status
286
+ status: {
287
+ type: 'string',
288
+ description: 'Product status',
289
+ examples: ['draft', 'beta', 'active', 'paused', 'sunset'],
290
+ },
291
+ },
292
+ relationships: {
293
+ product: {
294
+ type: 'DigitalProduct',
295
+ description: 'Parent digital product',
296
+ },
297
+ plans: {
298
+ type: 'PricingPlan[]',
299
+ description: 'Subscription plans',
300
+ },
301
+ tenants: {
302
+ type: 'Tenant[]',
303
+ description: 'Customer tenants',
304
+ },
305
+ integrations: {
306
+ type: 'Integration[]',
307
+ description: 'Available integrations',
308
+ },
309
+ },
310
+ actions: [
311
+ 'create',
312
+ 'update',
313
+ 'launch',
314
+ 'addPlan',
315
+ 'removePlan',
316
+ 'provisionTenant',
317
+ 'deprovisionTenant',
318
+ 'pause',
319
+ 'sunset',
320
+ ],
321
+ events: [
322
+ 'created',
323
+ 'updated',
324
+ 'launched',
325
+ 'planAdded',
326
+ 'planRemoved',
327
+ 'tenantProvisioned',
328
+ 'tenantDeprovisioned',
329
+ 'paused',
330
+ 'sunset',
331
+ ],
332
+ };
333
+ // =============================================================================
334
+ // App
335
+ // =============================================================================
336
+ /**
337
+ * App entity
338
+ *
339
+ * Interactive user-facing application.
340
+ */
341
+ export const App = {
342
+ singular: 'app',
343
+ plural: 'apps',
344
+ description: 'An interactive user-facing application',
345
+ properties: {
346
+ // Identity
347
+ name: {
348
+ type: 'string',
349
+ description: 'App name',
350
+ },
351
+ slug: {
352
+ type: 'string',
353
+ optional: true,
354
+ description: 'URL-friendly identifier',
355
+ },
356
+ description: {
357
+ type: 'string',
358
+ optional: true,
359
+ description: 'App description',
360
+ },
361
+ // Classification
362
+ type: {
363
+ type: 'string',
364
+ description: 'App type',
365
+ examples: ['web', 'mobile', 'desktop', 'cli', 'pwa', 'native', 'hybrid'],
366
+ },
367
+ platform: {
368
+ type: 'string',
369
+ optional: true,
370
+ description: 'Target platform',
371
+ examples: ['browser', 'ios', 'android', 'macos', 'windows', 'linux', 'cross-platform'],
372
+ },
373
+ // Technology
374
+ framework: {
375
+ type: 'string',
376
+ optional: true,
377
+ description: 'Primary framework',
378
+ examples: ['react', 'vue', 'svelte', 'solid', 'angular', 'next', 'nuxt', 'native', 'flutter', 'electron'],
379
+ },
380
+ language: {
381
+ type: 'string',
382
+ optional: true,
383
+ description: 'Primary language',
384
+ examples: ['typescript', 'javascript', 'swift', 'kotlin', 'dart', 'rust'],
385
+ },
386
+ runtime: {
387
+ type: 'string',
388
+ optional: true,
389
+ description: 'Runtime environment',
390
+ examples: ['browser', 'node', 'bun', 'deno', 'native'],
391
+ },
392
+ // Configuration
393
+ entryPoint: {
394
+ type: 'string',
395
+ optional: true,
396
+ description: 'Application entry point',
397
+ },
398
+ routes: {
399
+ type: 'json',
400
+ optional: true,
401
+ description: 'Application routes',
402
+ },
403
+ // Features
404
+ offlineCapable: {
405
+ type: 'boolean',
406
+ optional: true,
407
+ description: 'Works offline',
408
+ },
409
+ pushNotifications: {
410
+ type: 'boolean',
411
+ optional: true,
412
+ description: 'Push notification support',
413
+ },
414
+ // Distribution
415
+ appStoreUrl: {
416
+ type: 'string',
417
+ optional: true,
418
+ description: 'App store URL',
419
+ },
420
+ playStoreUrl: {
421
+ type: 'string',
422
+ optional: true,
423
+ description: 'Play store URL',
424
+ },
425
+ // Status
426
+ status: {
427
+ type: 'string',
428
+ description: 'App status',
429
+ examples: ['draft', 'development', 'testing', 'beta', 'production', 'deprecated'],
430
+ },
431
+ },
432
+ relationships: {
433
+ product: {
434
+ type: 'DigitalProduct',
435
+ description: 'Parent product',
436
+ },
437
+ features: {
438
+ type: 'Feature[]',
439
+ description: 'App features',
440
+ },
441
+ releases: {
442
+ type: 'Release[]',
443
+ description: 'App releases',
444
+ },
445
+ deployments: {
446
+ type: 'Deployment[]',
447
+ description: 'Active deployments',
448
+ },
449
+ components: {
450
+ type: 'Component[]',
451
+ description: 'UI components',
452
+ },
453
+ },
454
+ actions: [
455
+ 'create',
456
+ 'update',
457
+ 'build',
458
+ 'test',
459
+ 'deploy',
460
+ 'release',
461
+ 'rollback',
462
+ 'pause',
463
+ 'deprecate',
464
+ ],
465
+ events: [
466
+ 'created',
467
+ 'updated',
468
+ 'built',
469
+ 'tested',
470
+ 'deployed',
471
+ 'released',
472
+ 'rolledBack',
473
+ 'paused',
474
+ 'deprecated',
475
+ ],
476
+ };
477
+ // =============================================================================
478
+ // Platform
479
+ // =============================================================================
480
+ /**
481
+ * Platform entity
482
+ *
483
+ * Multi-sided platform connecting different user groups.
484
+ */
485
+ export const Platform = {
486
+ singular: 'platform',
487
+ plural: 'platforms',
488
+ description: 'A multi-sided platform connecting users and providers',
489
+ properties: {
490
+ // Identity
491
+ name: {
492
+ type: 'string',
493
+ description: 'Platform name',
494
+ },
495
+ slug: {
496
+ type: 'string',
497
+ optional: true,
498
+ description: 'URL-friendly identifier',
499
+ },
500
+ description: {
501
+ type: 'string',
502
+ optional: true,
503
+ description: 'Platform description',
504
+ },
505
+ // Platform Type
506
+ type: {
507
+ type: 'string',
508
+ description: 'Platform type',
509
+ examples: ['marketplace', 'social', 'developer', 'content', 'service', 'data', 'ai'],
510
+ },
511
+ // Sides/Participants
512
+ sides: {
513
+ type: 'string',
514
+ array: true,
515
+ optional: true,
516
+ description: 'Platform sides (e.g., buyers, sellers)',
517
+ },
518
+ // Network Effects
519
+ networkEffectType: {
520
+ type: 'string',
521
+ optional: true,
522
+ description: 'Type of network effect',
523
+ examples: ['same-side', 'cross-side', 'data', 'none'],
524
+ },
525
+ // Openness
526
+ openness: {
527
+ type: 'string',
528
+ optional: true,
529
+ description: 'Platform openness level',
530
+ examples: ['open', 'semi-open', 'closed', 'invite-only'],
531
+ },
532
+ apiAccess: {
533
+ type: 'boolean',
534
+ optional: true,
535
+ description: 'API access available',
536
+ },
537
+ developerProgram: {
538
+ type: 'boolean',
539
+ optional: true,
540
+ description: 'Developer program available',
541
+ },
542
+ // Governance
543
+ governanceModel: {
544
+ type: 'string',
545
+ optional: true,
546
+ description: 'Platform governance model',
547
+ examples: ['centralized', 'federated', 'decentralized', 'hybrid'],
548
+ },
549
+ // Economics
550
+ revenueModel: {
551
+ type: 'string',
552
+ optional: true,
553
+ description: 'Revenue model',
554
+ examples: ['commission', 'subscription', 'advertising', 'freemium', 'data', 'hybrid'],
555
+ },
556
+ takeRate: {
557
+ type: 'number',
558
+ optional: true,
559
+ description: 'Platform take rate percentage',
560
+ },
561
+ // Metrics
562
+ totalUsers: {
563
+ type: 'number',
564
+ optional: true,
565
+ description: 'Total registered users',
566
+ },
567
+ gmv: {
568
+ type: 'number',
569
+ optional: true,
570
+ description: 'Gross merchandise value',
571
+ },
572
+ // Status
573
+ status: {
574
+ type: 'string',
575
+ description: 'Platform status',
576
+ examples: ['draft', 'beta', 'active', 'scaling', 'mature'],
577
+ },
578
+ },
579
+ relationships: {
580
+ product: {
581
+ type: 'DigitalProduct',
582
+ description: 'Parent product',
583
+ },
584
+ apis: {
585
+ type: 'API[]',
586
+ description: 'Platform APIs',
587
+ },
588
+ plugins: {
589
+ type: 'Plugin[]',
590
+ description: 'Available plugins',
591
+ },
592
+ integrations: {
593
+ type: 'Integration[]',
594
+ description: 'Platform integrations',
595
+ },
596
+ },
597
+ actions: [
598
+ 'create',
599
+ 'update',
600
+ 'launch',
601
+ 'openAPI',
602
+ 'closeAPI',
603
+ 'addSide',
604
+ 'removeSide',
605
+ 'updateGovernance',
606
+ 'scale',
607
+ ],
608
+ events: [
609
+ 'created',
610
+ 'updated',
611
+ 'launched',
612
+ 'apiOpened',
613
+ 'apiClosed',
614
+ 'sideAdded',
615
+ 'sideRemoved',
616
+ 'governanceUpdated',
617
+ 'scaled',
618
+ ],
619
+ };
620
+ // =============================================================================
621
+ // Marketplace
622
+ // =============================================================================
623
+ /**
624
+ * Marketplace entity
625
+ *
626
+ * Platform for buying and selling products or services.
627
+ */
628
+ export const Marketplace = {
629
+ singular: 'marketplace',
630
+ plural: 'marketplaces',
631
+ description: 'A platform for buying and selling products or services',
632
+ properties: {
633
+ // Identity
634
+ name: {
635
+ type: 'string',
636
+ description: 'Marketplace name',
637
+ },
638
+ slug: {
639
+ type: 'string',
640
+ optional: true,
641
+ description: 'URL-friendly identifier',
642
+ },
643
+ description: {
644
+ type: 'string',
645
+ optional: true,
646
+ description: 'Marketplace description',
647
+ },
648
+ // Type
649
+ type: {
650
+ type: 'string',
651
+ description: 'Marketplace type',
652
+ examples: ['b2b', 'b2c', 'c2c', 'p2p', 'vertical', 'horizontal'],
653
+ },
654
+ vertical: {
655
+ type: 'string',
656
+ optional: true,
657
+ description: 'Industry vertical',
658
+ },
659
+ // What's Traded
660
+ itemType: {
661
+ type: 'string',
662
+ description: 'Type of items traded',
663
+ examples: ['products', 'services', 'digital-goods', 'subscriptions', 'labor', 'data'],
664
+ },
665
+ // Matching
666
+ matchingModel: {
667
+ type: 'string',
668
+ optional: true,
669
+ description: 'How buyers and sellers are matched',
670
+ examples: ['search', 'browse', 'auction', 'rfq', 'algorithmic', 'ai-powered'],
671
+ },
672
+ // Trust & Safety
673
+ trustModel: {
674
+ type: 'string',
675
+ optional: true,
676
+ description: 'Trust and safety model',
677
+ examples: ['reviews', 'verification', 'escrow', 'insurance', 'guarantee'],
678
+ },
679
+ disputeResolution: {
680
+ type: 'string',
681
+ optional: true,
682
+ description: 'Dispute resolution method',
683
+ examples: ['platform', 'arbitration', 'mediation', 'legal'],
684
+ },
685
+ // Transactions
686
+ paymentMethods: {
687
+ type: 'string',
688
+ array: true,
689
+ optional: true,
690
+ description: 'Supported payment methods',
691
+ },
692
+ escrowEnabled: {
693
+ type: 'boolean',
694
+ optional: true,
695
+ description: 'Escrow payments supported',
696
+ },
697
+ // Economics
698
+ commissionRate: {
699
+ type: 'number',
700
+ optional: true,
701
+ description: 'Commission rate percentage',
702
+ },
703
+ listingFee: {
704
+ type: 'number',
705
+ optional: true,
706
+ description: 'Fee per listing',
707
+ },
708
+ transactionFee: {
709
+ type: 'number',
710
+ optional: true,
711
+ description: 'Per-transaction fee',
712
+ },
713
+ // Metrics
714
+ totalListings: {
715
+ type: 'number',
716
+ optional: true,
717
+ description: 'Total active listings',
718
+ },
719
+ totalSellers: {
720
+ type: 'number',
721
+ optional: true,
722
+ description: 'Total registered sellers',
723
+ },
724
+ totalBuyers: {
725
+ type: 'number',
726
+ optional: true,
727
+ description: 'Total registered buyers',
728
+ },
729
+ gmv: {
730
+ type: 'number',
731
+ optional: true,
732
+ description: 'Gross merchandise value',
733
+ },
734
+ // Status
735
+ status: {
736
+ type: 'string',
737
+ description: 'Marketplace status',
738
+ examples: ['draft', 'beta', 'active', 'scaling', 'mature'],
739
+ },
740
+ },
741
+ relationships: {
742
+ platform: {
743
+ type: 'Platform',
744
+ description: 'Parent platform',
745
+ },
746
+ categories: {
747
+ type: 'Category[]',
748
+ description: 'Product categories',
749
+ },
750
+ sellers: {
751
+ type: 'Seller[]',
752
+ description: 'Marketplace sellers',
753
+ },
754
+ listings: {
755
+ type: 'Listing[]',
756
+ description: 'Active listings',
757
+ },
758
+ },
759
+ actions: [
760
+ 'create',
761
+ 'update',
762
+ 'launch',
763
+ 'addCategory',
764
+ 'removeCategory',
765
+ 'approveSeller',
766
+ 'suspendSeller',
767
+ 'updateFees',
768
+ 'resolveDispute',
769
+ ],
770
+ events: [
771
+ 'created',
772
+ 'updated',
773
+ 'launched',
774
+ 'categoryAdded',
775
+ 'categoryRemoved',
776
+ 'sellerApproved',
777
+ 'sellerSuspended',
778
+ 'feesUpdated',
779
+ 'disputeResolved',
780
+ ],
781
+ };
782
+ // =============================================================================
783
+ // Exports
784
+ // =============================================================================
785
+ export const ProductEntities = {
786
+ DigitalProduct,
787
+ SaaSProduct,
788
+ App,
789
+ Platform,
790
+ Marketplace,
791
+ };
792
+ export const ProductCategories = {
793
+ core: ['DigitalProduct'],
794
+ saas: ['SaaSProduct'],
795
+ apps: ['App'],
796
+ platforms: ['Platform', 'Marketplace'],
797
+ };
798
+ //# sourceMappingURL=products.js.map