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 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-query-result.d.ts","sourceRoot":"","sources":["../../../src/dcql-query-result/m-dcql-query-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAY7B,yBAAiB,eAAe,CAAC;IAC/B,MAAM,CAAC,MAAM,yBAAyB;;;;;;iBAAoC,CAAC;IAC3E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAClD,OAAO,yBAAyB,CACjC,CAAC;IAEF,MAAM,CAAC,MAAM,2BAA2B;;;;;;;iBAGtC,CAAC;IACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CACpD,OAAO,2BAA2B,CACnC,CAAC;IAEF,MAAM,CAAC,MAAM,0BAA0B;;;iBAGrC,CAAC;IACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,WAAW,CACnD,OAAO,0BAA0B,CAClC,CAAC;IAEF,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;iBAO3B,CAAC;IAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAChD,OAAO,uBAAuB,CAC/B,CAAC;IAEF,MAAM,CAAC,MAAM,sBA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CAAC;IAElD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;IACnE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;;CAClE;AACD,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC"}
|
@@ -0,0 +1,78 @@
|
|
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.DcqlQueryResult = void 0;
|
27
|
+
const v = __importStar(require("valibot"));
|
28
|
+
const m_dcql_credential_query_js_1 = require("../dcql-query/m-dcql-credential-query.js");
|
29
|
+
const m_dcql_credential_set_query_js_1 = require("../dcql-query/m-dcql-credential-set-query.js");
|
30
|
+
const u_dcql_credential_representation_js_1 = require("../u-dcql-credential-representation.js");
|
31
|
+
const u_dcql_js_1 = require("../u-dcql.js");
|
32
|
+
var DcqlQueryResult;
|
33
|
+
(function (DcqlQueryResult) {
|
34
|
+
DcqlQueryResult.vW3cCredentialParseOutput = v.object({ claims: u_dcql_js_1.vJsonRecord });
|
35
|
+
DcqlQueryResult.vSdJwtCredentialParseOutput = v.object({
|
36
|
+
vct: v.string(),
|
37
|
+
claims: u_dcql_js_1.vJsonRecord,
|
38
|
+
});
|
39
|
+
DcqlQueryResult.vMdocCredentialParseOutput = v.object({
|
40
|
+
docType: v.string(),
|
41
|
+
namespaces: u_dcql_credential_representation_js_1.DcqlMdocRepresentation.vNamespaces,
|
42
|
+
});
|
43
|
+
const vCredentialParseSuccess = v.object({
|
44
|
+
...u_dcql_js_1.vParseSuccess.entries,
|
45
|
+
output: v.union([
|
46
|
+
DcqlQueryResult.vW3cCredentialParseOutput,
|
47
|
+
DcqlQueryResult.vSdJwtCredentialParseOutput,
|
48
|
+
DcqlQueryResult.vMdocCredentialParseOutput,
|
49
|
+
]),
|
50
|
+
});
|
51
|
+
DcqlQueryResult.vCredentialParseResult = v.union([
|
52
|
+
vCredentialParseSuccess,
|
53
|
+
u_dcql_js_1.vParseFailure,
|
54
|
+
]);
|
55
|
+
DcqlQueryResult.vCredentialQueryResult = v.pipe(v.array(v.array(v.union([v.undefined(), ...DcqlQueryResult.vCredentialParseResult.options]))), (0, u_dcql_js_1.vNonEmptyArray)());
|
56
|
+
DcqlQueryResult.vModel = v.object({
|
57
|
+
credentials: v.pipe(v.array(m_dcql_credential_query_js_1.DcqlCredentialQuery.vModel), (0, u_dcql_js_1.vNonEmptyArray)(), v.description(`REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials.`)),
|
58
|
+
credential_matches: v.record(v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)), v.union([
|
59
|
+
v.object({
|
60
|
+
...vCredentialParseSuccess.entries,
|
61
|
+
all: v.pipe(v.array(v.array(v.union([v.undefined(), vCredentialParseSuccess, u_dcql_js_1.vParseFailure]))), (0, u_dcql_js_1.vNonEmptyArray)()),
|
62
|
+
}),
|
63
|
+
v.object({
|
64
|
+
...u_dcql_js_1.vParseFailure.entries,
|
65
|
+
all: v.pipe(v.array(v.array(v.union([v.undefined(), vCredentialParseSuccess, u_dcql_js_1.vParseFailure]))), (0, u_dcql_js_1.vNonEmptyArray)()),
|
66
|
+
}),
|
67
|
+
])),
|
68
|
+
credential_sets: v.optional(v.pipe(v.array(v.object({
|
69
|
+
...m_dcql_credential_set_query_js_1.CredentialSetQuery.vModel.entries,
|
70
|
+
matching_options: v.union([
|
71
|
+
v.undefined(),
|
72
|
+
v.pipe(v.array(v.array(v.string())), (0, u_dcql_js_1.vNonEmptyArray)()),
|
73
|
+
]),
|
74
|
+
})), (0, u_dcql_js_1.vNonEmptyArray)(), v.description(`OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return.`))),
|
75
|
+
canBeSatisfied: v.boolean(),
|
76
|
+
});
|
77
|
+
})(DcqlQueryResult || (exports.DcqlQueryResult = DcqlQueryResult = {}));
|
78
|
+
//# sourceMappingURL=m-dcql-query-result.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-query-result.js","sourceRoot":"","sources":["../../../src/dcql-query-result/m-dcql-query-result.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,yFAA+E;AAC/E,iGAAkF;AAClF,gGAAgF;AAChF,4CAMsB;AAEtB,IAAiB,eAAe,CAqH/B;AArHD,WAAiB,eAAe;IACjB,yCAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,uBAAW,EAAE,CAAC,CAAC;IAK9D,2CAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;QAClD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,MAAM,EAAE,uBAAW;KAC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AAC,KAAK,CACL,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,uBAAuB,EAAE,yBAAa,CAAC,CAAC,CACjE,CACF,EACD,IAAA,0BAAc,GAAE,CACjB;aACF,CAAC;YACF,CAAC,CAAC,MAAM,CAAC;gBACP,GAAG,yBAAa,CAAC,OAAO;gBACxB,GAAG,EAAE,CAAC,CAAC,IAAI,CACT,CAAC,CAAC,KAAK,CACL,CAAC,CAAC,KAAK,CACL,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,uBAAuB,EAAE,yBAAa,CAAC,CAAC,CACjE,CACF,EACD,IAAA,0BAAc,GAAE,CACjB;aACF,CAAC;SACH,CAAC,CACH;QAED,eAAe,EAAE,CAAC,CAAC,QAAQ,CACzB,CAAC,CAAC,IAAI,CACJ,CAAC,CAAC,KAAK,CACL,CAAC,CAAC,MAAM,CAAC;YACP,GAAG,mDAAkB,CAAC,MAAM,CAAC,OAAO;YACpC,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC;gBACxB,CAAC,CAAC,SAAS,EAAE;gBACb,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,IAAA,0BAAc,GAAE,CAAC;aACvD,CAAC;SACH,CAAC,CACH,EACD,IAAA,0BAAc,GAAE,EAChB,CAAC,CAAC,WAAW,CACX,yJAAyJ,CAC1J,CACF,CACF;QAED,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;KAC5B,CAAC,CAAC;AAML,CAAC,EArHgB,eAAe,+BAAf,eAAe,QAqH/B"}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import * as v from 'valibot';
|
2
|
+
export declare namespace DcqlVpToken {
|
3
|
+
const vModel: v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.UnionSchema<[v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<string | number | boolean | {
|
4
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
5
|
+
} | (string | number | boolean | {
|
6
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
7
|
+
} | (string | number | boolean | {
|
8
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
9
|
+
} | (string | number | boolean | {
|
10
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
11
|
+
} | (string | number | boolean | {
|
12
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
13
|
+
} | (string | number | boolean | {
|
14
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
15
|
+
} | (string | number | boolean | {
|
16
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
17
|
+
} | (string | number | boolean | {
|
18
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
19
|
+
} | (string | number | boolean | {
|
20
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
21
|
+
} | (string | number | boolean | {
|
22
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
23
|
+
} | (string | number | boolean | {
|
24
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
25
|
+
} | (string | number | boolean | {
|
26
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
27
|
+
} | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null, string | number | boolean | {
|
28
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
29
|
+
} | (string | number | boolean | {
|
30
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
31
|
+
} | (string | number | boolean | {
|
32
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
33
|
+
} | (string | number | boolean | {
|
34
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
35
|
+
} | (string | number | boolean | {
|
36
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
37
|
+
} | (string | number | boolean | {
|
38
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
39
|
+
} | (string | number | boolean | {
|
40
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
41
|
+
} | (string | number | boolean | {
|
42
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
43
|
+
} | (string | number | boolean | {
|
44
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
45
|
+
} | (string | number | boolean | {
|
46
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
47
|
+
} | (string | number | boolean | {
|
48
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
49
|
+
} | (string | number | boolean | {
|
50
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
51
|
+
} | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null, v.BaseIssue<unknown>>, undefined>], undefined>, undefined>;
|
52
|
+
type Input = v.InferInput<typeof vModel>;
|
53
|
+
type Output = v.InferOutput<typeof vModel>;
|
54
|
+
const parse: (input: Input | string) => {
|
55
|
+
[x: string]: string | {
|
56
|
+
[x: string]: string | number | boolean | {
|
57
|
+
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
58
|
+
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
59
|
+
};
|
60
|
+
};
|
61
|
+
const encode: (input: Output) => string;
|
62
|
+
const validate: (vpToken: DcqlVpToken.Output) => void;
|
63
|
+
}
|
64
|
+
export type DcqlVpToken = DcqlVpToken.Output;
|
65
|
+
//# sourceMappingURL=m-dcql-query-vp-token.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-query-vp-token.d.ts","sourceRoot":"","sources":["../../../src/dcql-query-vp-token/m-dcql-query-vp-token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAI7B,yBAAiB,WAAW,CAAC;IACpB,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4LAGlB,CAAC;IAEF,KAAY,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAChD,KAAY,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;IAC3C,MAAM,KAAK,UAAW,KAAK,GAAG,MAAM;;;;;;KAM1C,CAAC;IAEK,MAAM,MAAM,UAAW,MAAM,WAEnC,CAAC;IAEK,MAAM,QAAQ,YAAa,WAAW,CAAC,MAAM,SAMnD,CAAC;CACH;AACD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC"}
|
@@ -0,0 +1,50 @@
|
|
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.DcqlVpToken = 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
|
+
var DcqlVpToken;
|
31
|
+
(function (DcqlVpToken) {
|
32
|
+
DcqlVpToken.vModel = v.record(v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)), v.union([v.string(), u_dcql_js_1.vJsonRecord]));
|
33
|
+
DcqlVpToken.parse = (input) => {
|
34
|
+
if (typeof input === 'string') {
|
35
|
+
return v.parse(v.pipe(v.string(), u_dcql_js_1.vStringToJson, DcqlVpToken.vModel), input);
|
36
|
+
}
|
37
|
+
return v.parse(DcqlVpToken.vModel, input);
|
38
|
+
};
|
39
|
+
DcqlVpToken.encode = (input) => {
|
40
|
+
return JSON.stringify(input);
|
41
|
+
};
|
42
|
+
DcqlVpToken.validate = (vpToken) => {
|
43
|
+
if (Object.values(vpToken).length === 0) {
|
44
|
+
throw new e_dcql_js_1.DcqlEmptyVpToken({
|
45
|
+
message: 'Empty Verifiable Presentation token',
|
46
|
+
});
|
47
|
+
}
|
48
|
+
};
|
49
|
+
})(DcqlVpToken || (exports.DcqlVpToken = DcqlVpToken = {}));
|
50
|
+
//# sourceMappingURL=m-dcql-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AX,WAAW,QA2B3B"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export declare function getCauseFromUnknown(cause: unknown): Error | undefined;
|
2
|
+
export declare const isDcqlError: (cause: unknown) => cause is DcqlError;
|
3
|
+
export declare function getDcqlErrorFromUnknown(cause: unknown): DcqlError;
|
4
|
+
type DCQL_ERROR_CODE = 'PARSE_ERROR' | 'INTERNAL_SERVER_ERROR' | 'NOT_IMPLEMENTED' | 'BAD_REQUEST';
|
5
|
+
export declare class DcqlError extends Error {
|
6
|
+
readonly cause?: Error;
|
7
|
+
readonly code: DCQL_ERROR_CODE;
|
8
|
+
constructor(opts: {
|
9
|
+
message?: string;
|
10
|
+
code: DCQL_ERROR_CODE;
|
11
|
+
cause?: unknown;
|
12
|
+
});
|
13
|
+
}
|
14
|
+
export {};
|
15
|
+
//# sourceMappingURL=e-base.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"e-base.d.ts","sourceRoot":"","sources":["../../src/e-base.ts"],"names":[],"mappings":"AAQA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAyBrE;AAED,eAAO,MAAM,WAAW,UAAW,OAAO,KAAG,KAAK,IAAI,SAUrD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAgBjE;AAED,KAAK,eAAe,GAChB,aAAa,GACb,uBAAuB,GACvB,iBAAiB,GACjB,aAAa,CAAC;AAElB,qBAAa,SAAU,SAAQ,KAAK;IAGlC,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;IACvC,SAAgB,IAAI,kBAAC;gBAET,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,eAAe,CAAC;QACtB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CAgBF"}
|
@@ -1,9 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DcqlError = exports.isDcqlError = void 0;
|
4
|
+
exports.getCauseFromUnknown = getCauseFromUnknown;
|
5
|
+
exports.getDcqlErrorFromUnknown = getDcqlErrorFromUnknown;
|
1
6
|
function isObject(value) {
|
2
7
|
return !!value && !Array.isArray(value) && typeof value === 'object';
|
3
8
|
}
|
4
9
|
class UnknownCauseError extends Error {
|
5
10
|
}
|
6
|
-
|
11
|
+
function getCauseFromUnknown(cause) {
|
7
12
|
if (cause instanceof Error) {
|
8
13
|
return cause;
|
9
14
|
}
|
@@ -25,31 +30,32 @@ export function getCauseFromUnknown(cause) {
|
|
25
30
|
}
|
26
31
|
return undefined;
|
27
32
|
}
|
28
|
-
|
29
|
-
if (cause instanceof
|
33
|
+
const isDcqlError = (cause) => {
|
34
|
+
if (cause instanceof DcqlError) {
|
30
35
|
return true;
|
31
36
|
}
|
32
|
-
if (cause instanceof Error && cause.name === '
|
37
|
+
if (cause instanceof Error && cause.name === 'DcqlError') {
|
33
38
|
// https://github.com/trpc/trpc/pull/4848
|
34
39
|
return true;
|
35
40
|
}
|
36
41
|
return false;
|
37
42
|
};
|
38
|
-
|
39
|
-
|
43
|
+
exports.isDcqlError = isDcqlError;
|
44
|
+
function getDcqlErrorFromUnknown(cause) {
|
45
|
+
if ((0, exports.isDcqlError)(cause)) {
|
40
46
|
return cause;
|
41
47
|
}
|
42
|
-
const
|
48
|
+
const dcqlError = new DcqlError({
|
43
49
|
code: 'INTERNAL_SERVER_ERROR',
|
44
50
|
cause,
|
45
51
|
});
|
46
52
|
// Inherit stack from error
|
47
53
|
if (cause instanceof Error && cause.stack) {
|
48
|
-
|
54
|
+
dcqlError.stack = cause.stack;
|
49
55
|
}
|
50
|
-
return
|
56
|
+
return dcqlError;
|
51
57
|
}
|
52
|
-
|
58
|
+
class DcqlError extends Error {
|
53
59
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
54
60
|
// @ts-ignore override doesn't work in all environments due to "This member cannot have an 'override' modifier because it is not declared in the base class 'Error'"
|
55
61
|
cause;
|
@@ -61,23 +67,12 @@ export class VpQueryError extends Error {
|
|
61
67
|
// @ts-ignore https://github.com/tc39/proposal-error-cause
|
62
68
|
super(message, { cause });
|
63
69
|
this.code = opts.code;
|
64
|
-
this.name = '
|
70
|
+
this.name = 'DcqlError';
|
65
71
|
if (!this.cause) {
|
66
72
|
// < ES2022 / < Node 16.9.0 compatability
|
67
73
|
this.cause = cause;
|
68
74
|
}
|
69
75
|
}
|
70
76
|
}
|
71
|
-
|
72
|
-
const { message, error } = input;
|
73
|
-
throw new (error ?? VpQueryError)({
|
74
|
-
code: 'NOT_IMPLEMENTED',
|
75
|
-
message: `NOT IMPLEMENTED. ${message}`,
|
76
|
-
});
|
77
|
-
};
|
78
|
-
export class Base64Error extends VpQueryError {
|
79
|
-
constructor(opts) {
|
80
|
-
super({ code: 'BAD_REQUEST', ...opts });
|
81
|
-
}
|
82
|
-
}
|
77
|
+
exports.DcqlError = DcqlError;
|
83
78
|
//# sourceMappingURL=e-base.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"e-base.js","sourceRoot":"","sources":["../../src/e-base.ts"],"names":[],"mappings":";;;AAQA,kDAyBC;AAcD,0DAgBC;AA/DD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AACvE,CAAC;AAED,MAAM,iBAAkB,SAAQ,KAAK;CAEpC;AAED,SAAgB,mBAAmB,CAAC,KAAc;IAChD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,UAAU,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAClE,OAAO,SAAS,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;IAC7D,oKAAoK;IAC3I,KAAK,CAAS;IACvB,IAAI,CAAC;IAErB,YAAY,IAIX;QACC,MAAM,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,KAAK,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC;QAE5D,6DAA6D;QAC7D,0DAA0D;QAC1D,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAE1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QAExB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,yCAAyC;YACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;IACH,CAAC;CACF;AA1BD,8BA0BC"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { DcqlError } from './e-base.js';
|
2
|
+
export declare class DcqlCredentialSetError extends DcqlError {
|
3
|
+
constructor(opts: {
|
4
|
+
message: string;
|
5
|
+
cause?: unknown;
|
6
|
+
});
|
7
|
+
}
|
8
|
+
export declare class DcqlUndefinedClaimSetIdError extends DcqlError {
|
9
|
+
constructor(opts: {
|
10
|
+
message: string;
|
11
|
+
cause?: unknown;
|
12
|
+
});
|
13
|
+
}
|
14
|
+
export declare class DcqlNonUniqueCredentialQueryIdsError extends DcqlError {
|
15
|
+
constructor(opts: {
|
16
|
+
message: string;
|
17
|
+
cause?: unknown;
|
18
|
+
});
|
19
|
+
}
|
20
|
+
export declare class DcqlInvalidClaimsQueryIdError extends DcqlError {
|
21
|
+
constructor(opts: {
|
22
|
+
message: string;
|
23
|
+
cause?: unknown;
|
24
|
+
});
|
25
|
+
}
|
26
|
+
export declare class DcqlEmptyVpToken extends DcqlError {
|
27
|
+
constructor(opts: {
|
28
|
+
message: string;
|
29
|
+
cause?: unknown;
|
30
|
+
});
|
31
|
+
}
|
32
|
+
//# sourceMappingURL=e-dcql.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"e-dcql.d.ts","sourceRoot":"","sources":["../../src/e-dcql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,sBAAuB,SAAQ,SAAS;gBACvC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAGvD;AAED,qBAAa,4BAA6B,SAAQ,SAAS;gBAC7C,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAGvD;AAED,qBAAa,oCAAqC,SAAQ,SAAS;gBACrD,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAGvD;AAED,qBAAa,6BAA8B,SAAQ,SAAS;gBAC9C,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAGvD;AAED,qBAAa,gBAAiB,SAAQ,SAAS;gBACjC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAGvD"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DcqlEmptyVpToken = exports.DcqlInvalidClaimsQueryIdError = exports.DcqlNonUniqueCredentialQueryIdsError = exports.DcqlUndefinedClaimSetIdError = exports.DcqlCredentialSetError = void 0;
|
4
|
+
const e_base_js_1 = require("./e-base.js");
|
5
|
+
class DcqlCredentialSetError extends e_base_js_1.DcqlError {
|
6
|
+
constructor(opts) {
|
7
|
+
super({ code: 'BAD_REQUEST', ...opts });
|
8
|
+
}
|
9
|
+
}
|
10
|
+
exports.DcqlCredentialSetError = DcqlCredentialSetError;
|
11
|
+
class DcqlUndefinedClaimSetIdError extends e_base_js_1.DcqlError {
|
12
|
+
constructor(opts) {
|
13
|
+
super({ code: 'BAD_REQUEST', ...opts });
|
14
|
+
}
|
15
|
+
}
|
16
|
+
exports.DcqlUndefinedClaimSetIdError = DcqlUndefinedClaimSetIdError;
|
17
|
+
class DcqlNonUniqueCredentialQueryIdsError extends e_base_js_1.DcqlError {
|
18
|
+
constructor(opts) {
|
19
|
+
super({ code: 'BAD_REQUEST', ...opts });
|
20
|
+
}
|
21
|
+
}
|
22
|
+
exports.DcqlNonUniqueCredentialQueryIdsError = DcqlNonUniqueCredentialQueryIdsError;
|
23
|
+
class DcqlInvalidClaimsQueryIdError extends e_base_js_1.DcqlError {
|
24
|
+
constructor(opts) {
|
25
|
+
super({ code: 'BAD_REQUEST', ...opts });
|
26
|
+
}
|
27
|
+
}
|
28
|
+
exports.DcqlInvalidClaimsQueryIdError = DcqlInvalidClaimsQueryIdError;
|
29
|
+
class DcqlEmptyVpToken extends e_base_js_1.DcqlError {
|
30
|
+
constructor(opts) {
|
31
|
+
super({ code: 'BAD_REQUEST', ...opts });
|
32
|
+
}
|
33
|
+
}
|
34
|
+
exports.DcqlEmptyVpToken = DcqlEmptyVpToken;
|
35
|
+
//# sourceMappingURL=e-dcql.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"e-dcql.js","sourceRoot":"","sources":["../../src/e-dcql.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAExC,MAAa,sBAAuB,SAAQ,qBAAS;IACnD,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,wDAIC;AAED,MAAa,4BAA6B,SAAQ,qBAAS;IACzD,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,oEAIC;AAED,MAAa,oCAAqC,SAAQ,qBAAS;IACjE,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,oFAIC;AAED,MAAa,6BAA8B,SAAQ,qBAAS;IAC1D,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,sEAIC;AAED,MAAa,gBAAiB,SAAQ,qBAAS;IAC7C,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,4CAIC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export { DcqlQueryResult } from './dcql-query-result/m-dcql-query-result.js';
|
2
|
+
export { DcqlVpToken } from './dcql-query-vp-token/m-dcql-query-vp-token.js';
|
3
|
+
export { DcqlClaimsQuery as ClaimsQuery } from './dcql-query/m-dcql-claims-query.js';
|
4
|
+
export { DcqlCredentialQuery } from './dcql-query/m-dcql-credential-query.js';
|
5
|
+
export { DcqlQuery } from './dcql-query/m-dcql-query.js';
|
6
|
+
export * from './e-base.js';
|
7
|
+
export * from './e-dcql.js';
|
8
|
+
export type { DcqlCredentialRepresentation, DcqlMdocRepresentation, DcqlSdJwtVcRepresentation, DcqlW3cVcRepresentation, } from './u-dcql-credential-representation.js';
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAC7E,OAAO,EAAE,eAAe,IAAI,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAE5B,YAAY,EACV,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,uCAAuC,CAAC"}
|
@@ -0,0 +1,30 @@
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
exports.DcqlQuery = exports.DcqlCredentialQuery = exports.ClaimsQuery = exports.DcqlVpToken = exports.DcqlQueryResult = void 0;
|
18
|
+
var m_dcql_query_result_js_1 = require("./dcql-query-result/m-dcql-query-result.js");
|
19
|
+
Object.defineProperty(exports, "DcqlQueryResult", { enumerable: true, get: function () { return m_dcql_query_result_js_1.DcqlQueryResult; } });
|
20
|
+
var m_dcql_query_vp_token_js_1 = require("./dcql-query-vp-token/m-dcql-query-vp-token.js");
|
21
|
+
Object.defineProperty(exports, "DcqlVpToken", { enumerable: true, get: function () { return m_dcql_query_vp_token_js_1.DcqlVpToken; } });
|
22
|
+
var m_dcql_claims_query_js_1 = require("./dcql-query/m-dcql-claims-query.js");
|
23
|
+
Object.defineProperty(exports, "ClaimsQuery", { enumerable: true, get: function () { return m_dcql_claims_query_js_1.DcqlClaimsQuery; } });
|
24
|
+
var m_dcql_credential_query_js_1 = require("./dcql-query/m-dcql-credential-query.js");
|
25
|
+
Object.defineProperty(exports, "DcqlCredentialQuery", { enumerable: true, get: function () { return m_dcql_credential_query_js_1.DcqlCredentialQuery; } });
|
26
|
+
var m_dcql_query_js_1 = require("./dcql-query/m-dcql-query.js");
|
27
|
+
Object.defineProperty(exports, "DcqlQuery", { enumerable: true, get: function () { return m_dcql_query_js_1.DcqlQuery; } });
|
28
|
+
__exportStar(require("./e-base.js"), exports);
|
29
|
+
__exportStar(require("./e-dcql.js"), exports);
|
30
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qFAA6E;AAApE,yHAAA,eAAe,OAAA;AACxB,2FAA6E;AAApE,uHAAA,WAAW,OAAA;AACpB,8EAAqF;AAA5E,qHAAA,eAAe,OAAe;AACvC,sFAA8E;AAArE,iIAAA,mBAAmB,OAAA;AAC5B,gEAAyD;AAAhD,4GAAA,SAAS,OAAA;AAClB,8CAA4B;AAC5B,8CAA4B"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import * as v from 'valibot';
|
2
|
+
import type { vJsonRecord } from './u-dcql.js';
|
3
|
+
export declare namespace DcqlMdocRepresentation {
|
4
|
+
const vNamespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
5
|
+
type NameSpaces = Record<string, Record<string, unknown>>;
|
6
|
+
interface Credential {
|
7
|
+
docType: string;
|
8
|
+
namespaces: NameSpaces;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
export type DcqlMdocRepresentation = DcqlMdocRepresentation.Credential;
|
12
|
+
export declare namespace DcqlSdJwtVcRepresentation {
|
13
|
+
type Claims = v.InferOutput<typeof vJsonRecord>;
|
14
|
+
interface Credential {
|
15
|
+
vct: string;
|
16
|
+
claims: Claims;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
export type DcqlSdJwtVcRepresentation = DcqlSdJwtVcRepresentation.Credential;
|
20
|
+
export declare namespace DcqlW3cVcRepresentation {
|
21
|
+
type Claims = v.InferOutput<typeof vJsonRecord>;
|
22
|
+
interface Credential {
|
23
|
+
claims: Claims;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
export type DcqlW3cVcRepresentation = DcqlW3cVcRepresentation.Credential;
|
27
|
+
export type DcqlCredentialRepresentation = DcqlMdocRepresentation | DcqlSdJwtVcRepresentation | DcqlW3cVcRepresentation;
|
28
|
+
//# sourceMappingURL=u-dcql-credential-representation.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"u-dcql-credential-representation.d.ts","sourceRoot":"","sources":["../../src/u-dcql-credential-representation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,yBAAiB,sBAAsB,CAAC;IAC/B,MAAM,WAAW,6HAGvB,CAAC;IACF,KAAY,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjE,UAAiB,UAAU;QACzB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,UAAU,CAAC;KACxB;CACF;AACD,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvE,yBAAiB,yBAAyB,CAAC;IACzC,KAAY,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC;IACvD,UAAiB,UAAU;QACzB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;KAChB;CACF;AACD,MAAM,MAAM,yBAAyB,GAAG,yBAAyB,CAAC,UAAU,CAAC;AAE7E,yBAAiB,uBAAuB,CAAC;IACvC,KAAY,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC;IACvD,UAAiB,UAAU;QACzB,MAAM,EAAE,MAAM,CAAC;KAChB;CACF;AACD,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,UAAU,CAAC;AAEzE,MAAM,MAAM,4BAA4B,GACpC,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,CAAC"}
|
@@ -0,0 +1,32 @@
|
|
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.DcqlMdocRepresentation = void 0;
|
27
|
+
const v = __importStar(require("valibot"));
|
28
|
+
var DcqlMdocRepresentation;
|
29
|
+
(function (DcqlMdocRepresentation) {
|
30
|
+
DcqlMdocRepresentation.vNamespaces = v.record(v.string(), v.record(v.string(), v.unknown()));
|
31
|
+
})(DcqlMdocRepresentation || (exports.DcqlMdocRepresentation = DcqlMdocRepresentation = {}));
|
32
|
+
//# sourceMappingURL=u-dcql-credential-representation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"u-dcql-credential-representation.js","sourceRoot":"","sources":["../../src/u-dcql-credential-representation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAG7B,IAAiB,sBAAsB,CAUtC;AAVD,WAAiB,sBAAsB;IACxB,kCAAW,GAAG,CAAC,CAAC,MAAM,CACjC,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAClC,CAAC;AAMJ,CAAC,EAVgB,sBAAsB,sCAAtB,sBAAsB,QAUtC"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import * as v from 'valibot';
|
2
|
+
export declare const idRegex: RegExp;
|
3
|
+
export declare const vCredentialFormat: v.PicklistSchema<["mso_mdoc", "vc+sd-jwt", "jwt_vc_json", "jwt_vc_json-ld"], undefined>;
|
4
|
+
export declare const vNonEmptyArray: <T extends unknown[]>() => v.CustomSchema<[T[number], ...T], undefined>;
|
5
|
+
export declare const vIdString: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
6
|
+
type JSON = string | number | boolean | null | {
|
7
|
+
[key: string]: JSON;
|
8
|
+
} | JSON[];
|
9
|
+
export declare const vJsonLiteral: v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.BooleanSchema<undefined>, v.NullSchema<undefined>], undefined>;
|
10
|
+
export type JsonLiteral = v.InferOutput<typeof vJsonLiteral>;
|
11
|
+
export declare const vJsonArray: v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.BooleanSchema<undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
12
|
+
export declare const vJson: v.GenericSchema<JSON>;
|
13
|
+
export declare const vJsonRecord: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<JSON, JSON, v.BaseIssue<unknown>>, undefined>;
|
14
|
+
export type JsonRecord = v.InferOutput<typeof vJsonRecord>;
|
15
|
+
export declare const vJsonValue: v.UnionSchema<[v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.BooleanSchema<undefined>, v.NullSchema<undefined>], undefined>, v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.BooleanSchema<undefined>, v.NullSchema<undefined>], undefined>, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<JSON, JSON, v.BaseIssue<unknown>>, undefined>], undefined>;
|
16
|
+
export declare const vStringToJson: v.RawTransformAction<string, JSON>;
|
17
|
+
export declare const vParseSuccess: v.ObjectSchema<{
|
18
|
+
readonly success: v.LiteralSchema<true, undefined>;
|
19
|
+
readonly typed: v.LiteralSchema<true, undefined>;
|
20
|
+
readonly output: v.UnknownSchema;
|
21
|
+
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, never>;
|
22
|
+
readonly credential_index: v.NumberSchema<undefined>;
|
23
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
24
|
+
}, undefined>;
|
25
|
+
export declare const vParseFailure: v.ObjectSchema<{
|
26
|
+
readonly success: v.LiteralSchema<false, undefined>;
|
27
|
+
readonly typed: v.BooleanSchema<undefined>;
|
28
|
+
readonly output: v.UnknownSchema;
|
29
|
+
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
|
30
|
+
readonly credential_index: v.NumberSchema<undefined>;
|
31
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
32
|
+
}, undefined>;
|
33
|
+
export declare const vParseResult: v.UnionSchema<[v.ObjectSchema<{
|
34
|
+
readonly success: v.LiteralSchema<true, undefined>;
|
35
|
+
readonly typed: v.LiteralSchema<true, undefined>;
|
36
|
+
readonly output: v.UnknownSchema;
|
37
|
+
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, never>;
|
38
|
+
readonly credential_index: v.NumberSchema<undefined>;
|
39
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
40
|
+
}, undefined>, v.ObjectSchema<{
|
41
|
+
readonly success: v.LiteralSchema<false, undefined>;
|
42
|
+
readonly typed: v.BooleanSchema<undefined>;
|
43
|
+
readonly output: v.UnknownSchema;
|
44
|
+
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
|
45
|
+
readonly credential_index: v.NumberSchema<undefined>;
|
46
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
47
|
+
}, undefined>], undefined>;
|
48
|
+
export {};
|
49
|
+
//# sourceMappingURL=u-dcql.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"u-dcql.d.ts","sourceRoot":"","sources":["../../src/u-dcql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,eAAO,MAAM,OAAO,QAAqB,CAAC;AAE1C,eAAO,MAAM,iBAAiB,yFAK5B,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,OAAO,EAAE,mDAIjD,CAAC;AAEF,eAAO,MAAM,SAAS,iFAAuC,CAAC;AAE9D,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,EAAE,CAAC;AAEhF,eAAO,MAAM,YAAY,uIAKvB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,YAAY,CAAC,CAAC;AAE7D,eAAO,MAAM,UAAU,iKAAwB,CAAC;AAEhD,eAAO,MAAM,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,IAAI,CAEvC,CAAC;AAEF,eAAO,MAAM,WAAW,yGAA8B,CAAC;AACvD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,eAAO,MAAM,UAAU,6aAAmD,CAAC;AAE3E,eAAO,MAAM,aAAa,oCASzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;aAOxB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;aAOxB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;0BAA0C,CAAC"}
|