dcql 1.0.0 → 1.0.1
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/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -64,7 +64,7 @@ declare class DcqlPresentationResultError extends DcqlError {
|
|
|
64
64
|
|
|
65
65
|
type UnknownBaseSchema = v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>;
|
|
66
66
|
type EnsureOutputAssignableToInput<T extends UnknownBaseSchema> = v.InferOutput<T> extends v.InferInput<T> ? T : never;
|
|
67
|
-
declare class
|
|
67
|
+
declare class ModelDefinition<T extends UnknownBaseSchema> {
|
|
68
68
|
private input;
|
|
69
69
|
constructor(input: {
|
|
70
70
|
vModel: EnsureOutputAssignableToInput<T>;
|
|
@@ -81,7 +81,7 @@ declare class Model<T extends UnknownBaseSchema> {
|
|
|
81
81
|
};
|
|
82
82
|
is(input: unknown): input is v.InferOutput<T>;
|
|
83
83
|
}
|
|
84
|
-
type InferModelTypes<T extends
|
|
84
|
+
type InferModelTypes<T extends ModelDefinition<any>> = T extends ModelDefinition<infer U> ? {
|
|
85
85
|
Input: v.InferInput<U>;
|
|
86
86
|
Output: v.InferOutput<U>;
|
|
87
87
|
} : never;
|
|
@@ -108,7 +108,7 @@ declare namespace DcqlMdocPresentation {
|
|
|
108
108
|
}, undefined>], undefined>, undefined>;
|
|
109
109
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
110
110
|
}, undefined>;
|
|
111
|
-
const model:
|
|
111
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
112
112
|
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
|
113
113
|
readonly doctype: v.StringSchema<undefined>;
|
|
114
114
|
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
@@ -144,7 +144,7 @@ declare namespace DcqlSdJwtVcPresentation {
|
|
|
144
144
|
}, undefined>], undefined>, undefined>;
|
|
145
145
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
146
146
|
}, undefined>;
|
|
147
|
-
const model:
|
|
147
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
148
148
|
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
|
149
149
|
readonly vct: v.StringSchema<undefined>;
|
|
150
150
|
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
|
@@ -180,7 +180,7 @@ declare namespace DcqlW3cVcPresentation {
|
|
|
180
180
|
}, undefined>], undefined>, undefined>;
|
|
181
181
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
182
182
|
}, undefined>;
|
|
183
|
-
const model:
|
|
183
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
184
184
|
readonly credential_format: v.PicklistSchema<["ldp_vc", "jwt_vc_json"], undefined>;
|
|
185
185
|
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
|
186
186
|
readonly type: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -200,7 +200,7 @@ declare namespace DcqlW3cVcPresentation {
|
|
|
200
200
|
}
|
|
201
201
|
type DcqlW3cVcPresentation = DcqlW3cVcPresentation.Model['Output'];
|
|
202
202
|
declare namespace DcqlCredentialPresentation {
|
|
203
|
-
const model:
|
|
203
|
+
const model: ModelDefinition<v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
|
204
204
|
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
|
205
205
|
readonly doctype: v.StringSchema<undefined>;
|
|
206
206
|
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
@@ -5260,7 +5260,7 @@ declare namespace DcqlMdocCredential {
|
|
|
5260
5260
|
*/
|
|
5261
5261
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
5262
5262
|
}, undefined>;
|
|
5263
|
-
const model:
|
|
5263
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
5264
5264
|
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
|
5265
5265
|
readonly doctype: v.StringSchema<undefined>;
|
|
5266
5266
|
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
@@ -5314,7 +5314,7 @@ declare namespace DcqlSdJwtVcCredential {
|
|
|
5314
5314
|
*/
|
|
5315
5315
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
5316
5316
|
}, undefined>;
|
|
5317
|
-
const model:
|
|
5317
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
5318
5318
|
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
|
5319
5319
|
readonly vct: v.StringSchema<undefined>;
|
|
5320
5320
|
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
|
@@ -5368,7 +5368,7 @@ declare namespace DcqlW3cVcCredential {
|
|
|
5368
5368
|
*/
|
|
5369
5369
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
5370
5370
|
}, undefined>;
|
|
5371
|
-
const model:
|
|
5371
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
5372
5372
|
readonly credential_format: v.PicklistSchema<["ldp_vc", "jwt_vc_json"], undefined>;
|
|
5373
5373
|
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
|
5374
5374
|
readonly type: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -5467,7 +5467,7 @@ declare namespace DcqlCredential {
|
|
|
5467
5467
|
*/
|
|
5468
5468
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
5469
5469
|
}, undefined>], undefined>;
|
|
5470
|
-
const model:
|
|
5470
|
+
const model: ModelDefinition<v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
|
5471
5471
|
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
|
5472
5472
|
readonly doctype: v.StringSchema<undefined>;
|
|
5473
5473
|
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
package/dist/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ declare class DcqlPresentationResultError extends DcqlError {
|
|
|
64
64
|
|
|
65
65
|
type UnknownBaseSchema = v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>;
|
|
66
66
|
type EnsureOutputAssignableToInput<T extends UnknownBaseSchema> = v.InferOutput<T> extends v.InferInput<T> ? T : never;
|
|
67
|
-
declare class
|
|
67
|
+
declare class ModelDefinition<T extends UnknownBaseSchema> {
|
|
68
68
|
private input;
|
|
69
69
|
constructor(input: {
|
|
70
70
|
vModel: EnsureOutputAssignableToInput<T>;
|
|
@@ -81,7 +81,7 @@ declare class Model<T extends UnknownBaseSchema> {
|
|
|
81
81
|
};
|
|
82
82
|
is(input: unknown): input is v.InferOutput<T>;
|
|
83
83
|
}
|
|
84
|
-
type InferModelTypes<T extends
|
|
84
|
+
type InferModelTypes<T extends ModelDefinition<any>> = T extends ModelDefinition<infer U> ? {
|
|
85
85
|
Input: v.InferInput<U>;
|
|
86
86
|
Output: v.InferOutput<U>;
|
|
87
87
|
} : never;
|
|
@@ -108,7 +108,7 @@ declare namespace DcqlMdocPresentation {
|
|
|
108
108
|
}, undefined>], undefined>, undefined>;
|
|
109
109
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
110
110
|
}, undefined>;
|
|
111
|
-
const model:
|
|
111
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
112
112
|
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
|
113
113
|
readonly doctype: v.StringSchema<undefined>;
|
|
114
114
|
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
@@ -144,7 +144,7 @@ declare namespace DcqlSdJwtVcPresentation {
|
|
|
144
144
|
}, undefined>], undefined>, undefined>;
|
|
145
145
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
146
146
|
}, undefined>;
|
|
147
|
-
const model:
|
|
147
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
148
148
|
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
|
149
149
|
readonly vct: v.StringSchema<undefined>;
|
|
150
150
|
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
|
@@ -180,7 +180,7 @@ declare namespace DcqlW3cVcPresentation {
|
|
|
180
180
|
}, undefined>], undefined>, undefined>;
|
|
181
181
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
182
182
|
}, undefined>;
|
|
183
|
-
const model:
|
|
183
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
184
184
|
readonly credential_format: v.PicklistSchema<["ldp_vc", "jwt_vc_json"], undefined>;
|
|
185
185
|
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
|
186
186
|
readonly type: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -200,7 +200,7 @@ declare namespace DcqlW3cVcPresentation {
|
|
|
200
200
|
}
|
|
201
201
|
type DcqlW3cVcPresentation = DcqlW3cVcPresentation.Model['Output'];
|
|
202
202
|
declare namespace DcqlCredentialPresentation {
|
|
203
|
-
const model:
|
|
203
|
+
const model: ModelDefinition<v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
|
204
204
|
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
|
205
205
|
readonly doctype: v.StringSchema<undefined>;
|
|
206
206
|
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
@@ -5260,7 +5260,7 @@ declare namespace DcqlMdocCredential {
|
|
|
5260
5260
|
*/
|
|
5261
5261
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
5262
5262
|
}, undefined>;
|
|
5263
|
-
const model:
|
|
5263
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
5264
5264
|
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
|
5265
5265
|
readonly doctype: v.StringSchema<undefined>;
|
|
5266
5266
|
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
@@ -5314,7 +5314,7 @@ declare namespace DcqlSdJwtVcCredential {
|
|
|
5314
5314
|
*/
|
|
5315
5315
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
5316
5316
|
}, undefined>;
|
|
5317
|
-
const model:
|
|
5317
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
5318
5318
|
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
|
5319
5319
|
readonly vct: v.StringSchema<undefined>;
|
|
5320
5320
|
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
|
@@ -5368,7 +5368,7 @@ declare namespace DcqlW3cVcCredential {
|
|
|
5368
5368
|
*/
|
|
5369
5369
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
5370
5370
|
}, undefined>;
|
|
5371
|
-
const model:
|
|
5371
|
+
const model: ModelDefinition<v.ObjectSchema<{
|
|
5372
5372
|
readonly credential_format: v.PicklistSchema<["ldp_vc", "jwt_vc_json"], undefined>;
|
|
5373
5373
|
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
|
5374
5374
|
readonly type: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -5467,7 +5467,7 @@ declare namespace DcqlCredential {
|
|
|
5467
5467
|
*/
|
|
5468
5468
|
readonly cryptographic_holder_binding: v.SchemaWithPipe<[v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates support/inclusion of cryptographic holder binding. This will be checked against the `require_cryptographic_holder_binding` property from the query.">]>;
|
|
5469
5469
|
}, undefined>], undefined>;
|
|
5470
|
-
const model:
|
|
5470
|
+
const model: ModelDefinition<v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
|
5471
5471
|
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
|
5472
5472
|
readonly doctype: v.StringSchema<undefined>;
|
|
5473
5473
|
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
package/dist/index.js
CHANGED
|
@@ -360,7 +360,7 @@ var DcqlCredentialTrustedAuthority;
|
|
|
360
360
|
|
|
361
361
|
// src/u-model.ts
|
|
362
362
|
var v3 = __toESM(require("valibot"));
|
|
363
|
-
var
|
|
363
|
+
var ModelDefinition = class {
|
|
364
364
|
constructor(input) {
|
|
365
365
|
this.input = input;
|
|
366
366
|
}
|
|
@@ -420,7 +420,7 @@ var DcqlMdocCredential;
|
|
|
420
420
|
doctype: v4.string(),
|
|
421
421
|
namespaces: DcqlMdocCredential2.vNamespaces
|
|
422
422
|
});
|
|
423
|
-
DcqlMdocCredential2.model = new
|
|
423
|
+
DcqlMdocCredential2.model = new ModelDefinition({ vModel: DcqlMdocCredential2.vModel });
|
|
424
424
|
})(DcqlMdocCredential || (DcqlMdocCredential = {}));
|
|
425
425
|
var DcqlSdJwtVcCredential;
|
|
426
426
|
((DcqlSdJwtVcCredential2) => {
|
|
@@ -431,7 +431,7 @@ var DcqlSdJwtVcCredential;
|
|
|
431
431
|
vct: v4.string(),
|
|
432
432
|
claims: DcqlSdJwtVcCredential2.vClaims
|
|
433
433
|
});
|
|
434
|
-
DcqlSdJwtVcCredential2.model = new
|
|
434
|
+
DcqlSdJwtVcCredential2.model = new ModelDefinition({ vModel: DcqlSdJwtVcCredential2.vModel });
|
|
435
435
|
})(DcqlSdJwtVcCredential || (DcqlSdJwtVcCredential = {}));
|
|
436
436
|
var DcqlW3cVcCredential;
|
|
437
437
|
((DcqlW3cVcCredential2) => {
|
|
@@ -442,7 +442,7 @@ var DcqlW3cVcCredential;
|
|
|
442
442
|
claims: DcqlW3cVcCredential2.vClaims,
|
|
443
443
|
type: v4.array(v4.string())
|
|
444
444
|
});
|
|
445
|
-
DcqlW3cVcCredential2.model = new
|
|
445
|
+
DcqlW3cVcCredential2.model = new ModelDefinition({ vModel: DcqlW3cVcCredential2.vModel });
|
|
446
446
|
})(DcqlW3cVcCredential || (DcqlW3cVcCredential = {}));
|
|
447
447
|
var DcqlCredential;
|
|
448
448
|
((DcqlCredential2) => {
|
|
@@ -451,28 +451,28 @@ var DcqlCredential;
|
|
|
451
451
|
DcqlSdJwtVcCredential.vModel,
|
|
452
452
|
DcqlW3cVcCredential.vModel
|
|
453
453
|
]);
|
|
454
|
-
DcqlCredential2.model = new
|
|
454
|
+
DcqlCredential2.model = new ModelDefinition({ vModel: DcqlCredential2.vModel });
|
|
455
455
|
})(DcqlCredential || (DcqlCredential = {}));
|
|
456
456
|
|
|
457
457
|
// src/dcql-presentation/m-dcql-credential-presentation.ts
|
|
458
458
|
var DcqlMdocPresentation;
|
|
459
459
|
((DcqlMdocPresentation2) => {
|
|
460
460
|
DcqlMdocPresentation2.vModel = DcqlMdocCredential.vModel;
|
|
461
|
-
DcqlMdocPresentation2.model = new
|
|
461
|
+
DcqlMdocPresentation2.model = new ModelDefinition({ vModel: DcqlMdocPresentation2.vModel });
|
|
462
462
|
})(DcqlMdocPresentation || (DcqlMdocPresentation = {}));
|
|
463
463
|
var DcqlSdJwtVcPresentation;
|
|
464
464
|
((DcqlSdJwtVcPresentation2) => {
|
|
465
465
|
DcqlSdJwtVcPresentation2.vModel = DcqlSdJwtVcCredential.vModel;
|
|
466
|
-
DcqlSdJwtVcPresentation2.model = new
|
|
466
|
+
DcqlSdJwtVcPresentation2.model = new ModelDefinition({ vModel: DcqlSdJwtVcPresentation2.vModel });
|
|
467
467
|
})(DcqlSdJwtVcPresentation || (DcqlSdJwtVcPresentation = {}));
|
|
468
468
|
var DcqlW3cVcPresentation;
|
|
469
469
|
((DcqlW3cVcPresentation2) => {
|
|
470
470
|
DcqlW3cVcPresentation2.vModel = DcqlW3cVcCredential.vModel;
|
|
471
|
-
DcqlW3cVcPresentation2.model = new
|
|
471
|
+
DcqlW3cVcPresentation2.model = new ModelDefinition({ vModel: DcqlW3cVcPresentation2.vModel });
|
|
472
472
|
})(DcqlW3cVcPresentation || (DcqlW3cVcPresentation = {}));
|
|
473
473
|
var DcqlCredentialPresentation;
|
|
474
474
|
((DcqlCredentialPresentation2) => {
|
|
475
|
-
DcqlCredentialPresentation2.model = new
|
|
475
|
+
DcqlCredentialPresentation2.model = new ModelDefinition({
|
|
476
476
|
vModel: v5.variant("credential_format", [
|
|
477
477
|
DcqlMdocPresentation.vModel,
|
|
478
478
|
DcqlSdJwtVcPresentation.vModel,
|