@nmshd/runtime 1.2.1 → 1.2.5
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/Runtime.js +0 -3
- package/dist/Runtime.js.map +1 -1
- package/dist/buildInformation.js +5 -5
- package/dist/dataViews/DataViewExpander.d.ts +26 -20
- package/dist/dataViews/DataViewExpander.js +259 -147
- package/dist/dataViews/DataViewExpander.js.map +1 -1
- package/dist/dataViews/DataViewTranslateable.d.ts +4 -0
- package/dist/dataViews/DataViewTranslateable.js +5 -1
- package/dist/dataViews/DataViewTranslateable.js.map +1 -1
- package/dist/dataViews/consumption/MatchedAttributesDVO.d.ts +7 -0
- package/dist/dataViews/consumption/MatchedAttributesDVO.js +3 -0
- package/dist/dataViews/consumption/MatchedAttributesDVO.js.map +1 -0
- package/dist/dataViews/consumption/StoredAttributeDVO.d.ts +5 -0
- package/dist/dataViews/consumption/StoredAttributeDVO.js +3 -0
- package/dist/dataViews/consumption/StoredAttributeDVO.js.map +1 -0
- package/dist/dataViews/consumption/index.d.ts +1 -5
- package/dist/dataViews/consumption/index.js +1 -5
- package/dist/dataViews/consumption/index.js.map +1 -1
- package/dist/dataViews/content/AttributeDVO.d.ts +16 -0
- package/dist/dataViews/{consumption → content}/AttributeDVO.js +0 -0
- package/dist/dataViews/content/AttributeDVO.js.map +1 -0
- package/dist/dataViews/content/MailDVOs.d.ts +22 -0
- package/dist/dataViews/{consumption/MailDVO.js → content/MailDVOs.js} +1 -1
- package/dist/dataViews/content/MailDVOs.js.map +1 -0
- package/dist/dataViews/content/RequestDVOs.d.ts +44 -0
- package/dist/dataViews/{consumption/RequestMailDVO.js → content/RequestDVOs.js} +1 -1
- package/dist/dataViews/content/RequestDVOs.js.map +1 -0
- package/dist/dataViews/content/index.d.ts +3 -0
- package/dist/dataViews/content/index.js +16 -0
- package/dist/dataViews/content/index.js.map +1 -0
- package/dist/dataViews/index.d.ts +1 -0
- package/dist/dataViews/index.js +1 -0
- package/dist/dataViews/index.js.map +1 -1
- package/dist/dataViews/transport/FileDVO.d.ts +15 -5
- package/dist/dataViews/transport/IdentityDVO.d.ts +8 -20
- package/dist/dataViews/transport/MessageDVO.d.ts +13 -9
- package/dist/dataViews/transport/MessageDVO.js +1 -1
- package/dist/dataViews/transport/MessageDVO.js.map +1 -1
- package/dist/dataViews/transport/RelationshipDVO.d.ts +12 -2
- package/dist/dataViews/transport/RelationshipTemplateDVO.d.ts +7 -5
- package/dist/extensibility/facades/consumption/AttributesFacade.d.ts +4 -4
- package/dist/extensibility/facades/consumption/AttributesFacade.js +5 -5
- package/dist/extensibility/facades/consumption/AttributesFacade.js.map +1 -1
- package/dist/types/transport/IdentityDTO.d.ts +0 -4
- package/dist/types/transport/RecipientDTO.d.ts +2 -0
- package/dist/types/transport/RelationshipDTO.d.ts +2 -0
- package/dist/types/transport/RelationshipDTO.js.map +1 -1
- package/dist/useCases/common/SchemaRepository.d.ts +5 -4
- package/dist/useCases/common/SchemaRepository.js +11 -9
- package/dist/useCases/common/SchemaRepository.js.map +1 -1
- package/dist/useCases/common/Schemas.d.ts +78 -1602
- package/dist/useCases/common/Schemas.js +172 -57
- package/dist/useCases/common/Schemas.js.map +1 -1
- package/dist/useCases/common/UseCase.d.ts +1 -4
- package/dist/useCases/common/UseCase.js.map +1 -1
- package/dist/useCases/common/index.d.ts +2 -0
- package/dist/useCases/common/index.js +2 -0
- package/dist/useCases/common/index.js.map +1 -1
- package/dist/useCases/common/validation/IValidator.d.ts +4 -0
- package/dist/{dataViews/consumption/RequestDVO.js → useCases/common/validation/IValidator.js} +1 -1
- package/dist/useCases/common/validation/IValidator.js.map +1 -0
- package/dist/useCases/common/validation/SchemaValidator.d.ts +10 -0
- package/dist/useCases/common/{SchemaValidator.js → validation/SchemaValidator.js} +6 -3
- package/dist/useCases/common/validation/SchemaValidator.js.map +1 -0
- package/dist/useCases/consumption/attributes/AttributeMapper.d.ts +2 -2
- package/dist/useCases/consumption/attributes/AttributeMapper.js +3 -3
- package/dist/useCases/consumption/attributes/AttributeMapper.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetAttributesByNames.d.ts +16 -0
- package/dist/useCases/consumption/attributes/{GetAttributesByName.js → GetAttributesByNames.js} +9 -9
- package/dist/useCases/consumption/attributes/GetAttributesByNames.js.map +1 -0
- package/dist/useCases/consumption/attributes/index.d.ts +1 -1
- package/dist/useCases/consumption/attributes/index.js +1 -1
- package/dist/useCases/consumption/attributes/index.js.map +1 -1
- package/dist/useCases/transport/devices/DeviceMapper.js +2 -10
- package/dist/useCases/transport/devices/DeviceMapper.js.map +1 -1
- package/dist/useCases/transport/files/CreateTokenForFile.d.ts +1 -3
- package/dist/useCases/transport/files/CreateTokenForFile.js +2 -4
- package/dist/useCases/transport/files/CreateTokenForFile.js.map +1 -1
- package/dist/useCases/transport/files/CreateTokenQrCodeForFile.d.ts +1 -3
- package/dist/useCases/transport/files/CreateTokenQrCodeForFile.js +2 -4
- package/dist/useCases/transport/files/CreateTokenQrCodeForFile.js.map +1 -1
- package/dist/useCases/transport/files/DownloadFile.d.ts +1 -3
- package/dist/useCases/transport/files/DownloadFile.js +2 -4
- package/dist/useCases/transport/files/DownloadFile.js.map +1 -1
- package/dist/useCases/transport/files/GetFile.d.ts +1 -3
- package/dist/useCases/transport/files/GetFile.js +2 -4
- package/dist/useCases/transport/files/GetFile.js.map +1 -1
- package/dist/useCases/transport/files/LoadPeerFile.d.ts +24 -13
- package/dist/useCases/transport/files/LoadPeerFile.js +36 -37
- package/dist/useCases/transport/files/LoadPeerFile.js.map +1 -1
- package/dist/useCases/transport/messages/MessageMapper.js +5 -2
- package/dist/useCases/transport/messages/MessageMapper.js.map +1 -1
- package/dist/useCases/transport/relationships/RelationshipMapper.js +5 -0
- package/dist/useCases/transport/relationships/RelationshipMapper.js.map +1 -1
- package/lib-web/nmshd.runtime.js +928 -398
- package/lib-web/nmshd.runtime.js.map +1 -1
- package/lib-web/nmshd.runtime.min.js +2 -2
- package/lib-web/nmshd.runtime.min.js.map +1 -1
- package/package.json +23 -23
- package/dist/dataViews/consumption/AttributeDVO.d.ts +0 -18
- package/dist/dataViews/consumption/AttributeDVO.js.map +0 -1
- package/dist/dataViews/consumption/AttributesChangeRequestDVO.d.ts +0 -11
- package/dist/dataViews/consumption/AttributesChangeRequestDVO.js +0 -3
- package/dist/dataViews/consumption/AttributesChangeRequestDVO.js.map +0 -1
- package/dist/dataViews/consumption/AttributesShareRequestDVO.d.ts +0 -12
- package/dist/dataViews/consumption/AttributesShareRequestDVO.js +0 -3
- package/dist/dataViews/consumption/AttributesShareRequestDVO.js.map +0 -1
- package/dist/dataViews/consumption/MailDVO.d.ts +0 -7
- package/dist/dataViews/consumption/MailDVO.js.map +0 -1
- package/dist/dataViews/consumption/RequestDVO.d.ts +0 -7
- package/dist/dataViews/consumption/RequestDVO.js.map +0 -1
- package/dist/dataViews/consumption/RequestMailDVO.d.ts +0 -10
- package/dist/dataViews/consumption/RequestMailDVO.js.map +0 -1
- package/dist/useCases/common/SchemaValidator.d.ts +0 -9
- package/dist/useCases/common/SchemaValidator.js.map +0 -1
- package/dist/useCases/consumption/attributes/GetAttributesByName.d.ts +0 -16
- package/dist/useCases/consumption/attributes/GetAttributesByName.js.map +0 -1
|
@@ -4,7 +4,7 @@ exports.DataViewTranslateable = void 0;
|
|
|
4
4
|
class DataViewTranslateable {
|
|
5
5
|
}
|
|
6
6
|
exports.DataViewTranslateable = DataViewTranslateable;
|
|
7
|
-
DataViewTranslateable.prefix = "i18n://";
|
|
7
|
+
DataViewTranslateable.prefix = "i18n://dvo.";
|
|
8
8
|
DataViewTranslateable.transport = {
|
|
9
9
|
messageName: `${DataViewTranslateable.prefix}message.name`,
|
|
10
10
|
relationshipOutgoing: `${DataViewTranslateable.prefix}relationship.name`,
|
|
@@ -15,6 +15,10 @@ DataViewTranslateable.transport = {
|
|
|
15
15
|
fileName: `${DataViewTranslateable.prefix}file.name`
|
|
16
16
|
};
|
|
17
17
|
DataViewTranslateable.consumption = {
|
|
18
|
+
mails: {
|
|
19
|
+
mailSubjectFallback: `${DataViewTranslateable.prefix}mails.mailSubjectFallback`,
|
|
20
|
+
requestMailSubjectFallback: `${DataViewTranslateable.prefix}mails.requestMailSubjectFallback`
|
|
21
|
+
},
|
|
18
22
|
attributes: {
|
|
19
23
|
unknownAttributeName: `${DataViewTranslateable.prefix}attributes.UnknownAttributeName`
|
|
20
24
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewTranslateable.js","sourceRoot":"","sources":["../../src/dataViews/DataViewTranslateable.ts"],"names":[],"mappings":";;;AAAA,MAAa,qBAAqB;;AAAlC,
|
|
1
|
+
{"version":3,"file":"DataViewTranslateable.js","sourceRoot":"","sources":["../../src/dataViews/DataViewTranslateable.ts"],"names":[],"mappings":";;;AAAA,MAAa,qBAAqB;;AAAlC,sDAsCC;AArC0B,4BAAM,GAAW,aAAa,CAAC;AAC/B,+BAAS,GAAG;IAC/B,WAAW,EAAE,GAAG,qBAAqB,CAAC,MAAM,cAAc;IAC1D,oBAAoB,EAAE,GAAG,qBAAqB,CAAC,MAAM,mBAAmB;IACxE,oBAAoB,EAAE,GAAG,qBAAqB,CAAC,MAAM,uBAAuB;IAC5E,oBAAoB,EAAE,GAAG,qBAAqB,CAAC,MAAM,uBAAuB;IAC5E,mBAAmB,EAAE,GAAG,qBAAqB,CAAC,MAAM,sBAAsB;IAC1E,kBAAkB,EAAE,GAAG,qBAAqB,CAAC,MAAM,qBAAqB;IACxE,QAAQ,EAAE,GAAG,qBAAqB,CAAC,MAAM,WAAW;CACvD,CAAC;AAEqB,iCAAW,GAAG;IACjC,KAAK,EAAE;QACH,mBAAmB,EAAE,GAAG,qBAAqB,CAAC,MAAM,2BAA2B;QAC/E,0BAA0B,EAAE,GAAG,qBAAqB,CAAC,MAAM,kCAAkC;KAChG;IACD,UAAU,EAAE;QACR,oBAAoB,EAAE,GAAG,qBAAqB,CAAC,MAAM,iCAAiC;KACzF;IACD,QAAQ,EAAE;QACN,mCAAmC;QACnC,0BAA0B,EAAE,GAAG,qBAAqB,CAAC,MAAM,sCAAsC;QACjG,0CAA0C;QAC1C,gCAAgC,EAAE,GAAG,qBAAqB,CAAC,MAAM,4CAA4C;QAC7G,yEAAyE;QACzE,oCAAoC,EAAE,GAAG,qBAAqB,CAAC,MAAM,gDAAgD;QACrH,gDAAgD;QAChD,uCAAuC,EAAE,GAAG,qBAAqB,CAAC,MAAM,mDAAmD;QAC3H,oCAAoC;QACpC,2BAA2B,EAAE,GAAG,qBAAqB,CAAC,MAAM,uCAAuC;QACnG,2CAA2C;QAC3C,iCAAiC,EAAE,GAAG,qBAAqB,CAAC,MAAM,6CAA6C;KAClH;IACD,UAAU,EAAE;QACR,IAAI,EAAE,GAAG,qBAAqB,CAAC,MAAM,sBAAsB;KAC9D;CACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataViewObject } from "../DataViewObject";
|
|
2
|
+
import { StoredAttributeDVO } from "./StoredAttributeDVO";
|
|
3
|
+
export interface MatchedAttributesDVO extends DataViewObject {
|
|
4
|
+
type: "MatchedAttributesDVO";
|
|
5
|
+
matches: StoredAttributeDVO[];
|
|
6
|
+
bestMatch?: StoredAttributeDVO;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MatchedAttributesDVO.js","sourceRoot":"","sources":["../../../src/dataViews/consumption/MatchedAttributesDVO.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoredAttributeDVO.js","sourceRoot":"","sources":["../../../src/dataViews/consumption/StoredAttributeDVO.ts"],"names":[],"mappings":""}
|
|
@@ -10,9 +10,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
14
|
-
__exportStar(require("./AttributesChangeRequestDVO"), exports);
|
|
15
|
-
__exportStar(require("./AttributesShareRequestDVO"), exports);
|
|
16
|
-
__exportStar(require("./MailDVO"), exports);
|
|
17
|
-
__exportStar(require("./RequestDVO"), exports);
|
|
13
|
+
__exportStar(require("./MatchedAttributesDVO"), exports);
|
|
18
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dataViews/consumption/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dataViews/consumption/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAuC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DataViewObject } from "../DataViewObject";
|
|
2
|
+
export interface AttributeMetadata {
|
|
3
|
+
key?: string;
|
|
4
|
+
tags?: string[];
|
|
5
|
+
validFrom?: string;
|
|
6
|
+
validTo?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
dataType?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AttributeDVOInternal extends DataViewObject {
|
|
11
|
+
value?: any;
|
|
12
|
+
isOwn: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface AttributeDVO extends AttributeDVOInternal {
|
|
15
|
+
type: "AttributeDVO";
|
|
16
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttributeDVO.js","sourceRoot":"","sources":["../../../src/dataViews/content/AttributeDVO.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IdentityDVO } from "../transport/IdentityDVO";
|
|
2
|
+
import { MessageDVOInternal } from "../transport/MessageDVO";
|
|
3
|
+
import { RequestDVO } from "./RequestDVOs";
|
|
4
|
+
interface RequestMailDVOInternal extends MailDVOInternal {
|
|
5
|
+
requests: RequestDVO[];
|
|
6
|
+
requestCount: number;
|
|
7
|
+
}
|
|
8
|
+
export interface RequestMailDVO extends RequestMailDVOInternal {
|
|
9
|
+
type: "RequestMailDVO";
|
|
10
|
+
}
|
|
11
|
+
interface MailDVOInternal extends MessageDVOInternal {
|
|
12
|
+
to: IdentityDVO[];
|
|
13
|
+
cc: IdentityDVO[];
|
|
14
|
+
subject: string;
|
|
15
|
+
body: string;
|
|
16
|
+
toCount: number;
|
|
17
|
+
ccCount: number;
|
|
18
|
+
}
|
|
19
|
+
export interface MailDVO extends MailDVOInternal {
|
|
20
|
+
type: "MailDVO";
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MailDVOs.js","sourceRoot":"","sources":["../../../src/dataViews/content/MailDVOs.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { MatchedAttributesDVO } from "..";
|
|
2
|
+
import { DataViewObject } from "../DataViewObject";
|
|
3
|
+
import { IdentityDVO } from "../transport/IdentityDVO";
|
|
4
|
+
import { AttributeDVO } from "./AttributeDVO";
|
|
5
|
+
export interface RequestDVO extends DataViewObject {
|
|
6
|
+
key?: string;
|
|
7
|
+
reason?: string;
|
|
8
|
+
expiresAt?: string;
|
|
9
|
+
impact?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AttributesShareRequestDVO extends RequestDVO {
|
|
12
|
+
type: "AttributesShareRequestDVO";
|
|
13
|
+
attributes: MatchedAttributesDVO[];
|
|
14
|
+
recipients: IdentityDVO[];
|
|
15
|
+
attributeCount: number;
|
|
16
|
+
recipientCount: number;
|
|
17
|
+
possibleRecipientCount: number;
|
|
18
|
+
}
|
|
19
|
+
export interface AttributesChangeRequestDVO extends RequestDVO {
|
|
20
|
+
type: "AttributesChangeRequestDVO";
|
|
21
|
+
oldAttributes: MatchedAttributesDVO[];
|
|
22
|
+
newAttributes: AttributeDVO[];
|
|
23
|
+
applyTo?: IdentityDVO;
|
|
24
|
+
}
|
|
25
|
+
export interface AttributesRequestDVO extends RequestDVO {
|
|
26
|
+
type: "AttributesRequestDVO";
|
|
27
|
+
names: string[];
|
|
28
|
+
required?: boolean;
|
|
29
|
+
attributes: MatchedAttributesDVO[];
|
|
30
|
+
}
|
|
31
|
+
export interface AuthorizationGrantRequestDVO extends RequestDVO {
|
|
32
|
+
type: "AuthorizationGrantRequestDVO";
|
|
33
|
+
authorizationCode: string;
|
|
34
|
+
authorizationDescription?: string;
|
|
35
|
+
authorizationTitle: string;
|
|
36
|
+
authorizationExpiresAt?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ChallengeRequestDVO extends RequestDVO {
|
|
39
|
+
type: "ChallengeRequestDVO";
|
|
40
|
+
expiresAt: string;
|
|
41
|
+
createdBy?: IdentityDVO;
|
|
42
|
+
createdByDevice?: string;
|
|
43
|
+
challengeType: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestDVOs.js","sourceRoot":"","sources":["../../../src/dataViews/content/RequestDVOs.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./AttributeDVO"), exports);
|
|
14
|
+
__exportStar(require("./MailDVOs"), exports);
|
|
15
|
+
__exportStar(require("./RequestDVOs"), exports);
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dataViews/content/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B;AAC/B,6CAA2B;AAC3B,gDAA8B"}
|
package/dist/dataViews/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./common"), exports);
|
|
14
14
|
__exportStar(require("./consumption"), exports);
|
|
15
|
+
__exportStar(require("./content"), exports);
|
|
15
16
|
__exportStar(require("./DataViewExpander"), exports);
|
|
16
17
|
__exportStar(require("./DataViewObject"), exports);
|
|
17
18
|
__exportStar(require("./DataViewTranslateable"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dataViews/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyB;AACzB,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,0DAAwC;AACxC,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dataViews/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyB;AACzB,gDAA8B;AAC9B,4CAA0B;AAC1B,qDAAmC;AACnC,mDAAiC;AACjC,0DAAwC;AACxC,8CAA4B"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import { FileDTO } from "../../types";
|
|
2
1
|
import { DataViewObject } from "../DataViewObject";
|
|
3
2
|
import { IdentityDVO } from "./IdentityDVO";
|
|
4
|
-
export interface FileDVOProperties extends FileDTO {
|
|
5
|
-
createdByObject: IdentityDVO;
|
|
6
|
-
}
|
|
7
3
|
export interface FileDVO extends DataViewObject {
|
|
8
|
-
|
|
4
|
+
type: "FileDVO";
|
|
5
|
+
filename: string;
|
|
6
|
+
filesize: number;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
createdBy: IdentityDVO;
|
|
9
|
+
createdByDevice: string;
|
|
10
|
+
expiresAt: string;
|
|
11
|
+
mimetype: string;
|
|
12
|
+
isOwn: boolean;
|
|
13
|
+
title: string;
|
|
14
|
+
secretKey: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
deletedAt?: string;
|
|
17
|
+
deletedBy?: IdentityDVO;
|
|
18
|
+
deletedByDevice?: string;
|
|
9
19
|
}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import { DataViewObject } from "../DataViewObject";
|
|
2
|
-
import {
|
|
3
|
-
export interface IdentityDVOProperties {
|
|
4
|
-
initials: string;
|
|
5
|
-
statusText: string;
|
|
6
|
-
}
|
|
7
|
-
export interface OrganizationProperties extends IdentityDVOProperties {
|
|
8
|
-
isOrganization: true;
|
|
9
|
-
legalName: string;
|
|
10
|
-
}
|
|
11
|
-
export interface PersonProperties extends IdentityDVOProperties {
|
|
12
|
-
isPerson: true;
|
|
13
|
-
givenName: string;
|
|
14
|
-
familyName: string;
|
|
15
|
-
salutation: string;
|
|
16
|
-
}
|
|
2
|
+
import { RelationshipDVO } from "./RelationshipDVO";
|
|
17
3
|
export interface IdentityDVO extends DataViewObject {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
isSelf:
|
|
4
|
+
type: "IdentityDVO";
|
|
5
|
+
publicKey?: string;
|
|
6
|
+
realm: string;
|
|
7
|
+
initials: string;
|
|
8
|
+
isSelf: boolean;
|
|
9
|
+
hasRelationship: boolean;
|
|
10
|
+
relationship?: RelationshipDVO;
|
|
23
11
|
}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import { MessageDTO } from "../../types";
|
|
2
1
|
import { DataViewObject } from "../DataViewObject";
|
|
3
2
|
import { FileDVO } from "./FileDVO";
|
|
4
3
|
import { IdentityDVO } from "./IdentityDVO";
|
|
5
4
|
export declare enum MessageStatus {
|
|
6
|
-
|
|
5
|
+
Received = "received",
|
|
7
6
|
Delivering = "delivering",
|
|
8
7
|
Delivered = "delivered",
|
|
9
8
|
Errorneous = "errorneous"
|
|
10
9
|
}
|
|
11
|
-
export interface
|
|
10
|
+
export interface MessageDVOInternal extends DataViewObject {
|
|
11
|
+
createdByDevice: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
createdBy: IdentityDVO;
|
|
14
|
+
recipients: RecipientDVO[];
|
|
15
|
+
attachments: FileDVO[];
|
|
12
16
|
isOwn: boolean;
|
|
13
|
-
createdByObject: IdentityDVO;
|
|
14
|
-
peerObjects: IdentityDVO[];
|
|
15
|
-
recipientObjects: IdentityDVO[];
|
|
16
17
|
recipientCount: number;
|
|
17
|
-
attachmentObjects: FileDVO[];
|
|
18
18
|
attachmentCount: number;
|
|
19
19
|
status: MessageStatus;
|
|
20
20
|
}
|
|
21
|
-
export interface MessageDVO extends
|
|
22
|
-
|
|
21
|
+
export interface MessageDVO extends MessageDVOInternal {
|
|
22
|
+
type: "MessageDVO";
|
|
23
|
+
}
|
|
24
|
+
export interface RecipientDVO extends IdentityDVO {
|
|
25
|
+
receivedAt?: string;
|
|
26
|
+
receivedByDevice?: string;
|
|
23
27
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MessageStatus = void 0;
|
|
4
4
|
var MessageStatus;
|
|
5
5
|
(function (MessageStatus) {
|
|
6
|
-
MessageStatus["
|
|
6
|
+
MessageStatus["Received"] = "received";
|
|
7
7
|
MessageStatus["Delivering"] = "delivering";
|
|
8
8
|
MessageStatus["Delivered"] = "delivered";
|
|
9
9
|
MessageStatus["Errorneous"] = "errorneous";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageDVO.js","sourceRoot":"","sources":["../../../src/dataViews/transport/MessageDVO.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"MessageDVO.js","sourceRoot":"","sources":["../../../src/dataViews/transport/MessageDVO.ts"],"names":[],"mappings":";;;AAIA,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,sCAAqB,CAAA;IACrB,0CAAyB,CAAA;IACzB,wCAAuB,CAAA;IACvB,0CAAyB,CAAA;AAC7B,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { DataViewObject } from "../DataViewObject";
|
|
2
|
+
export interface RelationshipDVO extends DataViewObject {
|
|
3
|
+
type: "RelationshipDVO";
|
|
4
|
+
status: string;
|
|
5
|
+
isPinned: boolean;
|
|
6
|
+
theme: RelationshipTheme;
|
|
7
|
+
}
|
|
8
|
+
export interface RelationshipTheme {
|
|
9
|
+
image?: string;
|
|
10
|
+
headerImage?: string;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
foregroundColor?: string;
|
|
3
13
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { RelationshipTemplateDTO } from "../../types";
|
|
2
1
|
import { DataViewObject } from "../DataViewObject";
|
|
3
2
|
import { IdentityDVO } from "./IdentityDVO";
|
|
4
|
-
export interface RelationshipTemplateDVOProperties extends RelationshipTemplateDTO {
|
|
5
|
-
createdByObject: IdentityDVO;
|
|
6
|
-
}
|
|
7
3
|
export interface RelationshipTemplateDVO extends DataViewObject {
|
|
8
|
-
|
|
4
|
+
isOwn: boolean;
|
|
5
|
+
createdBy: IdentityDVO;
|
|
6
|
+
createdByDevice: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
expiresAt?: string;
|
|
9
|
+
maxNumberOfRelationships?: number;
|
|
10
|
+
content: any;
|
|
9
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Result } from "@js-soft/ts-utils";
|
|
2
2
|
import { ConsumptionAttributeDTO } from "../../../types";
|
|
3
|
-
import { CreateAttributeRequest, CreateAttributeUseCase, DeleteAttributeByNameRequest, DeleteAttributeByNameUseCase, DeleteAttributeRequest, DeleteAttributeUseCase, GetAllValidUseCase, GetAttributeByNameRequest, GetAttributeByNameUseCase, GetAttributeRequest,
|
|
3
|
+
import { CreateAttributeRequest, CreateAttributeUseCase, DeleteAttributeByNameRequest, DeleteAttributeByNameUseCase, DeleteAttributeRequest, DeleteAttributeUseCase, GetAllValidUseCase, GetAttributeByNameRequest, GetAttributeByNameUseCase, GetAttributeRequest, GetAttributesByNamesRequest, GetAttributesByNamesResponse, GetAttributesByNamesUseCase, GetAttributesRequest, GetAttributesUseCase, GetAttributeUseCase, GetHistoryByNameRequest, GetHistoryByNameUseCase, SucceedAttributeRequest, SucceedAttributeUseCase, UpdateAttributeRequest, UpdateAttributeUseCase } from "../../../useCases";
|
|
4
4
|
export declare class AttributesFacade {
|
|
5
5
|
private readonly createAttributeUseCase;
|
|
6
6
|
private readonly deleteAttributeUseCase;
|
|
@@ -9,11 +9,11 @@ export declare class AttributesFacade {
|
|
|
9
9
|
private readonly getAttributeUseCase;
|
|
10
10
|
private readonly getAttributeByNameUseCase;
|
|
11
11
|
private readonly getAttributesUseCase;
|
|
12
|
-
private readonly
|
|
12
|
+
private readonly getAttributesByNamesUseCase;
|
|
13
13
|
private readonly getHistoryByNameUseCase;
|
|
14
14
|
private readonly succeedAttributeUseCase;
|
|
15
15
|
private readonly updateAttributeUseCase;
|
|
16
|
-
constructor(createAttributeUseCase: CreateAttributeUseCase, deleteAttributeUseCase: DeleteAttributeUseCase, deleteAttributeByNameUseCase: DeleteAttributeByNameUseCase, getAllValidUseCase: GetAllValidUseCase, getAttributeUseCase: GetAttributeUseCase, getAttributeByNameUseCase: GetAttributeByNameUseCase, getAttributesUseCase: GetAttributesUseCase,
|
|
16
|
+
constructor(createAttributeUseCase: CreateAttributeUseCase, deleteAttributeUseCase: DeleteAttributeUseCase, deleteAttributeByNameUseCase: DeleteAttributeByNameUseCase, getAllValidUseCase: GetAllValidUseCase, getAttributeUseCase: GetAttributeUseCase, getAttributeByNameUseCase: GetAttributeByNameUseCase, getAttributesUseCase: GetAttributesUseCase, getAttributesByNamesUseCase: GetAttributesByNamesUseCase, getHistoryByNameUseCase: GetHistoryByNameUseCase, succeedAttributeUseCase: SucceedAttributeUseCase, updateAttributeUseCase: UpdateAttributeUseCase);
|
|
17
17
|
createAttribute(request: CreateAttributeRequest): Promise<Result<ConsumptionAttributeDTO>>;
|
|
18
18
|
deleteAttribute(request: DeleteAttributeRequest): Promise<Result<void>>;
|
|
19
19
|
deleteAttributeByName(request: DeleteAttributeByNameRequest): Promise<Result<void>>;
|
|
@@ -21,7 +21,7 @@ export declare class AttributesFacade {
|
|
|
21
21
|
getAttribute(request: GetAttributeRequest): Promise<Result<ConsumptionAttributeDTO>>;
|
|
22
22
|
getAttributeByName(request: GetAttributeByNameRequest): Promise<Result<ConsumptionAttributeDTO>>;
|
|
23
23
|
getAttributes(request: GetAttributesRequest): Promise<Result<ConsumptionAttributeDTO[]>>;
|
|
24
|
-
|
|
24
|
+
getAttributesByNames(request: GetAttributesByNamesRequest): Promise<Result<GetAttributesByNamesResponse>>;
|
|
25
25
|
getHistoryByName(request: GetHistoryByNameRequest): Promise<Result<ConsumptionAttributeDTO[]>>;
|
|
26
26
|
succeedAttribute(request: SucceedAttributeRequest): Promise<Result<ConsumptionAttributeDTO>>;
|
|
27
27
|
updateAttribute(request: UpdateAttributeRequest): Promise<Result<ConsumptionAttributeDTO>>;
|
|
@@ -16,7 +16,7 @@ exports.AttributesFacade = void 0;
|
|
|
16
16
|
const typescript_ioc_1 = require("typescript-ioc");
|
|
17
17
|
const useCases_1 = require("../../../useCases");
|
|
18
18
|
let AttributesFacade = class AttributesFacade {
|
|
19
|
-
constructor(createAttributeUseCase, deleteAttributeUseCase, deleteAttributeByNameUseCase, getAllValidUseCase, getAttributeUseCase, getAttributeByNameUseCase, getAttributesUseCase,
|
|
19
|
+
constructor(createAttributeUseCase, deleteAttributeUseCase, deleteAttributeByNameUseCase, getAllValidUseCase, getAttributeUseCase, getAttributeByNameUseCase, getAttributesUseCase, getAttributesByNamesUseCase, getHistoryByNameUseCase, succeedAttributeUseCase, updateAttributeUseCase) {
|
|
20
20
|
this.createAttributeUseCase = createAttributeUseCase;
|
|
21
21
|
this.deleteAttributeUseCase = deleteAttributeUseCase;
|
|
22
22
|
this.deleteAttributeByNameUseCase = deleteAttributeByNameUseCase;
|
|
@@ -24,7 +24,7 @@ let AttributesFacade = class AttributesFacade {
|
|
|
24
24
|
this.getAttributeUseCase = getAttributeUseCase;
|
|
25
25
|
this.getAttributeByNameUseCase = getAttributeByNameUseCase;
|
|
26
26
|
this.getAttributesUseCase = getAttributesUseCase;
|
|
27
|
-
this.
|
|
27
|
+
this.getAttributesByNamesUseCase = getAttributesByNamesUseCase;
|
|
28
28
|
this.getHistoryByNameUseCase = getHistoryByNameUseCase;
|
|
29
29
|
this.succeedAttributeUseCase = succeedAttributeUseCase;
|
|
30
30
|
this.updateAttributeUseCase = updateAttributeUseCase;
|
|
@@ -50,8 +50,8 @@ let AttributesFacade = class AttributesFacade {
|
|
|
50
50
|
async getAttributes(request) {
|
|
51
51
|
return await this.getAttributesUseCase.execute(request);
|
|
52
52
|
}
|
|
53
|
-
async
|
|
54
|
-
return await this.
|
|
53
|
+
async getAttributesByNames(request) {
|
|
54
|
+
return await this.getAttributesByNamesUseCase.execute(request);
|
|
55
55
|
}
|
|
56
56
|
async getHistoryByName(request) {
|
|
57
57
|
return await this.getHistoryByNameUseCase.execute(request);
|
|
@@ -82,7 +82,7 @@ AttributesFacade = __decorate([
|
|
|
82
82
|
useCases_1.GetAttributeUseCase,
|
|
83
83
|
useCases_1.GetAttributeByNameUseCase,
|
|
84
84
|
useCases_1.GetAttributesUseCase,
|
|
85
|
-
useCases_1.
|
|
85
|
+
useCases_1.GetAttributesByNamesUseCase,
|
|
86
86
|
useCases_1.GetHistoryByNameUseCase,
|
|
87
87
|
useCases_1.SucceedAttributeUseCase,
|
|
88
88
|
useCases_1.UpdateAttributeUseCase])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributesFacade.js","sourceRoot":"","sources":["../../../../src/extensibility/facades/consumption/AttributesFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,mDAAwC;AAExC,gDAuB2B;AAE3B,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IACzB,YAC6B,sBAA8C,EAC9C,sBAA8C,EAC9C,4BAA0D,EAC1D,kBAAsC,EACtC,mBAAwC,EACxC,yBAAoD,EACpD,oBAA0C,EAC1C,
|
|
1
|
+
{"version":3,"file":"AttributesFacade.js","sourceRoot":"","sources":["../../../../src/extensibility/facades/consumption/AttributesFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,mDAAwC;AAExC,gDAuB2B;AAE3B,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IACzB,YAC6B,sBAA8C,EAC9C,sBAA8C,EAC9C,4BAA0D,EAC1D,kBAAsC,EACtC,mBAAwC,EACxC,yBAAoD,EACpD,oBAA0C,EAC1C,2BAAwD,EACxD,uBAAgD,EAChD,uBAAgD,EAChD,sBAA8C;QAV9C,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,iCAA4B,GAA5B,4BAA4B,CAA8B;QAC1D,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,gCAA2B,GAA3B,2BAA2B,CAA6B;QACxD,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,2BAAsB,GAAtB,sBAAsB,CAAwB;IACxE,CAAC;IAEG,KAAK,CA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K,CAAC,eAAe,CAAC,OAA+B;QACxD,OAAO,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;CACJ,CAAA;AA1DY,gBAAgB;IAEpB,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,YAAA,uBAAM,CAAA;qCAV0C,iCAAsB;QACtB,iCAAsB;QAChB,uCAA4B;QACtC,6BAAkB;QACjB,8BAAmB;QACb,oCAAyB;QAC9B,+BAAoB;QACb,sCAA2B;QAC/B,kCAAuB;QACvB,kCAAuB;QACxB,iCAAsB;GAZlE,gBAAgB,CA0D5B;AA1DY,4CAAgB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IdentityDTO } from "./IdentityDTO";
|
|
1
2
|
import { RelationshipChangeDTO } from "./RelationshipChangeDTO";
|
|
2
3
|
import { RelationshipTemplateDTO } from "./RelationshipTemplateDTO";
|
|
3
4
|
export declare enum RelationshipStatus {
|
|
@@ -13,6 +14,7 @@ export interface RelationshipDTO {
|
|
|
13
14
|
template: RelationshipTemplateDTO;
|
|
14
15
|
status: RelationshipStatus;
|
|
15
16
|
peer: string;
|
|
17
|
+
peerIdentity: IdentityDTO;
|
|
16
18
|
changes: RelationshipChangeDTO[];
|
|
17
19
|
lastMessageSentAt?: string;
|
|
18
20
|
lastMessageReceivedAt?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipDTO.js","sourceRoot":"","sources":["../../../src/types/transport/RelationshipDTO.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"RelationshipDTO.js","sourceRoot":"","sources":["../../../src/types/transport/RelationshipDTO.ts"],"names":[],"mappings":";;;AAIA,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,iDAA2B,CAAA;IAC3B,+CAAyB,CAAA;AAC7B,CAAC,EAPW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAO7B"}
|
|
@@ -10,11 +10,12 @@ export declare class SchemaRepository {
|
|
|
10
10
|
private getValidationFunction;
|
|
11
11
|
private getSchemaDefinition;
|
|
12
12
|
}
|
|
13
|
+
export interface JsonSchemaValidationResult {
|
|
14
|
+
isValid: boolean;
|
|
15
|
+
errors: null | ErrorObject[] | undefined;
|
|
16
|
+
}
|
|
13
17
|
export declare class JsonSchema {
|
|
14
18
|
private readonly validateSchema;
|
|
15
19
|
constructor(validateSchema: ValidateFunction);
|
|
16
|
-
validate(obj: any):
|
|
17
|
-
isValid: boolean;
|
|
18
|
-
errors: null | ErrorObject[] | undefined;
|
|
19
|
-
};
|
|
20
|
+
validate(obj: any): JsonSchemaValidationResult;
|
|
20
21
|
}
|
|
@@ -24,21 +24,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.JsonSchema = exports.SchemaRepository = void 0;
|
|
26
26
|
const ajv_1 = __importDefault(require("ajv"));
|
|
27
|
+
const ajv_errors_1 = __importDefault(require("ajv-errors"));
|
|
27
28
|
const ajv_formats_1 = __importDefault(require("ajv-formats"));
|
|
28
29
|
const customFormats = {
|
|
29
|
-
fileId: "FIL[A-
|
|
30
|
-
relationshipId: "REL[A-
|
|
31
|
-
messageId: "MSG[A-
|
|
32
|
-
relationshipTemplateId: "RLT[A-
|
|
33
|
-
tokenId: "TOK[A-
|
|
34
|
-
relationshipChangeId: "RCH[A-
|
|
35
|
-
deviceId: "DVC[A-
|
|
30
|
+
fileId: "FIL[A-z0-9]{17}",
|
|
31
|
+
relationshipId: "REL[A-z0-9]{17}",
|
|
32
|
+
messageId: "MSG[A-z0-9]{17}",
|
|
33
|
+
relationshipTemplateId: "RLT[A-z0-9]{17}",
|
|
34
|
+
tokenId: "TOK[A-z0-9]{17}",
|
|
35
|
+
relationshipChangeId: "RCH[A-z0-9]{17}",
|
|
36
|
+
deviceId: "DVC[A-z0-9]{17}"
|
|
36
37
|
};
|
|
37
38
|
class SchemaRepository {
|
|
38
39
|
constructor() {
|
|
39
40
|
this.jsonSchemas = new Map();
|
|
40
|
-
this.compiler = new ajv_1.default();
|
|
41
|
+
this.compiler = new ajv_1.default({ allErrors: true });
|
|
41
42
|
(0, ajv_formats_1.default)(this.compiler);
|
|
43
|
+
(0, ajv_errors_1.default)(this.compiler);
|
|
42
44
|
this.addCustomFormats();
|
|
43
45
|
}
|
|
44
46
|
addCustomFormats() {
|
|
@@ -71,7 +73,7 @@ class JsonSchema {
|
|
|
71
73
|
this.validateSchema = validateSchema;
|
|
72
74
|
}
|
|
73
75
|
validate(obj) {
|
|
74
|
-
return { isValid: this.validateSchema(obj), errors: this.validateSchema.errors };
|
|
76
|
+
return { isValid: this.validateSchema(obj), errors: this.validateSchema.errors ? [...this.validateSchema.errors] : undefined };
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
exports.JsonSchema = JsonSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaRepository.js","sourceRoot":"","sources":["../../../src/useCases/common/SchemaRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAyD;AACzD,8DAAqC;AAGrC,MAAM,aAAa,GAA2B;IAC1C,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"SchemaRepository.js","sourceRoot":"","sources":["../../../src/useCases/common/SchemaRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAyD;AACzD,4DAAmC;AACnC,8DAAqC;AA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