@nmshd/transport 1.2.1 → 2.0.0-alpha.1
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 +4 -4
- package/dist/core/CoreSerializable.d.ts +1 -3
- package/dist/core/CoreSerializable.js +4 -11
- package/dist/core/CoreSerializable.js.map +1 -1
- package/dist/core/CoreSerializableAsync.d.ts +1 -3
- package/dist/core/CoreSerializableAsync.js +5 -11
- package/dist/core/CoreSerializableAsync.js.map +1 -1
- package/dist/core/CoreSynchronizable.d.ts +3 -3
- package/dist/core/CoreSynchronizable.js +2 -2
- package/dist/core/CoreSynchronizable.js.map +1 -1
- package/dist/core/TransportController.d.ts +1 -3
- package/dist/core/TransportController.js +2 -20
- package/dist/core/TransportController.js.map +1 -1
- package/dist/core/TransportErrors.d.ts +1 -0
- package/dist/core/TransportErrors.js +3 -0
- package/dist/core/TransportErrors.js.map +1 -1
- package/dist/core/backbone/RESTClientAuthenticate.js.map +1 -1
- package/dist/core/backbone/RequestError.js.map +1 -1
- package/dist/core/types/CoreAddress.d.ts +1 -1
- package/dist/core/types/CoreAddress.js +7 -13
- package/dist/core/types/CoreAddress.js.map +1 -1
- package/dist/core/types/CoreDate.d.ts +4 -3
- package/dist/core/types/CoreDate.js +17 -14
- package/dist/core/types/CoreDate.js.map +1 -1
- package/dist/core/types/CoreHash.d.ts +1 -1
- package/dist/core/types/CoreHash.js +7 -7
- package/dist/core/types/CoreHash.js.map +1 -1
- package/dist/core/types/CoreId.d.ts +1 -1
- package/dist/core/types/CoreId.js +9 -9
- package/dist/core/types/CoreId.js.map +1 -1
- package/dist/modules/accounts/AccountController.js +5 -5
- package/dist/modules/accounts/AccountController.js.map +1 -1
- package/dist/modules/accounts/IdentityController.js.map +1 -1
- package/dist/modules/accounts/backbone/IdentityClient.js.map +1 -1
- package/dist/modules/accounts/data/Identity.d.ts +5 -4
- package/dist/modules/accounts/data/Identity.js +12 -11
- package/dist/modules/accounts/data/Identity.js.map +1 -1
- package/dist/modules/accounts/data/IdentitySecretCredentials.d.ts +4 -4
- package/dist/modules/accounts/data/IdentitySecretCredentials.js +4 -5
- package/dist/modules/accounts/data/IdentitySecretCredentials.js.map +1 -1
- package/dist/modules/certificates/CertificateIssuer.js +2 -2
- package/dist/modules/certificates/CertificateIssuer.js.map +1 -1
- package/dist/modules/certificates/data/Certificate.d.ts +4 -5
- package/dist/modules/certificates/data/Certificate.js +4 -8
- package/dist/modules/certificates/data/Certificate.js.map +1 -1
- package/dist/modules/certificates/data/CertificateConstraint.d.ts +4 -5
- package/dist/modules/certificates/data/CertificateConstraint.js +4 -8
- package/dist/modules/certificates/data/CertificateConstraint.js.map +1 -1
- package/dist/modules/certificates/data/CertificateContent.d.ts +4 -5
- package/dist/modules/certificates/data/CertificateContent.js +4 -8
- package/dist/modules/certificates/data/CertificateContent.js.map +1 -1
- package/dist/modules/certificates/data/CertificateItem.d.ts +4 -5
- package/dist/modules/certificates/data/CertificateItem.js +4 -8
- package/dist/modules/certificates/data/CertificateItem.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js +4 -5
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js +4 -5
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js +4 -5
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js +4 -5
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificateDelegateItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js +4 -5
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificateRoleItem.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificateRoleItem.js +4 -5
- package/dist/modules/certificates/data/items/CertificateRoleItem.js.map +1 -1
- package/dist/modules/challenges/ChallengeController.js +5 -5
- package/dist/modules/challenges/ChallengeController.js.map +1 -1
- package/dist/modules/challenges/data/Challenge.d.ts +4 -5
- package/dist/modules/challenges/data/Challenge.js +4 -8
- package/dist/modules/challenges/data/Challenge.js.map +1 -1
- package/dist/modules/challenges/data/ChallengeSigned.d.ts +5 -5
- package/dist/modules/challenges/data/ChallengeSigned.js +7 -8
- package/dist/modules/challenges/data/ChallengeSigned.js.map +1 -1
- package/dist/modules/devices/DeviceController.js.map +1 -1
- package/dist/modules/devices/DeviceSecretController.js +6 -6
- package/dist/modules/devices/DeviceSecretController.js.map +1 -1
- package/dist/modules/devices/DevicesController.js +4 -4
- package/dist/modules/devices/DevicesController.js.map +1 -1
- package/dist/modules/devices/backbone/DeviceAuthClient.js.map +1 -1
- package/dist/modules/devices/backbone/DeviceClient.js.map +1 -1
- package/dist/modules/devices/local/Device.d.ts +1 -1
- package/dist/modules/devices/local/Device.js +4 -5
- package/dist/modules/devices/local/Device.js.map +1 -1
- package/dist/modules/devices/local/DeviceSecretCredentials.d.ts +3 -3
- package/dist/modules/devices/local/DeviceSecretCredentials.js +4 -5
- package/dist/modules/devices/local/DeviceSecretCredentials.js.map +1 -1
- package/dist/modules/devices/local/SendDeviceParameters.d.ts +4 -5
- package/dist/modules/devices/local/SendDeviceParameters.js +4 -8
- package/dist/modules/devices/local/SendDeviceParameters.js.map +1 -1
- package/dist/modules/devices/transmission/DeviceSharedSecret.d.ts +3 -4
- package/dist/modules/devices/transmission/DeviceSharedSecret.js +4 -8
- package/dist/modules/devices/transmission/DeviceSharedSecret.js.map +1 -1
- package/dist/modules/files/FileController.d.ts +2 -2
- package/dist/modules/files/FileController.js +14 -14
- package/dist/modules/files/FileController.js.map +1 -1
- package/dist/modules/files/local/CachedFile.d.ts +5 -5
- package/dist/modules/files/local/CachedFile.js +6 -6
- package/dist/modules/files/local/CachedFile.js.map +1 -1
- package/dist/modules/files/local/File.d.ts +2 -3
- package/dist/modules/files/local/File.js +10 -11
- package/dist/modules/files/local/File.js.map +1 -1
- package/dist/modules/files/local/SendFileParameters.d.ts +4 -5
- package/dist/modules/files/local/SendFileParameters.js +4 -8
- package/dist/modules/files/local/SendFileParameters.js.map +1 -1
- package/dist/modules/files/transmission/FileMetadata.d.ts +4 -5
- package/dist/modules/files/transmission/FileMetadata.js +4 -8
- package/dist/modules/files/transmission/FileMetadata.js.map +1 -1
- package/dist/modules/files/transmission/FileReference.d.ts +5 -7
- package/dist/modules/files/transmission/FileReference.js +6 -9
- package/dist/modules/files/transmission/FileReference.js.map +1 -1
- package/dist/modules/messages/MessageController.d.ts +2 -2
- package/dist/modules/messages/MessageController.js +28 -28
- package/dist/modules/messages/MessageController.js.map +1 -1
- package/dist/modules/messages/local/CachedMessage.d.ts +7 -7
- package/dist/modules/messages/local/CachedMessage.js +5 -6
- package/dist/modules/messages/local/CachedMessage.js.map +1 -1
- package/dist/modules/messages/local/Message.d.ts +1 -1
- package/dist/modules/messages/local/Message.js +4 -5
- package/dist/modules/messages/local/Message.js.map +1 -1
- package/dist/modules/messages/local/SendMessageParameters.d.ts +7 -8
- package/dist/modules/messages/local/SendMessageParameters.js +5 -9
- package/dist/modules/messages/local/SendMessageParameters.js.map +1 -1
- package/dist/modules/messages/transmission/MessageEnvelope.d.ts +5 -5
- package/dist/modules/messages/transmission/MessageEnvelope.js +6 -7
- package/dist/modules/messages/transmission/MessageEnvelope.js.map +1 -1
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.d.ts +4 -4
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js +4 -5
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js.map +1 -1
- package/dist/modules/messages/transmission/MessagePlain.d.ts +8 -8
- package/dist/modules/messages/transmission/MessagePlain.js +7 -8
- package/dist/modules/messages/transmission/MessagePlain.js.map +1 -1
- package/dist/modules/messages/transmission/MessageSignature.d.ts +4 -4
- package/dist/modules/messages/transmission/MessageSignature.js +4 -5
- package/dist/modules/messages/transmission/MessageSignature.js.map +1 -1
- package/dist/modules/messages/transmission/MessageSigned.d.ts +4 -5
- package/dist/modules/messages/transmission/MessageSigned.js +4 -9
- package/dist/modules/messages/transmission/MessageSigned.js.map +1 -1
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts +2 -2
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +14 -14
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +7 -8
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +4 -7
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts +1 -2
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js +4 -8
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts +7 -8
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +5 -9
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.d.ts +7 -8
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js +5 -9
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.d.ts +4 -5
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js +15 -24
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.d.ts +4 -5
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js +4 -8
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js.map +1 -1
- package/dist/modules/relationships/RelationshipSecretController.d.ts +6 -6
- package/dist/modules/relationships/RelationshipSecretController.js +7 -3
- package/dist/modules/relationships/RelationshipSecretController.js.map +1 -1
- package/dist/modules/relationships/RelationshipsController.d.ts +2 -2
- package/dist/modules/relationships/RelationshipsController.js +32 -32
- package/dist/modules/relationships/RelationshipsController.js.map +1 -1
- package/dist/modules/relationships/local/CachedRelationship.d.ts +4 -5
- package/dist/modules/relationships/local/CachedRelationship.js +4 -8
- package/dist/modules/relationships/local/CachedRelationship.js.map +1 -1
- package/dist/modules/relationships/local/Relationship.d.ts +3 -4
- package/dist/modules/relationships/local/Relationship.js +8 -11
- package/dist/modules/relationships/local/Relationship.js.map +1 -1
- package/dist/modules/relationships/local/SendRelationshipParameters.d.ts +7 -8
- package/dist/modules/relationships/local/SendRelationshipParameters.js +5 -9
- package/dist/modules/relationships/local/SendRelationshipParameters.js.map +1 -1
- package/dist/modules/relationships/transmission/changes/RelationshipChange.d.ts +5 -6
- package/dist/modules/relationships/transmission/changes/RelationshipChange.js +8 -12
- package/dist/modules/relationships/transmission/changes/RelationshipChange.js.map +1 -1
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.d.ts +6 -7
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js +7 -11
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js.map +1 -1
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.d.ts +8 -9
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js +7 -11
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.d.ts +5 -6
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js +6 -10
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.d.ts +7 -8
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js +5 -9
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.d.ts +4 -5
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js +4 -8
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.d.ts +5 -6
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js +6 -10
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.d.ts +7 -8
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js +5 -9
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.d.ts +4 -5
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js +4 -8
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js.map +1 -1
- package/dist/modules/secrets/SecretController.js +7 -7
- package/dist/modules/secrets/SecretController.js.map +1 -1
- package/dist/modules/secrets/data/SecretContainerCipher.d.ts +1 -1
- package/dist/modules/secrets/data/SecretContainerCipher.js +4 -5
- package/dist/modules/secrets/data/SecretContainerCipher.js.map +1 -1
- package/dist/modules/secrets/data/SecretContainerPlain.d.ts +7 -7
- package/dist/modules/secrets/data/SecretContainerPlain.js +5 -6
- package/dist/modules/secrets/data/SecretContainerPlain.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.js +4 -4
- package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -1
- package/dist/modules/sync/SyncController.js.map +1 -1
- package/dist/modules/sync/SynchronizedCollection.js +2 -2
- package/dist/modules/sync/SynchronizedCollection.js.map +1 -1
- package/dist/modules/sync/local/DatawalletModification.d.ts +0 -1
- package/dist/modules/sync/local/DatawalletModification.js +3 -7
- package/dist/modules/sync/local/DatawalletModification.js.map +1 -1
- package/dist/modules/tokens/AnonymousTokenController.js +6 -6
- package/dist/modules/tokens/AnonymousTokenController.js.map +1 -1
- package/dist/modules/tokens/TokenController.d.ts +2 -2
- package/dist/modules/tokens/TokenController.js +14 -14
- package/dist/modules/tokens/TokenController.js.map +1 -1
- package/dist/modules/tokens/local/CachedToken.d.ts +7 -8
- package/dist/modules/tokens/local/CachedToken.js +5 -9
- package/dist/modules/tokens/local/CachedToken.js.map +1 -1
- package/dist/modules/tokens/local/SendTokenParameters.d.ts +7 -8
- package/dist/modules/tokens/local/SendTokenParameters.js +5 -9
- package/dist/modules/tokens/local/SendTokenParameters.js.map +1 -1
- package/dist/modules/tokens/local/Token.d.ts +3 -4
- package/dist/modules/tokens/local/Token.js +12 -13
- package/dist/modules/tokens/local/Token.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.d.ts +4 -5
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js +4 -8
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentFile.d.ts +4 -5
- package/dist/modules/tokens/transmission/TokenContentFile.js +4 -8
- package/dist/modules/tokens/transmission/TokenContentFile.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.d.ts +4 -5
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js +4 -8
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenReference.d.ts +5 -6
- package/dist/modules/tokens/transmission/TokenReference.js +6 -14
- package/dist/modules/tokens/transmission/TokenReference.js.map +1 -1
- package/lib-web/nmshd.transport.js +944 -979
- package/lib-web/nmshd.transport.js.map +1 -1
- package/lib-web/nmshd.transport.min.js +1 -1
- package/lib-web/nmshd.transport.min.js.map +1 -1
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenContentFile.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TokenContentFile.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentFile.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAiE;AACjE,wCAAoF;AAQpF,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,uBAAgB;IAS3C,MAAM,CAAC,IAAI,CAAC,KAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AATG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACG,aAAM;gDAAA;AAIrB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;mDAAA;AAPxB,gBAAgB;IAD5B,IAAA,gBAAI,EAAC,kBAAkB,CAAC;GACZ,gBAAgB,CAY5B;AAZY,4CAAgB"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { CryptoSecretKey, ICryptoSecretKey } from "@nmshd/crypto";
|
|
2
|
-
import { CoreId,
|
|
3
|
-
export interface ITokenContentRelationshipTemplate extends
|
|
2
|
+
import { CoreId, CoreSerializable, ICoreId, ICoreSerializable } from "../../../core";
|
|
3
|
+
export interface ITokenContentRelationshipTemplate extends ICoreSerializable {
|
|
4
4
|
templateId: ICoreId;
|
|
5
5
|
secretKey: ICryptoSecretKey;
|
|
6
6
|
}
|
|
7
|
-
export declare class TokenContentRelationshipTemplate extends
|
|
7
|
+
export declare class TokenContentRelationshipTemplate extends CoreSerializable implements ITokenContentRelationshipTemplate {
|
|
8
8
|
templateId: CoreId;
|
|
9
9
|
secretKey: CryptoSecretKey;
|
|
10
|
-
static from(value: ITokenContentRelationshipTemplate):
|
|
11
|
-
static deserialize(value: string): Promise<TokenContentRelationshipTemplate>;
|
|
10
|
+
static from(value: ITokenContentRelationshipTemplate): TokenContentRelationshipTemplate;
|
|
12
11
|
}
|
|
@@ -8,18 +8,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
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
|
-
var TokenContentRelationshipTemplate_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.TokenContentRelationshipTemplate = void 0;
|
|
14
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
14
|
const crypto_1 = require("@nmshd/crypto");
|
|
16
15
|
const core_1 = require("../../../core");
|
|
17
|
-
let TokenContentRelationshipTemplate =
|
|
18
|
-
static
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
static async deserialize(value) {
|
|
22
|
-
return await super.deserializeT(value, TokenContentRelationshipTemplate_1);
|
|
16
|
+
let TokenContentRelationshipTemplate = class TokenContentRelationshipTemplate extends core_1.CoreSerializable {
|
|
17
|
+
static from(value) {
|
|
18
|
+
return this.fromAny(value);
|
|
23
19
|
}
|
|
24
20
|
};
|
|
25
21
|
__decorate([
|
|
@@ -32,7 +28,7 @@ __decorate([
|
|
|
32
28
|
(0, ts_serval_1.serialize)(),
|
|
33
29
|
__metadata("design:type", crypto_1.CryptoSecretKey)
|
|
34
30
|
], TokenContentRelationshipTemplate.prototype, "secretKey", void 0);
|
|
35
|
-
TokenContentRelationshipTemplate =
|
|
31
|
+
TokenContentRelationshipTemplate = __decorate([
|
|
36
32
|
(0, ts_serval_1.type)("TokenContentRelationshipTemplate")
|
|
37
33
|
], TokenContentRelationshipTemplate);
|
|
38
34
|
exports.TokenContentRelationshipTemplate = TokenContentRelationshipTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenContentRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentRelationshipTemplate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TokenContentRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAiE;AACjE,wCAAoF;AAQpF,IAAa,gCAAgC,GAA7C,MAAa,gCAAiC,SAAQ,uBAAgB;IAS3D,MAAM,CAAC,IAAI,CAAC,KAAwC;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AATG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACO,aAAM;oEAAA;AAIzB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;mEAAA;AAPxB,gCAAgC;IAD5C,IAAA,gBAAI,EAAC,kCAAkC,CAAC;GAC5B,gCAAgC,CAY5C;AAZY,4EAAgC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { CryptoSecretKey, ICryptoSecretKey } from "@nmshd/crypto";
|
|
2
|
-
import { CoreId,
|
|
3
|
-
export interface ITokenReference extends
|
|
2
|
+
import { CoreId, CoreSerializable, ICoreId, ICoreSerializable } from "../../../core";
|
|
3
|
+
export interface ITokenReference extends ICoreSerializable {
|
|
4
4
|
id: ICoreId;
|
|
5
5
|
key: ICryptoSecretKey;
|
|
6
6
|
}
|
|
7
|
-
export declare class TokenReference extends
|
|
7
|
+
export declare class TokenReference extends CoreSerializable implements ITokenReference {
|
|
8
8
|
id: CoreId;
|
|
9
9
|
key: CryptoSecretKey;
|
|
10
10
|
truncate(): string;
|
|
11
|
-
static fromTruncated(value: string):
|
|
12
|
-
static from(value: ITokenReference | string):
|
|
13
|
-
static deserialize(value: string): Promise<TokenReference>;
|
|
11
|
+
static fromTruncated(value: string): TokenReference;
|
|
12
|
+
static from(value: ITokenReference | string): TokenReference;
|
|
14
13
|
}
|
|
@@ -14,12 +14,12 @@ exports.TokenReference = void 0;
|
|
|
14
14
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
15
|
const crypto_1 = require("@nmshd/crypto");
|
|
16
16
|
const core_1 = require("../../../core");
|
|
17
|
-
let TokenReference = TokenReference_1 = class TokenReference extends core_1.
|
|
17
|
+
let TokenReference = TokenReference_1 = class TokenReference extends core_1.CoreSerializable {
|
|
18
18
|
truncate() {
|
|
19
19
|
const truncatedReference = crypto_1.CoreBuffer.fromUtf8(`${this.id.toString()}|${this.key.algorithm}|${this.key.secretKey.toBase64URL()}`);
|
|
20
20
|
return truncatedReference.toBase64URL();
|
|
21
21
|
}
|
|
22
|
-
static
|
|
22
|
+
static fromTruncated(value) {
|
|
23
23
|
const truncatedBuffer = crypto_1.CoreBuffer.fromBase64URL(value);
|
|
24
24
|
const splitted = truncatedBuffer.toUtf8().split("|");
|
|
25
25
|
if (splitted.length !== 3) {
|
|
@@ -29,11 +29,11 @@ let TokenReference = TokenReference_1 = class TokenReference extends core_1.Core
|
|
|
29
29
|
const id = core_1.CoreId.from(splitted[0]);
|
|
30
30
|
const alg = parseInt(splitted[1]);
|
|
31
31
|
const key = splitted[2];
|
|
32
|
-
const secretKey =
|
|
32
|
+
const secretKey = crypto_1.CryptoSecretKey.from({
|
|
33
33
|
algorithm: alg,
|
|
34
34
|
secretKey: crypto_1.CoreBuffer.fromBase64URL(key)
|
|
35
35
|
});
|
|
36
|
-
return
|
|
36
|
+
return TokenReference_1.from({
|
|
37
37
|
id: id,
|
|
38
38
|
key: secretKey
|
|
39
39
|
});
|
|
@@ -42,16 +42,8 @@ let TokenReference = TokenReference_1 = class TokenReference extends core_1.Core
|
|
|
42
42
|
throw core_1.TransportErrors.tokens.invalidTruncatedReference();
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
static
|
|
46
|
-
return
|
|
47
|
-
}
|
|
48
|
-
static async deserialize(value) {
|
|
49
|
-
try {
|
|
50
|
-
return await super.deserializeT(value, TokenReference_1);
|
|
51
|
-
}
|
|
52
|
-
catch (e) {
|
|
53
|
-
return await this.from(value);
|
|
54
|
-
}
|
|
45
|
+
static from(value) {
|
|
46
|
+
return this.fromAny(value);
|
|
55
47
|
}
|
|
56
48
|
};
|
|
57
49
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenReference.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenReference.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAA6E;AAC7E,
|
|
1
|
+
{"version":3,"file":"TokenReference.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenReference.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAA6E;AAC7E,wCAAqG;AAQrG,IAAa,cAAc,sBAA3B,MAAa,cAAe,SAAQ,uBAAgB;IASzC,QAAQ;QACX,MAAM,kBAAkB,GAAG,mBAAU,CAAC,QAAQ,CAC1C,GAAG,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,CACpF,CAAA;QACD,OAAO,kBAAkB,CAAC,WAAW,EAAE,CAAA;IAC3C,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,KAAa;QACrC,MAAM,eAAe,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACvD,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAEpD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YACvB,MAAM,sBAAe,CAAC,MAAM,CAAC,yBAAyB,EAAE,CAAA;SAC3D;QACD,IAAI;YACA,MAAM,EAAE,GAAG,aAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YACnC,MAAM,GAAG,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YACjC,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;YACvB,MAAM,SAAS,GAAG,wBAAe,CAAC,IAAI,CAAC;gBACnC,SAAS,EAAE,GAAG;gBACd,SAAS,EAAE,mBAAU,CAAC,aAAa,CAAC,GAAG,CAAC;aAC3C,CAAC,CAAA;YAEF,OAAO,gBAAc,CAAC,IAAI,CAAC;gBACvB,EAAE,EAAE,EAAE;gBACN,GAAG,EAAE,SAAS;aACjB,CAAC,CAAA;SACL;QAAC,OAAO,CAAC,EAAE;YACR,MAAM,sBAAe,CAAC,MAAM,CAAC,yBAAyB,EAAE,CAAA;SAC3D;IACL,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,KAA+B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAzCG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACD,aAAM;0CAAA;AAIjB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACA,wBAAe;2CAAA;AAPlB,cAAc;IAD1B,IAAA,gBAAI,EAAC,gBAAgB,CAAC;GACV,cAAc,CA4C1B;AA5CY,wCAAc"}
|