@lucern/sdk 0.2.0-alpha.5 → 0.2.0-alpha.7
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 +7 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/CHANGELOG.md +13 -0
- package/examples/README.md +69 -0
- package/examples/contradiction.ts +94 -0
- package/examples/investigation-context.ts +118 -0
- package/examples/questions-and-tasks.ts +55 -0
- package/examples/quickstart.ts +97 -0
- package/examples/shared.ts +318 -0
- package/examples/strict-public-types.ts +143 -0
- package/examples/worktree-lifecycle.ts +79 -0
- package/package.json +16 -59
- package/src/README.md +6 -0
- package/src/adminClient.ts +789 -0
- package/{dist/lib/platform/sdk/answersClient.d.ts → src/answersClient.ts} +17 -4
- package/src/audiencesClient.ts +209 -0
- package/src/auditClient.ts +50 -0
- package/src/beliefsClient.ts +319 -0
- package/src/client.ts +2647 -0
- package/src/contextClient.ts +130 -0
- package/src/contextFacade.ts +15 -0
- package/src/contextPackCompiler.ts +828 -0
- package/src/contextPackSchema.ts +251 -0
- package/src/contextTypes.ts +153 -0
- package/src/contracts/api-enums.contract.ts +202 -0
- package/src/contracts/auth-session.contract.ts +109 -0
- package/src/contracts/context-pack.contract.ts +700 -0
- package/src/contracts/contextPack.ts +1 -0
- package/src/contracts/index.ts +10 -0
- package/src/contracts/lens-filter.contract.ts +183 -0
- package/src/contracts/lens-workflow.contract.ts +162 -0
- package/src/contracts/lensFilter.ts +1 -0
- package/src/contracts/lensWorkflow.ts +1 -0
- package/src/contracts/mcp-tools.contract.ts +3636 -0
- package/src/contracts/mcpTools.ts +1 -0
- package/src/contracts/prompt.contract.ts +50 -0
- package/src/contracts/prompt.ts +1 -0
- package/src/contracts/sdk-tools.contract.ts +1457 -0
- package/src/contracts/sdkTools.ts +1 -0
- package/src/contracts/workflow-runtime.contract.ts +440 -0
- package/src/contracts/workflowRuntime.ts +1 -0
- package/src/controlObjectOwnership.ts +286 -0
- package/src/coreClient.ts +570 -0
- package/src/customTools.ts +398 -0
- package/src/decisionsClient.ts +286 -0
- package/src/domainContext.ts +15 -0
- package/src/events.ts +531 -0
- package/src/eventsCore.ts +168 -0
- package/src/facade/beliefs.ts +83 -0
- package/src/facade/context.ts +110 -0
- package/src/facade/contradictions.ts +29 -0
- package/src/facade/edges.ts +30 -0
- package/src/facade/events.ts +23 -0
- package/src/facade/evidence.ts +41 -0
- package/src/facade/graph.ts +38 -0
- package/src/facade/identity.ts +16 -0
- package/src/facade/ontologies.ts +34 -0
- package/src/facade/questions.ts +59 -0
- package/src/facade/search.ts +16 -0
- package/src/facade/tasks.ts +37 -0
- package/src/facade/topics.ts +42 -0
- package/src/facade/webhooks.ts +58 -0
- package/src/facade/worktrees.ts +51 -0
- package/src/gatewayFacades.ts +1666 -0
- package/src/graphClient.ts +529 -0
- package/src/harnessClient.ts +585 -0
- package/src/identityClient.ts +278 -0
- package/{dist/lib/platform/sdk/index.d.ts → src/index.ts} +3 -0
- package/src/learningClient.ts +95 -0
- package/src/mcpParityClient.ts +240 -0
- package/src/mcpParitySurface.ts +70 -0
- package/src/ontologyClient.ts +275 -0
- package/src/packRuntime.ts +3 -0
- package/src/packsClient.ts +260 -0
- package/src/policyClient.ts +572 -0
- package/src/promptCatalog.ts +1 -0
- package/src/realtime/index.ts +51 -0
- package/src/realtime/refs.ts +17 -0
- package/src/reportsClient.ts +99 -0
- package/src/schemaClient.ts +129 -0
- package/src/sdkSurface.ts +190 -0
- package/src/topicsClient.ts +243 -0
- package/src/types.ts +807 -0
- package/src/workflowClient.ts +826 -0
- package/tsconfig.json +9 -0
- package/dist/.generated +0 -2
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -3
- package/dist/lib/platform/auth/credentials.d.ts +0 -5
- package/dist/lib/platform/auth/credentials.js +0 -40
- package/dist/lib/platform/sdk/adminClient.d.ts +0 -404
- package/dist/lib/platform/sdk/adminClient.js +0 -384
- package/dist/lib/platform/sdk/answersClient.js +0 -21
- package/dist/lib/platform/sdk/audiencesClient.d.ts +0 -93
- package/dist/lib/platform/sdk/audiencesClient.js +0 -111
- package/dist/lib/platform/sdk/auditClient.d.ts +0 -24
- package/dist/lib/platform/sdk/auditClient.js +0 -21
- package/dist/lib/platform/sdk/beliefsClient.d.ts +0 -157
- package/dist/lib/platform/sdk/beliefsClient.js +0 -124
- package/dist/lib/platform/sdk/client.d.ts +0 -2369
- package/dist/lib/platform/sdk/client.js +0 -1831
- package/dist/lib/platform/sdk/contextClient.d.ts +0 -21
- package/dist/lib/platform/sdk/contextClient.js +0 -86
- package/dist/lib/platform/sdk/contextPackCompiler.d.ts +0 -100
- package/dist/lib/platform/sdk/contextPackCompiler.js +0 -534
- package/dist/lib/platform/sdk/contextTypes.d.ts +0 -133
- package/dist/lib/platform/sdk/contextTypes.js +0 -1
- package/dist/lib/platform/sdk/controlObjectOwnership.d.ts +0 -308
- package/dist/lib/platform/sdk/controlObjectOwnership.js +0 -220
- package/dist/lib/platform/sdk/coreClient.d.ts +0 -139
- package/dist/lib/platform/sdk/coreClient.js +0 -366
- package/dist/lib/platform/sdk/customTools.d.ts +0 -83
- package/dist/lib/platform/sdk/customTools.js +0 -247
- package/dist/lib/platform/sdk/decisionsClient.d.ts +0 -106
- package/dist/lib/platform/sdk/decisionsClient.js +0 -129
- package/dist/lib/platform/sdk/domainContext.d.ts +0 -1
- package/dist/lib/platform/sdk/domainContext.js +0 -1
- package/dist/lib/platform/sdk/events.d.ts +0 -176
- package/dist/lib/platform/sdk/events.js +0 -261
- package/dist/lib/platform/sdk/gatewayFacades.d.ts +0 -586
- package/dist/lib/platform/sdk/gatewayFacades.js +0 -845
- package/dist/lib/platform/sdk/graphClient.d.ts +0 -266
- package/dist/lib/platform/sdk/graphClient.js +0 -235
- package/dist/lib/platform/sdk/harnessClient.d.ts +0 -309
- package/dist/lib/platform/sdk/harnessClient.js +0 -219
- package/dist/lib/platform/sdk/identityClient.d.ts +0 -134
- package/dist/lib/platform/sdk/identityClient.js +0 -131
- package/dist/lib/platform/sdk/index.js +0 -46
- package/dist/lib/platform/sdk/learningClient.d.ts +0 -40
- package/dist/lib/platform/sdk/learningClient.js +0 -53
- package/dist/lib/platform/sdk/mcpParityClient.d.ts +0 -69
- package/dist/lib/platform/sdk/mcpParityClient.js +0 -196
- package/dist/lib/platform/sdk/mcpParitySurface.d.ts +0 -10
- package/dist/lib/platform/sdk/mcpParitySurface.js +0 -57
- package/dist/lib/platform/sdk/ontologyClient.d.ts +0 -131
- package/dist/lib/platform/sdk/ontologyClient.js +0 -161
- package/dist/lib/platform/sdk/packRuntime.d.ts +0 -1
- package/dist/lib/platform/sdk/packRuntime.js +0 -1
- package/dist/lib/platform/sdk/packsClient.d.ts +0 -126
- package/dist/lib/platform/sdk/packsClient.js +0 -157
- package/dist/lib/platform/sdk/policyClient.d.ts +0 -293
- package/dist/lib/platform/sdk/policyClient.js +0 -277
- package/dist/lib/platform/sdk/promptCatalog.d.ts +0 -1
- package/dist/lib/platform/sdk/promptCatalog.js +0 -1
- package/dist/lib/platform/sdk/reportsClient.d.ts +0 -34
- package/dist/lib/platform/sdk/reportsClient.js +0 -64
- package/dist/lib/platform/sdk/schemaClient.d.ts +0 -59
- package/dist/lib/platform/sdk/schemaClient.js +0 -71
- package/dist/lib/platform/sdk/sdkSurface.d.ts +0 -56
- package/dist/lib/platform/sdk/sdkSurface.js +0 -140
- package/dist/lib/platform/sdk/topicsClient.d.ts +0 -78
- package/dist/lib/platform/sdk/topicsClient.js +0 -118
- package/dist/lib/platform/sdk/types.d.ts +0 -692
- package/dist/lib/platform/sdk/types.js +0 -1
- package/dist/lib/platform/sdk/version.d.ts +0 -2
- package/dist/lib/platform/sdk/workflowClient.d.ts +0 -313
- package/dist/lib/platform/sdk/workflowClient.js +0 -366
- package/dist/lucern/contracts/src/api-enums.contract.d.ts +0 -58
- package/dist/lucern/contracts/src/api-enums.contract.js +0 -147
- package/dist/lucern/contracts/src/lens-filter.contract.d.ts +0 -70
- package/dist/lucern/contracts/src/lens-filter.contract.js +0 -95
- package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +0 -84
- package/dist/lucern/contracts/src/lens-workflow.contract.js +0 -54
- package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +0 -151
- package/dist/lucern/contracts/src/mcp-tools.contract.js +0 -3281
- /package/{dist/lib/platform/sdk/version.js → src/version.ts} +0 -0
package/tsconfig.json
ADDED
package/dist/.generated
DELETED
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function parseAuthorizationBearer(value: string | null | undefined): string | null;
|
|
2
|
-
export declare function isTenantApiKey(value: string): boolean;
|
|
3
|
-
export declare function isServicePrincipalKey(value: string): boolean;
|
|
4
|
-
export declare function buildPlatformAuthHeadersFromApiKey(apiKey: string): Record<string, string>;
|
|
5
|
-
export declare function buildPlatformAuthHeadersFromSessionToken(sessionToken: string): Record<string, string>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const TENANT_API_KEY_PREFIXES = ["luc_", "stk_"];
|
|
2
|
-
const SERVICE_PRINCIPAL_KEY_PREFIXES = ["lk_", "lsk_"];
|
|
3
|
-
export function parseAuthorizationBearer(value) {
|
|
4
|
-
if (!value) {
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
7
|
-
const [scheme, token] = value.trim().split(/\s+/, 2);
|
|
8
|
-
if (!scheme || !token) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
if (scheme.toLowerCase() !== "bearer") {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
return token.trim() || null;
|
|
15
|
-
}
|
|
16
|
-
export function isTenantApiKey(value) {
|
|
17
|
-
const normalized = value.trim();
|
|
18
|
-
return TENANT_API_KEY_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
19
|
-
}
|
|
20
|
-
export function isServicePrincipalKey(value) {
|
|
21
|
-
const normalized = value.trim();
|
|
22
|
-
return SERVICE_PRINCIPAL_KEY_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
23
|
-
}
|
|
24
|
-
export function buildPlatformAuthHeadersFromApiKey(apiKey) {
|
|
25
|
-
const normalized = apiKey.trim();
|
|
26
|
-
if (!normalized) {
|
|
27
|
-
return {};
|
|
28
|
-
}
|
|
29
|
-
if (isTenantApiKey(normalized)) {
|
|
30
|
-
return { "x-lucern-key": normalized };
|
|
31
|
-
}
|
|
32
|
-
return { Authorization: `Bearer ${normalized}` };
|
|
33
|
-
}
|
|
34
|
-
export function buildPlatformAuthHeadersFromSessionToken(sessionToken) {
|
|
35
|
-
const normalized = sessionToken.trim();
|
|
36
|
-
if (!normalized) {
|
|
37
|
-
return {};
|
|
38
|
-
}
|
|
39
|
-
return { Authorization: `Bearer ${normalized}` };
|
|
40
|
-
}
|
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
|
|
2
|
-
import type { ControlObjectOwnershipContract } from "./controlObjectOwnership";
|
|
3
|
-
import type { JsonObject } from "./types";
|
|
4
|
-
export { LucernApiError };
|
|
5
|
-
export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
|
|
6
|
-
/** Configuration for the admin client. */
|
|
7
|
-
export type AdminClientConfig = GatewayClientConfig;
|
|
8
|
-
export type TenantApiKeyRecord = {
|
|
9
|
-
id?: string;
|
|
10
|
-
tenantId?: string;
|
|
11
|
-
workspaceId?: string;
|
|
12
|
-
label?: string;
|
|
13
|
-
keyPrefix?: string;
|
|
14
|
-
hashedKey?: string;
|
|
15
|
-
scopes?: string[];
|
|
16
|
-
status?: string;
|
|
17
|
-
expiresAt?: number;
|
|
18
|
-
lastUsedAt?: number;
|
|
19
|
-
revokedAt?: number;
|
|
20
|
-
revokedBy?: string;
|
|
21
|
-
createdBy?: string;
|
|
22
|
-
createdAt?: number;
|
|
23
|
-
updatedAt?: number;
|
|
24
|
-
};
|
|
25
|
-
export type TenantVaultSecretRecord = {
|
|
26
|
-
id?: string;
|
|
27
|
-
tenantId?: string;
|
|
28
|
-
workspaceId?: string;
|
|
29
|
-
name?: string;
|
|
30
|
-
description?: string;
|
|
31
|
-
lastRotated?: number;
|
|
32
|
-
createdBy?: string;
|
|
33
|
-
updatedBy?: string;
|
|
34
|
-
createdAt?: number;
|
|
35
|
-
updatedAt?: number;
|
|
36
|
-
};
|
|
37
|
-
export type TenantAuthPolicyMode = "open" | "invite_only" | "sso_required";
|
|
38
|
-
export type TenantTopicVisibility = "private" | "tenant" | "public";
|
|
39
|
-
export type TenantFeatureFlags = Record<string, boolean>;
|
|
40
|
-
export type TenantModelSlotOverrides = Record<string, string>;
|
|
41
|
-
export type TenantConfigRecord = {
|
|
42
|
-
tenantId: string;
|
|
43
|
-
authPolicyMode: TenantAuthPolicyMode;
|
|
44
|
-
defaultSessionTTL: number;
|
|
45
|
-
defaultTopicVisibility: TenantTopicVisibility;
|
|
46
|
-
featureFlags: TenantFeatureFlags;
|
|
47
|
-
maxWorkspaceCount: number;
|
|
48
|
-
defaultModelSlotOverrides: TenantModelSlotOverrides;
|
|
49
|
-
updatedAt?: number;
|
|
50
|
-
updatedBy?: string;
|
|
51
|
-
};
|
|
52
|
-
export type TenantModelRoutingSlotRecord = {
|
|
53
|
-
slot: string;
|
|
54
|
-
category?: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
modelKey: string;
|
|
57
|
-
promptName?: string;
|
|
58
|
-
temperature?: number;
|
|
59
|
-
maxTokens?: number;
|
|
60
|
-
enabled?: boolean;
|
|
61
|
-
};
|
|
62
|
-
export type TenantModelRoutingModelRecord = {
|
|
63
|
-
key: string;
|
|
64
|
-
name?: string;
|
|
65
|
-
modelId?: string;
|
|
66
|
-
provider?: string;
|
|
67
|
-
enabled?: boolean;
|
|
68
|
-
recommended?: boolean;
|
|
69
|
-
notes?: string;
|
|
70
|
-
};
|
|
71
|
-
export type TenantModelRoutingBindingRecord = {
|
|
72
|
-
slot: string;
|
|
73
|
-
providerId: string;
|
|
74
|
-
secretRef: string;
|
|
75
|
-
label?: string;
|
|
76
|
-
keyHint?: string;
|
|
77
|
-
};
|
|
78
|
-
export type TenantModelRouteOverrideStatus = "inherit" | "active" | "blocked_missing_model" | "blocked_missing_binding";
|
|
79
|
-
export type TenantModelRouteBindingState = "ready" | "missing";
|
|
80
|
-
export type TenantModelRouteSource = "platform_default" | "tenant_override";
|
|
81
|
-
export type TenantModelRouteRow = {
|
|
82
|
-
slot: string;
|
|
83
|
-
category: string;
|
|
84
|
-
description?: string;
|
|
85
|
-
promptName?: string;
|
|
86
|
-
slotEnabled: boolean;
|
|
87
|
-
platformModelKey: string;
|
|
88
|
-
platformModelName?: string;
|
|
89
|
-
platformProviderId?: string;
|
|
90
|
-
overrideModelKey?: string;
|
|
91
|
-
overrideModelName?: string;
|
|
92
|
-
overrideProviderId?: string;
|
|
93
|
-
effectiveModelKey: string;
|
|
94
|
-
effectiveModelName?: string;
|
|
95
|
-
effectiveProviderId?: string;
|
|
96
|
-
effectiveSource: TenantModelRouteSource;
|
|
97
|
-
overrideStatus: TenantModelRouteOverrideStatus;
|
|
98
|
-
bindingState: TenantModelRouteBindingState;
|
|
99
|
-
bindingLabel?: string;
|
|
100
|
-
bindingKeyHint?: string;
|
|
101
|
-
bindingSecretRef?: string;
|
|
102
|
-
};
|
|
103
|
-
export type TenantModelRoutingSummary = {
|
|
104
|
-
totalSlots: number;
|
|
105
|
-
promptBoundSlots: number;
|
|
106
|
-
activeOverrides: number;
|
|
107
|
-
blockedOverrides: number;
|
|
108
|
-
readyBindings: number;
|
|
109
|
-
};
|
|
110
|
-
export type TenantModelRoutingSnapshot = {
|
|
111
|
-
tenantId: string;
|
|
112
|
-
defaultModelSlotOverrides: Record<string, string>;
|
|
113
|
-
slots: TenantModelRoutingSlotRecord[];
|
|
114
|
-
models: TenantModelRoutingModelRecord[];
|
|
115
|
-
bindings: TenantModelRoutingBindingRecord[];
|
|
116
|
-
rows: TenantModelRouteRow[];
|
|
117
|
-
summary: TenantModelRoutingSummary;
|
|
118
|
-
notes: string[];
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* Create the admin client for tenant, workspace, and membership administration.
|
|
122
|
-
* @param config - Gateway transport configuration.
|
|
123
|
-
* @returns An object with methods to manage tenants, workspaces, and memberships.
|
|
124
|
-
*/
|
|
125
|
-
export declare function createAdminClient(config?: AdminClientConfig): {
|
|
126
|
-
/**
|
|
127
|
-
* List tenants visible to the current principal.
|
|
128
|
-
*/
|
|
129
|
-
listTenants(query?: {
|
|
130
|
-
status?: "active" | "disabled" | "archived";
|
|
131
|
-
limit?: number;
|
|
132
|
-
}): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "tenants">>>;
|
|
133
|
-
/**
|
|
134
|
-
* Create a tenant.
|
|
135
|
-
*/
|
|
136
|
-
createTenant(input: {
|
|
137
|
-
key: string;
|
|
138
|
-
slug?: string;
|
|
139
|
-
name: string;
|
|
140
|
-
status?: "active" | "disabled" | "archived";
|
|
141
|
-
metadata?: JsonObject;
|
|
142
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
143
|
-
/**
|
|
144
|
-
* Get the control-object ownership contract.
|
|
145
|
-
*/
|
|
146
|
-
getControlObjectOwnership(): Promise<import("./coreClient").PlatformGatewaySuccess<ControlObjectOwnershipContract>>;
|
|
147
|
-
/**
|
|
148
|
-
* @deprecated Use getControlObjectOwnership.
|
|
149
|
-
*/
|
|
150
|
-
getControlObjectOwnershipContract(): Promise<import("./coreClient").PlatformGatewaySuccess<ControlObjectOwnershipContract>>;
|
|
151
|
-
/**
|
|
152
|
-
* List workspaces for the current admin scope.
|
|
153
|
-
*/
|
|
154
|
-
listWorkspaces(query?: GatewayScope & {
|
|
155
|
-
status?: "active" | "archived";
|
|
156
|
-
limit?: number;
|
|
157
|
-
}): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "workspaces">>>;
|
|
158
|
-
/**
|
|
159
|
-
* Create a workspace.
|
|
160
|
-
*/
|
|
161
|
-
createWorkspace(input: GatewayScope & {
|
|
162
|
-
workspaceId?: string;
|
|
163
|
-
key?: string;
|
|
164
|
-
slug?: string;
|
|
165
|
-
name?: string;
|
|
166
|
-
status?: "active" | "archived";
|
|
167
|
-
defaultProjectVisibility?: "private" | "team" | "firm" | "external" | "public";
|
|
168
|
-
restore?: boolean;
|
|
169
|
-
metadata?: JsonObject;
|
|
170
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
171
|
-
/**
|
|
172
|
-
* List memberships for the current admin scope.
|
|
173
|
-
*/
|
|
174
|
-
listMemberships(query?: GatewayScope & {
|
|
175
|
-
principalId?: string;
|
|
176
|
-
status?: "active" | "revoked" | "expired";
|
|
177
|
-
limit?: number;
|
|
178
|
-
}): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "memberships">>>;
|
|
179
|
-
/**
|
|
180
|
-
* Create a membership.
|
|
181
|
-
*/
|
|
182
|
-
createMembership(input: GatewayScope & {
|
|
183
|
-
membershipId?: string;
|
|
184
|
-
principalId: string;
|
|
185
|
-
role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
|
|
186
|
-
status?: "active" | "revoked" | "expired";
|
|
187
|
-
source?: "bootstrap" | "manual" | "sync" | "invitation";
|
|
188
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
189
|
-
/**
|
|
190
|
-
* Update a membership.
|
|
191
|
-
*/
|
|
192
|
-
updateMembership(input: GatewayScope & {
|
|
193
|
-
membershipId?: string;
|
|
194
|
-
principalId: string;
|
|
195
|
-
role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
|
|
196
|
-
status?: "active" | "revoked" | "expired";
|
|
197
|
-
source?: "bootstrap" | "manual" | "sync" | "invitation";
|
|
198
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
199
|
-
/**
|
|
200
|
-
* @deprecated Use createMembership or updateMembership.
|
|
201
|
-
*/
|
|
202
|
-
upsertMembership(input: GatewayScope & {
|
|
203
|
-
membershipId?: string;
|
|
204
|
-
principalId: string;
|
|
205
|
-
role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
|
|
206
|
-
status?: "active" | "revoked" | "expired";
|
|
207
|
-
source?: "bootstrap" | "manual" | "sync" | "invitation";
|
|
208
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
209
|
-
/**
|
|
210
|
-
* List tenant API keys in the current admin scope.
|
|
211
|
-
*/
|
|
212
|
-
listTenantApiKeys(scope: GatewayScope & {
|
|
213
|
-
status?: "active" | "revoked" | "expired";
|
|
214
|
-
}): Promise<{
|
|
215
|
-
data: {
|
|
216
|
-
keys: TenantApiKeyRecord[];
|
|
217
|
-
};
|
|
218
|
-
success: true;
|
|
219
|
-
correlationId: string;
|
|
220
|
-
policyTraceId: string | null;
|
|
221
|
-
idempotentReplay: boolean;
|
|
222
|
-
}>;
|
|
223
|
-
/**
|
|
224
|
-
* Create a tenant API key.
|
|
225
|
-
*/
|
|
226
|
-
createTenantApiKey(input: GatewayScope & {
|
|
227
|
-
label?: string;
|
|
228
|
-
scopes: string[];
|
|
229
|
-
expiresAt?: number;
|
|
230
|
-
}, idempotencyKey?: string): Promise<{
|
|
231
|
-
data: {
|
|
232
|
-
key: TenantApiKeyRecord | null;
|
|
233
|
-
plaintextKey: string | undefined;
|
|
234
|
-
};
|
|
235
|
-
success: true;
|
|
236
|
-
correlationId: string;
|
|
237
|
-
policyTraceId: string | null;
|
|
238
|
-
idempotentReplay: boolean;
|
|
239
|
-
}>;
|
|
240
|
-
/**
|
|
241
|
-
* Revoke a tenant API key.
|
|
242
|
-
*/
|
|
243
|
-
revokeTenantApiKey(keyId: string, input?: GatewayScope & {
|
|
244
|
-
reason?: string;
|
|
245
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
246
|
-
/**
|
|
247
|
-
* List tenant vault secrets.
|
|
248
|
-
*/
|
|
249
|
-
listTenantVaultSecrets(scope: GatewayScope): Promise<{
|
|
250
|
-
data: {
|
|
251
|
-
secrets: TenantVaultSecretRecord[];
|
|
252
|
-
};
|
|
253
|
-
success: true;
|
|
254
|
-
correlationId: string;
|
|
255
|
-
policyTraceId: string | null;
|
|
256
|
-
idempotentReplay: boolean;
|
|
257
|
-
}>;
|
|
258
|
-
/**
|
|
259
|
-
* Create a tenant vault secret.
|
|
260
|
-
*/
|
|
261
|
-
createTenantVaultSecret(input: GatewayScope & {
|
|
262
|
-
name: string;
|
|
263
|
-
description?: string;
|
|
264
|
-
value: string;
|
|
265
|
-
}, idempotencyKey?: string): Promise<{
|
|
266
|
-
data: {
|
|
267
|
-
secret: TenantVaultSecretRecord | null;
|
|
268
|
-
};
|
|
269
|
-
success: true;
|
|
270
|
-
correlationId: string;
|
|
271
|
-
policyTraceId: string | null;
|
|
272
|
-
idempotentReplay: boolean;
|
|
273
|
-
}>;
|
|
274
|
-
/**
|
|
275
|
-
* Update a tenant vault secret.
|
|
276
|
-
*/
|
|
277
|
-
updateTenantVaultSecret(secretId: string, input: GatewayScope & {
|
|
278
|
-
name: string;
|
|
279
|
-
description?: string;
|
|
280
|
-
value?: string;
|
|
281
|
-
}, idempotencyKey?: string): Promise<{
|
|
282
|
-
data: {
|
|
283
|
-
secret: TenantVaultSecretRecord | null;
|
|
284
|
-
};
|
|
285
|
-
success: true;
|
|
286
|
-
correlationId: string;
|
|
287
|
-
policyTraceId: string | null;
|
|
288
|
-
idempotentReplay: boolean;
|
|
289
|
-
}>;
|
|
290
|
-
/**
|
|
291
|
-
* Delete a tenant vault secret.
|
|
292
|
-
*/
|
|
293
|
-
deleteTenantVaultSecret(secretId: string, scope: GatewayScope, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
294
|
-
/**
|
|
295
|
-
* List tenant provider secrets.
|
|
296
|
-
*/
|
|
297
|
-
listTenantSecrets(scope: GatewayScope & {
|
|
298
|
-
providerId?: string;
|
|
299
|
-
status?: "active" | "revoked";
|
|
300
|
-
}): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
301
|
-
/**
|
|
302
|
-
* Upsert a tenant provider secret.
|
|
303
|
-
*/
|
|
304
|
-
upsertTenantSecret(input: GatewayScope & {
|
|
305
|
-
providerId: string;
|
|
306
|
-
apiKey: string;
|
|
307
|
-
label?: string;
|
|
308
|
-
modelSlotIds?: string[];
|
|
309
|
-
passThroughOnly?: boolean;
|
|
310
|
-
metadata?: JsonObject;
|
|
311
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
312
|
-
/**
|
|
313
|
-
* Revoke a tenant provider secret.
|
|
314
|
-
*/
|
|
315
|
-
revokeTenantSecret(secretRef: string, input: GatewayScope & {
|
|
316
|
-
reason?: string;
|
|
317
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
318
|
-
/**
|
|
319
|
-
* Get tenant configuration.
|
|
320
|
-
*/
|
|
321
|
-
getTenantConfig(scope: GatewayScope & {
|
|
322
|
-
tenantId: string;
|
|
323
|
-
}): Promise<import("./coreClient").PlatformGatewaySuccess<TenantConfigRecord>>;
|
|
324
|
-
/**
|
|
325
|
-
* Get tenant model routing.
|
|
326
|
-
*/
|
|
327
|
-
getTenantModelRouting(scope: GatewayScope & {
|
|
328
|
-
tenantId: string;
|
|
329
|
-
}): Promise<import("./coreClient").PlatformGatewaySuccess<TenantModelRoutingSnapshot>>;
|
|
330
|
-
/**
|
|
331
|
-
* Upsert tenant configuration.
|
|
332
|
-
*/
|
|
333
|
-
upsertTenantConfig(input: GatewayScope & Omit<TenantConfigRecord, "updatedAt" | "updatedBy">, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<TenantConfigRecord>>;
|
|
334
|
-
/**
|
|
335
|
-
* List groups.
|
|
336
|
-
*/
|
|
337
|
-
listGroups(scope?: GatewayScope & {
|
|
338
|
-
limit?: number;
|
|
339
|
-
}): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
340
|
-
/**
|
|
341
|
-
* Create a group.
|
|
342
|
-
*/
|
|
343
|
-
createGroup(input: GatewayScope & {
|
|
344
|
-
name: string;
|
|
345
|
-
groupKey?: string;
|
|
346
|
-
groupType?: string;
|
|
347
|
-
description?: string;
|
|
348
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
349
|
-
/**
|
|
350
|
-
* Update a group.
|
|
351
|
-
*/
|
|
352
|
-
updateGroup(groupId: string, input: GatewayScope & {
|
|
353
|
-
name?: string;
|
|
354
|
-
description?: string;
|
|
355
|
-
workspaceId?: string;
|
|
356
|
-
clearWorkspaceId?: boolean;
|
|
357
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
358
|
-
/**
|
|
359
|
-
* Delete a group.
|
|
360
|
-
*/
|
|
361
|
-
deleteGroup(groupId: string, input?: GatewayScope, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
362
|
-
/**
|
|
363
|
-
* List group members.
|
|
364
|
-
*/
|
|
365
|
-
listGroupMembers(query: GatewayScope & {
|
|
366
|
-
groupId: string;
|
|
367
|
-
}): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
368
|
-
/**
|
|
369
|
-
* Add a group member.
|
|
370
|
-
*/
|
|
371
|
-
addGroupMember(input: GatewayScope & {
|
|
372
|
-
groupId: string;
|
|
373
|
-
principalId: string;
|
|
374
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
375
|
-
/**
|
|
376
|
-
* Remove a group member.
|
|
377
|
-
*/
|
|
378
|
-
removeGroupMember(input: GatewayScope & {
|
|
379
|
-
groupId: string;
|
|
380
|
-
principalId: string;
|
|
381
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
382
|
-
/**
|
|
383
|
-
* List pack-to-group assignments.
|
|
384
|
-
*/
|
|
385
|
-
listPackGroupAssignments(query?: GatewayScope & {
|
|
386
|
-
groupId?: string;
|
|
387
|
-
status?: string;
|
|
388
|
-
}): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
389
|
-
/**
|
|
390
|
-
* Assign a pack to a group.
|
|
391
|
-
*/
|
|
392
|
-
assignPackToGroup(input: GatewayScope & {
|
|
393
|
-
groupId: string;
|
|
394
|
-
packKey: string;
|
|
395
|
-
packVersion?: string;
|
|
396
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
397
|
-
/**
|
|
398
|
-
* Remove a pack from a group.
|
|
399
|
-
*/
|
|
400
|
-
removePackFromGroup(input: GatewayScope & {
|
|
401
|
-
groupId: string;
|
|
402
|
-
packKey: string;
|
|
403
|
-
}, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
404
|
-
};
|