@kya-os/contracts 1.6.12 → 1.6.14
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.
|
@@ -434,28 +434,57 @@ 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
|
+
};
|
|
448
469
|
constraints?: Record<string, unknown> | undefined;
|
|
449
470
|
user_id?: string | undefined;
|
|
450
471
|
user_identifier?: string | undefined;
|
|
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
|
+
};
|
|
456
484
|
constraints?: Record<string, unknown> | undefined;
|
|
457
485
|
user_id?: string | undefined;
|
|
458
486
|
user_identifier?: string | undefined;
|
|
487
|
+
credential_jwt?: string | undefined;
|
|
459
488
|
}>;
|
|
460
489
|
/**
|
|
461
490
|
* Delegation verification request schema
|
|
@@ -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
|
+
};
|
|
1758
1808
|
constraints?: Record<string, unknown> | undefined;
|
|
1759
1809
|
user_id?: string | undefined;
|
|
1760
1810
|
user_identifier?: string | undefined;
|
|
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
|
+
};
|
|
1766
1823
|
constraints?: Record<string, unknown> | undefined;
|
|
1767
1824
|
user_id?: string | undefined;
|
|
1768
1825
|
user_identifier?: string | undefined;
|
|
1826
|
+
credential_jwt?: string | undefined;
|
|
1769
1827
|
}>>;
|
|
1770
1828
|
error: z.ZodOptional<z.ZodObject<{
|
|
1771
1829
|
code: z.ZodString;
|
|
@@ -1788,6 +1846,22 @@ export declare const verifyDelegationResponseSchema: z.ZodObject<{
|
|
|
1788
1846
|
message: string;
|
|
1789
1847
|
details?: Record<string, unknown> | undefined;
|
|
1790
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;
|
|
1791
1865
|
delegation_id?: string | undefined;
|
|
1792
1866
|
delegation?: z.objectOutputType<{
|
|
1793
1867
|
id: z.ZodString;
|
|
@@ -2200,22 +2274,29 @@ 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
|
+
};
|
|
2208
2296
|
constraints?: Record<string, unknown> | undefined;
|
|
2209
2297
|
user_id?: string | undefined;
|
|
2210
2298
|
user_identifier?: string | undefined;
|
|
2211
|
-
|
|
2212
|
-
reason?: string | undefined;
|
|
2213
|
-
}, {
|
|
2214
|
-
valid: boolean;
|
|
2215
|
-
error?: {
|
|
2216
|
-
code: string;
|
|
2217
|
-
message: string;
|
|
2218
|
-
details?: Record<string, unknown> | undefined;
|
|
2299
|
+
credential_jwt?: string | undefined;
|
|
2219
2300
|
} | undefined;
|
|
2220
2301
|
delegation_id?: string | undefined;
|
|
2221
2302
|
delegation?: z.objectInputType<{
|
|
@@ -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
|
-
constraints?: Record<string, unknown> | undefined;
|
|
2638
|
-
user_id?: string | undefined;
|
|
2639
|
-
user_identifier?: string | 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
|
+
};
|
|
3895
3988
|
constraints?: Record<string, unknown> | undefined;
|
|
3896
3989
|
user_id?: string | undefined;
|
|
3897
3990
|
user_identifier?: string | undefined;
|
|
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
|
+
};
|
|
3903
4003
|
constraints?: Record<string, unknown> | undefined;
|
|
3904
4004
|
user_id?: string | undefined;
|
|
3905
4005
|
user_identifier?: string | undefined;
|
|
4006
|
+
credential_jwt?: string | undefined;
|
|
3906
4007
|
}>>;
|
|
3907
4008
|
error: z.ZodOptional<z.ZodObject<{
|
|
3908
4009
|
code: z.ZodString;
|
|
@@ -3925,6 +4026,22 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
3925
4026
|
message: string;
|
|
3926
4027
|
details?: Record<string, unknown> | undefined;
|
|
3927
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;
|
|
3928
4045
|
delegation_id?: string | undefined;
|
|
3929
4046
|
delegation?: z.objectOutputType<{
|
|
3930
4047
|
id: z.ZodString;
|
|
@@ -4337,22 +4454,29 @@ 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
|
+
};
|
|
4345
4476
|
constraints?: Record<string, unknown> | undefined;
|
|
4346
4477
|
user_id?: string | undefined;
|
|
4347
4478
|
user_identifier?: string | undefined;
|
|
4348
|
-
|
|
4349
|
-
reason?: string | undefined;
|
|
4350
|
-
}, {
|
|
4351
|
-
valid: boolean;
|
|
4352
|
-
error?: {
|
|
4353
|
-
code: string;
|
|
4354
|
-
message: string;
|
|
4355
|
-
details?: Record<string, unknown> | undefined;
|
|
4479
|
+
credential_jwt?: string | undefined;
|
|
4356
4480
|
} | undefined;
|
|
4357
4481
|
delegation_id?: string | undefined;
|
|
4358
4482
|
delegation?: z.objectInputType<{
|
|
@@ -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
|
-
constraints?: Record<string, unknown> | undefined;
|
|
4775
|
-
user_id?: string | undefined;
|
|
4776
|
-
user_identifier?: string | undefined;
|
|
4777
|
-
} | undefined;
|
|
4778
4893
|
reason?: string | undefined;
|
|
4779
4894
|
}>;
|
|
4780
4895
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
@@ -4796,6 +4911,22 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
4796
4911
|
message: string;
|
|
4797
4912
|
details?: Record<string, unknown> | undefined;
|
|
4798
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;
|
|
4799
4930
|
delegation_id?: string | undefined;
|
|
4800
4931
|
delegation?: z.objectOutputType<{
|
|
4801
4932
|
id: 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
|
-
constraints?: Record<string, unknown> | undefined;
|
|
5217
|
-
user_id?: string | undefined;
|
|
5218
|
-
user_identifier?: string | undefined;
|
|
5219
|
-
} | undefined;
|
|
5220
5342
|
reason?: string | undefined;
|
|
5221
5343
|
};
|
|
5222
5344
|
metadata?: {
|
|
@@ -5232,6 +5354,22 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5232
5354
|
message: string;
|
|
5233
5355
|
details?: Record<string, unknown> | undefined;
|
|
5234
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;
|
|
5235
5373
|
delegation_id?: string | undefined;
|
|
5236
5374
|
delegation?: z.objectInputType<{
|
|
5237
5375
|
id: 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
|
-
constraints?: Record<string, unknown> | undefined;
|
|
5653
|
-
user_id?: string | undefined;
|
|
5654
|
-
user_identifier?: string | undefined;
|
|
5655
|
-
} | undefined;
|
|
5656
5785
|
reason?: string | undefined;
|
|
5657
5786
|
};
|
|
5658
5787
|
metadata?: {
|
|
@@ -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
|
|
@@ -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
|