dcql 0.2.3 → 0.2.4
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/src/dcql-query/claims-path.d.ts +14 -0
- package/dist/src/dcql-query/claims-path.d.ts.map +1 -0
- package/dist/src/dcql-query/claims-path.js +23 -0
- package/dist/src/dcql-query/claims-path.js.map +1 -0
- package/dist/src/dcql-query/claims-path.test.d.ts +2 -0
- package/dist/src/dcql-query/claims-path.test.d.ts.map +1 -0
- package/dist/src/dcql-query/claims-path.test.js +97 -0
- package/dist/src/dcql-query/claims-path.test.js.map +1 -0
- package/dist/src/dcql-query/dcql-query.d.ts +5 -0
- package/dist/src/dcql-query/dcql-query.d.ts.map +1 -0
- package/dist/src/dcql-query/dcql-query.js +53 -0
- package/dist/src/dcql-query/dcql-query.js.map +1 -0
- package/dist/src/dcql-query/dcql-query.test.d.ts +2 -0
- package/dist/src/dcql-query/dcql-query.test.d.ts.map +1 -0
- package/dist/src/dcql-query/dcql-query.test.js +165 -0
- package/dist/src/dcql-query/dcql-query.test.js.map +1 -0
- package/dist/src/dcql-query/m-dcql-claims-query.d.ts +37 -0
- package/dist/src/dcql-query/m-dcql-claims-query.d.ts.map +1 -0
- package/dist/src/dcql-query/m-dcql-claims-query.js +57 -0
- package/dist/src/dcql-query/m-dcql-claims-query.js.map +1 -0
- package/dist/src/dcql-query/m-dcql-credential-query.d.ts +186 -0
- package/dist/src/dcql-query/m-dcql-credential-query.d.ts.map +1 -0
- package/dist/src/dcql-query/m-dcql-credential-query.js +85 -0
- package/dist/src/dcql-query/m-dcql-credential-query.js.map +1 -0
- package/dist/src/dcql-query/m-dcql-credential-set-query.d.ts +18 -0
- package/dist/src/dcql-query/m-dcql-credential-set-query.d.ts.map +1 -0
- package/dist/src/dcql-query/m-dcql-credential-set-query.js +41 -0
- package/dist/src/dcql-query/m-dcql-credential-set-query.js.map +1 -0
- package/dist/src/dcql-query/m-dcql-query.d.ts +433 -0
- package/dist/src/dcql-query/m-dcql-query.d.ts.map +1 -0
- package/dist/src/dcql-query/m-dcql-query.js +89 -0
- package/dist/src/dcql-query/m-dcql-query.js.map +1 -0
- package/dist/src/dcql-query-result/dcql-claims-query-result.d.ts +81 -0
- package/dist/src/dcql-query-result/dcql-claims-query-result.d.ts.map +1 -0
- package/dist/src/dcql-query-result/dcql-claims-query-result.js +158 -0
- package/dist/src/dcql-query-result/dcql-claims-query-result.js.map +1 -0
- package/dist/src/dcql-query-result/dcql-credential-query-result.d.ts +38 -0
- package/dist/src/dcql-query-result/dcql-credential-query-result.d.ts.map +1 -0
- package/dist/src/dcql-query-result/dcql-credential-query-result.js +61 -0
- package/dist/src/dcql-query-result/dcql-credential-query-result.js.map +1 -0
- package/dist/src/dcql-query-result/m-dcql-query-result.d.ts +730 -0
- package/dist/src/dcql-query-result/m-dcql-query-result.d.ts.map +1 -0
- package/dist/src/dcql-query-result/m-dcql-query-result.js +78 -0
- package/dist/src/dcql-query-result/m-dcql-query-result.js.map +1 -0
- package/dist/src/dcql-query-vp-token/m-dcql-query-vp-token.d.ts +65 -0
- package/dist/src/dcql-query-vp-token/m-dcql-query-vp-token.d.ts.map +1 -0
- package/dist/src/dcql-query-vp-token/m-dcql-query-vp-token.js +50 -0
- package/dist/src/dcql-query-vp-token/m-dcql-query-vp-token.js.map +1 -0
- package/dist/src/e-base.d.ts +15 -0
- package/dist/src/e-base.d.ts.map +1 -0
- package/dist/{esm/src → src}/e-base.js +18 -23
- package/dist/src/e-base.js.map +1 -0
- package/dist/src/e-dcql.d.ts +32 -0
- package/dist/src/e-dcql.d.ts.map +1 -0
- package/dist/src/e-dcql.js +35 -0
- package/dist/src/e-dcql.js.map +1 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +30 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/u-dcql-credential-representation.d.ts +28 -0
- package/dist/src/u-dcql-credential-representation.d.ts.map +1 -0
- package/dist/src/u-dcql-credential-representation.js +32 -0
- package/dist/src/u-dcql-credential-representation.js.map +1 -0
- package/dist/src/u-dcql.d.ts +49 -0
- package/dist/src/u-dcql.d.ts.map +1 -0
- package/dist/src/u-dcql.js +76 -0
- package/dist/src/u-dcql.js.map +1 -0
- package/package.json +14 -9
- package/.cache/tsbuildinfo.json +0 -1
- package/.turbo/turbo-build.log +0 -4
- package/CHANGELOG.md +0 -13
- package/dist/esm/src/claims-query/claims-query-result.d.ts +0 -24
- package/dist/esm/src/claims-query/claims-query-result.d.ts.map +0 -1
- package/dist/esm/src/claims-query/claims-query-result.js +0 -67
- package/dist/esm/src/claims-query/claims-query-result.js.map +0 -1
- package/dist/esm/src/claims-query/v-claims-query-result.d.ts +0 -82
- package/dist/esm/src/claims-query/v-claims-query-result.d.ts.map +0 -1
- package/dist/esm/src/claims-query/v-claims-query-result.js +0 -30
- package/dist/esm/src/claims-query/v-claims-query-result.js.map +0 -1
- package/dist/esm/src/claims-query/v-claims-query.d.ts +0 -34
- package/dist/esm/src/claims-query/v-claims-query.d.ts.map +0 -1
- package/dist/esm/src/claims-query/v-claims-query.js +0 -24
- package/dist/esm/src/claims-query/v-claims-query.js.map +0 -1
- package/dist/esm/src/credential-query/credential-query-result.d.ts +0 -101
- package/dist/esm/src/credential-query/credential-query-result.d.ts.map +0 -1
- package/dist/esm/src/credential-query/credential-query-result.js +0 -91
- package/dist/esm/src/credential-query/credential-query-result.js.map +0 -1
- package/dist/esm/src/credential-query/v-credential-query-result.d.ts +0 -696
- package/dist/esm/src/credential-query/v-credential-query-result.d.ts.map +0 -1
- package/dist/esm/src/credential-query/v-credential-query-result.js +0 -44
- package/dist/esm/src/credential-query/v-credential-query-result.js.map +0 -1
- package/dist/esm/src/credential-query/v-credential-query.d.ts +0 -109
- package/dist/esm/src/credential-query/v-credential-query.d.ts.map +0 -1
- package/dist/esm/src/credential-query/v-credential-query.js +0 -57
- package/dist/esm/src/credential-query/v-credential-query.js.map +0 -1
- package/dist/esm/src/e-base.d.ts +0 -25
- package/dist/esm/src/e-base.d.ts.map +0 -1
- package/dist/esm/src/e-base.js.map +0 -1
- package/dist/esm/src/e-vp-query.d.ts +0 -32
- package/dist/esm/src/e-vp-query.d.ts.map +0 -1
- package/dist/esm/src/e-vp-query.js +0 -27
- package/dist/esm/src/e-vp-query.js.map +0 -1
- package/dist/esm/src/index.d.ts +0 -7
- package/dist/esm/src/index.d.ts.map +0 -1
- package/dist/esm/src/index.js +0 -7
- package/dist/esm/src/index.js.map +0 -1
- package/dist/esm/src/u-query.d.ts +0 -20
- package/dist/esm/src/u-query.d.ts.map +0 -1
- package/dist/esm/src/u-query.js +0 -25
- package/dist/esm/src/u-query.js.map +0 -1
- package/dist/esm/src/vp-query/v-vp-query-result.d.ts +0 -767
- package/dist/esm/src/vp-query/v-vp-query-result.d.ts.map +0 -1
- package/dist/esm/src/vp-query/v-vp-query-result.js +0 -18
- package/dist/esm/src/vp-query/v-vp-query-result.js.map +0 -1
- package/dist/esm/src/vp-query/v-vp-query.d.ts +0 -94
- package/dist/esm/src/vp-query/v-vp-query.d.ts.map +0 -1
- package/dist/esm/src/vp-query/v-vp-query.js +0 -52
- package/dist/esm/src/vp-query/v-vp-query.js.map +0 -1
- package/dist/esm/src/vp-query/vp-query.d.ts +0 -5
- package/dist/esm/src/vp-query/vp-query.d.ts.map +0 -1
- package/dist/esm/src/vp-query/vp-query.fixtures.d.ts +0 -7
- package/dist/esm/src/vp-query/vp-query.fixtures.d.ts.map +0 -1
- package/dist/esm/src/vp-query/vp-query.fixtures.js +0 -172
- package/dist/esm/src/vp-query/vp-query.fixtures.js.map +0 -1
- package/dist/esm/src/vp-query/vp-query.js +0 -21
- package/dist/esm/src/vp-query/vp-query.js.map +0 -1
- package/dist/esm/src/vp-query/vp-query.test.d.ts +0 -31
- package/dist/esm/src/vp-query/vp-query.test.d.ts.map +0 -1
- package/dist/esm/src/vp-query/vp-query.test.js +0 -130
- package/dist/esm/src/vp-query/vp-query.test.js.map +0 -1
- package/eslint.config.js +0 -10
- package/src/claims-query/claims-query-result.ts +0 -104
- package/src/claims-query/v-claims-query-result.ts +0 -42
- package/src/claims-query/v-claims-query.ts +0 -34
- package/src/credential-query/credential-query-result.ts +0 -130
- package/src/credential-query/v-credential-query-result.ts +0 -71
- package/src/credential-query/v-credential-query.ts +0 -85
- package/src/e-base.ts +0 -116
- package/src/e-vp-query.ts +0 -31
- package/src/index.ts +0 -6
- package/src/u-query.ts +0 -39
- package/src/vp-query/v-vp-query-result.ts +0 -23
- package/src/vp-query/v-vp-query.ts +0 -71
- package/src/vp-query/vp-query.fixtures.ts +0 -178
- package/src/vp-query/vp-query.test.ts +0 -156
- package/src/vp-query/vp-query.ts +0 -44
- package/tsconfig.json +0 -5
@@ -0,0 +1,186 @@
|
|
1
|
+
import * as v from 'valibot';
|
2
|
+
/**
|
3
|
+
* A Credential Query is an object representing a request for a presentation of one Credential.
|
4
|
+
*/
|
5
|
+
export declare namespace DcqlCredentialQuery {
|
6
|
+
const vMdoc: v.ObjectSchema<{
|
7
|
+
readonly format: v.SchemaWithPipe<[v.LiteralSchema<"mso_mdoc", undefined>, v.DescriptionAction<"mso_mdoc", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
8
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
9
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, never>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
10
|
+
readonly namespace: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1.">]>;
|
11
|
+
readonly claim_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name.">]>;
|
12
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, never>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
13
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
14
|
+
namespace: string;
|
15
|
+
claim_name: string;
|
16
|
+
values?: (string | number | boolean)[] | undefined;
|
17
|
+
id?: string | undefined;
|
18
|
+
}, ...{
|
19
|
+
namespace: string;
|
20
|
+
claim_name: string;
|
21
|
+
values?: (string | number | boolean)[] | undefined;
|
22
|
+
id?: string | undefined;
|
23
|
+
}[]], undefined>]>, never>, v.DescriptionAction<[{
|
24
|
+
namespace: string;
|
25
|
+
claim_name: string;
|
26
|
+
values?: (string | number | boolean)[] | undefined;
|
27
|
+
id?: string | undefined;
|
28
|
+
}, ...{
|
29
|
+
namespace: string;
|
30
|
+
claim_name: string;
|
31
|
+
values?: (string | number | boolean)[] | undefined;
|
32
|
+
id?: string | undefined;
|
33
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
34
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.ObjectSchema<{
|
35
|
+
readonly doctype_value: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential.">]>;
|
36
|
+
}, undefined>, never>, v.DescriptionAction<{
|
37
|
+
doctype_value?: string | undefined;
|
38
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
39
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
40
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, never>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
41
|
+
}, undefined>;
|
42
|
+
type Mdoc = v.InferOutput<typeof vMdoc>;
|
43
|
+
const vSdJwtVc: v.ObjectSchema<{
|
44
|
+
readonly format: v.SchemaWithPipe<[v.LiteralSchema<"vc+sd-jwt", undefined>, v.DescriptionAction<"vc+sd-jwt", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
45
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
46
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, never>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
47
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
48
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, never>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
49
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
50
|
+
path: (string | number | null)[];
|
51
|
+
values?: (string | number | boolean)[] | undefined;
|
52
|
+
id?: string | undefined;
|
53
|
+
}, ...{
|
54
|
+
path: (string | number | null)[];
|
55
|
+
values?: (string | number | boolean)[] | undefined;
|
56
|
+
id?: string | undefined;
|
57
|
+
}[]], undefined>]>, never>, v.DescriptionAction<[{
|
58
|
+
path: (string | number | null)[];
|
59
|
+
values?: (string | number | boolean)[] | undefined;
|
60
|
+
id?: string | undefined;
|
61
|
+
}, ...{
|
62
|
+
path: (string | number | null)[];
|
63
|
+
values?: (string | number | boolean)[] | undefined;
|
64
|
+
id?: string | undefined;
|
65
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
66
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ObjectSchema<{
|
67
|
+
readonly vct_values: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
68
|
+
}, undefined>, v.DescriptionAction<{
|
69
|
+
vct_values?: string[] | undefined;
|
70
|
+
}, "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential.">]>, never>, v.DescriptionAction<{
|
71
|
+
vct_values?: string[] | undefined;
|
72
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
73
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
74
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, never>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
75
|
+
}, undefined>;
|
76
|
+
type SdJwtVc = v.InferOutput<typeof vSdJwtVc>;
|
77
|
+
const vW3c: v.ObjectSchema<{
|
78
|
+
readonly format: v.PicklistSchema<["jwt_vc_json", "jwt_vc_json-ld"], undefined>;
|
79
|
+
readonly claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
80
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, never>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
81
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
82
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, never>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
83
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
84
|
+
path: (string | number | null)[];
|
85
|
+
values?: (string | number | boolean)[] | undefined;
|
86
|
+
id?: string | undefined;
|
87
|
+
}, ...{
|
88
|
+
path: (string | number | null)[];
|
89
|
+
values?: (string | number | boolean)[] | undefined;
|
90
|
+
id?: string | undefined;
|
91
|
+
}[]], undefined>]>, never>;
|
92
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
93
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, never>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
94
|
+
}, undefined>;
|
95
|
+
type W3c = v.InferOutput<typeof vW3c>;
|
96
|
+
const vModel: v.VariantSchema<"format", [v.ObjectSchema<{
|
97
|
+
readonly format: v.SchemaWithPipe<[v.LiteralSchema<"mso_mdoc", undefined>, v.DescriptionAction<"mso_mdoc", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
98
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
99
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, never>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
100
|
+
readonly namespace: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1.">]>;
|
101
|
+
readonly claim_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name.">]>;
|
102
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, never>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
103
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
104
|
+
namespace: string;
|
105
|
+
claim_name: string;
|
106
|
+
values?: (string | number | boolean)[] | undefined;
|
107
|
+
id?: string | undefined;
|
108
|
+
}, ...{
|
109
|
+
namespace: string;
|
110
|
+
claim_name: string;
|
111
|
+
values?: (string | number | boolean)[] | undefined;
|
112
|
+
id?: string | undefined;
|
113
|
+
}[]], undefined>]>, never>, v.DescriptionAction<[{
|
114
|
+
namespace: string;
|
115
|
+
claim_name: string;
|
116
|
+
values?: (string | number | boolean)[] | undefined;
|
117
|
+
id?: string | undefined;
|
118
|
+
}, ...{
|
119
|
+
namespace: string;
|
120
|
+
claim_name: string;
|
121
|
+
values?: (string | number | boolean)[] | undefined;
|
122
|
+
id?: string | undefined;
|
123
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
124
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.ObjectSchema<{
|
125
|
+
readonly doctype_value: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential.">]>;
|
126
|
+
}, undefined>, never>, v.DescriptionAction<{
|
127
|
+
doctype_value?: string | undefined;
|
128
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
129
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
130
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, never>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
131
|
+
}, undefined>, v.ObjectSchema<{
|
132
|
+
readonly format: v.SchemaWithPipe<[v.LiteralSchema<"vc+sd-jwt", undefined>, v.DescriptionAction<"vc+sd-jwt", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
133
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
134
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, never>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
135
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
136
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, never>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
137
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
138
|
+
path: (string | number | null)[];
|
139
|
+
values?: (string | number | boolean)[] | undefined;
|
140
|
+
id?: string | undefined;
|
141
|
+
}, ...{
|
142
|
+
path: (string | number | null)[];
|
143
|
+
values?: (string | number | boolean)[] | undefined;
|
144
|
+
id?: string | undefined;
|
145
|
+
}[]], undefined>]>, never>, v.DescriptionAction<[{
|
146
|
+
path: (string | number | null)[];
|
147
|
+
values?: (string | number | boolean)[] | undefined;
|
148
|
+
id?: string | undefined;
|
149
|
+
}, ...{
|
150
|
+
path: (string | number | null)[];
|
151
|
+
values?: (string | number | boolean)[] | undefined;
|
152
|
+
id?: string | undefined;
|
153
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
154
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ObjectSchema<{
|
155
|
+
readonly vct_values: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
156
|
+
}, undefined>, v.DescriptionAction<{
|
157
|
+
vct_values?: string[] | undefined;
|
158
|
+
}, "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential.">]>, never>, v.DescriptionAction<{
|
159
|
+
vct_values?: string[] | undefined;
|
160
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
161
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
162
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, never>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
163
|
+
}, undefined>, v.ObjectSchema<{
|
164
|
+
readonly format: v.PicklistSchema<["jwt_vc_json", "jwt_vc_json-ld"], undefined>;
|
165
|
+
readonly claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
166
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, never>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
167
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
168
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, never>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
169
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
170
|
+
path: (string | number | null)[];
|
171
|
+
values?: (string | number | boolean)[] | undefined;
|
172
|
+
id?: string | undefined;
|
173
|
+
}, ...{
|
174
|
+
path: (string | number | null)[];
|
175
|
+
values?: (string | number | boolean)[] | undefined;
|
176
|
+
id?: string | undefined;
|
177
|
+
}[]], undefined>]>, never>;
|
178
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
179
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, never>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
180
|
+
}, undefined>], undefined>;
|
181
|
+
type Input = v.InferInput<typeof vModel>;
|
182
|
+
type Output = v.InferOutput<typeof vModel>;
|
183
|
+
const validate: (credentialQuery: Output) => void;
|
184
|
+
}
|
185
|
+
export type DcqlCredentialQuery = DcqlCredentialQuery.Output;
|
186
|
+
//# sourceMappingURL=m-dcql-credential-query.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-credential-query.d.ts","sourceRoot":"","sources":["../../../src/dcql-query/m-dcql-credential-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAK7B;;GAEG;AACH,yBAAiB,mBAAmB,CAAC;IAsB5B,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BhB,CAAC;IACH,KAAY,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,KAAK,CAAC,CAAC;IAExC,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BnB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC;IAE9C,MAAM,IAAI;;;;;;;;;;;;;;;;;iBAMf,CAAC;IACH,KAAY,GAAG,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,CAAC;IAEtC,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAA+C,CAAC;IACnE,KAAY,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAChD,KAAY,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;IAE3C,MAAM,QAAQ,oBAAqB,MAAM,SAE/C,CAAC;CACH;AACD,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,MAAM,CAAC"}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.DcqlCredentialQuery = void 0;
|
27
|
+
const v = __importStar(require("valibot"));
|
28
|
+
const e_dcql_js_1 = require("../e-dcql.js");
|
29
|
+
const u_dcql_js_1 = require("../u-dcql.js");
|
30
|
+
const m_dcql_claims_query_js_1 = require("./m-dcql-claims-query.js");
|
31
|
+
/**
|
32
|
+
* A Credential Query is an object representing a request for a presentation of one Credential.
|
33
|
+
*/
|
34
|
+
var DcqlCredentialQuery;
|
35
|
+
(function (DcqlCredentialQuery) {
|
36
|
+
const vBase = v.object({
|
37
|
+
id: v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex), v.description(`REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.`)),
|
38
|
+
claim_sets: v.pipe(v.optional(v.pipe(v.array(v.array(v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)))), (0, u_dcql_js_1.vNonEmptyArray)())), v.description(`OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.`)),
|
39
|
+
});
|
40
|
+
DcqlCredentialQuery.vMdoc = v.object({
|
41
|
+
...vBase.entries,
|
42
|
+
format: v.pipe(v.literal('mso_mdoc'), v.description(`REQUIRED. A string that specifies the format of the requested Verifiable Credential.`)),
|
43
|
+
claims: v.pipe(v.optional(v.pipe(v.array(m_dcql_claims_query_js_1.DcqlClaimsQuery.vMdoc), (0, u_dcql_js_1.vNonEmptyArray)())), v.description(`OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.`)),
|
44
|
+
meta: v.pipe(v.optional(v.object({
|
45
|
+
doctype_value: v.pipe(v.optional(v.string()), v.description(`OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential.`)),
|
46
|
+
})), v.description(`OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.`)),
|
47
|
+
});
|
48
|
+
DcqlCredentialQuery.vSdJwtVc = v.object({
|
49
|
+
...vBase.entries,
|
50
|
+
format: v.pipe(v.literal('vc+sd-jwt'), v.description(`REQUIRED. A string that specifies the format of the requested Verifiable Credential.`)),
|
51
|
+
claims: v.pipe(v.optional(v.pipe(v.array(m_dcql_claims_query_js_1.DcqlClaimsQuery.vW3cSdJwtVc), (0, u_dcql_js_1.vNonEmptyArray)())), v.description(`OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.`)),
|
52
|
+
meta: v.pipe(v.optional(v.pipe(v.object({
|
53
|
+
vct_values: v.optional(v.array(v.string())),
|
54
|
+
}), v.description(`OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential.`))), v.description(`OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.`)),
|
55
|
+
});
|
56
|
+
DcqlCredentialQuery.vW3c = v.object({
|
57
|
+
...vBase.entries,
|
58
|
+
format: v.picklist(['jwt_vc_json', 'jwt_vc_json-ld']),
|
59
|
+
claims: v.optional(v.pipe(v.array(m_dcql_claims_query_js_1.DcqlClaimsQuery.vW3cSdJwtVc), (0, u_dcql_js_1.vNonEmptyArray)())),
|
60
|
+
});
|
61
|
+
DcqlCredentialQuery.vModel = v.variant('format', [DcqlCredentialQuery.vMdoc, DcqlCredentialQuery.vSdJwtVc, DcqlCredentialQuery.vW3c]);
|
62
|
+
DcqlCredentialQuery.validate = (credentialQuery) => {
|
63
|
+
claimSetIdsAreDefined(credentialQuery);
|
64
|
+
};
|
65
|
+
})(DcqlCredentialQuery || (exports.DcqlCredentialQuery = DcqlCredentialQuery = {}));
|
66
|
+
// --- validations --- //
|
67
|
+
const claimSetIdsAreDefined = (credentialQuery) => {
|
68
|
+
if (!credentialQuery.claim_sets)
|
69
|
+
return;
|
70
|
+
const claimIds = new Set(credentialQuery.claims?.map(claim => claim.id));
|
71
|
+
const undefinedClaims = [];
|
72
|
+
for (const claim_set of credentialQuery.claim_sets) {
|
73
|
+
for (const claim_id of claim_set) {
|
74
|
+
if (!claimIds.has(claim_id)) {
|
75
|
+
undefinedClaims.push(claim_id);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
if (undefinedClaims.length > 0) {
|
80
|
+
throw new e_dcql_js_1.DcqlUndefinedClaimSetIdError({
|
81
|
+
message: `Credential set contains undefined credential id${undefinedClaims.length === 0 ? '' : '`s'} '${undefinedClaims.join(', ')}'`,
|
82
|
+
});
|
83
|
+
}
|
84
|
+
};
|
85
|
+
//# sourceMappingURL=m-dcql-credential-query.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-credential-query.js","sourceRoot":"","sources":["../../../src/dcql-query/m-dcql-credential-query.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import * as v from 'valibot';
|
2
|
+
/**
|
3
|
+
* A Credential Set Query is an object representing
|
4
|
+
* a request for one or more credentials to satisfy a particular use case with the Verifier.
|
5
|
+
*/
|
6
|
+
export declare namespace CredentialSetQuery {
|
7
|
+
const vModel: v.ObjectSchema<{
|
8
|
+
readonly options: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>, v.DescriptionAction<[string[], ...string[][]], "REQUIRED. A non-empty array, where each value in the array is a list of Credential Query identifiers representing one set of Credentials that satisfies the use case.">]>;
|
9
|
+
readonly required: v.SchemaWithPipe<[v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, "OPTIONAL. Boolean which indicates whether this set of Credentials is required to satisfy the particular use case at the Verifier. If omitted, the default value is 'true'.">]>;
|
10
|
+
readonly purpose: v.SchemaWithPipe<[v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>], undefined>, never>, v.DescriptionAction<string | number | {
|
11
|
+
[x: string]: unknown;
|
12
|
+
} | undefined, "OPTIONAL. A string, number or object specifying the purpose of the query.">]>;
|
13
|
+
}, undefined>;
|
14
|
+
type Input = v.InferInput<typeof vModel>;
|
15
|
+
type Output = v.InferOutput<typeof vModel>;
|
16
|
+
}
|
17
|
+
export type CredentialSetQuery = CredentialSetQuery.Output;
|
18
|
+
//# sourceMappingURL=m-dcql-credential-set-query.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-credential-set-query.d.ts","sourceRoot":"","sources":["../../../src/dcql-query/m-dcql-credential-set-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B;;;GAGG;AACH,yBAAiB,kBAAkB,CAAC;IAC3B,MAAM,MAAM;;;;;;iBAsBjB,CAAC;IAEH,KAAY,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAChD,KAAY,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;CACnD;AACD,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,CAAC"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.CredentialSetQuery = void 0;
|
27
|
+
const v = __importStar(require("valibot"));
|
28
|
+
const u_dcql_js_1 = require("../u-dcql.js");
|
29
|
+
/**
|
30
|
+
* A Credential Set Query is an object representing
|
31
|
+
* a request for one or more credentials to satisfy a particular use case with the Verifier.
|
32
|
+
*/
|
33
|
+
var CredentialSetQuery;
|
34
|
+
(function (CredentialSetQuery) {
|
35
|
+
CredentialSetQuery.vModel = v.object({
|
36
|
+
options: v.pipe(v.array(v.array(u_dcql_js_1.vIdString)), (0, u_dcql_js_1.vNonEmptyArray)(), v.description(`REQUIRED. A non-empty array, where each value in the array is a list of Credential Query identifiers representing one set of Credentials that satisfies the use case.`)),
|
37
|
+
required: v.pipe(v.optional(v.boolean(), true), v.description(`OPTIONAL. Boolean which indicates whether this set of Credentials is required to satisfy the particular use case at the Verifier. If omitted, the default value is 'true'.`)),
|
38
|
+
purpose: v.pipe(v.optional(v.union([v.string(), v.number(), v.record(v.string(), v.unknown())])), v.description(`OPTIONAL. A string, number or object specifying the purpose of the query.`)),
|
39
|
+
});
|
40
|
+
})(CredentialSetQuery || (exports.CredentialSetQuery = CredentialSetQuery = {}));
|
41
|
+
//# sourceMappingURL=m-dcql-credential-set-query.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-credential-set-query.js","sourceRoot":"","sources":["../../../src/dcql-query/m-dcql-credential-set-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,4CAAyD;AAEzD;;;GAGG;AACH,IAAiB,kBAAkB,CA2BlC;AA3BD,WAAiB,kBAAkB;IACpB,yBAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QAC7B,OAAO,EAAE,CAAC,CAAC,IAAI,CACb,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAS,CAAC,CAAC,EAC3B,IAAA,0BAAc,GAAE,EAChB,CAAC,CAAC,WAAW,CACX,uKAAuK,CACxK,CACF;QACD,QAAQ,EAAE,CAAC,CAAC,IAAI,CACd,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,EAC7B,CAAC,CAAC,WAAW,CACX,4KAA4K,CAC7K,CACF;QACD,OAAO,EAAE,CAAC,CAAC,IAAI,CACb,CAAC,CAAC,QAAQ,CACR,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CACrE,EACD,CAAC,CAAC,WAAW,CACX,2EAA2E,CAC5E,CACF;KACF,CAAC,CAAC;AAIL,CAAC,EA3BgB,kBAAkB,kCAAlB,kBAAkB,QA2BlC"}
|