@nmshd/transport 1.1.10 → 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 +5 -5
- 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/ProgressReporter.d.ts +18 -0
- package/dist/core/ProgressReporter.js +45 -0
- package/dist/core/ProgressReporter.js.map +1 -0
- 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/Paginator.d.ts +7 -1
- package/dist/core/backbone/Paginator.js +25 -1
- package/dist/core/backbone/Paginator.js.map +1 -1
- package/dist/core/backbone/RESTClient.d.ts +2 -2
- package/dist/core/backbone/RESTClient.js +4 -4
- package/dist/core/backbone/RESTClient.js.map +1 -1
- package/dist/core/backbone/RESTClientAuthenticate.d.ts +2 -2
- package/dist/core/backbone/RESTClientAuthenticate.js +2 -2
- package/dist/core/backbone/RESTClientAuthenticate.js.map +1 -1
- package/dist/core/backbone/RequestError.js.map +1 -1
- package/dist/core/backbone/index.js +5 -1
- package/dist/core/backbone/index.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +6 -1
- package/dist/core/index.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/core/types/index.js +5 -1
- package/dist/core/types/index.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/accounts/AccountController.d.ts +3 -2
- package/dist/modules/accounts/AccountController.js +12 -9
- 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/index.d.ts +1 -0
- package/dist/modules/index.js +8 -1
- package/dist/modules/index.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 +11 -11
- 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 +10 -10
- 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 +10 -10
- 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.d.ts +3 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.js +18 -5
- package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -1
- package/dist/modules/sync/ExternalEventsProcessor.d.ts +3 -1
- package/dist/modules/sync/ExternalEventsProcessor.js +6 -1
- package/dist/modules/sync/ExternalEventsProcessor.js.map +1 -1
- package/dist/modules/sync/SyncCallback.d.ts +17 -0
- package/dist/modules/sync/SyncCallback.js +25 -0
- package/dist/modules/sync/SyncCallback.js.map +1 -0
- package/dist/modules/sync/SyncController.d.ts +6 -4
- package/dist/modules/sync/SyncController.js +55 -31
- 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/backbone/SyncClient.d.ts +5 -5
- package/dist/modules/sync/backbone/SyncClient.js +5 -5
- package/dist/modules/sync/backbone/SyncClient.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/dist/util/index.js +5 -1
- package/dist/util/index.js.map +1 -1
- package/lib-web/nmshd.transport.js +1336 -1123
- 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 +23 -21
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CoreAddress, CoreDate, CoreId,
|
|
3
|
-
export interface ICachedToken extends
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
+
import { CoreAddress, CoreDate, CoreId, CoreSerializable, ICoreAddress, ICoreDate, ICoreId, ICoreSerializable } from "../../../core";
|
|
3
|
+
export interface ICachedToken extends ICoreSerializable {
|
|
4
4
|
createdBy: ICoreAddress;
|
|
5
5
|
createdAt: ICoreDate;
|
|
6
6
|
expiresAt: ICoreDate;
|
|
7
|
-
content:
|
|
7
|
+
content: ISerializable;
|
|
8
8
|
createdByDevice: ICoreId;
|
|
9
9
|
}
|
|
10
|
-
export declare class CachedToken extends
|
|
10
|
+
export declare class CachedToken extends CoreSerializable implements ICachedToken {
|
|
11
11
|
createdBy: CoreAddress;
|
|
12
12
|
createdAt: CoreDate;
|
|
13
13
|
expiresAt: CoreDate;
|
|
14
|
-
content:
|
|
14
|
+
content: Serializable;
|
|
15
15
|
createdByDevice: CoreId;
|
|
16
|
-
static from(value: ICachedToken):
|
|
17
|
-
static deserialize(value: string): Promise<CachedToken>;
|
|
16
|
+
static from(value: ICachedToken): CachedToken;
|
|
18
17
|
}
|
|
@@ -8,17 +8,13 @@ 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 CachedToken_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.CachedToken = void 0;
|
|
14
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
14
|
const core_1 = require("../../../core");
|
|
16
|
-
let CachedToken =
|
|
17
|
-
static
|
|
18
|
-
return
|
|
19
|
-
}
|
|
20
|
-
static async deserialize(value) {
|
|
21
|
-
return await super.deserializeT(value, CachedToken_1);
|
|
15
|
+
let CachedToken = class CachedToken extends core_1.CoreSerializable {
|
|
16
|
+
static from(value) {
|
|
17
|
+
return this.fromAny(value);
|
|
22
18
|
}
|
|
23
19
|
};
|
|
24
20
|
__decorate([
|
|
@@ -39,14 +35,14 @@ __decorate([
|
|
|
39
35
|
__decorate([
|
|
40
36
|
(0, ts_serval_1.validate)(),
|
|
41
37
|
(0, ts_serval_1.serialize)(),
|
|
42
|
-
__metadata("design:type", ts_serval_1.
|
|
38
|
+
__metadata("design:type", ts_serval_1.Serializable)
|
|
43
39
|
], CachedToken.prototype, "content", void 0);
|
|
44
40
|
__decorate([
|
|
45
41
|
(0, ts_serval_1.validate)(),
|
|
46
42
|
(0, ts_serval_1.serialize)(),
|
|
47
43
|
__metadata("design:type", core_1.CoreId)
|
|
48
44
|
], CachedToken.prototype, "createdByDevice", void 0);
|
|
49
|
-
CachedToken =
|
|
45
|
+
CachedToken = __decorate([
|
|
50
46
|
(0, ts_serval_1.type)("CachedToken")
|
|
51
47
|
], CachedToken);
|
|
52
48
|
exports.CachedToken = CachedToken;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CachedToken.js","sourceRoot":"","sources":["../../../../src/modules/tokens/local/CachedToken.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CachedToken.js","sourceRoot":"","sources":["../../../../src/modules/tokens/local/CachedToken.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAC3F,wCASsB;AAWtB,IAAa,WAAW,GAAxB,MAAa,WAAY,SAAQ,uBAAgB;IAqBtC,MAAM,CAAC,IAAI,CAAC,KAAmB;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AArBG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,kBAAW;8CAAA;AAI7B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,eAAQ;8CAAA;AAI1B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,eAAQ;8CAAA;AAI1B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,wBAAY;4CAAA;AAI5B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACY,aAAM;oDAAA;AAnBrB,WAAW;IADvB,IAAA,gBAAI,EAAC,aAAa,CAAC;GACP,WAAW,CAwBvB;AAxBY,kCAAW"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CoreDate,
|
|
3
|
-
export interface ISendTokenParameters extends
|
|
4
|
-
content:
|
|
1
|
+
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
+
import { CoreDate, CoreSerializable, ICoreDate, ICoreSerializable } from "../../../core";
|
|
3
|
+
export interface ISendTokenParameters extends ICoreSerializable {
|
|
4
|
+
content: ISerializable;
|
|
5
5
|
expiresAt: ICoreDate;
|
|
6
6
|
ephemeral: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare class SendTokenParameters extends
|
|
9
|
-
content:
|
|
8
|
+
export declare class SendTokenParameters extends CoreSerializable implements ISendTokenParameters {
|
|
9
|
+
content: Serializable;
|
|
10
10
|
expiresAt: CoreDate;
|
|
11
11
|
ephemeral: boolean;
|
|
12
|
-
static from(value: ISendTokenParameters):
|
|
13
|
-
static deserialize(value: string): Promise<SendTokenParameters>;
|
|
12
|
+
static from(value: ISendTokenParameters): SendTokenParameters;
|
|
14
13
|
}
|
|
@@ -8,23 +8,19 @@ 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 SendTokenParameters_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.SendTokenParameters = void 0;
|
|
14
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
14
|
const core_1 = require("../../../core");
|
|
16
|
-
let SendTokenParameters =
|
|
17
|
-
static
|
|
18
|
-
return
|
|
19
|
-
}
|
|
20
|
-
static async deserialize(value) {
|
|
21
|
-
return await super.deserializeT(value, SendTokenParameters_1);
|
|
15
|
+
let SendTokenParameters = class SendTokenParameters extends core_1.CoreSerializable {
|
|
16
|
+
static from(value) {
|
|
17
|
+
return this.fromAny(value);
|
|
22
18
|
}
|
|
23
19
|
};
|
|
24
20
|
__decorate([
|
|
25
21
|
(0, ts_serval_1.validate)(),
|
|
26
22
|
(0, ts_serval_1.serialize)(),
|
|
27
|
-
__metadata("design:type", ts_serval_1.
|
|
23
|
+
__metadata("design:type", ts_serval_1.Serializable)
|
|
28
24
|
], SendTokenParameters.prototype, "content", void 0);
|
|
29
25
|
__decorate([
|
|
30
26
|
(0, ts_serval_1.validate)(),
|
|
@@ -36,7 +32,7 @@ __decorate([
|
|
|
36
32
|
(0, ts_serval_1.serialize)(),
|
|
37
33
|
__metadata("design:type", Boolean)
|
|
38
34
|
], SendTokenParameters.prototype, "ephemeral", void 0);
|
|
39
|
-
SendTokenParameters =
|
|
35
|
+
SendTokenParameters = __decorate([
|
|
40
36
|
(0, ts_serval_1.type)("SendTokenParameters")
|
|
41
37
|
], SendTokenParameters);
|
|
42
38
|
exports.SendTokenParameters = SendTokenParameters;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendTokenParameters.js","sourceRoot":"","sources":["../../../../src/modules/tokens/local/SendTokenParameters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SendTokenParameters.js","sourceRoot":"","sources":["../../../../src/modules/tokens/local/SendTokenParameters.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2F;AAC3F,wCAAwF;AASxF,IAAa,mBAAmB,GAAhC,MAAa,mBAAoB,SAAQ,uBAAgB;IAa9C,MAAM,CAAC,IAAI,CAAC,KAA2B;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAbG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACI,wBAAY;oDAAA;AAI5B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,eAAQ;sDAAA;AAI1B;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;sDACa;AAXhB,mBAAmB;IAD/B,IAAA,gBAAI,EAAC,qBAAqB,CAAC;GACf,mBAAmB,CAgB/B;AAhBY,kDAAmB"}
|
|
@@ -19,10 +19,9 @@ export declare class Token extends CoreSynchronizable implements IToken {
|
|
|
19
19
|
cachedAt?: CoreDate;
|
|
20
20
|
metadata?: any;
|
|
21
21
|
metadataModifiedAt?: CoreDate;
|
|
22
|
-
static from(value: IToken):
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
truncate(): Promise<string>;
|
|
22
|
+
static from(value: IToken): Token;
|
|
23
|
+
toTokenReference(): TokenReference;
|
|
24
|
+
truncate(): string;
|
|
26
25
|
setCache(cache: CachedToken): this;
|
|
27
26
|
setMetadata(metadata: any): void;
|
|
28
27
|
}
|
|
@@ -8,7 +8,6 @@ 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 Token_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.Token = void 0;
|
|
14
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
@@ -17,7 +16,7 @@ const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
|
17
16
|
const core_1 = require("../../../core");
|
|
18
17
|
const TokenReference_1 = require("../transmission/TokenReference");
|
|
19
18
|
const CachedToken_1 = require("./CachedToken");
|
|
20
|
-
let Token =
|
|
19
|
+
let Token = class Token extends core_1.CoreSynchronizable {
|
|
21
20
|
constructor() {
|
|
22
21
|
super(...arguments);
|
|
23
22
|
this.technicalProperties = [
|
|
@@ -26,22 +25,22 @@ let Token = Token_1 = class Token extends core_1.CoreSynchronizable {
|
|
|
26
25
|
(0, ts_simple_nameof_1.nameof)((r) => r.secretKey),
|
|
27
26
|
(0, ts_simple_nameof_1.nameof)((r) => r.isOwn)
|
|
28
27
|
];
|
|
29
|
-
this.metadataProperties = [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
this.metadataProperties = [
|
|
29
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.metadata),
|
|
30
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.metadataModifiedAt)
|
|
31
|
+
];
|
|
33
32
|
}
|
|
34
|
-
static
|
|
35
|
-
return
|
|
33
|
+
static from(value) {
|
|
34
|
+
return this.fromAny(value);
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
return
|
|
36
|
+
toTokenReference() {
|
|
37
|
+
return TokenReference_1.TokenReference.from({
|
|
39
38
|
id: this.id,
|
|
40
39
|
key: this.secretKey
|
|
41
40
|
});
|
|
42
41
|
}
|
|
43
|
-
|
|
44
|
-
const tokenReference =
|
|
42
|
+
truncate() {
|
|
43
|
+
const tokenReference = this.toTokenReference();
|
|
45
44
|
return tokenReference.truncate();
|
|
46
45
|
}
|
|
47
46
|
setCache(cache) {
|
|
@@ -84,7 +83,7 @@ __decorate([
|
|
|
84
83
|
(0, ts_serval_1.serialize)(),
|
|
85
84
|
__metadata("design:type", core_1.CoreDate)
|
|
86
85
|
], Token.prototype, "metadataModifiedAt", void 0);
|
|
87
|
-
Token =
|
|
86
|
+
Token = __decorate([
|
|
88
87
|
(0, ts_serval_1.type)("Token")
|
|
89
88
|
], Token);
|
|
90
89
|
exports.Token = Token;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Token.js","sourceRoot":"","sources":["../../../../src/modules/tokens/local/Token.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Token.js","sourceRoot":"","sources":["../../../../src/modules/tokens/local/Token.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAiE;AACjE,uDAAyC;AACzC,wCAA4F;AAC5F,mEAA+D;AAC/D,+CAAyD;AAYzD,IAAa,KAAK,GAAlB,MAAa,KAAM,SAAQ,yBAAkB;IAA7C;;QAC6B,wBAAmB,GAAG;YAC3C,OAAO;YACP,UAAU;YACV,IAAA,yBAAM,EAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YACjC,IAAA,yBAAM,EAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;SAChC,CAAA;QAEwB,uBAAkB,GAAG;YAC1C,IAAA,yBAAM,EAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YAChC,IAAA,yBAAM,EAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC;SAC7C,CAAA;IAoDL,CAAC;IA1BU,MAAM,CAAC,IAAI,CAAC,KAAa;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;IAEM,gBAAgB;QACnB,OAAO,+BAAc,CAAC,IAAI,CAAC;YACvB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,GAAG,EAAE,IAAI,CAAC,SAAS;SACtB,CAAC,CAAA;IACN,CAAC;IAEM,QAAQ;QACX,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;QAC9C,OAAO,cAAc,CAAC,QAAQ,EAAE,CAAA;IACpC,CAAC;IAEM,QAAQ,CAAC,KAAkB;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,QAAQ,GAAG,eAAQ,CAAC,GAAG,EAAE,CAAA;QAC9B,OAAO,IAAI,CAAA;IACf,CAAC;IAEM,WAAW,CAAC,QAAa;QAC5B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,kBAAkB,GAAG,eAAQ,CAAC,GAAG,EAAE,CAAA;IAC5C,CAAC;CACJ,CAAA;AAhDG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;wCAAA;AAIjC;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;oCACS;AAIrB;IAFC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACG,yBAAW;oCAAA;AAI1B;IAFC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACM,eAAQ;uCAAA;AAI1B;IAFC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;;uCACS;AAIrB;IAFC,IAAA,oBAAQ,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACgB,eAAQ;iDAAA;AAnC3B,KAAK;IADjB,IAAA,gBAAI,EAAC,OAAO,CAAC;GACD,KAAK,CA+DjB;AA/DY,sBAAK"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CoreSerializable, ICoreSerializable } from "../../../core";
|
|
2
2
|
import { DeviceSharedSecret } from "../../devices/transmission/DeviceSharedSecret";
|
|
3
|
-
export interface ITokenContentDeviceSharedSecret extends
|
|
3
|
+
export interface ITokenContentDeviceSharedSecret extends ICoreSerializable {
|
|
4
4
|
sharedSecret: DeviceSharedSecret;
|
|
5
5
|
}
|
|
6
|
-
export declare class TokenContentDeviceSharedSecret extends
|
|
6
|
+
export declare class TokenContentDeviceSharedSecret extends CoreSerializable implements ITokenContentDeviceSharedSecret {
|
|
7
7
|
sharedSecret: DeviceSharedSecret;
|
|
8
|
-
static from(value: ITokenContentDeviceSharedSecret):
|
|
9
|
-
static deserialize(value: string): Promise<TokenContentDeviceSharedSecret>;
|
|
8
|
+
static from(value: ITokenContentDeviceSharedSecret): TokenContentDeviceSharedSecret;
|
|
10
9
|
}
|
|
@@ -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 TokenContentDeviceSharedSecret_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.TokenContentDeviceSharedSecret = void 0;
|
|
14
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
15
14
|
const core_1 = require("../../../core");
|
|
16
15
|
const DeviceSharedSecret_1 = require("../../devices/transmission/DeviceSharedSecret");
|
|
17
|
-
let TokenContentDeviceSharedSecret =
|
|
18
|
-
static
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
static async deserialize(value) {
|
|
22
|
-
return await super.deserializeT(value, TokenContentDeviceSharedSecret_1);
|
|
16
|
+
let TokenContentDeviceSharedSecret = class TokenContentDeviceSharedSecret extends core_1.CoreSerializable {
|
|
17
|
+
static from(value) {
|
|
18
|
+
return this.fromAny(value);
|
|
23
19
|
}
|
|
24
20
|
};
|
|
25
21
|
__decorate([
|
|
@@ -27,7 +23,7 @@ __decorate([
|
|
|
27
23
|
(0, ts_serval_1.serialize)(),
|
|
28
24
|
__metadata("design:type", DeviceSharedSecret_1.DeviceSharedSecret)
|
|
29
25
|
], TokenContentDeviceSharedSecret.prototype, "sharedSecret", void 0);
|
|
30
|
-
TokenContentDeviceSharedSecret =
|
|
26
|
+
TokenContentDeviceSharedSecret = __decorate([
|
|
31
27
|
(0, ts_serval_1.type)("TokenContentDeviceSharedSecret")
|
|
32
28
|
], TokenContentDeviceSharedSecret);
|
|
33
29
|
exports.TokenContentDeviceSharedSecret = TokenContentDeviceSharedSecret;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenContentDeviceSharedSecret.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentDeviceSharedSecret.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TokenContentDeviceSharedSecret.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentDeviceSharedSecret.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,wCAAmE;AACnE,sFAAkF;AAOlF,IAAa,8BAA8B,GAA3C,MAAa,8BAA+B,SAAQ,uBAAgB;IAKzD,MAAM,CAAC,IAAI,CAAC,KAAsC;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AALG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACS,uCAAkB;oEAAA;AAH9B,8BAA8B;IAD1C,IAAA,gBAAI,EAAC,gCAAgC,CAAC;GAC1B,8BAA8B,CAQ1C;AARY,wEAA8B"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { CryptoSecretKey, ICryptoSecretKey } from "@nmshd/crypto";
|
|
2
|
-
import { CoreId,
|
|
3
|
-
export interface ITokenContentFile extends
|
|
2
|
+
import { CoreId, CoreSerializable, ICoreId, ICoreSerializable } from "../../../core";
|
|
3
|
+
export interface ITokenContentFile extends ICoreSerializable {
|
|
4
4
|
fileId: ICoreId;
|
|
5
5
|
secretKey: ICryptoSecretKey;
|
|
6
6
|
}
|
|
7
|
-
export declare class TokenContentFile extends
|
|
7
|
+
export declare class TokenContentFile extends CoreSerializable implements ITokenContentFile {
|
|
8
8
|
fileId: CoreId;
|
|
9
9
|
secretKey: CryptoSecretKey;
|
|
10
|
-
static from(value: ITokenContentFile):
|
|
11
|
-
static deserialize(value: string): Promise<TokenContentFile>;
|
|
10
|
+
static from(value: ITokenContentFile): TokenContentFile;
|
|
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 TokenContentFile_1;
|
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
12
|
exports.TokenContentFile = 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 TokenContentFile =
|
|
18
|
-
static
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
static async deserialize(value) {
|
|
22
|
-
return await super.deserializeT(value, TokenContentFile_1);
|
|
16
|
+
let TokenContentFile = class TokenContentFile 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
|
], TokenContentFile.prototype, "secretKey", void 0);
|
|
35
|
-
TokenContentFile =
|
|
31
|
+
TokenContentFile = __decorate([
|
|
36
32
|
(0, ts_serval_1.type)("TokenContentFile")
|
|
37
33
|
], TokenContentFile);
|
|
38
34
|
exports.TokenContentFile = TokenContentFile;
|
|
@@ -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"}
|
package/dist/util/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAmC;AACnC,2CAAwB"}
|