@nmshd/consumption 2.0.0-alpha.2 → 2.0.0-alpha.22
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/buildInformation.js +5 -5
- package/dist/consumption/ConsumptionBaseController.d.ts +1 -1
- package/dist/consumption/ConsumptionController.d.ts +9 -7
- package/dist/consumption/ConsumptionController.js +24 -15
- package/dist/consumption/ConsumptionController.js.map +1 -1
- package/dist/consumption/ConsumptionControllerName.d.ts +1 -1
- package/dist/consumption/ConsumptionControllerName.js +1 -1
- package/dist/consumption/ConsumptionControllerName.js.map +1 -1
- package/dist/consumption/ConsumptionErrors.d.ts +5 -2
- package/dist/consumption/ConsumptionErrors.js +12 -3
- package/dist/consumption/ConsumptionErrors.js.map +1 -1
- package/dist/consumption/ConsumptionIds.d.ts +2 -5
- package/dist/consumption/ConsumptionIds.js +4 -7
- package/dist/consumption/ConsumptionIds.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/attributes/LocalAttributesController.d.ts +30 -0
- package/dist/modules/attributes/LocalAttributesController.js +175 -0
- package/dist/modules/attributes/LocalAttributesController.js.map +1 -0
- package/dist/modules/attributes/local/CreateLocalAttributeParams.d.ts +12 -0
- package/dist/modules/attributes/local/CreateLocalAttributeParams.js +26 -0
- package/dist/modules/attributes/local/CreateLocalAttributeParams.js.map +1 -0
- package/dist/modules/attributes/local/CreatePeerLocalAttributeParams.d.ts +22 -0
- package/dist/modules/{signatures/SignatureContent.js → attributes/local/CreatePeerLocalAttributeParams.js} +15 -32
- package/dist/modules/attributes/local/CreatePeerLocalAttributeParams.js.map +1 -0
- package/dist/modules/attributes/local/CreateRelationshipAttributeParams.d.ts +14 -0
- package/dist/modules/attributes/local/CreateRelationshipAttributeParams.js +40 -0
- package/dist/modules/attributes/local/CreateRelationshipAttributeParams.js.map +1 -0
- package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts +18 -0
- package/dist/modules/{relationships/local/RelationshipAttribute.js → attributes/local/CreateSharedLocalAttributeCopyParams.js} +13 -17
- package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.js.map +1 -0
- package/dist/modules/attributes/local/GetIdentityAttributesParams.d.ts +12 -0
- package/dist/modules/attributes/local/GetIdentityAttributesParams.js +26 -0
- package/dist/modules/attributes/local/GetIdentityAttributesParams.js.map +1 -0
- package/dist/modules/attributes/local/GetRelationshipAttributesParams.d.ts +12 -0
- package/dist/modules/attributes/local/GetRelationshipAttributesParams.js +26 -0
- package/dist/modules/attributes/local/GetRelationshipAttributesParams.js.map +1 -0
- package/dist/modules/attributes/local/LocalAttribute.d.ts +28 -0
- package/dist/modules/attributes/local/{ConsumptionAttribute.js → LocalAttribute.js} +29 -23
- package/dist/modules/attributes/local/LocalAttribute.js.map +1 -0
- package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts +17 -0
- package/dist/modules/attributes/local/LocalAttributeShareInfo.js +36 -0
- package/dist/modules/attributes/local/LocalAttributeShareInfo.js.map +1 -0
- package/dist/modules/attributes/local/QueryTranslator.d.ts +3 -0
- package/dist/modules/attributes/local/QueryTranslator.js +114 -0
- package/dist/modules/attributes/local/QueryTranslator.js.map +1 -0
- package/dist/modules/attributes/local/SucceedLocalAttributeParams.d.ts +16 -0
- package/dist/modules/attributes/local/SucceedLocalAttributeParams.js +32 -0
- package/dist/modules/attributes/local/SucceedLocalAttributeParams.js.map +1 -0
- package/dist/modules/attributes/local/UpdateLocalAttributeParams.d.ts +16 -0
- package/dist/modules/attributes/local/UpdateLocalAttributeParams.js +32 -0
- package/dist/modules/attributes/local/UpdateLocalAttributeParams.js.map +1 -0
- package/dist/modules/drafts/DraftsController.d.ts +1 -1
- package/dist/modules/drafts/DraftsController.js.map +1 -1
- package/dist/modules/index.d.ts +27 -16
- package/dist/modules/index.js +27 -16
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/requests/incoming/DecideRequestParametersValidator.d.ts +7 -3
- package/dist/modules/requests/incoming/DecideRequestParametersValidator.js +55 -1
- package/dist/modules/requests/incoming/DecideRequestParametersValidator.js.map +1 -1
- package/dist/modules/requests/incoming/IncomingRequestsController.d.ts +17 -18
- package/dist/modules/requests/incoming/IncomingRequestsController.js +81 -77
- package/dist/modules/requests/incoming/IncomingRequestsController.js.map +1 -1
- package/dist/modules/requests/incoming/decide/AcceptRequestItemParameters.d.ts +2 -6
- package/dist/modules/requests/incoming/decide/AcceptRequestItemParameters.js +0 -18
- package/dist/modules/requests/incoming/decide/AcceptRequestItemParameters.js.map +1 -1
- package/dist/modules/requests/incoming/decide/DecideRequestItemGroupParameters.d.ts +4 -8
- package/dist/modules/requests/incoming/decide/DecideRequestItemGroupParameters.js +5 -25
- package/dist/modules/requests/incoming/decide/DecideRequestItemGroupParameters.js.map +1 -1
- package/dist/modules/requests/incoming/decide/DecideRequestItemParameters.d.ts +4 -5
- package/dist/modules/requests/incoming/decide/DecideRequestItemParameters.js +4 -4
- package/dist/modules/requests/incoming/decide/DecideRequestItemParameters.js.map +1 -1
- package/dist/modules/requests/incoming/decide/DecideRequestParameters.d.ts +5 -11
- package/dist/modules/requests/incoming/decide/DecideRequestParameters.js +0 -27
- package/dist/modules/requests/incoming/decide/DecideRequestParameters.js.map +1 -1
- package/dist/modules/requests/incoming/decide/InternalDecideRequestParameters.d.ts +15 -0
- package/dist/modules/{relationships/local/RelationshipTheme.js → requests/incoming/decide/InternalDecideRequestParameters.js} +16 -20
- package/dist/modules/requests/incoming/decide/InternalDecideRequestParameters.js.map +1 -0
- package/dist/modules/requests/incoming/decide/RejectRequestItemParameters.d.ts +2 -8
- package/dist/modules/requests/incoming/decide/RejectRequestItemParameters.js +0 -31
- package/dist/modules/requests/incoming/decide/RejectRequestItemParameters.js.map +1 -1
- package/dist/modules/requests/itemProcessors/AbstractRequestItemProcessor.d.ts +21 -0
- package/dist/modules/requests/itemProcessors/AbstractRequestItemProcessor.js +12 -0
- package/dist/modules/requests/itemProcessors/AbstractRequestItemProcessor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.d.ts +15 -13
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.js +11 -9
- package/dist/modules/requests/itemProcessors/GenericRequestItemProcessor.js.map +1 -1
- package/dist/modules/requests/itemProcessors/IRequestItemProcessor.d.ts +17 -12
- package/dist/modules/requests/itemProcessors/ProcessorConstructor.d.ts +3 -0
- package/dist/modules/requests/itemProcessors/ProcessorConstructor.js +3 -0
- package/dist/modules/requests/itemProcessors/ProcessorConstructor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/RequestItemConstructor.d.ts +2 -0
- package/dist/modules/requests/itemProcessors/RequestItemConstructor.js +3 -0
- package/dist/modules/requests/itemProcessors/RequestItemConstructor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/RequestItemProcessorRegistry.d.ts +8 -6
- package/dist/modules/requests/itemProcessors/RequestItemProcessorRegistry.js +10 -9
- package/dist/modules/requests/itemProcessors/RequestItemProcessorRegistry.js.map +1 -1
- package/dist/modules/requests/itemProcessors/ValidationResult.d.ts +7 -7
- package/dist/modules/requests/itemProcessors/ValidationResult.js +11 -11
- package/dist/modules/requests/itemProcessors/ValidationResult.js.map +1 -1
- package/dist/modules/requests/itemProcessors/createAttribute/AcceptCreateAttributeRequestItemParameters.d.ts +7 -0
- package/dist/modules/requests/{incoming/decide/RejectRequestParameters.js → itemProcessors/createAttribute/AcceptCreateAttributeRequestItemParameters.js} +7 -8
- package/dist/modules/requests/itemProcessors/createAttribute/AcceptCreateAttributeRequestItemParameters.js.map +1 -0
- package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts +13 -0
- package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js +55 -0
- package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/proposeAttribute/AcceptProposeAttributeRequestItemParameters.d.ts +20 -0
- package/dist/modules/requests/itemProcessors/proposeAttribute/AcceptProposeAttributeRequestItemParameters.js +47 -0
- package/dist/modules/requests/itemProcessors/proposeAttribute/AcceptProposeAttributeRequestItemParameters.js.map +1 -0
- package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts +14 -0
- package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js +88 -0
- package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/readAttribute/AcceptReadAttributeRequestItemParameters.d.ts +14 -0
- package/dist/modules/requests/itemProcessors/readAttribute/AcceptReadAttributeRequestItemParameters.js +47 -0
- package/dist/modules/requests/itemProcessors/readAttribute/AcceptReadAttributeRequestItemParameters.js.map +1 -0
- package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts +14 -0
- package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js +88 -0
- package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/shareAttribute/AcceptShareAttributeRequestItemParameters.d.ts +7 -0
- package/dist/modules/requests/{incoming/decide/AcceptRequestParameters.js → itemProcessors/shareAttribute/AcceptShareAttributeRequestItemParameters.js} +7 -8
- package/dist/modules/requests/itemProcessors/shareAttribute/AcceptShareAttributeRequestItemParameters.js.map +1 -0
- package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts +15 -0
- package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js +93 -0
- package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js.map +1 -0
- package/dist/modules/requests/itemProcessors/utility/validateQuery.d.ts +4 -0
- package/dist/modules/requests/itemProcessors/utility/validateQuery.js +21 -0
- package/dist/modules/requests/itemProcessors/utility/validateQuery.js.map +1 -0
- package/dist/modules/requests/local/LocalRequest.d.ts +37 -0
- package/dist/modules/requests/local/{ConsumptionRequest.js → LocalRequest.js} +32 -32
- package/dist/modules/requests/local/LocalRequest.js.map +1 -0
- package/dist/modules/requests/local/{ConsumptionRequestStatus.d.ts → LocalRequestStatus.d.ts} +1 -1
- package/dist/modules/requests/local/LocalRequestStatus.js +13 -0
- package/dist/modules/requests/local/LocalRequestStatus.js.map +1 -0
- package/dist/modules/requests/local/LocalRequestStatusLogEntry.d.ts +17 -0
- package/dist/modules/requests/local/{ConsumptionRequestStatusLogEntry.js → LocalRequestStatusLogEntry.js} +13 -13
- package/dist/modules/requests/local/LocalRequestStatusLogEntry.js.map +1 -0
- package/dist/modules/requests/local/LocalResponse.d.ts +22 -0
- package/dist/modules/requests/local/{ConsumptionResponse.js → LocalResponse.js} +18 -18
- package/dist/modules/requests/local/LocalResponse.js.map +1 -0
- package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts +11 -11
- package/dist/modules/requests/outgoing/OutgoingRequestsController.js +59 -46
- package/dist/modules/requests/outgoing/OutgoingRequestsController.js.map +1 -1
- package/dist/modules/settings/SettingsController.d.ts +1 -1
- package/dist/modules/settings/SettingsController.js.map +1 -1
- package/lib-web/nmshd.consumption.js +11259 -2161
- package/lib-web/nmshd.consumption.js.map +1 -1
- package/lib-web/nmshd.consumption.min.js +1 -1
- package/lib-web/nmshd.consumption.min.js.map +1 -1
- package/package.json +27 -23
- package/dist/modules/attributes/ConsumptionAttributesController.d.ts +0 -22
- package/dist/modules/attributes/ConsumptionAttributesController.js +0 -141
- package/dist/modules/attributes/ConsumptionAttributesController.js.map +0 -1
- package/dist/modules/attributes/local/ConsumptionAttribute.d.ts +0 -19
- package/dist/modules/attributes/local/ConsumptionAttribute.js.map +0 -1
- package/dist/modules/relationships/RelationshipInfoController.d.ts +0 -15
- package/dist/modules/relationships/RelationshipInfoController.js +0 -61
- package/dist/modules/relationships/RelationshipInfoController.js.map +0 -1
- package/dist/modules/relationships/RelationshipInfoUtil.d.ts +0 -15
- package/dist/modules/relationships/RelationshipInfoUtil.js +0 -219
- package/dist/modules/relationships/RelationshipInfoUtil.js.map +0 -1
- package/dist/modules/relationships/local/RelationshipAttribute.d.ts +0 -14
- package/dist/modules/relationships/local/RelationshipAttribute.js.map +0 -1
- package/dist/modules/relationships/local/RelationshipInfo.d.ts +0 -27
- package/dist/modules/relationships/local/RelationshipInfo.js +0 -97
- package/dist/modules/relationships/local/RelationshipInfo.js.map +0 -1
- package/dist/modules/relationships/local/RelationshipTheme.d.ts +0 -14
- package/dist/modules/relationships/local/RelationshipTheme.js.map +0 -1
- package/dist/modules/requests/incoming/decide/AcceptRequestParameters.d.ts +0 -6
- package/dist/modules/requests/incoming/decide/AcceptRequestParameters.js.map +0 -1
- package/dist/modules/requests/incoming/decide/RejectRequestParameters.d.ts +0 -6
- package/dist/modules/requests/incoming/decide/RejectRequestParameters.js.map +0 -1
- package/dist/modules/requests/local/ConsumptionRequest.d.ts +0 -37
- package/dist/modules/requests/local/ConsumptionRequest.js.map +0 -1
- package/dist/modules/requests/local/ConsumptionRequestStatus.js +0 -13
- package/dist/modules/requests/local/ConsumptionRequestStatus.js.map +0 -1
- package/dist/modules/requests/local/ConsumptionRequestStatusLogEntry.d.ts +0 -17
- package/dist/modules/requests/local/ConsumptionRequestStatusLogEntry.js.map +0 -1
- package/dist/modules/requests/local/ConsumptionResponse.d.ts +0 -22
- package/dist/modules/requests/local/ConsumptionResponse.js.map +0 -1
- package/dist/modules/sharedItems/SharedItemsController.d.ts +0 -14
- package/dist/modules/sharedItems/SharedItemsController.js +0 -40
- package/dist/modules/sharedItems/SharedItemsController.js.map +0 -1
- package/dist/modules/sharedItems/local/SharedItem.d.ts +0 -31
- package/dist/modules/sharedItems/local/SharedItem.js +0 -100
- package/dist/modules/sharedItems/local/SharedItem.js.map +0 -1
- package/dist/modules/signatures/Signature.d.ts +0 -16
- package/dist/modules/signatures/Signature.js +0 -56
- package/dist/modules/signatures/Signature.js.map +0 -1
- package/dist/modules/signatures/SignatureContent.d.ts +0 -21
- package/dist/modules/signatures/SignatureContent.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreatePeerLocalAttributeParams.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/CreatePeerLocalAttributeParams.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAqF;AACrF,4CAOuB;AACvB,gDAA6E;AAgB7E,MAAa,8BAA+B,SAAQ,wBAAY;IAiBrD,MAAM,CAAC,IAAI,CACd,KAA2E;QAE3E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ;AAnBG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACA,kBAAM;0DAAA;AAIjB;IAFC,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,2BAAiB,EAAE,+BAAqB,CAAC,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;;+DAC8C;AAIzD;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACc,kBAAM;wEAAA;AAI/B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACE,uBAAW;4DAAA;AAf5B,wEAsBC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
+
import { IRelationshipAttribute, RelationshipAttribute } from "@nmshd/content";
|
|
3
|
+
import { CoreAddress, CoreId, ICoreAddress, ICoreId } from "@nmshd/transport";
|
|
4
|
+
export interface ICreateRelationshipAttributeParams extends ISerializable {
|
|
5
|
+
content: IRelationshipAttribute;
|
|
6
|
+
peer: ICoreAddress;
|
|
7
|
+
requestReference: ICoreId;
|
|
8
|
+
}
|
|
9
|
+
export declare class CreateRelationshipAttributeParams extends Serializable implements ICreateRelationshipAttributeParams {
|
|
10
|
+
content: RelationshipAttribute;
|
|
11
|
+
peer: CoreAddress;
|
|
12
|
+
requestReference: CoreId;
|
|
13
|
+
static from(value: ICreateRelationshipAttributeParams): CreateRelationshipAttributeParams;
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateRelationshipAttributeParams = void 0;
|
|
13
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const content_1 = require("@nmshd/content");
|
|
15
|
+
const transport_1 = require("@nmshd/transport");
|
|
16
|
+
let CreateRelationshipAttributeParams = class CreateRelationshipAttributeParams extends ts_serval_1.Serializable {
|
|
17
|
+
static from(value) {
|
|
18
|
+
return this.fromAny(value);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, ts_serval_1.serialize)(),
|
|
23
|
+
(0, ts_serval_1.validate)(),
|
|
24
|
+
__metadata("design:type", content_1.RelationshipAttribute)
|
|
25
|
+
], CreateRelationshipAttributeParams.prototype, "content", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, ts_serval_1.serialize)(),
|
|
28
|
+
(0, ts_serval_1.validate)(),
|
|
29
|
+
__metadata("design:type", transport_1.CoreAddress)
|
|
30
|
+
], CreateRelationshipAttributeParams.prototype, "peer", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, ts_serval_1.serialize)(),
|
|
33
|
+
(0, ts_serval_1.validate)(),
|
|
34
|
+
__metadata("design:type", transport_1.CoreId)
|
|
35
|
+
], CreateRelationshipAttributeParams.prototype, "requestReference", void 0);
|
|
36
|
+
CreateRelationshipAttributeParams = __decorate([
|
|
37
|
+
(0, ts_serval_1.type)("CreateRelationshipAttributeParams")
|
|
38
|
+
], CreateRelationshipAttributeParams);
|
|
39
|
+
exports.CreateRelationshipAttributeParams = CreateRelationshipAttributeParams;
|
|
40
|
+
//# sourceMappingURL=CreateRelationshipAttributeParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateRelationshipAttributeParams.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/CreateRelationshipAttributeParams.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAC3F,4CAA8E;AAC9E,gDAA6E;AAS7E,IAAa,iCAAiC,GAA9C,MAAa,iCAAkC,SAAQ,wBAAY;IAaxD,MAAM,CAAC,IAAI,CAAC,KAAyC;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAbG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACK,+BAAqB;kEAAA;AAIrC;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACE,uBAAW;+DAAA;AAIxB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACc,kBAAM;2EAAA;AAXtB,iCAAiC;IAD7C,IAAA,gBAAI,EAAC,mCAAmC,CAAC;GAC7B,iCAAiC,CAgB7C;AAhBY,8EAAiC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
+
import { CoreAddress, CoreId, ICoreAddress, ICoreId } from "@nmshd/transport";
|
|
3
|
+
export interface CreateSharedLocalAttributeCopyParamsJSON {
|
|
4
|
+
attributeId: string;
|
|
5
|
+
peer: string;
|
|
6
|
+
requestReference: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ICreateSharedLocalAttributeCopyParams extends ISerializable {
|
|
9
|
+
attributeId: ICoreId;
|
|
10
|
+
peer: ICoreAddress;
|
|
11
|
+
requestReference: ICoreId;
|
|
12
|
+
}
|
|
13
|
+
export declare class CreateSharedLocalAttributeCopyParams extends Serializable implements ICreateSharedLocalAttributeCopyParams {
|
|
14
|
+
attributeId: CoreId;
|
|
15
|
+
peer: CoreAddress;
|
|
16
|
+
requestReference: CoreId;
|
|
17
|
+
static from(value: ICreateSharedLocalAttributeCopyParams | CreateSharedLocalAttributeCopyParamsJSON): CreateSharedLocalAttributeCopyParams;
|
|
18
|
+
}
|
|
@@ -9,32 +9,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.CreateSharedLocalAttributeCopyParams = void 0;
|
|
13
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
-
const content_1 = require("@nmshd/content");
|
|
15
14
|
const transport_1 = require("@nmshd/transport");
|
|
16
|
-
|
|
15
|
+
class CreateSharedLocalAttributeCopyParams extends ts_serval_1.Serializable {
|
|
17
16
|
static from(value) {
|
|
18
17
|
return this.fromAny(value);
|
|
19
18
|
}
|
|
20
|
-
}
|
|
19
|
+
}
|
|
21
20
|
__decorate([
|
|
22
|
-
(0, ts_serval_1.validate)(),
|
|
23
21
|
(0, ts_serval_1.serialize)(),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], RelationshipAttribute.prototype, "name", void 0);
|
|
26
|
-
__decorate([
|
|
27
22
|
(0, ts_serval_1.validate)(),
|
|
28
|
-
(
|
|
29
|
-
|
|
30
|
-
], RelationshipAttribute.prototype, "content", void 0);
|
|
23
|
+
__metadata("design:type", transport_1.CoreId)
|
|
24
|
+
], CreateSharedLocalAttributeCopyParams.prototype, "attributeId", void 0);
|
|
31
25
|
__decorate([
|
|
26
|
+
(0, ts_serval_1.serialize)(),
|
|
32
27
|
(0, ts_serval_1.validate)(),
|
|
28
|
+
__metadata("design:type", transport_1.CoreAddress)
|
|
29
|
+
], CreateSharedLocalAttributeCopyParams.prototype, "peer", void 0);
|
|
30
|
+
__decorate([
|
|
33
31
|
(0, ts_serval_1.serialize)(),
|
|
32
|
+
(0, ts_serval_1.validate)(),
|
|
34
33
|
__metadata("design:type", transport_1.CoreId)
|
|
35
|
-
],
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
], RelationshipAttribute);
|
|
39
|
-
exports.RelationshipAttribute = RelationshipAttribute;
|
|
40
|
-
//# sourceMappingURL=RelationshipAttribute.js.map
|
|
34
|
+
], CreateSharedLocalAttributeCopyParams.prototype, "requestReference", void 0);
|
|
35
|
+
exports.CreateSharedLocalAttributeCopyParams = CreateSharedLocalAttributeCopyParams;
|
|
36
|
+
//# sourceMappingURL=CreateSharedLocalAttributeCopyParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateSharedLocalAttributeCopyParams.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/CreateSharedLocalAttributeCopyParams.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAqF;AACrF,gDAA6E;AAc7E,MAAa,oCACT,SAAQ,wBAAY;IAeb,MAAM,CAAC,IAAI,CACd,KAAuF;QAEvF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ;AAfG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACS,kBAAM;yEAAA;AAI1B;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACE,uBAAW;kEAAA;AAIxB;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACc,kBAAM;8EAAA;AAdnC,oFAqBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
+
import { IdentityAttributeQuery, IdentityAttributeQueryJSON, IIdentityAttributeQuery } from "@nmshd/content";
|
|
3
|
+
export interface GetIdentityAttributesParamsJSON {
|
|
4
|
+
query: IdentityAttributeQueryJSON;
|
|
5
|
+
}
|
|
6
|
+
export interface IGetIdentityAttributesParams extends ISerializable {
|
|
7
|
+
query: IIdentityAttributeQuery;
|
|
8
|
+
}
|
|
9
|
+
export declare class GetIdentityAttributesParams extends Serializable implements IGetIdentityAttributesParams {
|
|
10
|
+
query: IdentityAttributeQuery;
|
|
11
|
+
static from(value: IGetIdentityAttributesParams | GetIdentityAttributesParamsJSON): GetIdentityAttributesParams;
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GetIdentityAttributesParams = void 0;
|
|
13
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const content_1 = require("@nmshd/content");
|
|
15
|
+
class GetIdentityAttributesParams extends ts_serval_1.Serializable {
|
|
16
|
+
static from(value) {
|
|
17
|
+
return this.fromAny(value);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, ts_serval_1.serialize)(),
|
|
22
|
+
(0, ts_serval_1.validate)(),
|
|
23
|
+
__metadata("design:type", content_1.IdentityAttributeQuery)
|
|
24
|
+
], GetIdentityAttributesParams.prototype, "query", void 0);
|
|
25
|
+
exports.GetIdentityAttributesParams = GetIdentityAttributesParams;
|
|
26
|
+
//# sourceMappingURL=GetIdentityAttributesParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetIdentityAttributesParams.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/GetIdentityAttributesParams.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAqF;AACrF,4CAA4G;AAU5G,MAAa,2BAA4B,SAAQ,wBAAY;IAKlD,MAAM,CAAC,IAAI,CACd,KAAqE;QAErE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ;AAPG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACG,gCAAsB;0DAAA;AAHxC,kEAUC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
+
import { IRelationshipAttributeQuery, RelationshipAttributeQuery, RelationshipAttributeQueryJSON } from "@nmshd/content";
|
|
3
|
+
export interface GetRelationshipAttributesParamsJSON {
|
|
4
|
+
query: RelationshipAttributeQueryJSON;
|
|
5
|
+
}
|
|
6
|
+
export interface IGetRelationshipAttributesParams extends ISerializable {
|
|
7
|
+
query: IRelationshipAttributeQuery;
|
|
8
|
+
}
|
|
9
|
+
export declare class GetRelationshipAttributesParams extends Serializable implements IGetRelationshipAttributesParams {
|
|
10
|
+
query: RelationshipAttributeQuery;
|
|
11
|
+
static from(value: IGetRelationshipAttributesParams | GetRelationshipAttributesParamsJSON): GetRelationshipAttributesParams;
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GetRelationshipAttributesParams = void 0;
|
|
13
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const content_1 = require("@nmshd/content");
|
|
15
|
+
class GetRelationshipAttributesParams extends ts_serval_1.Serializable {
|
|
16
|
+
static from(value) {
|
|
17
|
+
return this.fromAny(value);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, ts_serval_1.serialize)(),
|
|
22
|
+
(0, ts_serval_1.validate)(),
|
|
23
|
+
__metadata("design:type", content_1.RelationshipAttributeQuery)
|
|
24
|
+
], GetRelationshipAttributesParams.prototype, "query", void 0);
|
|
25
|
+
exports.GetRelationshipAttributesParams = GetRelationshipAttributesParams;
|
|
26
|
+
//# sourceMappingURL=GetRelationshipAttributesParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetRelationshipAttributesParams.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/GetRelationshipAttributesParams.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAqF;AACrF,4CAAwH;AAUxH,MAAa,+BAAgC,SAAQ,wBAAY;IAKtD,MAAM,CAAC,IAAI,CACd,KAA6E;QAE7E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ;AAPG;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACG,oCAA0B;8DAAA;AAH5C,0EAUC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IdentityAttribute, IdentityAttributeJSON, IIdentityAttribute, IRelationshipAttribute, RelationshipAttribute, RelationshipAttributeJSON } from "@nmshd/content";
|
|
2
|
+
import { CoreDate, CoreId, CoreSynchronizable, ICoreDate, ICoreId, ICoreSynchronizable } from "@nmshd/transport";
|
|
3
|
+
import { ILocalAttributeShareInfo, LocalAttributeShareInfo, LocalAttributeShareInfoJSON } from "./LocalAttributeShareInfo";
|
|
4
|
+
export interface LocalAttributeJSON {
|
|
5
|
+
content: IdentityAttributeJSON | RelationshipAttributeJSON;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
succeeds: string;
|
|
8
|
+
succeededBy: string;
|
|
9
|
+
shareInfo: LocalAttributeShareInfoJSON;
|
|
10
|
+
}
|
|
11
|
+
export interface ILocalAttribute extends ICoreSynchronizable {
|
|
12
|
+
content: IIdentityAttribute | IRelationshipAttribute;
|
|
13
|
+
createdAt: ICoreDate;
|
|
14
|
+
succeeds?: ICoreId;
|
|
15
|
+
succeededBy?: ICoreId;
|
|
16
|
+
shareInfo?: ILocalAttributeShareInfo;
|
|
17
|
+
}
|
|
18
|
+
export declare class LocalAttribute extends CoreSynchronizable implements ILocalAttribute {
|
|
19
|
+
readonly technicalProperties: string[];
|
|
20
|
+
readonly userdataProperties: string[];
|
|
21
|
+
content: IdentityAttribute | RelationshipAttribute;
|
|
22
|
+
createdAt: CoreDate;
|
|
23
|
+
succeeds?: CoreId;
|
|
24
|
+
succeededBy?: CoreId;
|
|
25
|
+
shareInfo?: LocalAttributeShareInfo;
|
|
26
|
+
static from(value: ILocalAttribute): LocalAttribute;
|
|
27
|
+
static fromAttribute(attribute: IIdentityAttribute | IRelationshipAttribute, succeeds?: ICoreId, shareInfo?: ILocalAttributeShareInfo): Promise<LocalAttribute>;
|
|
28
|
+
}
|
|
@@ -9,59 +9,65 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.LocalAttribute = void 0;
|
|
13
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
14
|
const content_1 = require("@nmshd/content");
|
|
15
15
|
const transport_1 = require("@nmshd/transport");
|
|
16
16
|
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
17
17
|
const consumption_1 = require("../../../consumption");
|
|
18
|
-
|
|
18
|
+
const LocalAttributeShareInfo_1 = require("./LocalAttributeShareInfo");
|
|
19
|
+
let LocalAttribute = class LocalAttribute extends transport_1.CoreSynchronizable {
|
|
19
20
|
constructor() {
|
|
20
21
|
super(...arguments);
|
|
21
22
|
this.technicalProperties = [
|
|
22
23
|
"@type",
|
|
23
24
|
"@context",
|
|
25
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.createdAt),
|
|
26
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.succeeds),
|
|
24
27
|
(0, ts_simple_nameof_1.nameof)((r) => r.createdAt)
|
|
25
28
|
];
|
|
26
29
|
this.userdataProperties = [(0, ts_simple_nameof_1.nameof)((r) => r.content)];
|
|
27
|
-
this.metadataProperties = [
|
|
28
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.metadata),
|
|
29
|
-
(0, ts_simple_nameof_1.nameof)((r) => r.metadataModifiedAt)
|
|
30
|
-
];
|
|
31
30
|
}
|
|
32
31
|
static from(value) {
|
|
33
32
|
return this.fromAny(value);
|
|
34
33
|
}
|
|
35
|
-
static async fromAttribute(attribute) {
|
|
34
|
+
static async fromAttribute(attribute, succeeds, shareInfo) {
|
|
36
35
|
return this.from({
|
|
37
|
-
content:
|
|
36
|
+
content: attribute,
|
|
38
37
|
id: await consumption_1.ConsumptionIds.attribute.generate(),
|
|
39
|
-
createdAt: transport_1.CoreDate.utc()
|
|
38
|
+
createdAt: transport_1.CoreDate.utc(),
|
|
39
|
+
succeeds: succeeds,
|
|
40
|
+
shareInfo: shareInfo
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
__decorate([
|
|
44
45
|
(0, ts_serval_1.validate)(),
|
|
45
|
-
(0, ts_serval_1.serialize)({
|
|
46
|
-
__metadata("design:type",
|
|
47
|
-
],
|
|
46
|
+
(0, ts_serval_1.serialize)({ unionTypes: [content_1.IdentityAttribute, content_1.RelationshipAttribute] }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], LocalAttribute.prototype, "content", void 0);
|
|
48
49
|
__decorate([
|
|
49
50
|
(0, ts_serval_1.validate)(),
|
|
50
51
|
(0, ts_serval_1.serialize)(),
|
|
51
52
|
__metadata("design:type", transport_1.CoreDate)
|
|
52
|
-
],
|
|
53
|
+
], LocalAttribute.prototype, "createdAt", void 0);
|
|
53
54
|
__decorate([
|
|
54
55
|
(0, ts_serval_1.validate)({ nullable: true }),
|
|
55
|
-
(0, ts_serval_1.serialize)(
|
|
56
|
-
__metadata("design:type",
|
|
57
|
-
],
|
|
56
|
+
(0, ts_serval_1.serialize)(),
|
|
57
|
+
__metadata("design:type", transport_1.CoreId)
|
|
58
|
+
], LocalAttribute.prototype, "succeeds", void 0);
|
|
58
59
|
__decorate([
|
|
59
60
|
(0, ts_serval_1.validate)({ nullable: true }),
|
|
60
61
|
(0, ts_serval_1.serialize)(),
|
|
61
|
-
__metadata("design:type", transport_1.
|
|
62
|
-
],
|
|
63
|
-
|
|
64
|
-
(0, ts_serval_1.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
__metadata("design:type", transport_1.CoreId)
|
|
63
|
+
], LocalAttribute.prototype, "succeededBy", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
66
|
+
(0, ts_serval_1.serialize)(),
|
|
67
|
+
__metadata("design:type", LocalAttributeShareInfo_1.LocalAttributeShareInfo)
|
|
68
|
+
], LocalAttribute.prototype, "shareInfo", void 0);
|
|
69
|
+
LocalAttribute = __decorate([
|
|
70
|
+
(0, ts_serval_1.type)("LocalAttribute")
|
|
71
|
+
], LocalAttribute);
|
|
72
|
+
exports.LocalAttribute = LocalAttribute;
|
|
73
|
+
//# sourceMappingURL=LocalAttribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalAttribute.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,4CAOuB;AACvB,gDAAgH;AAChH,uDAAyC;AACzC,sDAAqD;AACrD,uEAIkC;AAmBlC,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,8BAAkB;IAAtD;;QAC6B,wBAAmB,GAAG;YAC3C,OAAO;YACP,UAAU;YACV,IAAA,yBAAM,EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1C,IAAA,yBAAM,EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC,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;8BACO,iDAAuB;iDAAA;AA7BjC,cAAc;IAD1B,IAAA,gBAAI,EAAC,gBAAgB,CAAC;GACV,cAAc,CAgD1B;AAhDY,wCAAc"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CoreAddress, CoreId, CoreSerializable, ICoreAddress, ICoreId, ICoreSerializable } from "@nmshd/transport";
|
|
2
|
+
export interface LocalAttributeShareInfoJSON {
|
|
3
|
+
requestReference: string;
|
|
4
|
+
peer: string;
|
|
5
|
+
sourceAttribute?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ILocalAttributeShareInfo extends ICoreSerializable {
|
|
8
|
+
requestReference: ICoreId;
|
|
9
|
+
peer: ICoreAddress;
|
|
10
|
+
sourceAttribute?: ICoreId;
|
|
11
|
+
}
|
|
12
|
+
export declare class LocalAttributeShareInfo extends CoreSerializable implements ILocalAttributeShareInfo {
|
|
13
|
+
requestReference: CoreId;
|
|
14
|
+
peer: CoreAddress;
|
|
15
|
+
sourceAttribute?: CoreId;
|
|
16
|
+
static from(value: ILocalAttributeShareInfo): LocalAttributeShareInfo;
|
|
17
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LocalAttributeShareInfo = void 0;
|
|
13
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const transport_1 = require("@nmshd/transport");
|
|
15
|
+
class LocalAttributeShareInfo extends transport_1.CoreSerializable {
|
|
16
|
+
static from(value) {
|
|
17
|
+
return super.fromAny(value);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, ts_serval_1.validate)(),
|
|
22
|
+
(0, ts_serval_1.serialize)(),
|
|
23
|
+
__metadata("design:type", transport_1.CoreId)
|
|
24
|
+
], LocalAttributeShareInfo.prototype, "requestReference", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, ts_serval_1.validate)(),
|
|
27
|
+
(0, ts_serval_1.serialize)(),
|
|
28
|
+
__metadata("design:type", transport_1.CoreAddress)
|
|
29
|
+
], LocalAttributeShareInfo.prototype, "peer", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
32
|
+
(0, ts_serval_1.serialize)(),
|
|
33
|
+
__metadata("design:type", transport_1.CoreId)
|
|
34
|
+
], LocalAttributeShareInfo.prototype, "sourceAttribute", void 0);
|
|
35
|
+
exports.LocalAttributeShareInfo = LocalAttributeShareInfo;
|
|
36
|
+
//# sourceMappingURL=LocalAttributeShareInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalAttributeShareInfo.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/LocalAttributeShareInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAwD;AACxD,gDAAkH;AAclH,MAAa,uBAAwB,SAAQ,4BAAgB;IAalD,MAAM,CAAC,IAAI,CAAC,KAA+B;QAC9C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAA4B,CAAA;IAC1D,CAAC;CACJ;AAbG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACa,kBAAM;iEAAA;AAI/B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACC,uBAAW;qDAAA;AAIxB;IAFC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACa,kBAAM;gEAAA;AAXnC,0DAgBC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.relationshipQueryTranslator = exports.identityQueryTranslator = void 0;
|
|
4
|
+
const docdb_querytranslator_1 = require("@js-soft/docdb-querytranslator");
|
|
5
|
+
const luxon_1 = require("luxon");
|
|
6
|
+
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
7
|
+
exports.identityQueryTranslator = new docdb_querytranslator_1.QueryTranslator({
|
|
8
|
+
whitelist: {
|
|
9
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.tags)]: true,
|
|
10
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.valueType)]: true,
|
|
11
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.validFrom)]: true,
|
|
12
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.validTo)]: true,
|
|
13
|
+
attributeType: true
|
|
14
|
+
},
|
|
15
|
+
alias: {
|
|
16
|
+
// @type of attributeValue
|
|
17
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.valueType)]: [
|
|
18
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`
|
|
19
|
+
],
|
|
20
|
+
// @type of attribute
|
|
21
|
+
attributeType: [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`]
|
|
22
|
+
},
|
|
23
|
+
custom: {
|
|
24
|
+
// tags
|
|
25
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.tags)]: (query, input) => {
|
|
26
|
+
const allowedTags = [];
|
|
27
|
+
for (const tag of input) {
|
|
28
|
+
const tagQuery = {
|
|
29
|
+
[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.tags)}`]: {
|
|
30
|
+
$contains: tag
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
allowedTags.push(tagQuery);
|
|
34
|
+
}
|
|
35
|
+
query["$or"] = allowedTags;
|
|
36
|
+
},
|
|
37
|
+
// validFrom
|
|
38
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.validFrom)]: (query, input) => {
|
|
39
|
+
if (!input) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const validFromUtcString = luxon_1.DateTime.fromISO(input).toUTC().toString();
|
|
43
|
+
query[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.validFrom)}`] =
|
|
44
|
+
{
|
|
45
|
+
$gte: validFromUtcString
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
// validTo
|
|
49
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.validTo)]: (query, input) => {
|
|
50
|
+
if (!input) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const validToUtcString = luxon_1.DateTime.fromISO(input).toUTC().toString();
|
|
54
|
+
query[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.validTo)}`] = {
|
|
55
|
+
$lte: validToUtcString
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
exports.relationshipQueryTranslator = new docdb_querytranslator_1.QueryTranslator({
|
|
61
|
+
whitelist: {
|
|
62
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.key)]: true,
|
|
63
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.valueType)]: true,
|
|
64
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.validFrom)]: true,
|
|
65
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.validTo)]: true,
|
|
66
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.owner)]: true,
|
|
67
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.thirdParty)]: true,
|
|
68
|
+
attributeType: true
|
|
69
|
+
},
|
|
70
|
+
alias: {
|
|
71
|
+
// key
|
|
72
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.key)]: [
|
|
73
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.key)}`
|
|
74
|
+
],
|
|
75
|
+
// @type of attributeValue
|
|
76
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.valueType)]: [
|
|
77
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.value)}.@type`
|
|
78
|
+
],
|
|
79
|
+
// @type of attribute
|
|
80
|
+
attributeType: [`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.@type`],
|
|
81
|
+
// owner
|
|
82
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.owner)]: [
|
|
83
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.owner)}`
|
|
84
|
+
],
|
|
85
|
+
// peer
|
|
86
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.thirdParty)]: [
|
|
87
|
+
`${(0, ts_simple_nameof_1.nameof)((x) => x.shareInfo)}.${(0, ts_simple_nameof_1.nameof)((x) => x.peer)}`
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
custom: {
|
|
91
|
+
// validFrom
|
|
92
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.validFrom)]: (query, input) => {
|
|
93
|
+
if (!input) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const validFromUtcString = luxon_1.DateTime.fromISO(input).toUTC().toString();
|
|
97
|
+
query[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.validFrom)}`] =
|
|
98
|
+
{
|
|
99
|
+
$gte: validFromUtcString
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
// validTo
|
|
103
|
+
[(0, ts_simple_nameof_1.nameof)((x) => x.validTo)]: (query, input) => {
|
|
104
|
+
if (!input) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const validToUtcString = luxon_1.DateTime.fromISO(input).toUTC().toString();
|
|
108
|
+
query[`${(0, ts_simple_nameof_1.nameof)((x) => x.content)}.${(0, ts_simple_nameof_1.nameof)((x) => x.validTo)}`] = {
|
|
109
|
+
$lte: validToUtcString
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
//# sourceMappingURL=QueryTranslator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryTranslator.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/QueryTranslator.ts"],"names":[],"mappings":";;;AAAA,0EAAgE;AAShE,iCAAgC;AAChC,uDAAyC;AAI5B,QAAA,uBAAuB,GAAG,IAAI,uCAAe,CAAC;IACvD,SAAS,EAAE;QACP,CAAC,IAAA,yBAAM,EAA0B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI;QACtD,CAAC,IAAA,yBAAM,EAA0B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI;QAC3D,CAAC,IAAA,yBAAM,EAA0B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI;QAC3D,CAAC,IAAA,yBAAM,EAA0B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,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AAO,CAAC,CAAC,EAAE,CAAC,KAAU,EAAE,KAAU,EAAE,EAAE;YAChF,IAAI,CAAC,KAAK,EAAE;gBACR,OAAM;aACT;YACD,MAAM,gBAAgB,GAAG,gBAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAA;YACnE,KAAK,CAAC,GAAG,IAAA,yBAAM,EAAiB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,IAAA,yBAAM,EAAwB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG;gBACtG,IAAI,EAAE,gBAAgB;aACzB,CAAA;QACL,CAAC;KACJ;CACJ,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
+
import { IdentityAttribute, IdentityAttributeJSON, IIdentityAttribute, IRelationshipAttribute, RelationshipAttribute, RelationshipAttributeJSON } from "@nmshd/content";
|
|
3
|
+
import { CoreId, ICoreId } from "@nmshd/transport";
|
|
4
|
+
export interface SucceedLocalAttributeParamsJSON {
|
|
5
|
+
successorContent: IdentityAttributeJSON | RelationshipAttributeJSON;
|
|
6
|
+
succeeds: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ISucceedLocalAttributeParams extends ISerializable {
|
|
9
|
+
successorContent: IIdentityAttribute | IRelationshipAttribute;
|
|
10
|
+
succeeds: ICoreId;
|
|
11
|
+
}
|
|
12
|
+
export declare class SucceedLocalAttributeParams extends Serializable implements ISucceedLocalAttributeParams {
|
|
13
|
+
successorContent: IdentityAttribute | RelationshipAttribute;
|
|
14
|
+
succeeds: CoreId;
|
|
15
|
+
static from(value: ISucceedLocalAttributeParams | SucceedLocalAttributeParamsJSON): SucceedLocalAttributeParams;
|
|
16
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SucceedLocalAttributeParams = void 0;
|
|
13
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const content_1 = require("@nmshd/content");
|
|
15
|
+
const transport_1 = require("@nmshd/transport");
|
|
16
|
+
class SucceedLocalAttributeParams extends ts_serval_1.Serializable {
|
|
17
|
+
static from(value) {
|
|
18
|
+
return this.fromAny(value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, ts_serval_1.serialize)({ unionTypes: [content_1.IdentityAttribute, content_1.RelationshipAttribute] }),
|
|
23
|
+
(0, ts_serval_1.validate)(),
|
|
24
|
+
__metadata("design:type", Object)
|
|
25
|
+
], SucceedLocalAttributeParams.prototype, "successorContent", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, ts_serval_1.serialize)(),
|
|
28
|
+
(0, ts_serval_1.validate)(),
|
|
29
|
+
__metadata("design:type", transport_1.CoreId)
|
|
30
|
+
], SucceedLocalAttributeParams.prototype, "succeeds", void 0);
|
|
31
|
+
exports.SucceedLocalAttributeParams = SucceedLocalAttributeParams;
|
|
32
|
+
//# sourceMappingURL=SucceedLocalAttributeParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SucceedLocalAttributeParams.js","sourceRoot":"","sources":["../../../../src/modules/attributes/local/SucceedLocalAttributeParams.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAqF;AACrF,4CAOuB;AACvB,gDAAkD;AAYlD,MAAa,2BAA4B,SAAQ,wBAAY;IASlD,MAAM,CAAC,IAAI,CACd,KAAqE;QAErE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ;AAXG;IAFC,IAAA,qBAAS,EAAC,EAAE,UAAU,EAAE,CAAC,2BAAiB,EAAE,+BAAqB,CAAC,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;;qEACuD;AAIlE;IAFC,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACM,kBAAM;6DAAA;AAP3B,kEAcC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
+
import { IdentityAttribute, IdentityAttributeJSON, IIdentityAttribute, IRelationshipAttribute, RelationshipAttribute, RelationshipAttributeJSON } from "@nmshd/content";
|
|
3
|
+
import { CoreId, ICoreId } from "@nmshd/transport";
|
|
4
|
+
export interface UpdateLocalAttributeParamsJSON extends ISerializable {
|
|
5
|
+
id: string;
|
|
6
|
+
content: IdentityAttributeJSON | RelationshipAttributeJSON;
|
|
7
|
+
}
|
|
8
|
+
export interface IUpdateLocalAttributeParams extends ISerializable {
|
|
9
|
+
id: ICoreId;
|
|
10
|
+
content: IIdentityAttribute | IRelationshipAttribute;
|
|
11
|
+
}
|
|
12
|
+
export declare class UpdateLocalAttributeParams extends Serializable implements IUpdateLocalAttributeParams {
|
|
13
|
+
id: CoreId;
|
|
14
|
+
content: IdentityAttribute | RelationshipAttribute;
|
|
15
|
+
static from(value: IUpdateLocalAttributeParams | UpdateLocalAttributeParamsJSON): UpdateLocalAttributeParams;
|
|
16
|
+
}
|