dcql 0.2.18 → 0.2.19
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/LICENSE +201 -0
- package/README.md +131 -0
- package/dist/index.d.mts +2885 -0
- package/dist/index.d.ts +2885 -0
- package/dist/index.js +1014 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +951 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +18 -23
- package/dist/src/dcql-error/e-base.d.ts +0 -15
- package/dist/src/dcql-error/e-base.d.ts.map +0 -1
- package/dist/src/dcql-error/e-base.js +0 -78
- package/dist/src/dcql-error/e-base.js.map +0 -1
- package/dist/src/dcql-error/e-dcql.d.ts +0 -50
- package/dist/src/dcql-error/e-dcql.d.ts.map +0 -1
- package/dist/src/dcql-error/e-dcql.js +0 -53
- package/dist/src/dcql-error/e-dcql.js.map +0 -1
- package/dist/src/dcql-error/index.d.ts +0 -3
- package/dist/src/dcql-error/index.d.ts.map +0 -1
- package/dist/src/dcql-error/index.js +0 -23
- package/dist/src/dcql-error/index.js.map +0 -1
- package/dist/src/dcql-parser/claims-path.test.d.ts +0 -2
- package/dist/src/dcql-parser/claims-path.test.d.ts.map +0 -1
- package/dist/src/dcql-parser/claims-path.test.js +0 -103
- package/dist/src/dcql-parser/claims-path.test.js.map +0 -1
- package/dist/src/dcql-parser/dcql-claims-query-result.d.ts +0 -25
- package/dist/src/dcql-parser/dcql-claims-query-result.d.ts.map +0 -1
- package/dist/src/dcql-parser/dcql-claims-query-result.js +0 -179
- package/dist/src/dcql-parser/dcql-claims-query-result.js.map +0 -1
- package/dist/src/dcql-parser/dcql-credential-query-result.d.ts +0 -8
- package/dist/src/dcql-parser/dcql-credential-query-result.d.ts.map +0 -1
- package/dist/src/dcql-parser/dcql-credential-query-result.js +0 -65
- package/dist/src/dcql-parser/dcql-credential-query-result.js.map +0 -1
- package/dist/src/dcql-presentation/index.d.ts +0 -4
- package/dist/src/dcql-presentation/index.d.ts.map +0 -1
- package/dist/src/dcql-presentation/index.js +0 -13
- package/dist/src/dcql-presentation/index.js.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts +0 -59
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.js +0 -55
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.js.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts +0 -660
- package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation-result.js +0 -132
- package/dist/src/dcql-presentation/m-dcql-presentation-result.js.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation.d.ts +0 -14
- package/dist/src/dcql-presentation/m-dcql-presentation.d.ts.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation.js +0 -42
- package/dist/src/dcql-presentation/m-dcql-presentation.js.map +0 -1
- package/dist/src/dcql-query/dcql-query-complex.test.d.ts +0 -2
- package/dist/src/dcql-query/dcql-query-complex.test.d.ts.map +0 -1
- package/dist/src/dcql-query/dcql-query-complex.test.js +0 -3204
- package/dist/src/dcql-query/dcql-query-complex.test.js.map +0 -1
- package/dist/src/dcql-query/dcql-query-with-json-transform.test.d.ts +0 -2
- package/dist/src/dcql-query/dcql-query-with-json-transform.test.d.ts.map +0 -1
- package/dist/src/dcql-query/dcql-query-with-json-transform.test.js +0 -188
- package/dist/src/dcql-query/dcql-query-with-json-transform.test.js.map +0 -1
- package/dist/src/dcql-query/dcql-query.test.d.ts +0 -2
- package/dist/src/dcql-query/dcql-query.test.d.ts.map +0 -1
- package/dist/src/dcql-query/dcql-query.test.js +0 -378
- package/dist/src/dcql-query/dcql-query.test.js.map +0 -1
- package/dist/src/dcql-query/index.d.ts +0 -5
- package/dist/src/dcql-query/index.d.ts.map +0 -1
- package/dist/src/dcql-query/index.js +0 -12
- package/dist/src/dcql-query/index.js.map +0 -1
- package/dist/src/dcql-query/m-dcql-claims-query.d.ts +0 -35
- package/dist/src/dcql-query/m-dcql-claims-query.d.ts.map +0 -1
- package/dist/src/dcql-query/m-dcql-claims-query.js +0 -57
- package/dist/src/dcql-query/m-dcql-claims-query.js.map +0 -1
- package/dist/src/dcql-query/m-dcql-credential-query.d.ts +0 -186
- package/dist/src/dcql-query/m-dcql-credential-query.d.ts.map +0 -1
- package/dist/src/dcql-query/m-dcql-credential-query.js +0 -85
- package/dist/src/dcql-query/m-dcql-credential-query.js.map +0 -1
- package/dist/src/dcql-query/m-dcql-credential-set-query.d.ts +0 -18
- package/dist/src/dcql-query/m-dcql-credential-set-query.d.ts.map +0 -1
- package/dist/src/dcql-query/m-dcql-credential-set-query.js +0 -41
- package/dist/src/dcql-query/m-dcql-credential-set-query.js.map +0 -1
- package/dist/src/dcql-query/m-dcql-query.d.ts +0 -843
- package/dist/src/dcql-query/m-dcql-query.d.ts.map +0 -1
- package/dist/src/dcql-query/m-dcql-query.js +0 -89
- package/dist/src/dcql-query/m-dcql-query.js.map +0 -1
- package/dist/src/dcql-query-result/index.d.ts +0 -3
- package/dist/src/dcql-query-result/index.d.ts.map +0 -1
- package/dist/src/dcql-query-result/index.js +0 -8
- package/dist/src/dcql-query-result/index.js.map +0 -1
- package/dist/src/dcql-query-result/m-dcql-query-result.d.ts +0 -883
- package/dist/src/dcql-query-result/m-dcql-query-result.d.ts.map +0 -1
- package/dist/src/dcql-query-result/m-dcql-query-result.js +0 -69
- package/dist/src/dcql-query-result/m-dcql-query-result.js.map +0 -1
- package/dist/src/dcql-query-result/run-dcql-query.d.ts +0 -8
- package/dist/src/dcql-query-result/run-dcql-query.d.ts.map +0 -1
- package/dist/src/dcql-query-result/run-dcql-query.js +0 -56
- package/dist/src/dcql-query-result/run-dcql-query.js.map +0 -1
- package/dist/src/index.d.ts +0 -6
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -27
- package/dist/src/index.js.map +0 -1
- package/dist/src/u-dcql-credential.d.ts +0 -104
- package/dist/src/u-dcql-credential.d.ts.map +0 -1
- package/dist/src/u-dcql-credential.js +0 -84
- package/dist/src/u-dcql-credential.js.map +0 -1
- package/dist/src/u-dcql.d.ts +0 -17
- package/dist/src/u-dcql.d.ts.map +0 -1
- package/dist/src/u-dcql.js +0 -98
- package/dist/src/u-dcql.js.map +0 -1
- package/dist/src/u-model.d.ts +0 -27
- package/dist/src/u-model.d.ts.map +0 -1
- package/dist/src/u-model.js +0 -65
- package/dist/src/u-model.js.map +0 -1
@@ -1,132 +0,0 @@
|
|
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.DcqlPresentationResult = void 0;
|
27
|
-
const v = __importStar(require("valibot"));
|
28
|
-
const e_dcql_js_1 = require("../dcql-error/e-dcql.js");
|
29
|
-
const dcql_credential_query_result_js_1 = require("../dcql-parser/dcql-credential-query-result.js");
|
30
|
-
const m_dcql_query_result_js_1 = require("../dcql-query-result/m-dcql-query-result.js");
|
31
|
-
const u_dcql_credential_js_1 = require("../u-dcql-credential.js");
|
32
|
-
const u_dcql_js_1 = require("../u-dcql.js");
|
33
|
-
var DcqlPresentationResult;
|
34
|
-
(function (DcqlPresentationResult) {
|
35
|
-
DcqlPresentationResult.vModel = v.object({
|
36
|
-
...v.omit(m_dcql_query_result_js_1.DcqlQueryResult.vModel, ['credential_matches']).entries,
|
37
|
-
invalid_matches: v.union([
|
38
|
-
v.record(v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)), v.object({
|
39
|
-
...v.omit(u_dcql_credential_js_1.DcqlCredential.vParseFailure, ['input_credential_index'])
|
40
|
-
.entries,
|
41
|
-
presentation_id: v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)),
|
42
|
-
})),
|
43
|
-
v.undefined(),
|
44
|
-
]),
|
45
|
-
valid_matches: v.record(v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)), v.object({
|
46
|
-
...v.omit(u_dcql_credential_js_1.DcqlCredential.vParseSuccess, [
|
47
|
-
'issues',
|
48
|
-
'input_credential_index',
|
49
|
-
]).entries,
|
50
|
-
presentation_id: v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)),
|
51
|
-
})),
|
52
|
-
});
|
53
|
-
DcqlPresentationResult.parse = (input) => {
|
54
|
-
return v.parse(DcqlPresentationResult.vModel, input);
|
55
|
-
};
|
56
|
-
/**
|
57
|
-
* Query if the presentation record can be satisfied by the provided presentations
|
58
|
-
* considering the dcql query
|
59
|
-
*
|
60
|
-
* @param dcqlQuery
|
61
|
-
* @param dcqlPresentation
|
62
|
-
*/
|
63
|
-
DcqlPresentationResult.fromDcqlPresentation = (dcqlPresentation, ctx) => {
|
64
|
-
const { dcqlQuery } = ctx;
|
65
|
-
const presentationQueriesResults = Object.fromEntries(Object.entries(dcqlPresentation).map(([queryId, presentation]) => {
|
66
|
-
const credentialQuery = dcqlQuery.credentials.find(c => c.id === queryId);
|
67
|
-
if (!credentialQuery) {
|
68
|
-
throw new e_dcql_js_1.DcqlPresentationResultError({
|
69
|
-
message: `Query ${queryId} not found in the dcql query. Cannot validate presentation.`,
|
70
|
-
});
|
71
|
-
}
|
72
|
-
return [
|
73
|
-
queryId,
|
74
|
-
(0, dcql_credential_query_result_js_1.runCredentialQuery)(credentialQuery, {
|
75
|
-
presentation: true,
|
76
|
-
credentials: [presentation],
|
77
|
-
}),
|
78
|
-
];
|
79
|
-
}));
|
80
|
-
let invalidMatches = undefined;
|
81
|
-
const validMatches = {};
|
82
|
-
for (const [queryId, presentationQueryResult] of Object.entries(presentationQueriesResults)) {
|
83
|
-
for (const presentationQueryResultForClaimSet of presentationQueryResult) {
|
84
|
-
const result =
|
85
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
86
|
-
presentationQueryResultForClaimSet[0];
|
87
|
-
if (result.success) {
|
88
|
-
const { issues, input_credential_index, ...rest } = result;
|
89
|
-
validMatches[queryId] = { ...rest, presentation_id: queryId };
|
90
|
-
}
|
91
|
-
else {
|
92
|
-
if (!invalidMatches)
|
93
|
-
invalidMatches = {};
|
94
|
-
const { input_credential_index, ...rest } = result;
|
95
|
-
invalidMatches[queryId] = {
|
96
|
-
...rest,
|
97
|
-
presentation_id: queryId,
|
98
|
-
};
|
99
|
-
}
|
100
|
-
}
|
101
|
-
}
|
102
|
-
const credentialSetResults = dcqlQuery.credential_sets?.map(set => {
|
103
|
-
const matchingOptions = set.options.filter(option => option.every(credentialQueryId => validMatches[credentialQueryId]?.success));
|
104
|
-
return {
|
105
|
-
...set,
|
106
|
-
matching_options: matchingOptions.length > 0
|
107
|
-
? matchingOptions
|
108
|
-
: undefined,
|
109
|
-
};
|
110
|
-
});
|
111
|
-
const dqclQueryMatched = credentialSetResults
|
112
|
-
? credentialSetResults.every(set => !set.required || set.matching_options)
|
113
|
-
: !invalidMatches;
|
114
|
-
return {
|
115
|
-
...dcqlQuery,
|
116
|
-
canBeSatisfied: dqclQueryMatched,
|
117
|
-
valid_matches: validMatches,
|
118
|
-
invalid_matches: invalidMatches,
|
119
|
-
credential_sets: credentialSetResults,
|
120
|
-
};
|
121
|
-
};
|
122
|
-
DcqlPresentationResult.validate = (dcqlQueryResult) => {
|
123
|
-
if (!dcqlQueryResult.canBeSatisfied) {
|
124
|
-
throw new e_dcql_js_1.DcqlInvalidPresentationRecordError({
|
125
|
-
message: 'Invalid Presentation record',
|
126
|
-
cause: dcqlQueryResult,
|
127
|
-
});
|
128
|
-
}
|
129
|
-
return dcqlQueryResult;
|
130
|
-
};
|
131
|
-
})(DcqlPresentationResult || (exports.DcqlPresentationResult = DcqlPresentationResult = {}));
|
132
|
-
//# sourceMappingURL=m-dcql-presentation-result.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"m-dcql-presentation-result.js","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-presentation-result.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAE7B,uDAGiC;AACjC,oGAAoF;AACpF,wFAA8E;AAE9E,kEAAyD;AACzD,4CAAuC;AAGvC,IAAiB,sBAAsB,CAoItC;AApID,WAAiB,sBAAsB;IACxB,6BAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QAC7B,GAAG,CAAC,CAAC,IAAI,CAAC,wCAAe,CAAC,MAAM,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC,OAAO;QAEjE,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC;YACvB,CAAC,CAAC,MAAM,CACN,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAO,CAAC,CAAC,EACpC,CAAC,CAAC,MAAM,CAAC;gBACP,GAAG,CAAC,CAAC,IAAI,CAA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AAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAClD,MAAM,CAAC,KAAK,CACV,iBAAiB,CAAC,EAAE,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAC9D,CACF,CAAC;YAEF,OAAO;gBACL,GAAG,GAAG;gBACN,gBAAgB,EACd,eAAe,CAAC,MAAM,GAAG,CAAC;oBACxB,CAAC,CAAE,eAA6C;oBAChD,CAAC,CAAC,SAAS;aAChB,CAAC;QACJ,CAAC,CAA8C,CAAC;QAEhD,MAAM,gBAAgB,GAAG,oBAAoB;YAC3C,CAAC,CAAC,oBAAoB,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,gBAAgB,CAAC;YAC1E,CAAC,CAAC,CAAC,cAAc,CAAC;QAEpB,OAAO;YACL,GAAG,SAAS;YACZ,cAAc,EAAE,gBAAgB;YAChC,aAAa,EAAE,YAAY;YAC3B,eAAe,EAAE,cAAc;YAC/B,eAAe,EAAE,oBAAoB;SACtC,CAAC;IACJ,CAAC,CAAC;IAEW,+BAAQ,GAAG,CAAC,eAAuC,EAAE,EAAE;QAClE,IAAI,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC;YACpC,MAAM,IAAI,8CAAkC,CAAC;gBAC3C,OAAO,EAAE,6BAA6B;gBACtC,KAAK,EAAE,eAAe;aACvB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,eAAgC,CAAC;IAC1C,CAAC,CAAC;AACJ,CAAC,EApIgB,sBAAsB,sCAAtB,sBAAsB,QAoItC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import * as v from 'valibot';
|
2
|
-
export declare namespace DcqlPresentation {
|
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<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>], undefined>, undefined>;
|
4
|
-
type Input = v.InferInput<typeof vModel>;
|
5
|
-
type Output = v.InferOutput<typeof vModel>;
|
6
|
-
const parse: (input: Input | string) => {
|
7
|
-
[x: string]: string | {
|
8
|
-
[x: string]: import("../u-dcql.js").Json;
|
9
|
-
};
|
10
|
-
};
|
11
|
-
const encode: (input: Output) => string;
|
12
|
-
}
|
13
|
-
export type DcqlPresentation = DcqlPresentation.Output;
|
14
|
-
//# sourceMappingURL=m-dcql-presentation.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"m-dcql-presentation.d.ts","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,MAAM,0TAGlB,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;CACH;AACD,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC"}
|
@@ -1,42 +0,0 @@
|
|
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.DcqlPresentation = void 0;
|
27
|
-
const v = __importStar(require("valibot"));
|
28
|
-
const u_dcql_js_1 = require("../u-dcql.js");
|
29
|
-
var DcqlPresentation;
|
30
|
-
(function (DcqlPresentation) {
|
31
|
-
DcqlPresentation.vModel = v.record(v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)), v.union([v.string(), u_dcql_js_1.vJsonRecord]));
|
32
|
-
DcqlPresentation.parse = (input) => {
|
33
|
-
if (typeof input === 'string') {
|
34
|
-
return v.parse(v.pipe(v.string(), u_dcql_js_1.vStringToJson, DcqlPresentation.vModel), input);
|
35
|
-
}
|
36
|
-
return v.parse(DcqlPresentation.vModel, input);
|
37
|
-
};
|
38
|
-
DcqlPresentation.encode = (input) => {
|
39
|
-
return JSON.stringify(input);
|
40
|
-
};
|
41
|
-
})(DcqlPresentation || (exports.DcqlPresentation = DcqlPresentation = {}));
|
42
|
-
//# sourceMappingURL=m-dcql-presentation.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"m-dcql-presentation.js","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-presentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,4CAAmE;AAEnE,IAAiB,gBAAgB,CAmBhC;AAnBD,WAAiB,gBAAgB;IAClB,uBAAM,GAAG,CAAC,CAAC,MAAM,CAC5B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAO,CAAC,CAAC,EACpC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAW,CAAC,CAAC,CACnC,CAAC;IAIW,sBAAK,GAAG,CAAC,KAAqB,EAAE,EAAE;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,yBAAa,EAAE,iBAAA,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;QACnE,CAAC;QAED,OAAO,CAAC,CAAC,KAAK,CAAC,iBAAA,MAAM,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC,CAAC;IAEW,uBAAM,GAAG,CAAC,KAAa,EAAE,EAAE;QACtC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC,CAAC;AACJ,CAAC,EAnBgB,gBAAgB,gCAAhB,gBAAgB,QAmBhC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"dcql-query-complex.test.d.ts","sourceRoot":"","sources":["../../../src/dcql-query/dcql-query-complex.test.ts"],"names":[],"mappings":""}
|