@kya-os/contracts 1.5.2 → 1.5.3-canary.2
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/admin-schemas.d.ts +49 -0
- package/dist/agentshield-api/admin-schemas.js +30 -0
- package/dist/agentshield-api/admin-types.d.ts +37 -0
- package/dist/agentshield-api/admin-types.js +10 -0
- package/dist/agentshield-api/index.d.ts +7 -5
- package/dist/agentshield-api/index.js +4 -1
- package/dist/consent/schemas.d.ts +64 -64
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentShield Admin API Validation Schemas
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for administrative operations in AgentShield.
|
|
5
|
+
*
|
|
6
|
+
* @package @kya-os/contracts/agentshield-api
|
|
7
|
+
*/
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
/**
|
|
10
|
+
* Request schema for clearing agent cache
|
|
11
|
+
*/
|
|
12
|
+
export declare const clearCacheRequestSchema: z.ZodObject<{
|
|
13
|
+
agent_did: z.ZodString;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
agent_did: string;
|
|
16
|
+
}, {
|
|
17
|
+
agent_did: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Response schema for clear cache operation
|
|
21
|
+
*/
|
|
22
|
+
export declare const clearCacheResponseSchema: z.ZodObject<{
|
|
23
|
+
message: z.ZodString;
|
|
24
|
+
agent_did: z.ZodString;
|
|
25
|
+
project_id: z.ZodNullable<z.ZodString>;
|
|
26
|
+
cache_key: z.ZodString;
|
|
27
|
+
old_cache_key: z.ZodNullable<z.ZodString>;
|
|
28
|
+
had_value: z.ZodBoolean;
|
|
29
|
+
had_old_value: z.ZodBoolean;
|
|
30
|
+
cleared: z.ZodBoolean;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
agent_did: string;
|
|
33
|
+
message: string;
|
|
34
|
+
project_id: string | null;
|
|
35
|
+
cache_key: string;
|
|
36
|
+
old_cache_key: string | null;
|
|
37
|
+
had_value: boolean;
|
|
38
|
+
had_old_value: boolean;
|
|
39
|
+
cleared: boolean;
|
|
40
|
+
}, {
|
|
41
|
+
agent_did: string;
|
|
42
|
+
message: string;
|
|
43
|
+
project_id: string | null;
|
|
44
|
+
cache_key: string;
|
|
45
|
+
old_cache_key: string | null;
|
|
46
|
+
had_value: boolean;
|
|
47
|
+
had_old_value: boolean;
|
|
48
|
+
cleared: boolean;
|
|
49
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* AgentShield Admin API Validation Schemas
|
|
4
|
+
*
|
|
5
|
+
* Zod schemas for administrative operations in AgentShield.
|
|
6
|
+
*
|
|
7
|
+
* @package @kya-os/contracts/agentshield-api
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.clearCacheResponseSchema = exports.clearCacheRequestSchema = void 0;
|
|
11
|
+
const zod_1 = require("zod");
|
|
12
|
+
/**
|
|
13
|
+
* Request schema for clearing agent cache
|
|
14
|
+
*/
|
|
15
|
+
exports.clearCacheRequestSchema = zod_1.z.object({
|
|
16
|
+
agent_did: zod_1.z.string().min(1).describe('The DID of the agent whose cache should be cleared'),
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Response schema for clear cache operation
|
|
20
|
+
*/
|
|
21
|
+
exports.clearCacheResponseSchema = zod_1.z.object({
|
|
22
|
+
message: zod_1.z.string().describe('Human-readable message about the operation result'),
|
|
23
|
+
agent_did: zod_1.z.string().describe('The agent DID that was cleared'),
|
|
24
|
+
project_id: zod_1.z.string().nullable().describe('The project ID if available'),
|
|
25
|
+
cache_key: zod_1.z.string().describe('The cache key that was cleared'),
|
|
26
|
+
old_cache_key: zod_1.z.string().nullable().describe('Old cache key that was also cleared (for migration)'),
|
|
27
|
+
had_value: zod_1.z.boolean().describe('Whether the cache entry existed before clearing'),
|
|
28
|
+
had_old_value: zod_1.z.boolean().describe('Whether the old cache entry existed before clearing'),
|
|
29
|
+
cleared: zod_1.z.boolean().describe('Whether the cache was successfully cleared'),
|
|
30
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentShield Admin API Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* TypeScript interfaces for administrative operations in AgentShield.
|
|
5
|
+
* These types ensure parity between xmcp-i admin endpoints and the AgentShield service.
|
|
6
|
+
*
|
|
7
|
+
* @package @kya-os/contracts/agentshield-api
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Request to clear agent cache
|
|
11
|
+
* POST /admin/clear-cache
|
|
12
|
+
*/
|
|
13
|
+
export interface ClearCacheRequest {
|
|
14
|
+
/** The DID of the agent whose cache should be cleared */
|
|
15
|
+
agent_did: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Response from clear cache operation
|
|
19
|
+
*/
|
|
20
|
+
export interface ClearCacheResponse {
|
|
21
|
+
/** Human-readable message about the operation result */
|
|
22
|
+
message: string;
|
|
23
|
+
/** The agent DID that was cleared */
|
|
24
|
+
agent_did: string;
|
|
25
|
+
/** The project ID if available */
|
|
26
|
+
project_id: string | null;
|
|
27
|
+
/** The cache key that was cleared */
|
|
28
|
+
cache_key: string;
|
|
29
|
+
/** Old cache key that was also cleared (for migration) */
|
|
30
|
+
old_cache_key: string | null;
|
|
31
|
+
/** Whether the cache entry existed before clearing */
|
|
32
|
+
had_value: boolean;
|
|
33
|
+
/** Whether the old cache entry existed before clearing */
|
|
34
|
+
had_old_value: boolean;
|
|
35
|
+
/** Whether the cache was successfully cleared */
|
|
36
|
+
cleared: boolean;
|
|
37
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* AgentShield Admin API Type Definitions
|
|
4
|
+
*
|
|
5
|
+
* TypeScript interfaces for administrative operations in AgentShield.
|
|
6
|
+
* These types ensure parity between xmcp-i admin endpoints and the AgentShield service.
|
|
7
|
+
*
|
|
8
|
+
* @package @kya-os/contracts/agentshield-api
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @package @kya-os/contracts/agentshield-api
|
|
8
8
|
*/
|
|
9
|
-
export type { AgentShieldAPIResponse, AgentShieldAPIErrorResponse, ProofSubmissionRequest, ProofSubmissionResponse, ToolCallContext, BouncerOutcome, VerifyDelegationRequest, VerifyDelegationResponse, VerifyDelegationAPIResponse, DelegationCredential, AgentShieldToolProtection, ToolProtectionConfigResponse, ToolProtectionConfigAPIResponse, CreateDelegationRequest, CreateDelegationResponse, CreateDelegationAPIResponse, RevokeDelegationRequest, RevokeDelegationResponse, RevokeDelegationAPIResponse, } from
|
|
10
|
-
export { AgentShieldAPIError } from
|
|
11
|
-
export type { AgentShieldAPIHeaders } from
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
9
|
+
export type { AgentShieldAPIResponse, AgentShieldAPIErrorResponse, ProofSubmissionRequest, ProofSubmissionResponse, ToolCallContext, BouncerOutcome, VerifyDelegationRequest, VerifyDelegationResponse, VerifyDelegationAPIResponse, DelegationCredential, AgentShieldToolProtection, ToolProtectionConfigResponse, ToolProtectionConfigAPIResponse, CreateDelegationRequest, CreateDelegationResponse, CreateDelegationAPIResponse, RevokeDelegationRequest, RevokeDelegationResponse, RevokeDelegationAPIResponse, } from "./types.js";
|
|
10
|
+
export { AgentShieldAPIError } from "./types.js";
|
|
11
|
+
export type { AgentShieldAPIHeaders } from "./endpoints.js";
|
|
12
|
+
export type { ClearCacheRequest, ClearCacheResponse } from "./admin-types.js";
|
|
13
|
+
export { agentShieldAPIErrorSchema, agentShieldAPIResponseSchema, proofSubmissionRequestSchema, proofSubmissionResponseSchema, delegationCredentialSchema, verifyDelegationRequestSchema, verifyDelegationResponseSchema, verifyDelegationAPIResponseSchema, agentShieldToolProtectionSchema, toolProtectionConfigResponseSchema, toolProtectionConfigAPIResponseSchema, createDelegationRequestSchema, createDelegationResponseSchema, createDelegationAPIResponseSchema, revokeDelegationRequestSchema, revokeDelegationResponseSchema, revokeDelegationAPIResponseSchema, } from "./schemas.js";
|
|
14
|
+
export { clearCacheRequestSchema, clearCacheResponseSchema, } from "./admin-schemas.js";
|
|
15
|
+
export { AGENTSHIELD_API_BASE, AGENTSHIELD_ENDPOINTS, AGENTSHIELD_METHODS, } from "./endpoints.js";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @package @kya-os/contracts/agentshield-api
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.AGENTSHIELD_METHODS = exports.AGENTSHIELD_ENDPOINTS = exports.AGENTSHIELD_API_BASE = exports.revokeDelegationAPIResponseSchema = exports.revokeDelegationResponseSchema = exports.revokeDelegationRequestSchema = exports.createDelegationAPIResponseSchema = exports.createDelegationResponseSchema = exports.createDelegationRequestSchema = exports.toolProtectionConfigAPIResponseSchema = exports.toolProtectionConfigResponseSchema = exports.agentShieldToolProtectionSchema = exports.verifyDelegationAPIResponseSchema = exports.verifyDelegationResponseSchema = exports.verifyDelegationRequestSchema = exports.delegationCredentialSchema = exports.proofSubmissionResponseSchema = exports.proofSubmissionRequestSchema = exports.agentShieldAPIResponseSchema = exports.agentShieldAPIErrorSchema = exports.AgentShieldAPIError = void 0;
|
|
11
|
+
exports.AGENTSHIELD_METHODS = exports.AGENTSHIELD_ENDPOINTS = exports.AGENTSHIELD_API_BASE = exports.clearCacheResponseSchema = exports.clearCacheRequestSchema = exports.revokeDelegationAPIResponseSchema = exports.revokeDelegationResponseSchema = exports.revokeDelegationRequestSchema = exports.createDelegationAPIResponseSchema = exports.createDelegationResponseSchema = exports.createDelegationRequestSchema = exports.toolProtectionConfigAPIResponseSchema = exports.toolProtectionConfigResponseSchema = exports.agentShieldToolProtectionSchema = exports.verifyDelegationAPIResponseSchema = exports.verifyDelegationResponseSchema = exports.verifyDelegationRequestSchema = exports.delegationCredentialSchema = exports.proofSubmissionResponseSchema = exports.proofSubmissionRequestSchema = exports.agentShieldAPIResponseSchema = exports.agentShieldAPIErrorSchema = exports.AgentShieldAPIError = void 0;
|
|
12
12
|
var types_js_1 = require("./types.js");
|
|
13
13
|
Object.defineProperty(exports, "AgentShieldAPIError", { enumerable: true, get: function () { return types_js_1.AgentShieldAPIError; } });
|
|
14
14
|
// Schema exports
|
|
@@ -30,6 +30,9 @@ Object.defineProperty(exports, "createDelegationAPIResponseSchema", { enumerable
|
|
|
30
30
|
Object.defineProperty(exports, "revokeDelegationRequestSchema", { enumerable: true, get: function () { return schemas_js_1.revokeDelegationRequestSchema; } });
|
|
31
31
|
Object.defineProperty(exports, "revokeDelegationResponseSchema", { enumerable: true, get: function () { return schemas_js_1.revokeDelegationResponseSchema; } });
|
|
32
32
|
Object.defineProperty(exports, "revokeDelegationAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.revokeDelegationAPIResponseSchema; } });
|
|
33
|
+
var admin_schemas_js_1 = require("./admin-schemas.js");
|
|
34
|
+
Object.defineProperty(exports, "clearCacheRequestSchema", { enumerable: true, get: function () { return admin_schemas_js_1.clearCacheRequestSchema; } });
|
|
35
|
+
Object.defineProperty(exports, "clearCacheResponseSchema", { enumerable: true, get: function () { return admin_schemas_js_1.clearCacheResponseSchema; } });
|
|
33
36
|
// Endpoint exports
|
|
34
37
|
var endpoints_js_1 = require("./endpoints.js");
|
|
35
38
|
Object.defineProperty(exports, "AGENTSHIELD_API_BASE", { enumerable: true, get: function () { return endpoints_js_1.AGENTSHIELD_API_BASE; } });
|
|
@@ -37,13 +37,13 @@ export declare const consentTermsSchema: z.ZodObject<{
|
|
|
37
37
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
39
|
required: boolean;
|
|
40
|
-
version?: string | undefined;
|
|
41
|
-
url?: string | undefined;
|
|
42
40
|
text?: string | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
version?: string | undefined;
|
|
45
41
|
url?: string | undefined;
|
|
42
|
+
version?: string | undefined;
|
|
43
|
+
}, {
|
|
46
44
|
text?: string | undefined;
|
|
45
|
+
url?: string | undefined;
|
|
46
|
+
version?: string | undefined;
|
|
47
47
|
required?: boolean | undefined;
|
|
48
48
|
}>;
|
|
49
49
|
export type ConsentTerms = z.infer<typeof consentTermsSchema>;
|
|
@@ -81,10 +81,10 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
|
81
81
|
}>, "many">>;
|
|
82
82
|
pattern: z.ZodOptional<z.ZodString>;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
|
-
name: string;
|
|
85
84
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
86
85
|
required: boolean;
|
|
87
86
|
label: string;
|
|
87
|
+
name: string;
|
|
88
88
|
options?: {
|
|
89
89
|
value: string;
|
|
90
90
|
label: string;
|
|
@@ -92,10 +92,10 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
|
92
92
|
placeholder?: string | undefined;
|
|
93
93
|
pattern?: string | undefined;
|
|
94
94
|
}, {
|
|
95
|
-
name: string;
|
|
96
95
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
97
96
|
required: boolean;
|
|
98
97
|
label: string;
|
|
98
|
+
name: string;
|
|
99
99
|
options?: {
|
|
100
100
|
value: string;
|
|
101
101
|
label: string;
|
|
@@ -103,10 +103,10 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
|
103
103
|
placeholder?: string | undefined;
|
|
104
104
|
pattern?: string | undefined;
|
|
105
105
|
}>, {
|
|
106
|
-
name: string;
|
|
107
106
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
108
107
|
required: boolean;
|
|
109
108
|
label: string;
|
|
109
|
+
name: string;
|
|
110
110
|
options?: {
|
|
111
111
|
value: string;
|
|
112
112
|
label: string;
|
|
@@ -114,10 +114,10 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
|
114
114
|
placeholder?: string | undefined;
|
|
115
115
|
pattern?: string | undefined;
|
|
116
116
|
}, {
|
|
117
|
-
name: string;
|
|
118
117
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
119
118
|
required: boolean;
|
|
120
119
|
label: string;
|
|
120
|
+
name: string;
|
|
121
121
|
options?: {
|
|
122
122
|
value: string;
|
|
123
123
|
label: string;
|
|
@@ -195,13 +195,13 @@ export declare const consentPageConfigSchema: z.ZodObject<{
|
|
|
195
195
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
196
196
|
}, "strip", z.ZodTypeAny, {
|
|
197
197
|
required: boolean;
|
|
198
|
-
version?: string | undefined;
|
|
199
|
-
url?: string | undefined;
|
|
200
198
|
text?: string | undefined;
|
|
201
|
-
}, {
|
|
202
|
-
version?: string | undefined;
|
|
203
199
|
url?: string | undefined;
|
|
200
|
+
version?: string | undefined;
|
|
201
|
+
}, {
|
|
204
202
|
text?: string | undefined;
|
|
203
|
+
url?: string | undefined;
|
|
204
|
+
version?: string | undefined;
|
|
205
205
|
required?: boolean | undefined;
|
|
206
206
|
}>>;
|
|
207
207
|
customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
@@ -222,10 +222,10 @@ export declare const consentPageConfigSchema: z.ZodObject<{
|
|
|
222
222
|
}>, "many">>;
|
|
223
223
|
pattern: z.ZodOptional<z.ZodString>;
|
|
224
224
|
}, "strip", z.ZodTypeAny, {
|
|
225
|
-
name: string;
|
|
226
225
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
227
226
|
required: boolean;
|
|
228
227
|
label: string;
|
|
228
|
+
name: string;
|
|
229
229
|
options?: {
|
|
230
230
|
value: string;
|
|
231
231
|
label: string;
|
|
@@ -233,10 +233,10 @@ export declare const consentPageConfigSchema: z.ZodObject<{
|
|
|
233
233
|
placeholder?: string | undefined;
|
|
234
234
|
pattern?: string | undefined;
|
|
235
235
|
}, {
|
|
236
|
-
name: string;
|
|
237
236
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
238
237
|
required: boolean;
|
|
239
238
|
label: string;
|
|
239
|
+
name: string;
|
|
240
240
|
options?: {
|
|
241
241
|
value: string;
|
|
242
242
|
label: string;
|
|
@@ -244,10 +244,10 @@ export declare const consentPageConfigSchema: z.ZodObject<{
|
|
|
244
244
|
placeholder?: string | undefined;
|
|
245
245
|
pattern?: string | undefined;
|
|
246
246
|
}>, {
|
|
247
|
-
name: string;
|
|
248
247
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
249
248
|
required: boolean;
|
|
250
249
|
label: string;
|
|
250
|
+
name: string;
|
|
251
251
|
options?: {
|
|
252
252
|
value: string;
|
|
253
253
|
label: string;
|
|
@@ -255,10 +255,10 @@ export declare const consentPageConfigSchema: z.ZodObject<{
|
|
|
255
255
|
placeholder?: string | undefined;
|
|
256
256
|
pattern?: string | undefined;
|
|
257
257
|
}, {
|
|
258
|
-
name: string;
|
|
259
258
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
260
259
|
required: boolean;
|
|
261
260
|
label: string;
|
|
261
|
+
name: string;
|
|
262
262
|
options?: {
|
|
263
263
|
value: string;
|
|
264
264
|
label: string;
|
|
@@ -269,11 +269,11 @@ export declare const consentPageConfigSchema: z.ZodObject<{
|
|
|
269
269
|
serverUrl: z.ZodString;
|
|
270
270
|
autoClose: z.ZodOptional<z.ZodBoolean>;
|
|
271
271
|
}, "strip", z.ZodTypeAny, {
|
|
272
|
-
agentDid: string;
|
|
273
|
-
sessionId: string;
|
|
274
272
|
tool: string;
|
|
275
273
|
toolDescription: string;
|
|
276
274
|
scopes: string[];
|
|
275
|
+
agentDid: string;
|
|
276
|
+
sessionId: string;
|
|
277
277
|
projectId: string;
|
|
278
278
|
serverUrl: string;
|
|
279
279
|
branding?: {
|
|
@@ -284,15 +284,15 @@ export declare const consentPageConfigSchema: z.ZodObject<{
|
|
|
284
284
|
} | undefined;
|
|
285
285
|
terms?: {
|
|
286
286
|
required: boolean;
|
|
287
|
-
version?: string | undefined;
|
|
288
|
-
url?: string | undefined;
|
|
289
287
|
text?: string | undefined;
|
|
288
|
+
url?: string | undefined;
|
|
289
|
+
version?: string | undefined;
|
|
290
290
|
} | undefined;
|
|
291
291
|
customFields?: {
|
|
292
|
-
name: string;
|
|
293
292
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
294
293
|
required: boolean;
|
|
295
294
|
label: string;
|
|
295
|
+
name: string;
|
|
296
296
|
options?: {
|
|
297
297
|
value: string;
|
|
298
298
|
label: string;
|
|
@@ -302,11 +302,11 @@ export declare const consentPageConfigSchema: z.ZodObject<{
|
|
|
302
302
|
}[] | undefined;
|
|
303
303
|
autoClose?: boolean | undefined;
|
|
304
304
|
}, {
|
|
305
|
-
agentDid: string;
|
|
306
|
-
sessionId: string;
|
|
307
305
|
tool: string;
|
|
308
306
|
toolDescription: string;
|
|
309
307
|
scopes: string[];
|
|
308
|
+
agentDid: string;
|
|
309
|
+
sessionId: string;
|
|
310
310
|
projectId: string;
|
|
311
311
|
serverUrl: string;
|
|
312
312
|
branding?: {
|
|
@@ -316,16 +316,16 @@ export declare const consentPageConfigSchema: z.ZodObject<{
|
|
|
316
316
|
theme?: "light" | "dark" | "auto" | undefined;
|
|
317
317
|
} | undefined;
|
|
318
318
|
terms?: {
|
|
319
|
-
version?: string | undefined;
|
|
320
|
-
url?: string | undefined;
|
|
321
319
|
text?: string | undefined;
|
|
320
|
+
url?: string | undefined;
|
|
321
|
+
version?: string | undefined;
|
|
322
322
|
required?: boolean | undefined;
|
|
323
323
|
} | undefined;
|
|
324
324
|
customFields?: {
|
|
325
|
-
name: string;
|
|
326
325
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
327
326
|
required: boolean;
|
|
328
327
|
label: string;
|
|
328
|
+
name: string;
|
|
329
329
|
options?: {
|
|
330
330
|
value: string;
|
|
331
331
|
label: string;
|
|
@@ -394,11 +394,11 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
|
|
|
394
394
|
*/
|
|
395
395
|
user_did: z.ZodOptional<z.ZodString>;
|
|
396
396
|
}, "strip", z.ZodTypeAny, {
|
|
397
|
+
agent_did: string;
|
|
398
|
+
project_id: string;
|
|
397
399
|
tool: string;
|
|
398
400
|
scopes: string[];
|
|
399
|
-
agent_did: string;
|
|
400
401
|
session_id: string;
|
|
401
|
-
project_id: string;
|
|
402
402
|
termsAccepted: boolean;
|
|
403
403
|
customFields?: Record<string, string | boolean> | undefined;
|
|
404
404
|
termsVersion?: string | undefined;
|
|
@@ -410,11 +410,11 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
|
|
|
410
410
|
} | undefined;
|
|
411
411
|
user_did?: string | undefined;
|
|
412
412
|
}, {
|
|
413
|
+
agent_did: string;
|
|
414
|
+
project_id: string;
|
|
413
415
|
tool: string;
|
|
414
416
|
scopes: string[];
|
|
415
|
-
agent_did: string;
|
|
416
417
|
session_id: string;
|
|
417
|
-
project_id: string;
|
|
418
418
|
termsAccepted: boolean;
|
|
419
419
|
customFields?: Record<string, string | boolean> | undefined;
|
|
420
420
|
termsVersion?: string | undefined;
|
|
@@ -489,13 +489,13 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
489
489
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
490
490
|
}, "strip", z.ZodTypeAny, {
|
|
491
491
|
required: boolean;
|
|
492
|
-
version?: string | undefined;
|
|
493
|
-
url?: string | undefined;
|
|
494
492
|
text?: string | undefined;
|
|
495
|
-
}, {
|
|
496
|
-
version?: string | undefined;
|
|
497
493
|
url?: string | undefined;
|
|
494
|
+
version?: string | undefined;
|
|
495
|
+
}, {
|
|
498
496
|
text?: string | undefined;
|
|
497
|
+
url?: string | undefined;
|
|
498
|
+
version?: string | undefined;
|
|
499
499
|
required?: boolean | undefined;
|
|
500
500
|
}>>;
|
|
501
501
|
customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
@@ -516,10 +516,10 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
516
516
|
}>, "many">>;
|
|
517
517
|
pattern: z.ZodOptional<z.ZodString>;
|
|
518
518
|
}, "strip", z.ZodTypeAny, {
|
|
519
|
-
name: string;
|
|
520
519
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
521
520
|
required: boolean;
|
|
522
521
|
label: string;
|
|
522
|
+
name: string;
|
|
523
523
|
options?: {
|
|
524
524
|
value: string;
|
|
525
525
|
label: string;
|
|
@@ -527,10 +527,10 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
527
527
|
placeholder?: string | undefined;
|
|
528
528
|
pattern?: string | undefined;
|
|
529
529
|
}, {
|
|
530
|
-
name: string;
|
|
531
530
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
532
531
|
required: boolean;
|
|
533
532
|
label: string;
|
|
533
|
+
name: string;
|
|
534
534
|
options?: {
|
|
535
535
|
value: string;
|
|
536
536
|
label: string;
|
|
@@ -538,10 +538,10 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
538
538
|
placeholder?: string | undefined;
|
|
539
539
|
pattern?: string | undefined;
|
|
540
540
|
}>, {
|
|
541
|
-
name: string;
|
|
542
541
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
543
542
|
required: boolean;
|
|
544
543
|
label: string;
|
|
544
|
+
name: string;
|
|
545
545
|
options?: {
|
|
546
546
|
value: string;
|
|
547
547
|
label: string;
|
|
@@ -549,10 +549,10 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
549
549
|
placeholder?: string | undefined;
|
|
550
550
|
pattern?: string | undefined;
|
|
551
551
|
}, {
|
|
552
|
-
name: string;
|
|
553
552
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
554
553
|
required: boolean;
|
|
555
554
|
label: string;
|
|
555
|
+
name: string;
|
|
556
556
|
options?: {
|
|
557
557
|
value: string;
|
|
558
558
|
label: string;
|
|
@@ -585,15 +585,15 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
585
585
|
} | undefined;
|
|
586
586
|
terms?: {
|
|
587
587
|
required: boolean;
|
|
588
|
-
version?: string | undefined;
|
|
589
|
-
url?: string | undefined;
|
|
590
588
|
text?: string | undefined;
|
|
589
|
+
url?: string | undefined;
|
|
590
|
+
version?: string | undefined;
|
|
591
591
|
} | undefined;
|
|
592
592
|
customFields?: {
|
|
593
|
-
name: string;
|
|
594
593
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
595
594
|
required: boolean;
|
|
596
595
|
label: string;
|
|
596
|
+
name: string;
|
|
597
597
|
options?: {
|
|
598
598
|
value: string;
|
|
599
599
|
label: string;
|
|
@@ -615,16 +615,16 @@ export declare const consentConfigSchema: z.ZodObject<{
|
|
|
615
615
|
theme?: "light" | "dark" | "auto" | undefined;
|
|
616
616
|
} | undefined;
|
|
617
617
|
terms?: {
|
|
618
|
-
version?: string | undefined;
|
|
619
|
-
url?: string | undefined;
|
|
620
618
|
text?: string | undefined;
|
|
619
|
+
url?: string | undefined;
|
|
620
|
+
version?: string | undefined;
|
|
621
621
|
required?: boolean | undefined;
|
|
622
622
|
} | undefined;
|
|
623
623
|
customFields?: {
|
|
624
|
-
name: string;
|
|
625
624
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
626
625
|
required: boolean;
|
|
627
626
|
label: string;
|
|
627
|
+
name: string;
|
|
628
628
|
options?: {
|
|
629
629
|
value: string;
|
|
630
630
|
label: string;
|
|
@@ -650,11 +650,11 @@ export type ConsentConfig = z.infer<typeof consentConfigSchema>;
|
|
|
650
650
|
* @returns Validation result
|
|
651
651
|
*/
|
|
652
652
|
export declare function validateConsentPageConfig(config: unknown): z.SafeParseReturnType<{
|
|
653
|
-
agentDid: string;
|
|
654
|
-
sessionId: string;
|
|
655
653
|
tool: string;
|
|
656
654
|
toolDescription: string;
|
|
657
655
|
scopes: string[];
|
|
656
|
+
agentDid: string;
|
|
657
|
+
sessionId: string;
|
|
658
658
|
projectId: string;
|
|
659
659
|
serverUrl: string;
|
|
660
660
|
branding?: {
|
|
@@ -664,16 +664,16 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
|
|
|
664
664
|
theme?: "light" | "dark" | "auto" | undefined;
|
|
665
665
|
} | undefined;
|
|
666
666
|
terms?: {
|
|
667
|
-
version?: string | undefined;
|
|
668
|
-
url?: string | undefined;
|
|
669
667
|
text?: string | undefined;
|
|
668
|
+
url?: string | undefined;
|
|
669
|
+
version?: string | undefined;
|
|
670
670
|
required?: boolean | undefined;
|
|
671
671
|
} | undefined;
|
|
672
672
|
customFields?: {
|
|
673
|
-
name: string;
|
|
674
673
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
675
674
|
required: boolean;
|
|
676
675
|
label: string;
|
|
676
|
+
name: string;
|
|
677
677
|
options?: {
|
|
678
678
|
value: string;
|
|
679
679
|
label: string;
|
|
@@ -683,11 +683,11 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
|
|
|
683
683
|
}[] | undefined;
|
|
684
684
|
autoClose?: boolean | undefined;
|
|
685
685
|
}, {
|
|
686
|
-
agentDid: string;
|
|
687
|
-
sessionId: string;
|
|
688
686
|
tool: string;
|
|
689
687
|
toolDescription: string;
|
|
690
688
|
scopes: string[];
|
|
689
|
+
agentDid: string;
|
|
690
|
+
sessionId: string;
|
|
691
691
|
projectId: string;
|
|
692
692
|
serverUrl: string;
|
|
693
693
|
branding?: {
|
|
@@ -698,15 +698,15 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
|
|
|
698
698
|
} | undefined;
|
|
699
699
|
terms?: {
|
|
700
700
|
required: boolean;
|
|
701
|
-
version?: string | undefined;
|
|
702
|
-
url?: string | undefined;
|
|
703
701
|
text?: string | undefined;
|
|
702
|
+
url?: string | undefined;
|
|
703
|
+
version?: string | undefined;
|
|
704
704
|
} | undefined;
|
|
705
705
|
customFields?: {
|
|
706
|
-
name: string;
|
|
707
706
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
708
707
|
required: boolean;
|
|
709
708
|
label: string;
|
|
709
|
+
name: string;
|
|
710
710
|
options?: {
|
|
711
711
|
value: string;
|
|
712
712
|
label: string;
|
|
@@ -723,11 +723,11 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
|
|
|
723
723
|
* @returns Validation result
|
|
724
724
|
*/
|
|
725
725
|
export declare function validateConsentApprovalRequest(request: unknown): z.SafeParseReturnType<{
|
|
726
|
+
agent_did: string;
|
|
727
|
+
project_id: string;
|
|
726
728
|
tool: string;
|
|
727
729
|
scopes: string[];
|
|
728
|
-
agent_did: string;
|
|
729
730
|
session_id: string;
|
|
730
|
-
project_id: string;
|
|
731
731
|
termsAccepted: boolean;
|
|
732
732
|
customFields?: Record<string, string | boolean> | undefined;
|
|
733
733
|
termsVersion?: string | undefined;
|
|
@@ -739,11 +739,11 @@ export declare function validateConsentApprovalRequest(request: unknown): z.Safe
|
|
|
739
739
|
} | undefined;
|
|
740
740
|
user_did?: string | undefined;
|
|
741
741
|
}, {
|
|
742
|
+
agent_did: string;
|
|
743
|
+
project_id: string;
|
|
742
744
|
tool: string;
|
|
743
745
|
scopes: string[];
|
|
744
|
-
agent_did: string;
|
|
745
746
|
session_id: string;
|
|
746
|
-
project_id: string;
|
|
747
747
|
termsAccepted: boolean;
|
|
748
748
|
customFields?: Record<string, string | boolean> | undefined;
|
|
749
749
|
termsVersion?: string | undefined;
|
|
@@ -788,16 +788,16 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
|
|
|
788
788
|
theme?: "light" | "dark" | "auto" | undefined;
|
|
789
789
|
} | undefined;
|
|
790
790
|
terms?: {
|
|
791
|
-
version?: string | undefined;
|
|
792
|
-
url?: string | undefined;
|
|
793
791
|
text?: string | undefined;
|
|
792
|
+
url?: string | undefined;
|
|
793
|
+
version?: string | undefined;
|
|
794
794
|
required?: boolean | undefined;
|
|
795
795
|
} | undefined;
|
|
796
796
|
customFields?: {
|
|
797
|
-
name: string;
|
|
798
797
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
799
798
|
required: boolean;
|
|
800
799
|
label: string;
|
|
800
|
+
name: string;
|
|
801
801
|
options?: {
|
|
802
802
|
value: string;
|
|
803
803
|
label: string;
|
|
@@ -820,15 +820,15 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
|
|
|
820
820
|
} | undefined;
|
|
821
821
|
terms?: {
|
|
822
822
|
required: boolean;
|
|
823
|
-
version?: string | undefined;
|
|
824
|
-
url?: string | undefined;
|
|
825
823
|
text?: string | undefined;
|
|
824
|
+
url?: string | undefined;
|
|
825
|
+
version?: string | undefined;
|
|
826
826
|
} | undefined;
|
|
827
827
|
customFields?: {
|
|
828
|
-
name: string;
|
|
829
828
|
type: "text" | "textarea" | "checkbox" | "select";
|
|
830
829
|
required: boolean;
|
|
831
830
|
label: string;
|
|
831
|
+
name: string;
|
|
832
832
|
options?: {
|
|
833
833
|
value: string;
|
|
834
834
|
label: string;
|