@nmshd/runtime 2.5.4 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Runtime.js.map +1 -1
- package/dist/buildInformation.js +5 -5
- package/dist/events/DataEvent.js.map +1 -1
- package/dist/events/EventProxy.js.map +1 -1
- package/dist/events/consumption/MailReceivedEvent.js.map +1 -1
- package/dist/events/consumption/RelationshipEvent.js.map +1 -1
- package/dist/extensibility/facades/transport/ChallengesFacade.js +2 -1
- package/dist/extensibility/facades/transport/ChallengesFacade.js.map +1 -1
- package/dist/extensibility/modules/RuntimeModule.js.map +1 -1
- package/dist/types/transport/DeviceDTO.d.ts +1 -0
- package/dist/useCases/anonymous/tokens/LoadPeerTokenAnonymousByIdAndKey.js +2 -1
- package/dist/useCases/anonymous/tokens/LoadPeerTokenAnonymousByIdAndKey.js.map +1 -1
- package/dist/useCases/anonymous/tokens/LoadPeerTokenAnonymousByTruncatedReference.js +2 -1
- package/dist/useCases/anonymous/tokens/LoadPeerTokenAnonymousByTruncatedReference.js.map +1 -1
- package/dist/useCases/common/validation/ValidationFailure.js.map +1 -1
- package/dist/useCases/consumption/attributeListeners/GetAttributeListener.js +2 -1
- package/dist/useCases/consumption/attributeListeners/GetAttributeListener.js.map +1 -1
- package/dist/useCases/consumption/attributes/ExecuteIQLQuery.js +2 -1
- package/dist/useCases/consumption/attributes/ExecuteIQLQuery.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetAttribute.js +2 -1
- package/dist/useCases/consumption/attributes/GetAttribute.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetSharedToPeerAttributes.js +2 -1
- package/dist/useCases/consumption/attributes/GetSharedToPeerAttributes.js.map +1 -1
- package/dist/useCases/consumption/drafts/CreateDraft.js +3 -1
- package/dist/useCases/consumption/drafts/CreateDraft.js.map +1 -1
- package/dist/useCases/consumption/drafts/DeleteDraft.js +3 -1
- package/dist/useCases/consumption/drafts/DeleteDraft.js.map +1 -1
- package/dist/useCases/consumption/drafts/GetDraft.js +2 -1
- package/dist/useCases/consumption/drafts/GetDraft.js.map +1 -1
- package/dist/useCases/consumption/drafts/GetDrafts.js +2 -1
- package/dist/useCases/consumption/drafts/GetDrafts.js.map +1 -1
- package/dist/useCases/consumption/drafts/UpdateDraft.js +3 -1
- package/dist/useCases/consumption/drafts/UpdateDraft.js.map +1 -1
- package/dist/useCases/consumption/requests/CompleteOutgoingRequest.js +2 -1
- package/dist/useCases/consumption/requests/CompleteOutgoingRequest.js.map +1 -1
- package/dist/useCases/consumption/requests/SentOutgoingRequest.js +2 -1
- package/dist/useCases/consumption/requests/SentOutgoingRequest.js.map +1 -1
- package/dist/useCases/consumption/settings/GetSetting.js +2 -1
- package/dist/useCases/consumption/settings/GetSetting.js.map +1 -1
- package/dist/useCases/consumption/settings/GetSettings.js +2 -1
- package/dist/useCases/consumption/settings/GetSettings.js.map +1 -1
- package/dist/useCases/transport/account/GetDeviceInfo.js +1 -1
- package/dist/useCases/transport/account/GetDeviceInfo.js.map +1 -1
- package/dist/useCases/transport/account/RegisterPushNotificationToken.js +2 -1
- package/dist/useCases/transport/account/RegisterPushNotificationToken.js.map +1 -1
- package/dist/useCases/transport/account/SyncEverything.js +2 -1
- package/dist/useCases/transport/account/SyncEverything.js.map +1 -1
- package/dist/useCases/transport/challenges/ValidateChallenge.js +2 -1
- package/dist/useCases/transport/challenges/ValidateChallenge.js.map +1 -1
- package/dist/useCases/transport/devices/CreateDevice.js +4 -2
- package/dist/useCases/transport/devices/CreateDevice.js.map +1 -1
- package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.js +3 -1
- package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.js.map +1 -1
- package/dist/useCases/transport/devices/DeleteDevice.js +3 -1
- package/dist/useCases/transport/devices/DeleteDevice.js.map +1 -1
- package/dist/useCases/transport/devices/DeviceMapper.d.ts +1 -1
- package/dist/useCases/transport/devices/DeviceMapper.js +3 -2
- package/dist/useCases/transport/devices/DeviceMapper.js.map +1 -1
- package/dist/useCases/transport/devices/GetDevice.d.ts +3 -2
- package/dist/useCases/transport/devices/GetDevice.js +9 -3
- package/dist/useCases/transport/devices/GetDevice.js.map +1 -1
- package/dist/useCases/transport/devices/GetDeviceOnboardingInfo.js +2 -1
- package/dist/useCases/transport/devices/GetDeviceOnboardingInfo.js.map +1 -1
- package/dist/useCases/transport/devices/GetDevices.d.ts +3 -2
- package/dist/useCases/transport/devices/GetDevices.js +7 -3
- package/dist/useCases/transport/devices/GetDevices.js.map +1 -1
- package/dist/useCases/transport/devices/UpdateDevice.d.ts +3 -2
- package/dist/useCases/transport/devices/UpdateDevice.js +11 -4
- package/dist/useCases/transport/devices/UpdateDevice.js.map +1 -1
- package/dist/useCases/transport/files/CreateQrCodeForFile.js +2 -1
- package/dist/useCases/transport/files/CreateQrCodeForFile.js.map +1 -1
- package/dist/useCases/transport/files/CreateTokenQrCodeForFile.js +3 -1
- package/dist/useCases/transport/files/CreateTokenQrCodeForFile.js.map +1 -1
- package/dist/useCases/transport/files/DownloadFile.js +2 -1
- package/dist/useCases/transport/files/DownloadFile.js.map +1 -1
- package/dist/useCases/transport/files/GetFile.js +2 -1
- package/dist/useCases/transport/files/GetFile.js.map +1 -1
- package/dist/useCases/transport/files/GetFiles.js +2 -1
- package/dist/useCases/transport/files/GetFiles.js.map +1 -1
- package/dist/useCases/transport/files/UploadOwnFile.js +3 -1
- package/dist/useCases/transport/files/UploadOwnFile.js.map +1 -1
- package/dist/useCases/transport/messages/DownloadAttachment.js +3 -1
- package/dist/useCases/transport/messages/DownloadAttachment.js.map +1 -1
- package/dist/useCases/transport/messages/GetAttachmentMetadata.js +3 -1
- package/dist/useCases/transport/messages/GetAttachmentMetadata.js.map +1 -1
- package/dist/useCases/transport/messages/GetMessage.js +3 -1
- package/dist/useCases/transport/messages/GetMessage.js.map +1 -1
- package/dist/useCases/transport/messages/GetMessages.js +2 -1
- package/dist/useCases/transport/messages/GetMessages.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/CreateQrCodeForOwnRelationshipTemplate.js +2 -1
- package/dist/useCases/transport/relationshipTemplates/CreateQrCodeForOwnRelationshipTemplate.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplate.js +2 -1
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplate.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js +2 -1
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js.map +1 -1
- package/dist/useCases/transport/relationships/GetRelationship.js +2 -1
- package/dist/useCases/transport/relationships/GetRelationship.js.map +1 -1
- package/dist/useCases/transport/relationships/GetRelationshipByAddress.js +2 -1
- package/dist/useCases/transport/relationships/GetRelationshipByAddress.js.map +1 -1
- package/dist/useCases/transport/relationships/GetRelationships.js +2 -1
- package/dist/useCases/transport/relationships/GetRelationships.js.map +1 -1
- package/dist/useCases/transport/tokens/CreateOwnToken.js +3 -1
- package/dist/useCases/transport/tokens/CreateOwnToken.js.map +1 -1
- package/dist/useCases/transport/tokens/GetQRCodeForToken.js +2 -1
- package/dist/useCases/transport/tokens/GetQRCodeForToken.js.map +1 -1
- package/dist/useCases/transport/tokens/GetToken.js +2 -1
- package/dist/useCases/transport/tokens/GetToken.js.map +1 -1
- package/dist/useCases/transport/tokens/GetTokens.js +2 -1
- package/dist/useCases/transport/tokens/GetTokens.js.map +1 -1
- package/dist/useCases/transport/tokens/LoadPeerToken.js +3 -1
- package/dist/useCases/transport/tokens/LoadPeerToken.js.map +1 -1
- package/lib-web/nmshd.runtime.js +301 -145
- package/lib-web/nmshd.runtime.js.map +1 -1
- package/lib-web/nmshd.runtime.min.js +2 -2
- package/lib-web/nmshd.runtime.min.js.map +1 -1
- package/package.json +9 -9
package/lib-web/nmshd.runtime.js
CHANGED
|
@@ -548,11 +548,11 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
|
|
|
548
548
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
549
549
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
550
550
|
exports.buildInformation = {
|
|
551
|
-
version: "2.
|
|
552
|
-
build: "
|
|
553
|
-
date: "2023-
|
|
554
|
-
commit: "
|
|
555
|
-
dependencies: {"@js-soft/docdb-querytranslator":"1.1.0","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.
|
|
551
|
+
version: "2.6.0",
|
|
552
|
+
build: "161",
|
|
553
|
+
date: "2023-08-14T11:46:35+00:00",
|
|
554
|
+
commit: "3bc0a7d1b8c05d5706f9b4cac0b63d689287a732",
|
|
555
|
+
dependencies: {"@js-soft/docdb-querytranslator":"1.1.0","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.9","@js-soft/ts-utils":"^2.3.1","@nmshd/consumption":"3.2.2","@nmshd/content":"2.3.6","@nmshd/crypto":"2.0.4","@nmshd/transport":"2.0.5","ajv":"^8.12.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^3.4.0","qrcode":"1.5.3","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
|
|
556
556
|
libraries: {
|
|
557
557
|
serval: ts_serval_1.buildInformation,
|
|
558
558
|
consumption: consumption_1.buildInformation,
|
|
@@ -4246,7 +4246,8 @@ let ChallengesFacade = exports.ChallengesFacade = class ChallengesFacade {
|
|
|
4246
4246
|
exports.ChallengesFacade = ChallengesFacade = __decorate([
|
|
4247
4247
|
__param(0, typescript_ioc_1.Inject),
|
|
4248
4248
|
__param(1, typescript_ioc_1.Inject),
|
|
4249
|
-
__metadata("design:paramtypes", [useCases_1.CreateChallengeUseCase,
|
|
4249
|
+
__metadata("design:paramtypes", [useCases_1.CreateChallengeUseCase,
|
|
4250
|
+
useCases_1.ValidateChallengeUseCase])
|
|
4250
4251
|
], ChallengesFacade);
|
|
4251
4252
|
//# sourceMappingURL=ChallengesFacade.js.map
|
|
4252
4253
|
|
|
@@ -5898,7 +5899,8 @@ let LoadPeerTokenAnonymousByIdAndKeyUseCase = exports.LoadPeerTokenAnonymousById
|
|
|
5898
5899
|
exports.LoadPeerTokenAnonymousByIdAndKeyUseCase = LoadPeerTokenAnonymousByIdAndKeyUseCase = __decorate([
|
|
5899
5900
|
__param(0, typescript_ioc_1.Inject),
|
|
5900
5901
|
__param(1, typescript_ioc_1.Inject),
|
|
5901
|
-
__metadata("design:paramtypes", [transport_1.AnonymousTokenController,
|
|
5902
|
+
__metadata("design:paramtypes", [transport_1.AnonymousTokenController,
|
|
5903
|
+
Validator])
|
|
5902
5904
|
], LoadPeerTokenAnonymousByIdAndKeyUseCase);
|
|
5903
5905
|
//# sourceMappingURL=LoadPeerTokenAnonymousByIdAndKey.js.map
|
|
5904
5906
|
|
|
@@ -5953,7 +5955,8 @@ let LoadPeerTokenAnonymousByTruncatedReferenceUseCase = exports.LoadPeerTokenAno
|
|
|
5953
5955
|
exports.LoadPeerTokenAnonymousByTruncatedReferenceUseCase = LoadPeerTokenAnonymousByTruncatedReferenceUseCase = __decorate([
|
|
5954
5956
|
__param(0, typescript_ioc_1.Inject),
|
|
5955
5957
|
__param(1, typescript_ioc_1.Inject),
|
|
5956
|
-
__metadata("design:paramtypes", [transport_1.AnonymousTokenController,
|
|
5958
|
+
__metadata("design:paramtypes", [transport_1.AnonymousTokenController,
|
|
5959
|
+
Validator])
|
|
5957
5960
|
], LoadPeerTokenAnonymousByTruncatedReferenceUseCase);
|
|
5958
5961
|
//# sourceMappingURL=LoadPeerTokenAnonymousByTruncatedReference.js.map
|
|
5959
5962
|
|
|
@@ -29440,7 +29443,8 @@ let GetAttributeListenerUseCase = exports.GetAttributeListenerUseCase = class Ge
|
|
|
29440
29443
|
exports.GetAttributeListenerUseCase = GetAttributeListenerUseCase = __decorate([
|
|
29441
29444
|
__param(0, typescript_ioc_1.Inject),
|
|
29442
29445
|
__param(1, typescript_ioc_1.Inject),
|
|
29443
|
-
__metadata("design:paramtypes", [consumption_1.AttributeListenersController,
|
|
29446
|
+
__metadata("design:paramtypes", [consumption_1.AttributeListenersController,
|
|
29447
|
+
Validator])
|
|
29444
29448
|
], GetAttributeListenerUseCase);
|
|
29445
29449
|
//# sourceMappingURL=GetAttributeListener.js.map
|
|
29446
29450
|
|
|
@@ -29798,7 +29802,8 @@ let ExecuteIQLQueryUseCase = exports.ExecuteIQLQueryUseCase = class ExecuteIQLQu
|
|
|
29798
29802
|
exports.ExecuteIQLQueryUseCase = ExecuteIQLQueryUseCase = __decorate([
|
|
29799
29803
|
__param(0, typescript_ioc_1.Inject),
|
|
29800
29804
|
__param(1, typescript_ioc_1.Inject),
|
|
29801
|
-
__metadata("design:paramtypes", [consumption_1.AttributesController,
|
|
29805
|
+
__metadata("design:paramtypes", [consumption_1.AttributesController,
|
|
29806
|
+
Validator])
|
|
29802
29807
|
], ExecuteIQLQueryUseCase);
|
|
29803
29808
|
//# sourceMappingURL=ExecuteIQLQuery.js.map
|
|
29804
29809
|
|
|
@@ -29999,7 +30004,8 @@ let GetAttributeUseCase = exports.GetAttributeUseCase = class GetAttributeUseCas
|
|
|
29999
30004
|
exports.GetAttributeUseCase = GetAttributeUseCase = __decorate([
|
|
30000
30005
|
__param(0, typescript_ioc_1.Inject),
|
|
30001
30006
|
__param(1, typescript_ioc_1.Inject),
|
|
30002
|
-
__metadata("design:paramtypes", [consumption_1.AttributesController,
|
|
30007
|
+
__metadata("design:paramtypes", [consumption_1.AttributesController,
|
|
30008
|
+
Validator])
|
|
30003
30009
|
], GetAttributeUseCase);
|
|
30004
30010
|
//# sourceMappingURL=GetAttribute.js.map
|
|
30005
30011
|
|
|
@@ -30258,7 +30264,8 @@ let GetSharedToPeerAttributesUseCase = exports.GetSharedToPeerAttributesUseCase
|
|
|
30258
30264
|
exports.GetSharedToPeerAttributesUseCase = GetSharedToPeerAttributesUseCase = __decorate([
|
|
30259
30265
|
__param(0, typescript_ioc_1.Inject),
|
|
30260
30266
|
__param(1, typescript_ioc_1.Inject),
|
|
30261
|
-
__metadata("design:paramtypes", [consumption_1.AttributesController,
|
|
30267
|
+
__metadata("design:paramtypes", [consumption_1.AttributesController,
|
|
30268
|
+
transport_1.IdentityController])
|
|
30262
30269
|
], GetSharedToPeerAttributesUseCase);
|
|
30263
30270
|
//# sourceMappingURL=GetSharedToPeerAttributes.js.map
|
|
30264
30271
|
|
|
@@ -30637,7 +30644,9 @@ exports.CreateDraftUseCase = CreateDraftUseCase = __decorate([
|
|
|
30637
30644
|
__param(0, typescript_ioc_1.Inject),
|
|
30638
30645
|
__param(1, typescript_ioc_1.Inject),
|
|
30639
30646
|
__param(2, typescript_ioc_1.Inject),
|
|
30640
|
-
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30647
|
+
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30648
|
+
transport_1.AccountController,
|
|
30649
|
+
Validator])
|
|
30641
30650
|
], CreateDraftUseCase);
|
|
30642
30651
|
//# sourceMappingURL=CreateDraft.js.map
|
|
30643
30652
|
|
|
@@ -30699,7 +30708,9 @@ exports.DeleteDraftUseCase = DeleteDraftUseCase = __decorate([
|
|
|
30699
30708
|
__param(0, typescript_ioc_1.Inject),
|
|
30700
30709
|
__param(1, typescript_ioc_1.Inject),
|
|
30701
30710
|
__param(2, typescript_ioc_1.Inject),
|
|
30702
|
-
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30711
|
+
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30712
|
+
transport_1.AccountController,
|
|
30713
|
+
Validator])
|
|
30703
30714
|
], DeleteDraftUseCase);
|
|
30704
30715
|
//# sourceMappingURL=DeleteDraft.js.map
|
|
30705
30716
|
|
|
@@ -30787,7 +30798,8 @@ let GetDraftUseCase = exports.GetDraftUseCase = class GetDraftUseCase extends co
|
|
|
30787
30798
|
exports.GetDraftUseCase = GetDraftUseCase = __decorate([
|
|
30788
30799
|
__param(0, typescript_ioc_1.Inject),
|
|
30789
30800
|
__param(1, typescript_ioc_1.Inject),
|
|
30790
|
-
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30801
|
+
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30802
|
+
Validator])
|
|
30791
30803
|
], GetDraftUseCase);
|
|
30792
30804
|
//# sourceMappingURL=GetDraft.js.map
|
|
30793
30805
|
|
|
@@ -30852,7 +30864,8 @@ GetDraftsUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({
|
|
|
30852
30864
|
exports.GetDraftsUseCase = GetDraftsUseCase = __decorate([
|
|
30853
30865
|
__param(0, typescript_ioc_1.Inject),
|
|
30854
30866
|
__param(1, typescript_ioc_1.Inject),
|
|
30855
|
-
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30867
|
+
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30868
|
+
Validator])
|
|
30856
30869
|
], GetDraftsUseCase);
|
|
30857
30870
|
//# sourceMappingURL=GetDrafts.js.map
|
|
30858
30871
|
|
|
@@ -30917,7 +30930,9 @@ exports.UpdateDraftUseCase = UpdateDraftUseCase = __decorate([
|
|
|
30917
30930
|
__param(0, typescript_ioc_1.Inject),
|
|
30918
30931
|
__param(1, typescript_ioc_1.Inject),
|
|
30919
30932
|
__param(2, typescript_ioc_1.Inject),
|
|
30920
|
-
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30933
|
+
__metadata("design:paramtypes", [consumption_1.DraftsController,
|
|
30934
|
+
transport_1.AccountController,
|
|
30935
|
+
Validator])
|
|
30921
30936
|
], UpdateDraftUseCase);
|
|
30922
30937
|
//# sourceMappingURL=UpdateDraft.js.map
|
|
30923
30938
|
|
|
@@ -31369,7 +31384,8 @@ let CompleteOutgoingRequestUseCase = exports.CompleteOutgoingRequestUseCase = cl
|
|
|
31369
31384
|
exports.CompleteOutgoingRequestUseCase = CompleteOutgoingRequestUseCase = __decorate([
|
|
31370
31385
|
__param(0, typescript_ioc_1.Inject),
|
|
31371
31386
|
__param(1, typescript_ioc_1.Inject),
|
|
31372
|
-
__metadata("design:paramtypes", [consumption_1.OutgoingRequestsController,
|
|
31387
|
+
__metadata("design:paramtypes", [consumption_1.OutgoingRequestsController,
|
|
31388
|
+
transport_1.MessageController])
|
|
31373
31389
|
], CompleteOutgoingRequestUseCase);
|
|
31374
31390
|
//# sourceMappingURL=CompleteOutgoingRequest.js.map
|
|
31375
31391
|
|
|
@@ -32176,7 +32192,8 @@ let SentOutgoingRequestUseCase = exports.SentOutgoingRequestUseCase = class Sent
|
|
|
32176
32192
|
exports.SentOutgoingRequestUseCase = SentOutgoingRequestUseCase = __decorate([
|
|
32177
32193
|
__param(0, typescript_ioc_1.Inject),
|
|
32178
32194
|
__param(1, typescript_ioc_1.Inject),
|
|
32179
|
-
__metadata("design:paramtypes", [consumption_1.OutgoingRequestsController,
|
|
32195
|
+
__metadata("design:paramtypes", [consumption_1.OutgoingRequestsController,
|
|
32196
|
+
transport_1.MessageController])
|
|
32180
32197
|
], SentOutgoingRequestUseCase);
|
|
32181
32198
|
//# sourceMappingURL=SentOutgoingRequest.js.map
|
|
32182
32199
|
|
|
@@ -32444,7 +32461,8 @@ let GetSettingUseCase = exports.GetSettingUseCase = class GetSettingUseCase exte
|
|
|
32444
32461
|
exports.GetSettingUseCase = GetSettingUseCase = __decorate([
|
|
32445
32462
|
__param(0, typescript_ioc_1.Inject),
|
|
32446
32463
|
__param(1, typescript_ioc_1.Inject),
|
|
32447
|
-
__metadata("design:paramtypes", [consumption_1.SettingsController,
|
|
32464
|
+
__metadata("design:paramtypes", [consumption_1.SettingsController,
|
|
32465
|
+
Validator])
|
|
32448
32466
|
], GetSettingUseCase);
|
|
32449
32467
|
//# sourceMappingURL=GetSetting.js.map
|
|
32450
32468
|
|
|
@@ -32512,7 +32530,8 @@ GetSettingsUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator
|
|
|
32512
32530
|
exports.GetSettingsUseCase = GetSettingsUseCase = __decorate([
|
|
32513
32531
|
__param(0, typescript_ioc_1.Inject),
|
|
32514
32532
|
__param(1, typescript_ioc_1.Inject),
|
|
32515
|
-
__metadata("design:paramtypes", [consumption_1.SettingsController,
|
|
32533
|
+
__metadata("design:paramtypes", [consumption_1.SettingsController,
|
|
32534
|
+
Validator])
|
|
32516
32535
|
], GetSettingsUseCase);
|
|
32517
32536
|
//# sourceMappingURL=GetSettings.js.map
|
|
32518
32537
|
|
|
@@ -32805,7 +32824,7 @@ let GetDeviceInfoUseCase = exports.GetDeviceInfoUseCase = class GetDeviceInfoUse
|
|
|
32805
32824
|
}
|
|
32806
32825
|
executeInternal() {
|
|
32807
32826
|
const device = this.deviceController.device;
|
|
32808
|
-
return ts_utils_1.Result.ok(DeviceMapper_1.DeviceMapper.toDeviceDTO(device));
|
|
32827
|
+
return ts_utils_1.Result.ok(DeviceMapper_1.DeviceMapper.toDeviceDTO(device, true));
|
|
32809
32828
|
}
|
|
32810
32829
|
};
|
|
32811
32830
|
exports.GetDeviceInfoUseCase = GetDeviceInfoUseCase = __decorate([
|
|
@@ -33084,7 +33103,8 @@ let RegisterPushNotificationTokenUseCase = exports.RegisterPushNotificationToken
|
|
|
33084
33103
|
exports.RegisterPushNotificationTokenUseCase = RegisterPushNotificationTokenUseCase = __decorate([
|
|
33085
33104
|
__param(0, typescript_ioc_1.Inject),
|
|
33086
33105
|
__param(1, typescript_ioc_1.Inject),
|
|
33087
|
-
__metadata("design:paramtypes", [transport_1.AccountController,
|
|
33106
|
+
__metadata("design:paramtypes", [transport_1.AccountController,
|
|
33107
|
+
Validator])
|
|
33088
33108
|
], RegisterPushNotificationTokenUseCase);
|
|
33089
33109
|
//# sourceMappingURL=RegisterPushNotificationToken.js.map
|
|
33090
33110
|
|
|
@@ -33194,7 +33214,8 @@ let SyncEverythingUseCase = exports.SyncEverythingUseCase = class SyncEverything
|
|
|
33194
33214
|
exports.SyncEverythingUseCase = SyncEverythingUseCase = __decorate([
|
|
33195
33215
|
__param(0, typescript_ioc_1.Inject),
|
|
33196
33216
|
__param(1, typescript_ioc_1.Inject),
|
|
33197
|
-
__metadata("design:paramtypes", [transport_1.AccountController,
|
|
33217
|
+
__metadata("design:paramtypes", [transport_1.AccountController,
|
|
33218
|
+
RuntimeLoggerFactory_1.RuntimeLoggerFactory])
|
|
33198
33219
|
], SyncEverythingUseCase);
|
|
33199
33220
|
//# sourceMappingURL=SyncEverything.js.map
|
|
33200
33221
|
|
|
@@ -33476,7 +33497,8 @@ let ValidateChallengeUseCase = exports.ValidateChallengeUseCase = class Validate
|
|
|
33476
33497
|
exports.ValidateChallengeUseCase = ValidateChallengeUseCase = __decorate([
|
|
33477
33498
|
__param(0, typescript_ioc_1.Inject),
|
|
33478
33499
|
__param(1, typescript_ioc_1.Inject),
|
|
33479
|
-
__metadata("design:paramtypes", [transport_1.ChallengeController,
|
|
33500
|
+
__metadata("design:paramtypes", [transport_1.ChallengeController,
|
|
33501
|
+
Validator])
|
|
33480
33502
|
], ValidateChallengeUseCase);
|
|
33481
33503
|
//# sourceMappingURL=ValidateChallenge.js.map
|
|
33482
33504
|
|
|
@@ -33556,14 +33578,16 @@ let CreateDeviceUseCase = exports.CreateDeviceUseCase = class CreateDeviceUseCas
|
|
|
33556
33578
|
async executeInternal(request) {
|
|
33557
33579
|
const device = await this.devicesController.sendDevice(request);
|
|
33558
33580
|
await this.accountController.syncDatawallet();
|
|
33559
|
-
return ts_utils_1.Result.ok(DeviceMapper_1.DeviceMapper.toDeviceDTO(device));
|
|
33581
|
+
return ts_utils_1.Result.ok(DeviceMapper_1.DeviceMapper.toDeviceDTO(device, false));
|
|
33560
33582
|
}
|
|
33561
33583
|
};
|
|
33562
33584
|
exports.CreateDeviceUseCase = CreateDeviceUseCase = __decorate([
|
|
33563
33585
|
__param(0, typescript_ioc_1.Inject),
|
|
33564
33586
|
__param(1, typescript_ioc_1.Inject),
|
|
33565
33587
|
__param(2, typescript_ioc_1.Inject),
|
|
33566
|
-
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33588
|
+
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33589
|
+
transport_1.AccountController,
|
|
33590
|
+
Validator])
|
|
33567
33591
|
], CreateDeviceUseCase);
|
|
33568
33592
|
//# sourceMappingURL=CreateDevice.js.map
|
|
33569
33593
|
|
|
@@ -33627,7 +33651,9 @@ exports.CreateDeviceOnboardingTokenUseCase = CreateDeviceOnboardingTokenUseCase
|
|
|
33627
33651
|
__param(0, typescript_ioc_1.Inject),
|
|
33628
33652
|
__param(1, typescript_ioc_1.Inject),
|
|
33629
33653
|
__param(2, typescript_ioc_1.Inject),
|
|
33630
|
-
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33654
|
+
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33655
|
+
transport_1.TokenController,
|
|
33656
|
+
Validator])
|
|
33631
33657
|
], CreateDeviceOnboardingTokenUseCase);
|
|
33632
33658
|
//# sourceMappingURL=CreateDeviceOnboardingToken.js.map
|
|
33633
33659
|
|
|
@@ -33688,7 +33714,9 @@ exports.DeleteDeviceUseCase = DeleteDeviceUseCase = __decorate([
|
|
|
33688
33714
|
__param(0, typescript_ioc_1.Inject),
|
|
33689
33715
|
__param(1, typescript_ioc_1.Inject),
|
|
33690
33716
|
__param(2, typescript_ioc_1.Inject),
|
|
33691
|
-
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33717
|
+
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33718
|
+
transport_1.AccountController,
|
|
33719
|
+
Validator])
|
|
33692
33720
|
], DeleteDeviceUseCase);
|
|
33693
33721
|
//# sourceMappingURL=DeleteDevice.js.map
|
|
33694
33722
|
|
|
@@ -33707,7 +33735,7 @@ exports.DeviceMapper = void 0;
|
|
|
33707
33735
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
33708
33736
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
33709
33737
|
class DeviceMapper {
|
|
33710
|
-
static toDeviceDTO(device) {
|
|
33738
|
+
static toDeviceDTO(device, isCurrentDevice) {
|
|
33711
33739
|
return {
|
|
33712
33740
|
id: device.id.toString(),
|
|
33713
33741
|
createdAt: device.createdAt.toString(),
|
|
@@ -33719,7 +33747,8 @@ class DeviceMapper {
|
|
|
33719
33747
|
description: device.description,
|
|
33720
33748
|
lastLoginAt: device.lastLoginAt?.toString(),
|
|
33721
33749
|
operatingSystem: device.operatingSystem,
|
|
33722
|
-
publicKey: device.publicKey?.toBase64(false)
|
|
33750
|
+
publicKey: device.publicKey?.toBase64(false),
|
|
33751
|
+
isCurrentDevice: isCurrentDevice
|
|
33723
33752
|
};
|
|
33724
33753
|
}
|
|
33725
33754
|
static toDeviceOnboardingInfoDTO(deviceSharedSecret) {
|
|
@@ -33806,22 +33835,28 @@ Validator = __decorate([
|
|
|
33806
33835
|
__metadata("design:paramtypes", [common_1.SchemaRepository])
|
|
33807
33836
|
], Validator);
|
|
33808
33837
|
let GetDeviceUseCase = exports.GetDeviceUseCase = class GetDeviceUseCase extends common_1.UseCase {
|
|
33809
|
-
constructor(devicesController, validator) {
|
|
33838
|
+
constructor(devicesController, deviceController, validator) {
|
|
33810
33839
|
super(validator);
|
|
33811
33840
|
this.devicesController = devicesController;
|
|
33841
|
+
this.deviceController = deviceController;
|
|
33812
33842
|
}
|
|
33813
33843
|
async executeInternal(request) {
|
|
33814
33844
|
const device = await this.devicesController.get(transport_1.CoreId.from(request.id));
|
|
33815
33845
|
if (!device) {
|
|
33816
33846
|
return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.Device));
|
|
33817
33847
|
}
|
|
33818
|
-
|
|
33848
|
+
const currentDevice = this.deviceController.device;
|
|
33849
|
+
const isCurrentDevice = device.id.equals(currentDevice.id);
|
|
33850
|
+
return ts_utils_1.Result.ok(DeviceMapper_1.DeviceMapper.toDeviceDTO(device, isCurrentDevice));
|
|
33819
33851
|
}
|
|
33820
33852
|
};
|
|
33821
33853
|
exports.GetDeviceUseCase = GetDeviceUseCase = __decorate([
|
|
33822
33854
|
__param(0, typescript_ioc_1.Inject),
|
|
33823
33855
|
__param(1, typescript_ioc_1.Inject),
|
|
33824
|
-
|
|
33856
|
+
__param(2, typescript_ioc_1.Inject),
|
|
33857
|
+
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33858
|
+
transport_1.DeviceController,
|
|
33859
|
+
Validator])
|
|
33825
33860
|
], GetDeviceUseCase);
|
|
33826
33861
|
//# sourceMappingURL=GetDevice.js.map
|
|
33827
33862
|
|
|
@@ -33876,7 +33911,8 @@ let GetDeviceOnboardingInfoUseCase = exports.GetDeviceOnboardingInfoUseCase = cl
|
|
|
33876
33911
|
exports.GetDeviceOnboardingInfoUseCase = GetDeviceOnboardingInfoUseCase = __decorate([
|
|
33877
33912
|
__param(0, typescript_ioc_1.Inject),
|
|
33878
33913
|
__param(1, typescript_ioc_1.Inject),
|
|
33879
|
-
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33914
|
+
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33915
|
+
Validator])
|
|
33880
33916
|
], GetDeviceOnboardingInfoUseCase);
|
|
33881
33917
|
//# sourceMappingURL=GetDeviceOnboardingInfo.js.map
|
|
33882
33918
|
|
|
@@ -33910,19 +33946,23 @@ const typescript_ioc_1 = __webpack_require__(/*! typescript-ioc */ "./node_modul
|
|
|
33910
33946
|
const common_1 = __webpack_require__(/*! ../../common */ "./dist/useCases/common/index.js");
|
|
33911
33947
|
const DeviceMapper_1 = __webpack_require__(/*! ./DeviceMapper */ "./dist/useCases/transport/devices/DeviceMapper.js");
|
|
33912
33948
|
let GetDevicesUseCase = exports.GetDevicesUseCase = class GetDevicesUseCase extends common_1.UseCase {
|
|
33913
|
-
constructor(devicesController) {
|
|
33949
|
+
constructor(devicesController, deviceController) {
|
|
33914
33950
|
super();
|
|
33915
33951
|
this.devicesController = devicesController;
|
|
33952
|
+
this.deviceController = deviceController;
|
|
33916
33953
|
}
|
|
33917
33954
|
async executeInternal() {
|
|
33918
33955
|
const devices = await this.devicesController.list();
|
|
33919
|
-
const
|
|
33956
|
+
const currentDevice = this.deviceController.device;
|
|
33957
|
+
const deviceDTOs = devices.map((device) => DeviceMapper_1.DeviceMapper.toDeviceDTO(device, device.id.equals(currentDevice.id)));
|
|
33920
33958
|
return ts_utils_1.Result.ok(deviceDTOs);
|
|
33921
33959
|
}
|
|
33922
33960
|
};
|
|
33923
33961
|
exports.GetDevicesUseCase = GetDevicesUseCase = __decorate([
|
|
33924
33962
|
__param(0, typescript_ioc_1.Inject),
|
|
33925
|
-
|
|
33963
|
+
__param(1, typescript_ioc_1.Inject),
|
|
33964
|
+
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
33965
|
+
transport_1.DeviceController])
|
|
33926
33966
|
], GetDevicesUseCase);
|
|
33927
33967
|
//# sourceMappingURL=GetDevices.js.map
|
|
33928
33968
|
|
|
@@ -33965,30 +34005,37 @@ Validator = __decorate([
|
|
|
33965
34005
|
__metadata("design:paramtypes", [common_1.SchemaRepository])
|
|
33966
34006
|
], Validator);
|
|
33967
34007
|
let UpdateDeviceUseCase = exports.UpdateDeviceUseCase = class UpdateDeviceUseCase extends common_1.UseCase {
|
|
33968
|
-
constructor(devicesController, accountController, validator) {
|
|
34008
|
+
constructor(devicesController, accountController, deviceController, validator) {
|
|
33969
34009
|
super(validator);
|
|
33970
34010
|
this.devicesController = devicesController;
|
|
33971
34011
|
this.accountController = accountController;
|
|
34012
|
+
this.deviceController = deviceController;
|
|
33972
34013
|
}
|
|
33973
34014
|
async executeInternal(request) {
|
|
33974
34015
|
const device = await this.devicesController.get(transport_1.CoreId.from(request.id));
|
|
33975
34016
|
if (!device) {
|
|
33976
34017
|
return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.Device));
|
|
33977
34018
|
}
|
|
33978
|
-
if (request.name) {
|
|
34019
|
+
if (typeof request.name !== "undefined") {
|
|
33979
34020
|
device.name = request.name;
|
|
33980
34021
|
}
|
|
33981
34022
|
device.description = request.description;
|
|
33982
34023
|
await this.devicesController.update(device);
|
|
33983
34024
|
await this.accountController.syncDatawallet();
|
|
33984
|
-
|
|
34025
|
+
const currentDevice = this.deviceController.device;
|
|
34026
|
+
const isCurrentDevice = device.id.equals(currentDevice.id);
|
|
34027
|
+
return ts_utils_1.Result.ok(DeviceMapper_1.DeviceMapper.toDeviceDTO(device, isCurrentDevice));
|
|
33985
34028
|
}
|
|
33986
34029
|
};
|
|
33987
34030
|
exports.UpdateDeviceUseCase = UpdateDeviceUseCase = __decorate([
|
|
33988
34031
|
__param(0, typescript_ioc_1.Inject),
|
|
33989
34032
|
__param(1, typescript_ioc_1.Inject),
|
|
33990
34033
|
__param(2, typescript_ioc_1.Inject),
|
|
33991
|
-
|
|
34034
|
+
__param(3, typescript_ioc_1.Inject),
|
|
34035
|
+
__metadata("design:paramtypes", [transport_1.DevicesController,
|
|
34036
|
+
transport_1.AccountController,
|
|
34037
|
+
transport_1.DeviceController,
|
|
34038
|
+
Validator])
|
|
33992
34039
|
], UpdateDeviceUseCase);
|
|
33993
34040
|
//# sourceMappingURL=UpdateDevice.js.map
|
|
33994
34041
|
|
|
@@ -34081,7 +34128,8 @@ let CreateQrCodeForFileUseCase = exports.CreateQrCodeForFileUseCase = class Crea
|
|
|
34081
34128
|
exports.CreateQrCodeForFileUseCase = CreateQrCodeForFileUseCase = __decorate([
|
|
34082
34129
|
__param(0, typescript_ioc_1.Inject),
|
|
34083
34130
|
__param(1, typescript_ioc_1.Inject),
|
|
34084
|
-
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34131
|
+
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34132
|
+
Validator])
|
|
34085
34133
|
], CreateQrCodeForFileUseCase);
|
|
34086
34134
|
//# sourceMappingURL=CreateQrCodeForFile.js.map
|
|
34087
34135
|
|
|
@@ -34232,7 +34280,9 @@ exports.CreateTokenQrCodeForFileUseCase = CreateTokenQrCodeForFileUseCase = __de
|
|
|
34232
34280
|
__param(0, typescript_ioc_1.Inject),
|
|
34233
34281
|
__param(1, typescript_ioc_1.Inject),
|
|
34234
34282
|
__param(2, typescript_ioc_1.Inject),
|
|
34235
|
-
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34283
|
+
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34284
|
+
transport_1.TokenController,
|
|
34285
|
+
Validator])
|
|
34236
34286
|
], CreateTokenQrCodeForFileUseCase);
|
|
34237
34287
|
//# sourceMappingURL=CreateTokenQrCodeForFile.js.map
|
|
34238
34288
|
|
|
@@ -34293,7 +34343,8 @@ let DownloadFileUseCase = exports.DownloadFileUseCase = class DownloadFileUseCas
|
|
|
34293
34343
|
exports.DownloadFileUseCase = DownloadFileUseCase = __decorate([
|
|
34294
34344
|
__param(0, typescript_ioc_1.Inject),
|
|
34295
34345
|
__param(1, typescript_ioc_1.Inject),
|
|
34296
|
-
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34346
|
+
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34347
|
+
Validator])
|
|
34297
34348
|
], DownloadFileUseCase);
|
|
34298
34349
|
//# sourceMappingURL=DownloadFile.js.map
|
|
34299
34350
|
|
|
@@ -34403,7 +34454,8 @@ let GetFileUseCase = exports.GetFileUseCase = class GetFileUseCase extends commo
|
|
|
34403
34454
|
exports.GetFileUseCase = GetFileUseCase = __decorate([
|
|
34404
34455
|
__param(0, typescript_ioc_1.Inject),
|
|
34405
34456
|
__param(1, typescript_ioc_1.Inject),
|
|
34406
|
-
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34457
|
+
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34458
|
+
Validator])
|
|
34407
34459
|
], GetFileUseCase);
|
|
34408
34460
|
//# sourceMappingURL=GetFile.js.map
|
|
34409
34461
|
|
|
@@ -34490,7 +34542,8 @@ GetFilesUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({
|
|
|
34490
34542
|
exports.GetFilesUseCase = GetFilesUseCase = __decorate([
|
|
34491
34543
|
__param(0, typescript_ioc_1.Inject),
|
|
34492
34544
|
__param(1, typescript_ioc_1.Inject),
|
|
34493
|
-
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34545
|
+
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34546
|
+
Validator])
|
|
34494
34547
|
], GetFilesUseCase);
|
|
34495
34548
|
//# sourceMappingURL=GetFiles.js.map
|
|
34496
34549
|
|
|
@@ -34704,7 +34757,9 @@ exports.UploadOwnFileUseCase = UploadOwnFileUseCase = __decorate([
|
|
|
34704
34757
|
__param(0, typescript_ioc_1.Inject),
|
|
34705
34758
|
__param(1, typescript_ioc_1.Inject),
|
|
34706
34759
|
__param(2, typescript_ioc_1.Inject),
|
|
34707
|
-
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34760
|
+
__metadata("design:paramtypes", [transport_1.FileController,
|
|
34761
|
+
transport_1.AccountController,
|
|
34762
|
+
Validator])
|
|
34708
34763
|
], UploadOwnFileUseCase);
|
|
34709
34764
|
//# sourceMappingURL=UploadOwnFile.js.map
|
|
34710
34765
|
|
|
@@ -34966,7 +35021,9 @@ exports.DownloadAttachmentUseCase = DownloadAttachmentUseCase = __decorate([
|
|
|
34966
35021
|
__param(0, typescript_ioc_1.Inject),
|
|
34967
35022
|
__param(1, typescript_ioc_1.Inject),
|
|
34968
35023
|
__param(2, typescript_ioc_1.Inject),
|
|
34969
|
-
__metadata("design:paramtypes", [transport_1.MessageController,
|
|
35024
|
+
__metadata("design:paramtypes", [transport_1.MessageController,
|
|
35025
|
+
transport_1.FileController,
|
|
35026
|
+
Validator])
|
|
34970
35027
|
], DownloadAttachmentUseCase);
|
|
34971
35028
|
//# sourceMappingURL=DownloadAttachment.js.map
|
|
34972
35029
|
|
|
@@ -35037,7 +35094,9 @@ exports.GetAttachmentMetadataUseCase = GetAttachmentMetadataUseCase = __decorate
|
|
|
35037
35094
|
__param(0, typescript_ioc_1.Inject),
|
|
35038
35095
|
__param(1, typescript_ioc_1.Inject),
|
|
35039
35096
|
__param(2, typescript_ioc_1.Inject),
|
|
35040
|
-
__metadata("design:paramtypes", [transport_1.MessageController,
|
|
35097
|
+
__metadata("design:paramtypes", [transport_1.MessageController,
|
|
35098
|
+
transport_1.FileController,
|
|
35099
|
+
Validator])
|
|
35041
35100
|
], GetAttachmentMetadataUseCase);
|
|
35042
35101
|
//# sourceMappingURL=GetAttachmentMetadata.js.map
|
|
35043
35102
|
|
|
@@ -35104,7 +35163,9 @@ exports.GetMessageUseCase = GetMessageUseCase = __decorate([
|
|
|
35104
35163
|
__param(0, typescript_ioc_1.Inject),
|
|
35105
35164
|
__param(1, typescript_ioc_1.Inject),
|
|
35106
35165
|
__param(2, typescript_ioc_1.Inject),
|
|
35107
|
-
__metadata("design:paramtypes", [transport_1.MessageController,
|
|
35166
|
+
__metadata("design:paramtypes", [transport_1.MessageController,
|
|
35167
|
+
transport_1.FileController,
|
|
35168
|
+
Validator])
|
|
35108
35169
|
], GetMessageUseCase);
|
|
35109
35170
|
//# sourceMappingURL=GetMessage.js.map
|
|
35110
35171
|
|
|
@@ -35229,7 +35290,8 @@ GetMessagesUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator
|
|
|
35229
35290
|
exports.GetMessagesUseCase = GetMessagesUseCase = __decorate([
|
|
35230
35291
|
__param(0, typescript_ioc_1.Inject),
|
|
35231
35292
|
__param(1, typescript_ioc_1.Inject),
|
|
35232
|
-
__metadata("design:paramtypes", [transport_1.MessageController,
|
|
35293
|
+
__metadata("design:paramtypes", [transport_1.MessageController,
|
|
35294
|
+
Validator])
|
|
35233
35295
|
], GetMessagesUseCase);
|
|
35234
35296
|
//# sourceMappingURL=GetMessages.js.map
|
|
35235
35297
|
|
|
@@ -35577,7 +35639,8 @@ let CreateQrCodeForOwnTemplateUseCase = exports.CreateQrCodeForOwnTemplateUseCas
|
|
|
35577
35639
|
exports.CreateQrCodeForOwnTemplateUseCase = CreateQrCodeForOwnTemplateUseCase = __decorate([
|
|
35578
35640
|
__param(0, typescript_ioc_1.Inject),
|
|
35579
35641
|
__param(1, typescript_ioc_1.Inject),
|
|
35580
|
-
__metadata("design:paramtypes", [transport_1.RelationshipTemplateController,
|
|
35642
|
+
__metadata("design:paramtypes", [transport_1.RelationshipTemplateController,
|
|
35643
|
+
Validator])
|
|
35581
35644
|
], CreateQrCodeForOwnTemplateUseCase);
|
|
35582
35645
|
//# sourceMappingURL=CreateQrCodeForOwnRelationshipTemplate.js.map
|
|
35583
35646
|
|
|
@@ -35794,7 +35857,8 @@ let GetRelationshipTemplateUseCase = exports.GetRelationshipTemplateUseCase = cl
|
|
|
35794
35857
|
exports.GetRelationshipTemplateUseCase = GetRelationshipTemplateUseCase = __decorate([
|
|
35795
35858
|
__param(0, typescript_ioc_1.Inject),
|
|
35796
35859
|
__param(1, typescript_ioc_1.Inject),
|
|
35797
|
-
__metadata("design:paramtypes", [transport_1.RelationshipTemplateController,
|
|
35860
|
+
__metadata("design:paramtypes", [transport_1.RelationshipTemplateController,
|
|
35861
|
+
Validator])
|
|
35798
35862
|
], GetRelationshipTemplateUseCase);
|
|
35799
35863
|
//# sourceMappingURL=GetRelationshipTemplate.js.map
|
|
35800
35864
|
|
|
@@ -35873,7 +35937,8 @@ GetRelationshipTemplatesUseCase.queryTranslator = new docdb_querytranslator_1.Qu
|
|
|
35873
35937
|
exports.GetRelationshipTemplatesUseCase = GetRelationshipTemplatesUseCase = __decorate([
|
|
35874
35938
|
__param(0, typescript_ioc_1.Inject),
|
|
35875
35939
|
__param(1, typescript_ioc_1.Inject),
|
|
35876
|
-
__metadata("design:paramtypes", [transport_1.RelationshipTemplateController,
|
|
35940
|
+
__metadata("design:paramtypes", [transport_1.RelationshipTemplateController,
|
|
35941
|
+
Validator])
|
|
35877
35942
|
], GetRelationshipTemplatesUseCase);
|
|
35878
35943
|
//# sourceMappingURL=GetRelationshipTemplates.js.map
|
|
35879
35944
|
|
|
@@ -36347,7 +36412,8 @@ let GetRelationshipUseCase = exports.GetRelationshipUseCase = class GetRelations
|
|
|
36347
36412
|
exports.GetRelationshipUseCase = GetRelationshipUseCase = __decorate([
|
|
36348
36413
|
__param(0, typescript_ioc_1.Inject),
|
|
36349
36414
|
__param(1, typescript_ioc_1.Inject),
|
|
36350
|
-
__metadata("design:paramtypes", [transport_1.RelationshipsController,
|
|
36415
|
+
__metadata("design:paramtypes", [transport_1.RelationshipsController,
|
|
36416
|
+
Validator])
|
|
36351
36417
|
], GetRelationshipUseCase);
|
|
36352
36418
|
//# sourceMappingURL=GetRelationship.js.map
|
|
36353
36419
|
|
|
@@ -36405,7 +36471,8 @@ let GetRelationshipByAddressUseCase = exports.GetRelationshipByAddressUseCase =
|
|
|
36405
36471
|
exports.GetRelationshipByAddressUseCase = GetRelationshipByAddressUseCase = __decorate([
|
|
36406
36472
|
__param(0, typescript_ioc_1.Inject),
|
|
36407
36473
|
__param(1, typescript_ioc_1.Inject),
|
|
36408
|
-
__metadata("design:paramtypes", [transport_1.RelationshipsController,
|
|
36474
|
+
__metadata("design:paramtypes", [transport_1.RelationshipsController,
|
|
36475
|
+
Validator])
|
|
36409
36476
|
], GetRelationshipByAddressUseCase);
|
|
36410
36477
|
//# sourceMappingURL=GetRelationshipByAddress.js.map
|
|
36411
36478
|
|
|
@@ -36475,7 +36542,8 @@ GetRelationshipsUseCase.queryTranslator = new docdb_querytranslator_1.QueryTrans
|
|
|
36475
36542
|
exports.GetRelationshipsUseCase = GetRelationshipsUseCase = __decorate([
|
|
36476
36543
|
__param(0, typescript_ioc_1.Inject),
|
|
36477
36544
|
__param(1, typescript_ioc_1.Inject),
|
|
36478
|
-
__metadata("design:paramtypes", [transport_1.RelationshipsController,
|
|
36545
|
+
__metadata("design:paramtypes", [transport_1.RelationshipsController,
|
|
36546
|
+
Validator])
|
|
36479
36547
|
], GetRelationshipsUseCase);
|
|
36480
36548
|
//# sourceMappingURL=GetRelationships.js.map
|
|
36481
36549
|
|
|
@@ -36801,7 +36869,9 @@ exports.CreateOwnTokenUseCase = CreateOwnTokenUseCase = __decorate([
|
|
|
36801
36869
|
__param(0, typescript_ioc_1.Inject),
|
|
36802
36870
|
__param(1, typescript_ioc_1.Inject),
|
|
36803
36871
|
__param(2, typescript_ioc_1.Inject),
|
|
36804
|
-
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
36872
|
+
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
36873
|
+
transport_1.AccountController,
|
|
36874
|
+
Validator])
|
|
36805
36875
|
], CreateOwnTokenUseCase);
|
|
36806
36876
|
//# sourceMappingURL=CreateOwnToken.js.map
|
|
36807
36877
|
|
|
@@ -36859,7 +36929,8 @@ let GetQRCodeForTokenUseCase = exports.GetQRCodeForTokenUseCase = class GetQRCod
|
|
|
36859
36929
|
exports.GetQRCodeForTokenUseCase = GetQRCodeForTokenUseCase = __decorate([
|
|
36860
36930
|
__param(0, typescript_ioc_1.Inject),
|
|
36861
36931
|
__param(1, typescript_ioc_1.Inject),
|
|
36862
|
-
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
36932
|
+
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
36933
|
+
Validator])
|
|
36863
36934
|
], GetQRCodeForTokenUseCase);
|
|
36864
36935
|
//# sourceMappingURL=GetQRCodeForToken.js.map
|
|
36865
36936
|
|
|
@@ -36917,7 +36988,8 @@ let GetTokenUseCase = exports.GetTokenUseCase = class GetTokenUseCase extends co
|
|
|
36917
36988
|
exports.GetTokenUseCase = GetTokenUseCase = __decorate([
|
|
36918
36989
|
__param(0, typescript_ioc_1.Inject),
|
|
36919
36990
|
__param(1, typescript_ioc_1.Inject),
|
|
36920
|
-
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
36991
|
+
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
36992
|
+
Validator])
|
|
36921
36993
|
], GetTokenUseCase);
|
|
36922
36994
|
//# sourceMappingURL=GetToken.js.map
|
|
36923
36995
|
|
|
@@ -36992,7 +37064,8 @@ GetTokensUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({
|
|
|
36992
37064
|
exports.GetTokensUseCase = GetTokensUseCase = __decorate([
|
|
36993
37065
|
__param(0, typescript_ioc_1.Inject),
|
|
36994
37066
|
__param(1, typescript_ioc_1.Inject),
|
|
36995
|
-
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
37067
|
+
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
37068
|
+
Validator])
|
|
36996
37069
|
], GetTokensUseCase);
|
|
36997
37070
|
//# sourceMappingURL=GetTokens.js.map
|
|
36998
37071
|
|
|
@@ -37088,7 +37161,9 @@ exports.LoadPeerTokenUseCase = LoadPeerTokenUseCase = __decorate([
|
|
|
37088
37161
|
__param(0, typescript_ioc_1.Inject),
|
|
37089
37162
|
__param(1, typescript_ioc_1.Inject),
|
|
37090
37163
|
__param(2, typescript_ioc_1.Inject),
|
|
37091
|
-
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
37164
|
+
__metadata("design:paramtypes", [transport_1.TokenController,
|
|
37165
|
+
transport_1.AccountController,
|
|
37166
|
+
Validator])
|
|
37092
37167
|
], LoadPeerTokenUseCase);
|
|
37093
37168
|
//# sourceMappingURL=LoadPeerToken.js.map
|
|
37094
37169
|
|
|
@@ -67886,7 +67961,7 @@ function intlConfigString(localeStr, numberingSystem, outputCalendar) {
|
|
|
67886
67961
|
function mapMonths(f) {
|
|
67887
67962
|
const ms = [];
|
|
67888
67963
|
for (let i = 1; i <= 12; i++) {
|
|
67889
|
-
const dt = DateTime.utc(
|
|
67964
|
+
const dt = DateTime.utc(2009, i, 1);
|
|
67890
67965
|
ms.push(f(dt));
|
|
67891
67966
|
}
|
|
67892
67967
|
return ms;
|
|
@@ -67899,8 +67974,8 @@ function mapWeekdays(f) {
|
|
|
67899
67974
|
}
|
|
67900
67975
|
return ms;
|
|
67901
67976
|
}
|
|
67902
|
-
function listStuff(loc, length,
|
|
67903
|
-
const mode = loc.listingMode(
|
|
67977
|
+
function listStuff(loc, length, englishFn, intlFn) {
|
|
67978
|
+
const mode = loc.listingMode();
|
|
67904
67979
|
if (mode === "error") {
|
|
67905
67980
|
return null;
|
|
67906
67981
|
} else if (mode === "en") {
|
|
@@ -68146,8 +68221,8 @@ class Locale {
|
|
|
68146
68221
|
defaultToEN: false
|
|
68147
68222
|
});
|
|
68148
68223
|
}
|
|
68149
|
-
months(length, format = false
|
|
68150
|
-
return listStuff(this, length,
|
|
68224
|
+
months(length, format = false) {
|
|
68225
|
+
return listStuff(this, length, months, () => {
|
|
68151
68226
|
const intl = format ? {
|
|
68152
68227
|
month: length,
|
|
68153
68228
|
day: "numeric"
|
|
@@ -68161,8 +68236,8 @@ class Locale {
|
|
|
68161
68236
|
return this.monthsCache[formatStr][length];
|
|
68162
68237
|
});
|
|
68163
68238
|
}
|
|
68164
|
-
weekdays(length, format = false
|
|
68165
|
-
return listStuff(this, length,
|
|
68239
|
+
weekdays(length, format = false) {
|
|
68240
|
+
return listStuff(this, length, weekdays, () => {
|
|
68166
68241
|
const intl = format ? {
|
|
68167
68242
|
weekday: length,
|
|
68168
68243
|
year: "numeric",
|
|
@@ -68178,8 +68253,8 @@ class Locale {
|
|
|
68178
68253
|
return this.weekdaysCache[formatStr][length];
|
|
68179
68254
|
});
|
|
68180
68255
|
}
|
|
68181
|
-
meridiems(
|
|
68182
|
-
return listStuff(this, undefined,
|
|
68256
|
+
meridiems() {
|
|
68257
|
+
return listStuff(this, undefined, () => meridiems, () => {
|
|
68183
68258
|
// In theory there could be aribitrary day periods. We're gonna assume there are exactly two
|
|
68184
68259
|
// for AM and PM. This is probably wrong, but it's makes parsing way easier.
|
|
68185
68260
|
if (!this.meridiemCache) {
|
|
@@ -68192,8 +68267,8 @@ class Locale {
|
|
|
68192
68267
|
return this.meridiemCache;
|
|
68193
68268
|
});
|
|
68194
68269
|
}
|
|
68195
|
-
eras(length
|
|
68196
|
-
return listStuff(this, length,
|
|
68270
|
+
eras(length) {
|
|
68271
|
+
return listStuff(this, length, eras, () => {
|
|
68197
68272
|
const intl = {
|
|
68198
68273
|
era: length
|
|
68199
68274
|
};
|
|
@@ -68397,7 +68472,7 @@ function normalizeZone(input, defaultZone) {
|
|
|
68397
68472
|
if (lowered === "default") return defaultZone;else if (lowered === "local" || lowered === "system") return SystemZone.instance;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);
|
|
68398
68473
|
} else if (isNumber(input)) {
|
|
68399
68474
|
return FixedOffsetZone.instance(input);
|
|
68400
|
-
} else if (typeof input === "object" &&
|
|
68475
|
+
} else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") {
|
|
68401
68476
|
// This is dumb, but the instanceof check above doesn't seem to really work
|
|
68402
68477
|
// so we're duck checking it
|
|
68403
68478
|
return input;
|
|
@@ -68514,10 +68589,10 @@ class Settings {
|
|
|
68514
68589
|
/**
|
|
68515
68590
|
* Set the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
|
|
68516
68591
|
* @type {number}
|
|
68517
|
-
* @example Settings.twoDigitCutoffYear = 0 // cut-off year is 0, so all 'yy' are
|
|
68592
|
+
* @example Settings.twoDigitCutoffYear = 0 // cut-off year is 0, so all 'yy' are interpreted as current century
|
|
68518
68593
|
* @example Settings.twoDigitCutoffYear = 50 // '49' -> 1949; '50' -> 2050
|
|
68519
|
-
* @example Settings.twoDigitCutoffYear = 1950 //
|
|
68520
|
-
* @example Settings.twoDigitCutoffYear = 2050 // ALSO
|
|
68594
|
+
* @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50
|
|
68595
|
+
* @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
|
|
68521
68596
|
*/
|
|
68522
68597
|
static set twoDigitCutoffYear(cutoffYear) {
|
|
68523
68598
|
twoDigitCutoffYear = cutoffYear % 100;
|
|
@@ -68684,7 +68759,7 @@ function daysInMonth(year, month) {
|
|
|
68684
68759
|
}
|
|
68685
68760
|
}
|
|
68686
68761
|
|
|
68687
|
-
//
|
|
68762
|
+
// convert a calendar object to a local timestamp (epoch, but with the offset baked in)
|
|
68688
68763
|
function objToLocalTS(obj) {
|
|
68689
68764
|
let d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond);
|
|
68690
68765
|
|
|
@@ -68986,33 +69061,24 @@ class Formatter {
|
|
|
68986
69061
|
});
|
|
68987
69062
|
return df.format();
|
|
68988
69063
|
}
|
|
68989
|
-
|
|
68990
|
-
|
|
69064
|
+
dtFormatter(dt, opts = {}) {
|
|
69065
|
+
return this.loc.dtFormatter(dt, {
|
|
68991
69066
|
...this.opts,
|
|
68992
69067
|
...opts
|
|
68993
69068
|
});
|
|
68994
|
-
return df.format();
|
|
68995
69069
|
}
|
|
68996
|
-
|
|
68997
|
-
|
|
68998
|
-
...this.opts,
|
|
68999
|
-
...opts
|
|
69000
|
-
});
|
|
69001
|
-
return df.formatToParts();
|
|
69070
|
+
formatDateTime(dt, opts) {
|
|
69071
|
+
return this.dtFormatter(dt, opts).format();
|
|
69002
69072
|
}
|
|
69003
|
-
|
|
69004
|
-
|
|
69005
|
-
|
|
69006
|
-
|
|
69007
|
-
|
|
69073
|
+
formatDateTimeParts(dt, opts) {
|
|
69074
|
+
return this.dtFormatter(dt, opts).formatToParts();
|
|
69075
|
+
}
|
|
69076
|
+
formatInterval(interval, opts) {
|
|
69077
|
+
const df = this.dtFormatter(interval.start, opts);
|
|
69008
69078
|
return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());
|
|
69009
69079
|
}
|
|
69010
|
-
resolvedOptions(dt, opts
|
|
69011
|
-
|
|
69012
|
-
...this.opts,
|
|
69013
|
-
...opts
|
|
69014
|
-
});
|
|
69015
|
-
return df.resolvedOptions();
|
|
69080
|
+
resolvedOptions(dt, opts) {
|
|
69081
|
+
return this.dtFormatter(dt, opts).resolvedOptions();
|
|
69016
69082
|
}
|
|
69017
69083
|
num(n, p = 0) {
|
|
69018
69084
|
// we get some perf out of doing this here, annoyingly
|
|
@@ -69066,7 +69132,7 @@ class Formatter {
|
|
|
69066
69132
|
era: length
|
|
69067
69133
|
}, "era"),
|
|
69068
69134
|
tokenToString = token => {
|
|
69069
|
-
// Where possible:
|
|
69135
|
+
// Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols
|
|
69070
69136
|
switch (token) {
|
|
69071
69137
|
// ms
|
|
69072
69138
|
case "S":
|
|
@@ -69655,19 +69721,19 @@ function clone$1(dur, alts, clear = false) {
|
|
|
69655
69721
|
};
|
|
69656
69722
|
return new Duration(conf);
|
|
69657
69723
|
}
|
|
69658
|
-
|
|
69659
|
-
|
|
69724
|
+
|
|
69725
|
+
// this is needed since in some test cases it would return 0.9999999999999999 instead of 1
|
|
69726
|
+
function removePrecisionIssue(a) {
|
|
69727
|
+
return Math.trunc(a * 1e3) / 1e3;
|
|
69660
69728
|
}
|
|
69661
69729
|
|
|
69662
69730
|
// NB: mutates parameters
|
|
69663
69731
|
function convert(matrix, fromMap, fromUnit, toMap, toUnit) {
|
|
69664
69732
|
const conv = matrix[toUnit][fromUnit],
|
|
69665
69733
|
raw = fromMap[fromUnit] / conv,
|
|
69666
|
-
|
|
69667
|
-
|
|
69668
|
-
|
|
69669
|
-
toMap[toUnit] += added;
|
|
69670
|
-
fromMap[fromUnit] -= added * conv;
|
|
69734
|
+
added = Math.floor(raw);
|
|
69735
|
+
toMap[toUnit] = removePrecisionIssue(toMap[toUnit] + added);
|
|
69736
|
+
fromMap[fromUnit] = removePrecisionIssue(fromMap[fromUnit] - added * conv);
|
|
69671
69737
|
}
|
|
69672
69738
|
|
|
69673
69739
|
// NB: mutates parameters
|
|
@@ -70066,21 +70132,13 @@ class Duration {
|
|
|
70066
70132
|
suppressSeconds: false,
|
|
70067
70133
|
includePrefix: false,
|
|
70068
70134
|
format: "extended",
|
|
70069
|
-
...opts
|
|
70135
|
+
...opts,
|
|
70136
|
+
includeOffset: false
|
|
70070
70137
|
};
|
|
70071
|
-
const
|
|
70072
|
-
|
|
70073
|
-
|
|
70074
|
-
|
|
70075
|
-
if (!opts.suppressMilliseconds || value.milliseconds !== 0) {
|
|
70076
|
-
fmt += ".SSS";
|
|
70077
|
-
}
|
|
70078
|
-
}
|
|
70079
|
-
let str = value.toFormat(fmt);
|
|
70080
|
-
if (opts.includePrefix) {
|
|
70081
|
-
str = "T" + str;
|
|
70082
|
-
}
|
|
70083
|
-
return str;
|
|
70138
|
+
const dateTime = DateTime.fromMillis(millis, {
|
|
70139
|
+
zone: "UTC"
|
|
70140
|
+
});
|
|
70141
|
+
return dateTime.toISOTime(opts);
|
|
70084
70142
|
}
|
|
70085
70143
|
|
|
70086
70144
|
/**
|
|
@@ -70104,7 +70162,15 @@ class Duration {
|
|
|
70104
70162
|
* @return {number}
|
|
70105
70163
|
*/
|
|
70106
70164
|
toMillis() {
|
|
70107
|
-
|
|
70165
|
+
var _this$values$millisec;
|
|
70166
|
+
let sum = (_this$values$millisec = this.values.milliseconds) != null ? _this$values$millisec : 0;
|
|
70167
|
+
for (let unit of reverseUnits.slice(1)) {
|
|
70168
|
+
var _this$values;
|
|
70169
|
+
if ((_this$values = this.values) != null && _this$values[unit]) {
|
|
70170
|
+
sum += this.values[unit] * this.matrix[unit]["milliseconds"];
|
|
70171
|
+
}
|
|
70172
|
+
}
|
|
70173
|
+
return sum;
|
|
70108
70174
|
}
|
|
70109
70175
|
|
|
70110
70176
|
/**
|
|
@@ -70237,10 +70303,13 @@ class Duration {
|
|
|
70237
70303
|
normalize() {
|
|
70238
70304
|
if (!this.isValid) return this;
|
|
70239
70305
|
const vals = this.toObject();
|
|
70240
|
-
|
|
70241
|
-
|
|
70242
|
-
|
|
70243
|
-
|
|
70306
|
+
if (this.valueOf() >= 0) {
|
|
70307
|
+
normalizeValues(this.matrix, vals);
|
|
70308
|
+
return clone$1(this, {
|
|
70309
|
+
values: vals
|
|
70310
|
+
}, true);
|
|
70311
|
+
}
|
|
70312
|
+
return this.negate().normalize().negate();
|
|
70244
70313
|
}
|
|
70245
70314
|
|
|
70246
70315
|
/**
|
|
@@ -71269,14 +71338,35 @@ function highOrderDiffs(cursor, later, units) {
|
|
|
71269
71338
|
const results = {};
|
|
71270
71339
|
const earlier = cursor;
|
|
71271
71340
|
let lowestOrder, highWater;
|
|
71341
|
+
|
|
71342
|
+
/* This loop tries to diff using larger units first.
|
|
71343
|
+
If we overshoot, we backtrack and try the next smaller unit.
|
|
71344
|
+
"cursor" starts out at the earlier timestamp and moves closer and closer to "later"
|
|
71345
|
+
as we use smaller and smaller units.
|
|
71346
|
+
highWater keeps track of where we would be if we added one more of the smallest unit,
|
|
71347
|
+
this is used later to potentially convert any difference smaller than the smallest higher order unit
|
|
71348
|
+
into a fraction of that smallest higher order unit
|
|
71349
|
+
*/
|
|
71272
71350
|
for (const [unit, differ] of differs) {
|
|
71273
71351
|
if (units.indexOf(unit) >= 0) {
|
|
71274
71352
|
lowestOrder = unit;
|
|
71275
71353
|
results[unit] = differ(cursor, later);
|
|
71276
71354
|
highWater = earlier.plus(results);
|
|
71277
71355
|
if (highWater > later) {
|
|
71356
|
+
// we overshot the end point, backtrack cursor by 1
|
|
71278
71357
|
results[unit]--;
|
|
71279
71358
|
cursor = earlier.plus(results);
|
|
71359
|
+
|
|
71360
|
+
// if we are still overshooting now, we need to backtrack again
|
|
71361
|
+
// this happens in certain situations when diffing times in different zones,
|
|
71362
|
+
// because this calculation ignores time zones
|
|
71363
|
+
if (cursor > later) {
|
|
71364
|
+
// keep the "overshot by 1" around as highWater
|
|
71365
|
+
highWater = cursor;
|
|
71366
|
+
// backtrack cursor by 1
|
|
71367
|
+
results[unit]--;
|
|
71368
|
+
cursor = earlier.plus(results);
|
|
71369
|
+
}
|
|
71280
71370
|
} else {
|
|
71281
71371
|
cursor = highWater;
|
|
71282
71372
|
}
|
|
@@ -71425,6 +71515,11 @@ function simple(regex) {
|
|
|
71425
71515
|
function escapeToken(value) {
|
|
71426
71516
|
return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
71427
71517
|
}
|
|
71518
|
+
|
|
71519
|
+
/**
|
|
71520
|
+
* @param token
|
|
71521
|
+
* @param {Locale} loc
|
|
71522
|
+
*/
|
|
71428
71523
|
function unitForToken(token, loc) {
|
|
71429
71524
|
const one = digitRegex(loc),
|
|
71430
71525
|
two = digitRegex(loc, "{2}"),
|
|
@@ -71449,9 +71544,9 @@ function unitForToken(token, loc) {
|
|
|
71449
71544
|
switch (t.val) {
|
|
71450
71545
|
// era
|
|
71451
71546
|
case "G":
|
|
71452
|
-
return oneOf(loc.eras("short"
|
|
71547
|
+
return oneOf(loc.eras("short"), 0);
|
|
71453
71548
|
case "GG":
|
|
71454
|
-
return oneOf(loc.eras("long"
|
|
71549
|
+
return oneOf(loc.eras("long"), 0);
|
|
71455
71550
|
// years
|
|
71456
71551
|
case "y":
|
|
71457
71552
|
return intUnit(oneToSix);
|
|
@@ -71469,17 +71564,17 @@ function unitForToken(token, loc) {
|
|
|
71469
71564
|
case "MM":
|
|
71470
71565
|
return intUnit(two);
|
|
71471
71566
|
case "MMM":
|
|
71472
|
-
return oneOf(loc.months("short", true
|
|
71567
|
+
return oneOf(loc.months("short", true), 1);
|
|
71473
71568
|
case "MMMM":
|
|
71474
|
-
return oneOf(loc.months("long", true
|
|
71569
|
+
return oneOf(loc.months("long", true), 1);
|
|
71475
71570
|
case "L":
|
|
71476
71571
|
return intUnit(oneOrTwo);
|
|
71477
71572
|
case "LL":
|
|
71478
71573
|
return intUnit(two);
|
|
71479
71574
|
case "LLL":
|
|
71480
|
-
return oneOf(loc.months("short", false
|
|
71575
|
+
return oneOf(loc.months("short", false), 1);
|
|
71481
71576
|
case "LLLL":
|
|
71482
|
-
return oneOf(loc.months("long", false
|
|
71577
|
+
return oneOf(loc.months("long", false), 1);
|
|
71483
71578
|
// dates
|
|
71484
71579
|
case "d":
|
|
71485
71580
|
return intUnit(oneOrTwo);
|
|
@@ -71539,13 +71634,13 @@ function unitForToken(token, loc) {
|
|
|
71539
71634
|
case "c":
|
|
71540
71635
|
return intUnit(one);
|
|
71541
71636
|
case "EEE":
|
|
71542
|
-
return oneOf(loc.weekdays("short", false
|
|
71637
|
+
return oneOf(loc.weekdays("short", false), 1);
|
|
71543
71638
|
case "EEEE":
|
|
71544
|
-
return oneOf(loc.weekdays("long", false
|
|
71639
|
+
return oneOf(loc.weekdays("long", false), 1);
|
|
71545
71640
|
case "ccc":
|
|
71546
|
-
return oneOf(loc.weekdays("short", true
|
|
71641
|
+
return oneOf(loc.weekdays("short", true), 1);
|
|
71547
71642
|
case "cccc":
|
|
71548
|
-
return oneOf(loc.weekdays("long", true
|
|
71643
|
+
return oneOf(loc.weekdays("long", true), 1);
|
|
71549
71644
|
// offset/zone
|
|
71550
71645
|
case "Z":
|
|
71551
71646
|
case "ZZ":
|
|
@@ -71591,10 +71686,14 @@ const partTypeStyleToTokenVal = {
|
|
|
71591
71686
|
},
|
|
71592
71687
|
dayperiod: "a",
|
|
71593
71688
|
dayPeriod: "a",
|
|
71594
|
-
|
|
71689
|
+
hour12: {
|
|
71595
71690
|
numeric: "h",
|
|
71596
71691
|
"2-digit": "hh"
|
|
71597
71692
|
},
|
|
71693
|
+
hour24: {
|
|
71694
|
+
numeric: "H",
|
|
71695
|
+
"2-digit": "HH"
|
|
71696
|
+
},
|
|
71598
71697
|
minute: {
|
|
71599
71698
|
numeric: "m",
|
|
71600
71699
|
"2-digit": "mm"
|
|
@@ -71608,7 +71707,7 @@ const partTypeStyleToTokenVal = {
|
|
|
71608
71707
|
short: "ZZZ"
|
|
71609
71708
|
}
|
|
71610
71709
|
};
|
|
71611
|
-
function tokenForPart(part, formatOpts) {
|
|
71710
|
+
function tokenForPart(part, formatOpts, resolvedOpts) {
|
|
71612
71711
|
const {
|
|
71613
71712
|
type,
|
|
71614
71713
|
value
|
|
@@ -71621,7 +71720,27 @@ function tokenForPart(part, formatOpts) {
|
|
|
71621
71720
|
};
|
|
71622
71721
|
}
|
|
71623
71722
|
const style = formatOpts[type];
|
|
71624
|
-
|
|
71723
|
+
|
|
71724
|
+
// The user might have explicitly specified hour12 or hourCycle
|
|
71725
|
+
// if so, respect their decision
|
|
71726
|
+
// if not, refer back to the resolvedOpts, which are based on the locale
|
|
71727
|
+
let actualType = type;
|
|
71728
|
+
if (type === "hour") {
|
|
71729
|
+
if (formatOpts.hour12 != null) {
|
|
71730
|
+
actualType = formatOpts.hour12 ? "hour12" : "hour24";
|
|
71731
|
+
} else if (formatOpts.hourCycle != null) {
|
|
71732
|
+
if (formatOpts.hourCycle === "h11" || formatOpts.hourCycle === "h12") {
|
|
71733
|
+
actualType = "hour12";
|
|
71734
|
+
} else {
|
|
71735
|
+
actualType = "hour24";
|
|
71736
|
+
}
|
|
71737
|
+
} else {
|
|
71738
|
+
// tokens only differentiate between 24 hours or not,
|
|
71739
|
+
// so we do not need to check hourCycle here, which is less supported anyways
|
|
71740
|
+
actualType = resolvedOpts.hour12 ? "hour12" : "hour24";
|
|
71741
|
+
}
|
|
71742
|
+
}
|
|
71743
|
+
let val = partTypeStyleToTokenVal[actualType];
|
|
71625
71744
|
if (typeof val === "object") {
|
|
71626
71745
|
val = val[style];
|
|
71627
71746
|
}
|
|
@@ -71797,8 +71916,10 @@ function formatOptsToTokens(formatOpts, locale) {
|
|
|
71797
71916
|
return null;
|
|
71798
71917
|
}
|
|
71799
71918
|
const formatter = Formatter.create(locale, formatOpts);
|
|
71800
|
-
const
|
|
71801
|
-
|
|
71919
|
+
const df = formatter.dtFormatter(getDummyDateTime());
|
|
71920
|
+
const parts = df.formatToParts();
|
|
71921
|
+
const resolvedOpts = df.resolvedOptions();
|
|
71922
|
+
return parts.map(p => tokenForPart(p, formatOpts, resolvedOpts));
|
|
71802
71923
|
}
|
|
71803
71924
|
|
|
71804
71925
|
const nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
|
|
@@ -72134,13 +72255,13 @@ function toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOf
|
|
|
72134
72255
|
if (extended) {
|
|
72135
72256
|
c += ":";
|
|
72136
72257
|
c += padStart(o.c.minute);
|
|
72137
|
-
if (o.c.second !== 0 || !suppressSeconds) {
|
|
72258
|
+
if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {
|
|
72138
72259
|
c += ":";
|
|
72139
72260
|
}
|
|
72140
72261
|
} else {
|
|
72141
72262
|
c += padStart(o.c.minute);
|
|
72142
72263
|
}
|
|
72143
|
-
if (o.c.second !== 0 || !suppressSeconds) {
|
|
72264
|
+
if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {
|
|
72144
72265
|
c += padStart(o.c.second);
|
|
72145
72266
|
if (o.c.millisecond !== 0 || !suppressMilliseconds) {
|
|
72146
72267
|
c += ".";
|
|
@@ -72774,7 +72895,7 @@ class DateTime {
|
|
|
72774
72895
|
|
|
72775
72896
|
/**
|
|
72776
72897
|
* Create an invalid DateTime.
|
|
72777
|
-
* @param {
|
|
72898
|
+
* @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.
|
|
72778
72899
|
* @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
|
|
72779
72900
|
* @return {DateTime}
|
|
72780
72901
|
*/
|
|
@@ -73133,6 +73254,41 @@ class DateTime {
|
|
|
73133
73254
|
}
|
|
73134
73255
|
}
|
|
73135
73256
|
|
|
73257
|
+
/**
|
|
73258
|
+
* Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC
|
|
73259
|
+
* in this DateTime's zone. During DST changes local time can be ambiguous, for example
|
|
73260
|
+
* `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.
|
|
73261
|
+
* This method will return both possible DateTimes if this DateTime's local time is ambiguous.
|
|
73262
|
+
* @returns {DateTime[]}
|
|
73263
|
+
*/
|
|
73264
|
+
getPossibleOffsets() {
|
|
73265
|
+
if (!this.isValid || this.isOffsetFixed) {
|
|
73266
|
+
return [this];
|
|
73267
|
+
}
|
|
73268
|
+
const dayMs = 86400000;
|
|
73269
|
+
const minuteMs = 60000;
|
|
73270
|
+
const localTS = objToLocalTS(this.c);
|
|
73271
|
+
const oEarlier = this.zone.offset(localTS - dayMs);
|
|
73272
|
+
const oLater = this.zone.offset(localTS + dayMs);
|
|
73273
|
+
const o1 = this.zone.offset(localTS - oEarlier * minuteMs);
|
|
73274
|
+
const o2 = this.zone.offset(localTS - oLater * minuteMs);
|
|
73275
|
+
if (o1 === o2) {
|
|
73276
|
+
return [this];
|
|
73277
|
+
}
|
|
73278
|
+
const ts1 = localTS - o1 * minuteMs;
|
|
73279
|
+
const ts2 = localTS - o2 * minuteMs;
|
|
73280
|
+
const c1 = tsToObj(ts1, o1);
|
|
73281
|
+
const c2 = tsToObj(ts2, o2);
|
|
73282
|
+
if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) {
|
|
73283
|
+
return [clone(this, {
|
|
73284
|
+
ts: ts1
|
|
73285
|
+
}), clone(this, {
|
|
73286
|
+
ts: ts2
|
|
73287
|
+
})];
|
|
73288
|
+
}
|
|
73289
|
+
return [this];
|
|
73290
|
+
}
|
|
73291
|
+
|
|
73136
73292
|
/**
|
|
73137
73293
|
* Returns true if this DateTime is in a leap year, false otherwise
|
|
73138
73294
|
* @example DateTime.local(2016).isInLeapYear //=> true
|
|
@@ -74139,7 +74295,7 @@ function friendlyDateTime(dateTimeish) {
|
|
|
74139
74295
|
}
|
|
74140
74296
|
}
|
|
74141
74297
|
|
|
74142
|
-
const VERSION = "3.
|
|
74298
|
+
const VERSION = "3.4.0";
|
|
74143
74299
|
|
|
74144
74300
|
exports.DateTime = DateTime;
|
|
74145
74301
|
exports.Duration = Duration;
|