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.
- package/.turbo/turbo-build.log +5 -0
- package/CHANGELOG.md +9 -0
- package/README.md +535 -0
- package/dist/api.d.ts +99 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +129 -0
- package/dist/api.js.map +1 -0
- package/dist/app.d.ts +79 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +107 -0
- package/dist/app.js.map +1 -0
- package/dist/content.d.ts +58 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/content.js +78 -0
- package/dist/content.js.map +1 -0
- package/dist/data.d.ts +67 -0
- package/dist/data.d.ts.map +1 -0
- package/dist/data.js +107 -0
- package/dist/data.js.map +1 -0
- package/dist/dataset.d.ts +32 -0
- package/dist/dataset.d.ts.map +1 -0
- package/dist/dataset.js +50 -0
- package/dist/dataset.js.map +1 -0
- package/dist/entities/ai.d.ts +53 -0
- package/dist/entities/ai.d.ts.map +1 -0
- package/dist/entities/ai.js +859 -0
- package/dist/entities/ai.js.map +1 -0
- package/dist/entities/content.d.ts +52 -0
- package/dist/entities/content.d.ts.map +1 -0
- package/dist/entities/content.js +784 -0
- package/dist/entities/content.js.map +1 -0
- package/dist/entities/index.d.ts +112 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +89 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/interfaces.d.ts +67 -0
- package/dist/entities/interfaces.d.ts.map +1 -0
- package/dist/entities/interfaces.js +930 -0
- package/dist/entities/interfaces.js.map +1 -0
- package/dist/entities/lifecycle.d.ts +51 -0
- package/dist/entities/lifecycle.d.ts.map +1 -0
- package/dist/entities/lifecycle.js +804 -0
- package/dist/entities/lifecycle.js.map +1 -0
- package/dist/entities/products.d.ts +53 -0
- package/dist/entities/products.d.ts.map +1 -0
- package/dist/entities/products.js +798 -0
- package/dist/entities/products.js.map +1 -0
- package/dist/entities/web.d.ts +44 -0
- package/dist/entities/web.d.ts.map +1 -0
- package/dist/entities/web.js +658 -0
- package/dist/entities/web.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp.d.ts +101 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +140 -0
- package/dist/mcp.js.map +1 -0
- package/dist/product.d.ts +37 -0
- package/dist/product.d.ts.map +1 -0
- package/dist/product.js +54 -0
- package/dist/product.js.map +1 -0
- package/dist/registry.d.ts +9 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +32 -0
- package/dist/registry.js.map +1 -0
- package/dist/sdk.d.ts +99 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.js +128 -0
- package/dist/sdk.js.map +1 -0
- package/dist/site.d.ts +85 -0
- package/dist/site.d.ts.map +1 -0
- package/dist/site.js +113 -0
- package/dist/site.js.map +1 -0
- package/dist/types.d.ts +528 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/example.ts +236 -0
- package/package.json +35 -0
- package/src/api.ts +140 -0
- package/src/app.ts +117 -0
- package/src/content.ts +82 -0
- package/src/data.ts +129 -0
- package/src/dataset.ts +53 -0
- package/src/entities/ai.ts +932 -0
- package/src/entities/content.ts +851 -0
- package/src/entities/index.ts +156 -0
- package/src/entities/interfaces.ts +1017 -0
- package/src/entities/lifecycle.ts +872 -0
- package/src/entities/products.ts +867 -0
- package/src/entities/web.ts +719 -0
- package/src/index.ts +55 -0
- package/src/mcp.ts +163 -0
- package/src/product.ts +59 -0
- package/src/registry.ts +41 -0
- package/src/sdk.ts +148 -0
- package/src/site.ts +127 -0
- package/src/types.ts +558 -0
- package/test/api.test.ts +247 -0
- package/test/app.test.ts +220 -0
- package/test/content.test.ts +171 -0
- package/test/data.test.ts +201 -0
- package/test/dataset.test.ts +181 -0
- package/test/mcp.test.ts +230 -0
- package/test/product.test.ts +200 -0
- package/test/sdk.test.ts +236 -0
- package/test/site.test.ts +245 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,930 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface Entity Types (Nouns)
|
|
3
|
+
*
|
|
4
|
+
* API and integration products: API, SDK, MCP, Plugin, Integration, Webhook
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// API
|
|
10
|
+
// =============================================================================
|
|
11
|
+
/**
|
|
12
|
+
* API entity
|
|
13
|
+
*
|
|
14
|
+
* Programmatic interface product.
|
|
15
|
+
*/
|
|
16
|
+
export const API = {
|
|
17
|
+
singular: 'api',
|
|
18
|
+
plural: 'apis',
|
|
19
|
+
description: 'A programmatic interface for accessing functionality or data',
|
|
20
|
+
properties: {
|
|
21
|
+
// Identity
|
|
22
|
+
name: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'API name',
|
|
25
|
+
},
|
|
26
|
+
slug: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
optional: true,
|
|
29
|
+
description: 'URL-friendly identifier',
|
|
30
|
+
},
|
|
31
|
+
description: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
optional: true,
|
|
34
|
+
description: 'API description',
|
|
35
|
+
},
|
|
36
|
+
// Classification
|
|
37
|
+
style: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'API style',
|
|
40
|
+
examples: ['rest', 'graphql', 'rpc', 'grpc', 'websocket', 'soap', 'odata'],
|
|
41
|
+
},
|
|
42
|
+
category: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
optional: true,
|
|
45
|
+
description: 'API category',
|
|
46
|
+
},
|
|
47
|
+
// Configuration
|
|
48
|
+
baseUrl: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
optional: true,
|
|
51
|
+
description: 'Base URL',
|
|
52
|
+
},
|
|
53
|
+
version: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
optional: true,
|
|
56
|
+
description: 'API version',
|
|
57
|
+
},
|
|
58
|
+
versioningStrategy: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
optional: true,
|
|
61
|
+
description: 'Versioning strategy',
|
|
62
|
+
examples: ['url', 'header', 'query', 'none'],
|
|
63
|
+
},
|
|
64
|
+
// Specification
|
|
65
|
+
openApiSpec: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
optional: true,
|
|
68
|
+
description: 'OpenAPI specification URL',
|
|
69
|
+
},
|
|
70
|
+
graphqlSchema: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
optional: true,
|
|
73
|
+
description: 'GraphQL schema URL',
|
|
74
|
+
},
|
|
75
|
+
// Authentication
|
|
76
|
+
authMethods: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
array: true,
|
|
79
|
+
optional: true,
|
|
80
|
+
description: 'Supported authentication methods',
|
|
81
|
+
examples: ['api-key', 'bearer', 'oauth2', 'basic', 'jwt', 'mtls'],
|
|
82
|
+
},
|
|
83
|
+
scopes: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
array: true,
|
|
86
|
+
optional: true,
|
|
87
|
+
description: 'Available OAuth scopes',
|
|
88
|
+
},
|
|
89
|
+
// Rate Limiting
|
|
90
|
+
rateLimit: {
|
|
91
|
+
type: 'number',
|
|
92
|
+
optional: true,
|
|
93
|
+
description: 'Requests per minute limit',
|
|
94
|
+
},
|
|
95
|
+
rateLimitWindow: {
|
|
96
|
+
type: 'number',
|
|
97
|
+
optional: true,
|
|
98
|
+
description: 'Rate limit window in seconds',
|
|
99
|
+
},
|
|
100
|
+
burstLimit: {
|
|
101
|
+
type: 'number',
|
|
102
|
+
optional: true,
|
|
103
|
+
description: 'Burst request limit',
|
|
104
|
+
},
|
|
105
|
+
// Documentation
|
|
106
|
+
docsUrl: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
optional: true,
|
|
109
|
+
description: 'API documentation URL',
|
|
110
|
+
},
|
|
111
|
+
changelogUrl: {
|
|
112
|
+
type: 'string',
|
|
113
|
+
optional: true,
|
|
114
|
+
description: 'Changelog URL',
|
|
115
|
+
},
|
|
116
|
+
// Status
|
|
117
|
+
status: {
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'API status',
|
|
120
|
+
examples: ['draft', 'alpha', 'beta', 'stable', 'deprecated', 'sunset'],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
relationships: {
|
|
124
|
+
product: {
|
|
125
|
+
type: 'DigitalProduct',
|
|
126
|
+
description: 'Parent product',
|
|
127
|
+
},
|
|
128
|
+
endpoints: {
|
|
129
|
+
type: 'Endpoint[]',
|
|
130
|
+
description: 'API endpoints',
|
|
131
|
+
},
|
|
132
|
+
sdks: {
|
|
133
|
+
type: 'SDK[]',
|
|
134
|
+
description: 'Available SDKs',
|
|
135
|
+
},
|
|
136
|
+
webhooks: {
|
|
137
|
+
type: 'Webhook[]',
|
|
138
|
+
description: 'Available webhooks',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
actions: [
|
|
142
|
+
'create',
|
|
143
|
+
'update',
|
|
144
|
+
'publish',
|
|
145
|
+
'addEndpoint',
|
|
146
|
+
'removeEndpoint',
|
|
147
|
+
'updateRateLimit',
|
|
148
|
+
'deprecate',
|
|
149
|
+
'sunset',
|
|
150
|
+
],
|
|
151
|
+
events: [
|
|
152
|
+
'created',
|
|
153
|
+
'updated',
|
|
154
|
+
'published',
|
|
155
|
+
'endpointAdded',
|
|
156
|
+
'endpointRemoved',
|
|
157
|
+
'rateLimitUpdated',
|
|
158
|
+
'deprecated',
|
|
159
|
+
'sunset',
|
|
160
|
+
],
|
|
161
|
+
};
|
|
162
|
+
// =============================================================================
|
|
163
|
+
// Endpoint
|
|
164
|
+
// =============================================================================
|
|
165
|
+
/**
|
|
166
|
+
* Endpoint entity
|
|
167
|
+
*
|
|
168
|
+
* Individual API endpoint.
|
|
169
|
+
*/
|
|
170
|
+
export const Endpoint = {
|
|
171
|
+
singular: 'endpoint',
|
|
172
|
+
plural: 'endpoints',
|
|
173
|
+
description: 'An individual API endpoint',
|
|
174
|
+
properties: {
|
|
175
|
+
// Identity
|
|
176
|
+
name: {
|
|
177
|
+
type: 'string',
|
|
178
|
+
description: 'Endpoint name',
|
|
179
|
+
},
|
|
180
|
+
description: {
|
|
181
|
+
type: 'string',
|
|
182
|
+
optional: true,
|
|
183
|
+
description: 'Endpoint description',
|
|
184
|
+
},
|
|
185
|
+
// HTTP
|
|
186
|
+
method: {
|
|
187
|
+
type: 'string',
|
|
188
|
+
description: 'HTTP method',
|
|
189
|
+
examples: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD'],
|
|
190
|
+
},
|
|
191
|
+
path: {
|
|
192
|
+
type: 'string',
|
|
193
|
+
description: 'URL path pattern',
|
|
194
|
+
},
|
|
195
|
+
// Parameters
|
|
196
|
+
pathParams: {
|
|
197
|
+
type: 'json',
|
|
198
|
+
optional: true,
|
|
199
|
+
description: 'Path parameters schema',
|
|
200
|
+
},
|
|
201
|
+
queryParams: {
|
|
202
|
+
type: 'json',
|
|
203
|
+
optional: true,
|
|
204
|
+
description: 'Query parameters schema',
|
|
205
|
+
},
|
|
206
|
+
headers: {
|
|
207
|
+
type: 'json',
|
|
208
|
+
optional: true,
|
|
209
|
+
description: 'Required headers',
|
|
210
|
+
},
|
|
211
|
+
// Body
|
|
212
|
+
requestBody: {
|
|
213
|
+
type: 'json',
|
|
214
|
+
optional: true,
|
|
215
|
+
description: 'Request body schema',
|
|
216
|
+
},
|
|
217
|
+
responseBody: {
|
|
218
|
+
type: 'json',
|
|
219
|
+
optional: true,
|
|
220
|
+
description: 'Response body schema',
|
|
221
|
+
},
|
|
222
|
+
contentType: {
|
|
223
|
+
type: 'string',
|
|
224
|
+
optional: true,
|
|
225
|
+
description: 'Content type',
|
|
226
|
+
examples: ['application/json', 'multipart/form-data', 'text/plain'],
|
|
227
|
+
},
|
|
228
|
+
// Authentication
|
|
229
|
+
requiresAuth: {
|
|
230
|
+
type: 'boolean',
|
|
231
|
+
optional: true,
|
|
232
|
+
description: 'Requires authentication',
|
|
233
|
+
},
|
|
234
|
+
requiredScopes: {
|
|
235
|
+
type: 'string',
|
|
236
|
+
array: true,
|
|
237
|
+
optional: true,
|
|
238
|
+
description: 'Required OAuth scopes',
|
|
239
|
+
},
|
|
240
|
+
// Rate Limiting
|
|
241
|
+
rateLimit: {
|
|
242
|
+
type: 'number',
|
|
243
|
+
optional: true,
|
|
244
|
+
description: 'Endpoint-specific rate limit',
|
|
245
|
+
},
|
|
246
|
+
// Caching
|
|
247
|
+
cacheable: {
|
|
248
|
+
type: 'boolean',
|
|
249
|
+
optional: true,
|
|
250
|
+
description: 'Response is cacheable',
|
|
251
|
+
},
|
|
252
|
+
cacheTTL: {
|
|
253
|
+
type: 'number',
|
|
254
|
+
optional: true,
|
|
255
|
+
description: 'Cache TTL in seconds',
|
|
256
|
+
},
|
|
257
|
+
// Status
|
|
258
|
+
status: {
|
|
259
|
+
type: 'string',
|
|
260
|
+
description: 'Endpoint status',
|
|
261
|
+
examples: ['active', 'deprecated', 'removed'],
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
relationships: {
|
|
265
|
+
api: {
|
|
266
|
+
type: 'API',
|
|
267
|
+
description: 'Parent API',
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
actions: [
|
|
271
|
+
'create',
|
|
272
|
+
'update',
|
|
273
|
+
'enable',
|
|
274
|
+
'disable',
|
|
275
|
+
'deprecate',
|
|
276
|
+
'remove',
|
|
277
|
+
],
|
|
278
|
+
events: [
|
|
279
|
+
'created',
|
|
280
|
+
'updated',
|
|
281
|
+
'enabled',
|
|
282
|
+
'disabled',
|
|
283
|
+
'deprecated',
|
|
284
|
+
'removed',
|
|
285
|
+
],
|
|
286
|
+
};
|
|
287
|
+
// =============================================================================
|
|
288
|
+
// SDK
|
|
289
|
+
// =============================================================================
|
|
290
|
+
/**
|
|
291
|
+
* SDK entity
|
|
292
|
+
*
|
|
293
|
+
* Software development kit for consuming APIs.
|
|
294
|
+
*/
|
|
295
|
+
export const SDK = {
|
|
296
|
+
singular: 'sdk',
|
|
297
|
+
plural: 'sdks',
|
|
298
|
+
description: 'A software development kit for accessing an API',
|
|
299
|
+
properties: {
|
|
300
|
+
// Identity
|
|
301
|
+
name: {
|
|
302
|
+
type: 'string',
|
|
303
|
+
description: 'SDK name',
|
|
304
|
+
},
|
|
305
|
+
description: {
|
|
306
|
+
type: 'string',
|
|
307
|
+
optional: true,
|
|
308
|
+
description: 'SDK description',
|
|
309
|
+
},
|
|
310
|
+
// Target
|
|
311
|
+
language: {
|
|
312
|
+
type: 'string',
|
|
313
|
+
description: 'Target programming language',
|
|
314
|
+
examples: ['typescript', 'javascript', 'python', 'go', 'rust', 'java', 'csharp', 'ruby', 'php', 'swift', 'kotlin'],
|
|
315
|
+
},
|
|
316
|
+
runtime: {
|
|
317
|
+
type: 'string',
|
|
318
|
+
optional: true,
|
|
319
|
+
description: 'Target runtime',
|
|
320
|
+
examples: ['node', 'bun', 'deno', 'browser', 'native'],
|
|
321
|
+
},
|
|
322
|
+
// Package
|
|
323
|
+
packageName: {
|
|
324
|
+
type: 'string',
|
|
325
|
+
optional: true,
|
|
326
|
+
description: 'Package name',
|
|
327
|
+
},
|
|
328
|
+
version: {
|
|
329
|
+
type: 'string',
|
|
330
|
+
optional: true,
|
|
331
|
+
description: 'Current version',
|
|
332
|
+
},
|
|
333
|
+
registry: {
|
|
334
|
+
type: 'string',
|
|
335
|
+
optional: true,
|
|
336
|
+
description: 'Package registry',
|
|
337
|
+
examples: ['npm', 'pypi', 'crates', 'maven', 'nuget', 'rubygems'],
|
|
338
|
+
},
|
|
339
|
+
// Installation
|
|
340
|
+
installCommand: {
|
|
341
|
+
type: 'string',
|
|
342
|
+
optional: true,
|
|
343
|
+
description: 'Installation command',
|
|
344
|
+
},
|
|
345
|
+
// Generation
|
|
346
|
+
generator: {
|
|
347
|
+
type: 'string',
|
|
348
|
+
optional: true,
|
|
349
|
+
description: 'SDK generator used',
|
|
350
|
+
examples: ['openapi-generator', 'swagger-codegen', 'fern', 'speakeasy', 'custom'],
|
|
351
|
+
},
|
|
352
|
+
autoGenerated: {
|
|
353
|
+
type: 'boolean',
|
|
354
|
+
optional: true,
|
|
355
|
+
description: 'Auto-generated from spec',
|
|
356
|
+
},
|
|
357
|
+
// Documentation
|
|
358
|
+
docsUrl: {
|
|
359
|
+
type: 'string',
|
|
360
|
+
optional: true,
|
|
361
|
+
description: 'SDK documentation URL',
|
|
362
|
+
},
|
|
363
|
+
repositoryUrl: {
|
|
364
|
+
type: 'string',
|
|
365
|
+
optional: true,
|
|
366
|
+
description: 'Source repository URL',
|
|
367
|
+
},
|
|
368
|
+
// Status
|
|
369
|
+
status: {
|
|
370
|
+
type: 'string',
|
|
371
|
+
description: 'SDK status',
|
|
372
|
+
examples: ['alpha', 'beta', 'stable', 'deprecated'],
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
relationships: {
|
|
376
|
+
api: {
|
|
377
|
+
type: 'API',
|
|
378
|
+
description: 'Parent API',
|
|
379
|
+
},
|
|
380
|
+
exports: {
|
|
381
|
+
type: 'SDKExport[]',
|
|
382
|
+
description: 'Exported functions/classes',
|
|
383
|
+
},
|
|
384
|
+
examples: {
|
|
385
|
+
type: 'SDKExample[]',
|
|
386
|
+
description: 'Code examples',
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
actions: [
|
|
390
|
+
'create',
|
|
391
|
+
'update',
|
|
392
|
+
'generate',
|
|
393
|
+
'publish',
|
|
394
|
+
'deprecate',
|
|
395
|
+
],
|
|
396
|
+
events: [
|
|
397
|
+
'created',
|
|
398
|
+
'updated',
|
|
399
|
+
'generated',
|
|
400
|
+
'published',
|
|
401
|
+
'deprecated',
|
|
402
|
+
],
|
|
403
|
+
};
|
|
404
|
+
// =============================================================================
|
|
405
|
+
// MCP
|
|
406
|
+
// =============================================================================
|
|
407
|
+
/**
|
|
408
|
+
* MCP entity
|
|
409
|
+
*
|
|
410
|
+
* Model Context Protocol server for AI tool integration.
|
|
411
|
+
*/
|
|
412
|
+
export const MCP = {
|
|
413
|
+
singular: 'mcp',
|
|
414
|
+
plural: 'mcps',
|
|
415
|
+
description: 'A Model Context Protocol server providing AI tools',
|
|
416
|
+
properties: {
|
|
417
|
+
// Identity
|
|
418
|
+
name: {
|
|
419
|
+
type: 'string',
|
|
420
|
+
description: 'MCP server name',
|
|
421
|
+
},
|
|
422
|
+
description: {
|
|
423
|
+
type: 'string',
|
|
424
|
+
optional: true,
|
|
425
|
+
description: 'Server description',
|
|
426
|
+
},
|
|
427
|
+
// Transport
|
|
428
|
+
transport: {
|
|
429
|
+
type: 'string',
|
|
430
|
+
description: 'Transport protocol',
|
|
431
|
+
examples: ['stdio', 'http', 'websocket', 'sse'],
|
|
432
|
+
},
|
|
433
|
+
// Configuration
|
|
434
|
+
host: {
|
|
435
|
+
type: 'string',
|
|
436
|
+
optional: true,
|
|
437
|
+
description: 'Server host',
|
|
438
|
+
},
|
|
439
|
+
port: {
|
|
440
|
+
type: 'number',
|
|
441
|
+
optional: true,
|
|
442
|
+
description: 'Server port',
|
|
443
|
+
},
|
|
444
|
+
command: {
|
|
445
|
+
type: 'string',
|
|
446
|
+
optional: true,
|
|
447
|
+
description: 'Stdio command',
|
|
448
|
+
},
|
|
449
|
+
args: {
|
|
450
|
+
type: 'string',
|
|
451
|
+
array: true,
|
|
452
|
+
optional: true,
|
|
453
|
+
description: 'Command arguments',
|
|
454
|
+
},
|
|
455
|
+
// Capabilities
|
|
456
|
+
toolCount: {
|
|
457
|
+
type: 'number',
|
|
458
|
+
optional: true,
|
|
459
|
+
description: 'Number of tools provided',
|
|
460
|
+
},
|
|
461
|
+
resourceCount: {
|
|
462
|
+
type: 'number',
|
|
463
|
+
optional: true,
|
|
464
|
+
description: 'Number of resources provided',
|
|
465
|
+
},
|
|
466
|
+
promptCount: {
|
|
467
|
+
type: 'number',
|
|
468
|
+
optional: true,
|
|
469
|
+
description: 'Number of prompts provided',
|
|
470
|
+
},
|
|
471
|
+
// Authentication
|
|
472
|
+
authRequired: {
|
|
473
|
+
type: 'boolean',
|
|
474
|
+
optional: true,
|
|
475
|
+
description: 'Authentication required',
|
|
476
|
+
},
|
|
477
|
+
authType: {
|
|
478
|
+
type: 'string',
|
|
479
|
+
optional: true,
|
|
480
|
+
description: 'Authentication type',
|
|
481
|
+
examples: ['bearer', 'api-key', 'oauth2'],
|
|
482
|
+
},
|
|
483
|
+
// Status
|
|
484
|
+
status: {
|
|
485
|
+
type: 'string',
|
|
486
|
+
description: 'Server status',
|
|
487
|
+
examples: ['active', 'inactive', 'deprecated'],
|
|
488
|
+
},
|
|
489
|
+
},
|
|
490
|
+
relationships: {
|
|
491
|
+
product: {
|
|
492
|
+
type: 'DigitalProduct',
|
|
493
|
+
description: 'Parent product',
|
|
494
|
+
},
|
|
495
|
+
tools: {
|
|
496
|
+
type: 'Tool[]',
|
|
497
|
+
description: 'Available tools',
|
|
498
|
+
},
|
|
499
|
+
resources: {
|
|
500
|
+
type: 'Resource[]',
|
|
501
|
+
description: 'Available resources',
|
|
502
|
+
},
|
|
503
|
+
prompts: {
|
|
504
|
+
type: 'Prompt[]',
|
|
505
|
+
description: 'Available prompts',
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
actions: [
|
|
509
|
+
'create',
|
|
510
|
+
'update',
|
|
511
|
+
'start',
|
|
512
|
+
'stop',
|
|
513
|
+
'restart',
|
|
514
|
+
'addTool',
|
|
515
|
+
'removeTool',
|
|
516
|
+
'deprecate',
|
|
517
|
+
],
|
|
518
|
+
events: [
|
|
519
|
+
'created',
|
|
520
|
+
'updated',
|
|
521
|
+
'started',
|
|
522
|
+
'stopped',
|
|
523
|
+
'restarted',
|
|
524
|
+
'toolAdded',
|
|
525
|
+
'toolRemoved',
|
|
526
|
+
'deprecated',
|
|
527
|
+
],
|
|
528
|
+
};
|
|
529
|
+
// =============================================================================
|
|
530
|
+
// Plugin
|
|
531
|
+
// =============================================================================
|
|
532
|
+
/**
|
|
533
|
+
* Plugin entity
|
|
534
|
+
*
|
|
535
|
+
* Extension for existing platforms or applications.
|
|
536
|
+
*/
|
|
537
|
+
export const Plugin = {
|
|
538
|
+
singular: 'plugin',
|
|
539
|
+
plural: 'plugins',
|
|
540
|
+
description: 'An extension that adds functionality to a platform',
|
|
541
|
+
properties: {
|
|
542
|
+
// Identity
|
|
543
|
+
name: {
|
|
544
|
+
type: 'string',
|
|
545
|
+
description: 'Plugin name',
|
|
546
|
+
},
|
|
547
|
+
slug: {
|
|
548
|
+
type: 'string',
|
|
549
|
+
optional: true,
|
|
550
|
+
description: 'URL-friendly identifier',
|
|
551
|
+
},
|
|
552
|
+
description: {
|
|
553
|
+
type: 'string',
|
|
554
|
+
optional: true,
|
|
555
|
+
description: 'Plugin description',
|
|
556
|
+
},
|
|
557
|
+
// Target
|
|
558
|
+
platform: {
|
|
559
|
+
type: 'string',
|
|
560
|
+
description: 'Target platform',
|
|
561
|
+
examples: ['vscode', 'chrome', 'figma', 'slack', 'notion', 'shopify', 'wordpress'],
|
|
562
|
+
},
|
|
563
|
+
platformVersion: {
|
|
564
|
+
type: 'string',
|
|
565
|
+
optional: true,
|
|
566
|
+
description: 'Minimum platform version',
|
|
567
|
+
},
|
|
568
|
+
// Package
|
|
569
|
+
version: {
|
|
570
|
+
type: 'string',
|
|
571
|
+
optional: true,
|
|
572
|
+
description: 'Plugin version',
|
|
573
|
+
},
|
|
574
|
+
author: {
|
|
575
|
+
type: 'string',
|
|
576
|
+
optional: true,
|
|
577
|
+
description: 'Plugin author',
|
|
578
|
+
},
|
|
579
|
+
// Capabilities
|
|
580
|
+
permissions: {
|
|
581
|
+
type: 'string',
|
|
582
|
+
array: true,
|
|
583
|
+
optional: true,
|
|
584
|
+
description: 'Required permissions',
|
|
585
|
+
},
|
|
586
|
+
extensionPoints: {
|
|
587
|
+
type: 'string',
|
|
588
|
+
array: true,
|
|
589
|
+
optional: true,
|
|
590
|
+
description: 'Extension points used',
|
|
591
|
+
},
|
|
592
|
+
// Distribution
|
|
593
|
+
marketplaceUrl: {
|
|
594
|
+
type: 'string',
|
|
595
|
+
optional: true,
|
|
596
|
+
description: 'Marketplace listing URL',
|
|
597
|
+
},
|
|
598
|
+
installCount: {
|
|
599
|
+
type: 'number',
|
|
600
|
+
optional: true,
|
|
601
|
+
description: 'Total install count',
|
|
602
|
+
},
|
|
603
|
+
rating: {
|
|
604
|
+
type: 'number',
|
|
605
|
+
optional: true,
|
|
606
|
+
description: 'Average rating',
|
|
607
|
+
},
|
|
608
|
+
// Status
|
|
609
|
+
status: {
|
|
610
|
+
type: 'string',
|
|
611
|
+
description: 'Plugin status',
|
|
612
|
+
examples: ['draft', 'review', 'published', 'suspended', 'deprecated'],
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
relationships: {
|
|
616
|
+
product: {
|
|
617
|
+
type: 'DigitalProduct',
|
|
618
|
+
description: 'Parent product',
|
|
619
|
+
},
|
|
620
|
+
versions: {
|
|
621
|
+
type: 'Version[]',
|
|
622
|
+
description: 'Plugin versions',
|
|
623
|
+
},
|
|
624
|
+
},
|
|
625
|
+
actions: [
|
|
626
|
+
'create',
|
|
627
|
+
'update',
|
|
628
|
+
'submit',
|
|
629
|
+
'publish',
|
|
630
|
+
'update',
|
|
631
|
+
'suspend',
|
|
632
|
+
'deprecate',
|
|
633
|
+
],
|
|
634
|
+
events: [
|
|
635
|
+
'created',
|
|
636
|
+
'updated',
|
|
637
|
+
'submitted',
|
|
638
|
+
'published',
|
|
639
|
+
'suspended',
|
|
640
|
+
'deprecated',
|
|
641
|
+
],
|
|
642
|
+
};
|
|
643
|
+
// =============================================================================
|
|
644
|
+
// Integration
|
|
645
|
+
// =============================================================================
|
|
646
|
+
/**
|
|
647
|
+
* Integration entity
|
|
648
|
+
*
|
|
649
|
+
* Connection between two systems or platforms.
|
|
650
|
+
*/
|
|
651
|
+
export const Integration = {
|
|
652
|
+
singular: 'integration',
|
|
653
|
+
plural: 'integrations',
|
|
654
|
+
description: 'A connection between systems enabling data or functionality sharing',
|
|
655
|
+
properties: {
|
|
656
|
+
// Identity
|
|
657
|
+
name: {
|
|
658
|
+
type: 'string',
|
|
659
|
+
description: 'Integration name',
|
|
660
|
+
},
|
|
661
|
+
slug: {
|
|
662
|
+
type: 'string',
|
|
663
|
+
optional: true,
|
|
664
|
+
description: 'URL-friendly identifier',
|
|
665
|
+
},
|
|
666
|
+
description: {
|
|
667
|
+
type: 'string',
|
|
668
|
+
optional: true,
|
|
669
|
+
description: 'Integration description',
|
|
670
|
+
},
|
|
671
|
+
// Connection
|
|
672
|
+
sourceSystem: {
|
|
673
|
+
type: 'string',
|
|
674
|
+
description: 'Source system',
|
|
675
|
+
},
|
|
676
|
+
targetSystem: {
|
|
677
|
+
type: 'string',
|
|
678
|
+
description: 'Target system',
|
|
679
|
+
},
|
|
680
|
+
direction: {
|
|
681
|
+
type: 'string',
|
|
682
|
+
description: 'Data flow direction',
|
|
683
|
+
examples: ['one-way', 'two-way', 'bidirectional'],
|
|
684
|
+
},
|
|
685
|
+
// Type
|
|
686
|
+
type: {
|
|
687
|
+
type: 'string',
|
|
688
|
+
description: 'Integration type',
|
|
689
|
+
examples: ['native', 'oauth', 'api-key', 'webhook', 'embedded', 'custom'],
|
|
690
|
+
},
|
|
691
|
+
protocol: {
|
|
692
|
+
type: 'string',
|
|
693
|
+
optional: true,
|
|
694
|
+
description: 'Integration protocol',
|
|
695
|
+
examples: ['rest', 'graphql', 'grpc', 'soap', 'sftp', 'custom'],
|
|
696
|
+
},
|
|
697
|
+
// Data
|
|
698
|
+
dataTypes: {
|
|
699
|
+
type: 'string',
|
|
700
|
+
array: true,
|
|
701
|
+
optional: true,
|
|
702
|
+
description: 'Types of data exchanged',
|
|
703
|
+
},
|
|
704
|
+
syncFrequency: {
|
|
705
|
+
type: 'string',
|
|
706
|
+
optional: true,
|
|
707
|
+
description: 'Sync frequency',
|
|
708
|
+
examples: ['realtime', 'hourly', 'daily', 'on-demand'],
|
|
709
|
+
},
|
|
710
|
+
// Configuration
|
|
711
|
+
configSchema: {
|
|
712
|
+
type: 'json',
|
|
713
|
+
optional: true,
|
|
714
|
+
description: 'Configuration schema',
|
|
715
|
+
},
|
|
716
|
+
requiredScopes: {
|
|
717
|
+
type: 'string',
|
|
718
|
+
array: true,
|
|
719
|
+
optional: true,
|
|
720
|
+
description: 'Required OAuth scopes',
|
|
721
|
+
},
|
|
722
|
+
// Status
|
|
723
|
+
status: {
|
|
724
|
+
type: 'string',
|
|
725
|
+
description: 'Integration status',
|
|
726
|
+
examples: ['draft', 'active', 'paused', 'deprecated'],
|
|
727
|
+
},
|
|
728
|
+
},
|
|
729
|
+
relationships: {
|
|
730
|
+
product: {
|
|
731
|
+
type: 'DigitalProduct',
|
|
732
|
+
description: 'Parent product',
|
|
733
|
+
},
|
|
734
|
+
sourceApi: {
|
|
735
|
+
type: 'API',
|
|
736
|
+
required: false,
|
|
737
|
+
description: 'Source API',
|
|
738
|
+
},
|
|
739
|
+
targetApi: {
|
|
740
|
+
type: 'API',
|
|
741
|
+
required: false,
|
|
742
|
+
description: 'Target API',
|
|
743
|
+
},
|
|
744
|
+
webhooks: {
|
|
745
|
+
type: 'Webhook[]',
|
|
746
|
+
description: 'Integration webhooks',
|
|
747
|
+
},
|
|
748
|
+
},
|
|
749
|
+
actions: [
|
|
750
|
+
'create',
|
|
751
|
+
'update',
|
|
752
|
+
'configure',
|
|
753
|
+
'activate',
|
|
754
|
+
'pause',
|
|
755
|
+
'sync',
|
|
756
|
+
'test',
|
|
757
|
+
'deprecate',
|
|
758
|
+
],
|
|
759
|
+
events: [
|
|
760
|
+
'created',
|
|
761
|
+
'updated',
|
|
762
|
+
'configured',
|
|
763
|
+
'activated',
|
|
764
|
+
'paused',
|
|
765
|
+
'synced',
|
|
766
|
+
'tested',
|
|
767
|
+
'deprecated',
|
|
768
|
+
],
|
|
769
|
+
};
|
|
770
|
+
// =============================================================================
|
|
771
|
+
// Webhook
|
|
772
|
+
// =============================================================================
|
|
773
|
+
/**
|
|
774
|
+
* Webhook entity
|
|
775
|
+
*
|
|
776
|
+
* Event-driven callback endpoint.
|
|
777
|
+
*/
|
|
778
|
+
export const Webhook = {
|
|
779
|
+
singular: 'webhook',
|
|
780
|
+
plural: 'webhooks',
|
|
781
|
+
description: 'An event-driven HTTP callback endpoint',
|
|
782
|
+
properties: {
|
|
783
|
+
// Identity
|
|
784
|
+
name: {
|
|
785
|
+
type: 'string',
|
|
786
|
+
description: 'Webhook name',
|
|
787
|
+
},
|
|
788
|
+
description: {
|
|
789
|
+
type: 'string',
|
|
790
|
+
optional: true,
|
|
791
|
+
description: 'Webhook description',
|
|
792
|
+
},
|
|
793
|
+
// Events
|
|
794
|
+
events: {
|
|
795
|
+
type: 'string',
|
|
796
|
+
array: true,
|
|
797
|
+
description: 'Events that trigger this webhook',
|
|
798
|
+
},
|
|
799
|
+
// Endpoint
|
|
800
|
+
url: {
|
|
801
|
+
type: 'string',
|
|
802
|
+
description: 'Callback URL',
|
|
803
|
+
},
|
|
804
|
+
method: {
|
|
805
|
+
type: 'string',
|
|
806
|
+
optional: true,
|
|
807
|
+
description: 'HTTP method',
|
|
808
|
+
examples: ['POST', 'PUT'],
|
|
809
|
+
},
|
|
810
|
+
// Payload
|
|
811
|
+
payloadSchema: {
|
|
812
|
+
type: 'json',
|
|
813
|
+
optional: true,
|
|
814
|
+
description: 'Payload schema',
|
|
815
|
+
},
|
|
816
|
+
contentType: {
|
|
817
|
+
type: 'string',
|
|
818
|
+
optional: true,
|
|
819
|
+
description: 'Content type',
|
|
820
|
+
examples: ['application/json', 'application/x-www-form-urlencoded'],
|
|
821
|
+
},
|
|
822
|
+
// Security
|
|
823
|
+
secret: {
|
|
824
|
+
type: 'string',
|
|
825
|
+
optional: true,
|
|
826
|
+
description: 'Webhook secret for signature validation',
|
|
827
|
+
},
|
|
828
|
+
signatureHeader: {
|
|
829
|
+
type: 'string',
|
|
830
|
+
optional: true,
|
|
831
|
+
description: 'Header name for signature',
|
|
832
|
+
},
|
|
833
|
+
signatureAlgorithm: {
|
|
834
|
+
type: 'string',
|
|
835
|
+
optional: true,
|
|
836
|
+
description: 'Signature algorithm',
|
|
837
|
+
examples: ['hmac-sha256', 'hmac-sha1'],
|
|
838
|
+
},
|
|
839
|
+
// Delivery
|
|
840
|
+
retryPolicy: {
|
|
841
|
+
type: 'string',
|
|
842
|
+
optional: true,
|
|
843
|
+
description: 'Retry policy',
|
|
844
|
+
examples: ['none', 'exponential', 'linear', 'fixed'],
|
|
845
|
+
},
|
|
846
|
+
maxRetries: {
|
|
847
|
+
type: 'number',
|
|
848
|
+
optional: true,
|
|
849
|
+
description: 'Maximum retry attempts',
|
|
850
|
+
},
|
|
851
|
+
timeoutMs: {
|
|
852
|
+
type: 'number',
|
|
853
|
+
optional: true,
|
|
854
|
+
description: 'Request timeout in milliseconds',
|
|
855
|
+
},
|
|
856
|
+
// Status
|
|
857
|
+
status: {
|
|
858
|
+
type: 'string',
|
|
859
|
+
description: 'Webhook status',
|
|
860
|
+
examples: ['active', 'paused', 'failed', 'disabled'],
|
|
861
|
+
},
|
|
862
|
+
lastDeliveryAt: {
|
|
863
|
+
type: 'date',
|
|
864
|
+
optional: true,
|
|
865
|
+
description: 'Last successful delivery',
|
|
866
|
+
},
|
|
867
|
+
failureCount: {
|
|
868
|
+
type: 'number',
|
|
869
|
+
optional: true,
|
|
870
|
+
description: 'Consecutive failure count',
|
|
871
|
+
},
|
|
872
|
+
},
|
|
873
|
+
relationships: {
|
|
874
|
+
api: {
|
|
875
|
+
type: 'API',
|
|
876
|
+
required: false,
|
|
877
|
+
description: 'Parent API',
|
|
878
|
+
},
|
|
879
|
+
integration: {
|
|
880
|
+
type: 'Integration',
|
|
881
|
+
required: false,
|
|
882
|
+
description: 'Parent integration',
|
|
883
|
+
},
|
|
884
|
+
deliveries: {
|
|
885
|
+
type: 'WebhookDelivery[]',
|
|
886
|
+
description: 'Delivery history',
|
|
887
|
+
},
|
|
888
|
+
},
|
|
889
|
+
actions: [
|
|
890
|
+
'create',
|
|
891
|
+
'update',
|
|
892
|
+
'enable',
|
|
893
|
+
'disable',
|
|
894
|
+
'test',
|
|
895
|
+
'retry',
|
|
896
|
+
'resetSecret',
|
|
897
|
+
'delete',
|
|
898
|
+
],
|
|
899
|
+
events: [
|
|
900
|
+
'created',
|
|
901
|
+
'updated',
|
|
902
|
+
'enabled',
|
|
903
|
+
'disabled',
|
|
904
|
+
'tested',
|
|
905
|
+
'delivered',
|
|
906
|
+
'failed',
|
|
907
|
+
'retried',
|
|
908
|
+
'deleted',
|
|
909
|
+
],
|
|
910
|
+
};
|
|
911
|
+
// =============================================================================
|
|
912
|
+
// Exports
|
|
913
|
+
// =============================================================================
|
|
914
|
+
export const InterfaceEntities = {
|
|
915
|
+
API,
|
|
916
|
+
Endpoint,
|
|
917
|
+
SDK,
|
|
918
|
+
MCP,
|
|
919
|
+
Plugin,
|
|
920
|
+
Integration,
|
|
921
|
+
Webhook,
|
|
922
|
+
};
|
|
923
|
+
export const InterfaceCategories = {
|
|
924
|
+
apis: ['API', 'Endpoint'],
|
|
925
|
+
sdks: ['SDK'],
|
|
926
|
+
ai: ['MCP'],
|
|
927
|
+
extensions: ['Plugin'],
|
|
928
|
+
connections: ['Integration', 'Webhook'],
|
|
929
|
+
};
|
|
930
|
+
//# sourceMappingURL=interfaces.js.map
|