@objectstack/spec 0.8.2 → 0.9.0
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/dist/ai/devops-agent.zod.d.ts +1 -1
- package/dist/ai/feedback-loop.zod.d.ts +4293 -0
- package/dist/ai/feedback-loop.zod.d.ts.map +1 -0
- package/dist/ai/feedback-loop.zod.js +53 -0
- package/dist/ai/index.d.ts +1 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +1 -0
- package/dist/api/documentation.zod.d.ts +1073 -0
- package/dist/api/documentation.zod.d.ts.map +1 -0
- package/dist/api/documentation.zod.js +487 -0
- package/dist/api/errors.zod.d.ts +6 -6
- package/dist/api/graphql.zod.d.ts +3 -3
- package/dist/api/hub.zod.d.ts +5239 -0
- package/dist/api/hub.zod.d.ts.map +1 -0
- package/dist/api/hub.zod.js +784 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +4 -0
- package/dist/api/odata.zod.d.ts +1 -1
- package/dist/api/registry.example.d.ts +411 -0
- package/dist/api/registry.example.d.ts.map +1 -0
- package/dist/api/registry.example.js +470 -0
- package/dist/api/registry.zod.d.ts +2095 -0
- package/dist/api/registry.zod.d.ts.map +1 -0
- package/dist/api/registry.zod.js +755 -0
- package/dist/api/websocket.zod.d.ts +8 -8
- package/dist/auth/scim.zod.d.ts +3 -3
- package/dist/automation/flow.zod.d.ts +3 -3
- package/dist/contracts/index.d.ts +1 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +1 -0
- package/dist/contracts/schema-driver.d.ts +21 -0
- package/dist/contracts/schema-driver.d.ts.map +1 -0
- package/dist/contracts/schema-driver.js +2 -0
- package/dist/hub/composer.zod.d.ts +226 -0
- package/dist/hub/composer.zod.d.ts.map +1 -1
- package/dist/hub/hub-federation.zod.d.ts +764 -0
- package/dist/hub/hub-federation.zod.d.ts.map +1 -0
- package/dist/hub/hub-federation.zod.js +441 -0
- package/dist/hub/index.d.ts +2 -0
- package/dist/hub/index.d.ts.map +1 -1
- package/dist/hub/index.js +3 -0
- package/dist/hub/plugin-security.zod.d.ts +1029 -0
- package/dist/hub/plugin-security.zod.d.ts.map +1 -0
- package/dist/hub/plugin-security.zod.js +637 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/integration/connector/vercel.zod.d.ts +2 -2
- package/dist/qa/index.d.ts +11 -0
- package/dist/qa/index.d.ts.map +1 -0
- package/dist/qa/index.js +26 -0
- package/dist/qa/testing.zod.d.ts +345 -0
- package/dist/qa/testing.zod.d.ts.map +1 -0
- package/dist/qa/testing.zod.js +69 -0
- package/dist/stack.zod.d.ts +576 -3
- package/dist/stack.zod.d.ts.map +1 -1
- package/dist/system/index.d.ts +2 -0
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +2 -0
- package/dist/system/manifest.zod.d.ts +226 -0
- package/dist/system/manifest.zod.d.ts.map +1 -1
- package/dist/system/manifest.zod.js +8 -0
- package/dist/system/message-queue.zod.d.ts +2 -2
- package/dist/system/metadata-loader.zod.d.ts +1 -1
- package/dist/system/migration.zod.d.ts +4205 -0
- package/dist/system/migration.zod.d.ts.map +1 -0
- package/dist/system/migration.zod.js +70 -0
- package/dist/system/plugin-loading.zod.d.ts +575 -0
- package/dist/system/plugin-loading.zod.d.ts.map +1 -0
- package/dist/system/plugin-loading.zod.js +612 -0
- package/json-schema/ai/FeedbackLoop.json +7 -0
- package/json-schema/ai/Issue.json +7 -0
- package/json-schema/ai/MetadataSource.json +7 -0
- package/json-schema/ai/Resolution.json +7 -0
- package/json-schema/api/ApiChangelogEntry.json +7 -0
- package/json-schema/api/ApiDiscoveryQuery.json +7 -0
- package/json-schema/api/ApiDiscoveryResponse.json +7 -0
- package/json-schema/api/ApiDocumentationConfig.json +7 -0
- package/json-schema/api/ApiEndpointRegistration.json +7 -0
- package/json-schema/api/ApiMetadata.json +7 -0
- package/json-schema/api/ApiParameter.json +7 -0
- package/json-schema/api/ApiProtocolType.json +7 -0
- package/json-schema/api/ApiRegistry.json +7 -0
- package/json-schema/api/ApiRegistryEntry.json +7 -0
- package/json-schema/api/ApiResponse.json +7 -0
- package/json-schema/api/ApiTestCollection.json +7 -0
- package/json-schema/api/ApiTestRequest.json +7 -0
- package/json-schema/api/ApiTestingUiConfig.json +7 -0
- package/json-schema/api/ApiTestingUiType.json +7 -0
- package/json-schema/api/BuildStatusResponse.json +7 -0
- package/json-schema/api/CodeGenerationTemplate.json +7 -0
- package/json-schema/api/CompileManifestRequest.json +7 -0
- package/json-schema/api/CompileManifestResponse.json +7 -0
- package/json-schema/api/ConflictResolutionStrategy.json +7 -0
- package/json-schema/api/CreateSpaceRequest.json +7 -0
- package/json-schema/api/CreateTenantRequest.json +7 -0
- package/json-schema/api/GeneratedApiDocumentation.json +7 -0
- package/json-schema/api/GetBuildStatusRequest.json +7 -0
- package/json-schema/api/GetMarketplacePluginRequest.json +7 -0
- package/json-schema/api/GetPluginVersionsRequest.json +7 -0
- package/json-schema/api/GetPluginVersionsResponse.json +7 -0
- package/json-schema/api/HttpStatusCode.json +7 -0
- package/json-schema/api/HubHealthResponse.json +7 -0
- package/json-schema/api/HubMetricsResponse.json +7 -0
- package/json-schema/api/IssueLicenseRequest.json +7 -0
- package/json-schema/api/LicenseResponse.json +7 -0
- package/json-schema/api/ListLicensesRequest.json +7 -0
- package/json-schema/api/ListLicensesResponse.json +7 -0
- package/json-schema/api/ListMarketplaceRequest.json +7 -0
- package/json-schema/api/ListMarketplaceResponse.json +7 -0
- package/json-schema/api/ListSpacesRequest.json +7 -0
- package/json-schema/api/ListSpacesResponse.json +7 -0
- package/json-schema/api/ListTenantsRequest.json +7 -0
- package/json-schema/api/ListTenantsResponse.json +7 -0
- package/json-schema/api/MarketplacePluginResponse.json +7 -0
- package/json-schema/api/ObjectQLReference.json +7 -0
- package/json-schema/api/OpenApiSecurityScheme.json +7 -0
- package/json-schema/api/OpenApiServer.json +7 -0
- package/json-schema/api/OpenApiSpec.json +7 -0
- package/json-schema/api/PaginationRequest.json +7 -0
- package/json-schema/api/PaginationResponse.json +7 -0
- package/json-schema/api/PluginResponse.json +7 -0
- package/json-schema/api/PluginVersionInfo.json +7 -0
- package/json-schema/api/PublishPluginRequest.json +7 -0
- package/json-schema/api/RevokeLicenseRequest.json +7 -0
- package/json-schema/api/SchemaDefinition.json +7 -0
- package/json-schema/api/SearchPluginsRequest.json +7 -0
- package/json-schema/api/SearchPluginsResponse.json +7 -0
- package/json-schema/api/SpaceResponse.json +7 -0
- package/json-schema/api/TenantResponse.json +7 -0
- package/json-schema/api/UpdatePluginRequest.json +7 -0
- package/json-schema/api/UpdateSpaceRequest.json +7 -0
- package/json-schema/api/UpdateTenantRequest.json +7 -0
- package/json-schema/api/ValidateLicenseRequest.json +7 -0
- package/json-schema/api/ValidateLicenseResponse.json +7 -0
- package/json-schema/hub/DependencyConflict.json +7 -0
- package/json-schema/hub/DependencyGraph.json +7 -0
- package/json-schema/hub/DependencyGraphNode.json +7 -0
- package/json-schema/hub/DependencyResolutionResult.json +7 -0
- package/json-schema/hub/EdgeLocation.json +7 -0
- package/json-schema/hub/FederationTopology.json +7 -0
- package/json-schema/hub/GlobalRegistryEntry.json +7 -0
- package/json-schema/hub/HubInstance.json +7 -0
- package/json-schema/hub/PackageDependency.json +7 -0
- package/json-schema/hub/PluginProvenance.json +7 -0
- package/json-schema/hub/PluginTrustScore.json +7 -0
- package/json-schema/hub/Region.json +7 -0
- package/json-schema/hub/ReplicationJob.json +7 -0
- package/json-schema/hub/SBOM.json +7 -0
- package/json-schema/hub/SBOMEntry.json +7 -0
- package/json-schema/hub/SecurityPolicy.json +7 -0
- package/json-schema/hub/SecurityScanResult.json +7 -0
- package/json-schema/hub/SecurityVulnerability.json +7 -0
- package/json-schema/hub/TenantPlacementPolicy.json +7 -0
- package/json-schema/hub/VulnerabilitySeverity.json +7 -0
- package/json-schema/qa/TestAction.json +7 -0
- package/json-schema/qa/TestActionType.json +7 -0
- package/json-schema/qa/TestAssertion.json +7 -0
- package/json-schema/qa/TestAssertionType.json +7 -0
- package/json-schema/qa/TestContext.json +7 -0
- package/json-schema/qa/TestScenario.json +7 -0
- package/json-schema/qa/TestStep.json +7 -0
- package/json-schema/qa/TestSuite.json +7 -0
- package/json-schema/system/AddFieldOperation.json +7 -0
- package/json-schema/system/ChangeSet.json +7 -0
- package/json-schema/system/CreateObjectOperation.json +7 -0
- package/json-schema/system/DeleteObjectOperation.json +7 -0
- package/json-schema/system/ExecuteSqlOperation.json +7 -0
- package/json-schema/system/MigrationDependency.json +7 -0
- package/json-schema/system/MigrationOperation.json +7 -0
- package/json-schema/system/ModifyFieldOperation.json +7 -0
- package/json-schema/system/PluginCaching.json +7 -0
- package/json-schema/system/PluginCodeSplitting.json +7 -0
- package/json-schema/system/PluginDependencyResolution.json +7 -0
- package/json-schema/system/PluginDynamicImport.json +7 -0
- package/json-schema/system/PluginHotReload.json +7 -0
- package/json-schema/system/PluginInitialization.json +7 -0
- package/json-schema/system/PluginLoadingConfig.json +7 -0
- package/json-schema/system/PluginLoadingEvent.json +7 -0
- package/json-schema/system/PluginLoadingState.json +7 -0
- package/json-schema/system/PluginLoadingStrategy.json +7 -0
- package/json-schema/system/PluginPerformanceMonitoring.json +7 -0
- package/json-schema/system/PluginPreloadConfig.json +7 -0
- package/json-schema/system/PluginSandboxing.json +7 -0
- package/json-schema/system/RemoveFieldOperation.json +7 -0
- package/json-schema/system/RenameObjectOperation.json +7 -0
- package/package.json +1 -1
package/dist/api/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* - OData v4 compatibility
|
|
8
8
|
* - Batch operations
|
|
9
9
|
* - Metadata caching
|
|
10
|
+
* - Hub Management APIs
|
|
10
11
|
*/
|
|
11
12
|
export * from './contract.zod';
|
|
12
13
|
export * from './endpoint.zod';
|
|
@@ -21,4 +22,7 @@ export * from './http-cache.zod';
|
|
|
21
22
|
export * from './errors.zod';
|
|
22
23
|
export * from './protocol.zod';
|
|
23
24
|
export * from './rest-server.zod';
|
|
25
|
+
export * from './hub.zod';
|
|
26
|
+
export * from './registry.zod';
|
|
27
|
+
export * from './documentation.zod';
|
|
24
28
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* - OData v4 compatibility
|
|
9
9
|
* - Batch operations
|
|
10
10
|
* - Metadata caching
|
|
11
|
+
* - Hub Management APIs
|
|
11
12
|
*/
|
|
12
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
14
|
if (k2 === undefined) k2 = k;
|
|
@@ -37,5 +38,8 @@ __exportStar(require("./http-cache.zod"), exports);
|
|
|
37
38
|
__exportStar(require("./errors.zod"), exports);
|
|
38
39
|
__exportStar(require("./protocol.zod"), exports);
|
|
39
40
|
__exportStar(require("./rest-server.zod"), exports);
|
|
41
|
+
__exportStar(require("./hub.zod"), exports);
|
|
42
|
+
__exportStar(require("./registry.zod"), exports);
|
|
43
|
+
__exportStar(require("./documentation.zod"), exports);
|
|
40
44
|
// Legacy interface export (deprecated)
|
|
41
45
|
// export type { IObjectStackProtocol } from './protocol';
|
package/dist/api/odata.zod.d.ts
CHANGED
|
@@ -125,9 +125,9 @@ export declare const ODataFilterFunctionSchema: z.ZodEnum<{
|
|
|
125
125
|
day: "day";
|
|
126
126
|
month: "month";
|
|
127
127
|
year: "year";
|
|
128
|
+
contains: "contains";
|
|
128
129
|
second: "second";
|
|
129
130
|
hour: "hour";
|
|
130
|
-
contains: "contains";
|
|
131
131
|
startswith: "startswith";
|
|
132
132
|
endswith: "endswith";
|
|
133
133
|
indexof: "indexof";
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Registry Enhancement Examples
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates all the enhancements made to the Unified API Registry:
|
|
5
|
+
* 1. RBAC Integration
|
|
6
|
+
* 2. Dynamic Schema Linking (ObjectQL References)
|
|
7
|
+
* 3. Protocol Extensibility
|
|
8
|
+
* 4. Route Conflict Detection
|
|
9
|
+
*/
|
|
10
|
+
import { type ConflictResolutionStrategy } from './registry.zod';
|
|
11
|
+
/**
|
|
12
|
+
* Example: Endpoint with RBAC Permission Requirements
|
|
13
|
+
*
|
|
14
|
+
* The gateway automatically validates these permissions before
|
|
15
|
+
* allowing the request to proceed.
|
|
16
|
+
*/
|
|
17
|
+
declare const endpointWithRBAC: {
|
|
18
|
+
id: string;
|
|
19
|
+
method: "GET";
|
|
20
|
+
path: string;
|
|
21
|
+
summary: string;
|
|
22
|
+
description: string;
|
|
23
|
+
requiredPermissions: string[];
|
|
24
|
+
parameters: {
|
|
25
|
+
name: string;
|
|
26
|
+
in: "path";
|
|
27
|
+
required: true;
|
|
28
|
+
schema: {
|
|
29
|
+
type: "string";
|
|
30
|
+
format: string;
|
|
31
|
+
};
|
|
32
|
+
}[];
|
|
33
|
+
responses: {
|
|
34
|
+
statusCode: number;
|
|
35
|
+
description: string;
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Example: Admin Endpoint with Multiple Permissions
|
|
40
|
+
*
|
|
41
|
+
* All listed permissions must be satisfied (AND logic).
|
|
42
|
+
*/
|
|
43
|
+
declare const adminEndpoint: {
|
|
44
|
+
id: string;
|
|
45
|
+
method: "POST";
|
|
46
|
+
path: string;
|
|
47
|
+
summary: string;
|
|
48
|
+
requiredPermissions: string[];
|
|
49
|
+
responses: never[];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Example: Response with ObjectQL Reference
|
|
53
|
+
*
|
|
54
|
+
* Instead of duplicating the customer schema, we reference
|
|
55
|
+
* the ObjectQL object definition. When the object schema changes,
|
|
56
|
+
* the API documentation automatically updates.
|
|
57
|
+
*/
|
|
58
|
+
declare const endpointWithDynamicSchema: {
|
|
59
|
+
id: string;
|
|
60
|
+
method: "GET";
|
|
61
|
+
path: string;
|
|
62
|
+
summary: string;
|
|
63
|
+
parameters: {
|
|
64
|
+
name: string;
|
|
65
|
+
in: "path";
|
|
66
|
+
required: true;
|
|
67
|
+
schema: {
|
|
68
|
+
type: "string";
|
|
69
|
+
};
|
|
70
|
+
}[];
|
|
71
|
+
responses: {
|
|
72
|
+
statusCode: number;
|
|
73
|
+
description: string;
|
|
74
|
+
schema: {
|
|
75
|
+
$ref: {
|
|
76
|
+
objectId: string;
|
|
77
|
+
excludeFields: string[];
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
}[];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Example: Request Body with ObjectQL Reference
|
|
84
|
+
*
|
|
85
|
+
* The request body schema references the customer object,
|
|
86
|
+
* but only includes specific fields allowed for creation.
|
|
87
|
+
*/
|
|
88
|
+
declare const createEndpointWithDynamicSchema: {
|
|
89
|
+
id: string;
|
|
90
|
+
method: "POST";
|
|
91
|
+
path: string;
|
|
92
|
+
summary: string;
|
|
93
|
+
requestBody: {
|
|
94
|
+
description: string;
|
|
95
|
+
required: true;
|
|
96
|
+
schema: {
|
|
97
|
+
$ref: {
|
|
98
|
+
objectId: string;
|
|
99
|
+
includeFields: string[];
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
responses: {
|
|
104
|
+
statusCode: number;
|
|
105
|
+
description: string;
|
|
106
|
+
schema: {
|
|
107
|
+
$ref: {
|
|
108
|
+
objectId: string;
|
|
109
|
+
excludeFields: string[];
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
}[];
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Example: Complex Schema with Related Objects
|
|
116
|
+
*
|
|
117
|
+
* Include related objects via lookup fields for a complete response.
|
|
118
|
+
*/
|
|
119
|
+
declare const orderWithRelations: {
|
|
120
|
+
id: string;
|
|
121
|
+
method: "GET";
|
|
122
|
+
path: string;
|
|
123
|
+
summary: string;
|
|
124
|
+
parameters: {
|
|
125
|
+
name: string;
|
|
126
|
+
in: "path";
|
|
127
|
+
required: true;
|
|
128
|
+
schema: {
|
|
129
|
+
type: "string";
|
|
130
|
+
};
|
|
131
|
+
}[];
|
|
132
|
+
responses: {
|
|
133
|
+
statusCode: number;
|
|
134
|
+
description: string;
|
|
135
|
+
schema: {
|
|
136
|
+
$ref: {
|
|
137
|
+
objectId: string;
|
|
138
|
+
includeRelated: string[];
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
}[];
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Example: gRPC Service Endpoint
|
|
145
|
+
*
|
|
146
|
+
* Plugin-registered gRPC service with protocol-specific configuration.
|
|
147
|
+
*/
|
|
148
|
+
declare const grpcEndpoint: {
|
|
149
|
+
id: string;
|
|
150
|
+
path: string;
|
|
151
|
+
summary: string;
|
|
152
|
+
protocolConfig: {
|
|
153
|
+
subProtocol: string;
|
|
154
|
+
serviceName: string;
|
|
155
|
+
methodName: string;
|
|
156
|
+
streaming: boolean;
|
|
157
|
+
packageName: string;
|
|
158
|
+
};
|
|
159
|
+
responses: never[];
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Example: tRPC Procedure
|
|
163
|
+
*
|
|
164
|
+
* tRPC query with procedure-specific metadata.
|
|
165
|
+
*/
|
|
166
|
+
declare const trpcEndpoint: {
|
|
167
|
+
id: string;
|
|
168
|
+
path: string;
|
|
169
|
+
summary: string;
|
|
170
|
+
protocolConfig: {
|
|
171
|
+
subProtocol: string;
|
|
172
|
+
procedureType: string;
|
|
173
|
+
router: string;
|
|
174
|
+
procedureName: string;
|
|
175
|
+
};
|
|
176
|
+
responses: never[];
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Example: WebSocket Event
|
|
180
|
+
*
|
|
181
|
+
* Real-time event with WebSocket-specific metadata.
|
|
182
|
+
*/
|
|
183
|
+
declare const websocketEndpoint: {
|
|
184
|
+
id: string;
|
|
185
|
+
path: string;
|
|
186
|
+
summary: string;
|
|
187
|
+
protocolConfig: {
|
|
188
|
+
subProtocol: string;
|
|
189
|
+
eventName: string;
|
|
190
|
+
direction: string;
|
|
191
|
+
requiresAuth: boolean;
|
|
192
|
+
room: string;
|
|
193
|
+
};
|
|
194
|
+
responses: never[];
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Example: High Priority Core Endpoint
|
|
198
|
+
*
|
|
199
|
+
* Core system endpoints should have high priority (900-1000)
|
|
200
|
+
* to ensure they're registered before plugin endpoints.
|
|
201
|
+
*/
|
|
202
|
+
declare const coreEndpoint: {
|
|
203
|
+
id: string;
|
|
204
|
+
method: "GET";
|
|
205
|
+
path: string;
|
|
206
|
+
summary: string;
|
|
207
|
+
priority: number;
|
|
208
|
+
responses: never[];
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Example: Medium Priority Plugin Endpoint
|
|
212
|
+
*
|
|
213
|
+
* Plugin endpoints should have medium priority (100-500).
|
|
214
|
+
*/
|
|
215
|
+
declare const pluginEndpoint: {
|
|
216
|
+
id: string;
|
|
217
|
+
method: "POST";
|
|
218
|
+
path: string;
|
|
219
|
+
summary: string;
|
|
220
|
+
priority: number;
|
|
221
|
+
protocolConfig: {
|
|
222
|
+
pluginId: string;
|
|
223
|
+
};
|
|
224
|
+
responses: never[];
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Example: Low Priority Fallback Endpoint
|
|
228
|
+
*
|
|
229
|
+
* Fallback or catch-all endpoints should have low priority (0-100).
|
|
230
|
+
*/
|
|
231
|
+
declare const fallbackEndpoint: {
|
|
232
|
+
id: string;
|
|
233
|
+
method: "GET";
|
|
234
|
+
path: string;
|
|
235
|
+
summary: string;
|
|
236
|
+
priority: number;
|
|
237
|
+
responses: {
|
|
238
|
+
statusCode: number;
|
|
239
|
+
description: string;
|
|
240
|
+
}[];
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* Example: Complete Registry with Priority-based Conflict Resolution
|
|
244
|
+
*
|
|
245
|
+
* When multiple endpoints have overlapping routes, the priority field
|
|
246
|
+
* determines which endpoint wins.
|
|
247
|
+
*/
|
|
248
|
+
declare const completeRegistry: {
|
|
249
|
+
version: string;
|
|
250
|
+
conflictResolution: ConflictResolutionStrategy;
|
|
251
|
+
apis: ({
|
|
252
|
+
id: string;
|
|
253
|
+
name: string;
|
|
254
|
+
type: "rest";
|
|
255
|
+
version: string;
|
|
256
|
+
basePath: string;
|
|
257
|
+
description: string;
|
|
258
|
+
endpoints: {
|
|
259
|
+
id: string;
|
|
260
|
+
method: "GET";
|
|
261
|
+
path: string;
|
|
262
|
+
summary: string;
|
|
263
|
+
priority: number;
|
|
264
|
+
responses: never[];
|
|
265
|
+
}[];
|
|
266
|
+
metadata: {
|
|
267
|
+
owner: string;
|
|
268
|
+
status: "active";
|
|
269
|
+
};
|
|
270
|
+
} | {
|
|
271
|
+
id: string;
|
|
272
|
+
name: string;
|
|
273
|
+
type: "plugin";
|
|
274
|
+
version: string;
|
|
275
|
+
basePath: string;
|
|
276
|
+
description: string;
|
|
277
|
+
endpoints: {
|
|
278
|
+
id: string;
|
|
279
|
+
method: "POST";
|
|
280
|
+
path: string;
|
|
281
|
+
summary: string;
|
|
282
|
+
priority: number;
|
|
283
|
+
protocolConfig: {
|
|
284
|
+
pluginId: string;
|
|
285
|
+
};
|
|
286
|
+
responses: never[];
|
|
287
|
+
}[];
|
|
288
|
+
metadata: {
|
|
289
|
+
owner: string;
|
|
290
|
+
status: "active";
|
|
291
|
+
pluginSource: string;
|
|
292
|
+
};
|
|
293
|
+
} | {
|
|
294
|
+
id: string;
|
|
295
|
+
name: string;
|
|
296
|
+
type: "plugin";
|
|
297
|
+
version: string;
|
|
298
|
+
basePath: string;
|
|
299
|
+
description: string;
|
|
300
|
+
endpoints: {
|
|
301
|
+
id: string;
|
|
302
|
+
path: string;
|
|
303
|
+
summary: string;
|
|
304
|
+
protocolConfig: {
|
|
305
|
+
subProtocol: string;
|
|
306
|
+
serviceName: string;
|
|
307
|
+
methodName: string;
|
|
308
|
+
streaming: boolean;
|
|
309
|
+
packageName: string;
|
|
310
|
+
};
|
|
311
|
+
responses: never[];
|
|
312
|
+
}[];
|
|
313
|
+
config: {
|
|
314
|
+
grpcVersion: string;
|
|
315
|
+
reflection: boolean;
|
|
316
|
+
};
|
|
317
|
+
metadata: {
|
|
318
|
+
status: "beta";
|
|
319
|
+
};
|
|
320
|
+
})[];
|
|
321
|
+
totalApis: number;
|
|
322
|
+
totalEndpoints: number;
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Example: Production-ready Endpoint with All Enhancements
|
|
326
|
+
*
|
|
327
|
+
* This example combines all four enhancements:
|
|
328
|
+
* - RBAC permissions
|
|
329
|
+
* - Dynamic schema linking
|
|
330
|
+
* - Protocol configuration
|
|
331
|
+
* - Route priority
|
|
332
|
+
*/
|
|
333
|
+
declare const productionEndpoint: {
|
|
334
|
+
id: string;
|
|
335
|
+
method: "GET";
|
|
336
|
+
path: string;
|
|
337
|
+
summary: string;
|
|
338
|
+
description: string;
|
|
339
|
+
operationId: string;
|
|
340
|
+
tags: string[];
|
|
341
|
+
requiredPermissions: string[];
|
|
342
|
+
priority: number;
|
|
343
|
+
protocolConfig: {
|
|
344
|
+
cacheEnabled: boolean;
|
|
345
|
+
cacheTtl: number;
|
|
346
|
+
rateLimitPerMinute: number;
|
|
347
|
+
};
|
|
348
|
+
security: {
|
|
349
|
+
type: "http";
|
|
350
|
+
scheme: string;
|
|
351
|
+
}[];
|
|
352
|
+
parameters: ({
|
|
353
|
+
name: string;
|
|
354
|
+
in: "path";
|
|
355
|
+
description: string;
|
|
356
|
+
required: true;
|
|
357
|
+
schema: {
|
|
358
|
+
type: "string";
|
|
359
|
+
format: string;
|
|
360
|
+
items?: undefined;
|
|
361
|
+
enum?: undefined;
|
|
362
|
+
};
|
|
363
|
+
example: string;
|
|
364
|
+
} | {
|
|
365
|
+
name: string;
|
|
366
|
+
in: "query";
|
|
367
|
+
description: string;
|
|
368
|
+
required: false;
|
|
369
|
+
schema: {
|
|
370
|
+
type: "array";
|
|
371
|
+
items: {
|
|
372
|
+
type: string;
|
|
373
|
+
};
|
|
374
|
+
enum: string[];
|
|
375
|
+
format?: undefined;
|
|
376
|
+
};
|
|
377
|
+
example?: undefined;
|
|
378
|
+
})[];
|
|
379
|
+
responses: ({
|
|
380
|
+
statusCode: number;
|
|
381
|
+
description: string;
|
|
382
|
+
schema: {
|
|
383
|
+
$ref: {
|
|
384
|
+
objectId: string;
|
|
385
|
+
excludeFields: string[];
|
|
386
|
+
includeRelated: string[];
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
example: {
|
|
390
|
+
id: string;
|
|
391
|
+
name: string;
|
|
392
|
+
email: string;
|
|
393
|
+
phone: string;
|
|
394
|
+
account: {
|
|
395
|
+
id: string;
|
|
396
|
+
name: string;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
} | {
|
|
400
|
+
statusCode: number;
|
|
401
|
+
description: string;
|
|
402
|
+
schema?: undefined;
|
|
403
|
+
example?: undefined;
|
|
404
|
+
})[];
|
|
405
|
+
externalDocs: {
|
|
406
|
+
description: string;
|
|
407
|
+
url: string;
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
export { endpointWithRBAC, adminEndpoint, endpointWithDynamicSchema, createEndpointWithDynamicSchema, orderWithRelations, grpcEndpoint, trpcEndpoint, websocketEndpoint, coreEndpoint, pluginEndpoint, fallbackEndpoint, completeRegistry, productionEndpoint, };
|
|
411
|
+
//# sourceMappingURL=registry.example.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.example.d.ts","sourceRoot":"","sources":["../../src/api/registry.example.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAIL,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAMxB;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;CA+BpB,CAAC;AAEH;;;;GAIG;AACH,QAAA,MAAM,aAAa;;;;;;;CAajB,CAAC;AAMH;;;;;;GAMG;AACH,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;CA+B7B,CAAC;AAEH;;;;;GAKG;AACH,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;CA8BnC,CAAC;AAEH;;;;GAIG;AACH,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;CA4BtB,CAAC;AAMH;;;;GAIG;AACH,QAAA,MAAM,YAAY;;;;;;;;;;;;CAehB,CAAC;AAEH;;;;GAIG;AACH,QAAA,MAAM,YAAY;;;;;;;;;;;CAchB,CAAC;AAEH;;;;GAIG;AACH,QAAA,MAAM,iBAAiB;;;;;;;;;;;;CAerB,CAAC;AAMH;;;;;GAKG;AACH,QAAA,MAAM,YAAY;;;;;;;CAUhB,CAAC;AAEH;;;;GAIG;AACH,QAAA,MAAM,cAAc;;;;;;;;;;CAclB,CAAC;AAEH;;;;GAIG;AACH,QAAA,MAAM,gBAAgB;;;;;;;;;;CAepB,CAAC;AAMH;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB;;wBAIc,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D5D,CAAC;AAMH;;;;;;;;GAQG;AACH,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FtB,CAAC;AAGH,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,yBAAyB,EACzB,+BAA+B,EAC/B,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,GACnB,CAAC"}
|