@kya-os/contracts 1.6.4 → 1.6.5
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/agentshield-api/schemas.d.ts +124 -124
- package/dist/audit/index.d.ts +21 -21
- package/dist/config/identity.d.ts +477 -6
- package/dist/config/identity.js +68 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +6 -1
- package/dist/config/tool-context.d.ts +14 -2
- package/dist/consent/schemas.d.ts +46 -46
- package/dist/delegation/schemas.d.ts +34 -34
- package/dist/handshake.d.ts +18 -18
- package/dist/identity/schemas.d.ts +10 -10
- package/dist/proof/proof-record.d.ts +12 -12
- package/dist/proof/signing-spec.d.ts +4 -4
- package/dist/proof.d.ts +24 -24
- package/dist/tool-protection/index.d.ts +16 -16
- package/dist/verifier.d.ts +9 -9
- package/package.json +1 -1
- package/dist/agentshield-api/endpoints.d.ts.map +0 -1
- package/dist/agentshield-api/endpoints.js.map +0 -1
- package/dist/agentshield-api/index.d.ts.map +0 -1
- package/dist/agentshield-api/index.js.map +0 -1
- package/dist/agentshield-api/schemas.d.ts.map +0 -1
- package/dist/agentshield-api/schemas.js.map +0 -1
- package/dist/agentshield-api/types.d.ts.map +0 -1
- package/dist/agentshield-api/types.js.map +0 -1
- package/dist/delegation/constraints.d.ts.map +0 -1
- package/dist/delegation/constraints.js.map +0 -1
- package/dist/delegation/index.d.ts.map +0 -1
- package/dist/delegation/index.js.map +0 -1
- package/dist/delegation/schemas.d.ts.map +0 -1
- package/dist/delegation/schemas.js.map +0 -1
- package/dist/did/index.d.ts.map +0 -1
- package/dist/did/index.js.map +0 -1
- package/dist/did/resolve-contract.d.ts.map +0 -1
- package/dist/did/resolve-contract.js.map +0 -1
- package/dist/did/schemas.d.ts.map +0 -1
- package/dist/did/schemas.js.map +0 -1
- package/dist/did/types.d.ts.map +0 -1
- package/dist/did/types.js.map +0 -1
- package/dist/env/constants.d.ts.map +0 -1
- package/dist/env/constants.js.map +0 -1
- package/dist/env/index.d.ts.map +0 -1
- package/dist/env/index.js.map +0 -1
- package/dist/proof/index.d.ts.map +0 -1
- package/dist/proof/index.js.map +0 -1
- package/dist/proof/proof-record.d.ts.map +0 -1
- package/dist/proof/proof-record.js.map +0 -1
- package/dist/proof/signing-spec.d.ts.map +0 -1
- package/dist/proof/signing-spec.js.map +0 -1
- package/dist/runtime/errors.d.ts.map +0 -1
- package/dist/runtime/errors.js.map +0 -1
- package/dist/runtime/headers.d.ts.map +0 -1
- package/dist/runtime/headers.js.map +0 -1
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js.map +0 -1
- package/dist/tlkrc/index.d.ts.map +0 -1
- package/dist/tlkrc/index.js.map +0 -1
- package/dist/tlkrc/rotation.d.ts.map +0 -1
- package/dist/tlkrc/rotation.js.map +0 -1
- package/dist/vc/index.d.ts.map +0 -1
- package/dist/vc/index.js.map +0 -1
- package/dist/vc/schemas.d.ts.map +0 -1
- package/dist/vc/schemas.js.map +0 -1
- package/dist/vc/statuslist.d.ts.map +0 -1
- package/dist/vc/statuslist.js.map +0 -1
package/dist/config/identity.js
CHANGED
|
@@ -8,8 +8,45 @@
|
|
|
8
8
|
* @module @kya-os/contracts/config
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.OAuthConfigSchema = exports.OAuthProviderSchema = void 0;
|
|
11
|
+
exports.AuthProviderSchema = exports.OAuth2ProviderConfigSchema = exports.OAuthConfigSchema = exports.OAuthProviderSchema = exports.CredentialProviderConfigSchema = void 0;
|
|
12
12
|
const zod_1 = require("zod");
|
|
13
|
+
/**
|
|
14
|
+
* Zod schema for CredentialProviderConfig validation
|
|
15
|
+
*/
|
|
16
|
+
exports.CredentialProviderConfigSchema = zod_1.z.object({
|
|
17
|
+
type: zod_1.z.literal("credential"),
|
|
18
|
+
displayName: zod_1.z.string().optional(),
|
|
19
|
+
authEndpoint: zod_1.z.string().url(),
|
|
20
|
+
requestBodyTemplate: zod_1.z.record(zod_1.z.string()),
|
|
21
|
+
responseFields: zod_1.z.object({
|
|
22
|
+
sessionToken: zod_1.z.string(),
|
|
23
|
+
userId: zod_1.z.string().optional(),
|
|
24
|
+
userEmail: zod_1.z.string().optional(),
|
|
25
|
+
userDisplayName: zod_1.z.string().optional(),
|
|
26
|
+
expiresIn: zod_1.z.string().optional(),
|
|
27
|
+
}),
|
|
28
|
+
successCheck: zod_1.z
|
|
29
|
+
.object({
|
|
30
|
+
path: zod_1.z.string(),
|
|
31
|
+
expectedValue: zod_1.z.union([zod_1.z.string(), zod_1.z.boolean(), zod_1.z.number()]),
|
|
32
|
+
})
|
|
33
|
+
.optional(),
|
|
34
|
+
headers: zod_1.z.record(zod_1.z.string()).optional(),
|
|
35
|
+
tokenUsage: zod_1.z.enum(["cookie", "bearer", "header"]).optional(),
|
|
36
|
+
tokenHeader: zod_1.z.string().optional(),
|
|
37
|
+
cookieFormat: zod_1.z.string().optional(),
|
|
38
|
+
apiHeaders: zod_1.z.record(zod_1.z.string()).optional(),
|
|
39
|
+
consentOverrides: zod_1.z
|
|
40
|
+
.object({
|
|
41
|
+
branding: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
42
|
+
formTitle: zod_1.z.string().optional(),
|
|
43
|
+
formDescription: zod_1.z.string().optional(),
|
|
44
|
+
identityFieldLabel: zod_1.z.string().optional(),
|
|
45
|
+
passwordFieldLabel: zod_1.z.string().optional(),
|
|
46
|
+
submitButtonText: zod_1.z.string().optional(),
|
|
47
|
+
})
|
|
48
|
+
.optional(),
|
|
49
|
+
});
|
|
13
50
|
/**
|
|
14
51
|
* Zod schema for OAuthProvider validation
|
|
15
52
|
*/
|
|
@@ -37,3 +74,33 @@ exports.OAuthConfigSchema = zod_1.z.object({
|
|
|
37
74
|
providers: zod_1.z.record(zod_1.z.string(), exports.OAuthProviderSchema),
|
|
38
75
|
configuredProvider: zod_1.z.string().nullable().optional(),
|
|
39
76
|
});
|
|
77
|
+
/**
|
|
78
|
+
* Zod schema for OAuth2ProviderConfig validation
|
|
79
|
+
*/
|
|
80
|
+
exports.OAuth2ProviderConfigSchema = zod_1.z.object({
|
|
81
|
+
type: zod_1.z.literal("oauth2"),
|
|
82
|
+
displayName: zod_1.z.string().optional(),
|
|
83
|
+
clientId: zod_1.z.string().min(1),
|
|
84
|
+
clientSecret: zod_1.z.string().nullable().optional(),
|
|
85
|
+
authorizationUrl: zod_1.z.string().url(),
|
|
86
|
+
tokenUrl: zod_1.z.string().url(),
|
|
87
|
+
userInfoUrl: zod_1.z.string().url().optional(),
|
|
88
|
+
supportsPKCE: zod_1.z.boolean(),
|
|
89
|
+
requiresClientSecret: zod_1.z.boolean(),
|
|
90
|
+
scopes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
91
|
+
defaultScopes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
92
|
+
proxyMode: zod_1.z.boolean().optional(),
|
|
93
|
+
customParams: zod_1.z.record(zod_1.z.string()).optional(),
|
|
94
|
+
tokenEndpointAuthMethod: zod_1.z
|
|
95
|
+
.enum(["client_secret_post", "client_secret_basic"])
|
|
96
|
+
.optional(),
|
|
97
|
+
responseType: zod_1.z.string().optional().default("code"),
|
|
98
|
+
grantType: zod_1.z.string().optional().default("authorization_code"),
|
|
99
|
+
});
|
|
100
|
+
/**
|
|
101
|
+
* Zod schema for AuthProvider validation (discriminated union)
|
|
102
|
+
*/
|
|
103
|
+
exports.AuthProviderSchema = zod_1.z.discriminatedUnion("type", [
|
|
104
|
+
exports.OAuth2ProviderConfigSchema,
|
|
105
|
+
exports.CredentialProviderConfigSchema,
|
|
106
|
+
]);
|
package/dist/config/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type { ProofingConfig } from "./proofing.js";
|
|
|
12
12
|
import type { DelegationConfig } from "./delegation.js";
|
|
13
13
|
import type { ToolProtectionSourceConfig } from "./tool-protection.js";
|
|
14
14
|
export { MCPIBaseConfig } from "./base.js";
|
|
15
|
-
export { RuntimeIdentityConfig, AgentIdentity, OAuthProvider, OAuthConfig, IdpTokens, } from "./identity.js";
|
|
15
|
+
export { RuntimeIdentityConfig, AgentIdentity, OAuthProvider, OAuthConfig, IdpTokens, AuthProviderType, BaseProviderConfig, CredentialProviderConfig, CredentialProviderConfigSchema, OAuth2ProviderConfig, OAuth2ProviderConfigSchema, AuthProvider, AuthProviderSchema, } from "./identity.js";
|
|
16
16
|
export type { ToolExecutionContext } from "./tool-context.js";
|
|
17
17
|
/**
|
|
18
18
|
* @deprecated Use RuntimeIdentityConfig instead
|
package/dist/config/index.js
CHANGED
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
* @module @kya-os/contracts/config
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.buildBaseConfig = void 0;
|
|
11
|
+
exports.buildBaseConfig = exports.AuthProviderSchema = exports.OAuth2ProviderConfigSchema = exports.CredentialProviderConfigSchema = void 0;
|
|
12
|
+
// Identity configuration
|
|
13
|
+
var identity_js_1 = require("./identity.js");
|
|
14
|
+
Object.defineProperty(exports, "CredentialProviderConfigSchema", { enumerable: true, get: function () { return identity_js_1.CredentialProviderConfigSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "OAuth2ProviderConfigSchema", { enumerable: true, get: function () { return identity_js_1.OAuth2ProviderConfigSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "AuthProviderSchema", { enumerable: true, get: function () { return identity_js_1.AuthProviderSchema; } });
|
|
12
17
|
// Configuration builder utilities
|
|
13
18
|
var builder_js_1 = require("./builder.js");
|
|
14
19
|
Object.defineProperty(exports, "buildBaseConfig", { enumerable: true, get: function () { return builder_js_1.buildBaseConfig; } });
|
|
@@ -14,14 +14,26 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Enables tools to access IDP tokens for external API calls.
|
|
16
16
|
* Context is only provided when:
|
|
17
|
-
* - Tool requires OAuth (has requiredScopes)
|
|
17
|
+
* - Tool requires OAuth (has requiredScopes) or credential-based auth
|
|
18
18
|
* - User DID is available
|
|
19
19
|
* - IDP token is successfully resolved
|
|
20
20
|
*/
|
|
21
21
|
export interface ToolExecutionContext {
|
|
22
22
|
/** IDP access token for external API calls (e.g., GitHub, Google) */
|
|
23
23
|
idpToken?: string;
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Pre-built headers for API calls (CRED-003)
|
|
26
|
+
*
|
|
27
|
+
* For OAuth providers: typically { Authorization: "Bearer xxx" }
|
|
28
|
+
* For credential providers: based on tokenUsage configuration
|
|
29
|
+
* - cookie: { Cookie: "formatted_cookie_string" }
|
|
30
|
+
* - bearer: { Authorization: "Bearer xxx" }
|
|
31
|
+
* - header: { [customHeader]: "xxx" }
|
|
32
|
+
*
|
|
33
|
+
* Also includes any additional apiHeaders from provider config.
|
|
34
|
+
*/
|
|
35
|
+
idpHeaders?: Record<string, string>;
|
|
36
|
+
/** OAuth provider name (e.g., "github", "google") or credential provider */
|
|
25
37
|
provider?: string;
|
|
26
38
|
/** Scopes granted for this token */
|
|
27
39
|
scopes?: string[];
|
|
@@ -38,13 +38,13 @@ export declare const consentTermsSchema: z.ZodObject<{
|
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
39
|
required: boolean;
|
|
40
40
|
version?: string | undefined;
|
|
41
|
-
text?: string | undefined;
|
|
42
41
|
url?: string | undefined;
|
|
42
|
+
text?: string | undefined;
|
|
43
43
|
}, {
|
|
44
44
|
version?: string | undefined;
|
|
45
|
-
text?: string | undefined;
|
|
46
45
|
url?: string | undefined;
|
|
47
46
|
required?: boolean | undefined;
|
|
47
|
+
text?: string | undefined;
|
|
48
48
|
}>;
|
|
49
49
|
export type ConsentTerms = z.infer<typeof consentTermsSchema>;
|
|
50
50
|
/**
|
|
@@ -151,13 +151,13 @@ export declare const oauthIdentitySchema: z.ZodObject<{
|
|
|
151
151
|
*/
|
|
152
152
|
name: z.ZodOptional<z.ZodString>;
|
|
153
153
|
}, "strip", z.ZodTypeAny, {
|
|
154
|
-
provider: string;
|
|
155
154
|
subject: string;
|
|
155
|
+
provider: string;
|
|
156
156
|
name?: string | undefined;
|
|
157
157
|
email?: string | undefined;
|
|
158
158
|
}, {
|
|
159
|
-
provider: string;
|
|
160
159
|
subject: string;
|
|
160
|
+
provider: string;
|
|
161
161
|
name?: string | undefined;
|
|
162
162
|
email?: string | undefined;
|
|
163
163
|
}>;
|
|
@@ -197,13 +197,13 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
197
197
|
}, "strip", z.ZodTypeAny, {
|
|
198
198
|
required: boolean;
|
|
199
199
|
version?: string | undefined;
|
|
200
|
-
text?: string | undefined;
|
|
201
200
|
url?: string | undefined;
|
|
201
|
+
text?: string | undefined;
|
|
202
202
|
}, {
|
|
203
203
|
version?: string | undefined;
|
|
204
|
-
text?: string | undefined;
|
|
205
204
|
url?: string | undefined;
|
|
206
205
|
required?: boolean | undefined;
|
|
206
|
+
text?: string | undefined;
|
|
207
207
|
}>>;
|
|
208
208
|
customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
209
209
|
name: z.ZodString;
|
|
@@ -280,13 +280,13 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
280
280
|
*/
|
|
281
281
|
oauthUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
282
282
|
}, "strip", z.ZodTypeAny, {
|
|
283
|
-
tool: string;
|
|
284
|
-
toolDescription: string;
|
|
285
|
-
scopes: string[];
|
|
286
283
|
agentDid: string;
|
|
287
284
|
sessionId: string;
|
|
285
|
+
tool: string;
|
|
286
|
+
scopes: string[];
|
|
288
287
|
projectId: string;
|
|
289
288
|
serverUrl: string;
|
|
289
|
+
toolDescription: string;
|
|
290
290
|
provider?: string | undefined;
|
|
291
291
|
branding?: {
|
|
292
292
|
primaryColor?: string | undefined;
|
|
@@ -297,8 +297,8 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
297
297
|
terms?: {
|
|
298
298
|
required: boolean;
|
|
299
299
|
version?: string | undefined;
|
|
300
|
-
text?: string | undefined;
|
|
301
300
|
url?: string | undefined;
|
|
301
|
+
text?: string | undefined;
|
|
302
302
|
} | undefined;
|
|
303
303
|
customFields?: {
|
|
304
304
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
@@ -316,13 +316,13 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
316
316
|
oauthRequired?: boolean | undefined;
|
|
317
317
|
oauthUrl?: string | undefined;
|
|
318
318
|
}, {
|
|
319
|
-
tool: string;
|
|
320
|
-
toolDescription: string;
|
|
321
|
-
scopes: string[];
|
|
322
319
|
agentDid: string;
|
|
323
320
|
sessionId: string;
|
|
321
|
+
tool: string;
|
|
322
|
+
scopes: string[];
|
|
324
323
|
projectId: string;
|
|
325
324
|
serverUrl: string;
|
|
325
|
+
toolDescription: string;
|
|
326
326
|
provider?: string | undefined;
|
|
327
327
|
branding?: {
|
|
328
328
|
primaryColor?: string | undefined;
|
|
@@ -332,9 +332,9 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
332
332
|
} | undefined;
|
|
333
333
|
terms?: {
|
|
334
334
|
version?: string | undefined;
|
|
335
|
-
text?: string | undefined;
|
|
336
335
|
url?: string | undefined;
|
|
337
336
|
required?: boolean | undefined;
|
|
337
|
+
text?: string | undefined;
|
|
338
338
|
} | undefined;
|
|
339
339
|
customFields?: {
|
|
340
340
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
@@ -352,13 +352,13 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
352
352
|
oauthRequired?: boolean | undefined;
|
|
353
353
|
oauthUrl?: string | undefined;
|
|
354
354
|
}>, {
|
|
355
|
-
tool: string;
|
|
356
|
-
toolDescription: string;
|
|
357
|
-
scopes: string[];
|
|
358
355
|
agentDid: string;
|
|
359
356
|
sessionId: string;
|
|
357
|
+
tool: string;
|
|
358
|
+
scopes: string[];
|
|
360
359
|
projectId: string;
|
|
361
360
|
serverUrl: string;
|
|
361
|
+
toolDescription: string;
|
|
362
362
|
provider?: string | undefined;
|
|
363
363
|
branding?: {
|
|
364
364
|
primaryColor?: string | undefined;
|
|
@@ -369,8 +369,8 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
369
369
|
terms?: {
|
|
370
370
|
required: boolean;
|
|
371
371
|
version?: string | undefined;
|
|
372
|
-
text?: string | undefined;
|
|
373
372
|
url?: string | undefined;
|
|
373
|
+
text?: string | undefined;
|
|
374
374
|
} | undefined;
|
|
375
375
|
customFields?: {
|
|
376
376
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
@@ -388,13 +388,13 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
388
388
|
oauthRequired?: boolean | undefined;
|
|
389
389
|
oauthUrl?: string | undefined;
|
|
390
390
|
}, {
|
|
391
|
-
tool: string;
|
|
392
|
-
toolDescription: string;
|
|
393
|
-
scopes: string[];
|
|
394
391
|
agentDid: string;
|
|
395
392
|
sessionId: string;
|
|
393
|
+
tool: string;
|
|
394
|
+
scopes: string[];
|
|
396
395
|
projectId: string;
|
|
397
396
|
serverUrl: string;
|
|
397
|
+
toolDescription: string;
|
|
398
398
|
provider?: string | undefined;
|
|
399
399
|
branding?: {
|
|
400
400
|
primaryColor?: string | undefined;
|
|
@@ -404,9 +404,9 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
404
404
|
} | undefined;
|
|
405
405
|
terms?: {
|
|
406
406
|
version?: string | undefined;
|
|
407
|
-
text?: string | undefined;
|
|
408
407
|
url?: string | undefined;
|
|
409
408
|
required?: boolean | undefined;
|
|
409
|
+
text?: string | undefined;
|
|
410
410
|
} | undefined;
|
|
411
411
|
customFields?: {
|
|
412
412
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
@@ -469,13 +469,13 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
|
|
|
469
469
|
*/
|
|
470
470
|
name: z.ZodOptional<z.ZodString>;
|
|
471
471
|
}, "strip", z.ZodTypeAny, {
|
|
472
|
-
provider: string;
|
|
473
472
|
subject: string;
|
|
473
|
+
provider: string;
|
|
474
474
|
name?: string | undefined;
|
|
475
475
|
email?: string | undefined;
|
|
476
476
|
}, {
|
|
477
|
-
provider: string;
|
|
478
477
|
subject: string;
|
|
478
|
+
provider: string;
|
|
479
479
|
name?: string | undefined;
|
|
480
480
|
email?: string | undefined;
|
|
481
481
|
}>>>;
|
|
@@ -487,32 +487,32 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
|
|
|
487
487
|
user_did: z.ZodOptional<z.ZodString>;
|
|
488
488
|
}, "strip", z.ZodTypeAny, {
|
|
489
489
|
tool: string;
|
|
490
|
+
session_id: string;
|
|
490
491
|
scopes: string[];
|
|
491
492
|
agent_did: string;
|
|
492
|
-
session_id: string;
|
|
493
493
|
project_id: string;
|
|
494
494
|
termsAccepted: boolean;
|
|
495
495
|
customFields?: Record<string, string | boolean> | undefined;
|
|
496
496
|
termsVersion?: string | undefined;
|
|
497
497
|
oauth_identity?: {
|
|
498
|
-
provider: string;
|
|
499
498
|
subject: string;
|
|
499
|
+
provider: string;
|
|
500
500
|
name?: string | undefined;
|
|
501
501
|
email?: string | undefined;
|
|
502
502
|
} | null | undefined;
|
|
503
503
|
user_did?: string | undefined;
|
|
504
504
|
}, {
|
|
505
505
|
tool: string;
|
|
506
|
+
session_id: string;
|
|
506
507
|
scopes: string[];
|
|
507
508
|
agent_did: string;
|
|
508
|
-
session_id: string;
|
|
509
509
|
project_id: string;
|
|
510
510
|
termsAccepted: boolean;
|
|
511
511
|
customFields?: Record<string, string | boolean> | undefined;
|
|
512
512
|
termsVersion?: string | undefined;
|
|
513
513
|
oauth_identity?: {
|
|
514
|
-
provider: string;
|
|
515
514
|
subject: string;
|
|
515
|
+
provider: string;
|
|
516
516
|
name?: string | undefined;
|
|
517
517
|
email?: string | undefined;
|
|
518
518
|
} | null | undefined;
|
|
@@ -582,13 +582,13 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
582
582
|
}, "strip", z.ZodTypeAny, {
|
|
583
583
|
required: boolean;
|
|
584
584
|
version?: string | undefined;
|
|
585
|
-
text?: string | undefined;
|
|
586
585
|
url?: string | undefined;
|
|
586
|
+
text?: string | undefined;
|
|
587
587
|
}, {
|
|
588
588
|
version?: string | undefined;
|
|
589
|
-
text?: string | undefined;
|
|
590
589
|
url?: string | undefined;
|
|
591
590
|
required?: boolean | undefined;
|
|
591
|
+
text?: string | undefined;
|
|
592
592
|
}>>;
|
|
593
593
|
customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
594
594
|
name: z.ZodString;
|
|
@@ -678,8 +678,8 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
678
678
|
terms?: {
|
|
679
679
|
required: boolean;
|
|
680
680
|
version?: string | undefined;
|
|
681
|
-
text?: string | undefined;
|
|
682
681
|
url?: string | undefined;
|
|
682
|
+
text?: string | undefined;
|
|
683
683
|
} | undefined;
|
|
684
684
|
customFields?: {
|
|
685
685
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
@@ -708,9 +708,9 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
708
708
|
} | undefined;
|
|
709
709
|
terms?: {
|
|
710
710
|
version?: string | undefined;
|
|
711
|
-
text?: string | undefined;
|
|
712
711
|
url?: string | undefined;
|
|
713
712
|
required?: boolean | undefined;
|
|
713
|
+
text?: string | undefined;
|
|
714
714
|
} | undefined;
|
|
715
715
|
customFields?: {
|
|
716
716
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
@@ -742,13 +742,13 @@ export type ConsentConfig = z.infer<typeof consentConfigSchema>;
|
|
|
742
742
|
* @returns Validation result
|
|
743
743
|
*/
|
|
744
744
|
export declare function validateConsentPageConfig(config: unknown): z.SafeParseReturnType<{
|
|
745
|
-
tool: string;
|
|
746
|
-
toolDescription: string;
|
|
747
|
-
scopes: string[];
|
|
748
745
|
agentDid: string;
|
|
749
746
|
sessionId: string;
|
|
747
|
+
tool: string;
|
|
748
|
+
scopes: string[];
|
|
750
749
|
projectId: string;
|
|
751
750
|
serverUrl: string;
|
|
751
|
+
toolDescription: string;
|
|
752
752
|
provider?: string | undefined;
|
|
753
753
|
branding?: {
|
|
754
754
|
primaryColor?: string | undefined;
|
|
@@ -758,9 +758,9 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
|
|
|
758
758
|
} | undefined;
|
|
759
759
|
terms?: {
|
|
760
760
|
version?: string | undefined;
|
|
761
|
-
text?: string | undefined;
|
|
762
761
|
url?: string | undefined;
|
|
763
762
|
required?: boolean | undefined;
|
|
763
|
+
text?: string | undefined;
|
|
764
764
|
} | undefined;
|
|
765
765
|
customFields?: {
|
|
766
766
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
@@ -778,13 +778,13 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
|
|
|
778
778
|
oauthRequired?: boolean | undefined;
|
|
779
779
|
oauthUrl?: string | undefined;
|
|
780
780
|
}, {
|
|
781
|
-
tool: string;
|
|
782
|
-
toolDescription: string;
|
|
783
|
-
scopes: string[];
|
|
784
781
|
agentDid: string;
|
|
785
782
|
sessionId: string;
|
|
783
|
+
tool: string;
|
|
784
|
+
scopes: string[];
|
|
786
785
|
projectId: string;
|
|
787
786
|
serverUrl: string;
|
|
787
|
+
toolDescription: string;
|
|
788
788
|
provider?: string | undefined;
|
|
789
789
|
branding?: {
|
|
790
790
|
primaryColor?: string | undefined;
|
|
@@ -795,8 +795,8 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
|
|
|
795
795
|
terms?: {
|
|
796
796
|
required: boolean;
|
|
797
797
|
version?: string | undefined;
|
|
798
|
-
text?: string | undefined;
|
|
799
798
|
url?: string | undefined;
|
|
799
|
+
text?: string | undefined;
|
|
800
800
|
} | undefined;
|
|
801
801
|
customFields?: {
|
|
802
802
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
@@ -822,32 +822,32 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
|
|
|
822
822
|
*/
|
|
823
823
|
export declare function validateConsentApprovalRequest(request: unknown): z.SafeParseReturnType<{
|
|
824
824
|
tool: string;
|
|
825
|
+
session_id: string;
|
|
825
826
|
scopes: string[];
|
|
826
827
|
agent_did: string;
|
|
827
|
-
session_id: string;
|
|
828
828
|
project_id: string;
|
|
829
829
|
termsAccepted: boolean;
|
|
830
830
|
customFields?: Record<string, string | boolean> | undefined;
|
|
831
831
|
termsVersion?: string | undefined;
|
|
832
832
|
oauth_identity?: {
|
|
833
|
-
provider: string;
|
|
834
833
|
subject: string;
|
|
834
|
+
provider: string;
|
|
835
835
|
name?: string | undefined;
|
|
836
836
|
email?: string | undefined;
|
|
837
837
|
} | null | undefined;
|
|
838
838
|
user_did?: string | undefined;
|
|
839
839
|
}, {
|
|
840
840
|
tool: string;
|
|
841
|
+
session_id: string;
|
|
841
842
|
scopes: string[];
|
|
842
843
|
agent_did: string;
|
|
843
|
-
session_id: string;
|
|
844
844
|
project_id: string;
|
|
845
845
|
termsAccepted: boolean;
|
|
846
846
|
customFields?: Record<string, string | boolean> | undefined;
|
|
847
847
|
termsVersion?: string | undefined;
|
|
848
848
|
oauth_identity?: {
|
|
849
|
-
provider: string;
|
|
850
849
|
subject: string;
|
|
850
|
+
provider: string;
|
|
851
851
|
name?: string | undefined;
|
|
852
852
|
email?: string | undefined;
|
|
853
853
|
} | null | undefined;
|
|
@@ -887,9 +887,9 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
|
|
|
887
887
|
} | undefined;
|
|
888
888
|
terms?: {
|
|
889
889
|
version?: string | undefined;
|
|
890
|
-
text?: string | undefined;
|
|
891
890
|
url?: string | undefined;
|
|
892
891
|
required?: boolean | undefined;
|
|
892
|
+
text?: string | undefined;
|
|
893
893
|
} | undefined;
|
|
894
894
|
customFields?: {
|
|
895
895
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
@@ -919,8 +919,8 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
|
|
|
919
919
|
terms?: {
|
|
920
920
|
required: boolean;
|
|
921
921
|
version?: string | undefined;
|
|
922
|
-
text?: string | undefined;
|
|
923
922
|
url?: string | undefined;
|
|
923
|
+
text?: string | undefined;
|
|
924
924
|
} | undefined;
|
|
925
925
|
customFields?: {
|
|
926
926
|
type: "text" | "textarea" | "checkbox" | "select";
|