dcql
Version:
Digital Credentials Query Language (DCQL)
377 lines (371 loc) • 1.29 MB
TypeScript
import * as v from 'valibot';
declare function getCauseFromUnknown(cause: unknown): Error | undefined;
declare function getDcqlErrorFromUnknown(cause: unknown): DcqlError;
type DCQL_ERROR_CODE = 'PARSE_ERROR' | 'INTERNAL_SERVER_ERROR' | 'NOT_IMPLEMENTED' | 'BAD_REQUEST';
declare class DcqlError extends Error {
readonly cause?: Error;
readonly code: DCQL_ERROR_CODE;
constructor(opts: {
message?: string;
code: DCQL_ERROR_CODE;
cause?: unknown;
});
}
declare class DcqlCredentialSetError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlUndefinedClaimSetIdError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlNonUniqueCredentialQueryIdsError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlParseError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlInvalidClaimsQueryIdError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlMissingClaimSetParseError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlInvalidPresentationRecordError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlPresentationResultError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
type UnknownBaseSchema = v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>;
type EnsureOutputAssignableToInput<T extends UnknownBaseSchema> = v.InferOutput<T> extends v.InferInput<T> ? T : never;
declare class ModelDefinition<T extends UnknownBaseSchema> {
private input;
constructor(input: {
vModel: EnsureOutputAssignableToInput<T>;
});
get v(): EnsureOutputAssignableToInput<T>;
parse(input: T): DcqlParseError | v.InferOutput<T>;
safeParse(input: unknown): {
success: true;
output: v.InferOutput<T>;
} | {
success: false;
flattened: v.FlatErrors<T>;
error: v.ValiError<T>;
};
is(input: unknown): input is v.InferOutput<T>;
}
type InferModelTypes<T extends ModelDefinition<any>> = T extends ModelDefinition<infer U> ? {
Input: v.InferInput<U>;
Output: v.InferOutput<U>;
} : never;
type NonEmptyArray<T> = [T, ...T[]];
type Json = string | number | boolean | null | {
[key: string]: Json;
} | Json[];
declare namespace DcqlMdocPresentation {
const vModel: v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>;
const model: ModelDefinition<v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>>;
type Model = InferModelTypes<typeof model>;
}
type DcqlMdocPresentation = DcqlMdocPresentation.Model['Output'];
declare namespace DcqlSdJwtVcPresentation {
const vModel: v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>;
const model: ModelDefinition<v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>>;
type Model = InferModelTypes<typeof model>;
}
type DcqlSdJwtVcPresentation = DcqlSdJwtVcPresentation.Model['Output'];
declare namespace DcqlW3cVcPresentation {
const vModel: v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["ldp_vc", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
readonly type: v.ArraySchema<v.StringSchema<undefined>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>;
const model: ModelDefinition<v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["ldp_vc", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
readonly type: v.ArraySchema<v.StringSchema<undefined>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>>;
type Model = InferModelTypes<typeof model>;
}
type DcqlW3cVcPresentation = DcqlW3cVcPresentation.Model['Output'];
declare namespace DcqlCredentialPresentation {
const model: ModelDefinition<v.VariantSchema<"credential_format", [v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["ldp_vc", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
readonly type: v.ArraySchema<v.StringSchema<undefined>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>], undefined>>;
type Model = InferModelTypes<typeof model>;
}
type DcqlCredentialPresentation = DcqlCredentialPresentation.Model['Output'];
declare namespace DcqlQueryResult {
const vCredentialQueryItemCredentialSuccessResult: v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly input_credential_index: v.NumberSchema<undefined>;
readonly trusted_authorities: v.UnionSchema<[v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly valid_trusted_authority: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
readonly failed_trusted_authorities: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly valid_trusted_authority: v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly trusted_authority_index: v.NumberSchema<undefined>;
readonly output: v.VariantSchema<"type", v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined> | v.LiteralSchema<"etsi_tl", undefined> | v.LiteralSchema<"openid_federation", undefined>;
readonly value: v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]> | v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]> | v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>;
}, undefined>[], undefined>;
}, undefined>;
readonly failed_trusted_authorities: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
readonly success: v.LiteralSchema<false, undefined>;
readonly trusted_authority_index: v.NumberSchema<undefined>;
readonly issues: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
readonly output: v.UnknownSchema;
}, undefined>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<{
output: unknown;
issues: {
[x: string]: unknown;
};
success: false;
trusted_authority_index: number;
}>, v.ErrorMessage<v.CustomIssue> | undefined>]>, undefined>;
}, undefined>], undefined>;
readonly claims: v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly valid_claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly claim_index: v.NumberSchema<undefined>;
readonly claim_id: v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<string, undefined>]>, undefined>;
readonly output: v.UnionSchema<[v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>], undefined>;
}, undefined>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<{
output: {
[x: string]: Json;
} | {
[x: string]: {
[x: string]: unknown;
};
};
success: true;
claim_index: number;
claim_id?: string | undefined;
}>, v.ErrorMessage<v.CustomIssue> | undefined>]>, undefined>;
readonly failed_claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
readonly success: v.LiteralSchema<false, undefined>;
readonly claim_index: v.NumberSchema<undefined>;
readonly claim_id: v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<string, undefined>]>, undefined>;
readonly issues: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
readonly output: v.UnknownSchema;
}, undefined>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<{
output: unknown;
issues: {
[x: string]: unknown;
};
success: false;
claim_index: number;
claim_id?: string | undefined;
}>, v.ErrorMessage<v.CustomIssue> | undefined>]>, undefined>;
readonly valid_claim_sets: v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
readonly valid_claim_indexes: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.NumberSchema<undefined>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<number>, v.ErrorMessage<v.CustomIssue> | undefined>]>, undefined>;
readonly failed_claim_indexes: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
readonly output: v.UnionSchema<[v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>], undefined>;
}, undefined>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<{
output: {
[x: string]: Json;
} | {
[x: string]: {
[x: string]: unknown;
};
};
success: true;
claim_set_index: number | undefined;
valid_claim_indexes?: NonEmptyArray<number> | undefined;
failed_claim_indexes?: undefined;
}>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
readonly failed_claim_sets: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
readonly success: v.LiteralSchema<false, undefined>;
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
readonly valid_claim_indexes: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.NumberSchema<undefined>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<number>, v.ErrorMessage<v.CustomIssue> | undefined>]>, undefined>;
readonly failed_claim_indexes: v.SchemaWithPipe<[v.ArraySchema<v.NumberSchema<undefined>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<number>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
readonly issues: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
}, undefined>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<{
issues: {
[x: string]: unknown;
};
success: false;
claim_set_index: number | undefined;
failed_claim_indexes: NonEmptyArray<number>;
valid_claim_indexes?: NonEmptyArray<number> | undefined;
}>, v.ErrorMessage<v.CustomIssue> | undefined>]>, undefined>;
}, undefined>;
readonly meta: v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly output: v.VariantSchema<"credential_format", [Omit<v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
readonly type: v.LiteralSchema<"aki", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"aki trusted authority value must be a string">, v.RegexAction<string, "must be base64url">, v.DescriptionAction<string, "Contains a list of KeyIdentifier entries of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of one of the elements MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"etsi_tl", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"etsi_tl trusted authority value must be a string">, v.UrlAction<string, "etsi_tl trusted authority value must be a valid https url">, v.CheckAction<string, "etsi_tl trusted authority value must be a valid https url">, v.DescriptionAction<string, "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>, v.ObjectSchema<{
readonly type: v.LiteralSchema<"openid_federation", undefined>;
readonly values: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"openid_federation trusted authority value must be a string">, v.UrlAction<string, "openid_federation trusted authority value must be a valid https url">, v.CheckAction<string, "openid_federation trusted authority value must be a valid https url">, v.DescriptionAction<string, "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential.">]>, (i: v.ArrayIssue) => string>, v.CustomSchema<NonEmptyArray<string>, v.ErrorMessage<v.CustomIssue> | undefined>]>;
}, undefined>], undefined>, undefined>;
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.">]>;
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
readonly entries: Pick<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
readonly authority: v.OptionalSchema<v.VariantSchema<"type", readonly [v.ObjectSchema<{
rea