@kya-os/contracts 1.6.11 → 1.6.13
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.
|
@@ -185,12 +185,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
185
185
|
identifier: string;
|
|
186
186
|
}>>;
|
|
187
187
|
}, "strip", z.ZodTypeAny, {
|
|
188
|
-
timestamp: number;
|
|
189
188
|
sessionId: string;
|
|
189
|
+
scopes: string[];
|
|
190
|
+
timestamp: number;
|
|
190
191
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
191
192
|
agentDid: string;
|
|
192
193
|
targetTools: string[];
|
|
193
|
-
scopes: string[];
|
|
194
194
|
projectId: string;
|
|
195
195
|
userDid?: string | undefined;
|
|
196
196
|
delegationId?: string | undefined;
|
|
@@ -201,12 +201,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
201
201
|
identifier: string;
|
|
202
202
|
} | undefined;
|
|
203
203
|
}, {
|
|
204
|
-
timestamp: number;
|
|
205
204
|
sessionId: string;
|
|
205
|
+
scopes: string[];
|
|
206
|
+
timestamp: number;
|
|
206
207
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
207
208
|
agentDid: string;
|
|
208
209
|
targetTools: string[];
|
|
209
|
-
scopes: string[];
|
|
210
210
|
projectId: string;
|
|
211
211
|
userDid?: string | undefined;
|
|
212
212
|
delegationId?: string | undefined;
|
|
@@ -227,12 +227,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
227
227
|
userIdentifier?: string | undefined;
|
|
228
228
|
}[] | undefined;
|
|
229
229
|
consentEvents?: {
|
|
230
|
-
timestamp: number;
|
|
231
230
|
sessionId: string;
|
|
231
|
+
scopes: string[];
|
|
232
|
+
timestamp: number;
|
|
232
233
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
233
234
|
agentDid: string;
|
|
234
235
|
targetTools: string[];
|
|
235
|
-
scopes: string[];
|
|
236
236
|
projectId: string;
|
|
237
237
|
userDid?: string | undefined;
|
|
238
238
|
delegationId?: string | undefined;
|
|
@@ -253,12 +253,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
253
253
|
userIdentifier?: string | undefined;
|
|
254
254
|
}[] | undefined;
|
|
255
255
|
consentEvents?: {
|
|
256
|
-
timestamp: number;
|
|
257
256
|
sessionId: string;
|
|
257
|
+
scopes: string[];
|
|
258
|
+
timestamp: number;
|
|
258
259
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
259
260
|
agentDid: string;
|
|
260
261
|
targetTools: string[];
|
|
261
|
-
scopes: string[];
|
|
262
262
|
projectId: string;
|
|
263
263
|
userDid?: string | undefined;
|
|
264
264
|
delegationId?: string | undefined;
|
|
@@ -299,12 +299,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
299
299
|
userIdentifier?: string | undefined;
|
|
300
300
|
}[] | undefined;
|
|
301
301
|
consentEvents?: {
|
|
302
|
-
timestamp: number;
|
|
303
302
|
sessionId: string;
|
|
303
|
+
scopes: string[];
|
|
304
|
+
timestamp: number;
|
|
304
305
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
305
306
|
agentDid: string;
|
|
306
307
|
targetTools: string[];
|
|
307
|
-
scopes: string[];
|
|
308
308
|
projectId: string;
|
|
309
309
|
userDid?: string | undefined;
|
|
310
310
|
delegationId?: string | undefined;
|
|
@@ -345,12 +345,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
345
345
|
userIdentifier?: string | undefined;
|
|
346
346
|
}[] | undefined;
|
|
347
347
|
consentEvents?: {
|
|
348
|
-
timestamp: number;
|
|
349
348
|
sessionId: string;
|
|
349
|
+
scopes: string[];
|
|
350
|
+
timestamp: number;
|
|
350
351
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
351
352
|
agentDid: string;
|
|
352
353
|
targetTools: string[];
|
|
353
|
-
scopes: string[];
|
|
354
354
|
projectId: string;
|
|
355
355
|
userDid?: string | undefined;
|
|
356
356
|
delegationId?: string | undefined;
|
|
@@ -388,19 +388,19 @@ export declare const proofSubmissionResponseSchema: z.ZodObject<{
|
|
|
388
388
|
details?: Record<string, unknown> | undefined;
|
|
389
389
|
}>;
|
|
390
390
|
}, "strip", z.ZodTypeAny, {
|
|
391
|
-
proof_index: number;
|
|
392
391
|
error: {
|
|
393
392
|
code: string;
|
|
394
393
|
message: string;
|
|
395
394
|
details?: Record<string, unknown> | undefined;
|
|
396
395
|
};
|
|
397
|
-
}, {
|
|
398
396
|
proof_index: number;
|
|
397
|
+
}, {
|
|
399
398
|
error: {
|
|
400
399
|
code: string;
|
|
401
400
|
message: string;
|
|
402
401
|
details?: Record<string, unknown> | undefined;
|
|
403
402
|
};
|
|
403
|
+
proof_index: number;
|
|
404
404
|
}>, "many">>;
|
|
405
405
|
}, "strip", z.ZodTypeAny, {
|
|
406
406
|
success: boolean;
|
|
@@ -408,12 +408,12 @@ export declare const proofSubmissionResponseSchema: z.ZodObject<{
|
|
|
408
408
|
rejected: number;
|
|
409
409
|
outcomes?: Record<string, number> | undefined;
|
|
410
410
|
errors?: {
|
|
411
|
-
proof_index: number;
|
|
412
411
|
error: {
|
|
413
412
|
code: string;
|
|
414
413
|
message: string;
|
|
415
414
|
details?: Record<string, unknown> | undefined;
|
|
416
415
|
};
|
|
416
|
+
proof_index: number;
|
|
417
417
|
}[] | undefined;
|
|
418
418
|
}, {
|
|
419
419
|
success: boolean;
|
|
@@ -421,12 +421,12 @@ export declare const proofSubmissionResponseSchema: z.ZodObject<{
|
|
|
421
421
|
rejected: number;
|
|
422
422
|
outcomes?: Record<string, number> | undefined;
|
|
423
423
|
errors?: {
|
|
424
|
-
proof_index: number;
|
|
425
424
|
error: {
|
|
426
425
|
code: string;
|
|
427
426
|
message: string;
|
|
428
427
|
details?: Record<string, unknown> | undefined;
|
|
429
428
|
};
|
|
429
|
+
proof_index: number;
|
|
430
430
|
}[] | undefined;
|
|
431
431
|
}>;
|
|
432
432
|
/**
|
|
@@ -434,35 +434,64 @@ export declare const proofSubmissionResponseSchema: z.ZodObject<{
|
|
|
434
434
|
*/
|
|
435
435
|
export declare const delegationCredentialSchema: z.ZodObject<{
|
|
436
436
|
agent_did: z.ZodString;
|
|
437
|
+
user_did: z.ZodString;
|
|
437
438
|
user_id: z.ZodOptional<z.ZodString>;
|
|
438
439
|
user_identifier: z.ZodOptional<z.ZodString>;
|
|
439
440
|
scopes: z.ZodArray<z.ZodString, "many">;
|
|
440
441
|
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
441
442
|
issued_at: z.ZodNumber;
|
|
442
443
|
created_at: z.ZodNumber;
|
|
444
|
+
credential_jwt: z.ZodOptional<z.ZodString>;
|
|
445
|
+
authorization: z.ZodObject<{
|
|
446
|
+
type: z.ZodEnum<["oauth", "credential", "none"]>;
|
|
447
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
448
|
+
credentialType: z.ZodOptional<z.ZodString>;
|
|
449
|
+
}, "strip", z.ZodTypeAny, {
|
|
450
|
+
type: "oauth" | "credential" | "none";
|
|
451
|
+
provider?: string | undefined;
|
|
452
|
+
credentialType?: string | undefined;
|
|
453
|
+
}, {
|
|
454
|
+
type: "oauth" | "credential" | "none";
|
|
455
|
+
provider?: string | undefined;
|
|
456
|
+
credentialType?: string | undefined;
|
|
457
|
+
}>;
|
|
443
458
|
}, "strip", z.ZodTypeAny, {
|
|
444
459
|
scopes: string[];
|
|
445
460
|
agent_did: string;
|
|
461
|
+
user_did: string;
|
|
446
462
|
issued_at: number;
|
|
447
463
|
created_at: number;
|
|
464
|
+
authorization: {
|
|
465
|
+
type: "oauth" | "credential" | "none";
|
|
466
|
+
provider?: string | undefined;
|
|
467
|
+
credentialType?: string | undefined;
|
|
468
|
+
};
|
|
469
|
+
constraints?: Record<string, unknown> | undefined;
|
|
448
470
|
user_id?: string | undefined;
|
|
449
471
|
user_identifier?: string | undefined;
|
|
450
|
-
|
|
472
|
+
credential_jwt?: string | undefined;
|
|
451
473
|
}, {
|
|
452
474
|
scopes: string[];
|
|
453
475
|
agent_did: string;
|
|
476
|
+
user_did: string;
|
|
454
477
|
issued_at: number;
|
|
455
478
|
created_at: number;
|
|
479
|
+
authorization: {
|
|
480
|
+
type: "oauth" | "credential" | "none";
|
|
481
|
+
provider?: string | undefined;
|
|
482
|
+
credentialType?: string | undefined;
|
|
483
|
+
};
|
|
484
|
+
constraints?: Record<string, unknown> | undefined;
|
|
456
485
|
user_id?: string | undefined;
|
|
457
486
|
user_identifier?: string | undefined;
|
|
458
|
-
|
|
487
|
+
credential_jwt?: string | undefined;
|
|
459
488
|
}>;
|
|
460
489
|
/**
|
|
461
490
|
* Delegation verification request schema
|
|
462
491
|
*/
|
|
463
492
|
export declare const verifyDelegationRequestSchema: z.ZodObject<{
|
|
464
|
-
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
465
493
|
scopes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
494
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
466
495
|
agent_did: z.ZodString;
|
|
467
496
|
user_did: z.ZodOptional<z.ZodString>;
|
|
468
497
|
credential_jwt: z.ZodOptional<z.ZodString>;
|
|
@@ -482,8 +511,8 @@ export declare const verifyDelegationRequestSchema: z.ZodObject<{
|
|
|
482
511
|
}>>;
|
|
483
512
|
}, "strip", z.ZodTypeAny, {
|
|
484
513
|
agent_did: string;
|
|
485
|
-
timestamp?: number | undefined;
|
|
486
514
|
scopes?: string[] | undefined;
|
|
515
|
+
timestamp?: number | undefined;
|
|
487
516
|
user_did?: string | undefined;
|
|
488
517
|
credential_jwt?: string | undefined;
|
|
489
518
|
delegation_token?: string | undefined;
|
|
@@ -494,8 +523,8 @@ export declare const verifyDelegationRequestSchema: z.ZodObject<{
|
|
|
494
523
|
} | undefined;
|
|
495
524
|
}, {
|
|
496
525
|
agent_did: string;
|
|
497
|
-
timestamp?: number | undefined;
|
|
498
526
|
scopes?: string[] | undefined;
|
|
527
|
+
timestamp?: number | undefined;
|
|
499
528
|
user_did?: string | undefined;
|
|
500
529
|
credential_jwt?: string | undefined;
|
|
501
530
|
delegation_token?: string | undefined;
|
|
@@ -1744,28 +1773,57 @@ export declare const verifyDelegationResponseSchema: z.ZodObject<{
|
|
|
1744
1773
|
delegation_id: z.ZodOptional<z.ZodString>;
|
|
1745
1774
|
credential: z.ZodOptional<z.ZodObject<{
|
|
1746
1775
|
agent_did: z.ZodString;
|
|
1776
|
+
user_did: z.ZodString;
|
|
1747
1777
|
user_id: z.ZodOptional<z.ZodString>;
|
|
1748
1778
|
user_identifier: z.ZodOptional<z.ZodString>;
|
|
1749
1779
|
scopes: z.ZodArray<z.ZodString, "many">;
|
|
1750
1780
|
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1751
1781
|
issued_at: z.ZodNumber;
|
|
1752
1782
|
created_at: z.ZodNumber;
|
|
1783
|
+
credential_jwt: z.ZodOptional<z.ZodString>;
|
|
1784
|
+
authorization: z.ZodObject<{
|
|
1785
|
+
type: z.ZodEnum<["oauth", "credential", "none"]>;
|
|
1786
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
1787
|
+
credentialType: z.ZodOptional<z.ZodString>;
|
|
1788
|
+
}, "strip", z.ZodTypeAny, {
|
|
1789
|
+
type: "oauth" | "credential" | "none";
|
|
1790
|
+
provider?: string | undefined;
|
|
1791
|
+
credentialType?: string | undefined;
|
|
1792
|
+
}, {
|
|
1793
|
+
type: "oauth" | "credential" | "none";
|
|
1794
|
+
provider?: string | undefined;
|
|
1795
|
+
credentialType?: string | undefined;
|
|
1796
|
+
}>;
|
|
1753
1797
|
}, "strip", z.ZodTypeAny, {
|
|
1754
1798
|
scopes: string[];
|
|
1755
1799
|
agent_did: string;
|
|
1800
|
+
user_did: string;
|
|
1756
1801
|
issued_at: number;
|
|
1757
1802
|
created_at: number;
|
|
1803
|
+
authorization: {
|
|
1804
|
+
type: "oauth" | "credential" | "none";
|
|
1805
|
+
provider?: string | undefined;
|
|
1806
|
+
credentialType?: string | undefined;
|
|
1807
|
+
};
|
|
1808
|
+
constraints?: Record<string, unknown> | undefined;
|
|
1758
1809
|
user_id?: string | undefined;
|
|
1759
1810
|
user_identifier?: string | undefined;
|
|
1760
|
-
|
|
1811
|
+
credential_jwt?: string | undefined;
|
|
1761
1812
|
}, {
|
|
1762
1813
|
scopes: string[];
|
|
1763
1814
|
agent_did: string;
|
|
1815
|
+
user_did: string;
|
|
1764
1816
|
issued_at: number;
|
|
1765
1817
|
created_at: number;
|
|
1818
|
+
authorization: {
|
|
1819
|
+
type: "oauth" | "credential" | "none";
|
|
1820
|
+
provider?: string | undefined;
|
|
1821
|
+
credentialType?: string | undefined;
|
|
1822
|
+
};
|
|
1823
|
+
constraints?: Record<string, unknown> | undefined;
|
|
1766
1824
|
user_id?: string | undefined;
|
|
1767
1825
|
user_identifier?: string | undefined;
|
|
1768
|
-
|
|
1826
|
+
credential_jwt?: string | undefined;
|
|
1769
1827
|
}>>;
|
|
1770
1828
|
error: z.ZodOptional<z.ZodObject<{
|
|
1771
1829
|
code: z.ZodString;
|
|
@@ -1783,12 +1841,28 @@ export declare const verifyDelegationResponseSchema: z.ZodObject<{
|
|
|
1783
1841
|
reason: z.ZodOptional<z.ZodString>;
|
|
1784
1842
|
}, "strip", z.ZodTypeAny, {
|
|
1785
1843
|
valid: boolean;
|
|
1786
|
-
delegation_id?: string | undefined;
|
|
1787
1844
|
error?: {
|
|
1788
1845
|
code: string;
|
|
1789
1846
|
message: string;
|
|
1790
1847
|
details?: Record<string, unknown> | undefined;
|
|
1791
1848
|
} | undefined;
|
|
1849
|
+
credential?: {
|
|
1850
|
+
scopes: string[];
|
|
1851
|
+
agent_did: string;
|
|
1852
|
+
user_did: string;
|
|
1853
|
+
issued_at: number;
|
|
1854
|
+
created_at: number;
|
|
1855
|
+
authorization: {
|
|
1856
|
+
type: "oauth" | "credential" | "none";
|
|
1857
|
+
provider?: string | undefined;
|
|
1858
|
+
credentialType?: string | undefined;
|
|
1859
|
+
};
|
|
1860
|
+
constraints?: Record<string, unknown> | undefined;
|
|
1861
|
+
user_id?: string | undefined;
|
|
1862
|
+
user_identifier?: string | undefined;
|
|
1863
|
+
credential_jwt?: string | undefined;
|
|
1864
|
+
} | undefined;
|
|
1865
|
+
delegation_id?: string | undefined;
|
|
1792
1866
|
delegation?: z.objectOutputType<{
|
|
1793
1867
|
id: z.ZodString;
|
|
1794
1868
|
issuerDid: z.ZodString;
|
|
@@ -2200,24 +2274,31 @@ export declare const verifyDelegationResponseSchema: z.ZodObject<{
|
|
|
2200
2274
|
revokedReason: z.ZodOptional<z.ZodString>;
|
|
2201
2275
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2202
2276
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
2277
|
+
reason?: string | undefined;
|
|
2278
|
+
}, {
|
|
2279
|
+
valid: boolean;
|
|
2280
|
+
error?: {
|
|
2281
|
+
code: string;
|
|
2282
|
+
message: string;
|
|
2283
|
+
details?: Record<string, unknown> | undefined;
|
|
2284
|
+
} | undefined;
|
|
2203
2285
|
credential?: {
|
|
2204
2286
|
scopes: string[];
|
|
2205
2287
|
agent_did: string;
|
|
2288
|
+
user_did: string;
|
|
2206
2289
|
issued_at: number;
|
|
2207
2290
|
created_at: number;
|
|
2291
|
+
authorization: {
|
|
2292
|
+
type: "oauth" | "credential" | "none";
|
|
2293
|
+
provider?: string | undefined;
|
|
2294
|
+
credentialType?: string | undefined;
|
|
2295
|
+
};
|
|
2296
|
+
constraints?: Record<string, unknown> | undefined;
|
|
2208
2297
|
user_id?: string | undefined;
|
|
2209
2298
|
user_identifier?: string | undefined;
|
|
2210
|
-
|
|
2299
|
+
credential_jwt?: string | undefined;
|
|
2211
2300
|
} | undefined;
|
|
2212
|
-
reason?: string | undefined;
|
|
2213
|
-
}, {
|
|
2214
|
-
valid: boolean;
|
|
2215
2301
|
delegation_id?: string | undefined;
|
|
2216
|
-
error?: {
|
|
2217
|
-
code: string;
|
|
2218
|
-
message: string;
|
|
2219
|
-
details?: Record<string, unknown> | undefined;
|
|
2220
|
-
} | undefined;
|
|
2221
2302
|
delegation?: z.objectInputType<{
|
|
2222
2303
|
id: z.ZodString;
|
|
2223
2304
|
issuerDid: z.ZodString;
|
|
@@ -2629,15 +2710,6 @@ export declare const verifyDelegationResponseSchema: z.ZodObject<{
|
|
|
2629
2710
|
revokedReason: z.ZodOptional<z.ZodString>;
|
|
2630
2711
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2631
2712
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
2632
|
-
credential?: {
|
|
2633
|
-
scopes: string[];
|
|
2634
|
-
agent_did: string;
|
|
2635
|
-
issued_at: number;
|
|
2636
|
-
created_at: number;
|
|
2637
|
-
user_id?: string | undefined;
|
|
2638
|
-
user_identifier?: string | undefined;
|
|
2639
|
-
constraints?: Record<string, unknown> | undefined;
|
|
2640
|
-
} | undefined;
|
|
2641
2713
|
reason?: string | undefined;
|
|
2642
2714
|
}>;
|
|
2643
2715
|
/**
|
|
@@ -3881,28 +3953,57 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
3881
3953
|
delegation_id: z.ZodOptional<z.ZodString>;
|
|
3882
3954
|
credential: z.ZodOptional<z.ZodObject<{
|
|
3883
3955
|
agent_did: z.ZodString;
|
|
3956
|
+
user_did: z.ZodString;
|
|
3884
3957
|
user_id: z.ZodOptional<z.ZodString>;
|
|
3885
3958
|
user_identifier: z.ZodOptional<z.ZodString>;
|
|
3886
3959
|
scopes: z.ZodArray<z.ZodString, "many">;
|
|
3887
3960
|
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3888
3961
|
issued_at: z.ZodNumber;
|
|
3889
3962
|
created_at: z.ZodNumber;
|
|
3963
|
+
credential_jwt: z.ZodOptional<z.ZodString>;
|
|
3964
|
+
authorization: z.ZodObject<{
|
|
3965
|
+
type: z.ZodEnum<["oauth", "credential", "none"]>;
|
|
3966
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
3967
|
+
credentialType: z.ZodOptional<z.ZodString>;
|
|
3968
|
+
}, "strip", z.ZodTypeAny, {
|
|
3969
|
+
type: "oauth" | "credential" | "none";
|
|
3970
|
+
provider?: string | undefined;
|
|
3971
|
+
credentialType?: string | undefined;
|
|
3972
|
+
}, {
|
|
3973
|
+
type: "oauth" | "credential" | "none";
|
|
3974
|
+
provider?: string | undefined;
|
|
3975
|
+
credentialType?: string | undefined;
|
|
3976
|
+
}>;
|
|
3890
3977
|
}, "strip", z.ZodTypeAny, {
|
|
3891
3978
|
scopes: string[];
|
|
3892
3979
|
agent_did: string;
|
|
3980
|
+
user_did: string;
|
|
3893
3981
|
issued_at: number;
|
|
3894
3982
|
created_at: number;
|
|
3983
|
+
authorization: {
|
|
3984
|
+
type: "oauth" | "credential" | "none";
|
|
3985
|
+
provider?: string | undefined;
|
|
3986
|
+
credentialType?: string | undefined;
|
|
3987
|
+
};
|
|
3988
|
+
constraints?: Record<string, unknown> | undefined;
|
|
3895
3989
|
user_id?: string | undefined;
|
|
3896
3990
|
user_identifier?: string | undefined;
|
|
3897
|
-
|
|
3991
|
+
credential_jwt?: string | undefined;
|
|
3898
3992
|
}, {
|
|
3899
3993
|
scopes: string[];
|
|
3900
3994
|
agent_did: string;
|
|
3995
|
+
user_did: string;
|
|
3901
3996
|
issued_at: number;
|
|
3902
3997
|
created_at: number;
|
|
3998
|
+
authorization: {
|
|
3999
|
+
type: "oauth" | "credential" | "none";
|
|
4000
|
+
provider?: string | undefined;
|
|
4001
|
+
credentialType?: string | undefined;
|
|
4002
|
+
};
|
|
4003
|
+
constraints?: Record<string, unknown> | undefined;
|
|
3903
4004
|
user_id?: string | undefined;
|
|
3904
4005
|
user_identifier?: string | undefined;
|
|
3905
|
-
|
|
4006
|
+
credential_jwt?: string | undefined;
|
|
3906
4007
|
}>>;
|
|
3907
4008
|
error: z.ZodOptional<z.ZodObject<{
|
|
3908
4009
|
code: z.ZodString;
|
|
@@ -3920,12 +4021,28 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
3920
4021
|
reason: z.ZodOptional<z.ZodString>;
|
|
3921
4022
|
}, "strip", z.ZodTypeAny, {
|
|
3922
4023
|
valid: boolean;
|
|
3923
|
-
delegation_id?: string | undefined;
|
|
3924
4024
|
error?: {
|
|
3925
4025
|
code: string;
|
|
3926
4026
|
message: string;
|
|
3927
4027
|
details?: Record<string, unknown> | undefined;
|
|
3928
4028
|
} | undefined;
|
|
4029
|
+
credential?: {
|
|
4030
|
+
scopes: string[];
|
|
4031
|
+
agent_did: string;
|
|
4032
|
+
user_did: string;
|
|
4033
|
+
issued_at: number;
|
|
4034
|
+
created_at: number;
|
|
4035
|
+
authorization: {
|
|
4036
|
+
type: "oauth" | "credential" | "none";
|
|
4037
|
+
provider?: string | undefined;
|
|
4038
|
+
credentialType?: string | undefined;
|
|
4039
|
+
};
|
|
4040
|
+
constraints?: Record<string, unknown> | undefined;
|
|
4041
|
+
user_id?: string | undefined;
|
|
4042
|
+
user_identifier?: string | undefined;
|
|
4043
|
+
credential_jwt?: string | undefined;
|
|
4044
|
+
} | undefined;
|
|
4045
|
+
delegation_id?: string | undefined;
|
|
3929
4046
|
delegation?: z.objectOutputType<{
|
|
3930
4047
|
id: z.ZodString;
|
|
3931
4048
|
issuerDid: z.ZodString;
|
|
@@ -4337,24 +4454,31 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
4337
4454
|
revokedReason: z.ZodOptional<z.ZodString>;
|
|
4338
4455
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
4339
4456
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
4457
|
+
reason?: string | undefined;
|
|
4458
|
+
}, {
|
|
4459
|
+
valid: boolean;
|
|
4460
|
+
error?: {
|
|
4461
|
+
code: string;
|
|
4462
|
+
message: string;
|
|
4463
|
+
details?: Record<string, unknown> | undefined;
|
|
4464
|
+
} | undefined;
|
|
4340
4465
|
credential?: {
|
|
4341
4466
|
scopes: string[];
|
|
4342
4467
|
agent_did: string;
|
|
4468
|
+
user_did: string;
|
|
4343
4469
|
issued_at: number;
|
|
4344
4470
|
created_at: number;
|
|
4471
|
+
authorization: {
|
|
4472
|
+
type: "oauth" | "credential" | "none";
|
|
4473
|
+
provider?: string | undefined;
|
|
4474
|
+
credentialType?: string | undefined;
|
|
4475
|
+
};
|
|
4476
|
+
constraints?: Record<string, unknown> | undefined;
|
|
4345
4477
|
user_id?: string | undefined;
|
|
4346
4478
|
user_identifier?: string | undefined;
|
|
4347
|
-
|
|
4479
|
+
credential_jwt?: string | undefined;
|
|
4348
4480
|
} | undefined;
|
|
4349
|
-
reason?: string | undefined;
|
|
4350
|
-
}, {
|
|
4351
|
-
valid: boolean;
|
|
4352
4481
|
delegation_id?: string | undefined;
|
|
4353
|
-
error?: {
|
|
4354
|
-
code: string;
|
|
4355
|
-
message: string;
|
|
4356
|
-
details?: Record<string, unknown> | undefined;
|
|
4357
|
-
} | undefined;
|
|
4358
4482
|
delegation?: z.objectInputType<{
|
|
4359
4483
|
id: z.ZodString;
|
|
4360
4484
|
issuerDid: z.ZodString;
|
|
@@ -4766,15 +4890,6 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
4766
4890
|
revokedReason: z.ZodOptional<z.ZodString>;
|
|
4767
4891
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
4768
4892
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
4769
|
-
credential?: {
|
|
4770
|
-
scopes: string[];
|
|
4771
|
-
agent_did: string;
|
|
4772
|
-
issued_at: number;
|
|
4773
|
-
created_at: number;
|
|
4774
|
-
user_id?: string | undefined;
|
|
4775
|
-
user_identifier?: string | undefined;
|
|
4776
|
-
constraints?: Record<string, unknown> | undefined;
|
|
4777
|
-
} | undefined;
|
|
4778
4893
|
reason?: string | undefined;
|
|
4779
4894
|
}>;
|
|
4780
4895
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
@@ -4791,12 +4906,28 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
4791
4906
|
success: boolean;
|
|
4792
4907
|
data: {
|
|
4793
4908
|
valid: boolean;
|
|
4794
|
-
delegation_id?: string | undefined;
|
|
4795
4909
|
error?: {
|
|
4796
4910
|
code: string;
|
|
4797
4911
|
message: string;
|
|
4798
4912
|
details?: Record<string, unknown> | undefined;
|
|
4799
4913
|
} | undefined;
|
|
4914
|
+
credential?: {
|
|
4915
|
+
scopes: string[];
|
|
4916
|
+
agent_did: string;
|
|
4917
|
+
user_did: string;
|
|
4918
|
+
issued_at: number;
|
|
4919
|
+
created_at: number;
|
|
4920
|
+
authorization: {
|
|
4921
|
+
type: "oauth" | "credential" | "none";
|
|
4922
|
+
provider?: string | undefined;
|
|
4923
|
+
credentialType?: string | undefined;
|
|
4924
|
+
};
|
|
4925
|
+
constraints?: Record<string, unknown> | undefined;
|
|
4926
|
+
user_id?: string | undefined;
|
|
4927
|
+
user_identifier?: string | undefined;
|
|
4928
|
+
credential_jwt?: string | undefined;
|
|
4929
|
+
} | undefined;
|
|
4930
|
+
delegation_id?: string | undefined;
|
|
4800
4931
|
delegation?: z.objectOutputType<{
|
|
4801
4932
|
id: z.ZodString;
|
|
4802
4933
|
issuerDid: z.ZodString;
|
|
@@ -5208,15 +5339,6 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5208
5339
|
revokedReason: z.ZodOptional<z.ZodString>;
|
|
5209
5340
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
5210
5341
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5211
|
-
credential?: {
|
|
5212
|
-
scopes: string[];
|
|
5213
|
-
agent_did: string;
|
|
5214
|
-
issued_at: number;
|
|
5215
|
-
created_at: number;
|
|
5216
|
-
user_id?: string | undefined;
|
|
5217
|
-
user_identifier?: string | undefined;
|
|
5218
|
-
constraints?: Record<string, unknown> | undefined;
|
|
5219
|
-
} | undefined;
|
|
5220
5342
|
reason?: string | undefined;
|
|
5221
5343
|
};
|
|
5222
5344
|
metadata?: {
|
|
@@ -5227,12 +5349,28 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5227
5349
|
success: boolean;
|
|
5228
5350
|
data: {
|
|
5229
5351
|
valid: boolean;
|
|
5230
|
-
delegation_id?: string | undefined;
|
|
5231
5352
|
error?: {
|
|
5232
5353
|
code: string;
|
|
5233
5354
|
message: string;
|
|
5234
5355
|
details?: Record<string, unknown> | undefined;
|
|
5235
5356
|
} | undefined;
|
|
5357
|
+
credential?: {
|
|
5358
|
+
scopes: string[];
|
|
5359
|
+
agent_did: string;
|
|
5360
|
+
user_did: string;
|
|
5361
|
+
issued_at: number;
|
|
5362
|
+
created_at: number;
|
|
5363
|
+
authorization: {
|
|
5364
|
+
type: "oauth" | "credential" | "none";
|
|
5365
|
+
provider?: string | undefined;
|
|
5366
|
+
credentialType?: string | undefined;
|
|
5367
|
+
};
|
|
5368
|
+
constraints?: Record<string, unknown> | undefined;
|
|
5369
|
+
user_id?: string | undefined;
|
|
5370
|
+
user_identifier?: string | undefined;
|
|
5371
|
+
credential_jwt?: string | undefined;
|
|
5372
|
+
} | undefined;
|
|
5373
|
+
delegation_id?: string | undefined;
|
|
5236
5374
|
delegation?: z.objectInputType<{
|
|
5237
5375
|
id: z.ZodString;
|
|
5238
5376
|
issuerDid: z.ZodString;
|
|
@@ -5644,15 +5782,6 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5644
5782
|
revokedReason: z.ZodOptional<z.ZodString>;
|
|
5645
5783
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
5646
5784
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5647
|
-
credential?: {
|
|
5648
|
-
scopes: string[];
|
|
5649
|
-
agent_did: string;
|
|
5650
|
-
issued_at: number;
|
|
5651
|
-
created_at: number;
|
|
5652
|
-
user_id?: string | undefined;
|
|
5653
|
-
user_identifier?: string | undefined;
|
|
5654
|
-
constraints?: Record<string, unknown> | undefined;
|
|
5655
|
-
} | undefined;
|
|
5656
5785
|
reason?: string | undefined;
|
|
5657
5786
|
};
|
|
5658
5787
|
metadata?: {
|
|
@@ -5960,8 +6089,8 @@ export declare const createDelegationResponseSchema: z.ZodObject<{
|
|
|
5960
6089
|
expires_in: z.ZodOptional<z.ZodNumber>;
|
|
5961
6090
|
}, "strip", z.ZodTypeAny, {
|
|
5962
6091
|
status: "active" | "revoked" | "expired";
|
|
5963
|
-
delegation_id: string;
|
|
5964
6092
|
scopes: string[];
|
|
6093
|
+
delegation_id: string;
|
|
5965
6094
|
agent_did: string;
|
|
5966
6095
|
issued_at: string;
|
|
5967
6096
|
created_at: string;
|
|
@@ -5973,8 +6102,8 @@ export declare const createDelegationResponseSchema: z.ZodObject<{
|
|
|
5973
6102
|
expires_in?: number | undefined;
|
|
5974
6103
|
}, {
|
|
5975
6104
|
status: "active" | "revoked" | "expired";
|
|
5976
|
-
delegation_id: string;
|
|
5977
6105
|
scopes: string[];
|
|
6106
|
+
delegation_id: string;
|
|
5978
6107
|
agent_did: string;
|
|
5979
6108
|
issued_at: string;
|
|
5980
6109
|
created_at: string;
|
|
@@ -6005,8 +6134,8 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6005
6134
|
expires_in: z.ZodOptional<z.ZodNumber>;
|
|
6006
6135
|
}, "strip", z.ZodTypeAny, {
|
|
6007
6136
|
status: "active" | "revoked" | "expired";
|
|
6008
|
-
delegation_id: string;
|
|
6009
6137
|
scopes: string[];
|
|
6138
|
+
delegation_id: string;
|
|
6010
6139
|
agent_did: string;
|
|
6011
6140
|
issued_at: string;
|
|
6012
6141
|
created_at: string;
|
|
@@ -6018,8 +6147,8 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6018
6147
|
expires_in?: number | undefined;
|
|
6019
6148
|
}, {
|
|
6020
6149
|
status: "active" | "revoked" | "expired";
|
|
6021
|
-
delegation_id: string;
|
|
6022
6150
|
scopes: string[];
|
|
6151
|
+
delegation_id: string;
|
|
6023
6152
|
agent_did: string;
|
|
6024
6153
|
issued_at: string;
|
|
6025
6154
|
created_at: string;
|
|
@@ -6044,8 +6173,8 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6044
6173
|
success: boolean;
|
|
6045
6174
|
data: {
|
|
6046
6175
|
status: "active" | "revoked" | "expired";
|
|
6047
|
-
delegation_id: string;
|
|
6048
6176
|
scopes: string[];
|
|
6177
|
+
delegation_id: string;
|
|
6049
6178
|
agent_did: string;
|
|
6050
6179
|
issued_at: string;
|
|
6051
6180
|
created_at: string;
|
|
@@ -6064,8 +6193,8 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6064
6193
|
success: boolean;
|
|
6065
6194
|
data: {
|
|
6066
6195
|
status: "active" | "revoked" | "expired";
|
|
6067
|
-
delegation_id: string;
|
|
6068
6196
|
scopes: string[];
|
|
6197
|
+
delegation_id: string;
|
|
6069
6198
|
agent_did: string;
|
|
6070
6199
|
issued_at: string;
|
|
6071
6200
|
created_at: string;
|
|
@@ -6099,12 +6228,12 @@ export declare const revokeDelegationResponseSchema: z.ZodObject<{
|
|
|
6099
6228
|
revoked: z.ZodBoolean;
|
|
6100
6229
|
revoked_at: z.ZodNumber;
|
|
6101
6230
|
}, "strip", z.ZodTypeAny, {
|
|
6102
|
-
delegation_id: string;
|
|
6103
6231
|
revoked: boolean;
|
|
6232
|
+
delegation_id: string;
|
|
6104
6233
|
revoked_at: number;
|
|
6105
6234
|
}, {
|
|
6106
|
-
delegation_id: string;
|
|
6107
6235
|
revoked: boolean;
|
|
6236
|
+
delegation_id: string;
|
|
6108
6237
|
revoked_at: number;
|
|
6109
6238
|
}>;
|
|
6110
6239
|
/**
|
|
@@ -6117,12 +6246,12 @@ export declare const revokeDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6117
6246
|
revoked: z.ZodBoolean;
|
|
6118
6247
|
revoked_at: z.ZodNumber;
|
|
6119
6248
|
}, "strip", z.ZodTypeAny, {
|
|
6120
|
-
delegation_id: string;
|
|
6121
6249
|
revoked: boolean;
|
|
6250
|
+
delegation_id: string;
|
|
6122
6251
|
revoked_at: number;
|
|
6123
6252
|
}, {
|
|
6124
|
-
delegation_id: string;
|
|
6125
6253
|
revoked: boolean;
|
|
6254
|
+
delegation_id: string;
|
|
6126
6255
|
revoked_at: number;
|
|
6127
6256
|
}>;
|
|
6128
6257
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
@@ -6138,8 +6267,8 @@ export declare const revokeDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6138
6267
|
}, "strip", z.ZodTypeAny, {
|
|
6139
6268
|
success: boolean;
|
|
6140
6269
|
data: {
|
|
6141
|
-
delegation_id: string;
|
|
6142
6270
|
revoked: boolean;
|
|
6271
|
+
delegation_id: string;
|
|
6143
6272
|
revoked_at: number;
|
|
6144
6273
|
};
|
|
6145
6274
|
metadata?: {
|
|
@@ -6149,8 +6278,8 @@ export declare const revokeDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6149
6278
|
}, {
|
|
6150
6279
|
success: boolean;
|
|
6151
6280
|
data: {
|
|
6152
|
-
delegation_id: string;
|
|
6153
6281
|
revoked: boolean;
|
|
6282
|
+
delegation_id: string;
|
|
6154
6283
|
revoked_at: number;
|
|
6155
6284
|
};
|
|
6156
6285
|
metadata?: {
|
|
@@ -6202,6 +6331,7 @@ export declare const sessionClientIdentitySchema: z.ZodObject<{
|
|
|
6202
6331
|
export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
6203
6332
|
session_id: z.ZodString;
|
|
6204
6333
|
agent_did: z.ZodString;
|
|
6334
|
+
agent_name: z.ZodOptional<z.ZodString>;
|
|
6205
6335
|
project_id: z.ZodString;
|
|
6206
6336
|
created_at: z.ZodNumber;
|
|
6207
6337
|
client_info: z.ZodObject<{
|
|
@@ -6250,6 +6380,7 @@ export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
|
6250
6380
|
vendor?: string | undefined;
|
|
6251
6381
|
};
|
|
6252
6382
|
project_id: string;
|
|
6383
|
+
agent_name?: string | undefined;
|
|
6253
6384
|
client_identity?: {
|
|
6254
6385
|
did: string;
|
|
6255
6386
|
source: "knowthat.ai" | "kta-lookup" | "generated";
|
|
@@ -6269,6 +6400,7 @@ export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
|
6269
6400
|
vendor?: string | undefined;
|
|
6270
6401
|
};
|
|
6271
6402
|
project_id: string;
|
|
6403
|
+
agent_name?: string | undefined;
|
|
6272
6404
|
client_identity?: {
|
|
6273
6405
|
did: string;
|
|
6274
6406
|
source: "knowthat.ai" | "kta-lookup" | "generated";
|
|
@@ -117,12 +117,19 @@ exports.proofSubmissionResponseSchema = zod_1.z.object({
|
|
|
117
117
|
*/
|
|
118
118
|
exports.delegationCredentialSchema = zod_1.z.object({
|
|
119
119
|
agent_did: zod_1.z.string(),
|
|
120
|
+
user_did: zod_1.z.string().min(1), // REQUIRED: DID of authorizing user
|
|
120
121
|
user_id: zod_1.z.string().optional(),
|
|
121
122
|
user_identifier: zod_1.z.string().optional(),
|
|
122
123
|
scopes: zod_1.z.array(zod_1.z.string()),
|
|
123
124
|
constraints: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
124
125
|
issued_at: zod_1.z.number().int().positive(),
|
|
125
126
|
created_at: zod_1.z.number().int().positive(),
|
|
127
|
+
credential_jwt: zod_1.z.string().optional(),
|
|
128
|
+
authorization: zod_1.z.object({
|
|
129
|
+
type: zod_1.z.enum(['oauth', 'credential', 'none']),
|
|
130
|
+
provider: zod_1.z.string().optional(),
|
|
131
|
+
credentialType: zod_1.z.string().optional(),
|
|
132
|
+
}),
|
|
126
133
|
});
|
|
127
134
|
/**
|
|
128
135
|
* Delegation verification request schema
|
|
@@ -299,6 +306,7 @@ exports.sessionClientIdentitySchema = zod_1.z.object({
|
|
|
299
306
|
exports.registerSessionRequestSchema = zod_1.z.object({
|
|
300
307
|
session_id: zod_1.z.string().min(1, "Session ID is required"),
|
|
301
308
|
agent_did: zod_1.z.string().min(1, "Agent DID is required"),
|
|
309
|
+
agent_name: zod_1.z.string().optional(), // Human-readable agent name for dashboard display
|
|
302
310
|
project_id: zod_1.z.string().min(1, "Project ID is required"),
|
|
303
311
|
created_at: zod_1.z.number().int().positive("Created at must be a positive timestamp"),
|
|
304
312
|
client_info: exports.sessionClientInfoSchema,
|
|
@@ -141,12 +141,19 @@ export interface VerifyDelegationRequest {
|
|
|
141
141
|
*/
|
|
142
142
|
export interface DelegationCredential {
|
|
143
143
|
agent_did: string;
|
|
144
|
+
user_did: string;
|
|
144
145
|
user_id?: string;
|
|
145
146
|
user_identifier?: string;
|
|
146
147
|
scopes: string[];
|
|
147
148
|
constraints?: Record<string, unknown>;
|
|
148
149
|
issued_at: number;
|
|
149
150
|
created_at: number;
|
|
151
|
+
credential_jwt?: string;
|
|
152
|
+
authorization: {
|
|
153
|
+
type: 'oauth' | 'credential' | 'none';
|
|
154
|
+
provider?: string;
|
|
155
|
+
credentialType?: string;
|
|
156
|
+
};
|
|
150
157
|
}
|
|
151
158
|
/**
|
|
152
159
|
* Response from delegation verification endpoint
|
|
@@ -293,6 +300,8 @@ export interface RegisterSessionRequest {
|
|
|
293
300
|
session_id: string;
|
|
294
301
|
/** Agent's DID */
|
|
295
302
|
agent_did: string;
|
|
303
|
+
/** Human-readable agent name for dashboard display (optional) */
|
|
304
|
+
agent_name?: string;
|
|
296
305
|
/** AgentShield project ID */
|
|
297
306
|
project_id: string;
|
|
298
307
|
/** Unix timestamp in milliseconds when session was created */
|