From dd2ad72f6af0b4f26b0ef290c6a248e785031936 Mon Sep 17 00:00:00 2001 From: Fernando Boucquez Date: Mon, 30 Dec 2019 15:31:12 -0300 Subject: [PATCH 1/4] Open Api Library Removed open api generated code Removed open api templates Updated open api imports Patched some client call lines Added TransactionHttp tests mocking open api route clients. --- package-lock.json | 390 +++++++++- package.json | 1 + src/infrastructure/AccountHttp.ts | 2 +- src/infrastructure/BlockHttp.ts | 7 +- src/infrastructure/ChainHttp.ts | 12 +- src/infrastructure/DiagnosticHttp.ts | 12 +- src/infrastructure/Http.ts | 2 +- src/infrastructure/MetadataHttp.ts | 19 +- src/infrastructure/MosaicHttp.ts | 20 +- src/infrastructure/MultisigHttp.ts | 16 +- src/infrastructure/NamespaceHttp.ts | 38 +- src/infrastructure/NetworkHttp.ts | 12 +- src/infrastructure/NodeHttp.ts | 2 +- src/infrastructure/ReceiptHttp.ts | 8 +- src/infrastructure/RestrictionAccountHttp.ts | 9 +- src/infrastructure/RestrictionMosaicHttp.ts | 15 +- src/infrastructure/TransactionHttp.ts | 110 +-- src/infrastructure/api.ts | 30 - src/infrastructure/api/accountRoutesApi.ts | 599 -------------- src/infrastructure/api/apis.ts | 56 -- src/infrastructure/api/blockRoutesApi.ts | 355 --------- src/infrastructure/api/chainRoutesApi.ts | 192 ----- src/infrastructure/api/diagnosticRoutesApi.ts | 192 ----- src/infrastructure/api/metadataRoutesApi.ts | 728 ------------------ src/infrastructure/api/mosaicRoutesApi.ts | 322 -------- src/infrastructure/api/multisigRoutesApi.ts | 207 ----- src/infrastructure/api/namespaceRoutesApi.ts | 449 ----------- src/infrastructure/api/networkRoutesApi.ts | 139 ---- src/infrastructure/api/nodeRoutesApi.ts | 192 ----- src/infrastructure/api/receiptRoutesApi.ts | 214 ----- .../api/restrictionAccountRoutesApi.ts | 202 ----- .../api/restrictionMosaicRoutesApi.ts | 336 -------- .../api/transactionRoutesApi.ts | 507 ------------ ...untAddressRestrictionTransactionBodyDTO.ts | 64 -- ...accountAddressRestrictionTransactionDTO.ts | 124 --- src/infrastructure/model/accountDTO.ts | 120 --- src/infrastructure/model/accountIds.ts | 57 -- src/infrastructure/model/accountInfoDTO.ts | 46 -- .../model/accountLinkActionEnum.ts | 34 - .../model/accountLinkTransactionBodyDTO.ts | 52 -- .../model/accountLinkTransactionDTO.ts | 112 --- .../accountMetadataTransactionBodyDTO.ts | 81 -- .../model/accountMetadataTransactionDTO.ts | 141 ---- ...ountMosaicRestrictionTransactionBodyDTO.ts | 64 -- .../accountMosaicRestrictionTransactionDTO.ts | 124 --- src/infrastructure/model/accountNamesDTO.ts | 57 -- ...tOperationRestrictionTransactionBodyDTO.ts | 65 -- ...countOperationRestrictionTransactionDTO.ts | 125 --- .../model/accountRestrictionDTO.ts | 55 -- .../model/accountRestrictionFlagsEnum.ts | 48 -- .../model/accountRestrictionsDTO.ts | 55 -- .../model/accountRestrictionsInfoDTO.ts | 46 -- src/infrastructure/model/accountTypeEnum.ts | 39 - src/infrastructure/model/accountsNamesDTO.ts | 49 -- src/infrastructure/model/activityBucketDTO.ts | 66 -- .../model/addressAliasTransactionBodyDTO.ts | 64 -- .../model/addressAliasTransactionDTO.ts | 124 --- .../model/aggregateTransactionBodyDTO.ts | 65 -- .../model/aggregateTransactionDTO.ts | 125 --- src/infrastructure/model/aliasActionEnum.ts | 33 - src/infrastructure/model/aliasDTO.ts | 64 -- src/infrastructure/model/aliasTypeEnum.ts | 35 - .../model/announceTransactionInfoDTO.ts | 45 -- .../model/balanceChangeReceiptDTO.ts | 84 -- .../model/balanceChangeReceiptDTOAllOf.ts | 63 -- .../model/balanceTransferReceiptDTO.ts | 93 --- .../model/balanceTransferReceiptDTOAllOf.ts | 72 -- src/infrastructure/model/blockDTO.ts | 145 ---- src/infrastructure/model/blockDTOAllOf.ts | 105 --- src/infrastructure/model/blockInfoDTO.ts | 53 -- src/infrastructure/model/blockMetaDTO.ts | 78 -- src/infrastructure/model/chainScoreDTO.ts | 57 -- .../model/communicationTimestampsDTO.ts | 57 -- src/infrastructure/model/cosignature.ts | 60 -- src/infrastructure/model/cosignatureDTO.ts | 56 -- .../model/cosignatureDTOAllOf.ts | 45 -- ...AccountAddressRestrictionTransactionDTO.ts | 112 --- .../embeddedAccountLinkTransactionDTO.ts | 100 --- .../embeddedAccountMetadataTransactionDTO.ts | 129 ---- ...dAccountMosaicRestrictionTransactionDTO.ts | 112 --- ...countOperationRestrictionTransactionDTO.ts | 113 --- .../embeddedAddressAliasTransactionDTO.ts | 112 --- .../model/embeddedHashLockTransactionDTO.ts | 120 --- ...dMosaicAddressRestrictionTransactionDTO.ts | 132 ---- .../embeddedMosaicAliasTransactionDTO.ts | 112 --- .../embeddedMosaicDefinitionTransactionDTO.ts | 132 ---- ...edMosaicGlobalRestrictionTransactionDTO.ts | 145 ---- .../embeddedMosaicMetadataTransactionDTO.ts | 138 ---- ...mbeddedMosaicSupplyChangeTransactionDTO.ts | 112 --- ...ltisigAccountModificationTransactionDTO.ts | 123 --- ...embeddedNamespaceMetadataTransactionDTO.ts | 138 ---- ...ddedNamespaceRegistrationTransactionDTO.ts | 130 ---- .../model/embeddedSecretLockTransactionDTO.ts | 136 ---- .../embeddedSecretProofTransactionDTO.ts | 118 --- .../model/embeddedTransactionDTO.ts | 87 --- .../model/embeddedTransactionInfoDTO.ts | 52 -- .../model/embeddedTransactionMetaDTO.ts | 72 -- .../model/embeddedTransferTransactionDTO.ts | 113 --- src/infrastructure/model/entityDTO.ts | 67 -- .../model/hashLockTransactionBodyDTO.ts | 72 -- .../model/hashLockTransactionDTO.ts | 132 ---- src/infrastructure/model/heightInfoDTO.ts | 48 -- .../model/inflationReceiptDTO.ts | 78 -- .../model/inflationReceiptDTOAllOf.ts | 57 -- .../model/lockHashAlgorithmEnum.ts | 39 - src/infrastructure/model/merklePathItemDTO.ts | 51 -- .../model/merkleProofInfoDTO.ts | 49 -- src/infrastructure/model/messageDTO.ts | 55 -- src/infrastructure/model/messageTypeEnum.ts | 34 - src/infrastructure/model/metadataDTO.ts | 52 -- .../model/metadataEntriesDTO.ts | 49 -- src/infrastructure/model/metadataEntryDTO.ts | 88 --- src/infrastructure/model/metadataTypeEnum.ts | 35 - src/infrastructure/model/modelError.ts | 51 -- src/infrastructure/model/models.ts | 682 ---------------- src/infrastructure/model/mosaic.ts | 57 -- .../model/mosaicAddressRestrictionDTO.ts | 46 -- .../model/mosaicAddressRestrictionEntryDTO.ts | 57 -- ...mosaicAddressRestrictionEntryWrapperDTO.ts | 77 -- ...aicAddressRestrictionTransactionBodyDTO.ts | 84 -- .../mosaicAddressRestrictionTransactionDTO.ts | 144 ---- .../model/mosaicAliasTransactionBodyDTO.ts | 64 -- .../model/mosaicAliasTransactionDTO.ts | 124 --- src/infrastructure/model/mosaicDTO.ts | 117 --- .../mosaicDefinitionTransactionBodyDTO.ts | 84 -- .../model/mosaicDefinitionTransactionDTO.ts | 144 ---- .../model/mosaicExpiryReceiptDTO.ts | 69 -- .../model/mosaicExpiryReceiptDTOAllOf.ts | 48 -- .../model/mosaicGlobalRestrictionDTO.ts | 46 -- .../model/mosaicGlobalRestrictionEntryDTO.ts | 55 -- ...aicGlobalRestrictionEntryRestrictionDTO.ts | 64 -- .../mosaicGlobalRestrictionEntryWrapperDTO.ts | 68 -- ...saicGlobalRestrictionTransactionBodyDTO.ts | 97 --- .../mosaicGlobalRestrictionTransactionDTO.ts | 157 ---- src/infrastructure/model/mosaicIds.ts | 48 -- src/infrastructure/model/mosaicInfoDTO.ts | 46 -- .../model/mosaicMetadataTransactionBodyDTO.ts | 90 --- .../model/mosaicMetadataTransactionDTO.ts | 150 ---- src/infrastructure/model/mosaicNamesDTO.ts | 57 -- .../model/mosaicRestrictionEntryTypeEnum.ts | 34 - .../model/mosaicRestrictionTypeEnum.ts | 45 -- .../model/mosaicSupplyChangeActionEnum.ts | 33 - .../mosaicSupplyChangeTransactionBodyDTO.ts | 64 -- .../model/mosaicSupplyChangeTransactionDTO.ts | 124 --- src/infrastructure/model/mosaicsInfoDTO.ts | 49 -- src/infrastructure/model/mosaicsNamesDTO.ts | 49 -- .../model/multisigAccountGraphInfoDTO.ts | 58 -- .../model/multisigAccountInfoDTO.ts | 46 -- ...igAccountModificationTransactionBodyDTO.ts | 75 -- ...ltisigAccountModificationTransactionDTO.ts | 135 ---- src/infrastructure/model/multisigDTO.ts | 90 --- src/infrastructure/model/namespaceDTO.ts | 131 ---- .../model/namespaceExpiryReceiptDTO.ts | 69 -- .../model/namespaceExpiryReceiptDTOAllOf.ts | 48 -- src/infrastructure/model/namespaceIds.ts | 48 -- src/infrastructure/model/namespaceInfoDTO.ts | 53 -- src/infrastructure/model/namespaceMetaDTO.ts | 57 -- .../namespaceMetadataTransactionBodyDTO.ts | 90 --- .../model/namespaceMetadataTransactionDTO.ts | 150 ---- src/infrastructure/model/namespaceNameDTO.ts | 66 -- ...namespaceRegistrationTransactionBodyDTO.ts | 82 -- .../namespaceRegistrationTransactionDTO.ts | 142 ---- .../model/namespaceRegistrationTypeEnum.ts | 33 - src/infrastructure/model/namespacesInfoDTO.ts | 49 -- src/infrastructure/model/networkTypeDTO.ts | 57 -- src/infrastructure/model/networkTypeEnum.ts | 38 - src/infrastructure/model/nodeInfoDTO.ts | 94 --- src/infrastructure/model/nodeTimeDTO.ts | 46 -- src/infrastructure/model/receiptDTO.ts | 55 -- src/infrastructure/model/receiptTypeEnum.ts | 62 -- .../model/resolutionEntryDTO.ts | 52 -- .../model/resolutionStatementBodyDTO.ts | 64 -- .../model/resolutionStatementDTO.ts | 49 -- src/infrastructure/model/rolesTypeEnum.ts | 35 - .../model/secretLockTransactionBodyDTO.ts | 88 --- .../model/secretLockTransactionDTO.ts | 148 ---- .../model/secretProofTransactionBodyDTO.ts | 70 -- .../model/secretProofTransactionDTO.ts | 130 ---- src/infrastructure/model/serverDTO.ts | 57 -- src/infrastructure/model/serverInfoDTO.ts | 46 -- src/infrastructure/model/sourceDTO.ts | 60 -- src/infrastructure/model/statementsDTO.ts | 71 -- src/infrastructure/model/storageInfoDTO.ts | 66 -- .../model/transactionBodyDTO.ts | 57 -- src/infrastructure/model/transactionDTO.ts | 97 --- src/infrastructure/model/transactionHashes.ts | 48 -- src/infrastructure/model/transactionIds.ts | 48 -- .../model/transactionInfoDTO.ts | 52 -- .../model/transactionMetaDTO.ts | 72 -- .../model/transactionPayload.ts | 48 -- .../model/transactionStateTypeEnum.ts | 35 - .../model/transactionStatementBodyDTO.ts | 64 -- .../model/transactionStatementDTO.ts | 49 -- .../model/transactionStatusDTO.ts | 77 -- .../model/transactionStatusTypeEnum.ts | 179 ----- .../model/transactionTypeEnum.ts | 72 -- .../model/transferTransactionBodyDTO.ts | 65 -- .../model/transferTransactionDTO.ts | 125 --- src/infrastructure/model/unresolvedMosaic.ts | 57 -- .../model/verifiableEntityDTO.ts | 48 -- src/infrastructure/templates/api-all.mustache | 13 - .../templates/api-single.mustache | 235 ------ src/infrastructure/templates/api.mustache | 4 - .../templates/git_push.sh.mustache | 52 -- src/infrastructure/templates/gitignore | 4 - .../templates/licenseInfo.mustache | 26 - src/infrastructure/templates/model.mustache | 69 -- src/infrastructure/templates/models.mustache | 210 ----- src/infrastructure/templates/package.mustache | 29 - .../templates/tsconfig.mustache | 23 - test/infrastructure/TransactionHttp.spec.ts | 84 +- .../transaction/TransactionStatus.spec.ts | 16 +- 212 files changed, 560 insertions(+), 19218 deletions(-) delete mode 100644 src/infrastructure/api.ts delete mode 100644 src/infrastructure/api/accountRoutesApi.ts delete mode 100644 src/infrastructure/api/apis.ts delete mode 100644 src/infrastructure/api/blockRoutesApi.ts delete mode 100644 src/infrastructure/api/chainRoutesApi.ts delete mode 100644 src/infrastructure/api/diagnosticRoutesApi.ts delete mode 100644 src/infrastructure/api/metadataRoutesApi.ts delete mode 100644 src/infrastructure/api/mosaicRoutesApi.ts delete mode 100644 src/infrastructure/api/multisigRoutesApi.ts delete mode 100644 src/infrastructure/api/namespaceRoutesApi.ts delete mode 100644 src/infrastructure/api/networkRoutesApi.ts delete mode 100644 src/infrastructure/api/nodeRoutesApi.ts delete mode 100644 src/infrastructure/api/receiptRoutesApi.ts delete mode 100644 src/infrastructure/api/restrictionAccountRoutesApi.ts delete mode 100644 src/infrastructure/api/restrictionMosaicRoutesApi.ts delete mode 100644 src/infrastructure/api/transactionRoutesApi.ts delete mode 100644 src/infrastructure/model/accountAddressRestrictionTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/accountAddressRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/accountDTO.ts delete mode 100644 src/infrastructure/model/accountIds.ts delete mode 100644 src/infrastructure/model/accountInfoDTO.ts delete mode 100644 src/infrastructure/model/accountLinkActionEnum.ts delete mode 100644 src/infrastructure/model/accountLinkTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/accountLinkTransactionDTO.ts delete mode 100644 src/infrastructure/model/accountMetadataTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/accountMetadataTransactionDTO.ts delete mode 100644 src/infrastructure/model/accountMosaicRestrictionTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/accountMosaicRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/accountNamesDTO.ts delete mode 100644 src/infrastructure/model/accountOperationRestrictionTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/accountOperationRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/accountRestrictionDTO.ts delete mode 100644 src/infrastructure/model/accountRestrictionFlagsEnum.ts delete mode 100644 src/infrastructure/model/accountRestrictionsDTO.ts delete mode 100644 src/infrastructure/model/accountRestrictionsInfoDTO.ts delete mode 100644 src/infrastructure/model/accountTypeEnum.ts delete mode 100644 src/infrastructure/model/accountsNamesDTO.ts delete mode 100644 src/infrastructure/model/activityBucketDTO.ts delete mode 100644 src/infrastructure/model/addressAliasTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/addressAliasTransactionDTO.ts delete mode 100644 src/infrastructure/model/aggregateTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/aggregateTransactionDTO.ts delete mode 100644 src/infrastructure/model/aliasActionEnum.ts delete mode 100644 src/infrastructure/model/aliasDTO.ts delete mode 100644 src/infrastructure/model/aliasTypeEnum.ts delete mode 100644 src/infrastructure/model/announceTransactionInfoDTO.ts delete mode 100644 src/infrastructure/model/balanceChangeReceiptDTO.ts delete mode 100644 src/infrastructure/model/balanceChangeReceiptDTOAllOf.ts delete mode 100644 src/infrastructure/model/balanceTransferReceiptDTO.ts delete mode 100644 src/infrastructure/model/balanceTransferReceiptDTOAllOf.ts delete mode 100644 src/infrastructure/model/blockDTO.ts delete mode 100644 src/infrastructure/model/blockDTOAllOf.ts delete mode 100644 src/infrastructure/model/blockInfoDTO.ts delete mode 100644 src/infrastructure/model/blockMetaDTO.ts delete mode 100644 src/infrastructure/model/chainScoreDTO.ts delete mode 100644 src/infrastructure/model/communicationTimestampsDTO.ts delete mode 100644 src/infrastructure/model/cosignature.ts delete mode 100644 src/infrastructure/model/cosignatureDTO.ts delete mode 100644 src/infrastructure/model/cosignatureDTOAllOf.ts delete mode 100644 src/infrastructure/model/embeddedAccountAddressRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedAccountLinkTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedAccountMetadataTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedAccountMosaicRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedAccountOperationRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedAddressAliasTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedHashLockTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedMosaicAddressRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedMosaicAliasTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedMosaicDefinitionTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedMosaicGlobalRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedMosaicMetadataTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedMosaicSupplyChangeTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedMultisigAccountModificationTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedNamespaceMetadataTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedNamespaceRegistrationTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedSecretLockTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedSecretProofTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedTransactionDTO.ts delete mode 100644 src/infrastructure/model/embeddedTransactionInfoDTO.ts delete mode 100644 src/infrastructure/model/embeddedTransactionMetaDTO.ts delete mode 100644 src/infrastructure/model/embeddedTransferTransactionDTO.ts delete mode 100644 src/infrastructure/model/entityDTO.ts delete mode 100644 src/infrastructure/model/hashLockTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/hashLockTransactionDTO.ts delete mode 100644 src/infrastructure/model/heightInfoDTO.ts delete mode 100644 src/infrastructure/model/inflationReceiptDTO.ts delete mode 100644 src/infrastructure/model/inflationReceiptDTOAllOf.ts delete mode 100644 src/infrastructure/model/lockHashAlgorithmEnum.ts delete mode 100644 src/infrastructure/model/merklePathItemDTO.ts delete mode 100644 src/infrastructure/model/merkleProofInfoDTO.ts delete mode 100644 src/infrastructure/model/messageDTO.ts delete mode 100644 src/infrastructure/model/messageTypeEnum.ts delete mode 100644 src/infrastructure/model/metadataDTO.ts delete mode 100644 src/infrastructure/model/metadataEntriesDTO.ts delete mode 100644 src/infrastructure/model/metadataEntryDTO.ts delete mode 100644 src/infrastructure/model/metadataTypeEnum.ts delete mode 100644 src/infrastructure/model/modelError.ts delete mode 100644 src/infrastructure/model/models.ts delete mode 100644 src/infrastructure/model/mosaic.ts delete mode 100644 src/infrastructure/model/mosaicAddressRestrictionDTO.ts delete mode 100644 src/infrastructure/model/mosaicAddressRestrictionEntryDTO.ts delete mode 100644 src/infrastructure/model/mosaicAddressRestrictionEntryWrapperDTO.ts delete mode 100644 src/infrastructure/model/mosaicAddressRestrictionTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/mosaicAddressRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/mosaicAliasTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/mosaicAliasTransactionDTO.ts delete mode 100644 src/infrastructure/model/mosaicDTO.ts delete mode 100644 src/infrastructure/model/mosaicDefinitionTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/mosaicDefinitionTransactionDTO.ts delete mode 100644 src/infrastructure/model/mosaicExpiryReceiptDTO.ts delete mode 100644 src/infrastructure/model/mosaicExpiryReceiptDTOAllOf.ts delete mode 100644 src/infrastructure/model/mosaicGlobalRestrictionDTO.ts delete mode 100644 src/infrastructure/model/mosaicGlobalRestrictionEntryDTO.ts delete mode 100644 src/infrastructure/model/mosaicGlobalRestrictionEntryRestrictionDTO.ts delete mode 100644 src/infrastructure/model/mosaicGlobalRestrictionEntryWrapperDTO.ts delete mode 100644 src/infrastructure/model/mosaicGlobalRestrictionTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/mosaicGlobalRestrictionTransactionDTO.ts delete mode 100644 src/infrastructure/model/mosaicIds.ts delete mode 100644 src/infrastructure/model/mosaicInfoDTO.ts delete mode 100644 src/infrastructure/model/mosaicMetadataTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/mosaicMetadataTransactionDTO.ts delete mode 100644 src/infrastructure/model/mosaicNamesDTO.ts delete mode 100644 src/infrastructure/model/mosaicRestrictionEntryTypeEnum.ts delete mode 100644 src/infrastructure/model/mosaicRestrictionTypeEnum.ts delete mode 100644 src/infrastructure/model/mosaicSupplyChangeActionEnum.ts delete mode 100644 src/infrastructure/model/mosaicSupplyChangeTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/mosaicSupplyChangeTransactionDTO.ts delete mode 100644 src/infrastructure/model/mosaicsInfoDTO.ts delete mode 100644 src/infrastructure/model/mosaicsNamesDTO.ts delete mode 100644 src/infrastructure/model/multisigAccountGraphInfoDTO.ts delete mode 100644 src/infrastructure/model/multisigAccountInfoDTO.ts delete mode 100644 src/infrastructure/model/multisigAccountModificationTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/multisigAccountModificationTransactionDTO.ts delete mode 100644 src/infrastructure/model/multisigDTO.ts delete mode 100644 src/infrastructure/model/namespaceDTO.ts delete mode 100644 src/infrastructure/model/namespaceExpiryReceiptDTO.ts delete mode 100644 src/infrastructure/model/namespaceExpiryReceiptDTOAllOf.ts delete mode 100644 src/infrastructure/model/namespaceIds.ts delete mode 100644 src/infrastructure/model/namespaceInfoDTO.ts delete mode 100644 src/infrastructure/model/namespaceMetaDTO.ts delete mode 100644 src/infrastructure/model/namespaceMetadataTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/namespaceMetadataTransactionDTO.ts delete mode 100644 src/infrastructure/model/namespaceNameDTO.ts delete mode 100644 src/infrastructure/model/namespaceRegistrationTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/namespaceRegistrationTransactionDTO.ts delete mode 100644 src/infrastructure/model/namespaceRegistrationTypeEnum.ts delete mode 100644 src/infrastructure/model/namespacesInfoDTO.ts delete mode 100644 src/infrastructure/model/networkTypeDTO.ts delete mode 100644 src/infrastructure/model/networkTypeEnum.ts delete mode 100644 src/infrastructure/model/nodeInfoDTO.ts delete mode 100644 src/infrastructure/model/nodeTimeDTO.ts delete mode 100644 src/infrastructure/model/receiptDTO.ts delete mode 100644 src/infrastructure/model/receiptTypeEnum.ts delete mode 100644 src/infrastructure/model/resolutionEntryDTO.ts delete mode 100644 src/infrastructure/model/resolutionStatementBodyDTO.ts delete mode 100644 src/infrastructure/model/resolutionStatementDTO.ts delete mode 100644 src/infrastructure/model/rolesTypeEnum.ts delete mode 100644 src/infrastructure/model/secretLockTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/secretLockTransactionDTO.ts delete mode 100644 src/infrastructure/model/secretProofTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/secretProofTransactionDTO.ts delete mode 100644 src/infrastructure/model/serverDTO.ts delete mode 100644 src/infrastructure/model/serverInfoDTO.ts delete mode 100644 src/infrastructure/model/sourceDTO.ts delete mode 100644 src/infrastructure/model/statementsDTO.ts delete mode 100644 src/infrastructure/model/storageInfoDTO.ts delete mode 100644 src/infrastructure/model/transactionBodyDTO.ts delete mode 100644 src/infrastructure/model/transactionDTO.ts delete mode 100644 src/infrastructure/model/transactionHashes.ts delete mode 100644 src/infrastructure/model/transactionIds.ts delete mode 100644 src/infrastructure/model/transactionInfoDTO.ts delete mode 100644 src/infrastructure/model/transactionMetaDTO.ts delete mode 100644 src/infrastructure/model/transactionPayload.ts delete mode 100644 src/infrastructure/model/transactionStateTypeEnum.ts delete mode 100644 src/infrastructure/model/transactionStatementBodyDTO.ts delete mode 100644 src/infrastructure/model/transactionStatementDTO.ts delete mode 100644 src/infrastructure/model/transactionStatusDTO.ts delete mode 100644 src/infrastructure/model/transactionStatusTypeEnum.ts delete mode 100644 src/infrastructure/model/transactionTypeEnum.ts delete mode 100644 src/infrastructure/model/transferTransactionBodyDTO.ts delete mode 100644 src/infrastructure/model/transferTransactionDTO.ts delete mode 100644 src/infrastructure/model/unresolvedMosaic.ts delete mode 100644 src/infrastructure/model/verifiableEntityDTO.ts delete mode 100755 src/infrastructure/templates/api-all.mustache delete mode 100755 src/infrastructure/templates/api-single.mustache delete mode 100755 src/infrastructure/templates/api.mustache delete mode 100755 src/infrastructure/templates/git_push.sh.mustache delete mode 100755 src/infrastructure/templates/gitignore delete mode 100755 src/infrastructure/templates/licenseInfo.mustache delete mode 100755 src/infrastructure/templates/model.mustache delete mode 100755 src/infrastructure/templates/models.mustache delete mode 100755 src/infrastructure/templates/package.mustache delete mode 100755 src/infrastructure/templates/tsconfig.mustache diff --git a/package-lock.json b/package-lock.json index a7618ee191..78c5fb6e87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -153,11 +153,15 @@ "to-fast-properties": "^2.0.0" } }, + "@types/bluebird": { + "version": "3.5.29", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.29.tgz", + "integrity": "sha512-kmVtnxTuUuhCET669irqQmPAez4KFnFVKvpleVRyfC3g+SHD1hIkFZcWLim9BVcwUBLO59o8VZE4yGCmTif8Yw==" + }, "@types/caseless": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", - "integrity": "sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A==", - "dev": true + "integrity": "sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A==" }, "@types/chai": { "version": "4.1.2", @@ -175,7 +179,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", - "dev": true, "requires": { "@types/node": "*" } @@ -201,14 +204,12 @@ "@types/node": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.0.tgz", - "integrity": "sha512-h3YZbOq2+ZoDFI1z8Zx0Ck/xRWkOESVaLdgLdd/c25mMQ1Y2CAkILu9ny5A15S5f32gGcQdaUIZ2jzYr8D7IFg==", - "dev": true + "integrity": "sha512-h3YZbOq2+ZoDFI1z8Zx0Ck/xRWkOESVaLdgLdd/c25mMQ1Y2CAkILu9ny5A15S5f32gGcQdaUIZ2jzYr8D7IFg==" }, "@types/request": { "version": "2.47.0", "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.0.tgz", "integrity": "sha512-/KXM5oev+nNCLIgBjkwbk8VqxmzI56woD4VUxn95O+YeQ8hJzcSmIZ1IN3WexiqBb6srzDo2bdMbsXxgXNkz5Q==", - "dev": true, "requires": { "@types/caseless": "*", "@types/form-data": "*", @@ -228,8 +229,7 @@ "@types/tough-cookie": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha512-vOVmaruQG5EatOU/jM6yU2uCp3Lz6mK1P5Ztu4iJjfM4SVHU9XYktPUQtKlIXuahqXHdEyUarMrBEwg5Cwu+bA==", - "dev": true + "integrity": "sha512-vOVmaruQG5EatOU/jM6yU2uCp3Lz6mK1P5Ztu4iJjfM4SVHU9XYktPUQtKlIXuahqXHdEyUarMrBEwg5Cwu+bA==" }, "@types/utf8": { "version": "2.1.6", @@ -278,8 +278,7 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "3.2.1", @@ -545,6 +544,216 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" + } + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + } + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + } + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, "bach": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", @@ -565,8 +774,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", @@ -647,7 +855,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -955,8 +1162,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { "version": "1.6.2", @@ -974,7 +1180,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, "requires": { "safe-buffer": "~5.1.1" } @@ -995,6 +1200,11 @@ "is-plain-object": "^2.0.1" } }, + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -1325,6 +1535,14 @@ "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", "dev": true }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "requires": { + "repeating": "^2.0.0" + } + }, "diff": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", @@ -1439,8 +1657,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "esprima": { "version": "4.0.1", @@ -1451,8 +1668,7 @@ "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, "expand-brackets": { "version": "2.1.4", @@ -2600,6 +2816,14 @@ "har-schema": "^2.0.0" } }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, "has-flag": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", @@ -2668,6 +2892,15 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, "homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -2726,6 +2959,14 @@ "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", @@ -2834,6 +3075,14 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -3068,6 +3317,11 @@ "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -3117,6 +3371,11 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -3252,6 +3511,14 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", @@ -3430,7 +3697,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3466,7 +3732,6 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, "requires": { "minimist": "0.0.8" }, @@ -3474,8 +3739,7 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, @@ -3526,8 +3790,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "mute-stdout": { "version": "1.0.1", @@ -3554,6 +3817,18 @@ "to-regex": "^3.0.1" } }, + "nem2-sdk-openapi-typescript-node-client": { + "version": "0.7.2-0.6-SNAPSHOT.201912301439", + "resolved": "https://registry.npmjs.org/nem2-sdk-openapi-typescript-node-client/-/nem2-sdk-openapi-typescript-node-client-0.7.2-0.6-SNAPSHOT.201912301439.tgz", + "integrity": "sha512-Ly4majOnvFQ/qnlB0dMmLZbc7s9eDJ1Bv76MZNx1moK+Ndnn27zg6Vrlr3ZIDLQ0l3CRiA1nmj5pvsJpVpxGZw==", + "requires": { + "@types/bluebird": "*", + "@types/request": "*", + "bluebird": "^3.5.0", + "request": "^2.81.0", + "rewire": "^3.0.2" + } + }, "neo-async": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", @@ -3622,8 +3897,7 @@ "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { "version": "14.1.1", @@ -3953,8 +4227,7 @@ "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { "version": "1.4.0", @@ -3965,6 +4238,11 @@ "lcid": "^1.0.0" } }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, "p-limit": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", @@ -4057,8 +4335,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-parse": { "version": "1.0.5", @@ -4168,6 +4445,11 @@ "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" + }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", @@ -4272,6 +4554,11 @@ "resolve": "^1.1.6" } }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -4330,6 +4617,14 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "^1.0.0" + } + }, "replace-ext": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", @@ -4479,6 +4774,15 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "rewire": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rewire/-/rewire-3.0.2.tgz", + "integrity": "sha512-ejkkt3qYnsQ38ifc9llAAzuHiGM7kR8N5/mL3aHWgmWwet0OMFcmJB8aTsMV2PBHCWxNVTLCeRfBpEa8X2+1fw==", + "requires": { + "babel-core": "^6.26.0", + "babel-plugin-transform-es2015-block-scoping": "^6.26.0" + } + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -4596,6 +4900,11 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -4715,8 +5024,7 @@ "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-resolve": { "version": "0.5.2", @@ -4731,6 +5039,14 @@ "urix": "^0.1.0" } }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "requires": { + "source-map": "^0.5.6" + } + }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", @@ -4887,7 +5203,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5141,6 +5456,11 @@ "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==" }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, "ts-mockito": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/ts-mockito/-/ts-mockito-2.5.0.tgz", diff --git a/package.json b/package.json index ddd14e1ceb..d1500ac87f 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "dependencies": { "bluebird": "^3.5.5", "catbuffer": "0.0.6-SNAPSHOT", + "nem2-sdk-openapi-typescript-node-client": "0.7.2-0.6-SNAPSHOT.201912301439", "crypto-js": "^3.1.9-1", "js-joda": "^1.6.2", "js-sha256": "^0.9.0", diff --git a/src/infrastructure/AccountHttp.ts b/src/infrastructure/AccountHttp.ts index 5c9dc737af..7e3a6df1f3 100644 --- a/src/infrastructure/AccountHttp.ts +++ b/src/infrastructure/AccountHttp.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { AccountInfoDTO, AccountRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; import { from as observableFrom, Observable, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { AccountInfo } from '../model/account/AccountInfo'; @@ -25,7 +26,6 @@ import { AggregateTransaction } from '../model/transaction/AggregateTransaction' import { Transaction } from '../model/transaction/Transaction'; import { UInt64 } from '../model/UInt64'; import { AccountRepository } from './AccountRepository'; -import { AccountInfoDTO, AccountRoutesApi } from './api'; import { Http } from './Http'; import { QueryParams } from './QueryParams'; import { CreateTransactionFromDTO } from './transaction/CreateTransactionFromDTO'; diff --git a/src/infrastructure/BlockHttp.ts b/src/infrastructure/BlockHttp.ts index 26175a966d..0bec23ef42 100644 --- a/src/infrastructure/BlockHttp.ts +++ b/src/infrastructure/BlockHttp.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { BlockInfoDTO, BlockRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; import { from as observableFrom, Observable, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { PublicAccount } from '../model/account/PublicAccount'; @@ -22,14 +23,10 @@ import { MerklePathItem } from '../model/blockchain/MerklePathItem'; import { MerkleProofInfo } from '../model/blockchain/MerkleProofInfo'; import { Transaction } from '../model/transaction/Transaction'; import { UInt64 } from '../model/UInt64'; -import { BlockInfoDTO, BlockRoutesApi } from './api'; import { BlockRepository } from './BlockRepository'; import { Http } from './Http'; import { QueryParams } from './QueryParams'; -import { - CreateTransactionFromDTO, - extractBeneficiary, -} from './transaction/CreateTransactionFromDTO'; +import { CreateTransactionFromDTO, extractBeneficiary, } from './transaction/CreateTransactionFromDTO'; /** * Blockchain http repository. diff --git a/src/infrastructure/ChainHttp.ts b/src/infrastructure/ChainHttp.ts index 2246f491ca..4ac70cc9ae 100644 --- a/src/infrastructure/ChainHttp.ts +++ b/src/infrastructure/ChainHttp.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map} from 'rxjs/operators'; -import {BlockchainScore} from '../model/blockchain/BlockchainScore'; -import {UInt64} from '../model/UInt64'; -import { ChainRoutesApi } from './api'; +import { ChainRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; +import { BlockchainScore } from '../model/blockchain/BlockchainScore'; +import { UInt64 } from '../model/UInt64'; import { ChainRepository } from './ChainRepository'; -import {Http} from './Http'; +import { Http } from './Http'; /** * Chian http repository. diff --git a/src/infrastructure/DiagnosticHttp.ts b/src/infrastructure/DiagnosticHttp.ts index 300c507ca1..32cc201a9e 100644 --- a/src/infrastructure/DiagnosticHttp.ts +++ b/src/infrastructure/DiagnosticHttp.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map} from 'rxjs/operators'; -import {BlockchainStorageInfo} from '../model/blockchain/BlockchainStorageInfo'; +import { DiagnosticRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; +import { BlockchainStorageInfo } from '../model/blockchain/BlockchainStorageInfo'; import { ServerInfo } from '../model/diagnostic/ServerInfo'; -import { DiagnosticRoutesApi } from './api'; -import {DiagnosticRepository} from './DiagnosticRepository'; -import {Http} from './Http'; +import { DiagnosticRepository } from './DiagnosticRepository'; +import { Http } from './Http'; /** * Diagnostic http repository. diff --git a/src/infrastructure/Http.ts b/src/infrastructure/Http.ts index 861e294d9e..7103a325cd 100644 --- a/src/infrastructure/Http.ts +++ b/src/infrastructure/Http.ts @@ -14,11 +14,11 @@ * limitations under the License. */ +import { NodeRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; // tslint:disable-next-line: ordered-imports import { from as observableFrom, Observable, of as observableOf, throwError } from 'rxjs'; import { catchError, map, shareReplay } from 'rxjs/operators'; import { NetworkType } from '../model/blockchain/NetworkType'; -import { NodeRoutesApi } from './api/nodeRoutesApi'; import { QueryParams } from './QueryParams'; /** diff --git a/src/infrastructure/MetadataHttp.ts b/src/infrastructure/MetadataHttp.ts index f7f93ad807..fbd3ca4577 100644 --- a/src/infrastructure/MetadataHttp.ts +++ b/src/infrastructure/MetadataHttp.ts @@ -14,19 +14,18 @@ * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map} from 'rxjs/operators'; +import { MetadataDTO, MetadataRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; import { Convert } from '../core/format/Convert'; import { Address } from '../model/account/Address'; -import { NetworkType } from '../model/blockchain/NetworkType'; import { Metadata } from '../model/metadata/Metadata'; import { MetadataEntry } from '../model/metadata/MetadataEntry'; import { MetadataType } from '../model/metadata/MetadataType'; -import {MosaicId} from '../model/mosaic/MosaicId'; -import {NamespaceId} from '../model/namespace/NamespaceId'; -import {UInt64} from '../model/UInt64'; -import { MetadataDTO, MetadataRoutesApi } from './api'; -import {Http} from './Http'; +import { MosaicId } from '../model/mosaic/MosaicId'; +import { NamespaceId } from '../model/namespace/NamespaceId'; +import { UInt64 } from '../model/UInt64'; +import { Http } from './Http'; import { MetadataRepository } from './MetadataRepository'; import { QueryParams } from './QueryParams'; @@ -214,10 +213,10 @@ export class MetadataHttp extends Http implements MetadataRepository { switch (metadataEntry.metadataType.valueOf()) { case MetadataType.Mosaic: - targetId = new MosaicId(metadataEntry.targetId); + targetId = new MosaicId(metadataEntry.targetId as any); break; case MetadataType.Namespace: - targetId = NamespaceId.createFromEncoded(metadataEntry.targetId); + targetId = NamespaceId.createFromEncoded(metadataEntry.targetId as any); break; default: targetId = undefined; diff --git a/src/infrastructure/MosaicHttp.ts b/src/infrastructure/MosaicHttp.ts index 009a60e6c9..78d354067c 100644 --- a/src/infrastructure/MosaicHttp.ts +++ b/src/infrastructure/MosaicHttp.ts @@ -14,18 +14,18 @@ * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map, mergeMap} from 'rxjs/operators'; +import { MosaicRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map, mergeMap } from 'rxjs/operators'; import { Address } from '../model/account/Address'; -import {PublicAccount} from '../model/account/PublicAccount'; +import { PublicAccount } from '../model/account/PublicAccount'; import { NetworkType } from '../model/blockchain/NetworkType'; -import {MosaicFlags} from '../model/mosaic/MosaicFlags'; -import {MosaicId} from '../model/mosaic/MosaicId'; -import {MosaicInfo} from '../model/mosaic/MosaicInfo'; -import {UInt64} from '../model/UInt64'; -import { MosaicRoutesApi } from './api'; -import {Http} from './Http'; -import {MosaicRepository} from './MosaicRepository'; +import { MosaicFlags } from '../model/mosaic/MosaicFlags'; +import { MosaicId } from '../model/mosaic/MosaicId'; +import { MosaicInfo } from '../model/mosaic/MosaicInfo'; +import { UInt64 } from '../model/UInt64'; +import { Http } from './Http'; +import { MosaicRepository } from './MosaicRepository'; /** * Mosaic http repository. diff --git a/src/infrastructure/MultisigHttp.ts b/src/infrastructure/MultisigHttp.ts index 7770164123..110e8189d8 100644 --- a/src/infrastructure/MultisigHttp.ts +++ b/src/infrastructure/MultisigHttp.ts @@ -14,15 +14,15 @@ * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map, mergeMap} from 'rxjs/operators'; -import {Address} from '../model/account/Address'; -import {MultisigAccountGraphInfo} from '../model/account/MultisigAccountGraphInfo'; -import {MultisigAccountInfo} from '../model/account/MultisigAccountInfo'; -import {PublicAccount} from '../model/account/PublicAccount'; +import { MultisigRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map, mergeMap } from 'rxjs/operators'; +import { Address } from '../model/account/Address'; +import { MultisigAccountGraphInfo } from '../model/account/MultisigAccountGraphInfo'; +import { MultisigAccountInfo } from '../model/account/MultisigAccountInfo'; +import { PublicAccount } from '../model/account/PublicAccount'; import { NetworkType } from '../model/blockchain/NetworkType'; -import { MultisigRoutesApi } from './api/multisigRoutesApi'; -import {Http} from './Http'; +import { Http } from './Http'; import { MultisigRepository } from './MultisigRepository'; /** diff --git a/src/infrastructure/NamespaceHttp.ts b/src/infrastructure/NamespaceHttp.ts index fdbd87027b..86b3bff8ea 100644 --- a/src/infrastructure/NamespaceHttp.ts +++ b/src/infrastructure/NamespaceHttp.ts @@ -13,28 +13,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map, mergeMap} from 'rxjs/operators'; -import {Convert as convert, RawAddress as AddressLibrary} from '../core/format'; +import { NamespaceRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map, mergeMap } from 'rxjs/operators'; +import { Convert as convert, RawAddress as AddressLibrary } from '../core/format'; import { AccountNames } from '../model/account/AccountNames'; -import {Address} from '../model/account/Address'; -import {PublicAccount} from '../model/account/PublicAccount'; +import { Address } from '../model/account/Address'; +import { PublicAccount } from '../model/account/PublicAccount'; import { NetworkType } from '../model/blockchain/NetworkType'; -import {MosaicId} from '../model/mosaic/MosaicId'; +import { MosaicId } from '../model/mosaic/MosaicId'; import { MosaicNames } from '../model/mosaic/MosaicNames'; -import {AddressAlias} from '../model/namespace/AddressAlias'; -import {Alias} from '../model/namespace/Alias'; -import {AliasType} from '../model/namespace/AliasType'; -import {EmptyAlias} from '../model/namespace/EmptyAlias'; -import {MosaicAlias} from '../model/namespace/MosaicAlias'; -import {NamespaceId} from '../model/namespace/NamespaceId'; -import {NamespaceInfo} from '../model/namespace/NamespaceInfo'; -import {NamespaceName} from '../model/namespace/NamespaceName'; -import {UInt64} from '../model/UInt64'; -import { NamespaceRoutesApi } from './api'; -import {Http} from './Http'; -import {NamespaceRepository} from './NamespaceRepository'; -import {QueryParams} from './QueryParams'; +import { AddressAlias } from '../model/namespace/AddressAlias'; +import { Alias } from '../model/namespace/Alias'; +import { AliasType } from '../model/namespace/AliasType'; +import { EmptyAlias } from '../model/namespace/EmptyAlias'; +import { MosaicAlias } from '../model/namespace/MosaicAlias'; +import { NamespaceId } from '../model/namespace/NamespaceId'; +import { NamespaceInfo } from '../model/namespace/NamespaceInfo'; +import { NamespaceName } from '../model/namespace/NamespaceName'; +import { UInt64 } from '../model/UInt64'; +import { Http } from './Http'; +import { NamespaceRepository } from './NamespaceRepository'; +import { QueryParams } from './QueryParams'; /** * Namespace http repository. diff --git a/src/infrastructure/NetworkHttp.ts b/src/infrastructure/NetworkHttp.ts index 840b569cd1..878820c3fb 100644 --- a/src/infrastructure/NetworkHttp.ts +++ b/src/infrastructure/NetworkHttp.ts @@ -14,14 +14,14 @@ * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map} from 'rxjs/operators'; +import { NetworkRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; import { NetworkName } from '../model/blockchain/NetworkName'; -import {NetworkType} from '../model/blockchain/NetworkType'; +import { NetworkType } from '../model/blockchain/NetworkType'; import { NodeInfo } from '../model/node/NodeInfo'; -import { NetworkRoutesApi } from './api/apis'; -import {Http} from './Http'; -import {NetworkRepository} from './NetworkRepository'; +import { Http } from './Http'; +import { NetworkRepository } from './NetworkRepository'; import { NodeHttp } from './NodeHttp'; /** diff --git a/src/infrastructure/NodeHttp.ts b/src/infrastructure/NodeHttp.ts index 088d9990e0..3ed1b1cef9 100644 --- a/src/infrastructure/NodeHttp.ts +++ b/src/infrastructure/NodeHttp.ts @@ -14,12 +14,12 @@ * limitations under the License. */ +import { NodeRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; import { from as observableFrom, Observable, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { NodeInfo } from '../model/node/NodeInfo'; import { NodeTime } from '../model/node/NodeTime'; import { UInt64 } from '../model/UInt64'; -import { NodeRoutesApi } from './api'; import { Http } from './Http'; import { NodeRepository } from './NodeRepository'; diff --git a/src/infrastructure/ReceiptHttp.ts b/src/infrastructure/ReceiptHttp.ts index fa0d411d7f..95ae940ae7 100644 --- a/src/infrastructure/ReceiptHttp.ts +++ b/src/infrastructure/ReceiptHttp.ts @@ -14,14 +14,14 @@ * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map, mergeMap} from 'rxjs/operators'; +import { ReceiptRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map, mergeMap } from 'rxjs/operators'; import { MerklePathItem } from '../model/blockchain/MerklePathItem'; import { MerkleProofInfo } from '../model/blockchain/MerkleProofInfo'; import { NetworkType } from '../model/blockchain/NetworkType'; import { Statement } from '../model/receipt/Statement'; -import { ReceiptRoutesApi } from './api/receiptRoutesApi'; -import {Http} from './Http'; +import { Http } from './Http'; import { CreateStatementFromDTO } from './receipt/CreateReceiptFromDTO'; import { ReceiptRepository } from './ReceiptRepository'; diff --git a/src/infrastructure/RestrictionAccountHttp.ts b/src/infrastructure/RestrictionAccountHttp.ts index 39d7c29e07..e3c935f95f 100644 --- a/src/infrastructure/RestrictionAccountHttp.ts +++ b/src/infrastructure/RestrictionAccountHttp.ts @@ -14,15 +14,14 @@ * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map} from 'rxjs/operators'; +import { RestrictionAccountRoutesApi } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; import { DtoMapping } from '../core/utils/DtoMapping'; import { Address } from '../model/account/Address'; -import { NetworkType } from '../model/blockchain/NetworkType'; import { AccountRestriction } from '../model/restriction/AccountRestriction'; import { AccountRestrictions } from '../model/restriction/AccountRestrictions'; -import { RestrictionAccountRoutesApi } from './api/restrictionAccountRoutesApi'; -import {Http} from './Http'; +import { Http } from './Http'; import { RestrictionAccountRepository } from './RestrictionAccountRespository'; /** diff --git a/src/infrastructure/RestrictionMosaicHttp.ts b/src/infrastructure/RestrictionMosaicHttp.ts index d455f87aed..3d77fc2837 100644 --- a/src/infrastructure/RestrictionMosaicHttp.ts +++ b/src/infrastructure/RestrictionMosaicHttp.ts @@ -14,18 +14,19 @@ * limitations under the License. */ -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map} from 'rxjs/operators'; +import { + MosaicAddressRestrictionDTO, + MosaicGlobalRestrictionDTO, + RestrictionMosaicRoutesApi +} from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; import { Address } from '../model/account/Address'; -import { NetworkType } from '../model/blockchain/NetworkType'; import { MosaicId } from '../model/mosaic/MosaicId'; import { MosaicAddressRestriction } from '../model/restriction/MosaicAddressRestriction'; import { MosaicGlobalRestriction } from '../model/restriction/MosaicGlobalRestriction'; import { MosaicGlobalRestrictionItem } from '../model/restriction/MosaicGlobalRestrictionItem'; -import { RestrictionMosaicRoutesApi } from './api/restrictionMosaicRoutesApi'; -import {Http} from './Http'; -import { MosaicAddressRestrictionDTO } from './model/mosaicAddressRestrictionDTO'; -import { MosaicGlobalRestrictionDTO } from './model/mosaicGlobalRestrictionDTO'; +import { Http } from './Http'; import { RestrictionMosaicRepository } from './RestrictionMosaicRepository'; /** diff --git a/src/infrastructure/TransactionHttp.ts b/src/infrastructure/TransactionHttp.ts index b72b468fa0..a988e25c13 100644 --- a/src/infrastructure/TransactionHttp.ts +++ b/src/infrastructure/TransactionHttp.ts @@ -15,28 +15,21 @@ */ import { ClientResponse } from 'http'; -import * as requestPromise from 'request-promise-native'; -import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map, mergeMap} from 'rxjs/operators'; -import {PublicAccount} from '../model/account/PublicAccount'; -import { NetworkType } from '../model/blockchain/NetworkType'; -import {CosignatureSignedTransaction} from '../model/transaction/CosignatureSignedTransaction'; -import {Deadline} from '../model/transaction/Deadline'; -import {SignedTransaction} from '../model/transaction/SignedTransaction'; -import { SyncAnnounce } from '../model/transaction/SyncAnnounce'; -import {Transaction} from '../model/transaction/Transaction'; -import {TransactionAnnounceResponse} from '../model/transaction/TransactionAnnounceResponse'; -import {TransactionInfo} from '../model/transaction/TransactionInfo'; -import {TransactionStatus} from '../model/transaction/TransactionStatus'; -import {TransactionType} from '../model/transaction/TransactionType'; -import {UInt64} from '../model/UInt64'; -import { - BlockInfoDTO, BlockRoutesApi, - TransactionRoutesApi, TransactionStatusDTO, -} from './api'; -import {Http} from './Http'; -import {CreateTransactionFromDTO} from './transaction/CreateTransactionFromDTO'; -import {TransactionRepository} from './TransactionRepository'; +import { BlockInfoDTO, BlockRoutesApi, TransactionRoutesApi, TransactionStatusDTO, } from 'nem2-sdk-openapi-typescript-node-client'; +import { from as observableFrom, Observable, throwError } from 'rxjs'; +import { catchError, map, mergeMap } from 'rxjs/operators'; +import { CosignatureSignedTransaction } from '../model/transaction/CosignatureSignedTransaction'; +import { Deadline } from '../model/transaction/Deadline'; +import { SignedTransaction } from '../model/transaction/SignedTransaction'; +import { Transaction } from '../model/transaction/Transaction'; +import { TransactionAnnounceResponse } from '../model/transaction/TransactionAnnounceResponse'; +import { TransactionInfo } from '../model/transaction/TransactionInfo'; +import { TransactionStatus } from '../model/transaction/TransactionStatus'; +import { TransactionType } from '../model/transaction/TransactionType'; +import { UInt64 } from '../model/UInt64'; +import { Http } from './Http'; +import { CreateTransactionFromDTO } from './transaction/CreateTransactionFromDTO'; +import { TransactionRepository } from './TransactionRepository'; /** * Transaction http repository. @@ -59,7 +52,6 @@ export class TransactionHttp extends Http implements TransactionRepository { /** * Constructor * @param url - * @param networkType */ constructor(url: string) { super(url); @@ -75,7 +67,7 @@ export class TransactionHttp extends Http implements TransactionRepository { public getTransaction(transactionId: string): Observable { return observableFrom(this.transactionRoutesApi.getTransaction(transactionId)).pipe( map(({body}) => CreateTransactionFromDTO(body)), - catchError((error) => throwError(this.errorHandling(error))), + catchError((error) => throwError(this.errorHandling(error))), ); } @@ -90,22 +82,22 @@ export class TransactionHttp extends Http implements TransactionRepository { }; return observableFrom( this.transactionRoutesApi.getTransactions(transactionIdsBody)).pipe( - map(({body}) => body.map((transactionDTO) => { - return CreateTransactionFromDTO(transactionDTO); - })), - catchError((error) => throwError(this.errorHandling(error))), + map(({body}) => body.map((transactionDTO) => { + return CreateTransactionFromDTO(transactionDTO); + })), + catchError((error) => throwError(this.errorHandling(error))), ); } /** * Gets a transaction status for a transaction hash - * @param hash - Transaction hash. + * @param transactionHash - Transaction hash. * @returns Observable */ public getTransactionStatus(transactionHash: string): Observable { return observableFrom(this.transactionRoutesApi.getTransactionStatus(transactionHash)).pipe( map(({body}) => this.toTransactionStatus(body)), - catchError((error) => throwError(this.errorHandling(error))), + catchError((error) => throwError(this.errorHandling(error))), ); } @@ -121,7 +113,7 @@ export class TransactionHttp extends Http implements TransactionRepository { return observableFrom( this.transactionRoutesApi.getTransactionsStatuses(transactionHashesBody)).pipe( map(({body}) => body.map(this.toTransactionStatus)), - catchError((error) => throwError(this.errorHandling(error))), + catchError((error) => throwError(this.errorHandling(error))), ); } @@ -134,10 +126,10 @@ export class TransactionHttp extends Http implements TransactionRepository { */ private toTransactionStatus(dto: TransactionStatusDTO): TransactionStatus { return new TransactionStatus( - dto.group.valueOf(), + dto.group.toString(), dto.hash, Deadline.createFromDTO(UInt64.fromNumericString(dto.deadline).toDTO()), - dto.code ? dto.code.valueOf() : '', + dto.code ? dto.code.toString() : '', dto.height ? UInt64.fromNumericString(dto.height) : undefined); } @@ -152,7 +144,7 @@ export class TransactionHttp extends Http implements TransactionRepository { } return observableFrom(this.transactionRoutesApi.announceTransaction(signedTransaction)).pipe( map(({body}) => new TransactionAnnounceResponse(body.message)), - catchError((error) => throwError(this.errorHandling(error))), + catchError((error) => throwError(this.errorHandling(error))), ); } @@ -167,7 +159,7 @@ export class TransactionHttp extends Http implements TransactionRepository { } return observableFrom(this.transactionRoutesApi.announcePartialTransaction(signedTransaction)).pipe( map(({body}) => new TransactionAnnounceResponse(body.message)), - catchError((error) => throwError(this.errorHandling(error))), + catchError((error) => throwError(this.errorHandling(error))), ); } @@ -180,39 +172,10 @@ export class TransactionHttp extends Http implements TransactionRepository { cosignatureSignedTransaction: CosignatureSignedTransaction): Observable { return observableFrom(this.transactionRoutesApi.announceCosignatureTransaction(cosignatureSignedTransaction)).pipe( map(({body}) => new TransactionAnnounceResponse(body.message)), - catchError((error) => throwError(this.errorHandling(error))), + catchError((error) => throwError(this.errorHandling(error))), ); } - public announceSync(signedTx: SignedTransaction): Observable { - const address = PublicAccount.createFromPublicKey(signedTx.signerPublicKey, signedTx.networkType).address; - const syncAnnounce = new SyncAnnounce( - signedTx.payload, - signedTx.hash, - address.plain(), - ); - - return observableFrom( - requestPromise.put({url: this.url + `/transaction/sync`, body: syncAnnounce, json: true}), - ).pipe(map((response) => { - if (response.status !== undefined) { - throw new TransactionStatus( - 'failed', - response.hash, - Deadline.createFromDTO(response.deadline), - response.code, - UInt64.fromUint(0)); - } else { - return CreateTransactionFromDTO(response); - } - }), catchError((err) => { - if (err.statusCode === 405) { - return throwError('non sync server'); - } - return throwError(err); - })); - } - /** * Gets a transaction's effective paid fee * @param transactionId - Transaction id or hash. @@ -222,19 +185,18 @@ export class TransactionHttp extends Http implements TransactionRepository { return observableFrom(this.transactionRoutesApi.getTransaction(transactionId)).pipe( mergeMap(({body}) => { // parse transaction to take advantage of `size` getter overload - const transactionDTO = body; - const transaction = CreateTransactionFromDTO(transactionDTO); + const transaction = CreateTransactionFromDTO(body); const uintHeight = (transaction.transactionInfo as TransactionInfo).height; // now read block details return observableFrom(this.blockRoutesApi.getBlockByHeight(uintHeight.toString())).pipe( - map((blockResponse: { response: ClientResponse; body: BlockInfoDTO; } ) => { - const blockDTO = blockResponse.body; - // @see https://nemtech.github.io/concepts/transaction.html#fees - // effective_fee = feeMultiplier x transaction::size - return blockDTO.block.feeMultiplier * transaction.size; - }), - catchError((error) => throwError(this.errorHandling(error)))); + map((blockResponse: { response: ClientResponse; body: BlockInfoDTO; }) => { + const blockDTO = blockResponse.body; + // @see https://nemtech.github.io/concepts/transaction.html#fees + // effective_fee = feeMultiplier x transaction::size + return blockDTO.block.feeMultiplier * transaction.size; + }), + catchError((error) => throwError(this.errorHandling(error)))); }), catchError((err) => { return throwError(err); })); diff --git a/src/infrastructure/api.ts b/src/infrastructure/api.ts deleted file mode 100644 index b74074dfee..0000000000 --- a/src/infrastructure/api.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -// This is the entrypoint for the package -export * from './api/apis'; -export * from './model/models'; \ No newline at end of file diff --git a/src/infrastructure/api/accountRoutesApi.ts b/src/infrastructure/api/accountRoutesApi.ts deleted file mode 100644 index 0bac8e4bfe..0000000000 --- a/src/infrastructure/api/accountRoutesApi.ts +++ /dev/null @@ -1,599 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { AccountIds } from '../model/accountIds'; -import { AccountInfoDTO } from '../model/accountInfoDTO'; -import { ModelError } from '../model/modelError'; -import { TransactionInfoDTO } from '../model/transactionInfoDTO'; -import { TransactionTypeEnum } from '../model/transactionTypeEnum'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum AccountRoutesApiApiKeys { -} - -export class AccountRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: AccountRoutesApiApiKeys, value: string) { - (this.authentications as any)[AccountRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Gets an array of transactions for which an account is the sender or receiver. - * @summary Get confirmed transactions - * @param accountId Account public key or address. - * @param pageSize Number of transactions to return for each request. - * @param id Transaction identifier up to which transactions are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. - * @param transactionType Transaction type to filter by. - */ - public async getAccountConfirmedTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, transactionType?: TransactionTypeEnum, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountConfirmedTransactions.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - - if (transactionType !== undefined) { - localVarQueryParameters['transactionType'] = ObjectSerializer.serialize(transactionType, "TransactionTypeEnum"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets an array of incoming transactions. A transaction is said to be incoming with respect to an account if the account is the recipient of the transaction. - * @summary Get incoming transactions - * @param accountId Account public key or address. - * @param pageSize Number of transactions to return for each request. - * @param id Transaction identifier up to which transactions are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. - * @param transactionType Transaction type to filter by. - */ - public async getAccountIncomingTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, transactionType?: TransactionTypeEnum, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions/incoming' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountIncomingTransactions.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - - if (transactionType !== undefined) { - localVarQueryParameters['transactionType'] = ObjectSerializer.serialize(transactionType, "TransactionTypeEnum"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the account information. - * @summary Get account information - * @param accountId Account public key or address. - */ - public async getAccountInfo (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AccountInfoDTO; }> { - const localVarPath = this.basePath + '/account/{accountId}' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountInfo.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: AccountInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "AccountInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets an array of outgoing transactions. A transaction is said to be outgoing with respect to an account if the account is the sender of the transaction. - * @summary Get outgoing transactions - * @param accountId Account public key or address. - * @param pageSize Number of transactions to return for each request. - * @param id Transaction identifier up to which transactions are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. - * @param transactionType Transaction type to filter by. - */ - public async getAccountOutgoingTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, transactionType?: TransactionTypeEnum, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions/outgoing' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountOutgoingTransactions.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - - if (transactionType !== undefined) { - localVarQueryParameters['transactionType'] = ObjectSerializer.serialize(transactionType, "TransactionTypeEnum"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets an array of aggregate bonded transactions where the account is the sender or requires to cosign the transaction. - * @summary Get aggregate bonded transactions information - * @param accountId Account public key or address. - * @param pageSize Number of transactions to return for each request. - * @param id Transaction identifier up to which transactions are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. - * @param transactionType Transaction type to filter by. - */ - public async getAccountPartialTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, transactionType?: TransactionTypeEnum, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions/partial' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountPartialTransactions.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - - if (transactionType !== undefined) { - localVarQueryParameters['transactionType'] = ObjectSerializer.serialize(transactionType, "TransactionTypeEnum"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets the array of transactions not included in a block where an account is the sender or receiver. - * @summary Get unconfirmed transactions - * @param accountId Account public key or address. - * @param pageSize Number of transactions to return for each request. - * @param id Transaction identifier up to which transactions are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. - * @param transactionType Transaction type to filter by. - */ - public async getAccountUnconfirmedTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, transactionType?: TransactionTypeEnum, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions/unconfirmed' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountUnconfirmedTransactions.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - - if (transactionType !== undefined) { - localVarQueryParameters['transactionType'] = ObjectSerializer.serialize(transactionType, "TransactionTypeEnum"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the account information for an array of accounts. - * @summary Get accounts information - * @param accountIds - */ - public async getAccountsInfo (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(accountIds, "AccountIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/apis.ts b/src/infrastructure/api/apis.ts deleted file mode 100644 index fdad3f87cc..0000000000 --- a/src/infrastructure/api/apis.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export * from './accountRoutesApi'; -import { AccountRoutesApi } from './accountRoutesApi'; -export * from './blockRoutesApi'; -import { BlockRoutesApi } from './blockRoutesApi'; -export * from './chainRoutesApi'; -import { ChainRoutesApi } from './chainRoutesApi'; -export * from './diagnosticRoutesApi'; -import { DiagnosticRoutesApi } from './diagnosticRoutesApi'; -export * from './metadataRoutesApi'; -import { MetadataRoutesApi } from './metadataRoutesApi'; -export * from './mosaicRoutesApi'; -import { MosaicRoutesApi } from './mosaicRoutesApi'; -export * from './multisigRoutesApi'; -import { MultisigRoutesApi } from './multisigRoutesApi'; -export * from './namespaceRoutesApi'; -import { NamespaceRoutesApi } from './namespaceRoutesApi'; -export * from './networkRoutesApi'; -import { NetworkRoutesApi } from './networkRoutesApi'; -export * from './nodeRoutesApi'; -import { NodeRoutesApi } from './nodeRoutesApi'; -export * from './receiptRoutesApi'; -import { ReceiptRoutesApi } from './receiptRoutesApi'; -export * from './restrictionAccountRoutesApi'; -import { RestrictionAccountRoutesApi } from './restrictionAccountRoutesApi'; -export * from './restrictionMosaicRoutesApi'; -import { RestrictionMosaicRoutesApi } from './restrictionMosaicRoutesApi'; -export * from './transactionRoutesApi'; -import { TransactionRoutesApi } from './transactionRoutesApi'; -export const APIS = [AccountRoutesApi, BlockRoutesApi, ChainRoutesApi, DiagnosticRoutesApi, MetadataRoutesApi, MosaicRoutesApi, MultisigRoutesApi, NamespaceRoutesApi, NetworkRoutesApi, NodeRoutesApi, ReceiptRoutesApi, RestrictionAccountRoutesApi, RestrictionMosaicRoutesApi, TransactionRoutesApi]; diff --git a/src/infrastructure/api/blockRoutesApi.ts b/src/infrastructure/api/blockRoutesApi.ts deleted file mode 100644 index dc639177aa..0000000000 --- a/src/infrastructure/api/blockRoutesApi.ts +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { BlockInfoDTO } from '../model/blockInfoDTO'; -import { MerkleProofInfoDTO } from '../model/merkleProofInfoDTO'; -import { ModelError } from '../model/modelError'; -import { TransactionInfoDTO } from '../model/transactionInfoDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum BlockRoutesApiApiKeys { -} - -export class BlockRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: BlockRoutesApiApiKeys, value: string) { - (this.authentications as any)[BlockRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Gets a block from the chain that has the given height. - * @summary Get block information - * @param height Block height. - */ - public async getBlockByHeight (height: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: BlockInfoDTO; }> { - const localVarPath = this.basePath + '/block/{height}' - .replace('{' + 'height' + '}', encodeURIComponent(String(height))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'height' is not null or undefined - if (height === null || height === undefined) { - throw new Error('Required parameter height was null or undefined when calling getBlockByHeight.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: BlockInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "BlockInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns an array of transactions included in a block for a given block height. - * @summary Get transactions from a block - * @param height Block height. - * @param pageSize Number of transactions to return for each request. - * @param id Transaction identifier up to which transactions are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. - */ - public async getBlockTransactions (height: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/block/{height}/transactions' - .replace('{' + 'height' + '}', encodeURIComponent(String(height))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'height' is not null or undefined - if (height === null || height === undefined) { - throw new Error('Required parameter height was null or undefined when calling getBlockTransactions.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets up to limit number of blocks after given block height. - * @summary Get blocks information - * @param height Block height. - * @param limit Number of elements to be returned. The limit should be greater than or equal to \"db.pageSizeMin\" and not higher than \"db.pageSizeMax\". The settings are adjustable via a configuration file (rest/resources/rest.json) per REST instance. - */ - public async getBlocksByHeightWithLimit (height: string, limit: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/blocks/{height}/limit/{limit}' - .replace('{' + 'height' + '}', encodeURIComponent(String(height))) - .replace('{' + 'limit' + '}', encodeURIComponent(String(limit))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'height' is not null or undefined - if (height === null || height === undefined) { - throw new Error('Required parameter height was null or undefined when calling getBlocksByHeightWithLimit.'); - } - - // verify required parameter 'limit' is not null or undefined - if (limit === null || limit === undefined) { - throw new Error('Required parameter limit was null or undefined when calling getBlocksByHeightWithLimit.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the merkle path for a transaction included in a block. The path is the complementary data needed to calculate the merkle root. A client can compare if the calculated root equals the one recorded in the block header, verifying that the transaction was included in the block. - * @summary Get the merkle path for a given a transaction and block - * @param height Block height. - * @param hash Transaction hash. - */ - public async getMerkleTransaction (height: string, hash: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }> { - const localVarPath = this.basePath + '/block/{height}/transaction/{hash}/merkle' - .replace('{' + 'height' + '}', encodeURIComponent(String(height))) - .replace('{' + 'hash' + '}', encodeURIComponent(String(hash))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'height' is not null or undefined - if (height === null || height === undefined) { - throw new Error('Required parameter height was null or undefined when calling getMerkleTransaction.'); - } - - // verify required parameter 'hash' is not null or undefined - if (hash === null || hash === undefined) { - throw new Error('Required parameter hash was null or undefined when calling getMerkleTransaction.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MerkleProofInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/chainRoutesApi.ts b/src/infrastructure/api/chainRoutesApi.ts deleted file mode 100644 index bf74f453cf..0000000000 --- a/src/infrastructure/api/chainRoutesApi.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { ChainScoreDTO } from '../model/chainScoreDTO'; -import { HeightInfoDTO } from '../model/heightInfoDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum ChainRoutesApiApiKeys { -} - -export class ChainRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: ChainRoutesApiApiKeys, value: string) { - (this.authentications as any)[ChainRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Returns the current height of the blockchain. - * @summary Get the current height of the chain - */ - public async getChainHeight (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: HeightInfoDTO; }> { - const localVarPath = this.basePath + '/chain/height'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: HeightInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "HeightInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets the current score of the blockchain. The higher the score, the better the chain. During synchronization, nodes try to get the best blockchain in the network. The score for a block is derived from its difficulty and the time (in seconds) that has elapsed since the last block: block score = difficulty − time elapsed since last block - * @summary Get the current score of the chain - */ - public async getChainScore (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: ChainScoreDTO; }> { - const localVarPath = this.basePath + '/chain/score'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: ChainScoreDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "ChainScoreDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/diagnosticRoutesApi.ts b/src/infrastructure/api/diagnosticRoutesApi.ts deleted file mode 100644 index 1267df8666..0000000000 --- a/src/infrastructure/api/diagnosticRoutesApi.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { ServerInfoDTO } from '../model/serverInfoDTO'; -import { StorageInfoDTO } from '../model/storageInfoDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum DiagnosticRoutesApiApiKeys { -} - -export class DiagnosticRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: DiagnosticRoutesApiApiKeys, value: string) { - (this.authentications as any)[DiagnosticRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Returns diagnostic information about the node storage. - * @summary Get the storage information of the node - */ - public async getDiagnosticStorage (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: StorageInfoDTO; }> { - const localVarPath = this.basePath + '/diagnostic/storage'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: StorageInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "StorageInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the version of the running catapult-rest component. - * @summary Get the version of the running rest component - */ - public async getServerInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: ServerInfoDTO; }> { - const localVarPath = this.basePath + '/diagnostic/server'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: ServerInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "ServerInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/metadataRoutesApi.ts b/src/infrastructure/api/metadataRoutesApi.ts deleted file mode 100644 index 54a307f38f..0000000000 --- a/src/infrastructure/api/metadataRoutesApi.ts +++ /dev/null @@ -1,728 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { MetadataDTO } from '../model/metadataDTO'; -import { MetadataEntriesDTO } from '../model/metadataEntriesDTO'; -import { ModelError } from '../model/modelError'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum MetadataRoutesApiApiKeys { -} - -export class MetadataRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: MetadataRoutesApiApiKeys, value: string) { - (this.authentications as any)[MetadataRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Returns the account metadata given an account id. - * @summary Get account metadata - * @param accountId Account public key or address. - * @param pageSize Number of transactions to return for each request. - * @param id Metadata identifier up to which metadata are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. - */ - public async getAccountMetadata (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }> { - const localVarPath = this.basePath + '/metadata/account/{accountId}' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountMetadata.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MetadataEntriesDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the account metadata given an account id and a key. - * @summary Get account metadata - * @param accountId Account public key or address. - * @param key Metadata key. - */ - public async getAccountMetadataByKey (accountId: string, key: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }> { - const localVarPath = this.basePath + '/metadata/account/{accountId}/key/{key}' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))) - .replace('{' + 'key' + '}', encodeURIComponent(String(key))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountMetadataByKey.'); - } - - // verify required parameter 'key' is not null or undefined - if (key === null || key === undefined) { - throw new Error('Required parameter key was null or undefined when calling getAccountMetadataByKey.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MetadataEntriesDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the account metadata given an account id, a key, and a sender. - * @summary Get account metadata - * @param accountId Account public key or address. - * @param key Metadata key. - * @param publicKey Account public key. - */ - public async getAccountMetadataByKeyAndSender (accountId: string, key: string, publicKey: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataDTO; }> { - const localVarPath = this.basePath + '/metadata/account/{accountId}/key/{key}/sender/{publicKey}' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))) - .replace('{' + 'key' + '}', encodeURIComponent(String(key))) - .replace('{' + 'publicKey' + '}', encodeURIComponent(String(publicKey))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountMetadataByKeyAndSender.'); - } - - // verify required parameter 'key' is not null or undefined - if (key === null || key === undefined) { - throw new Error('Required parameter key was null or undefined when calling getAccountMetadataByKeyAndSender.'); - } - - // verify required parameter 'publicKey' is not null or undefined - if (publicKey === null || publicKey === undefined) { - throw new Error('Required parameter publicKey was null or undefined when calling getAccountMetadataByKeyAndSender.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MetadataDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MetadataDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the mosaic metadata given a mosaic id. - * @summary Get mosaic metadata - * @param mosaicId Mosaic identifier. - * @param pageSize Number of transactions to return for each request. - * @param id Metadata identifier up to which metadata are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. - */ - public async getMosaicMetadata (mosaicId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }> { - const localVarPath = this.basePath + '/metadata/mosaic/{mosaicId}' - .replace('{' + 'mosaicId' + '}', encodeURIComponent(String(mosaicId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicId' is not null or undefined - if (mosaicId === null || mosaicId === undefined) { - throw new Error('Required parameter mosaicId was null or undefined when calling getMosaicMetadata.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MetadataEntriesDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the mosaic metadata given a mosaic id and a key. - * @summary Get mosaic metadata - * @param mosaicId Mosaic identifier. - * @param key Metadata key. - */ - public async getMosaicMetadataByKey (mosaicId: string, key: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }> { - const localVarPath = this.basePath + '/metadata/mosaic/{mosaicId}/key/{key}' - .replace('{' + 'mosaicId' + '}', encodeURIComponent(String(mosaicId))) - .replace('{' + 'key' + '}', encodeURIComponent(String(key))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicId' is not null or undefined - if (mosaicId === null || mosaicId === undefined) { - throw new Error('Required parameter mosaicId was null or undefined when calling getMosaicMetadataByKey.'); - } - - // verify required parameter 'key' is not null or undefined - if (key === null || key === undefined) { - throw new Error('Required parameter key was null or undefined when calling getMosaicMetadataByKey.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MetadataEntriesDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the mosaic metadata given a mosaic id, a key, and a sender. - * @summary Get mosaic metadata - * @param mosaicId Mosaic identifier. - * @param key Metadata key. - * @param publicKey Account public key. - */ - public async getMosaicMetadataByKeyAndSender (mosaicId: string, key: string, publicKey: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataDTO; }> { - const localVarPath = this.basePath + '/metadata/mosaic/{mosaicId}/key/{key}/sender/{publicKey}' - .replace('{' + 'mosaicId' + '}', encodeURIComponent(String(mosaicId))) - .replace('{' + 'key' + '}', encodeURIComponent(String(key))) - .replace('{' + 'publicKey' + '}', encodeURIComponent(String(publicKey))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicId' is not null or undefined - if (mosaicId === null || mosaicId === undefined) { - throw new Error('Required parameter mosaicId was null or undefined when calling getMosaicMetadataByKeyAndSender.'); - } - - // verify required parameter 'key' is not null or undefined - if (key === null || key === undefined) { - throw new Error('Required parameter key was null or undefined when calling getMosaicMetadataByKeyAndSender.'); - } - - // verify required parameter 'publicKey' is not null or undefined - if (publicKey === null || publicKey === undefined) { - throw new Error('Required parameter publicKey was null or undefined when calling getMosaicMetadataByKeyAndSender.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MetadataDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MetadataDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the namespace metadata given a namespace id. - * @summary Get namespace metadata - * @param namespaceId Namespace identifier. - * @param pageSize Number of transactions to return for each request. - * @param id Metadata identifier up to which metadata are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. - */ - public async getNamespaceMetadata (namespaceId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }> { - const localVarPath = this.basePath + '/metadata/namespace/{namespaceId}' - .replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'namespaceId' is not null or undefined - if (namespaceId === null || namespaceId === undefined) { - throw new Error('Required parameter namespaceId was null or undefined when calling getNamespaceMetadata.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MetadataEntriesDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the namespace metadata given a namespace id and a key. - * @summary Get namespace metadata - * @param namespaceId Namespace identifier. - * @param key Metadata key. - */ - public async getNamespaceMetadataByKey (namespaceId: string, key: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }> { - const localVarPath = this.basePath + '/metadata/namespace/{namespaceId}/key/{key}' - .replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId))) - .replace('{' + 'key' + '}', encodeURIComponent(String(key))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'namespaceId' is not null or undefined - if (namespaceId === null || namespaceId === undefined) { - throw new Error('Required parameter namespaceId was null or undefined when calling getNamespaceMetadataByKey.'); - } - - // verify required parameter 'key' is not null or undefined - if (key === null || key === undefined) { - throw new Error('Required parameter key was null or undefined when calling getNamespaceMetadataByKey.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MetadataEntriesDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MetadataEntriesDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the namespace metadata given a namespace id, a key, and a sender. - * @summary Get namespace metadata - * @param namespaceId Namespace identifier. - * @param key Metadata key. - * @param publicKey Account public key. - */ - public async getNamespaceMetadataByKeyAndSender (namespaceId: string, key: string, publicKey: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataDTO; }> { - const localVarPath = this.basePath + '/metadata/namespace/{namespaceId}/key/{key}/sender/{publicKey}' - .replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId))) - .replace('{' + 'key' + '}', encodeURIComponent(String(key))) - .replace('{' + 'publicKey' + '}', encodeURIComponent(String(publicKey))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'namespaceId' is not null or undefined - if (namespaceId === null || namespaceId === undefined) { - throw new Error('Required parameter namespaceId was null or undefined when calling getNamespaceMetadataByKeyAndSender.'); - } - - // verify required parameter 'key' is not null or undefined - if (key === null || key === undefined) { - throw new Error('Required parameter key was null or undefined when calling getNamespaceMetadataByKeyAndSender.'); - } - - // verify required parameter 'publicKey' is not null or undefined - if (publicKey === null || publicKey === undefined) { - throw new Error('Required parameter publicKey was null or undefined when calling getNamespaceMetadataByKeyAndSender.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MetadataDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MetadataDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/mosaicRoutesApi.ts b/src/infrastructure/api/mosaicRoutesApi.ts deleted file mode 100644 index 8d6566b60f..0000000000 --- a/src/infrastructure/api/mosaicRoutesApi.ts +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { AccountIds } from '../model/accountIds'; -import { ModelError } from '../model/modelError'; -import { MosaicIds } from '../model/mosaicIds'; -import { MosaicInfoDTO } from '../model/mosaicInfoDTO'; -import { MosaicsInfoDTO } from '../model/mosaicsInfoDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum MosaicRoutesApiApiKeys { -} - -export class MosaicRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: MosaicRoutesApiApiKeys, value: string) { - (this.authentications as any)[MosaicRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Gets the mosaic definition for a given mosaic identifier. - * @summary Get mosaic information - * @param mosaicId Mosaic identifier. - */ - public async getMosaic (mosaicId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicInfoDTO; }> { - const localVarPath = this.basePath + '/mosaic/{mosaicId}' - .replace('{' + 'mosaicId' + '}', encodeURIComponent(String(mosaicId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicId' is not null or undefined - if (mosaicId === null || mosaicId === undefined) { - throw new Error('Required parameter mosaicId was null or undefined when calling getMosaic.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MosaicInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MosaicInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets an array of mosaic definition. - * @summary Get mosaics information for an array of mosaics - * @param mosaicIds - */ - public async getMosaics (mosaicIds: MosaicIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/mosaic'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicIds' is not null or undefined - if (mosaicIds === null || mosaicIds === undefined) { - throw new Error('Required parameter mosaicIds was null or undefined when calling getMosaics.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(mosaicIds, "MosaicIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets an array of mosaics created for a given account address. - * @summary Get mosaics created by an account - * @param accountId Account public key or address. - */ - public async getMosaicsFromAccount (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicsInfoDTO; }> { - const localVarPath = this.basePath + '/account/{accountId}/mosaics' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getMosaicsFromAccount.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MosaicsInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MosaicsInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets mosaics created for a given array of addresses. - * @summary Get mosaics created for given array of addresses - * @param accountIds - */ - public async getMosaicsFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicsInfoDTO; }> { - const localVarPath = this.basePath + '/account/mosaics'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(accountIds, "AccountIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MosaicsInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MosaicsInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/multisigRoutesApi.ts b/src/infrastructure/api/multisigRoutesApi.ts deleted file mode 100644 index 8c58cfe12c..0000000000 --- a/src/infrastructure/api/multisigRoutesApi.ts +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { ModelError } from '../model/modelError'; -import { MultisigAccountGraphInfoDTO } from '../model/multisigAccountGraphInfoDTO'; -import { MultisigAccountInfoDTO } from '../model/multisigAccountInfoDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum MultisigRoutesApiApiKeys { -} - -export class MultisigRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: MultisigRoutesApiApiKeys, value: string) { - (this.authentications as any)[MultisigRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Returns the multisig account information. - * @summary Get multisig account information - * @param accountId Account public key or address. - */ - public async getAccountMultisig (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MultisigAccountInfoDTO; }> { - const localVarPath = this.basePath + '/account/{accountId}/multisig' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountMultisig.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MultisigAccountInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MultisigAccountInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the multisig account graph. - * @summary Get multisig account graph information - * @param accountId Account public key or address. - */ - public async getAccountMultisigGraph (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/multisig/graph' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountMultisigGraph.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/namespaceRoutesApi.ts b/src/infrastructure/api/namespaceRoutesApi.ts deleted file mode 100644 index 43f2fed06d..0000000000 --- a/src/infrastructure/api/namespaceRoutesApi.ts +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { AccountIds } from '../model/accountIds'; -import { AccountsNamesDTO } from '../model/accountsNamesDTO'; -import { ModelError } from '../model/modelError'; -import { MosaicIds } from '../model/mosaicIds'; -import { MosaicsNamesDTO } from '../model/mosaicsNamesDTO'; -import { NamespaceIds } from '../model/namespaceIds'; -import { NamespaceInfoDTO } from '../model/namespaceInfoDTO'; -import { NamespaceNameDTO } from '../model/namespaceNameDTO'; -import { NamespacesInfoDTO } from '../model/namespacesInfoDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum NamespaceRoutesApiApiKeys { -} - -export class NamespaceRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: NamespaceRoutesApiApiKeys, value: string) { - (this.authentications as any)[NamespaceRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Returns friendly names for accounts. - * @summary Get readable names for a set of accountIds - * @param accountIds - */ - public async getAccountsNames (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AccountsNamesDTO; }> { - const localVarPath = this.basePath + '/account/names'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(accountIds, "AccountIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: AccountsNamesDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "AccountsNamesDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns friendly names for mosaics. - * @summary Get readable names for a set of mosaics - * @param mosaicIds - */ - public async getMosaicsNames (mosaicIds: MosaicIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicsNamesDTO; }> { - const localVarPath = this.basePath + '/mosaic/names'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicIds' is not null or undefined - if (mosaicIds === null || mosaicIds === undefined) { - throw new Error('Required parameter mosaicIds was null or undefined when calling getMosaicsNames.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(mosaicIds, "MosaicIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MosaicsNamesDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MosaicsNamesDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets the namespace for a given namespace identifier. - * @summary Get namespace information - * @param namespaceId Namespace identifier. - */ - public async getNamespace (namespaceId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: NamespaceInfoDTO; }> { - const localVarPath = this.basePath + '/namespace/{namespaceId}' - .replace('{' + 'namespaceId' + '}', encodeURIComponent(String(namespaceId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'namespaceId' is not null or undefined - if (namespaceId === null || namespaceId === undefined) { - throw new Error('Required parameter namespaceId was null or undefined when calling getNamespace.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: NamespaceInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "NamespaceInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets an array of namespaces for a given account address. - * @summary Get namespaces created by an account - * @param accountId Account public key or address. - * @param pageSize Number of transactions to return for each request. - * @param id Namespace identifier up to which transactions are returned. - */ - public async getNamespacesFromAccount (accountId: string, pageSize?: number, id?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: NamespacesInfoDTO; }> { - const localVarPath = this.basePath + '/account/{accountId}/namespaces' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getNamespacesFromAccount.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: NamespacesInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "NamespacesInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets namespaces for a given array of addresses. - * @summary Get namespaces for given array of addresses - * @param accountIds - */ - public async getNamespacesFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: NamespacesInfoDTO; }> { - const localVarPath = this.basePath + '/account/namespaces'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(accountIds, "AccountIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: NamespacesInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "NamespacesInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns friendly names for namespaces. - * @summary Get readable names for a set of namespaces - * @param namespaceIds - */ - public async getNamespacesNames (namespaceIds: NamespaceIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/namespace/names'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'namespaceIds' is not null or undefined - if (namespaceIds === null || namespaceIds === undefined) { - throw new Error('Required parameter namespaceIds was null or undefined when calling getNamespacesNames.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(namespaceIds, "NamespaceIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/networkRoutesApi.ts b/src/infrastructure/api/networkRoutesApi.ts deleted file mode 100644 index aef29a0a6c..0000000000 --- a/src/infrastructure/api/networkRoutesApi.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { NetworkTypeDTO } from '../model/networkTypeDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum NetworkRoutesApiApiKeys { -} - -export class NetworkRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: NetworkRoutesApiApiKeys, value: string) { - (this.authentications as any)[NetworkRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Returns the current network type. - * @summary Get the current network type of the chain - */ - public async getNetworkType (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: NetworkTypeDTO; }> { - const localVarPath = this.basePath + '/network'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: NetworkTypeDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "NetworkTypeDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/nodeRoutesApi.ts b/src/infrastructure/api/nodeRoutesApi.ts deleted file mode 100644 index 1bc892a4d4..0000000000 --- a/src/infrastructure/api/nodeRoutesApi.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { NodeInfoDTO } from '../model/nodeInfoDTO'; -import { NodeTimeDTO } from '../model/nodeTimeDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum NodeRoutesApiApiKeys { -} - -export class NodeRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: NodeRoutesApiApiKeys, value: string) { - (this.authentications as any)[NodeRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Supplies additional information about the application running on a node. - * @summary Get the node information - */ - public async getNodeInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: NodeInfoDTO; }> { - const localVarPath = this.basePath + '/node/info'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: NodeInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "NodeInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Gets the node time at the moment the reply was sent and received. - * @summary Get the node time - */ - public async getNodeTime (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: NodeTimeDTO; }> { - const localVarPath = this.basePath + '/node/time'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: NodeTimeDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "NodeTimeDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/receiptRoutesApi.ts b/src/infrastructure/api/receiptRoutesApi.ts deleted file mode 100644 index f72ceb8844..0000000000 --- a/src/infrastructure/api/receiptRoutesApi.ts +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { MerkleProofInfoDTO } from '../model/merkleProofInfoDTO'; -import { ModelError } from '../model/modelError'; -import { StatementsDTO } from '../model/statementsDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum ReceiptRoutesApiApiKeys { -} - -export class ReceiptRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: ReceiptRoutesApiApiKeys, value: string) { - (this.authentications as any)[ReceiptRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Returns the receipts linked to a block. - * @summary Get receipts from a block - * @param height Block height. - */ - public async getBlockReceipts (height: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: StatementsDTO; }> { - const localVarPath = this.basePath + '/block/{height}/receipts' - .replace('{' + 'height' + '}', encodeURIComponent(String(height))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'height' is not null or undefined - if (height === null || height === undefined) { - throw new Error('Required parameter height was null or undefined when calling getBlockReceipts.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: StatementsDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "StatementsDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the merkle path for a receipt statement or resolution linked to a block. The path is the complementary data needed to calculate the merkle root. A client can compare if the calculated root equals the one recorded in the block header, verifying that the receipt was linked with the block. - * @summary Get the merkle path for a given a receipt statement hash and block - * @param height Block height. - * @param hash Receipt hash. - */ - public async getMerkleReceipts (height: string, hash: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }> { - const localVarPath = this.basePath + '/block/{height}/receipt/{hash}/merkle' - .replace('{' + 'height' + '}', encodeURIComponent(String(height))) - .replace('{' + 'hash' + '}', encodeURIComponent(String(hash))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'height' is not null or undefined - if (height === null || height === undefined) { - throw new Error('Required parameter height was null or undefined when calling getMerkleReceipts.'); - } - - // verify required parameter 'hash' is not null or undefined - if (hash === null || hash === undefined) { - throw new Error('Required parameter hash was null or undefined when calling getMerkleReceipts.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MerkleProofInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/restrictionAccountRoutesApi.ts b/src/infrastructure/api/restrictionAccountRoutesApi.ts deleted file mode 100644 index 755faccfc1..0000000000 --- a/src/infrastructure/api/restrictionAccountRoutesApi.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { AccountIds } from '../model/accountIds'; -import { AccountRestrictionsInfoDTO } from '../model/accountRestrictionsInfoDTO'; -import { ModelError } from '../model/modelError'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum RestrictionAccountRoutesApiApiKeys { -} - -export class RestrictionAccountRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: RestrictionAccountRoutesApiApiKeys, value: string) { - (this.authentications as any)[RestrictionAccountRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Returns the account restrictions for a given account. - * @summary Get the account restrictions - * @param accountId Account public key or address. - */ - public async getAccountRestrictions (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AccountRestrictionsInfoDTO; }> { - const localVarPath = this.basePath + '/restrictions/account/{accountId}' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountRestrictions.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: AccountRestrictionsInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "AccountRestrictionsInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the account restrictions for a given array of addresses. - * @summary Get account restrictions for given array of addresses - * @param accountIds - */ - public async getAccountRestrictionsFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/restrictions/account'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(accountIds, "AccountIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/restrictionMosaicRoutesApi.ts b/src/infrastructure/api/restrictionMosaicRoutesApi.ts deleted file mode 100644 index 42294d4eed..0000000000 --- a/src/infrastructure/api/restrictionMosaicRoutesApi.ts +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { AccountIds } from '../model/accountIds'; -import { ModelError } from '../model/modelError'; -import { MosaicAddressRestrictionDTO } from '../model/mosaicAddressRestrictionDTO'; -import { MosaicGlobalRestrictionDTO } from '../model/mosaicGlobalRestrictionDTO'; -import { MosaicIds } from '../model/mosaicIds'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum RestrictionMosaicRoutesApiApiKeys { -} - -export class RestrictionMosaicRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: RestrictionMosaicRoutesApiApiKeys, value: string) { - (this.authentications as any)[RestrictionMosaicRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Get mosaic address restriction. - * @summary Get mosaic address restrictions for a given mosaic and account identifier. - * @param mosaicId Mosaic identifier. - * @param accountId Account public key or address. - */ - public async getMosaicAddressRestriction (mosaicId: string, accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicAddressRestrictionDTO; }> { - const localVarPath = this.basePath + '/restrictions/mosaic/{mosaicId}/address/{accountId}' - .replace('{' + 'mosaicId' + '}', encodeURIComponent(String(mosaicId))) - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicId' is not null or undefined - if (mosaicId === null || mosaicId === undefined) { - throw new Error('Required parameter mosaicId was null or undefined when calling getMosaicAddressRestriction.'); - } - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getMosaicAddressRestriction.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MosaicAddressRestrictionDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MosaicAddressRestrictionDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Get mosaic address restrictions. - * @summary Get mosaic address restrictions for a given mosaic and account identifiers array. - * @param mosaicId Mosaic identifier. - * @param accountIds - */ - public async getMosaicAddressRestrictions (mosaicId: string, accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/restrictions/mosaic/{mosaicId}' - .replace('{' + 'mosaicId' + '}', encodeURIComponent(String(mosaicId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicId' is not null or undefined - if (mosaicId === null || mosaicId === undefined) { - throw new Error('Required parameter mosaicId was null or undefined when calling getMosaicAddressRestrictions.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(accountIds, "AccountIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Get mosaic global restriction. - * @summary Get mosaic global restriction for a given mosaic identifier. - * @param mosaicId Mosaic identifier. - */ - public async getMosaicGlobalRestriction (mosaicId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicGlobalRestrictionDTO; }> { - const localVarPath = this.basePath + '/restrictions/mosaic/{mosaicId}' - .replace('{' + 'mosaicId' + '}', encodeURIComponent(String(mosaicId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicId' is not null or undefined - if (mosaicId === null || mosaicId === undefined) { - throw new Error('Required parameter mosaicId was null or undefined when calling getMosaicGlobalRestriction.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MosaicGlobalRestrictionDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MosaicGlobalRestrictionDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Get mosaic global restrictions. - * @summary Get mosaic global restrictions for an array of mosaics. - * @param mosaicIds - */ - public async getMosaicGlobalRestrictions (mosaicIds: MosaicIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/restrictions/mosaic'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicIds' is not null or undefined - if (mosaicIds === null || mosaicIds === undefined) { - throw new Error('Required parameter mosaicIds was null or undefined when calling getMosaicGlobalRestrictions.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(mosaicIds, "MosaicIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/api/transactionRoutesApi.ts b/src/infrastructure/api/transactionRoutesApi.ts deleted file mode 100644 index f5065be845..0000000000 --- a/src/infrastructure/api/transactionRoutesApi.ts +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -import { AnnounceTransactionInfoDTO } from '../model/announceTransactionInfoDTO'; -import { Cosignature } from '../model/cosignature'; -import { ModelError } from '../model/modelError'; -import { TransactionHashes } from '../model/transactionHashes'; -import { TransactionIds } from '../model/transactionIds'; -import { TransactionInfoDTO } from '../model/transactionInfoDTO'; -import { TransactionPayload } from '../model/transactionPayload'; -import { TransactionStatusDTO } from '../model/transactionStatusDTO'; - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; - -let defaultBasePath = 'http://localhost:3000'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -export enum TransactionRoutesApiApiKeys { -} - -export class TransactionRoutesApi { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), - } - - constructor(basePath?: string); - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: TransactionRoutesApiApiKeys, value: string) { - (this.authentications as any)[TransactionRoutesApiApiKeys[key]].apiKey = value; - } - - /** - * Announces a cosignature transaction to the network. - * @summary Announce a cosignature transaction - * @param cosignature - */ - public async announceCosignatureTransaction (cosignature: Cosignature, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AnnounceTransactionInfoDTO; }> { - const localVarPath = this.basePath + '/transaction/cosignature'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'cosignature' is not null or undefined - if (cosignature === null || cosignature === undefined) { - throw new Error('Required parameter cosignature was null or undefined when calling announceCosignatureTransaction.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(cosignature, "Cosignature") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: AnnounceTransactionInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "AnnounceTransactionInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Announces an aggregate bonded transaction to the network. - * @summary Announce an aggregate bonded transaction - * @param transactionPayload - */ - public async announcePartialTransaction (transactionPayload: TransactionPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AnnounceTransactionInfoDTO; }> { - const localVarPath = this.basePath + '/transaction/partial'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'transactionPayload' is not null or undefined - if (transactionPayload === null || transactionPayload === undefined) { - throw new Error('Required parameter transactionPayload was null or undefined when calling announcePartialTransaction.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(transactionPayload, "TransactionPayload") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: AnnounceTransactionInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "AnnounceTransactionInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Announces a transaction to the network. We recommended to use the NEM2-SDK to announce transactions as they should be serialized. - * @summary Announce a new transaction - * @param transactionPayload - */ - public async announceTransaction (transactionPayload: TransactionPayload, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AnnounceTransactionInfoDTO; }> { - const localVarPath = this.basePath + '/transaction'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'transactionPayload' is not null or undefined - if (transactionPayload === null || transactionPayload === undefined) { - throw new Error('Required parameter transactionPayload was null or undefined when calling announceTransaction.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(transactionPayload, "TransactionPayload") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: AnnounceTransactionInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "AnnounceTransactionInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns transaction information given a transactionId or hash. - * @summary Get transaction information - * @param transactionId Transaction identifier or hash. - */ - public async getTransaction (transactionId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: TransactionInfoDTO; }> { - const localVarPath = this.basePath + '/transaction/{transactionId}' - .replace('{' + 'transactionId' + '}', encodeURIComponent(String(transactionId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'transactionId' is not null or undefined - if (transactionId === null || transactionId === undefined) { - throw new Error('Required parameter transactionId was null or undefined when calling getTransaction.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: TransactionInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "TransactionInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the transaction status for a given hash. - * @summary Get transaction status - * @param hash Transaction hash. - */ - public async getTransactionStatus (hash: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: TransactionStatusDTO; }> { - const localVarPath = this.basePath + '/transaction/{hash}/status' - .replace('{' + 'hash' + '}', encodeURIComponent(String(hash))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'hash' is not null or undefined - if (hash === null || hash === undefined) { - throw new Error('Required parameter hash was null or undefined when calling getTransactionStatus.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: TransactionStatusDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "TransactionStatusDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns transactions information for a given array of transactionIds. - * @summary Get transactions information - * @param transactionIds - */ - public async getTransactions (transactionIds: TransactionIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/transaction'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'transactionIds' is not null or undefined - if (transactionIds === null || transactionIds === undefined) { - throw new Error('Required parameter transactionIds was null or undefined when calling getTransactions.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(transactionIds, "TransactionIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns an array of transaction statuses for a given array of transaction hashes. - * @summary Get transactions status - * @param transactionHashes - */ - public async getTransactionsStatuses (transactionHashes: TransactionHashes, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/transaction/statuses'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'transactionHashes' is not null or undefined - if (transactionHashes === null || transactionHashes === undefined) { - throw new Error('Required parameter transactionHashes was null or undefined when calling getTransactionsStatuses.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(transactionHashes, "TransactionHashes") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } -} diff --git a/src/infrastructure/model/accountAddressRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/accountAddressRestrictionTransactionBodyDTO.ts deleted file mode 100644 index 1d19b7fe88..0000000000 --- a/src/infrastructure/model/accountAddressRestrictionTransactionBodyDTO.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; - -export class AccountAddressRestrictionTransactionBodyDTO { - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Account restriction additions. - */ - 'restrictionAdditions': Array; - /** - * Account restriction deletions. - */ - 'restrictionDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "restrictionAdditions", - "baseName": "restrictionAdditions", - "type": "Array" - }, - { - "name": "restrictionDeletions", - "baseName": "restrictionDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountAddressRestrictionTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountAddressRestrictionTransactionDTO.ts b/src/infrastructure/model/accountAddressRestrictionTransactionDTO.ts deleted file mode 100644 index 98136bc9c5..0000000000 --- a/src/infrastructure/model/accountAddressRestrictionTransactionDTO.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountAddressRestrictionTransactionBodyDTO } from './accountAddressRestrictionTransactionBodyDTO'; -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to prevent incoming and outgoing transactions for a given a set of addresses. -*/ -export class AccountAddressRestrictionTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Account restriction additions. - */ - 'restrictionAdditions': Array; - /** - * Account restriction deletions. - */ - 'restrictionDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "restrictionAdditions", - "baseName": "restrictionAdditions", - "type": "Array" - }, - { - "name": "restrictionDeletions", - "baseName": "restrictionDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountAddressRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountDTO.ts b/src/infrastructure/model/accountDTO.ts deleted file mode 100644 index f15d4e876c..0000000000 --- a/src/infrastructure/model/accountDTO.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountTypeEnum } from './accountTypeEnum'; -import { ActivityBucketDTO } from './activityBucketDTO'; -import { Mosaic } from './mosaic'; - -export class AccountDTO { - /** - * Decoded address. - */ - 'address': string; - /** - * Height of the blockchain. - */ - 'addressHeight': string; - 'publicKey': string; - /** - * Height of the blockchain. - */ - 'publicKeyHeight': string; - 'accountType': AccountTypeEnum; - 'linkedAccountKey': string; - 'activityBuckets': Array; - /** - * Mosaic units owned. The amount is represented in absolute amount. Thus a balance of 123456789 for a mosaic with divisibility 6 (absolute) means the account owns 123.456789. - */ - 'mosaics': Array; - /** - * Probability of an account to harvest the next block. - */ - 'importance': string; - /** - * Height of the blockchain. - */ - 'importanceHeight': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "address", - "baseName": "address", - "type": "string" - }, - { - "name": "addressHeight", - "baseName": "addressHeight", - "type": "string" - }, - { - "name": "publicKey", - "baseName": "publicKey", - "type": "string" - }, - { - "name": "publicKeyHeight", - "baseName": "publicKeyHeight", - "type": "string" - }, - { - "name": "accountType", - "baseName": "accountType", - "type": "AccountTypeEnum" - }, - { - "name": "linkedAccountKey", - "baseName": "linkedAccountKey", - "type": "string" - }, - { - "name": "activityBuckets", - "baseName": "activityBuckets", - "type": "Array" - }, - { - "name": "mosaics", - "baseName": "mosaics", - "type": "Array" - }, - { - "name": "importance", - "baseName": "importance", - "type": "string" - }, - { - "name": "importanceHeight", - "baseName": "importanceHeight", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AccountDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountIds.ts b/src/infrastructure/model/accountIds.ts deleted file mode 100644 index 0e89bca6a5..0000000000 --- a/src/infrastructure/model/accountIds.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class AccountIds { - /** - * Array of public keys. - */ - 'publicKeys'?: Array; - /** - * Array of addresses. - */ - 'addresses'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "publicKeys", - "baseName": "publicKeys", - "type": "Array" - }, - { - "name": "addresses", - "baseName": "addresses", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountIds.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountInfoDTO.ts b/src/infrastructure/model/accountInfoDTO.ts deleted file mode 100644 index 9215220687..0000000000 --- a/src/infrastructure/model/accountInfoDTO.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountDTO } from './accountDTO'; - -export class AccountInfoDTO { - 'account': AccountDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "account", - "baseName": "account", - "type": "AccountDTO" - } ]; - - static getAttributeTypeMap() { - return AccountInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountLinkActionEnum.ts b/src/infrastructure/model/accountLinkActionEnum.ts deleted file mode 100644 index bc5c18ea41..0000000000 --- a/src/infrastructure/model/accountLinkActionEnum.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Type of action: * 0 - Unlink. * 1 - Link. - */ -export enum AccountLinkActionEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, -} diff --git a/src/infrastructure/model/accountLinkTransactionBodyDTO.ts b/src/infrastructure/model/accountLinkTransactionBodyDTO.ts deleted file mode 100644 index c67ed1d29e..0000000000 --- a/src/infrastructure/model/accountLinkTransactionBodyDTO.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountLinkActionEnum } from './accountLinkActionEnum'; - -export class AccountLinkTransactionBodyDTO { - 'remotePublicKey': string; - 'linkAction': AccountLinkActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "remotePublicKey", - "baseName": "remotePublicKey", - "type": "string" - }, - { - "name": "linkAction", - "baseName": "linkAction", - "type": "AccountLinkActionEnum" - } ]; - - static getAttributeTypeMap() { - return AccountLinkTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountLinkTransactionDTO.ts b/src/infrastructure/model/accountLinkTransactionDTO.ts deleted file mode 100644 index 94be101e30..0000000000 --- a/src/infrastructure/model/accountLinkTransactionDTO.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountLinkActionEnum } from './accountLinkActionEnum'; -import { AccountLinkTransactionBodyDTO } from './accountLinkTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Delegates the account importance score to a proxy account. -*/ -export class AccountLinkTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'remotePublicKey': string; - 'linkAction': AccountLinkActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "remotePublicKey", - "baseName": "remotePublicKey", - "type": "string" - }, - { - "name": "linkAction", - "baseName": "linkAction", - "type": "AccountLinkActionEnum" - } ]; - - static getAttributeTypeMap() { - return AccountLinkTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountMetadataTransactionBodyDTO.ts b/src/infrastructure/model/accountMetadataTransactionBodyDTO.ts deleted file mode 100644 index a77d63d3fd..0000000000 --- a/src/infrastructure/model/accountMetadataTransactionBodyDTO.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class AccountMetadataTransactionBodyDTO { - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AccountMetadataTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountMetadataTransactionDTO.ts b/src/infrastructure/model/accountMetadataTransactionDTO.ts deleted file mode 100644 index ca2f474e86..0000000000 --- a/src/infrastructure/model/accountMetadataTransactionDTO.ts +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountMetadataTransactionBodyDTO } from './accountMetadataTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to create or modify a multisig account. -*/ -export class AccountMetadataTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AccountMetadataTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountMosaicRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/accountMosaicRestrictionTransactionBodyDTO.ts deleted file mode 100644 index 047419cf04..0000000000 --- a/src/infrastructure/model/accountMosaicRestrictionTransactionBodyDTO.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; - -export class AccountMosaicRestrictionTransactionBodyDTO { - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Account restriction additions. - */ - 'restrictionAdditions': Array; - /** - * Account restriction deletions. - */ - 'restrictionDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "restrictionAdditions", - "baseName": "restrictionAdditions", - "type": "Array" - }, - { - "name": "restrictionDeletions", - "baseName": "restrictionDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountMosaicRestrictionTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountMosaicRestrictionTransactionDTO.ts b/src/infrastructure/model/accountMosaicRestrictionTransactionDTO.ts deleted file mode 100644 index 49982796e3..0000000000 --- a/src/infrastructure/model/accountMosaicRestrictionTransactionDTO.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountMosaicRestrictionTransactionBodyDTO } from './accountMosaicRestrictionTransactionBodyDTO'; -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to prevent incoming transactions containing a given set of mosaics. -*/ -export class AccountMosaicRestrictionTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Account restriction additions. - */ - 'restrictionAdditions': Array; - /** - * Account restriction deletions. - */ - 'restrictionDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "restrictionAdditions", - "baseName": "restrictionAdditions", - "type": "Array" - }, - { - "name": "restrictionDeletions", - "baseName": "restrictionDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountMosaicRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountNamesDTO.ts b/src/infrastructure/model/accountNamesDTO.ts deleted file mode 100644 index a538bd2c96..0000000000 --- a/src/infrastructure/model/accountNamesDTO.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class AccountNamesDTO { - /** - * Decoded address. - */ - 'address': string; - /** - * Account linked namespace names. - */ - 'names': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "address", - "baseName": "address", - "type": "string" - }, - { - "name": "names", - "baseName": "names", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountNamesDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountOperationRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/accountOperationRestrictionTransactionBodyDTO.ts deleted file mode 100644 index 4fd1fa22a1..0000000000 --- a/src/infrastructure/model/accountOperationRestrictionTransactionBodyDTO.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; -import { TransactionTypeEnum } from './transactionTypeEnum'; - -export class AccountOperationRestrictionTransactionBodyDTO { - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Account restriction additions. - */ - 'restrictionAdditions': Array; - /** - * Account restriction deletions. - */ - 'restrictionDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "restrictionAdditions", - "baseName": "restrictionAdditions", - "type": "Array" - }, - { - "name": "restrictionDeletions", - "baseName": "restrictionDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountOperationRestrictionTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountOperationRestrictionTransactionDTO.ts b/src/infrastructure/model/accountOperationRestrictionTransactionDTO.ts deleted file mode 100644 index 82d28aa17e..0000000000 --- a/src/infrastructure/model/accountOperationRestrictionTransactionDTO.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountOperationRestrictionTransactionBodyDTO } from './accountOperationRestrictionTransactionBodyDTO'; -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; -import { TransactionTypeEnum } from './transactionTypeEnum'; - -/** -* Transaction to prevent outgoing transactions by transaction type. -*/ -export class AccountOperationRestrictionTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Account restriction additions. - */ - 'restrictionAdditions': Array; - /** - * Account restriction deletions. - */ - 'restrictionDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "restrictionAdditions", - "baseName": "restrictionAdditions", - "type": "Array" - }, - { - "name": "restrictionDeletions", - "baseName": "restrictionDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountOperationRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountRestrictionDTO.ts b/src/infrastructure/model/accountRestrictionDTO.ts deleted file mode 100644 index d7f47c4a62..0000000000 --- a/src/infrastructure/model/accountRestrictionDTO.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; - -export class AccountRestrictionDTO { - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Address, mosaic id, or transaction type to restrict. - */ - 'values': any; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "values", - "baseName": "values", - "type": "any" - } ]; - - static getAttributeTypeMap() { - return AccountRestrictionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountRestrictionFlagsEnum.ts b/src/infrastructure/model/accountRestrictionFlagsEnum.ts deleted file mode 100644 index 76813ed067..0000000000 --- a/src/infrastructure/model/accountRestrictionFlagsEnum.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Type of account restriction: - * 0x0001 (1 decimal) - Allow only incoming transactions from a given address. - * 0x0002 (2 decimal) - Allow only incoming transactions containing a given mosaic identifier. - * 0x4001 (16385 decimal) - Allow only outgoing transactions to a given address. - * 0x4004 (16388 decimal) - Allow only outgoing transactions with a given transaction type. - * 0x8001 (32769 decimal) - Block incoming transactions from a given address. - * 0x8002 (32770 decimal) - Block incoming transactions containing a given mosaic identifier. - * 0xC001 (49153 decimal) - Block outgoing transactions to a given address. - * 0xC004 (49156 decimal) - Block outgoing transactions with a given transaction type. - */ -export enum AccountRestrictionFlagsEnum { - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_16385 = 16385, - NUMBER_16388 = 16388, - NUMBER_32769 = 32769, - NUMBER_32770 = 32770, - NUMBER_49153 = 49153, - NUMBER_49156 = 49156, -} diff --git a/src/infrastructure/model/accountRestrictionsDTO.ts b/src/infrastructure/model/accountRestrictionsDTO.ts deleted file mode 100644 index 505fef3f9f..0000000000 --- a/src/infrastructure/model/accountRestrictionsDTO.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountRestrictionDTO } from './accountRestrictionDTO'; - -export class AccountRestrictionsDTO { - /** - * Decoded address. - */ - 'address': string; - 'restrictions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "address", - "baseName": "address", - "type": "string" - }, - { - "name": "restrictions", - "baseName": "restrictions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountRestrictionsDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountRestrictionsInfoDTO.ts b/src/infrastructure/model/accountRestrictionsInfoDTO.ts deleted file mode 100644 index ec41841645..0000000000 --- a/src/infrastructure/model/accountRestrictionsInfoDTO.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountRestrictionsDTO } from './accountRestrictionsDTO'; - -export class AccountRestrictionsInfoDTO { - 'accountRestrictions': AccountRestrictionsDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "accountRestrictions", - "baseName": "accountRestrictions", - "type": "AccountRestrictionsDTO" - } ]; - - static getAttributeTypeMap() { - return AccountRestrictionsInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/accountTypeEnum.ts b/src/infrastructure/model/accountTypeEnum.ts deleted file mode 100644 index 3fb939d8ff..0000000000 --- a/src/infrastructure/model/accountTypeEnum.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * 0 - Unlinked. - * 1 - Balance-holding account that is linked to a remote harvester account. - * 2 - Remote harvester account that is linked to a balance-holding account. - * 3 - Remote harvester eligible account that is unlinked. - */ -export enum AccountTypeEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_3 = 3, -} diff --git a/src/infrastructure/model/accountsNamesDTO.ts b/src/infrastructure/model/accountsNamesDTO.ts deleted file mode 100644 index 2572bceab4..0000000000 --- a/src/infrastructure/model/accountsNamesDTO.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountNamesDTO } from './accountNamesDTO'; - -export class AccountsNamesDTO { - /** - * Array of account names. - */ - 'accountNames': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "accountNames", - "baseName": "accountNames", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AccountsNamesDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/activityBucketDTO.ts b/src/infrastructure/model/activityBucketDTO.ts deleted file mode 100644 index e41035a61c..0000000000 --- a/src/infrastructure/model/activityBucketDTO.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ActivityBucketDTO { - /** - * Height of the blockchain. - */ - 'startHeight': string; - 'totalFeesPaid': number; - 'beneficiaryCount': number; - 'rawScore': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "startHeight", - "baseName": "startHeight", - "type": "string" - }, - { - "name": "totalFeesPaid", - "baseName": "totalFeesPaid", - "type": "number" - }, - { - "name": "beneficiaryCount", - "baseName": "beneficiaryCount", - "type": "number" - }, - { - "name": "rawScore", - "baseName": "rawScore", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return ActivityBucketDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/addressAliasTransactionBodyDTO.ts b/src/infrastructure/model/addressAliasTransactionBodyDTO.ts deleted file mode 100644 index 77a11f1e5e..0000000000 --- a/src/infrastructure/model/addressAliasTransactionBodyDTO.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AliasActionEnum } from './aliasActionEnum'; - -export class AddressAliasTransactionBodyDTO { - /** - * Namespace identifier. - */ - 'namespaceId': string; - /** - * Decoded address. - */ - 'address': string; - 'aliasAction': AliasActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "namespaceId", - "baseName": "namespaceId", - "type": "string" - }, - { - "name": "address", - "baseName": "address", - "type": "string" - }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - } ]; - - static getAttributeTypeMap() { - return AddressAliasTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/addressAliasTransactionDTO.ts b/src/infrastructure/model/addressAliasTransactionDTO.ts deleted file mode 100644 index efc8ba40b8..0000000000 --- a/src/infrastructure/model/addressAliasTransactionDTO.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AddressAliasTransactionBodyDTO } from './addressAliasTransactionBodyDTO'; -import { AliasActionEnum } from './aliasActionEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to link a namespace to an account. -*/ -export class AddressAliasTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Namespace identifier. - */ - 'namespaceId': string; - /** - * Decoded address. - */ - 'address': string; - 'aliasAction': AliasActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "namespaceId", - "baseName": "namespaceId", - "type": "string" - }, - { - "name": "address", - "baseName": "address", - "type": "string" - }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - } ]; - - static getAttributeTypeMap() { - return AddressAliasTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/aggregateTransactionBodyDTO.ts b/src/infrastructure/model/aggregateTransactionBodyDTO.ts deleted file mode 100644 index ff8c5d27c3..0000000000 --- a/src/infrastructure/model/aggregateTransactionBodyDTO.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { CosignatureDTO } from './cosignatureDTO'; -import { EmbeddedTransactionInfoDTO } from './embeddedTransactionInfoDTO'; - -export class AggregateTransactionBodyDTO { - 'transactionsHash': string; - /** - * Array of transaction cosignatures. - */ - 'cosignatures': Array; - /** - * Array of transactions initiated by different accounts. - */ - 'transactions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "transactionsHash", - "baseName": "transactionsHash", - "type": "string" - }, - { - "name": "cosignatures", - "baseName": "cosignatures", - "type": "Array" - }, - { - "name": "transactions", - "baseName": "transactions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AggregateTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/aggregateTransactionDTO.ts b/src/infrastructure/model/aggregateTransactionDTO.ts deleted file mode 100644 index 7841b14320..0000000000 --- a/src/infrastructure/model/aggregateTransactionDTO.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AggregateTransactionBodyDTO } from './aggregateTransactionBodyDTO'; -import { CosignatureDTO } from './cosignatureDTO'; -import { EmbeddedTransactionInfoDTO } from './embeddedTransactionInfoDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to combine multiple transactions together. -*/ -export class AggregateTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'transactionsHash': string; - /** - * Array of transaction cosignatures. - */ - 'cosignatures': Array; - /** - * Array of transactions initiated by different accounts. - */ - 'transactions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "transactionsHash", - "baseName": "transactionsHash", - "type": "string" - }, - { - "name": "cosignatures", - "baseName": "cosignatures", - "type": "Array" - }, - { - "name": "transactions", - "baseName": "transactions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AggregateTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/aliasActionEnum.ts b/src/infrastructure/model/aliasActionEnum.ts deleted file mode 100644 index 23b09f0206..0000000000 --- a/src/infrastructure/model/aliasActionEnum.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Alias action: * 0 - Unlink alias. * 1 - Link alias. - */ -export enum AliasActionEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, -} diff --git a/src/infrastructure/model/aliasDTO.ts b/src/infrastructure/model/aliasDTO.ts deleted file mode 100644 index c97666d056..0000000000 --- a/src/infrastructure/model/aliasDTO.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AliasTypeEnum } from './aliasTypeEnum'; - -export class AliasDTO { - 'type': AliasTypeEnum; - /** - * Mosaic identifier. - */ - 'mosaicId'?: string; - /** - * Decoded address. - */ - 'address'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "AliasTypeEnum" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "address", - "baseName": "address", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AliasDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/aliasTypeEnum.ts b/src/infrastructure/model/aliasTypeEnum.ts deleted file mode 100644 index 55527784ca..0000000000 --- a/src/infrastructure/model/aliasTypeEnum.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Type of alias: * 0 - No alias. * 1 - Mosaic id alias. * 2 - Addres alias. - */ -export enum AliasTypeEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2, -} diff --git a/src/infrastructure/model/announceTransactionInfoDTO.ts b/src/infrastructure/model/announceTransactionInfoDTO.ts deleted file mode 100644 index 125acb4b05..0000000000 --- a/src/infrastructure/model/announceTransactionInfoDTO.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class AnnounceTransactionInfoDTO { - 'message': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "message", - "baseName": "message", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AnnounceTransactionInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/balanceChangeReceiptDTO.ts b/src/infrastructure/model/balanceChangeReceiptDTO.ts deleted file mode 100644 index 52f48100b3..0000000000 --- a/src/infrastructure/model/balanceChangeReceiptDTO.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { BalanceChangeReceiptDTOAllOf } from './balanceChangeReceiptDTOAllOf'; -import { ReceiptDTO } from './receiptDTO'; -import { ReceiptTypeEnum } from './receiptTypeEnum'; - -/** -* Invisible state change that changed an account balance. -*/ -export class BalanceChangeReceiptDTO { - /** - * Version of the receipt. - */ - 'version': number; - 'type': ReceiptTypeEnum; - /** - * Mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - 'targetPublicKey': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "ReceiptTypeEnum" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return BalanceChangeReceiptDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/balanceChangeReceiptDTOAllOf.ts b/src/infrastructure/model/balanceChangeReceiptDTOAllOf.ts deleted file mode 100644 index 97c09d4a09..0000000000 --- a/src/infrastructure/model/balanceChangeReceiptDTOAllOf.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class BalanceChangeReceiptDTOAllOf { - /** - * Mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - 'targetPublicKey': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return BalanceChangeReceiptDTOAllOf.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/balanceTransferReceiptDTO.ts b/src/infrastructure/model/balanceTransferReceiptDTO.ts deleted file mode 100644 index 30fdecc5f1..0000000000 --- a/src/infrastructure/model/balanceTransferReceiptDTO.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { BalanceTransferReceiptDTOAllOf } from './balanceTransferReceiptDTOAllOf'; -import { ReceiptDTO } from './receiptDTO'; -import { ReceiptTypeEnum } from './receiptTypeEnum'; - -/** -* Invisible state change that triggered a mosaic transfer. -*/ -export class BalanceTransferReceiptDTO { - /** - * Version of the receipt. - */ - 'version': number; - 'type': ReceiptTypeEnum; - /** - * Mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - 'senderPublicKey': string; - /** - * Decoded address. - */ - 'recipientAddress': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "ReceiptTypeEnum" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "senderPublicKey", - "baseName": "senderPublicKey", - "type": "string" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return BalanceTransferReceiptDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/balanceTransferReceiptDTOAllOf.ts b/src/infrastructure/model/balanceTransferReceiptDTOAllOf.ts deleted file mode 100644 index 0dfa371aab..0000000000 --- a/src/infrastructure/model/balanceTransferReceiptDTOAllOf.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class BalanceTransferReceiptDTOAllOf { - /** - * Mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - 'senderPublicKey': string; - /** - * Decoded address. - */ - 'recipientAddress': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "senderPublicKey", - "baseName": "senderPublicKey", - "type": "string" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return BalanceTransferReceiptDTOAllOf.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/blockDTO.ts b/src/infrastructure/model/blockDTO.ts deleted file mode 100644 index c36b9c4669..0000000000 --- a/src/infrastructure/model/blockDTO.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { BlockDTOAllOf } from './blockDTOAllOf'; -import { EntityDTO } from './entityDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { VerifiableEntityDTO } from './verifiableEntityDTO'; - -export class BlockDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Height of the blockchain. - */ - 'height': string; - /** - * Number of seconds elapsed since the creation of the nemesis block. - */ - 'timestamp': string; - /** - * Defines how difficult it will be to harvest next the block, based on previous blocks. - */ - 'difficulty': string; - 'previousBlockHash': string; - 'transactionsHash': string; - 'receiptsHash': string; - 'stateHash': string; - 'beneficiaryPublicKey': string; - /** - * Fee multiplier applied to transactions contained in block. - */ - 'feeMultiplier': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "height", - "baseName": "height", - "type": "string" - }, - { - "name": "timestamp", - "baseName": "timestamp", - "type": "string" - }, - { - "name": "difficulty", - "baseName": "difficulty", - "type": "string" - }, - { - "name": "previousBlockHash", - "baseName": "previousBlockHash", - "type": "string" - }, - { - "name": "transactionsHash", - "baseName": "transactionsHash", - "type": "string" - }, - { - "name": "receiptsHash", - "baseName": "receiptsHash", - "type": "string" - }, - { - "name": "stateHash", - "baseName": "stateHash", - "type": "string" - }, - { - "name": "beneficiaryPublicKey", - "baseName": "beneficiaryPublicKey", - "type": "string" - }, - { - "name": "feeMultiplier", - "baseName": "feeMultiplier", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return BlockDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/blockDTOAllOf.ts b/src/infrastructure/model/blockDTOAllOf.ts deleted file mode 100644 index 7d3e4edac6..0000000000 --- a/src/infrastructure/model/blockDTOAllOf.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class BlockDTOAllOf { - /** - * Height of the blockchain. - */ - 'height': string; - /** - * Number of seconds elapsed since the creation of the nemesis block. - */ - 'timestamp': string; - /** - * Defines how difficult it will be to harvest next the block, based on previous blocks. - */ - 'difficulty': string; - 'previousBlockHash': string; - 'transactionsHash': string; - 'receiptsHash': string; - 'stateHash': string; - 'beneficiaryPublicKey': string; - /** - * Fee multiplier applied to transactions contained in block. - */ - 'feeMultiplier': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "height", - "baseName": "height", - "type": "string" - }, - { - "name": "timestamp", - "baseName": "timestamp", - "type": "string" - }, - { - "name": "difficulty", - "baseName": "difficulty", - "type": "string" - }, - { - "name": "previousBlockHash", - "baseName": "previousBlockHash", - "type": "string" - }, - { - "name": "transactionsHash", - "baseName": "transactionsHash", - "type": "string" - }, - { - "name": "receiptsHash", - "baseName": "receiptsHash", - "type": "string" - }, - { - "name": "stateHash", - "baseName": "stateHash", - "type": "string" - }, - { - "name": "beneficiaryPublicKey", - "baseName": "beneficiaryPublicKey", - "type": "string" - }, - { - "name": "feeMultiplier", - "baseName": "feeMultiplier", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return BlockDTOAllOf.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/blockInfoDTO.ts b/src/infrastructure/model/blockInfoDTO.ts deleted file mode 100644 index 892e229dad..0000000000 --- a/src/infrastructure/model/blockInfoDTO.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { BlockDTO } from './blockDTO'; -import { BlockMetaDTO } from './blockMetaDTO'; - -export class BlockInfoDTO { - 'meta': BlockMetaDTO; - 'block': BlockDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "meta", - "baseName": "meta", - "type": "BlockMetaDTO" - }, - { - "name": "block", - "baseName": "block", - "type": "BlockDTO" - } ]; - - static getAttributeTypeMap() { - return BlockInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/blockMetaDTO.ts b/src/infrastructure/model/blockMetaDTO.ts deleted file mode 100644 index 415c1f9be9..0000000000 --- a/src/infrastructure/model/blockMetaDTO.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class BlockMetaDTO { - 'hash': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'totalFee': string; - 'generationHash': string; - 'stateHashSubCacheMerkleRoots': Array; - 'numTransactions': number; - 'numStatements'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "hash", - "baseName": "hash", - "type": "string" - }, - { - "name": "totalFee", - "baseName": "totalFee", - "type": "string" - }, - { - "name": "generationHash", - "baseName": "generationHash", - "type": "string" - }, - { - "name": "stateHashSubCacheMerkleRoots", - "baseName": "stateHashSubCacheMerkleRoots", - "type": "Array" - }, - { - "name": "numTransactions", - "baseName": "numTransactions", - "type": "number" - }, - { - "name": "numStatements", - "baseName": "numStatements", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return BlockMetaDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/chainScoreDTO.ts b/src/infrastructure/model/chainScoreDTO.ts deleted file mode 100644 index fd7d1e249f..0000000000 --- a/src/infrastructure/model/chainScoreDTO.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ChainScoreDTO { - /** - * Score of the blockchain.During synchronization, nodes try to get the blockchain with highest score in the network. - */ - 'scoreHigh': string; - /** - * Score of the blockchain.During synchronization, nodes try to get the blockchain with highest score in the network. - */ - 'scoreLow': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "scoreHigh", - "baseName": "scoreHigh", - "type": "string" - }, - { - "name": "scoreLow", - "baseName": "scoreLow", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ChainScoreDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/communicationTimestampsDTO.ts b/src/infrastructure/model/communicationTimestampsDTO.ts deleted file mode 100644 index 205c4793e7..0000000000 --- a/src/infrastructure/model/communicationTimestampsDTO.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class CommunicationTimestampsDTO { - /** - * Number of seconds elapsed since the creation of the nemesis block. - */ - 'sendTimestamp'?: string; - /** - * Number of seconds elapsed since the creation of the nemesis block. - */ - 'receiveTimestamp'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sendTimestamp", - "baseName": "sendTimestamp", - "type": "string" - }, - { - "name": "receiveTimestamp", - "baseName": "receiveTimestamp", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CommunicationTimestampsDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/cosignature.ts b/src/infrastructure/model/cosignature.ts deleted file mode 100644 index 608031e70f..0000000000 --- a/src/infrastructure/model/cosignature.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class Cosignature { - 'parentHash'?: string; - /** - * Entity\'s signature generated by the signer. - */ - 'signature'?: string; - 'signerPublicKey'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "parentHash", - "baseName": "parentHash", - "type": "string" - }, - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return Cosignature.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/cosignatureDTO.ts b/src/infrastructure/model/cosignatureDTO.ts deleted file mode 100644 index 650d0ff7ef..0000000000 --- a/src/infrastructure/model/cosignatureDTO.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { CosignatureDTOAllOf } from './cosignatureDTOAllOf'; -import { VerifiableEntityDTO } from './verifiableEntityDTO'; - -export class CosignatureDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CosignatureDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/cosignatureDTOAllOf.ts b/src/infrastructure/model/cosignatureDTOAllOf.ts deleted file mode 100644 index b7fe3a2318..0000000000 --- a/src/infrastructure/model/cosignatureDTOAllOf.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class CosignatureDTOAllOf { - 'signerPublicKey': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CosignatureDTOAllOf.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedAccountAddressRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedAccountAddressRestrictionTransactionDTO.ts deleted file mode 100644 index cd969cb1e3..0000000000 --- a/src/infrastructure/model/embeddedAccountAddressRestrictionTransactionDTO.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountAddressRestrictionTransactionBodyDTO } from './accountAddressRestrictionTransactionBodyDTO'; -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedAccountAddressRestrictionTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Account restriction additions. - */ - 'restrictionAdditions': Array; - /** - * Account restriction deletions. - */ - 'restrictionDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "restrictionAdditions", - "baseName": "restrictionAdditions", - "type": "Array" - }, - { - "name": "restrictionDeletions", - "baseName": "restrictionDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return EmbeddedAccountAddressRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedAccountLinkTransactionDTO.ts b/src/infrastructure/model/embeddedAccountLinkTransactionDTO.ts deleted file mode 100644 index a25b7e625d..0000000000 --- a/src/infrastructure/model/embeddedAccountLinkTransactionDTO.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountLinkActionEnum } from './accountLinkActionEnum'; -import { AccountLinkTransactionBodyDTO } from './accountLinkTransactionBodyDTO'; -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedAccountLinkTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'remotePublicKey': string; - 'linkAction': AccountLinkActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "remotePublicKey", - "baseName": "remotePublicKey", - "type": "string" - }, - { - "name": "linkAction", - "baseName": "linkAction", - "type": "AccountLinkActionEnum" - } ]; - - static getAttributeTypeMap() { - return EmbeddedAccountLinkTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedAccountMetadataTransactionDTO.ts b/src/infrastructure/model/embeddedAccountMetadataTransactionDTO.ts deleted file mode 100644 index cb2cc4eaf2..0000000000 --- a/src/infrastructure/model/embeddedAccountMetadataTransactionDTO.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountMetadataTransactionBodyDTO } from './accountMetadataTransactionBodyDTO'; -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedAccountMetadataTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedAccountMetadataTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedAccountMosaicRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedAccountMosaicRestrictionTransactionDTO.ts deleted file mode 100644 index 3ff8950e2b..0000000000 --- a/src/infrastructure/model/embeddedAccountMosaicRestrictionTransactionDTO.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountMosaicRestrictionTransactionBodyDTO } from './accountMosaicRestrictionTransactionBodyDTO'; -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedAccountMosaicRestrictionTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Account restriction additions. - */ - 'restrictionAdditions': Array; - /** - * Account restriction deletions. - */ - 'restrictionDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "restrictionAdditions", - "baseName": "restrictionAdditions", - "type": "Array" - }, - { - "name": "restrictionDeletions", - "baseName": "restrictionDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return EmbeddedAccountMosaicRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedAccountOperationRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedAccountOperationRestrictionTransactionDTO.ts deleted file mode 100644 index a813ed4a5b..0000000000 --- a/src/infrastructure/model/embeddedAccountOperationRestrictionTransactionDTO.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountOperationRestrictionTransactionBodyDTO } from './accountOperationRestrictionTransactionBodyDTO'; -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionTypeEnum } from './transactionTypeEnum'; - -export class EmbeddedAccountOperationRestrictionTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'restrictionFlags': AccountRestrictionFlagsEnum; - /** - * Account restriction additions. - */ - 'restrictionAdditions': Array; - /** - * Account restriction deletions. - */ - 'restrictionDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "restrictionFlags", - "baseName": "restrictionFlags", - "type": "AccountRestrictionFlagsEnum" - }, - { - "name": "restrictionAdditions", - "baseName": "restrictionAdditions", - "type": "Array" - }, - { - "name": "restrictionDeletions", - "baseName": "restrictionDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return EmbeddedAccountOperationRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedAddressAliasTransactionDTO.ts b/src/infrastructure/model/embeddedAddressAliasTransactionDTO.ts deleted file mode 100644 index e03011afab..0000000000 --- a/src/infrastructure/model/embeddedAddressAliasTransactionDTO.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AddressAliasTransactionBodyDTO } from './addressAliasTransactionBodyDTO'; -import { AliasActionEnum } from './aliasActionEnum'; -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedAddressAliasTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Namespace identifier. - */ - 'namespaceId': string; - /** - * Decoded address. - */ - 'address': string; - 'aliasAction': AliasActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "namespaceId", - "baseName": "namespaceId", - "type": "string" - }, - { - "name": "address", - "baseName": "address", - "type": "string" - }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - } ]; - - static getAttributeTypeMap() { - return EmbeddedAddressAliasTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedHashLockTransactionDTO.ts b/src/infrastructure/model/embeddedHashLockTransactionDTO.ts deleted file mode 100644 index d6ae1aa02f..0000000000 --- a/src/infrastructure/model/embeddedHashLockTransactionDTO.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { HashLockTransactionBodyDTO } from './hashLockTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedHashLockTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - 'hash': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "hash", - "baseName": "hash", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedHashLockTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedMosaicAddressRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicAddressRestrictionTransactionDTO.ts deleted file mode 100644 index f48fc94f2c..0000000000 --- a/src/infrastructure/model/embeddedMosaicAddressRestrictionTransactionDTO.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { MosaicAddressRestrictionTransactionBodyDTO } from './mosaicAddressRestrictionTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedMosaicAddressRestrictionTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Restriction key. - */ - 'restrictionKey': string; - /** - * A value in a restriction transaction. - */ - 'previousRestrictionValue': string; - /** - * A value in a restriction transaction. - */ - 'newRestrictionValue': string; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'targetAddress': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "restrictionKey", - "baseName": "restrictionKey", - "type": "string" - }, - { - "name": "previousRestrictionValue", - "baseName": "previousRestrictionValue", - "type": "string" - }, - { - "name": "newRestrictionValue", - "baseName": "newRestrictionValue", - "type": "string" - }, - { - "name": "targetAddress", - "baseName": "targetAddress", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedMosaicAddressRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedMosaicAliasTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicAliasTransactionDTO.ts deleted file mode 100644 index c7d3cddc07..0000000000 --- a/src/infrastructure/model/embeddedMosaicAliasTransactionDTO.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AliasActionEnum } from './aliasActionEnum'; -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { MosaicAliasTransactionBodyDTO } from './mosaicAliasTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedMosaicAliasTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Namespace identifier. - */ - 'namespaceId': string; - /** - * Mosaic identifier. - */ - 'mosaicId': string; - 'aliasAction': AliasActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "namespaceId", - "baseName": "namespaceId", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - } ]; - - static getAttributeTypeMap() { - return EmbeddedMosaicAliasTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedMosaicDefinitionTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicDefinitionTransactionDTO.ts deleted file mode 100644 index 840168d0e9..0000000000 --- a/src/infrastructure/model/embeddedMosaicDefinitionTransactionDTO.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { MosaicDefinitionTransactionBodyDTO } from './mosaicDefinitionTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedMosaicDefinitionTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. - */ - 'id': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - /** - * Random nonce used to generate the mosaic id. - */ - 'nonce': number; - /** - * - 0x00 (none) - No flags present. - 0x01 (supplyMutable) - Mosaic supports supply changes even when mosaic owner owns partial supply. - 0x02 (transferable) - Mosaic supports transfers between arbitrary accounts. When not set, mosaic can only be transferred to and from mosaic owner. - 0x04 (restrictable) - Mosaic supports custom restrictions configured by mosaic owner. - */ - 'flags': number; - /** - * Determines up to what decimal place the mosaic can be divided. Divisibility of 3 means that a mosaic can be divided into smallest parts of 0.001 mosaics. The divisibility must be in the range of 0 and 6. - */ - 'divisibility': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "nonce", - "baseName": "nonce", - "type": "number" - }, - { - "name": "flags", - "baseName": "flags", - "type": "number" - }, - { - "name": "divisibility", - "baseName": "divisibility", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return EmbeddedMosaicDefinitionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedMosaicGlobalRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicGlobalRestrictionTransactionDTO.ts deleted file mode 100644 index 8c25f184e4..0000000000 --- a/src/infrastructure/model/embeddedMosaicGlobalRestrictionTransactionDTO.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { MosaicGlobalRestrictionTransactionBodyDTO } from './mosaicGlobalRestrictionTransactionBodyDTO'; -import { MosaicRestrictionTypeEnum } from './mosaicRestrictionTypeEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedMosaicGlobalRestrictionTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'referenceMosaicId': string; - /** - * Restriction key. - */ - 'restrictionKey': string; - /** - * A value in a restriction transaction. - */ - 'previousRestrictionValue': string; - /** - * A value in a restriction transaction. - */ - 'newRestrictionValue': string; - 'previousRestrictionType': MosaicRestrictionTypeEnum; - 'newRestrictionType': MosaicRestrictionTypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "referenceMosaicId", - "baseName": "referenceMosaicId", - "type": "string" - }, - { - "name": "restrictionKey", - "baseName": "restrictionKey", - "type": "string" - }, - { - "name": "previousRestrictionValue", - "baseName": "previousRestrictionValue", - "type": "string" - }, - { - "name": "newRestrictionValue", - "baseName": "newRestrictionValue", - "type": "string" - }, - { - "name": "previousRestrictionType", - "baseName": "previousRestrictionType", - "type": "MosaicRestrictionTypeEnum" - }, - { - "name": "newRestrictionType", - "baseName": "newRestrictionType", - "type": "MosaicRestrictionTypeEnum" - } ]; - - static getAttributeTypeMap() { - return EmbeddedMosaicGlobalRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedMosaicMetadataTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicMetadataTransactionDTO.ts deleted file mode 100644 index bd007e71c5..0000000000 --- a/src/infrastructure/model/embeddedMosaicMetadataTransactionDTO.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { MosaicMetadataTransactionBodyDTO } from './mosaicMetadataTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedMosaicMetadataTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'targetMosaicId': string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "targetMosaicId", - "baseName": "targetMosaicId", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedMosaicMetadataTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedMosaicSupplyChangeTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicSupplyChangeTransactionDTO.ts deleted file mode 100644 index efa17f1b92..0000000000 --- a/src/infrastructure/model/embeddedMosaicSupplyChangeTransactionDTO.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { MosaicSupplyChangeActionEnum } from './mosaicSupplyChangeActionEnum'; -import { MosaicSupplyChangeTransactionBodyDTO } from './mosaicSupplyChangeTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedMosaicSupplyChangeTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'delta': string; - 'action': MosaicSupplyChangeActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "delta", - "baseName": "delta", - "type": "string" - }, - { - "name": "action", - "baseName": "action", - "type": "MosaicSupplyChangeActionEnum" - } ]; - - static getAttributeTypeMap() { - return EmbeddedMosaicSupplyChangeTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedMultisigAccountModificationTransactionDTO.ts b/src/infrastructure/model/embeddedMultisigAccountModificationTransactionDTO.ts deleted file mode 100644 index adc94975e7..0000000000 --- a/src/infrastructure/model/embeddedMultisigAccountModificationTransactionDTO.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { MultisigAccountModificationTransactionBodyDTO } from './multisigAccountModificationTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedMultisigAccountModificationTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Number of signatures needed to remove a cosignatory. If we are modifying an existing multisig account, this indicates the relative change of the minimum cosignatories. - */ - 'minRemovalDelta': number; - /** - * Number of signatures needed to approve a transaction. If we are modifying an existing multisig account, this indicates the relative change of the minimum cosignatories. - */ - 'minApprovalDelta': number; - /** - * Array of cosignatory accounts to add. - */ - 'publicKeyAdditions': Array; - /** - * Array of cosignatory accounts to delete. - */ - 'publicKeyDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "minRemovalDelta", - "baseName": "minRemovalDelta", - "type": "number" - }, - { - "name": "minApprovalDelta", - "baseName": "minApprovalDelta", - "type": "number" - }, - { - "name": "publicKeyAdditions", - "baseName": "publicKeyAdditions", - "type": "Array" - }, - { - "name": "publicKeyDeletions", - "baseName": "publicKeyDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return EmbeddedMultisigAccountModificationTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedNamespaceMetadataTransactionDTO.ts b/src/infrastructure/model/embeddedNamespaceMetadataTransactionDTO.ts deleted file mode 100644 index 611e2093ba..0000000000 --- a/src/infrastructure/model/embeddedNamespaceMetadataTransactionDTO.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { NamespaceMetadataTransactionBodyDTO } from './namespaceMetadataTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedNamespaceMetadataTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Namespace identifier. - */ - 'targetNamespaceId'?: string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "targetNamespaceId", - "baseName": "targetNamespaceId", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedNamespaceMetadataTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedNamespaceRegistrationTransactionDTO.ts b/src/infrastructure/model/embeddedNamespaceRegistrationTransactionDTO.ts deleted file mode 100644 index dd2ca4c10e..0000000000 --- a/src/infrastructure/model/embeddedNamespaceRegistrationTransactionDTO.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { NamespaceRegistrationTransactionBodyDTO } from './namespaceRegistrationTransactionBodyDTO'; -import { NamespaceRegistrationTypeEnum } from './namespaceRegistrationTypeEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EmbeddedNamespaceRegistrationTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - /** - * Namespace identifier. - */ - 'parentId': string; - /** - * Namespace identifier. - */ - 'id': string; - 'registrationType': NamespaceRegistrationTypeEnum; - /** - * Namespace name. - */ - 'name': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "parentId", - "baseName": "parentId", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "registrationType", - "baseName": "registrationType", - "type": "NamespaceRegistrationTypeEnum" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedNamespaceRegistrationTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedSecretLockTransactionDTO.ts b/src/infrastructure/model/embeddedSecretLockTransactionDTO.ts deleted file mode 100644 index 6aaa6120fc..0000000000 --- a/src/infrastructure/model/embeddedSecretLockTransactionDTO.ts +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { SecretLockTransactionBodyDTO } from './secretLockTransactionBodyDTO'; - -export class EmbeddedSecretLockTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'secret': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - 'hashAlgorithm': LockHashAlgorithmEnum; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'recipientAddress': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "secret", - "baseName": "secret", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "hashAlgorithm", - "baseName": "hashAlgorithm", - "type": "LockHashAlgorithmEnum" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedSecretLockTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedSecretProofTransactionDTO.ts b/src/infrastructure/model/embeddedSecretProofTransactionDTO.ts deleted file mode 100644 index 3ab27abda2..0000000000 --- a/src/infrastructure/model/embeddedSecretProofTransactionDTO.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { SecretProofTransactionBodyDTO } from './secretProofTransactionBodyDTO'; - -export class EmbeddedSecretProofTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'secret': string; - 'hashAlgorithm': LockHashAlgorithmEnum; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'recipientAddress': string; - /** - * Original random set of bytes. - */ - 'proof': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "secret", - "baseName": "secret", - "type": "string" - }, - { - "name": "hashAlgorithm", - "baseName": "hashAlgorithm", - "type": "LockHashAlgorithmEnum" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - }, - { - "name": "proof", - "baseName": "proof", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedSecretProofTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedTransactionDTO.ts b/src/infrastructure/model/embeddedTransactionDTO.ts deleted file mode 100644 index b992dd9c91..0000000000 --- a/src/infrastructure/model/embeddedTransactionDTO.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EntityDTO } from './entityDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionBodyDTO } from './transactionBodyDTO'; - -export class EmbeddedTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedTransactionInfoDTO.ts b/src/infrastructure/model/embeddedTransactionInfoDTO.ts deleted file mode 100644 index dc1a0ea7da..0000000000 --- a/src/infrastructure/model/embeddedTransactionInfoDTO.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionMetaDTO } from './embeddedTransactionMetaDTO'; - -export class EmbeddedTransactionInfoDTO { - 'meta': EmbeddedTransactionMetaDTO; - 'transaction': any; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "meta", - "baseName": "meta", - "type": "EmbeddedTransactionMetaDTO" - }, - { - "name": "transaction", - "baseName": "transaction", - "type": "any" - } ]; - - static getAttributeTypeMap() { - return EmbeddedTransactionInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedTransactionMetaDTO.ts b/src/infrastructure/model/embeddedTransactionMetaDTO.ts deleted file mode 100644 index c0815291b9..0000000000 --- a/src/infrastructure/model/embeddedTransactionMetaDTO.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class EmbeddedTransactionMetaDTO { - /** - * Height of the blockchain. - */ - 'height': string; - 'aggregateHash': string; - 'aggregateId': string; - 'index': number; - 'id': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "height", - "baseName": "height", - "type": "string" - }, - { - "name": "aggregateHash", - "baseName": "aggregateHash", - "type": "string" - }, - { - "name": "aggregateId", - "baseName": "aggregateId", - "type": "string" - }, - { - "name": "index", - "baseName": "index", - "type": "number" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedTransactionMetaDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedTransferTransactionDTO.ts b/src/infrastructure/model/embeddedTransferTransactionDTO.ts deleted file mode 100644 index a669a34ced..0000000000 --- a/src/infrastructure/model/embeddedTransferTransactionDTO.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { MessageDTO } from './messageDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransferTransactionBodyDTO } from './transferTransactionBodyDTO'; -import { UnresolvedMosaic } from './unresolvedMosaic'; - -export class EmbeddedTransferTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'recipientAddress': string; - /** - * Array of mosaics sent to the recipient. - */ - 'mosaics': Array; - 'message': MessageDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - }, - { - "name": "mosaics", - "baseName": "mosaics", - "type": "Array" - }, - { - "name": "message", - "baseName": "message", - "type": "MessageDTO" - } ]; - - static getAttributeTypeMap() { - return EmbeddedTransferTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/entityDTO.ts b/src/infrastructure/model/entityDTO.ts deleted file mode 100644 index 07083301a7..0000000000 --- a/src/infrastructure/model/entityDTO.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { NetworkTypeEnum } from './networkTypeEnum'; - -export class EntityDTO { - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return EntityDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/hashLockTransactionBodyDTO.ts b/src/infrastructure/model/hashLockTransactionBodyDTO.ts deleted file mode 100644 index a3d01e9b93..0000000000 --- a/src/infrastructure/model/hashLockTransactionBodyDTO.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class HashLockTransactionBodyDTO { - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - 'hash': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "hash", - "baseName": "hash", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return HashLockTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/hashLockTransactionDTO.ts b/src/infrastructure/model/hashLockTransactionDTO.ts deleted file mode 100644 index 780e07bf71..0000000000 --- a/src/infrastructure/model/hashLockTransactionDTO.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { HashLockTransactionBodyDTO } from './hashLockTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to lock funds before sending an aggregate bonded transaction. -*/ -export class HashLockTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - 'hash': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "hash", - "baseName": "hash", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return HashLockTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/heightInfoDTO.ts b/src/infrastructure/model/heightInfoDTO.ts deleted file mode 100644 index 6ff5e02393..0000000000 --- a/src/infrastructure/model/heightInfoDTO.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class HeightInfoDTO { - /** - * Height of the blockchain. - */ - 'height': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "height", - "baseName": "height", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return HeightInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/inflationReceiptDTO.ts b/src/infrastructure/model/inflationReceiptDTO.ts deleted file mode 100644 index 99bb825331..0000000000 --- a/src/infrastructure/model/inflationReceiptDTO.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { InflationReceiptDTOAllOf } from './inflationReceiptDTOAllOf'; -import { ReceiptDTO } from './receiptDTO'; -import { ReceiptTypeEnum } from './receiptTypeEnum'; - -/** -* Native currency mosaics that were created due to inflation. -*/ -export class InflationReceiptDTO { - /** - * Version of the receipt. - */ - 'version': number; - 'type': ReceiptTypeEnum; - /** - * Mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "ReceiptTypeEnum" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return InflationReceiptDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/inflationReceiptDTOAllOf.ts b/src/infrastructure/model/inflationReceiptDTOAllOf.ts deleted file mode 100644 index c0e0708fd9..0000000000 --- a/src/infrastructure/model/inflationReceiptDTOAllOf.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class InflationReceiptDTOAllOf { - /** - * Mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return InflationReceiptDTOAllOf.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/lockHashAlgorithmEnum.ts b/src/infrastructure/model/lockHashAlgorithmEnum.ts deleted file mode 100644 index af8578e3c6..0000000000 --- a/src/infrastructure/model/lockHashAlgorithmEnum.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Algorithm used to hash te proof: * 0 (Op_Sha3_256) - Proof is hashed using SHA3-256. - * 1 (Op_Keccak_256) - Proof is hashed using Keccak (ETH compatibility). - * 2 (Op_Hash_160) - Proof is hashed twice: first with SHA-256 and then with RIPEMD-160 (bitcoin\'s OP_HASH160). - * 3 (Op_Hash_256) - Proof is hashed twice with SHA3-256 (bitcoin\'s OP_HASH256). - */ -export enum LockHashAlgorithmEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_3 = 3, -} diff --git a/src/infrastructure/model/merklePathItemDTO.ts b/src/infrastructure/model/merklePathItemDTO.ts deleted file mode 100644 index 43c3a6b4e6..0000000000 --- a/src/infrastructure/model/merklePathItemDTO.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MerklePathItemDTO { - 'position'?: number; - 'hash'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "position", - "baseName": "position", - "type": "number" - }, - { - "name": "hash", - "baseName": "hash", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MerklePathItemDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/merkleProofInfoDTO.ts b/src/infrastructure/model/merkleProofInfoDTO.ts deleted file mode 100644 index 9c7bb7f03d..0000000000 --- a/src/infrastructure/model/merkleProofInfoDTO.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MerklePathItemDTO } from './merklePathItemDTO'; - -export class MerkleProofInfoDTO { - /** - * Complementary data needed to calculate the merkle root. - */ - 'merklePath'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "merklePath", - "baseName": "merklePath", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MerkleProofInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/messageDTO.ts b/src/infrastructure/model/messageDTO.ts deleted file mode 100644 index 9d3f9059ac..0000000000 --- a/src/infrastructure/model/messageDTO.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MessageTypeEnum } from './messageTypeEnum'; - -export class MessageDTO { - 'type': MessageTypeEnum; - /** - * Content of the message in hexadecimal. - */ - 'payload': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "type", - "baseName": "type", - "type": "MessageTypeEnum" - }, - { - "name": "payload", - "baseName": "payload", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MessageDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/messageTypeEnum.ts b/src/infrastructure/model/messageTypeEnum.ts deleted file mode 100644 index b5d794dbb6..0000000000 --- a/src/infrastructure/model/messageTypeEnum.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Type of message: * 0 - Regular message. * 1 - Encrypted message. * 254 - Persistent harvesting delegation. - */ -export enum MessageTypeEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_254 = 254, -} diff --git a/src/infrastructure/model/metadataDTO.ts b/src/infrastructure/model/metadataDTO.ts deleted file mode 100644 index 3b9056dab5..0000000000 --- a/src/infrastructure/model/metadataDTO.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MetadataEntryDTO } from './metadataEntryDTO'; - -export class MetadataDTO { - 'id': string; - 'metadataEntry': MetadataEntryDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "metadataEntry", - "baseName": "metadataEntry", - "type": "MetadataEntryDTO" - } ]; - - static getAttributeTypeMap() { - return MetadataDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/metadataEntriesDTO.ts b/src/infrastructure/model/metadataEntriesDTO.ts deleted file mode 100644 index 77cea364ec..0000000000 --- a/src/infrastructure/model/metadataEntriesDTO.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MetadataDTO } from './metadataDTO'; - -export class MetadataEntriesDTO { - /** - * Array of account metadata. - */ - 'metadataEntries': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "metadataEntries", - "baseName": "metadataEntries", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MetadataEntriesDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/metadataEntryDTO.ts b/src/infrastructure/model/metadataEntryDTO.ts deleted file mode 100644 index 9424232573..0000000000 --- a/src/infrastructure/model/metadataEntryDTO.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MetadataTypeEnum } from './metadataTypeEnum'; - -export class MetadataEntryDTO { - 'compositeHash': string; - 'senderPublicKey': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - 'targetId'?: any; - 'metadataType': MetadataTypeEnum; - /** - * Metadata value. - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "compositeHash", - "baseName": "compositeHash", - "type": "string" - }, - { - "name": "senderPublicKey", - "baseName": "senderPublicKey", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "targetId", - "baseName": "targetId", - "type": "any" - }, - { - "name": "metadataType", - "baseName": "metadataType", - "type": "MetadataTypeEnum" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MetadataEntryDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/metadataTypeEnum.ts b/src/infrastructure/model/metadataTypeEnum.ts deleted file mode 100644 index 6a9b3f8170..0000000000 --- a/src/infrastructure/model/metadataTypeEnum.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Metadata type: * 0 - Account. * 1 - Mosaic. * 2 - Namespace. - */ -export enum MetadataTypeEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2, -} diff --git a/src/infrastructure/model/modelError.ts b/src/infrastructure/model/modelError.ts deleted file mode 100644 index 5e8ce3ae24..0000000000 --- a/src/infrastructure/model/modelError.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ModelError { - 'code': string; - 'message': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "code", - "baseName": "code", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ModelError.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/models.ts b/src/infrastructure/model/models.ts deleted file mode 100644 index 3371f08090..0000000000 --- a/src/infrastructure/model/models.ts +++ /dev/null @@ -1,682 +0,0 @@ -export * from './accountAddressRestrictionTransactionBodyDTO'; -export * from './accountAddressRestrictionTransactionDTO'; -export * from './accountDTO'; -export * from './accountIds'; -export * from './accountInfoDTO'; -export * from './accountLinkActionEnum'; -export * from './accountLinkTransactionBodyDTO'; -export * from './accountLinkTransactionDTO'; -export * from './accountMetadataTransactionBodyDTO'; -export * from './accountMetadataTransactionDTO'; -export * from './accountMosaicRestrictionTransactionBodyDTO'; -export * from './accountMosaicRestrictionTransactionDTO'; -export * from './accountNamesDTO'; -export * from './accountOperationRestrictionTransactionBodyDTO'; -export * from './accountOperationRestrictionTransactionDTO'; -export * from './accountRestrictionDTO'; -export * from './accountRestrictionFlagsEnum'; -export * from './accountRestrictionsDTO'; -export * from './accountRestrictionsInfoDTO'; -export * from './accountTypeEnum'; -export * from './accountsNamesDTO'; -export * from './activityBucketDTO'; -export * from './addressAliasTransactionBodyDTO'; -export * from './addressAliasTransactionDTO'; -export * from './aggregateTransactionBodyDTO'; -export * from './aggregateTransactionDTO'; -export * from './aliasActionEnum'; -export * from './aliasDTO'; -export * from './aliasTypeEnum'; -export * from './announceTransactionInfoDTO'; -export * from './balanceChangeReceiptDTO'; -export * from './balanceChangeReceiptDTOAllOf'; -export * from './balanceTransferReceiptDTO'; -export * from './balanceTransferReceiptDTOAllOf'; -export * from './blockDTO'; -export * from './blockDTOAllOf'; -export * from './blockInfoDTO'; -export * from './blockMetaDTO'; -export * from './chainScoreDTO'; -export * from './communicationTimestampsDTO'; -export * from './cosignature'; -export * from './cosignatureDTO'; -export * from './cosignatureDTOAllOf'; -export * from './embeddedAccountAddressRestrictionTransactionDTO'; -export * from './embeddedAccountLinkTransactionDTO'; -export * from './embeddedAccountMetadataTransactionDTO'; -export * from './embeddedAccountMosaicRestrictionTransactionDTO'; -export * from './embeddedAccountOperationRestrictionTransactionDTO'; -export * from './embeddedAddressAliasTransactionDTO'; -export * from './embeddedHashLockTransactionDTO'; -export * from './embeddedMosaicAddressRestrictionTransactionDTO'; -export * from './embeddedMosaicAliasTransactionDTO'; -export * from './embeddedMosaicDefinitionTransactionDTO'; -export * from './embeddedMosaicGlobalRestrictionTransactionDTO'; -export * from './embeddedMosaicMetadataTransactionDTO'; -export * from './embeddedMosaicSupplyChangeTransactionDTO'; -export * from './embeddedMultisigAccountModificationTransactionDTO'; -export * from './embeddedNamespaceMetadataTransactionDTO'; -export * from './embeddedNamespaceRegistrationTransactionDTO'; -export * from './embeddedSecretLockTransactionDTO'; -export * from './embeddedSecretProofTransactionDTO'; -export * from './embeddedTransactionDTO'; -export * from './embeddedTransactionInfoDTO'; -export * from './embeddedTransactionMetaDTO'; -export * from './embeddedTransferTransactionDTO'; -export * from './entityDTO'; -export * from './hashLockTransactionBodyDTO'; -export * from './hashLockTransactionDTO'; -export * from './heightInfoDTO'; -export * from './inflationReceiptDTO'; -export * from './inflationReceiptDTOAllOf'; -export * from './lockHashAlgorithmEnum'; -export * from './merklePathItemDTO'; -export * from './merkleProofInfoDTO'; -export * from './messageDTO'; -export * from './messageTypeEnum'; -export * from './metadataDTO'; -export * from './metadataEntriesDTO'; -export * from './metadataEntryDTO'; -export * from './metadataTypeEnum'; -export * from './modelError'; -export * from './mosaic'; -export * from './mosaicAddressRestrictionDTO'; -export * from './mosaicAddressRestrictionEntryDTO'; -export * from './mosaicAddressRestrictionEntryWrapperDTO'; -export * from './mosaicAddressRestrictionTransactionBodyDTO'; -export * from './mosaicAddressRestrictionTransactionDTO'; -export * from './mosaicAliasTransactionBodyDTO'; -export * from './mosaicAliasTransactionDTO'; -export * from './mosaicDTO'; -export * from './mosaicDefinitionTransactionBodyDTO'; -export * from './mosaicDefinitionTransactionDTO'; -export * from './mosaicExpiryReceiptDTO'; -export * from './mosaicExpiryReceiptDTOAllOf'; -export * from './mosaicGlobalRestrictionDTO'; -export * from './mosaicGlobalRestrictionEntryDTO'; -export * from './mosaicGlobalRestrictionEntryRestrictionDTO'; -export * from './mosaicGlobalRestrictionEntryWrapperDTO'; -export * from './mosaicGlobalRestrictionTransactionBodyDTO'; -export * from './mosaicGlobalRestrictionTransactionDTO'; -export * from './mosaicIds'; -export * from './mosaicInfoDTO'; -export * from './mosaicMetadataTransactionBodyDTO'; -export * from './mosaicMetadataTransactionDTO'; -export * from './mosaicNamesDTO'; -export * from './mosaicRestrictionEntryTypeEnum'; -export * from './mosaicRestrictionTypeEnum'; -export * from './mosaicSupplyChangeActionEnum'; -export * from './mosaicSupplyChangeTransactionBodyDTO'; -export * from './mosaicSupplyChangeTransactionDTO'; -export * from './mosaicsInfoDTO'; -export * from './mosaicsNamesDTO'; -export * from './multisigAccountGraphInfoDTO'; -export * from './multisigAccountInfoDTO'; -export * from './multisigAccountModificationTransactionBodyDTO'; -export * from './multisigAccountModificationTransactionDTO'; -export * from './multisigDTO'; -export * from './namespaceDTO'; -export * from './namespaceExpiryReceiptDTO'; -export * from './namespaceExpiryReceiptDTOAllOf'; -export * from './namespaceIds'; -export * from './namespaceInfoDTO'; -export * from './namespaceMetaDTO'; -export * from './namespaceMetadataTransactionBodyDTO'; -export * from './namespaceMetadataTransactionDTO'; -export * from './namespaceNameDTO'; -export * from './namespaceRegistrationTransactionBodyDTO'; -export * from './namespaceRegistrationTransactionDTO'; -export * from './namespaceRegistrationTypeEnum'; -export * from './namespacesInfoDTO'; -export * from './networkTypeDTO'; -export * from './networkTypeEnum'; -export * from './nodeInfoDTO'; -export * from './nodeTimeDTO'; -export * from './receiptDTO'; -export * from './receiptTypeEnum'; -export * from './resolutionEntryDTO'; -export * from './resolutionStatementBodyDTO'; -export * from './resolutionStatementDTO'; -export * from './rolesTypeEnum'; -export * from './secretLockTransactionBodyDTO'; -export * from './secretLockTransactionDTO'; -export * from './secretProofTransactionBodyDTO'; -export * from './secretProofTransactionDTO'; -export * from './serverDTO'; -export * from './serverInfoDTO'; -export * from './sourceDTO'; -export * from './statementsDTO'; -export * from './storageInfoDTO'; -export * from './transactionBodyDTO'; -export * from './transactionDTO'; -export * from './transactionHashes'; -export * from './transactionIds'; -export * from './transactionInfoDTO'; -export * from './transactionMetaDTO'; -export * from './transactionPayload'; -export * from './transactionStateTypeEnum'; -export * from './transactionStatementBodyDTO'; -export * from './transactionStatementDTO'; -export * from './transactionStatusDTO'; -export * from './transactionStatusTypeEnum'; -export * from './transactionTypeEnum'; -export * from './transferTransactionBodyDTO'; -export * from './transferTransactionDTO'; -export * from './unresolvedMosaic'; -export * from './verifiableEntityDTO'; - -import localVarRequest = require('request'); - -import { AccountAddressRestrictionTransactionBodyDTO } from './accountAddressRestrictionTransactionBodyDTO'; -import { AccountAddressRestrictionTransactionDTO } from './accountAddressRestrictionTransactionDTO'; -import { AccountDTO } from './accountDTO'; -import { AccountIds } from './accountIds'; -import { AccountInfoDTO } from './accountInfoDTO'; -import { AccountLinkActionEnum } from './accountLinkActionEnum'; -import { AccountLinkTransactionBodyDTO } from './accountLinkTransactionBodyDTO'; -import { AccountLinkTransactionDTO } from './accountLinkTransactionDTO'; -import { AccountMetadataTransactionBodyDTO } from './accountMetadataTransactionBodyDTO'; -import { AccountMetadataTransactionDTO } from './accountMetadataTransactionDTO'; -import { AccountMosaicRestrictionTransactionBodyDTO } from './accountMosaicRestrictionTransactionBodyDTO'; -import { AccountMosaicRestrictionTransactionDTO } from './accountMosaicRestrictionTransactionDTO'; -import { AccountNamesDTO } from './accountNamesDTO'; -import { AccountOperationRestrictionTransactionBodyDTO } from './accountOperationRestrictionTransactionBodyDTO'; -import { AccountOperationRestrictionTransactionDTO } from './accountOperationRestrictionTransactionDTO'; -import { AccountRestrictionDTO } from './accountRestrictionDTO'; -import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; -import { AccountRestrictionsDTO } from './accountRestrictionsDTO'; -import { AccountRestrictionsInfoDTO } from './accountRestrictionsInfoDTO'; -import { AccountTypeEnum } from './accountTypeEnum'; -import { AccountsNamesDTO } from './accountsNamesDTO'; -import { ActivityBucketDTO } from './activityBucketDTO'; -import { AddressAliasTransactionBodyDTO } from './addressAliasTransactionBodyDTO'; -import { AddressAliasTransactionDTO } from './addressAliasTransactionDTO'; -import { AggregateTransactionBodyDTO } from './aggregateTransactionBodyDTO'; -import { AggregateTransactionDTO } from './aggregateTransactionDTO'; -import { AliasActionEnum } from './aliasActionEnum'; -import { AliasDTO } from './aliasDTO'; -import { AliasTypeEnum } from './aliasTypeEnum'; -import { AnnounceTransactionInfoDTO } from './announceTransactionInfoDTO'; -import { BalanceChangeReceiptDTO } from './balanceChangeReceiptDTO'; -import { BalanceChangeReceiptDTOAllOf } from './balanceChangeReceiptDTOAllOf'; -import { BalanceTransferReceiptDTO } from './balanceTransferReceiptDTO'; -import { BalanceTransferReceiptDTOAllOf } from './balanceTransferReceiptDTOAllOf'; -import { BlockDTO } from './blockDTO'; -import { BlockDTOAllOf } from './blockDTOAllOf'; -import { BlockInfoDTO } from './blockInfoDTO'; -import { BlockMetaDTO } from './blockMetaDTO'; -import { ChainScoreDTO } from './chainScoreDTO'; -import { CommunicationTimestampsDTO } from './communicationTimestampsDTO'; -import { Cosignature } from './cosignature'; -import { CosignatureDTO } from './cosignatureDTO'; -import { CosignatureDTOAllOf } from './cosignatureDTOAllOf'; -import { EmbeddedAccountAddressRestrictionTransactionDTO } from './embeddedAccountAddressRestrictionTransactionDTO'; -import { EmbeddedAccountLinkTransactionDTO } from './embeddedAccountLinkTransactionDTO'; -import { EmbeddedAccountMetadataTransactionDTO } from './embeddedAccountMetadataTransactionDTO'; -import { EmbeddedAccountMosaicRestrictionTransactionDTO } from './embeddedAccountMosaicRestrictionTransactionDTO'; -import { EmbeddedAccountOperationRestrictionTransactionDTO } from './embeddedAccountOperationRestrictionTransactionDTO'; -import { EmbeddedAddressAliasTransactionDTO } from './embeddedAddressAliasTransactionDTO'; -import { EmbeddedHashLockTransactionDTO } from './embeddedHashLockTransactionDTO'; -import { EmbeddedMosaicAddressRestrictionTransactionDTO } from './embeddedMosaicAddressRestrictionTransactionDTO'; -import { EmbeddedMosaicAliasTransactionDTO } from './embeddedMosaicAliasTransactionDTO'; -import { EmbeddedMosaicDefinitionTransactionDTO } from './embeddedMosaicDefinitionTransactionDTO'; -import { EmbeddedMosaicGlobalRestrictionTransactionDTO } from './embeddedMosaicGlobalRestrictionTransactionDTO'; -import { EmbeddedMosaicMetadataTransactionDTO } from './embeddedMosaicMetadataTransactionDTO'; -import { EmbeddedMosaicSupplyChangeTransactionDTO } from './embeddedMosaicSupplyChangeTransactionDTO'; -import { EmbeddedMultisigAccountModificationTransactionDTO } from './embeddedMultisigAccountModificationTransactionDTO'; -import { EmbeddedNamespaceMetadataTransactionDTO } from './embeddedNamespaceMetadataTransactionDTO'; -import { EmbeddedNamespaceRegistrationTransactionDTO } from './embeddedNamespaceRegistrationTransactionDTO'; -import { EmbeddedSecretLockTransactionDTO } from './embeddedSecretLockTransactionDTO'; -import { EmbeddedSecretProofTransactionDTO } from './embeddedSecretProofTransactionDTO'; -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { EmbeddedTransactionInfoDTO } from './embeddedTransactionInfoDTO'; -import { EmbeddedTransactionMetaDTO } from './embeddedTransactionMetaDTO'; -import { EmbeddedTransferTransactionDTO } from './embeddedTransferTransactionDTO'; -import { EntityDTO } from './entityDTO'; -import { HashLockTransactionBodyDTO } from './hashLockTransactionBodyDTO'; -import { HashLockTransactionDTO } from './hashLockTransactionDTO'; -import { HeightInfoDTO } from './heightInfoDTO'; -import { InflationReceiptDTO } from './inflationReceiptDTO'; -import { InflationReceiptDTOAllOf } from './inflationReceiptDTOAllOf'; -import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; -import { MerklePathItemDTO } from './merklePathItemDTO'; -import { MerkleProofInfoDTO } from './merkleProofInfoDTO'; -import { MessageDTO } from './messageDTO'; -import { MessageTypeEnum } from './messageTypeEnum'; -import { MetadataDTO } from './metadataDTO'; -import { MetadataEntriesDTO } from './metadataEntriesDTO'; -import { MetadataEntryDTO } from './metadataEntryDTO'; -import { MetadataTypeEnum } from './metadataTypeEnum'; -import { ModelError } from './modelError'; -import { Mosaic } from './mosaic'; -import { MosaicAddressRestrictionDTO } from './mosaicAddressRestrictionDTO'; -import { MosaicAddressRestrictionEntryDTO } from './mosaicAddressRestrictionEntryDTO'; -import { MosaicAddressRestrictionEntryWrapperDTO } from './mosaicAddressRestrictionEntryWrapperDTO'; -import { MosaicAddressRestrictionTransactionBodyDTO } from './mosaicAddressRestrictionTransactionBodyDTO'; -import { MosaicAddressRestrictionTransactionDTO } from './mosaicAddressRestrictionTransactionDTO'; -import { MosaicAliasTransactionBodyDTO } from './mosaicAliasTransactionBodyDTO'; -import { MosaicAliasTransactionDTO } from './mosaicAliasTransactionDTO'; -import { MosaicDTO } from './mosaicDTO'; -import { MosaicDefinitionTransactionBodyDTO } from './mosaicDefinitionTransactionBodyDTO'; -import { MosaicDefinitionTransactionDTO } from './mosaicDefinitionTransactionDTO'; -import { MosaicExpiryReceiptDTO } from './mosaicExpiryReceiptDTO'; -import { MosaicExpiryReceiptDTOAllOf } from './mosaicExpiryReceiptDTOAllOf'; -import { MosaicGlobalRestrictionDTO } from './mosaicGlobalRestrictionDTO'; -import { MosaicGlobalRestrictionEntryDTO } from './mosaicGlobalRestrictionEntryDTO'; -import { MosaicGlobalRestrictionEntryRestrictionDTO } from './mosaicGlobalRestrictionEntryRestrictionDTO'; -import { MosaicGlobalRestrictionEntryWrapperDTO } from './mosaicGlobalRestrictionEntryWrapperDTO'; -import { MosaicGlobalRestrictionTransactionBodyDTO } from './mosaicGlobalRestrictionTransactionBodyDTO'; -import { MosaicGlobalRestrictionTransactionDTO } from './mosaicGlobalRestrictionTransactionDTO'; -import { MosaicIds } from './mosaicIds'; -import { MosaicInfoDTO } from './mosaicInfoDTO'; -import { MosaicMetadataTransactionBodyDTO } from './mosaicMetadataTransactionBodyDTO'; -import { MosaicMetadataTransactionDTO } from './mosaicMetadataTransactionDTO'; -import { MosaicNamesDTO } from './mosaicNamesDTO'; -import { MosaicRestrictionEntryTypeEnum } from './mosaicRestrictionEntryTypeEnum'; -import { MosaicRestrictionTypeEnum } from './mosaicRestrictionTypeEnum'; -import { MosaicSupplyChangeActionEnum } from './mosaicSupplyChangeActionEnum'; -import { MosaicSupplyChangeTransactionBodyDTO } from './mosaicSupplyChangeTransactionBodyDTO'; -import { MosaicSupplyChangeTransactionDTO } from './mosaicSupplyChangeTransactionDTO'; -import { MosaicsInfoDTO } from './mosaicsInfoDTO'; -import { MosaicsNamesDTO } from './mosaicsNamesDTO'; -import { MultisigAccountGraphInfoDTO } from './multisigAccountGraphInfoDTO'; -import { MultisigAccountInfoDTO } from './multisigAccountInfoDTO'; -import { MultisigAccountModificationTransactionBodyDTO } from './multisigAccountModificationTransactionBodyDTO'; -import { MultisigAccountModificationTransactionDTO } from './multisigAccountModificationTransactionDTO'; -import { MultisigDTO } from './multisigDTO'; -import { NamespaceDTO } from './namespaceDTO'; -import { NamespaceExpiryReceiptDTO } from './namespaceExpiryReceiptDTO'; -import { NamespaceExpiryReceiptDTOAllOf } from './namespaceExpiryReceiptDTOAllOf'; -import { NamespaceIds } from './namespaceIds'; -import { NamespaceInfoDTO } from './namespaceInfoDTO'; -import { NamespaceMetaDTO } from './namespaceMetaDTO'; -import { NamespaceMetadataTransactionBodyDTO } from './namespaceMetadataTransactionBodyDTO'; -import { NamespaceMetadataTransactionDTO } from './namespaceMetadataTransactionDTO'; -import { NamespaceNameDTO } from './namespaceNameDTO'; -import { NamespaceRegistrationTransactionBodyDTO } from './namespaceRegistrationTransactionBodyDTO'; -import { NamespaceRegistrationTransactionDTO } from './namespaceRegistrationTransactionDTO'; -import { NamespaceRegistrationTypeEnum } from './namespaceRegistrationTypeEnum'; -import { NamespacesInfoDTO } from './namespacesInfoDTO'; -import { NetworkTypeDTO } from './networkTypeDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { NodeInfoDTO } from './nodeInfoDTO'; -import { NodeTimeDTO } from './nodeTimeDTO'; -import { ReceiptDTO } from './receiptDTO'; -import { ReceiptTypeEnum } from './receiptTypeEnum'; -import { ResolutionEntryDTO } from './resolutionEntryDTO'; -import { ResolutionStatementBodyDTO } from './resolutionStatementBodyDTO'; -import { ResolutionStatementDTO } from './resolutionStatementDTO'; -import { RolesTypeEnum } from './rolesTypeEnum'; -import { SecretLockTransactionBodyDTO } from './secretLockTransactionBodyDTO'; -import { SecretLockTransactionDTO } from './secretLockTransactionDTO'; -import { SecretProofTransactionBodyDTO } from './secretProofTransactionBodyDTO'; -import { SecretProofTransactionDTO } from './secretProofTransactionDTO'; -import { ServerDTO } from './serverDTO'; -import { ServerInfoDTO } from './serverInfoDTO'; -import { SourceDTO } from './sourceDTO'; -import { StatementsDTO } from './statementsDTO'; -import { StorageInfoDTO } from './storageInfoDTO'; -import { TransactionBodyDTO } from './transactionBodyDTO'; -import { TransactionDTO } from './transactionDTO'; -import { TransactionHashes } from './transactionHashes'; -import { TransactionIds } from './transactionIds'; -import { TransactionInfoDTO } from './transactionInfoDTO'; -import { TransactionMetaDTO } from './transactionMetaDTO'; -import { TransactionPayload } from './transactionPayload'; -import { TransactionStateTypeEnum } from './transactionStateTypeEnum'; -import { TransactionStatementBodyDTO } from './transactionStatementBodyDTO'; -import { TransactionStatementDTO } from './transactionStatementDTO'; -import { TransactionStatusDTO } from './transactionStatusDTO'; -import { TransactionStatusTypeEnum } from './transactionStatusTypeEnum'; -import { TransactionTypeEnum } from './transactionTypeEnum'; -import { TransferTransactionBodyDTO } from './transferTransactionBodyDTO'; -import { TransferTransactionDTO } from './transferTransactionDTO'; -import { UnresolvedMosaic } from './unresolvedMosaic'; -import { VerifiableEntityDTO } from './verifiableEntityDTO'; - -/* tslint:disable:no-unused-variable */ -let primitives = [ - "string", - "boolean", - "double", - "integer", - "long", - "float", - "number", - "any" - ]; - -let enumsMap: {[index: string]: any} = { - "AccountLinkActionEnum": AccountLinkActionEnum, - "AccountRestrictionFlagsEnum": AccountRestrictionFlagsEnum, - "AccountTypeEnum": AccountTypeEnum, - "AliasActionEnum": AliasActionEnum, - "AliasTypeEnum": AliasTypeEnum, - "LockHashAlgorithmEnum": LockHashAlgorithmEnum, - "MessageTypeEnum": MessageTypeEnum, - "MetadataTypeEnum": MetadataTypeEnum, - "MosaicRestrictionEntryTypeEnum": MosaicRestrictionEntryTypeEnum, - "MosaicRestrictionTypeEnum": MosaicRestrictionTypeEnum, - "MosaicSupplyChangeActionEnum": MosaicSupplyChangeActionEnum, - "NamespaceRegistrationTypeEnum": NamespaceRegistrationTypeEnum, - "NetworkTypeEnum": NetworkTypeEnum, - "ReceiptTypeEnum": ReceiptTypeEnum, - "RolesTypeEnum": RolesTypeEnum, - "TransactionStateTypeEnum": TransactionStateTypeEnum, - "TransactionStatusTypeEnum": TransactionStatusTypeEnum, - "TransactionTypeEnum": TransactionTypeEnum, -} - -let typeMap: {[index: string]: any} = { - "AccountAddressRestrictionTransactionBodyDTO": AccountAddressRestrictionTransactionBodyDTO, - "AccountAddressRestrictionTransactionDTO": AccountAddressRestrictionTransactionDTO, - "AccountDTO": AccountDTO, - "AccountIds": AccountIds, - "AccountInfoDTO": AccountInfoDTO, - "AccountLinkTransactionBodyDTO": AccountLinkTransactionBodyDTO, - "AccountLinkTransactionDTO": AccountLinkTransactionDTO, - "AccountMetadataTransactionBodyDTO": AccountMetadataTransactionBodyDTO, - "AccountMetadataTransactionDTO": AccountMetadataTransactionDTO, - "AccountMosaicRestrictionTransactionBodyDTO": AccountMosaicRestrictionTransactionBodyDTO, - "AccountMosaicRestrictionTransactionDTO": AccountMosaicRestrictionTransactionDTO, - "AccountNamesDTO": AccountNamesDTO, - "AccountOperationRestrictionTransactionBodyDTO": AccountOperationRestrictionTransactionBodyDTO, - "AccountOperationRestrictionTransactionDTO": AccountOperationRestrictionTransactionDTO, - "AccountRestrictionDTO": AccountRestrictionDTO, - "AccountRestrictionsDTO": AccountRestrictionsDTO, - "AccountRestrictionsInfoDTO": AccountRestrictionsInfoDTO, - "AccountsNamesDTO": AccountsNamesDTO, - "ActivityBucketDTO": ActivityBucketDTO, - "AddressAliasTransactionBodyDTO": AddressAliasTransactionBodyDTO, - "AddressAliasTransactionDTO": AddressAliasTransactionDTO, - "AggregateTransactionBodyDTO": AggregateTransactionBodyDTO, - "AggregateTransactionDTO": AggregateTransactionDTO, - "AliasDTO": AliasDTO, - "AnnounceTransactionInfoDTO": AnnounceTransactionInfoDTO, - "BalanceChangeReceiptDTO": BalanceChangeReceiptDTO, - "BalanceChangeReceiptDTOAllOf": BalanceChangeReceiptDTOAllOf, - "BalanceTransferReceiptDTO": BalanceTransferReceiptDTO, - "BalanceTransferReceiptDTOAllOf": BalanceTransferReceiptDTOAllOf, - "BlockDTO": BlockDTO, - "BlockDTOAllOf": BlockDTOAllOf, - "BlockInfoDTO": BlockInfoDTO, - "BlockMetaDTO": BlockMetaDTO, - "ChainScoreDTO": ChainScoreDTO, - "CommunicationTimestampsDTO": CommunicationTimestampsDTO, - "Cosignature": Cosignature, - "CosignatureDTO": CosignatureDTO, - "CosignatureDTOAllOf": CosignatureDTOAllOf, - "EmbeddedAccountAddressRestrictionTransactionDTO": EmbeddedAccountAddressRestrictionTransactionDTO, - "EmbeddedAccountLinkTransactionDTO": EmbeddedAccountLinkTransactionDTO, - "EmbeddedAccountMetadataTransactionDTO": EmbeddedAccountMetadataTransactionDTO, - "EmbeddedAccountMosaicRestrictionTransactionDTO": EmbeddedAccountMosaicRestrictionTransactionDTO, - "EmbeddedAccountOperationRestrictionTransactionDTO": EmbeddedAccountOperationRestrictionTransactionDTO, - "EmbeddedAddressAliasTransactionDTO": EmbeddedAddressAliasTransactionDTO, - "EmbeddedHashLockTransactionDTO": EmbeddedHashLockTransactionDTO, - "EmbeddedMosaicAddressRestrictionTransactionDTO": EmbeddedMosaicAddressRestrictionTransactionDTO, - "EmbeddedMosaicAliasTransactionDTO": EmbeddedMosaicAliasTransactionDTO, - "EmbeddedMosaicDefinitionTransactionDTO": EmbeddedMosaicDefinitionTransactionDTO, - "EmbeddedMosaicGlobalRestrictionTransactionDTO": EmbeddedMosaicGlobalRestrictionTransactionDTO, - "EmbeddedMosaicMetadataTransactionDTO": EmbeddedMosaicMetadataTransactionDTO, - "EmbeddedMosaicSupplyChangeTransactionDTO": EmbeddedMosaicSupplyChangeTransactionDTO, - "EmbeddedMultisigAccountModificationTransactionDTO": EmbeddedMultisigAccountModificationTransactionDTO, - "EmbeddedNamespaceMetadataTransactionDTO": EmbeddedNamespaceMetadataTransactionDTO, - "EmbeddedNamespaceRegistrationTransactionDTO": EmbeddedNamespaceRegistrationTransactionDTO, - "EmbeddedSecretLockTransactionDTO": EmbeddedSecretLockTransactionDTO, - "EmbeddedSecretProofTransactionDTO": EmbeddedSecretProofTransactionDTO, - "EmbeddedTransactionDTO": EmbeddedTransactionDTO, - "EmbeddedTransactionInfoDTO": EmbeddedTransactionInfoDTO, - "EmbeddedTransactionMetaDTO": EmbeddedTransactionMetaDTO, - "EmbeddedTransferTransactionDTO": EmbeddedTransferTransactionDTO, - "EntityDTO": EntityDTO, - "HashLockTransactionBodyDTO": HashLockTransactionBodyDTO, - "HashLockTransactionDTO": HashLockTransactionDTO, - "HeightInfoDTO": HeightInfoDTO, - "InflationReceiptDTO": InflationReceiptDTO, - "InflationReceiptDTOAllOf": InflationReceiptDTOAllOf, - "MerklePathItemDTO": MerklePathItemDTO, - "MerkleProofInfoDTO": MerkleProofInfoDTO, - "MessageDTO": MessageDTO, - "MetadataDTO": MetadataDTO, - "MetadataEntriesDTO": MetadataEntriesDTO, - "MetadataEntryDTO": MetadataEntryDTO, - "ModelError": ModelError, - "Mosaic": Mosaic, - "MosaicAddressRestrictionDTO": MosaicAddressRestrictionDTO, - "MosaicAddressRestrictionEntryDTO": MosaicAddressRestrictionEntryDTO, - "MosaicAddressRestrictionEntryWrapperDTO": MosaicAddressRestrictionEntryWrapperDTO, - "MosaicAddressRestrictionTransactionBodyDTO": MosaicAddressRestrictionTransactionBodyDTO, - "MosaicAddressRestrictionTransactionDTO": MosaicAddressRestrictionTransactionDTO, - "MosaicAliasTransactionBodyDTO": MosaicAliasTransactionBodyDTO, - "MosaicAliasTransactionDTO": MosaicAliasTransactionDTO, - "MosaicDTO": MosaicDTO, - "MosaicDefinitionTransactionBodyDTO": MosaicDefinitionTransactionBodyDTO, - "MosaicDefinitionTransactionDTO": MosaicDefinitionTransactionDTO, - "MosaicExpiryReceiptDTO": MosaicExpiryReceiptDTO, - "MosaicExpiryReceiptDTOAllOf": MosaicExpiryReceiptDTOAllOf, - "MosaicGlobalRestrictionDTO": MosaicGlobalRestrictionDTO, - "MosaicGlobalRestrictionEntryDTO": MosaicGlobalRestrictionEntryDTO, - "MosaicGlobalRestrictionEntryRestrictionDTO": MosaicGlobalRestrictionEntryRestrictionDTO, - "MosaicGlobalRestrictionEntryWrapperDTO": MosaicGlobalRestrictionEntryWrapperDTO, - "MosaicGlobalRestrictionTransactionBodyDTO": MosaicGlobalRestrictionTransactionBodyDTO, - "MosaicGlobalRestrictionTransactionDTO": MosaicGlobalRestrictionTransactionDTO, - "MosaicIds": MosaicIds, - "MosaicInfoDTO": MosaicInfoDTO, - "MosaicMetadataTransactionBodyDTO": MosaicMetadataTransactionBodyDTO, - "MosaicMetadataTransactionDTO": MosaicMetadataTransactionDTO, - "MosaicNamesDTO": MosaicNamesDTO, - "MosaicSupplyChangeTransactionBodyDTO": MosaicSupplyChangeTransactionBodyDTO, - "MosaicSupplyChangeTransactionDTO": MosaicSupplyChangeTransactionDTO, - "MosaicsInfoDTO": MosaicsInfoDTO, - "MosaicsNamesDTO": MosaicsNamesDTO, - "MultisigAccountGraphInfoDTO": MultisigAccountGraphInfoDTO, - "MultisigAccountInfoDTO": MultisigAccountInfoDTO, - "MultisigAccountModificationTransactionBodyDTO": MultisigAccountModificationTransactionBodyDTO, - "MultisigAccountModificationTransactionDTO": MultisigAccountModificationTransactionDTO, - "MultisigDTO": MultisigDTO, - "NamespaceDTO": NamespaceDTO, - "NamespaceExpiryReceiptDTO": NamespaceExpiryReceiptDTO, - "NamespaceExpiryReceiptDTOAllOf": NamespaceExpiryReceiptDTOAllOf, - "NamespaceIds": NamespaceIds, - "NamespaceInfoDTO": NamespaceInfoDTO, - "NamespaceMetaDTO": NamespaceMetaDTO, - "NamespaceMetadataTransactionBodyDTO": NamespaceMetadataTransactionBodyDTO, - "NamespaceMetadataTransactionDTO": NamespaceMetadataTransactionDTO, - "NamespaceNameDTO": NamespaceNameDTO, - "NamespaceRegistrationTransactionBodyDTO": NamespaceRegistrationTransactionBodyDTO, - "NamespaceRegistrationTransactionDTO": NamespaceRegistrationTransactionDTO, - "NamespacesInfoDTO": NamespacesInfoDTO, - "NetworkTypeDTO": NetworkTypeDTO, - "NodeInfoDTO": NodeInfoDTO, - "NodeTimeDTO": NodeTimeDTO, - "ReceiptDTO": ReceiptDTO, - "ResolutionEntryDTO": ResolutionEntryDTO, - "ResolutionStatementBodyDTO": ResolutionStatementBodyDTO, - "ResolutionStatementDTO": ResolutionStatementDTO, - "SecretLockTransactionBodyDTO": SecretLockTransactionBodyDTO, - "SecretLockTransactionDTO": SecretLockTransactionDTO, - "SecretProofTransactionBodyDTO": SecretProofTransactionBodyDTO, - "SecretProofTransactionDTO": SecretProofTransactionDTO, - "ServerDTO": ServerDTO, - "ServerInfoDTO": ServerInfoDTO, - "SourceDTO": SourceDTO, - "StatementsDTO": StatementsDTO, - "StorageInfoDTO": StorageInfoDTO, - "TransactionBodyDTO": TransactionBodyDTO, - "TransactionDTO": TransactionDTO, - "TransactionHashes": TransactionHashes, - "TransactionIds": TransactionIds, - "TransactionInfoDTO": TransactionInfoDTO, - "TransactionMetaDTO": TransactionMetaDTO, - "TransactionPayload": TransactionPayload, - "TransactionStatementBodyDTO": TransactionStatementBodyDTO, - "TransactionStatementDTO": TransactionStatementDTO, - "TransactionStatusDTO": TransactionStatusDTO, - "TransferTransactionBodyDTO": TransferTransactionBodyDTO, - "TransferTransactionDTO": TransferTransactionDTO, - "UnresolvedMosaic": UnresolvedMosaic, - "VerifiableEntityDTO": VerifiableEntityDTO, -} - -export class ObjectSerializer { - public static findCorrectType(data: any, expectedType: string) { - if (data == undefined) { - return expectedType; - } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { - return expectedType; - } else if (expectedType === "Date") { - return expectedType; - } else { - if (enumsMap[expectedType]) { - return expectedType; - } - - if (!typeMap[expectedType]) { - return expectedType; // w/e we don't know the type - } - - // Check the discriminator - let discriminatorProperty = typeMap[expectedType].discriminator; - if (discriminatorProperty == null) { - return expectedType; // the type does not have a discriminator. use it. - } else { - if (data[discriminatorProperty]) { - var discriminatorType = data[discriminatorProperty]; - if(typeMap[discriminatorType]){ - return discriminatorType; // use the type given in the discriminator - } else { - return expectedType; // discriminator did not map to a type - } - } else { - return expectedType; // discriminator was not present (or an empty string) - } - } - } - } - - public static serialize(data: any, type: string) { - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.serialize(date, subType)); - } - return transformedData; - } else if (type === "Date") { - return data.toISOString(); - } else { - if (enumsMap[type]) { - return data; - } - if (!typeMap[type]) { // in case we dont know the type - return data; - } - - // Get the actual type of this object - type = this.findCorrectType(data, type); - - // get the map for the correct type. - let attributeTypes = typeMap[type].getAttributeTypeMap(); - let instance: {[index: string]: any} = {}; - for (let index in attributeTypes) { - let attributeType = attributeTypes[index]; - instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); - } - return instance; - } - } - - public static deserialize(data: any, type: string) { - // polymorphism may change the actual type. - type = ObjectSerializer.findCorrectType(data, type); - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.deserialize(date, subType)); - } - return transformedData; - } else if (type === "Date") { - return new Date(data); - } else { - if (enumsMap[type]) {// is Enum - return data; - } - - if (!typeMap[type]) { // dont know the type - return data; - } - let instance = new typeMap[type](); - let attributeTypes = typeMap[type].getAttributeTypeMap(); - for (let index in attributeTypes) { - let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); - } - return instance; - } - } -} - -export interface Authentication { - /** - * Apply authentication settings to header and query params. - */ - applyToRequest(requestOptions: localVarRequest.Options): Promise | void; -} - -export class HttpBasicAuth implements Authentication { - public username: string = ''; - public password: string = ''; - - applyToRequest(requestOptions: localVarRequest.Options): void { - requestOptions.auth = { - username: this.username, password: this.password - } - } -} - -export class ApiKeyAuth implements Authentication { - public apiKey: string = ''; - - constructor(private location: string, private paramName: string) { - } - - applyToRequest(requestOptions: localVarRequest.Options): void { - if (this.location == "query") { - (requestOptions.qs)[this.paramName] = this.apiKey; - } else if (this.location == "header" && requestOptions && requestOptions.headers) { - requestOptions.headers[this.paramName] = this.apiKey; - } - } -} - -export class OAuth implements Authentication { - public accessToken: string = ''; - - applyToRequest(requestOptions: localVarRequest.Options): void { - if (requestOptions && requestOptions.headers) { - requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; - } - } -} - -export class VoidAuth implements Authentication { - public username: string = ''; - public password: string = ''; - - applyToRequest(_: localVarRequest.Options): void { - // Do nothing - } -} \ No newline at end of file diff --git a/src/infrastructure/model/mosaic.ts b/src/infrastructure/model/mosaic.ts deleted file mode 100644 index 6db1f11529..0000000000 --- a/src/infrastructure/model/mosaic.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class Mosaic { - /** - * Mosaic identifier. - */ - 'id': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return Mosaic.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicAddressRestrictionDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionDTO.ts deleted file mode 100644 index 7cb6467d91..0000000000 --- a/src/infrastructure/model/mosaicAddressRestrictionDTO.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicAddressRestrictionEntryWrapperDTO } from './mosaicAddressRestrictionEntryWrapperDTO'; - -export class MosaicAddressRestrictionDTO { - 'mosaicRestrictionEntry': MosaicAddressRestrictionEntryWrapperDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicRestrictionEntry", - "baseName": "mosaicRestrictionEntry", - "type": "MosaicAddressRestrictionEntryWrapperDTO" - } ]; - - static getAttributeTypeMap() { - return MosaicAddressRestrictionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicAddressRestrictionEntryDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionEntryDTO.ts deleted file mode 100644 index ff74700521..0000000000 --- a/src/infrastructure/model/mosaicAddressRestrictionEntryDTO.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MosaicAddressRestrictionEntryDTO { - /** - * Restriction key. - */ - 'key': string; - /** - * Restriction value. - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MosaicAddressRestrictionEntryDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicAddressRestrictionEntryWrapperDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionEntryWrapperDTO.ts deleted file mode 100644 index 00ff94dc6c..0000000000 --- a/src/infrastructure/model/mosaicAddressRestrictionEntryWrapperDTO.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicAddressRestrictionEntryDTO } from './mosaicAddressRestrictionEntryDTO'; -import { MosaicRestrictionEntryTypeEnum } from './mosaicRestrictionEntryTypeEnum'; - -export class MosaicAddressRestrictionEntryWrapperDTO { - 'compositeHash': string; - 'entryType': MosaicRestrictionEntryTypeEnum; - /** - * Mosaic identifier. - */ - 'mosaicId': string; - /** - * Decoded address. - */ - 'targetAddress': string; - 'restrictions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "compositeHash", - "baseName": "compositeHash", - "type": "string" - }, - { - "name": "entryType", - "baseName": "entryType", - "type": "MosaicRestrictionEntryTypeEnum" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "targetAddress", - "baseName": "targetAddress", - "type": "string" - }, - { - "name": "restrictions", - "baseName": "restrictions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MosaicAddressRestrictionEntryWrapperDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicAddressRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionTransactionBodyDTO.ts deleted file mode 100644 index 1a33e8439f..0000000000 --- a/src/infrastructure/model/mosaicAddressRestrictionTransactionBodyDTO.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MosaicAddressRestrictionTransactionBodyDTO { - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Restriction key. - */ - 'restrictionKey': string; - /** - * A value in a restriction transaction. - */ - 'previousRestrictionValue': string; - /** - * A value in a restriction transaction. - */ - 'newRestrictionValue': string; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'targetAddress': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "restrictionKey", - "baseName": "restrictionKey", - "type": "string" - }, - { - "name": "previousRestrictionValue", - "baseName": "previousRestrictionValue", - "type": "string" - }, - { - "name": "newRestrictionValue", - "baseName": "newRestrictionValue", - "type": "string" - }, - { - "name": "targetAddress", - "baseName": "targetAddress", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MosaicAddressRestrictionTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicAddressRestrictionTransactionDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionTransactionDTO.ts deleted file mode 100644 index 4055562e4c..0000000000 --- a/src/infrastructure/model/mosaicAddressRestrictionTransactionDTO.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicAddressRestrictionTransactionBodyDTO } from './mosaicAddressRestrictionTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to set a restriction rule to an address. -*/ -export class MosaicAddressRestrictionTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Restriction key. - */ - 'restrictionKey': string; - /** - * A value in a restriction transaction. - */ - 'previousRestrictionValue': string; - /** - * A value in a restriction transaction. - */ - 'newRestrictionValue': string; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'targetAddress': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "restrictionKey", - "baseName": "restrictionKey", - "type": "string" - }, - { - "name": "previousRestrictionValue", - "baseName": "previousRestrictionValue", - "type": "string" - }, - { - "name": "newRestrictionValue", - "baseName": "newRestrictionValue", - "type": "string" - }, - { - "name": "targetAddress", - "baseName": "targetAddress", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MosaicAddressRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicAliasTransactionBodyDTO.ts b/src/infrastructure/model/mosaicAliasTransactionBodyDTO.ts deleted file mode 100644 index 70b6d8a21b..0000000000 --- a/src/infrastructure/model/mosaicAliasTransactionBodyDTO.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AliasActionEnum } from './aliasActionEnum'; - -export class MosaicAliasTransactionBodyDTO { - /** - * Namespace identifier. - */ - 'namespaceId': string; - /** - * Mosaic identifier. - */ - 'mosaicId': string; - 'aliasAction': AliasActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "namespaceId", - "baseName": "namespaceId", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - } ]; - - static getAttributeTypeMap() { - return MosaicAliasTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicAliasTransactionDTO.ts b/src/infrastructure/model/mosaicAliasTransactionDTO.ts deleted file mode 100644 index 84e6e1dd79..0000000000 --- a/src/infrastructure/model/mosaicAliasTransactionDTO.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AliasActionEnum } from './aliasActionEnum'; -import { MosaicAliasTransactionBodyDTO } from './mosaicAliasTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to link a namespace to a mosaic. -*/ -export class MosaicAliasTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Namespace identifier. - */ - 'namespaceId': string; - /** - * Mosaic identifier. - */ - 'mosaicId': string; - 'aliasAction': AliasActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "namespaceId", - "baseName": "namespaceId", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - } ]; - - static getAttributeTypeMap() { - return MosaicAliasTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicDTO.ts b/src/infrastructure/model/mosaicDTO.ts deleted file mode 100644 index bf6fe85621..0000000000 --- a/src/infrastructure/model/mosaicDTO.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MosaicDTO { - /** - * Mosaic identifier. - */ - 'id': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'supply': string; - /** - * Height of the blockchain. - */ - 'startHeight': string; - 'ownerPublicKey': string; - /** - * Decoded address. - */ - 'ownerAddress': string; - /** - * Number of definitions for the same mosaic. - */ - 'revision': number; - /** - * - 0x00 (none) - No flags present. - 0x01 (supplyMutable) - Mosaic supports supply changes even when mosaic owner owns partial supply. - 0x02 (transferable) - Mosaic supports transfers between arbitrary accounts. When not set, mosaic can only be transferred to and from mosaic owner. - 0x04 (restrictable) - Mosaic supports custom restrictions configured by mosaic owner. - */ - 'flags': number; - /** - * Determines up to what decimal place the mosaic can be divided. Divisibility of 3 means that a mosaic can be divided into smallest parts of 0.001 mosaics. The divisibility must be in the range of 0 and 6. - */ - 'divisibility': number; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "supply", - "baseName": "supply", - "type": "string" - }, - { - "name": "startHeight", - "baseName": "startHeight", - "type": "string" - }, - { - "name": "ownerPublicKey", - "baseName": "ownerPublicKey", - "type": "string" - }, - { - "name": "ownerAddress", - "baseName": "ownerAddress", - "type": "string" - }, - { - "name": "revision", - "baseName": "revision", - "type": "number" - }, - { - "name": "flags", - "baseName": "flags", - "type": "number" - }, - { - "name": "divisibility", - "baseName": "divisibility", - "type": "number" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MosaicDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicDefinitionTransactionBodyDTO.ts b/src/infrastructure/model/mosaicDefinitionTransactionBodyDTO.ts deleted file mode 100644 index c03aea9030..0000000000 --- a/src/infrastructure/model/mosaicDefinitionTransactionBodyDTO.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MosaicDefinitionTransactionBodyDTO { - /** - * Mosaic identifier. - */ - 'id': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - /** - * Random nonce used to generate the mosaic id. - */ - 'nonce': number; - /** - * - 0x00 (none) - No flags present. - 0x01 (supplyMutable) - Mosaic supports supply changes even when mosaic owner owns partial supply. - 0x02 (transferable) - Mosaic supports transfers between arbitrary accounts. When not set, mosaic can only be transferred to and from mosaic owner. - 0x04 (restrictable) - Mosaic supports custom restrictions configured by mosaic owner. - */ - 'flags': number; - /** - * Determines up to what decimal place the mosaic can be divided. Divisibility of 3 means that a mosaic can be divided into smallest parts of 0.001 mosaics. The divisibility must be in the range of 0 and 6. - */ - 'divisibility': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "nonce", - "baseName": "nonce", - "type": "number" - }, - { - "name": "flags", - "baseName": "flags", - "type": "number" - }, - { - "name": "divisibility", - "baseName": "divisibility", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return MosaicDefinitionTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicDefinitionTransactionDTO.ts b/src/infrastructure/model/mosaicDefinitionTransactionDTO.ts deleted file mode 100644 index 9fe95e13f9..0000000000 --- a/src/infrastructure/model/mosaicDefinitionTransactionDTO.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicDefinitionTransactionBodyDTO } from './mosaicDefinitionTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to create a new mosaic. -*/ -export class MosaicDefinitionTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. - */ - 'id': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - /** - * Random nonce used to generate the mosaic id. - */ - 'nonce': number; - /** - * - 0x00 (none) - No flags present. - 0x01 (supplyMutable) - Mosaic supports supply changes even when mosaic owner owns partial supply. - 0x02 (transferable) - Mosaic supports transfers between arbitrary accounts. When not set, mosaic can only be transferred to and from mosaic owner. - 0x04 (restrictable) - Mosaic supports custom restrictions configured by mosaic owner. - */ - 'flags': number; - /** - * Determines up to what decimal place the mosaic can be divided. Divisibility of 3 means that a mosaic can be divided into smallest parts of 0.001 mosaics. The divisibility must be in the range of 0 and 6. - */ - 'divisibility': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "nonce", - "baseName": "nonce", - "type": "number" - }, - { - "name": "flags", - "baseName": "flags", - "type": "number" - }, - { - "name": "divisibility", - "baseName": "divisibility", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return MosaicDefinitionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicExpiryReceiptDTO.ts b/src/infrastructure/model/mosaicExpiryReceiptDTO.ts deleted file mode 100644 index 629da6bea6..0000000000 --- a/src/infrastructure/model/mosaicExpiryReceiptDTO.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicExpiryReceiptDTOAllOf } from './mosaicExpiryReceiptDTOAllOf'; -import { ReceiptDTO } from './receiptDTO'; -import { ReceiptTypeEnum } from './receiptTypeEnum'; - -/** -* A mosaic expired in this block. -*/ -export class MosaicExpiryReceiptDTO { - /** - * Version of the receipt. - */ - 'version': number; - 'type': ReceiptTypeEnum; - /** - * Mosaic identifier. - */ - 'artifactId': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "ReceiptTypeEnum" - }, - { - "name": "artifactId", - "baseName": "artifactId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MosaicExpiryReceiptDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicExpiryReceiptDTOAllOf.ts b/src/infrastructure/model/mosaicExpiryReceiptDTOAllOf.ts deleted file mode 100644 index 9fe6458924..0000000000 --- a/src/infrastructure/model/mosaicExpiryReceiptDTOAllOf.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MosaicExpiryReceiptDTOAllOf { - /** - * Mosaic identifier. - */ - 'artifactId': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "artifactId", - "baseName": "artifactId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MosaicExpiryReceiptDTOAllOf.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicGlobalRestrictionDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionDTO.ts deleted file mode 100644 index 1f50ead7e0..0000000000 --- a/src/infrastructure/model/mosaicGlobalRestrictionDTO.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicGlobalRestrictionEntryWrapperDTO } from './mosaicGlobalRestrictionEntryWrapperDTO'; - -export class MosaicGlobalRestrictionDTO { - 'mosaicRestrictionEntry': MosaicGlobalRestrictionEntryWrapperDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicRestrictionEntry", - "baseName": "mosaicRestrictionEntry", - "type": "MosaicGlobalRestrictionEntryWrapperDTO" - } ]; - - static getAttributeTypeMap() { - return MosaicGlobalRestrictionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicGlobalRestrictionEntryDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionEntryDTO.ts deleted file mode 100644 index 8766cca2aa..0000000000 --- a/src/infrastructure/model/mosaicGlobalRestrictionEntryDTO.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicGlobalRestrictionEntryRestrictionDTO } from './mosaicGlobalRestrictionEntryRestrictionDTO'; - -export class MosaicGlobalRestrictionEntryDTO { - /** - * Restriction key. - */ - 'key': string; - 'restriction': MosaicGlobalRestrictionEntryRestrictionDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "restriction", - "baseName": "restriction", - "type": "MosaicGlobalRestrictionEntryRestrictionDTO" - } ]; - - static getAttributeTypeMap() { - return MosaicGlobalRestrictionEntryDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicGlobalRestrictionEntryRestrictionDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionEntryRestrictionDTO.ts deleted file mode 100644 index 6d04808629..0000000000 --- a/src/infrastructure/model/mosaicGlobalRestrictionEntryRestrictionDTO.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicRestrictionTypeEnum } from './mosaicRestrictionTypeEnum'; - -export class MosaicGlobalRestrictionEntryRestrictionDTO { - /** - * Mosaic identifier. - */ - 'referenceMosaicId': string; - /** - * A value in a restriction transaction. - */ - 'restrictionValue': string; - 'restrictionType': MosaicRestrictionTypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "referenceMosaicId", - "baseName": "referenceMosaicId", - "type": "string" - }, - { - "name": "restrictionValue", - "baseName": "restrictionValue", - "type": "string" - }, - { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "MosaicRestrictionTypeEnum" - } ]; - - static getAttributeTypeMap() { - return MosaicGlobalRestrictionEntryRestrictionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicGlobalRestrictionEntryWrapperDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionEntryWrapperDTO.ts deleted file mode 100644 index 514341c74a..0000000000 --- a/src/infrastructure/model/mosaicGlobalRestrictionEntryWrapperDTO.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicGlobalRestrictionEntryDTO } from './mosaicGlobalRestrictionEntryDTO'; -import { MosaicRestrictionEntryTypeEnum } from './mosaicRestrictionEntryTypeEnum'; - -export class MosaicGlobalRestrictionEntryWrapperDTO { - 'compositeHash': string; - 'entryType': MosaicRestrictionEntryTypeEnum; - /** - * Mosaic identifier. - */ - 'mosaicId': string; - 'restrictions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "compositeHash", - "baseName": "compositeHash", - "type": "string" - }, - { - "name": "entryType", - "baseName": "entryType", - "type": "MosaicRestrictionEntryTypeEnum" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "restrictions", - "baseName": "restrictions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MosaicGlobalRestrictionEntryWrapperDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicGlobalRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionTransactionBodyDTO.ts deleted file mode 100644 index 7084b54183..0000000000 --- a/src/infrastructure/model/mosaicGlobalRestrictionTransactionBodyDTO.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicRestrictionTypeEnum } from './mosaicRestrictionTypeEnum'; - -export class MosaicGlobalRestrictionTransactionBodyDTO { - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'referenceMosaicId': string; - /** - * Restriction key. - */ - 'restrictionKey': string; - /** - * A value in a restriction transaction. - */ - 'previousRestrictionValue': string; - /** - * A value in a restriction transaction. - */ - 'newRestrictionValue': string; - 'previousRestrictionType': MosaicRestrictionTypeEnum; - 'newRestrictionType': MosaicRestrictionTypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "referenceMosaicId", - "baseName": "referenceMosaicId", - "type": "string" - }, - { - "name": "restrictionKey", - "baseName": "restrictionKey", - "type": "string" - }, - { - "name": "previousRestrictionValue", - "baseName": "previousRestrictionValue", - "type": "string" - }, - { - "name": "newRestrictionValue", - "baseName": "newRestrictionValue", - "type": "string" - }, - { - "name": "previousRestrictionType", - "baseName": "previousRestrictionType", - "type": "MosaicRestrictionTypeEnum" - }, - { - "name": "newRestrictionType", - "baseName": "newRestrictionType", - "type": "MosaicRestrictionTypeEnum" - } ]; - - static getAttributeTypeMap() { - return MosaicGlobalRestrictionTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicGlobalRestrictionTransactionDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionTransactionDTO.ts deleted file mode 100644 index 07e65280a4..0000000000 --- a/src/infrastructure/model/mosaicGlobalRestrictionTransactionDTO.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicGlobalRestrictionTransactionBodyDTO } from './mosaicGlobalRestrictionTransactionBodyDTO'; -import { MosaicRestrictionTypeEnum } from './mosaicRestrictionTypeEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to set a network-wide restriction rule to a mosaic. -*/ -export class MosaicGlobalRestrictionTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'referenceMosaicId': string; - /** - * Restriction key. - */ - 'restrictionKey': string; - /** - * A value in a restriction transaction. - */ - 'previousRestrictionValue': string; - /** - * A value in a restriction transaction. - */ - 'newRestrictionValue': string; - 'previousRestrictionType': MosaicRestrictionTypeEnum; - 'newRestrictionType': MosaicRestrictionTypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "referenceMosaicId", - "baseName": "referenceMosaicId", - "type": "string" - }, - { - "name": "restrictionKey", - "baseName": "restrictionKey", - "type": "string" - }, - { - "name": "previousRestrictionValue", - "baseName": "previousRestrictionValue", - "type": "string" - }, - { - "name": "newRestrictionValue", - "baseName": "newRestrictionValue", - "type": "string" - }, - { - "name": "previousRestrictionType", - "baseName": "previousRestrictionType", - "type": "MosaicRestrictionTypeEnum" - }, - { - "name": "newRestrictionType", - "baseName": "newRestrictionType", - "type": "MosaicRestrictionTypeEnum" - } ]; - - static getAttributeTypeMap() { - return MosaicGlobalRestrictionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicIds.ts b/src/infrastructure/model/mosaicIds.ts deleted file mode 100644 index b8303e1981..0000000000 --- a/src/infrastructure/model/mosaicIds.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MosaicIds { - /** - * Array of mosaic identifiers. - */ - 'mosaicIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicIds", - "baseName": "mosaicIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MosaicIds.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicInfoDTO.ts b/src/infrastructure/model/mosaicInfoDTO.ts deleted file mode 100644 index 3fe0f7520c..0000000000 --- a/src/infrastructure/model/mosaicInfoDTO.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicDTO } from './mosaicDTO'; - -export class MosaicInfoDTO { - 'mosaic': MosaicDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaic", - "baseName": "mosaic", - "type": "MosaicDTO" - } ]; - - static getAttributeTypeMap() { - return MosaicInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicMetadataTransactionBodyDTO.ts b/src/infrastructure/model/mosaicMetadataTransactionBodyDTO.ts deleted file mode 100644 index 65e54278bf..0000000000 --- a/src/infrastructure/model/mosaicMetadataTransactionBodyDTO.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MosaicMetadataTransactionBodyDTO { - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'targetMosaicId': string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "targetMosaicId", - "baseName": "targetMosaicId", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MosaicMetadataTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicMetadataTransactionDTO.ts b/src/infrastructure/model/mosaicMetadataTransactionDTO.ts deleted file mode 100644 index 6630b519c3..0000000000 --- a/src/infrastructure/model/mosaicMetadataTransactionDTO.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicMetadataTransactionBodyDTO } from './mosaicMetadataTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to create or modify a multisig account. -*/ -export class MosaicMetadataTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'targetMosaicId': string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "targetMosaicId", - "baseName": "targetMosaicId", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MosaicMetadataTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicNamesDTO.ts b/src/infrastructure/model/mosaicNamesDTO.ts deleted file mode 100644 index bdbfb7677c..0000000000 --- a/src/infrastructure/model/mosaicNamesDTO.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MosaicNamesDTO { - /** - * Mosaic identifier. - */ - 'mosaicId': string; - /** - * Mosaic linked namespace names. - */ - 'names': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "names", - "baseName": "names", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MosaicNamesDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicRestrictionEntryTypeEnum.ts b/src/infrastructure/model/mosaicRestrictionEntryTypeEnum.ts deleted file mode 100644 index 3311bef1ce..0000000000 --- a/src/infrastructure/model/mosaicRestrictionEntryTypeEnum.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * - 0 - Mosaic address restriction. - 1 - Mosaic global restriction. - */ -export enum MosaicRestrictionEntryTypeEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, -} diff --git a/src/infrastructure/model/mosaicRestrictionTypeEnum.ts b/src/infrastructure/model/mosaicRestrictionTypeEnum.ts deleted file mode 100644 index 8ac3b4c99b..0000000000 --- a/src/infrastructure/model/mosaicRestrictionTypeEnum.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Type of mosaic restriction. - * 0 - Uninitialized value indicating no restriction. - * 1 (EQ) - Allow if equal. - * 2 (NE) - Allow if not equal. - * 3 (LT) - Allow if less than. - * 4 (LE) - Allow if less than or equal. - * 5 (GT) - Allow if greater than. - * 6 (GE) - Allow if greater than or equal. - */ -export enum MosaicRestrictionTypeEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_3 = 3, - NUMBER_4 = 4, - NUMBER_5 = 5, - NUMBER_6 = 6, -} diff --git a/src/infrastructure/model/mosaicSupplyChangeActionEnum.ts b/src/infrastructure/model/mosaicSupplyChangeActionEnum.ts deleted file mode 100644 index 86abd9d8db..0000000000 --- a/src/infrastructure/model/mosaicSupplyChangeActionEnum.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Direction of the supply change: * 0 - Decrease. * 1 - Increase. - */ -export enum MosaicSupplyChangeActionEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, -} diff --git a/src/infrastructure/model/mosaicSupplyChangeTransactionBodyDTO.ts b/src/infrastructure/model/mosaicSupplyChangeTransactionBodyDTO.ts deleted file mode 100644 index 4298461d20..0000000000 --- a/src/infrastructure/model/mosaicSupplyChangeTransactionBodyDTO.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicSupplyChangeActionEnum } from './mosaicSupplyChangeActionEnum'; - -export class MosaicSupplyChangeTransactionBodyDTO { - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'delta': string; - 'action': MosaicSupplyChangeActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "delta", - "baseName": "delta", - "type": "string" - }, - { - "name": "action", - "baseName": "action", - "type": "MosaicSupplyChangeActionEnum" - } ]; - - static getAttributeTypeMap() { - return MosaicSupplyChangeTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicSupplyChangeTransactionDTO.ts b/src/infrastructure/model/mosaicSupplyChangeTransactionDTO.ts deleted file mode 100644 index 9d61095843..0000000000 --- a/src/infrastructure/model/mosaicSupplyChangeTransactionDTO.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicSupplyChangeActionEnum } from './mosaicSupplyChangeActionEnum'; -import { MosaicSupplyChangeTransactionBodyDTO } from './mosaicSupplyChangeTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to increase or decrease the supply of a mosaic. -*/ -export class MosaicSupplyChangeTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'delta': string; - 'action': MosaicSupplyChangeActionEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "delta", - "baseName": "delta", - "type": "string" - }, - { - "name": "action", - "baseName": "action", - "type": "MosaicSupplyChangeActionEnum" - } ]; - - static getAttributeTypeMap() { - return MosaicSupplyChangeTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicsInfoDTO.ts b/src/infrastructure/model/mosaicsInfoDTO.ts deleted file mode 100644 index 4f306bfb7d..0000000000 --- a/src/infrastructure/model/mosaicsInfoDTO.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicDTO } from './mosaicDTO'; - -export class MosaicsInfoDTO { - /** - * Array of mosaics information. - */ - 'mosaics': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaics", - "baseName": "mosaics", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MosaicsInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/mosaicsNamesDTO.ts b/src/infrastructure/model/mosaicsNamesDTO.ts deleted file mode 100644 index 2772252883..0000000000 --- a/src/infrastructure/model/mosaicsNamesDTO.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MosaicNamesDTO } from './mosaicNamesDTO'; - -export class MosaicsNamesDTO { - /** - * Array of mosaic names. - */ - 'mosaicNames': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "mosaicNames", - "baseName": "mosaicNames", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MosaicsNamesDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/multisigAccountGraphInfoDTO.ts b/src/infrastructure/model/multisigAccountGraphInfoDTO.ts deleted file mode 100644 index 4301593431..0000000000 --- a/src/infrastructure/model/multisigAccountGraphInfoDTO.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MultisigAccountInfoDTO } from './multisigAccountInfoDTO'; - -export class MultisigAccountGraphInfoDTO { - /** - * Level of the multisig account. - */ - 'level': number; - /** - * Array of multisig accounts for this level. - */ - 'multisigEntries': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "level", - "baseName": "level", - "type": "number" - }, - { - "name": "multisigEntries", - "baseName": "multisigEntries", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MultisigAccountGraphInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/multisigAccountInfoDTO.ts b/src/infrastructure/model/multisigAccountInfoDTO.ts deleted file mode 100644 index 1e741a8ebe..0000000000 --- a/src/infrastructure/model/multisigAccountInfoDTO.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MultisigDTO } from './multisigDTO'; - -export class MultisigAccountInfoDTO { - 'multisig': MultisigDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "multisig", - "baseName": "multisig", - "type": "MultisigDTO" - } ]; - - static getAttributeTypeMap() { - return MultisigAccountInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/multisigAccountModificationTransactionBodyDTO.ts b/src/infrastructure/model/multisigAccountModificationTransactionBodyDTO.ts deleted file mode 100644 index 4911620324..0000000000 --- a/src/infrastructure/model/multisigAccountModificationTransactionBodyDTO.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MultisigAccountModificationTransactionBodyDTO { - /** - * Number of signatures needed to remove a cosignatory. If we are modifying an existing multisig account, this indicates the relative change of the minimum cosignatories. - */ - 'minRemovalDelta': number; - /** - * Number of signatures needed to approve a transaction. If we are modifying an existing multisig account, this indicates the relative change of the minimum cosignatories. - */ - 'minApprovalDelta': number; - /** - * Array of cosignatory accounts to add. - */ - 'publicKeyAdditions': Array; - /** - * Array of cosignatory accounts to delete. - */ - 'publicKeyDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "minRemovalDelta", - "baseName": "minRemovalDelta", - "type": "number" - }, - { - "name": "minApprovalDelta", - "baseName": "minApprovalDelta", - "type": "number" - }, - { - "name": "publicKeyAdditions", - "baseName": "publicKeyAdditions", - "type": "Array" - }, - { - "name": "publicKeyDeletions", - "baseName": "publicKeyDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MultisigAccountModificationTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/multisigAccountModificationTransactionDTO.ts b/src/infrastructure/model/multisigAccountModificationTransactionDTO.ts deleted file mode 100644 index 3bf5923735..0000000000 --- a/src/infrastructure/model/multisigAccountModificationTransactionDTO.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MultisigAccountModificationTransactionBodyDTO } from './multisigAccountModificationTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to create or modify a multisig account. -*/ -export class MultisigAccountModificationTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Number of signatures needed to remove a cosignatory. If we are modifying an existing multisig account, this indicates the relative change of the minimum cosignatories. - */ - 'minRemovalDelta': number; - /** - * Number of signatures needed to approve a transaction. If we are modifying an existing multisig account, this indicates the relative change of the minimum cosignatories. - */ - 'minApprovalDelta': number; - /** - * Array of cosignatory accounts to add. - */ - 'publicKeyAdditions': Array; - /** - * Array of cosignatory accounts to delete. - */ - 'publicKeyDeletions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "minRemovalDelta", - "baseName": "minRemovalDelta", - "type": "number" - }, - { - "name": "minApprovalDelta", - "baseName": "minApprovalDelta", - "type": "number" - }, - { - "name": "publicKeyAdditions", - "baseName": "publicKeyAdditions", - "type": "Array" - }, - { - "name": "publicKeyDeletions", - "baseName": "publicKeyDeletions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MultisigAccountModificationTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/multisigDTO.ts b/src/infrastructure/model/multisigDTO.ts deleted file mode 100644 index 2b7b4d071e..0000000000 --- a/src/infrastructure/model/multisigDTO.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class MultisigDTO { - 'accountPublicKey': string; - /** - * Decoded address. - */ - 'accountAddress': string; - /** - * Number of signatures needed to approve a transaction. - */ - 'minApproval': number; - /** - * Number of signatures needed to remove a cosignatory. - */ - 'minRemoval': number; - /** - * Array of public keys of the cosignatory accounts. - */ - 'cosignatoryPublicKeys': Array; - /** - * Array of multisig accounts where the account is cosignatory. - */ - 'multisigPublicKeys': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "accountPublicKey", - "baseName": "accountPublicKey", - "type": "string" - }, - { - "name": "accountAddress", - "baseName": "accountAddress", - "type": "string" - }, - { - "name": "minApproval", - "baseName": "minApproval", - "type": "number" - }, - { - "name": "minRemoval", - "baseName": "minRemoval", - "type": "number" - }, - { - "name": "cosignatoryPublicKeys", - "baseName": "cosignatoryPublicKeys", - "type": "Array" - }, - { - "name": "multisigPublicKeys", - "baseName": "multisigPublicKeys", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return MultisigDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceDTO.ts b/src/infrastructure/model/namespaceDTO.ts deleted file mode 100644 index 164f1df917..0000000000 --- a/src/infrastructure/model/namespaceDTO.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AliasDTO } from './aliasDTO'; -import { NamespaceRegistrationTypeEnum } from './namespaceRegistrationTypeEnum'; - -export class NamespaceDTO { - 'registrationType': NamespaceRegistrationTypeEnum; - /** - * Level of the namespace. - */ - 'depth': number; - /** - * Namespace identifier. - */ - 'level0': string; - /** - * Namespace identifier. - */ - 'level1'?: string; - /** - * Namespace identifier. - */ - 'level2'?: string; - 'alias': AliasDTO; - /** - * Namespace identifier. - */ - 'parentId': string; - 'ownerPublicKey': string; - /** - * Decoded address. - */ - 'ownerAddress': string; - /** - * Height of the blockchain. - */ - 'startHeight': string; - /** - * Height of the blockchain. - */ - 'endHeight': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "registrationType", - "baseName": "registrationType", - "type": "NamespaceRegistrationTypeEnum" - }, - { - "name": "depth", - "baseName": "depth", - "type": "number" - }, - { - "name": "level0", - "baseName": "level0", - "type": "string" - }, - { - "name": "level1", - "baseName": "level1", - "type": "string" - }, - { - "name": "level2", - "baseName": "level2", - "type": "string" - }, - { - "name": "alias", - "baseName": "alias", - "type": "AliasDTO" - }, - { - "name": "parentId", - "baseName": "parentId", - "type": "string" - }, - { - "name": "ownerPublicKey", - "baseName": "ownerPublicKey", - "type": "string" - }, - { - "name": "ownerAddress", - "baseName": "ownerAddress", - "type": "string" - }, - { - "name": "startHeight", - "baseName": "startHeight", - "type": "string" - }, - { - "name": "endHeight", - "baseName": "endHeight", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NamespaceDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceExpiryReceiptDTO.ts b/src/infrastructure/model/namespaceExpiryReceiptDTO.ts deleted file mode 100644 index fdce28dccc..0000000000 --- a/src/infrastructure/model/namespaceExpiryReceiptDTO.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { NamespaceExpiryReceiptDTOAllOf } from './namespaceExpiryReceiptDTOAllOf'; -import { ReceiptDTO } from './receiptDTO'; -import { ReceiptTypeEnum } from './receiptTypeEnum'; - -/** -* An namespace expired in this block. -*/ -export class NamespaceExpiryReceiptDTO { - /** - * Version of the receipt. - */ - 'version': number; - 'type': ReceiptTypeEnum; - /** - * Namespace identifier. - */ - 'artifactId': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "ReceiptTypeEnum" - }, - { - "name": "artifactId", - "baseName": "artifactId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NamespaceExpiryReceiptDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceExpiryReceiptDTOAllOf.ts b/src/infrastructure/model/namespaceExpiryReceiptDTOAllOf.ts deleted file mode 100644 index b20c1d4aa4..0000000000 --- a/src/infrastructure/model/namespaceExpiryReceiptDTOAllOf.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class NamespaceExpiryReceiptDTOAllOf { - /** - * Namespace identifier. - */ - 'artifactId': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "artifactId", - "baseName": "artifactId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NamespaceExpiryReceiptDTOAllOf.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceIds.ts b/src/infrastructure/model/namespaceIds.ts deleted file mode 100644 index 90363b451e..0000000000 --- a/src/infrastructure/model/namespaceIds.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class NamespaceIds { - /** - * Array of namespace identifiers. - */ - 'namespaceIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "namespaceIds", - "baseName": "namespaceIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return NamespaceIds.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceInfoDTO.ts b/src/infrastructure/model/namespaceInfoDTO.ts deleted file mode 100644 index 65c7e716dc..0000000000 --- a/src/infrastructure/model/namespaceInfoDTO.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { NamespaceDTO } from './namespaceDTO'; -import { NamespaceMetaDTO } from './namespaceMetaDTO'; - -export class NamespaceInfoDTO { - 'meta': NamespaceMetaDTO; - 'namespace': NamespaceDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "meta", - "baseName": "meta", - "type": "NamespaceMetaDTO" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "NamespaceDTO" - } ]; - - static getAttributeTypeMap() { - return NamespaceInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceMetaDTO.ts b/src/infrastructure/model/namespaceMetaDTO.ts deleted file mode 100644 index a78c0a7a44..0000000000 --- a/src/infrastructure/model/namespaceMetaDTO.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class NamespaceMetaDTO { - 'id': string; - 'active': boolean; - 'index': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "active", - "baseName": "active", - "type": "boolean" - }, - { - "name": "index", - "baseName": "index", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return NamespaceMetaDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceMetadataTransactionBodyDTO.ts b/src/infrastructure/model/namespaceMetadataTransactionBodyDTO.ts deleted file mode 100644 index 31ee663b94..0000000000 --- a/src/infrastructure/model/namespaceMetadataTransactionBodyDTO.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class NamespaceMetadataTransactionBodyDTO { - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Namespace identifier. - */ - 'targetNamespaceId'?: string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "targetNamespaceId", - "baseName": "targetNamespaceId", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NamespaceMetadataTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceMetadataTransactionDTO.ts b/src/infrastructure/model/namespaceMetadataTransactionDTO.ts deleted file mode 100644 index c0bd315a5d..0000000000 --- a/src/infrastructure/model/namespaceMetadataTransactionDTO.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { NamespaceMetadataTransactionBodyDTO } from './namespaceMetadataTransactionBodyDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to create or modify a multisig account. -*/ -export class NamespaceMetadataTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Namespace identifier. - */ - 'targetNamespaceId'?: string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "targetNamespaceId", - "baseName": "targetNamespaceId", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NamespaceMetadataTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceNameDTO.ts b/src/infrastructure/model/namespaceNameDTO.ts deleted file mode 100644 index d49fa98d64..0000000000 --- a/src/infrastructure/model/namespaceNameDTO.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class NamespaceNameDTO { - /** - * Namespace identifier. - */ - 'parentId'?: string; - /** - * Namespace identifier. - */ - 'id': string; - /** - * Namespace name. - */ - 'name': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "parentId", - "baseName": "parentId", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NamespaceNameDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceRegistrationTransactionBodyDTO.ts b/src/infrastructure/model/namespaceRegistrationTransactionBodyDTO.ts deleted file mode 100644 index 77fa426bf8..0000000000 --- a/src/infrastructure/model/namespaceRegistrationTransactionBodyDTO.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { NamespaceRegistrationTypeEnum } from './namespaceRegistrationTypeEnum'; - -export class NamespaceRegistrationTransactionBodyDTO { - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - /** - * Namespace identifier. - */ - 'parentId': string; - /** - * Namespace identifier. - */ - 'id': string; - 'registrationType': NamespaceRegistrationTypeEnum; - /** - * Namespace name. - */ - 'name': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "parentId", - "baseName": "parentId", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "registrationType", - "baseName": "registrationType", - "type": "NamespaceRegistrationTypeEnum" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NamespaceRegistrationTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceRegistrationTransactionDTO.ts b/src/infrastructure/model/namespaceRegistrationTransactionDTO.ts deleted file mode 100644 index 57839849c5..0000000000 --- a/src/infrastructure/model/namespaceRegistrationTransactionDTO.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { NamespaceRegistrationTransactionBodyDTO } from './namespaceRegistrationTransactionBodyDTO'; -import { NamespaceRegistrationTypeEnum } from './namespaceRegistrationTypeEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to create or renew a namespace. -*/ -export class NamespaceRegistrationTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - /** - * Namespace identifier. - */ - 'parentId': string; - /** - * Namespace identifier. - */ - 'id': string; - 'registrationType': NamespaceRegistrationTypeEnum; - /** - * Namespace name. - */ - 'name': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "parentId", - "baseName": "parentId", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "registrationType", - "baseName": "registrationType", - "type": "NamespaceRegistrationTypeEnum" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NamespaceRegistrationTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/namespaceRegistrationTypeEnum.ts b/src/infrastructure/model/namespaceRegistrationTypeEnum.ts deleted file mode 100644 index 6cf4dfc855..0000000000 --- a/src/infrastructure/model/namespaceRegistrationTypeEnum.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Type of namespace: * 0 - Root namespace. * 1 - Subnamespace. - */ -export enum NamespaceRegistrationTypeEnum { - NUMBER_0 = 0, - NUMBER_1 = 1, -} diff --git a/src/infrastructure/model/namespacesInfoDTO.ts b/src/infrastructure/model/namespacesInfoDTO.ts deleted file mode 100644 index cf6fe04eeb..0000000000 --- a/src/infrastructure/model/namespacesInfoDTO.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { NamespaceInfoDTO } from './namespaceInfoDTO'; - -export class NamespacesInfoDTO { - /** - * Array of namespaces information. - */ - 'namespaces': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "namespaces", - "baseName": "namespaces", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return NamespacesInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/networkTypeDTO.ts b/src/infrastructure/model/networkTypeDTO.ts deleted file mode 100644 index 676e101293..0000000000 --- a/src/infrastructure/model/networkTypeDTO.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class NetworkTypeDTO { - /** - * Network name. - */ - 'name': string; - /** - * A short text describing the network. - */ - 'description': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "description", - "baseName": "description", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NetworkTypeDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/networkTypeEnum.ts b/src/infrastructure/model/networkTypeEnum.ts deleted file mode 100644 index 38c5a82126..0000000000 --- a/src/infrastructure/model/networkTypeEnum.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Network type: - * 0x60 (96 decimal) - Private network. - * 0x90 (144 decimal) - Private test network. - * 0x68 (104 decimal) - Public main network. * 0x98 (152 decimal) - Public test network. - */ -export enum NetworkTypeEnum { - NUMBER_104 = 104, - NUMBER_152 = 152, - NUMBER_96 = 96, - NUMBER_144 = 144, -} diff --git a/src/infrastructure/model/nodeInfoDTO.ts b/src/infrastructure/model/nodeInfoDTO.ts deleted file mode 100644 index 42a6a33556..0000000000 --- a/src/infrastructure/model/nodeInfoDTO.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { RolesTypeEnum } from './rolesTypeEnum'; - -export class NodeInfoDTO { - /** - * Version of the application. - */ - 'version': number; - 'publicKey': string; - 'roles': RolesTypeEnum; - /** - * Port used for the communication. - */ - 'port': number; - 'networkIdentifier': number; - /** - * Node friendly name. - */ - 'friendlyName': string; - /** - * Node IP address. - */ - 'host': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "publicKey", - "baseName": "publicKey", - "type": "string" - }, - { - "name": "roles", - "baseName": "roles", - "type": "RolesTypeEnum" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - }, - { - "name": "networkIdentifier", - "baseName": "networkIdentifier", - "type": "number" - }, - { - "name": "friendlyName", - "baseName": "friendlyName", - "type": "string" - }, - { - "name": "host", - "baseName": "host", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return NodeInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/nodeTimeDTO.ts b/src/infrastructure/model/nodeTimeDTO.ts deleted file mode 100644 index a670a833c4..0000000000 --- a/src/infrastructure/model/nodeTimeDTO.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { CommunicationTimestampsDTO } from './communicationTimestampsDTO'; - -export class NodeTimeDTO { - 'communicationTimestamps': CommunicationTimestampsDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "communicationTimestamps", - "baseName": "communicationTimestamps", - "type": "CommunicationTimestampsDTO" - } ]; - - static getAttributeTypeMap() { - return NodeTimeDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/receiptDTO.ts b/src/infrastructure/model/receiptDTO.ts deleted file mode 100644 index 1729ef3970..0000000000 --- a/src/infrastructure/model/receiptDTO.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { ReceiptTypeEnum } from './receiptTypeEnum'; - -export class ReceiptDTO { - /** - * Version of the receipt. - */ - 'version': number; - 'type': ReceiptTypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "ReceiptTypeEnum" - } ]; - - static getAttributeTypeMap() { - return ReceiptDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/receiptTypeEnum.ts b/src/infrastructure/model/receiptTypeEnum.ts deleted file mode 100644 index 4ca1c7712d..0000000000 --- a/src/infrastructure/model/receiptTypeEnum.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Type of receipt: * 0x124D (4685 decimal) - Mosaic_Rental_Fee. - * 0x134E (4942 decimal) - Namespace_Rental_Fee. - * 0x2143 (8515 decimal) - Harvest_Fee. - * 0x2248 (8776 decimal) - LockHash_Completed. - * 0x2348 (9032 decimal) - LockHash_Expired. - * 0x2252 (8786 decimal) - LockSecret_Completed. - * 0x2352 (9042 decimal) - LockSecret_Expired. - * 0x3148 (12616 decimal) - LockHash_Created. - * 0x3152 (12626 decimal) - LockSecret_Created. - * 0x414D (16717 decimal) - Mosaic_Expired. - * 0x414E (16718 decimal) - Namespace_Expired. - * 0x424E (16974 decimal) - Namespace_Deleted. - * 0x5143 (20803 decimal) - Inflation. - * 0xE143 (57667 decimal) - Transaction_Group. - * 0xF143 (61763 decimal) - Address_Alias_Resolution. - * 0xF243 (62019 decimal) - Mosaic_Alias_Resolution. - */ -export enum ReceiptTypeEnum { - NUMBER_4685 = 4685, - NUMBER_4942 = 4942, - NUMBER_8515 = 8515, - NUMBER_8776 = 8776, - NUMBER_9032 = 9032, - NUMBER_8786 = 8786, - NUMBER_9042 = 9042, - NUMBER_12616 = 12616, - NUMBER_12626 = 12626, - NUMBER_16717 = 16717, - NUMBER_16718 = 16718, - NUMBER_16974 = 16974, - NUMBER_20803 = 20803, - NUMBER_57667 = 57667, - NUMBER_61763 = 61763, - NUMBER_62019 = 62019, -} diff --git a/src/infrastructure/model/resolutionEntryDTO.ts b/src/infrastructure/model/resolutionEntryDTO.ts deleted file mode 100644 index 31abf00af3..0000000000 --- a/src/infrastructure/model/resolutionEntryDTO.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { SourceDTO } from './sourceDTO'; - -export class ResolutionEntryDTO { - 'source': SourceDTO; - 'resolved': any; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "source", - "baseName": "source", - "type": "SourceDTO" - }, - { - "name": "resolved", - "baseName": "resolved", - "type": "any" - } ]; - - static getAttributeTypeMap() { - return ResolutionEntryDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/resolutionStatementBodyDTO.ts b/src/infrastructure/model/resolutionStatementBodyDTO.ts deleted file mode 100644 index ea75554e83..0000000000 --- a/src/infrastructure/model/resolutionStatementBodyDTO.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { ResolutionEntryDTO } from './resolutionEntryDTO'; - -export class ResolutionStatementBodyDTO { - /** - * Height of the blockchain. - */ - 'height': string; - 'unresolved': any; - /** - * Array of resolution entries linked to the unresolved namespaceId. It is an array instead of a single resolution entry since within one block the resolution might change for different sources due to alias related transactions. - */ - 'resolutionEntries': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "height", - "baseName": "height", - "type": "string" - }, - { - "name": "unresolved", - "baseName": "unresolved", - "type": "any" - }, - { - "name": "resolutionEntries", - "baseName": "resolutionEntries", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return ResolutionStatementBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/resolutionStatementDTO.ts b/src/infrastructure/model/resolutionStatementDTO.ts deleted file mode 100644 index a7ff96990a..0000000000 --- a/src/infrastructure/model/resolutionStatementDTO.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { ResolutionStatementBodyDTO } from './resolutionStatementBodyDTO'; - -/** -* A resolution statement keeps the relation between a namespace alias used in a transaction and the real address or mosaicId. -*/ -export class ResolutionStatementDTO { - 'statement': ResolutionStatementBodyDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "statement", - "baseName": "statement", - "type": "ResolutionStatementBodyDTO" - } ]; - - static getAttributeTypeMap() { - return ResolutionStatementDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/rolesTypeEnum.ts b/src/infrastructure/model/rolesTypeEnum.ts deleted file mode 100644 index c01edb55ba..0000000000 --- a/src/infrastructure/model/rolesTypeEnum.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/** - * Role of the node: - * 1 - Peer node. - * 2 - Api node. - */ -export enum RolesTypeEnum { - NUMBER_1 = 1, - NUMBER_2 = 2, -} diff --git a/src/infrastructure/model/secretLockTransactionBodyDTO.ts b/src/infrastructure/model/secretLockTransactionBodyDTO.ts deleted file mode 100644 index a8f0f62b11..0000000000 --- a/src/infrastructure/model/secretLockTransactionBodyDTO.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; - -export class SecretLockTransactionBodyDTO { - 'secret': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - 'hashAlgorithm': LockHashAlgorithmEnum; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'recipientAddress': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "secret", - "baseName": "secret", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "hashAlgorithm", - "baseName": "hashAlgorithm", - "type": "LockHashAlgorithmEnum" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SecretLockTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/secretLockTransactionDTO.ts b/src/infrastructure/model/secretLockTransactionDTO.ts deleted file mode 100644 index bfdabed743..0000000000 --- a/src/infrastructure/model/secretLockTransactionDTO.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { SecretLockTransactionBodyDTO } from './secretLockTransactionBodyDTO'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to sends mosaics to a recipient if the proof used is revealed. If the duration is reached, the locked funds go back to the sender of the transaction. -*/ -export class SecretLockTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'secret': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'mosaicId': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; - 'hashAlgorithm': LockHashAlgorithmEnum; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'recipientAddress': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "secret", - "baseName": "secret", - "type": "string" - }, - { - "name": "mosaicId", - "baseName": "mosaicId", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" - }, - { - "name": "hashAlgorithm", - "baseName": "hashAlgorithm", - "type": "LockHashAlgorithmEnum" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SecretLockTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/secretProofTransactionBodyDTO.ts b/src/infrastructure/model/secretProofTransactionBodyDTO.ts deleted file mode 100644 index 36b5aad14b..0000000000 --- a/src/infrastructure/model/secretProofTransactionBodyDTO.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; - -export class SecretProofTransactionBodyDTO { - 'secret': string; - 'hashAlgorithm': LockHashAlgorithmEnum; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'recipientAddress': string; - /** - * Original random set of bytes. - */ - 'proof': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "secret", - "baseName": "secret", - "type": "string" - }, - { - "name": "hashAlgorithm", - "baseName": "hashAlgorithm", - "type": "LockHashAlgorithmEnum" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - }, - { - "name": "proof", - "baseName": "proof", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SecretProofTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/secretProofTransactionDTO.ts b/src/infrastructure/model/secretProofTransactionDTO.ts deleted file mode 100644 index 82e786ffe4..0000000000 --- a/src/infrastructure/model/secretProofTransactionDTO.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { SecretProofTransactionBodyDTO } from './secretProofTransactionBodyDTO'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to reveal a proof. -*/ -export class SecretProofTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'secret': string; - 'hashAlgorithm': LockHashAlgorithmEnum; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'recipientAddress': string; - /** - * Original random set of bytes. - */ - 'proof': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "secret", - "baseName": "secret", - "type": "string" - }, - { - "name": "hashAlgorithm", - "baseName": "hashAlgorithm", - "type": "LockHashAlgorithmEnum" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - }, - { - "name": "proof", - "baseName": "proof", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SecretProofTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/serverDTO.ts b/src/infrastructure/model/serverDTO.ts deleted file mode 100644 index 7f9a23bafe..0000000000 --- a/src/infrastructure/model/serverDTO.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ServerDTO { - /** - * catapult-rest component version. - */ - 'restVersion': string; - /** - * catapult-sdk component version. - */ - 'sdkVersion': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "restVersion", - "baseName": "restVersion", - "type": "string" - }, - { - "name": "sdkVersion", - "baseName": "sdkVersion", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ServerDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/serverInfoDTO.ts b/src/infrastructure/model/serverInfoDTO.ts deleted file mode 100644 index cd70601484..0000000000 --- a/src/infrastructure/model/serverInfoDTO.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { ServerDTO } from './serverDTO'; - -export class ServerInfoDTO { - 'serverInfo': ServerDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "serverInfo", - "baseName": "serverInfo", - "type": "ServerDTO" - } ]; - - static getAttributeTypeMap() { - return ServerInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/sourceDTO.ts b/src/infrastructure/model/sourceDTO.ts deleted file mode 100644 index c2d78a8e14..0000000000 --- a/src/infrastructure/model/sourceDTO.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Transaction that triggered the receipt. -*/ -export class SourceDTO { - /** - * Transaction index within the block. - */ - 'primaryId': number; - /** - * Transaction index inside within the aggregate transaction. If the transaction is not an inner transaction, then the secondary id is set to 0. - */ - 'secondaryId': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "primaryId", - "baseName": "primaryId", - "type": "number" - }, - { - "name": "secondaryId", - "baseName": "secondaryId", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SourceDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/statementsDTO.ts b/src/infrastructure/model/statementsDTO.ts deleted file mode 100644 index c2e2d38f54..0000000000 --- a/src/infrastructure/model/statementsDTO.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { ResolutionStatementDTO } from './resolutionStatementDTO'; -import { TransactionStatementDTO } from './transactionStatementDTO'; - -/** -* Collection of transaction statements and resolutions triggered for the block requested. -*/ -export class StatementsDTO { - /** - * Array of transaction statements for the block requested. - */ - 'transactionStatements': Array; - /** - * Array of address resolutions for the block requested. - */ - 'addressResolutionStatements': Array; - /** - * Array of mosaic resolutions for the block requested. - */ - 'mosaicResolutionStatements': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "transactionStatements", - "baseName": "transactionStatements", - "type": "Array" - }, - { - "name": "addressResolutionStatements", - "baseName": "addressResolutionStatements", - "type": "Array" - }, - { - "name": "mosaicResolutionStatements", - "baseName": "mosaicResolutionStatements", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return StatementsDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/storageInfoDTO.ts b/src/infrastructure/model/storageInfoDTO.ts deleted file mode 100644 index 2413f47e8c..0000000000 --- a/src/infrastructure/model/storageInfoDTO.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class StorageInfoDTO { - /** - * Number of blocks stored. - */ - 'numBlocks': number; - /** - * Number of transactions stored. - */ - 'numTransactions': number; - /** - * Number of accounts created. - */ - 'numAccounts': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "numBlocks", - "baseName": "numBlocks", - "type": "number" - }, - { - "name": "numTransactions", - "baseName": "numTransactions", - "type": "number" - }, - { - "name": "numAccounts", - "baseName": "numAccounts", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return StorageInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionBodyDTO.ts b/src/infrastructure/model/transactionBodyDTO.ts deleted file mode 100644 index eaad75fd6a..0000000000 --- a/src/infrastructure/model/transactionBodyDTO.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class TransactionBodyDTO { - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return TransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionDTO.ts b/src/infrastructure/model/transactionDTO.ts deleted file mode 100644 index d6717a7074..0000000000 --- a/src/infrastructure/model/transactionDTO.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EntityDTO } from './entityDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionBodyDTO } from './transactionBodyDTO'; -import { VerifiableEntityDTO } from './verifiableEntityDTO'; - -export class TransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return TransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionHashes.ts b/src/infrastructure/model/transactionHashes.ts deleted file mode 100644 index e487513bbf..0000000000 --- a/src/infrastructure/model/transactionHashes.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class TransactionHashes { - /** - * Array of transaction hashes. - */ - 'hashes'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "hashes", - "baseName": "hashes", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return TransactionHashes.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionIds.ts b/src/infrastructure/model/transactionIds.ts deleted file mode 100644 index 20128c834f..0000000000 --- a/src/infrastructure/model/transactionIds.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class TransactionIds { - /** - * Array of transaction identifiers. - */ - 'transactionIds'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "transactionIds", - "baseName": "transactionIds", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return TransactionIds.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionInfoDTO.ts b/src/infrastructure/model/transactionInfoDTO.ts deleted file mode 100644 index d97b3df3d3..0000000000 --- a/src/infrastructure/model/transactionInfoDTO.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { TransactionMetaDTO } from './transactionMetaDTO'; - -export class TransactionInfoDTO { - 'meta': TransactionMetaDTO; - 'transaction': any; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "meta", - "baseName": "meta", - "type": "TransactionMetaDTO" - }, - { - "name": "transaction", - "baseName": "transaction", - "type": "any" - } ]; - - static getAttributeTypeMap() { - return TransactionInfoDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionMetaDTO.ts b/src/infrastructure/model/transactionMetaDTO.ts deleted file mode 100644 index 4c4690f0a7..0000000000 --- a/src/infrastructure/model/transactionMetaDTO.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class TransactionMetaDTO { - /** - * Height of the blockchain. - */ - 'height': string; - 'hash': string; - 'merkleComponentHash': string; - 'index': number; - 'id': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "height", - "baseName": "height", - "type": "string" - }, - { - "name": "hash", - "baseName": "hash", - "type": "string" - }, - { - "name": "merkleComponentHash", - "baseName": "merkleComponentHash", - "type": "string" - }, - { - "name": "index", - "baseName": "index", - "type": "number" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return TransactionMetaDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionPayload.ts b/src/infrastructure/model/transactionPayload.ts deleted file mode 100644 index 88dc032b2d..0000000000 --- a/src/infrastructure/model/transactionPayload.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class TransactionPayload { - /** - * Transaction payload. - */ - 'payload'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "payload", - "baseName": "payload", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return TransactionPayload.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionStateTypeEnum.ts b/src/infrastructure/model/transactionStateTypeEnum.ts deleted file mode 100644 index 47a39c62dc..0000000000 --- a/src/infrastructure/model/transactionStateTypeEnum.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * State of the transaction. - */ -export enum TransactionStateTypeEnum { - Confirmed = 'confirmed', - Unconfirmed = 'unconfirmed', - Failed = 'failed', -} diff --git a/src/infrastructure/model/transactionStatementBodyDTO.ts b/src/infrastructure/model/transactionStatementBodyDTO.ts deleted file mode 100644 index aaa68613b8..0000000000 --- a/src/infrastructure/model/transactionStatementBodyDTO.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { SourceDTO } from './sourceDTO'; - -export class TransactionStatementBodyDTO { - /** - * Height of the blockchain. - */ - 'height': string; - 'source': SourceDTO; - /** - * Array of receipts. - */ - 'receipts': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "height", - "baseName": "height", - "type": "string" - }, - { - "name": "source", - "baseName": "source", - "type": "SourceDTO" - }, - { - "name": "receipts", - "baseName": "receipts", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return TransactionStatementBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionStatementDTO.ts b/src/infrastructure/model/transactionStatementDTO.ts deleted file mode 100644 index 1d72f557ed..0000000000 --- a/src/infrastructure/model/transactionStatementDTO.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { TransactionStatementBodyDTO } from './transactionStatementBodyDTO'; - -/** -* Collection of receipts related to a transaction. -*/ -export class TransactionStatementDTO { - 'statement': TransactionStatementBodyDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "statement", - "baseName": "statement", - "type": "TransactionStatementBodyDTO" - } ]; - - static getAttributeTypeMap() { - return TransactionStatementDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionStatusDTO.ts b/src/infrastructure/model/transactionStatusDTO.ts deleted file mode 100644 index e91a9de572..0000000000 --- a/src/infrastructure/model/transactionStatusDTO.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { TransactionStateTypeEnum } from './transactionStateTypeEnum'; -import { TransactionStatusTypeEnum } from './transactionStatusTypeEnum'; - -export class TransactionStatusDTO { - 'group': TransactionStateTypeEnum; - 'code'?: TransactionStatusTypeEnum; - 'hash': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Height of the blockchain. - */ - 'height'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "group", - "baseName": "group", - "type": "TransactionStateTypeEnum" - }, - { - "name": "code", - "baseName": "code", - "type": "TransactionStatusTypeEnum" - }, - { - "name": "hash", - "baseName": "hash", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "height", - "baseName": "height", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return TransactionStatusDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transactionStatusTypeEnum.ts b/src/infrastructure/model/transactionStatusTypeEnum.ts deleted file mode 100644 index d5d3e8b712..0000000000 --- a/src/infrastructure/model/transactionStatusTypeEnum.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export enum TransactionStatusTypeEnum { - Success = 'Success', - Neutral = 'Neutral', - Failure = 'Failure', - FailureCorePastDeadline = 'Failure_Core_Past_Deadline', - FailureCoreFutureDeadline = 'Failure_Core_Future_Deadline', - FailureCoreInsufficientBalance = 'Failure_Core_Insufficient_Balance', - FailureCoreTooManyTransactions = 'Failure_Core_Too_Many_Transactions', - FailureCoreNemesisAccountSignedAfterNemesisBlock = 'Failure_Core_Nemesis_Account_Signed_After_Nemesis_Block', - FailureCoreWrongNetwork = 'Failure_Core_Wrong_Network', - FailureCoreInvalidAddress = 'Failure_Core_Invalid_Address', - FailureCoreInvalidVersion = 'Failure_Core_Invalid_Version', - FailureCoreInvalidTransactionFee = 'Failure_Core_Invalid_Transaction_Fee', - FailureCoreBlockHarvesterIneligible = 'Failure_Core_Block_Harvester_Ineligible', - FailureCoreZeroAddress = 'Failure_Core_Zero_Address', - FailureCoreZeroPublicKey = 'Failure_Core_Zero_Public_Key', - FailureCoreNonzeroInternalPadding = 'Failure_Core_Nonzero_Internal_Padding', - FailureHashAlreadyExists = 'Failure_Hash_Already_Exists', - FailureSignatureNotVerifiable = 'Failure_Signature_Not_Verifiable', - FailureAccountLinkInvalidAction = 'Failure_AccountLink_Invalid_Action', - FailureAccountLinkLinkAlreadyExists = 'Failure_AccountLink_Link_Already_Exists', - FailureAccountLinkUnknownLink = 'Failure_AccountLink_Unknown_Link', - FailureAccountLinkInconsistentUnlinkData = 'Failure_AccountLink_Inconsistent_Unlink_Data', - FailureAccountLinkRemoteAccountIneligible = 'Failure_AccountLink_Remote_Account_Ineligible', - FailureAccountLinkRemoteAccountSignerProhibited = 'Failure_AccountLink_Remote_Account_Signer_Prohibited', - FailureAccountLinkRemoteAccountParticipantProhibited = 'Failure_AccountLink_Remote_Account_Participant_Prohibited', - FailureAggregateTooManyTransactions = 'Failure_Aggregate_Too_Many_Transactions', - FailureAggregateNoTransactions = 'Failure_Aggregate_No_Transactions', - FailureAggregateTooManyCosignatures = 'Failure_Aggregate_Too_Many_Cosignatures', - FailureAggregateRedundantCosignatures = 'Failure_Aggregate_Redundant_Cosignatures', - FailureAggregateIneligibleCosignatories = 'Failure_Aggregate_Ineligible_Cosignatories', - FailureAggregateMissingCosignatures = 'Failure_Aggregate_Missing_Cosignatures', - FailureAggregateTransactionsHashMismatch = 'Failure_Aggregate_Transactions_Hash_Mismatch', - FailureLockHashInvalidMosaicId = 'Failure_LockHash_Invalid_Mosaic_Id', - FailureLockHashInvalidMosaicAmount = 'Failure_LockHash_Invalid_Mosaic_Amount', - FailureLockHashHashAlreadyExists = 'Failure_LockHash_Hash_Already_Exists', - FailureLockHashUnknownHash = 'Failure_LockHash_Unknown_Hash', - FailureLockHashInactiveHash = 'Failure_LockHash_Inactive_Hash', - FailureLockHashInvalidDuration = 'Failure_LockHash_Invalid_Duration', - FailureLockSecretInvalidHashAlgorithm = 'Failure_LockSecret_Invalid_Hash_Algorithm', - FailureLockSecretHashAlreadyExists = 'Failure_LockSecret_Hash_Already_Exists', - FailureLockSecretProofSizeOutOfBounds = 'Failure_LockSecret_Proof_Size_Out_Of_Bounds', - FailureLockSecretSecretMismatch = 'Failure_LockSecret_Secret_Mismatch', - FailureLockSecretUnknownCompositeKey = 'Failure_LockSecret_Unknown_Composite_Key', - FailureLockSecretInactiveSecret = 'Failure_LockSecret_Inactive_Secret', - FailureLockSecretHashAlgorithmMismatch = 'Failure_LockSecret_Hash_Algorithm_Mismatch', - FailureLockSecretInvalidDuration = 'Failure_LockSecret_Invalid_Duration', - FailureMetadataValueTooSmall = 'Failure_Metadata_Value_Too_Small', - FailureMetadataValueTooLarge = 'Failure_Metadata_Value_Too_Large', - FailureMetadataValueSizeDeltaTooLarge = 'Failure_Metadata_Value_Size_Delta_Too_Large', - FailureMetadataValueSizeDeltaMismatch = 'Failure_Metadata_Value_Size_Delta_Mismatch', - FailureMetadataValueChangeIrreversible = 'Failure_Metadata_Value_Change_Irreversible', - FailureMosaicInvalidDuration = 'Failure_Mosaic_Invalid_Duration', - FailureMosaicInvalidName = 'Failure_Mosaic_Invalid_Name', - FailureMosaicNameIdMismatch = 'Failure_Mosaic_Name_Id_Mismatch', - FailureMosaicExpired = 'Failure_Mosaic_Expired', - FailureMosaicOwnerConflict = 'Failure_Mosaic_Owner_Conflict', - FailureMosaicIdMismatch = 'Failure_Mosaic_Id_Mismatch', - FailureMosaicParentIdConflict = 'Failure_Mosaic_Parent_Id_Conflict', - FailureMosaicInvalidProperty = 'Failure_Mosaic_Invalid_Property', - FailureMosaicInvalidFlags = 'Failure_Mosaic_Invalid_Flags', - FailureMosaicInvalidDivisibility = 'Failure_Mosaic_Invalid_Divisibility', - FailureMosaicInvalidSupplyChangeAction = 'Failure_Mosaic_Invalid_Supply_Change_Action', - FailureMosaicInvalidSupplyChangeAmount = 'Failure_Mosaic_Invalid_Supply_Change_Amount', - FailureMosaicInvalidId = 'Failure_Mosaic_Invalid_Id', - FailureMosaicModificationDisallowed = 'Failure_Mosaic_Modification_Disallowed', - FailureMosaicModificationNoChanges = 'Failure_Mosaic_Modification_No_Changes', - FailureMosaicSupplyImmutable = 'Failure_Mosaic_Supply_Immutable', - FailureMosaicSupplyNegative = 'Failure_Mosaic_Supply_Negative', - FailureMosaicSupplyExceeded = 'Failure_Mosaic_Supply_Exceeded', - FailureMosaicNonTransferable = 'Failure_Mosaic_Non_Transferable', - FailureMosaicMaxMosaicsExceeded = 'Failure_Mosaic_Max_Mosaics_Exceeded', - FailureMosaicRequiredPropertyFlagUnset = 'Failure_Mosaic_Required_Property_Flag_Unset', - FailureMultisigAccountInBothSets = 'Failure_Multisig_Account_In_Both_Sets', - FailureMultisigMultipleDeletes = 'Failure_Multisig_Multiple_Deletes', - FailureMultisigRedundantModification = 'Failure_Multisig_Redundant_Modification', - FailureMultisigUnknownMultisigAccount = 'Failure_Multisig_Unknown_Multisig_Account', - FailureMultisigNotACosignatory = 'Failure_Multisig_Not_A_Cosignatory', - FailureMultisigAlreadyACosignatory = 'Failure_Multisig_Already_A_Cosignatory', - FailureMultisigMinSettingOutOfRange = 'Failure_Multisig_Min_Setting_Out_Of_Range', - FailureMultisigMinSettingLargerThanNumCosignatories = 'Failure_Multisig_Min_Setting_Larger_Than_Num_Cosignatories', - FailureMultisigInvalidModificationAction = 'Failure_Multisig_Invalid_Modification_Action', - FailureMultisigMaxCosignedAccounts = 'Failure_Multisig_Max_Cosigned_Accounts', - FailureMultisigMaxCosignatories = 'Failure_Multisig_Max_Cosignatories', - FailureMultisigLoop = 'Failure_Multisig_Loop', - FailureMultisigMaxMultisigDepth = 'Failure_Multisig_Max_Multisig_Depth', - FailureMultisigOperationProhibitedByAccount = 'Failure_Multisig_Operation_Prohibited_By_Account', - FailureNamespaceInvalidDuration = 'Failure_Namespace_Invalid_Duration', - FailureNamespaceInvalidName = 'Failure_Namespace_Invalid_Name', - FailureNamespaceNameIdMismatch = 'Failure_Namespace_Name_Id_Mismatch', - FailureNamespaceExpired = 'Failure_Namespace_Expired', - FailureNamespaceOwnerConflict = 'Failure_Namespace_Owner_Conflict', - FailureNamespaceIdMismatch = 'Failure_Namespace_Id_Mismatch', - FailureNamespaceInvalidRegistrationType = 'Failure_Namespace_Invalid_Registration_Type', - FailureNamespaceRootNameReserved = 'Failure_Namespace_Root_Name_Reserved', - FailureNamespaceTooDeep = 'Failure_Namespace_Too_Deep', - FailureNamespaceUnknownParent = 'Failure_Namespace_Unknown_Parent', - FailureNamespaceAlreadyExists = 'Failure_Namespace_Already_Exists', - FailureNamespaceAlreadyActive = 'Failure_Namespace_Already_Active', - FailureNamespaceEternalAfterNemesisBlock = 'Failure_Namespace_Eternal_After_Nemesis_Block', - FailureNamespaceMaxChildrenExceeded = 'Failure_Namespace_Max_Children_Exceeded', - FailureNamespaceAliasInvalidAction = 'Failure_Namespace_Alias_Invalid_Action', - FailureNamespaceUnknown = 'Failure_Namespace_Unknown', - FailureNamespaceAliasAlreadyExists = 'Failure_Namespace_Alias_Already_Exists', - FailureNamespaceUnknownAlias = 'Failure_Namespace_Unknown_Alias', - FailureNamespaceAliasInconsistentUnlinkType = 'Failure_Namespace_Alias_Inconsistent_Unlink_Type', - FailureNamespaceAliasInconsistentUnlinkData = 'Failure_Namespace_Alias_Inconsistent_Unlink_Data', - FailureNamespaceAliasInvalidAddress = 'Failure_Namespace_Alias_Invalid_Address', - FailureRestrictionAccountInvalidRestrictionFlags = 'Failure_RestrictionAccount_Invalid_Restriction_Flags', - FailureRestrictionAccountInvalidModificationAction = 'Failure_RestrictionAccount_Invalid_Modification_Action', - FailureRestrictionAccountInvalidModificationAddress = 'Failure_RestrictionAccount_Invalid_Modification_Address', - FailureRestrictionAccountModificationOperationTypeIncompatible = 'Failure_RestrictionAccount_Modification_Operation_Type_Incompatible', - FailureRestrictionAccountRedundantModification = 'Failure_RestrictionAccount_Redundant_Modification', - FailureRestrictionAccountInvalidModification = 'Failure_RestrictionAccount_Invalid_Modification', - FailureRestrictionAccountModificationCountExceeded = 'Failure_RestrictionAccount_Modification_Count_Exceeded', - FailureRestrictionAccountNoModifications = 'Failure_RestrictionAccount_No_Modifications', - FailureRestrictionAccountValuesCountExceeded = 'Failure_RestrictionAccount_Values_Count_Exceeded', - FailureRestrictionAccountInvalidValue = 'Failure_RestrictionAccount_Invalid_Value', - FailureRestrictionAccountAddressInteractionProhibited = 'Failure_RestrictionAccount_Address_Interaction_Prohibited', - FailureRestrictionAccountMosaicTransferProhibited = 'Failure_RestrictionAccount_Mosaic_Transfer_Prohibited', - FailureRestrictionAccountOperationTypeProhibited = 'Failure_RestrictionAccount_Operation_Type_Prohibited', - FailureRestrictionMosaicInvalidRestrictionType = 'Failure_RestrictionMosaic_Invalid_Restriction_Type', - FailureRestrictionMosaicPreviousValueMismatch = 'Failure_RestrictionMosaic_Previous_Value_Mismatch', - FailureRestrictionMosaicPreviousValueMustBeZero = 'Failure_RestrictionMosaic_Previous_Value_Must_Be_Zero', - FailureRestrictionMosaicMaxRestrictionsExceeded = 'Failure_RestrictionMosaic_Max_Restrictions_Exceeded', - FailureRestrictionMosaicCannotDeleteNonexistentRestriction = 'Failure_RestrictionMosaic_Cannot_Delete_Nonexistent_Restriction', - FailureRestrictionMosaicUnknownGlobalRestriction = 'Failure_RestrictionMosaic_Unknown_Global_Restriction', - FailureRestrictionMosaicInvalidGlobalRestriction = 'Failure_RestrictionMosaic_Invalid_Global_Restriction', - FailureRestrictionMosaicAccountUnauthorized = 'Failure_RestrictionMosaic_Account_Unauthorized', - FailureTransferMessageTooLarge = 'Failure_Transfer_Message_Too_Large', - FailureTransferOutOfOrderMosaics = 'Failure_Transfer_Out_Of_Order_Mosaics', - FailureChainUnlinked = 'Failure_Chain_Unlinked', - FailureChainBlockNotHit = 'Failure_Chain_Block_Not_Hit', - FailureChainBlockInconsistentStateHash = 'Failure_Chain_Block_Inconsistent_State_Hash', - FailureChainBlockInconsistentReceiptsHash = 'Failure_Chain_Block_Inconsistent_Receipts_Hash', - FailureChainUnconfirmedCacheTooFull = 'Failure_Chain_Unconfirmed_Cache_Too_Full', - FailureConsumerEmptyInput = 'Failure_Consumer_Empty_Input', - FailureConsumerBlockTransactionsHashMismatch = 'Failure_Consumer_Block_Transactions_Hash_Mismatch', - NeutralConsumerHashInRecencyCache = 'Neutral_Consumer_Hash_In_Recency_Cache', - FailureConsumerRemoteChainTooManyBlocks = 'Failure_Consumer_Remote_Chain_Too_Many_Blocks', - FailureConsumerRemoteChainImproperLink = 'Failure_Consumer_Remote_Chain_Improper_Link', - FailureConsumerRemoteChainDuplicateTransactions = 'Failure_Consumer_Remote_Chain_Duplicate_Transactions', - FailureConsumerRemoteChainUnlinked = 'Failure_Consumer_Remote_Chain_Unlinked', - FailureConsumerRemoteChainDifficultiesMismatch = 'Failure_Consumer_Remote_Chain_Difficulties_Mismatch', - FailureConsumerRemoteChainScoreNotBetter = 'Failure_Consumer_Remote_Chain_Score_Not_Better', - FailureConsumerRemoteChainTooFarBehind = 'Failure_Consumer_Remote_Chain_Too_Far_Behind', - FailureConsumerRemoteChainTooFarInFuture = 'Failure_Consumer_Remote_Chain_Too_Far_In_Future', - FailureConsumerBatchSignatureNotVerifiable = 'Failure_Consumer_Batch_Signature_Not_Verifiable', - FailureExtensionPartialTransactionCachePrune = 'Failure_Extension_Partial_Transaction_Cache_Prune', - FailureExtensionPartialTransactionDependencyRemoved = 'Failure_Extension_Partial_Transaction_Dependency_Removed', - FailureExtensionReadRateLimitExceeded = 'Failure_Extension_Read_Rate_Limit_Exceeded', -} diff --git a/src/infrastructure/model/transactionTypeEnum.ts b/src/infrastructure/model/transactionTypeEnum.ts deleted file mode 100644 index ae023bc034..0000000000 --- a/src/infrastructure/model/transactionTypeEnum.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Type of transaction: * 0x414C (16716 decimal) - AccountLinkTransaction. * 0x4141 (16705 decimal) -AggregateCompleteTransaction. - * 0x4241 (16961 decimal) - AggregateBondedTransaction. - * 0x414D (16717 decimal) - MosaicDefinitionTransaction. - * 0x424D (16973 decimal) - MosaicSupplyChangeTransaction. - * 0x414E (16718 decimal) - NamespaceRegistrationTransaction. - * 0x424E (16974 decimal) - AddressAliasTransaction. - * 0x434E (17230 decimal) - MosaicAliasTransaction. - * 0x4144 (16708 decimal) - AccountMetadataTransaction. - * 0x4244 (16964 decimal) - MosaicMetadataTransaction. - * 0x4344 (17220 decimal) - NamespaceMetadataTransaction. - * 0x4155 (16725 decimal) - MultisigAccountModificationTransaction. - * 0x4148 (16712 decimal) - HashLockTransaction. - * 0x4152 (16722 decimal) - SecretLockTransaction. - * 0x4252 (16978 decimal) - SecretProofTransaction. - * 0x4150 (16720 decimal) - AccountAddressRestrictionTransaction. - * 0x4250 (16976 decimal) - AccountMosaicRestrictionTransaction. - * 0x4350 (17232 decimal) - AccountOperationRestrictionTransaction. - * 0x4151 (16721 decimal) - MosaicGlobalRestrictionTransaction. - * 0x4251 (16977 decimal) - MosaicAddressRestrictionTransaction. - * 0x4154 (16724 decimal) - TransferTransaction. - */ -export enum TransactionTypeEnum { - NUMBER_16716 = 16716, - NUMBER_16705 = 16705, - NUMBER_16961 = 16961, - NUMBER_16717 = 16717, - NUMBER_16973 = 16973, - NUMBER_16718 = 16718, - NUMBER_16974 = 16974, - NUMBER_17230 = 17230, - NUMBER_16708 = 16708, - NUMBER_16964 = 16964, - NUMBER_17220 = 17220, - NUMBER_16725 = 16725, - NUMBER_16712 = 16712, - NUMBER_16722 = 16722, - NUMBER_16978 = 16978, - NUMBER_16720 = 16720, - NUMBER_16976 = 16976, - NUMBER_17232 = 17232, - NUMBER_16721 = 16721, - NUMBER_16977 = 16977, - NUMBER_16724 = 16724, -} diff --git a/src/infrastructure/model/transferTransactionBodyDTO.ts b/src/infrastructure/model/transferTransactionBodyDTO.ts deleted file mode 100644 index 38d99a09fe..0000000000 --- a/src/infrastructure/model/transferTransactionBodyDTO.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MessageDTO } from './messageDTO'; -import { UnresolvedMosaic } from './unresolvedMosaic'; - -export class TransferTransactionBodyDTO { - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'recipientAddress': string; - /** - * Array of mosaics sent to the recipient. - */ - 'mosaics': Array; - 'message': MessageDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - }, - { - "name": "mosaics", - "baseName": "mosaics", - "type": "Array" - }, - { - "name": "message", - "baseName": "message", - "type": "MessageDTO" - } ]; - - static getAttributeTypeMap() { - return TransferTransactionBodyDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/transferTransactionDTO.ts b/src/infrastructure/model/transferTransactionDTO.ts deleted file mode 100644 index 287211e77a..0000000000 --- a/src/infrastructure/model/transferTransactionDTO.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { MessageDTO } from './messageDTO'; -import { NetworkTypeEnum } from './networkTypeEnum'; -import { TransactionDTO } from './transactionDTO'; -import { TransferTransactionBodyDTO } from './transferTransactionBodyDTO'; -import { UnresolvedMosaic } from './unresolvedMosaic'; - -/** -* Transaction to transfer mosaics and a message to another account. -*/ -export class TransferTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. - */ - 'version': number; - 'network': NetworkTypeEnum; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'recipientAddress': string; - /** - * Array of mosaics sent to the recipient. - */ - 'mosaics': Array; - 'message': MessageDTO; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "network", - "baseName": "network", - "type": "NetworkTypeEnum" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "recipientAddress", - "baseName": "recipientAddress", - "type": "string" - }, - { - "name": "mosaics", - "baseName": "mosaics", - "type": "Array" - }, - { - "name": "message", - "baseName": "message", - "type": "MessageDTO" - } ]; - - static getAttributeTypeMap() { - return TransferTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/unresolvedMosaic.ts b/src/infrastructure/model/unresolvedMosaic.ts deleted file mode 100644 index 9aa1b06cd6..0000000000 --- a/src/infrastructure/model/unresolvedMosaic.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class UnresolvedMosaic { - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'id': string; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'amount': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return UnresolvedMosaic.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/verifiableEntityDTO.ts b/src/infrastructure/model/verifiableEntityDTO.ts deleted file mode 100644 index 7eee4865b2..0000000000 --- a/src/infrastructure/model/verifiableEntityDTO.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.20.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class VerifiableEntityDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return VerifiableEntityDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/templates/api-all.mustache b/src/infrastructure/templates/api-all.mustache deleted file mode 100755 index bf79c0fe05..0000000000 --- a/src/infrastructure/templates/api-all.mustache +++ /dev/null @@ -1,13 +0,0 @@ -{{>licenseInfo}} -{{#apiInfo}} -{{#apis}} -{{#operations}} -export * from './{{ classFilename }}'; -import { {{ classname }} } from './{{ classFilename }}'; -{{/operations}} -{{#withInterfaces}} -export * from './{{ classFilename }}Interface' -{{/withInterfaces}} -{{/apis}} -export const APIS = [{{#apis}}{{#operations}}{{ classname }}{{/operations}}{{^-last}}, {{/-last}}{{/apis}}]; -{{/apiInfo}} diff --git a/src/infrastructure/templates/api-single.mustache b/src/infrastructure/templates/api-single.mustache deleted file mode 100755 index 3894c241dc..0000000000 --- a/src/infrastructure/templates/api-single.mustache +++ /dev/null @@ -1,235 +0,0 @@ -{{>licenseInfo}} -import localVarRequest = require('request'); -import http = require('http'); - -/* tslint:disable:no-unused-locals */ -{{#imports}} -import { {{classname}} } from '../{{filename}}'; -{{/imports}} - -import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; -{{#hasAuthMethods}} -{{#authMethods}} -{{#isBasic}} -import { HttpBasicAuth } from '../model/models'; -{{/isBasic}} -{{#isApiKey}} -import { ApiKeyAuth } from '../model/models'; -{{/isApiKey}} -{{#isOAuth}} -import { OAuth } from '../model/models'; -{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} - -let defaultBasePath = '{{{basePath}}}'; - -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== - -{{#operations}} -{{#description}} -/** - * {{&description}} - */ -{{/description}} -export enum {{classname}}ApiKeys { -{{#authMethods}} -{{#isApiKey}} - {{name}}, -{{/isApiKey}} -{{/authMethods}} -} - -export class {{classname}} { - protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; - protected _useQuerystring : boolean = false; - - protected authentications = { - 'default': new VoidAuth(), -{{#hasAuthMethods}} -{{#authMethods}} -{{#isBasic}} - '{{name}}': new HttpBasicAuth(), -{{/isBasic}} -{{#isApiKey}} - '{{name}}': new ApiKeyAuth({{#isKeyInHeader}}'header'{{/isKeyInHeader}}{{^isKeyInHeader}}'query'{{/isKeyInHeader}}, '{{keyParamName}}'), -{{/isApiKey}} -{{#isOAuth}} - '{{name}}': new OAuth(), -{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} - } - - constructor(basePath?: string); -{{#authMethods}} -{{#isBasic}} - constructor(username: string, password: string, basePath?: string); -{{/isBasic}} -{{/authMethods}} - constructor(basePathOrUsername: string, password?: string, basePath?: string) { - if (password) { -{{#authMethods}} -{{#isBasic}} - this.username = basePathOrUsername; - this.password = password -{{/isBasic}} -{{/authMethods}} - if (basePath) { - this.basePath = basePath; - } - } else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername - } - } - } - - set useQuerystring(value: boolean) { - this._useQuerystring = value; - } - - set basePath(basePath: string) { - this._basePath = basePath; - } - - get basePath() { - return this._basePath; - } - - public setDefaultAuthentication(auth: Authentication) { - this.authentications.default = auth; - } - - public setApiKey(key: {{classname}}ApiKeys, value: string) { - (this.authentications as any)[{{classname}}ApiKeys[key]].apiKey = value; - } -{{#hasAuthMethods}} -{{#authMethods}} -{{#isBasic}} - set username(username: string) { - this.authentications.{{name}}.username = username; - } - - set password(password: string) { - this.authentications.{{name}}.password = password; - } -{{/isBasic}} -{{#isOAuth}} - - set accessToken(token: string) { - this.authentications.{{name}}.accessToken = token; - } -{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} - -{{#operation}} - /** - * {{¬es}} - {{#summary}} - * @summary {{&summary}} - {{/summary}} - {{#allParams}} - * @param {{paramName}} {{description}} - {{/allParams}} - */ - public async {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.{{#supportsES6}}IncomingMessage{{/supportsES6}}{{^supportsES6}}ClientResponse{{/supportsES6}}; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }> { - const localVarPath = this.basePath + '{{{path}}}'{{#pathParams}} - .replace('{' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}}; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - -{{#allParams}} -{{#required}} - // verify required parameter '{{paramName}}' is not null or undefined - if ({{paramName}} === null || {{paramName}} === undefined) { - throw new Error('Required parameter {{paramName}} was null or undefined when calling {{nickname}}.'); - } - -{{/required}} -{{/allParams}} -{{#queryParams}} - if ({{paramName}} !== undefined) { - localVarQueryParameters['{{baseName}}'] = ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}"); - } - -{{/queryParams}} -{{#headerParams}} - localVarHeaderParams['{{baseName}}'] = ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}"); -{{/headerParams}} - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - -{{#formParams}} - if ({{paramName}} !== undefined) { - {{#isFile}} - localVarFormParams['{{baseName}}'] = {{paramName}}; - {{/isFile}} - {{^isFile}} - localVarFormParams['{{baseName}}'] = ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}"); - {{/isFile}} - } -{{#isFile}} - localVarUseFormData = true; -{{/isFile}} - -{{/formParams}} - let localVarRequestOptions: localVarRequest.Options = { - method: '{{httpMethod}}', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, -{{^isResponseFile}} - json: true, -{{/isResponseFile}} -{{#isResponseFile}} - encoding: null, -{{/isResponseFile}} -{{#bodyParam}} - body: ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}") -{{/bodyParam}} - }; - -{{#authMethods}} - this.authentications.{{name}}.applyToRequest(localVarRequestOptions); - -{{/authMethods}} - this.authentications.default.applyToRequest(localVarRequestOptions); - - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.{{#supportsES6}}IncomingMessage{{/supportsES6}}{{^supportsES6}}ClientResponse{{/supportsES6}}; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - {{#returnType}} - body = ObjectSerializer.deserialize(body, "{{{returnType}}}"); - {{/returnType}} - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response, body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - } -{{/operation}} -} -{{/operations}} diff --git a/src/infrastructure/templates/api.mustache b/src/infrastructure/templates/api.mustache deleted file mode 100755 index 07d1fde760..0000000000 --- a/src/infrastructure/templates/api.mustache +++ /dev/null @@ -1,4 +0,0 @@ -{{>licenseInfo}} -// This is the entrypoint for the package -export * from './api/apis'; -export * from './model/models'; \ No newline at end of file diff --git a/src/infrastructure/templates/git_push.sh.mustache b/src/infrastructure/templates/git_push.sh.mustache deleted file mode 100755 index 8a32e53995..0000000000 --- a/src/infrastructure/templates/git_push.sh.mustache +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/src/infrastructure/templates/gitignore b/src/infrastructure/templates/gitignore deleted file mode 100755 index 149b576547..0000000000 --- a/src/infrastructure/templates/gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/src/infrastructure/templates/licenseInfo.mustache b/src/infrastructure/templates/licenseInfo.mustache deleted file mode 100755 index d81df515fd..0000000000 --- a/src/infrastructure/templates/licenseInfo.mustache +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * {{{appName}}} - * {{{appDescription}}} - * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ diff --git a/src/infrastructure/templates/model.mustache b/src/infrastructure/templates/model.mustache deleted file mode 100755 index 3a3a1a3918..0000000000 --- a/src/infrastructure/templates/model.mustache +++ /dev/null @@ -1,69 +0,0 @@ -{{>licenseInfo}} -{{#models}} -{{#model}} -{{#tsImports}} -import { {{classname}} } from './{{filename}}'; -{{/tsImports}} - -{{#description}} -/** -* {{{description}}} -*/ -{{/description}} -export class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ -{{#vars}} -{{#description}} - /** - * {{{description}}} - */ -{{/description}} - '{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}; -{{/vars}} - - {{#discriminator}} - static discriminator: string | undefined = "{{discriminatorName}}"; - {{/discriminator}} - {{^discriminator}} - static discriminator: string | undefined = undefined; - {{/discriminator}} - - {{^isArrayModel}} - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - {{#vars}} - { - "name": "{{name}}", - "baseName": "{{baseName}}", - "type": "{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}" - }{{#hasMore}}, - {{/hasMore}} - {{/vars}} - ]; - - static getAttributeTypeMap() { - {{#parent}} - return super.getAttributeTypeMap().concat({{classname}}.attributeTypeMap); - {{/parent}} - {{^parent}} - return {{classname}}.attributeTypeMap; - {{/parent}} - } - {{/isArrayModel}} -} - -{{#hasEnums}} -export namespace {{classname}} { -{{#vars}} -{{#isEnum}} - export enum {{enumName}} { - {{#allowableValues}} - {{#enumVars}} - {{name}} = {{{value}}}{{^-last}},{{/-last}} - {{/enumVars}} - {{/allowableValues}} - } -{{/isEnum}} -{{/vars}} -} -{{/hasEnums}} -{{/model}} -{{/models}} \ No newline at end of file diff --git a/src/infrastructure/templates/models.mustache b/src/infrastructure/templates/models.mustache deleted file mode 100755 index f7f1d2e0a8..0000000000 --- a/src/infrastructure/templates/models.mustache +++ /dev/null @@ -1,210 +0,0 @@ -{{#models}} -{{#model}} -export * from './{{{ classFilename }}}'; -{{/model}} -{{/models}} - -import localVarRequest = require('request'); - -{{#models}} -{{#model}} -import { {{classname}} } from './{{{ classFilename }}}'; -{{/model}} -{{/models}} - -/* tslint:disable:no-unused-variable */ -let primitives = [ - "string", - "boolean", - "double", - "integer", - "long", - "float", - "number", - "any" - ]; - -let enumsMap: {[index: string]: any} = { - {{#models}} - {{#model}} - {{#hasEnums}} - {{#vars}} - {{#isEnum}} - {{#isContainer}}"{{classname}}.{{enumName}}": {{classname}}.{{enumName}}{{/isContainer}}{{^isContainer}}"{{datatypeWithEnum}}": {{datatypeWithEnum}}{{/isContainer}}, - {{/isEnum}} - {{/vars}} - {{/hasEnums}} - {{/model}} - {{/models}} -} - -let typeMap: {[index: string]: any} = { - {{#models}} - {{#model}} - "{{classname}}": {{classname}}, - {{/model}} - {{/models}} -} - -export class ObjectSerializer { - public static findCorrectType(data: any, expectedType: string) { - if (data == undefined) { - return expectedType; - } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { - return expectedType; - } else if (expectedType === "Date") { - return expectedType; - } else { - if (enumsMap[expectedType]) { - return expectedType; - } - - if (!typeMap[expectedType]) { - return expectedType; // w/e we don't know the type - } - - // Check the discriminator - let discriminatorProperty = typeMap[expectedType].discriminator; - if (discriminatorProperty == null) { - return expectedType; // the type does not have a discriminator. use it. - } else { - if (data[discriminatorProperty]) { - var discriminatorType = data[discriminatorProperty]; - if(typeMap[discriminatorType]){ - return discriminatorType; // use the type given in the discriminator - } else { - return expectedType; // discriminator did not map to a type - } - } else { - return expectedType; // discriminator was not present (or an empty string) - } - } - } - } - - public static serialize(data: any, type: string) { - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.serialize(date, subType)); - } - return transformedData; - } else if (type === "Date") { - return data.toISOString(); - } else { - if (enumsMap[type]) { - return data; - } - if (!typeMap[type]) { // in case we dont know the type - return data; - } - - // Get the actual type of this object - type = this.findCorrectType(data, type); - - // get the map for the correct type. - let attributeTypes = typeMap[type].getAttributeTypeMap(); - let instance: {[index: string]: any} = {}; - for (let index in attributeTypes) { - let attributeType = attributeTypes[index]; - instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); - } - return instance; - } - } - - public static deserialize(data: any, type: string) { - // polymorphism may change the actual type. - type = ObjectSerializer.findCorrectType(data, type); - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.deserialize(date, subType)); - } - return transformedData; - } else if (type === "Date") { - return new Date(data); - } else { - if (enumsMap[type]) {// is Enum - return data; - } - - if (!typeMap[type]) { // dont know the type - return data; - } - let instance = new typeMap[type](); - let attributeTypes = typeMap[type].getAttributeTypeMap(); - for (let index in attributeTypes) { - let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); - } - return instance; - } - } -} - -export interface Authentication { - /** - * Apply authentication settings to header and query params. - */ - applyToRequest(requestOptions: localVarRequest.Options): void; -} - -export class HttpBasicAuth implements Authentication { - public username: string = ''; - public password: string = ''; - - applyToRequest(requestOptions: localVarRequest.Options): void { - requestOptions.auth = { - username: this.username, password: this.password - } - } -} - -export class ApiKeyAuth implements Authentication { - public apiKey: string = ''; - - constructor(private location: string, private paramName: string) { - } - - applyToRequest(requestOptions: localVarRequest.Options): void { - if (this.location == "query") { - (requestOptions.qs)[this.paramName] = this.apiKey; - } else if (this.location == "header" && requestOptions && requestOptions.headers) { - requestOptions.headers[this.paramName] = this.apiKey; - } - } -} - -export class OAuth implements Authentication { - public accessToken: string = ''; - - applyToRequest(requestOptions: localVarRequest.Options): void { - if (requestOptions && requestOptions.headers) { - requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; - } - } -} - -export class VoidAuth implements Authentication { - public username: string = ''; - public password: string = ''; - - applyToRequest(_: localVarRequest.Options): void { - // Do nothing - } -} \ No newline at end of file diff --git a/src/infrastructure/templates/package.mustache b/src/infrastructure/templates/package.mustache deleted file mode 100755 index ff1c5c4451..0000000000 --- a/src/infrastructure/templates/package.mustache +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "{{npmName}}", - "version": "{{npmVersion}}", - "description": "NodeJS client for {{npmName}}", - "repository": "{{gitUserId}}/{{gitRepoId}}", - "main": "dist/api.js", - "types": "dist/api.d.ts", - "scripts": { - "clean": "rm -Rf node_modules/ *.js", - "build": "tsc", - "test": "npm run build && node dist/client.js" - }, - "author": "OpenAPI-Generator Contributors", - "license": "Unlicense", - "dependencies": { - "bluebird": "^3.5.0", - "request": "^2.81.0", - "@types/bluebird": "*", - "@types/request": "*", - "rewire": "^3.0.2" - }, - "devDependencies": { - "typescript": "^2.4.2", - "@types/node": "8.10.34" - }{{#npmRepository}}, - "publishConfig": { - "registry": "{{npmRepository}}" - }{{/npmRepository}} -} diff --git a/src/infrastructure/templates/tsconfig.mustache b/src/infrastructure/templates/tsconfig.mustache deleted file mode 100755 index 160a99593a..0000000000 --- a/src/infrastructure/templates/tsconfig.mustache +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "noImplicitAny": false, - "suppressImplicitAnyIndexErrors": true, - "target": "{{#supportsES6}}ES6{{/supportsES6}}{{^supportsES6}}ES5{{/supportsES6}}", - "strict": true, - "moduleResolution": "node", - "removeComments": true, - "sourceMap": true, - "noLib": false, - "declaration": true, - "lib": ["dom", "es6", "es5", "dom.iterable", "scripthost"], - "outDir": "dist", - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "dist", - "node_modules" - ] -} diff --git a/test/infrastructure/TransactionHttp.spec.ts b/test/infrastructure/TransactionHttp.spec.ts index 2affa29288..02d9af414a 100644 --- a/test/infrastructure/TransactionHttp.spec.ts +++ b/test/infrastructure/TransactionHttp.spec.ts @@ -13,16 +13,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {expect} from 'chai'; -import {TransactionHttp} from '../../src/infrastructure/TransactionHttp'; -import {Address} from '../../src/model/account/Address'; -import {NetworkType} from '../../src/model/blockchain/NetworkType'; -import {PlainMessage} from '../../src/model/message/PlainMessage'; -import {AggregateTransaction} from '../../src/model/transaction/AggregateTransaction'; -import {Deadline} from '../../src/model/transaction/Deadline'; -import {TransferTransaction} from '../../src/model/transaction/TransferTransaction'; -import {NIS2_URL, TestingAccount} from '../conf/conf.spec'; +import http = require('http'); +import { expect } from 'chai'; +import { + BlockRoutesApi, + TransactionRoutesApi, + TransactionStateTypeEnum, + TransactionStatusDTO, + TransactionStatusTypeEnum +} from 'nem2-sdk-openapi-typescript-node-client'; +import { deepEqual, instance, mock, when } from 'ts-mockito'; + +import { TransactionHttp } from '../../src/infrastructure/TransactionHttp'; +import { Address } from '../../src/model/account/Address'; +import { NetworkType } from '../../src/model/blockchain/NetworkType'; +import { PlainMessage } from '../../src/model/message/PlainMessage'; +import { AggregateTransaction } from '../../src/model/transaction/AggregateTransaction'; +import { Deadline } from '../../src/model/transaction/Deadline'; +import { TransferTransaction } from '../../src/model/transaction/TransferTransaction'; +import { NIS2_URL, TestingAccount } from '../conf/conf.spec'; describe('TransactionHttp', () => { const account = TestingAccount; @@ -52,4 +62,60 @@ describe('TransactionHttp', () => { .then(); }).to.throw(Error, 'Only Transaction Type 0x4241 is allowed for announce aggregate bonded'); }); + + let clientResponse: http.ClientResponse; + let transactionRoutesApi: TransactionRoutesApi; + let transactionHttp: TransactionHttp; + let blockRoutesApi: BlockRoutesApi; + + before(() => { + transactionRoutesApi = mock(); + blockRoutesApi = mock(); + clientResponse = mock(); + transactionHttp = new TransactionHttp(NIS2_URL); + (transactionHttp as object)['transactionRoutesApi'] = instance(transactionRoutesApi); + (transactionHttp as object)['blockRoutesApi'] = instance(blockRoutesApi); + }); + + it('Test getTransactionStatus method', async () => { + const hash = 'abc'; + const transactionStatusDTO = new TransactionStatusDTO(); + transactionStatusDTO.code = TransactionStatusTypeEnum.FailureAccountLinkInvalidAction; + transactionStatusDTO.deadline = '1234'; + transactionStatusDTO.hash = hash; + transactionStatusDTO.group = TransactionStateTypeEnum.Failed; + transactionStatusDTO.height = '567'; + + when(transactionRoutesApi.getTransactionStatus(deepEqual(hash))) + .thenReturn(Promise.resolve({response: instance(clientResponse), body: transactionStatusDTO})); + + const transactionStatus = await transactionHttp.getTransactionStatus(hash).toPromise(); + + expect(transactionStatus.deadline.toString()).to.be.equal('1234'); + expect(transactionStatus.hash).to.be.equal(hash); + expect(transactionStatus.code).to.be.equal('Failure_AccountLink_Invalid_Action'); + expect(transactionStatus.group).to.be.equal('failed'); + }); + + it('Test getTransactionsStatuses method', async () => { + const hash = 'abc'; + const transactionStatusDTO = new TransactionStatusDTO(); + transactionStatusDTO.code = TransactionStatusTypeEnum.FailureAccountLinkInvalidAction; + transactionStatusDTO.deadline = '1234'; + transactionStatusDTO.hash = hash; + transactionStatusDTO.group = TransactionStateTypeEnum.Failed; + transactionStatusDTO.height = '567'; + when(transactionRoutesApi.getTransactionsStatuses(deepEqual({hashes: [hash]}))) + .thenReturn(Promise.resolve({response: instance(clientResponse), body: [transactionStatusDTO]})); + + const transactionStatuses = await transactionHttp.getTransactionsStatuses([hash]).toPromise(); + expect(transactionStatuses.length).to.be.equal(1); + const transactionStatus = transactionStatuses[0]; + + expect(transactionStatus.deadline.toString()).to.be.equal('1234'); + expect(transactionStatus.hash).to.be.equal(hash); + expect(transactionStatus.code).to.be.equal('Failure_AccountLink_Invalid_Action'); + expect(transactionStatus.group).to.be.equal('failed'); + + }); }); diff --git a/test/model/transaction/TransactionStatus.spec.ts b/test/model/transaction/TransactionStatus.spec.ts index 55a2b31464..b75d779c62 100644 --- a/test/model/transaction/TransactionStatus.spec.ts +++ b/test/model/transaction/TransactionStatus.spec.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import {deepEqual} from 'assert'; -import {expect} from 'chai'; -import { TransactionStatusTypeEnum } from '../../../src/infrastructure/model/transactionStatusTypeEnum'; -import {Deadline} from '../../../src/model/transaction/Deadline'; -import {TransactionStatus} from '../../../src/model/transaction/TransactionStatus'; -import {UInt64} from '../../../src/model/UInt64'; +import { deepEqual } from 'assert'; +import { expect } from 'chai'; +import { TransactionStatusTypeEnum } from 'nem2-sdk-openapi-typescript-node-client'; +import { Deadline } from '../../../src/model/transaction/Deadline'; +import { TransactionStatus } from '../../../src/model/transaction/TransactionStatus'; +import { UInt64 } from '../../../src/model/UInt64'; describe('TransactionStatus', () => { it('should createComplete TransactionStatus object', () => { @@ -27,7 +27,7 @@ describe('TransactionStatus', () => { deadline: Deadline.createFromDTO('1'), group: 'confirmed', hash: '18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219', - height: new UInt64([ 1, 0 ]), + height: new UInt64([1, 0]), code: TransactionStatusTypeEnum.Success, }; @@ -35,7 +35,7 @@ describe('TransactionStatus', () => { transactionStatusDTO.group, transactionStatusDTO.hash, transactionStatusDTO.deadline, - transactionStatusDTO.code, + transactionStatusDTO.code.toString(), transactionStatusDTO.height, ); From d95bfc72fe4823a2a32b8f3a78c997d105b44599 Mon Sep 17 00:00:00 2001 From: Fernando Boucquez Date: Mon, 30 Dec 2019 16:57:16 -0300 Subject: [PATCH 2/4] Fixed exception handling. Added e2e test around exception handling Open api released version --- e2e/infrastructure/AccountHttp.spec.ts | 13 +++++++++++++ package.json | 2 +- src/infrastructure/Http.ts | 5 ++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/e2e/infrastructure/AccountHttp.spec.ts b/e2e/infrastructure/AccountHttp.spec.ts index 2335d2bab2..85c3c1e9d9 100644 --- a/e2e/infrastructure/AccountHttp.spec.ts +++ b/e2e/infrastructure/AccountHttp.spec.ts @@ -225,6 +225,19 @@ describe('AccountHttp', () => { }); }); + describe('transactions', () => { + it('should not return accounts when account does not exist', () => { + return accountRepository.getAccountInfo(Account.generateNewAccount(networkType).address).toPromise().then(r => { + return Promise.reject('should fail!'); + }, err => { + const error = JSON.parse(err.message); + expect(error.statusCode).to.be.eq(404); + expect(error.errorDetails.statusMessage).to.be.eq('Not Found'); + return Promise.resolve(); + }); + }); + }); + describe('transactions', () => { it('should call transactions successfully', (done) => { accountRepository.getAccountTransactions(publicAccount.address).subscribe((transactions) => { diff --git a/package.json b/package.json index d1500ac87f..fdc10ce791 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "dependencies": { "bluebird": "^3.5.5", "catbuffer": "0.0.6-SNAPSHOT", - "nem2-sdk-openapi-typescript-node-client": "0.7.2-0.6-SNAPSHOT.201912301439", + "nem2-sdk-openapi-typescript-node-client": "0.7.2-0.6", "crypto-js": "^3.1.9-1", "js-joda": "^1.6.2", "js-sha256": "^0.9.0", diff --git a/src/infrastructure/Http.ts b/src/infrastructure/Http.ts index 7103a325cd..1914e715fa 100644 --- a/src/infrastructure/Http.ts +++ b/src/infrastructure/Http.ts @@ -61,7 +61,10 @@ export abstract class Http { if (error.response && error.response.statusCode && error.body) { const formattedError = { statusCode: error.response.statusCode, - errorDetails: error.response, + errorDetails: { + statusCode: error.response.statusCode, + statusMessage: error.response.statusMessage, + }, body: error.body, }; return new Error(JSON.stringify(formattedError)); From 33866932549eb7f8b547d62f7d0ea35ab0eab675 Mon Sep 17 00:00:00 2001 From: Fernando Boucquez Date: Mon, 30 Dec 2019 17:04:51 -0300 Subject: [PATCH 3/4] fixed lock --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78c5fb6e87..ec4cde240a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3818,9 +3818,9 @@ } }, "nem2-sdk-openapi-typescript-node-client": { - "version": "0.7.2-0.6-SNAPSHOT.201912301439", - "resolved": "https://registry.npmjs.org/nem2-sdk-openapi-typescript-node-client/-/nem2-sdk-openapi-typescript-node-client-0.7.2-0.6-SNAPSHOT.201912301439.tgz", - "integrity": "sha512-Ly4majOnvFQ/qnlB0dMmLZbc7s9eDJ1Bv76MZNx1moK+Ndnn27zg6Vrlr3ZIDLQ0l3CRiA1nmj5pvsJpVpxGZw==", + "version": "0.7.2-0.6", + "resolved": "https://registry.npmjs.org/nem2-sdk-openapi-typescript-node-client/-/nem2-sdk-openapi-typescript-node-client-0.7.2-0.6.tgz", + "integrity": "sha512-dmXget4cHUe3LUUS52GrP8hwQHa4HL9Whbjqog2575e2UocKlwcBAskJrbURnVzEtp//CT2ChZKkiyKB+DRZvQ==", "requires": { "@types/bluebird": "*", "@types/request": "*", From 08c3059deb1657d0c8af12e72103ffc6d747bc3a Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Tue, 31 Dec 2019 09:16:22 +0000 Subject: [PATCH 4/4] Fixed #405 use enum type on transaction status --- package-lock.json | 4 ++-- src/infrastructure/TransactionHttp.ts | 4 ++-- src/model/transaction/TransactionStatus.ts | 5 +++-- test/model/transaction/TransactionStatus.spec.ts | 5 +++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index ec4cde240a..4593736762 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3995,7 +3995,7 @@ }, "is-fullwidth-code-point": { "version": "2.0.0", - "resolved": "", + "resolved": false, "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, @@ -4033,7 +4033,7 @@ }, "which-module": { "version": "2.0.0", - "resolved": "", + "resolved": false, "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, diff --git a/src/infrastructure/TransactionHttp.ts b/src/infrastructure/TransactionHttp.ts index a988e25c13..810701c4c1 100644 --- a/src/infrastructure/TransactionHttp.ts +++ b/src/infrastructure/TransactionHttp.ts @@ -126,10 +126,10 @@ export class TransactionHttp extends Http implements TransactionRepository { */ private toTransactionStatus(dto: TransactionStatusDTO): TransactionStatus { return new TransactionStatus( - dto.group.toString(), + dto.group, dto.hash, Deadline.createFromDTO(UInt64.fromNumericString(dto.deadline).toDTO()), - dto.code ? dto.code.toString() : '', + dto.code, dto.height ? UInt64.fromNumericString(dto.height) : undefined); } diff --git a/src/model/transaction/TransactionStatus.ts b/src/model/transaction/TransactionStatus.ts index d09689ad2f..866bb37d45 100644 --- a/src/model/transaction/TransactionStatus.ts +++ b/src/model/transaction/TransactionStatus.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { TransactionStateTypeEnum, TransactionStatusTypeEnum } from 'nem2-sdk-openapi-typescript-node-client'; import {UInt64} from '../UInt64'; import {Deadline} from './Deadline'; @@ -33,7 +34,7 @@ export class TransactionStatus { /** * The transaction status group "failed", "unconfirmed", "confirmed", etc... */ - public readonly group: string, + public readonly group: TransactionStateTypeEnum, /** * The transaction hash. */ @@ -45,7 +46,7 @@ export class TransactionStatus { /** * The transaction status code being the error name in case of failure and success otherwise. */ - public readonly code?: string, + public readonly code?: TransactionStatusTypeEnum, /** * The height of the block at which it was confirmed or rejected. */ diff --git a/test/model/transaction/TransactionStatus.spec.ts b/test/model/transaction/TransactionStatus.spec.ts index b75d779c62..163d47cee3 100644 --- a/test/model/transaction/TransactionStatus.spec.ts +++ b/test/model/transaction/TransactionStatus.spec.ts @@ -17,6 +17,7 @@ import { deepEqual } from 'assert'; import { expect } from 'chai'; import { TransactionStatusTypeEnum } from 'nem2-sdk-openapi-typescript-node-client'; +import { TransactionStateTypeEnum } from 'nem2-sdk-openapi-typescript-node-client'; import { Deadline } from '../../../src/model/transaction/Deadline'; import { TransactionStatus } from '../../../src/model/transaction/TransactionStatus'; import { UInt64 } from '../../../src/model/UInt64'; @@ -25,7 +26,7 @@ describe('TransactionStatus', () => { it('should createComplete TransactionStatus object', () => { const transactionStatusDTO = { deadline: Deadline.createFromDTO('1'), - group: 'confirmed', + group: TransactionStateTypeEnum.Confirmed, hash: '18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219', height: new UInt64([1, 0]), code: TransactionStatusTypeEnum.Success, @@ -35,7 +36,7 @@ describe('TransactionStatus', () => { transactionStatusDTO.group, transactionStatusDTO.hash, transactionStatusDTO.deadline, - transactionStatusDTO.code.toString(), + transactionStatusDTO.code, transactionStatusDTO.height, );