@fenixalliance/abs-api-client 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/index.ts +5 -0
- package/clients/cartService/core/ApiError.ts +24 -24
- package/clients/cartService/core/ApiRequestOptions.ts +16 -16
- package/clients/cartService/core/ApiResult.ts +10 -10
- package/clients/cartService/core/CancelablePromise.ts +130 -130
- package/clients/cartService/core/OpenAPI.ts +31 -31
- package/clients/cartService/core/request.ts +321 -321
- package/clients/cartService/index.ts +36 -52
- package/clients/cartService/models/CartDto.ts +1 -0
- package/clients/cartService/models/{RegisterRequest.ts → CartUpdateRequest.ts} +3 -3
- package/clients/cartService/models/{InfoResponse.ts → CountrySwitchRequest.ts} +3 -3
- package/clients/cartService/models/EmptyEnvelope.ts +11 -0
- package/clients/cartService/models/ItemCartRecordCreateDto.ts +1 -0
- package/clients/cartService/models/ItemCartRecordDto.ts +3 -1
- package/clients/{catalogService/models/ItemBrandDtoIReadOnlyCollectionEnvelope.ts → cartService/models/ItemCartRecordDtoListEnvelope.ts} +3 -3
- package/clients/cartService/models/{ItemToCompareCartRecordDtoIReadOnlyListEnvelope.ts → ItemToCompareCartRecordDtoListEnvelope.ts} +1 -1
- package/clients/cartService/models/WishListDto.ts +2 -1
- package/clients/cartService/services/CartsService.ts +53 -7
- package/clients/cartService/services/CompareService.ts +7 -6
- package/clients/cartService/services/RecordsService.ts +23 -20
- package/clients/cartService/services/WishListsService.ts +17 -17
- package/clients/catalogService/core/ApiError.ts +24 -24
- package/clients/catalogService/core/ApiRequestOptions.ts +16 -16
- package/clients/catalogService/core/ApiResult.ts +10 -10
- package/clients/catalogService/core/CancelablePromise.ts +130 -130
- package/clients/catalogService/core/OpenAPI.ts +31 -31
- package/clients/catalogService/core/request.ts +321 -321
- package/clients/catalogService/index.ts +102 -124
- package/clients/catalogService/models/EmptyEnvelope.ts +11 -0
- package/clients/catalogService/models/ItemAttachmentCreateDto.ts +4 -8
- package/clients/catalogService/models/ItemAttachmentUpdateDto.ts +2 -5
- package/clients/catalogService/models/ItemAttributeCreateDto.ts +3 -2
- package/clients/catalogService/models/{ItemAttributeDtoIReadOnlyCollectionEnvelope.ts → ItemAttributeDtoListEnvelope.ts} +1 -1
- package/clients/catalogService/models/ItemAttributeUpdateDto.ts +1 -1
- package/clients/catalogService/models/ItemBrandCreateDto.ts +4 -3
- package/clients/catalogService/models/ItemBrandUpdateDto.ts +1 -1
- package/clients/catalogService/models/ItemCategoryCreateDto.ts +3 -2
- package/clients/catalogService/models/ItemCategoryUpdateDto.ts +1 -1
- package/clients/catalogService/models/ItemGoogleCategoryDto.ts +12 -3
- package/clients/catalogService/models/{ItemImagesCreateDto.ts → ItemImageCreateDto.ts} +4 -4
- package/clients/catalogService/models/ItemImageDto.ts +0 -1
- package/clients/catalogService/models/{ItemImagesUpdateDto.ts → ItemImageUpdateDto.ts} +6 -9
- package/clients/catalogService/models/ItemQuestionCreateDto.ts +6 -5
- package/clients/catalogService/models/ItemQuestionRecordCreateDto.ts +14 -0
- package/clients/catalogService/models/ItemQuestionUpdateDto.ts +1 -3
- package/clients/catalogService/models/ItemReviewCreateDto.ts +1 -0
- package/clients/catalogService/models/ItemReviewRecordCreateDto.ts +12 -0
- package/clients/catalogService/models/ItemShippingPolicyDto.ts +6 -6
- package/clients/catalogService/models/ItemTagCreateDto.ts +3 -2
- package/clients/catalogService/models/ItemTagUpdateDto.ts +1 -1
- package/clients/catalogService/models/ItemTypeCreateDto.ts +3 -2
- package/clients/catalogService/models/ItemTypeDto.ts +4 -4
- package/clients/catalogService/models/ItemTypeUpdateDto.ts +1 -1
- package/clients/catalogService/models/ItemWarrantyPolicyDto.ts +3 -4
- package/clients/catalogService/models/PricingRuleCreateDto.ts +1 -1
- package/clients/catalogService/models/PricingRuleDto.ts +0 -1
- package/clients/catalogService/models/StockItemCreateDto.ts +100 -3
- package/clients/catalogService/models/StockItemDto.ts +133 -4
- package/clients/catalogService/models/StockItemUpdateDto.ts +99 -2
- package/clients/catalogService/services/ItemAttachmentsService.ts +24 -13
- package/clients/catalogService/services/ItemAttributesService.ts +19 -9
- package/clients/catalogService/services/ItemBrandsService.ts +19 -9
- package/clients/catalogService/services/ItemCategoriesService.ts +19 -9
- package/clients/catalogService/services/ItemImagesService.ts +23 -13
- package/clients/catalogService/services/ItemQuestionsService.ts +19 -9
- package/clients/catalogService/services/ItemReviewsService.ts +18 -8
- package/clients/catalogService/services/ItemTagsService.ts +17 -12
- package/clients/catalogService/services/ItemTypesService.ts +19 -9
- package/clients/catalogService/services/PricingRulesService.ts +19 -11
- package/clients/catalogService/services/ProductsService.ts +177 -214
- package/clients/{contactService → crmService}/core/ApiError.ts +24 -24
- package/clients/{contactService → crmService}/core/ApiRequestOptions.ts +16 -16
- package/clients/{contactService → crmService}/core/ApiResult.ts +10 -10
- package/clients/{contactService → crmService}/core/CancelablePromise.ts +130 -130
- package/clients/{contactService → crmService}/core/OpenAPI.ts +31 -31
- package/clients/{contactService → crmService}/core/request.ts +321 -321
- package/clients/crmService/index.ts +23 -0
- package/clients/crmService/models/CartDto.ts +18 -0
- package/clients/{cartService/models/WishListDtoEnvelope.ts → crmService/models/CartDtoEnvelope.ts} +3 -3
- package/clients/crmService/models/ContactDto.ts +57 -0
- package/clients/crmService/models/EmptyEnvelope.ts +11 -0
- package/clients/crmService/models/SocialProfileDto.ts +39 -0
- package/clients/crmService/models/SocialProfileDtoEnvelope.ts +14 -0
- package/clients/crmService/models/WalletDto.ts +22 -0
- package/clients/crmService/models/WalletDtoEnvelope.ts +14 -0
- package/clients/crmService/services/ContactsService.ts +286 -0
- package/clients/crmService/services/SyncService.ts +101 -0
- package/clients/forexService/core/ApiError.ts +24 -24
- package/clients/forexService/core/ApiRequestOptions.ts +16 -16
- package/clients/forexService/core/ApiResult.ts +10 -10
- package/clients/forexService/core/CancelablePromise.ts +130 -130
- package/clients/forexService/core/OpenAPI.ts +31 -31
- package/clients/forexService/core/request.ts +321 -321
- package/clients/forexService/index.ts +18 -30
- package/clients/{cartService/models/Envelope.ts → forexService/models/ErrorEnvelope.ts} +1 -2
- package/clients/forexService/models/ForexRatesDto.ts +1 -1
- package/clients/forexService/models/Money.ts +1 -1
- package/clients/forexService/services/ExchangeService.ts +17 -7
- package/clients/forexService/services/RatesService.ts +11 -1
- package/clients/holderService/core/ApiError.ts +24 -24
- package/clients/holderService/core/ApiRequestOptions.ts +16 -16
- package/clients/holderService/core/ApiResult.ts +10 -10
- package/clients/holderService/core/CancelablePromise.ts +130 -130
- package/clients/holderService/core/OpenAPI.ts +31 -31
- package/clients/holderService/core/request.ts +321 -321
- package/clients/holderService/index.ts +35 -31
- package/clients/holderService/models/AddressDto.ts +31 -0
- package/clients/holderService/models/AddressDtoListEnvelope.ts +14 -0
- package/clients/holderService/models/CartDto.ts +18 -0
- package/clients/holderService/models/CartDtoEnvelope.ts +14 -0
- package/clients/holderService/models/InvoiceDto.ts +13 -0
- package/clients/{invoicingService/models/InvoiceDtoIReadOnlyListEnvelope.ts → holderService/models/InvoiceDtoListEnvelope.ts} +1 -1
- package/clients/holderService/models/NotificationDto.ts +16 -0
- package/clients/holderService/models/NotificationDtoListEnvelope.ts +14 -0
- package/clients/holderService/models/OrderDto.ts +27 -0
- package/clients/holderService/models/OrderDtoListEnvelope.ts +14 -0
- package/clients/holderService/models/PaymentDto.ts +17 -0
- package/clients/holderService/models/PaymentDtoListEnvelope.ts +14 -0
- package/clients/{identityService/models/AccountHolderDto.ts → holderService/models/PlatformUserDto.ts} +4 -4
- package/clients/holderService/models/PlatformUserDtoEnvelope.ts +14 -0
- package/clients/holderService/models/SocialProfileDto.ts +39 -0
- package/clients/holderService/models/SocialProfileDtoEnvelope.ts +14 -0
- package/clients/{identityService/models/BusinessDto.ts → holderService/models/TenantDto.ts} +16 -15
- package/clients/holderService/models/TenantDtoListEnvelope.ts +14 -0
- package/clients/holderService/models/TenantEnrollmentDto.ts +14 -0
- package/clients/holderService/models/TenantEnrollmentDtoListEnvelope.ts +14 -0
- package/clients/holderService/models/WalletDto.ts +22 -0
- package/clients/holderService/models/WalletDtoEnvelope.ts +14 -0
- package/clients/holderService/services/HolderService.ts +99 -28
- package/clients/identityService/core/ApiError.ts +24 -24
- package/clients/identityService/core/ApiRequestOptions.ts +16 -16
- package/clients/identityService/core/ApiResult.ts +10 -10
- package/clients/identityService/core/CancelablePromise.ts +130 -130
- package/clients/identityService/core/OpenAPI.ts +31 -31
- package/clients/identityService/core/request.ts +321 -321
- package/clients/identityService/index.ts +40 -53
- package/clients/identityService/models/AccountHolderCreateDto.ts +1 -0
- package/clients/identityService/models/ApiResponse.ts +4 -5
- package/clients/{holderService/models/AccountHolderDto.ts → identityService/models/PlatformUserDto.ts} +4 -4
- package/clients/{holderService/models/BusinessDto.ts → identityService/models/TenantDto.ts} +16 -15
- package/clients/identityService/services/CheckerService.ts +3 -2
- package/clients/identityService/services/OAuthService.ts +8 -6
- package/clients/inventoryService/core/ApiError.ts +24 -24
- package/clients/inventoryService/core/ApiRequestOptions.ts +16 -16
- package/clients/inventoryService/core/ApiResult.ts +10 -10
- package/clients/inventoryService/core/CancelablePromise.ts +130 -130
- package/clients/inventoryService/core/OpenAPI.ts +31 -31
- package/clients/inventoryService/core/request.ts +321 -321
- package/clients/inventoryService/index.ts +10 -24
- package/clients/invoicingService/core/ApiError.ts +24 -24
- package/clients/invoicingService/core/ApiRequestOptions.ts +16 -16
- package/clients/invoicingService/core/ApiResult.ts +10 -10
- package/clients/invoicingService/core/CancelablePromise.ts +130 -130
- package/clients/invoicingService/core/OpenAPI.ts +31 -31
- package/clients/invoicingService/core/request.ts +321 -321
- package/clients/invoicingService/index.ts +23 -28
- package/clients/invoicingService/models/EmptyEnvelope.ts +11 -0
- package/clients/invoicingService/models/InvoiceCreateDto.ts +11 -0
- package/clients/invoicingService/models/InvoiceDtoEnvelope.ts +14 -0
- package/clients/{cartService/models/ProductCartRecordDto.ts → invoicingService/models/InvoiceLineDto.ts} +7 -10
- package/clients/invoicingService/models/InvoiceLineDtoEnvelope.ts +14 -0
- package/clients/{catalogService/models/ItemPricePolicyDtoEnvelope.ts → invoicingService/models/InvoiceLineDtoListEnvelope.ts} +3 -3
- package/clients/{tenantService/models/IntPtr.ts → invoicingService/models/InvoiceUpdateDto.ts} +1 -1
- package/clients/invoicingService/models/ItemPriceCreateDto.ts +20 -0
- package/clients/invoicingService/models/ItemPriceUpdateDto.ts +14 -0
- package/clients/invoicingService/services/InvoicesService.ts +253 -15
- package/clients/ordersService/core/ApiError.ts +25 -0
- package/clients/ordersService/core/ApiRequestOptions.ts +17 -0
- package/clients/ordersService/core/ApiResult.ts +11 -0
- package/clients/ordersService/core/CancelablePromise.ts +131 -0
- package/clients/ordersService/core/OpenAPI.ts +32 -0
- package/clients/ordersService/core/request.ts +322 -0
- package/clients/ordersService/index.ts +23 -0
- package/clients/ordersService/models/EmptyEnvelope.ts +11 -0
- package/clients/ordersService/models/ErrorEnvelope.ts +12 -0
- package/clients/ordersService/models/ItemPriceCreateDto.ts +20 -0
- package/clients/ordersService/models/ItemPriceUpdateDto.ts +14 -0
- package/clients/ordersService/models/OrderCreateDto.ts +16 -0
- package/clients/ordersService/models/OrderDto.ts +27 -0
- package/clients/ordersService/models/OrderDtoEnvelope.ts +14 -0
- package/clients/ordersService/models/OrderDtoListEnvelope.ts +14 -0
- package/clients/ordersService/models/OrderLineDto.ts +95 -0
- package/clients/ordersService/models/OrderLineDtoEnvelope.ts +14 -0
- package/clients/ordersService/models/OrderLineDtoListEnvelope.ts +14 -0
- package/clients/ordersService/models/OrderUpdateDto.ts +12 -0
- package/clients/ordersService/services/OrdersService.ts +296 -0
- package/clients/pricingService/core/ApiError.ts +24 -24
- package/clients/pricingService/core/ApiRequestOptions.ts +16 -16
- package/clients/pricingService/core/ApiResult.ts +10 -10
- package/clients/pricingService/core/CancelablePromise.ts +130 -130
- package/clients/pricingService/core/OpenAPI.ts +31 -31
- package/clients/pricingService/core/request.ts +321 -321
- package/clients/pricingService/index.ts +27 -29
- package/clients/pricingService/models/EmptyEnvelope.ts +11 -0
- package/clients/pricingService/models/ItemPriceCreateDto.ts +20 -0
- package/clients/pricingService/models/ItemPriceDto.ts +20 -0
- package/clients/pricingService/models/ItemPriceDtoEnvelope.ts +14 -0
- package/clients/pricingService/models/ItemPriceDtoListEnvelope.ts +14 -0
- package/clients/pricingService/models/ItemPriceUpdateDto.ts +14 -0
- package/clients/pricingService/models/Money.ts +1 -1
- package/clients/pricingService/models/PriceListCreateDto.ts +18 -0
- package/clients/pricingService/models/PriceListDto.ts +17 -0
- package/clients/pricingService/models/PriceListDtoEnvelope.ts +14 -0
- package/clients/pricingService/models/PriceListDtoListEnvelope.ts +14 -0
- package/clients/pricingService/models/PriceListUpdateDto.ts +14 -0
- package/clients/pricingService/services/PriceListsService.ts +254 -8
- package/clients/systemService/core/ApiError.ts +25 -0
- package/clients/systemService/core/ApiRequestOptions.ts +17 -0
- package/clients/systemService/core/ApiResult.ts +11 -0
- package/clients/systemService/core/CancelablePromise.ts +131 -0
- package/clients/systemService/core/OpenAPI.ts +32 -0
- package/clients/systemService/core/request.ts +322 -0
- package/clients/systemService/index.ts +14 -0
- package/clients/systemService/models/ErrorEnvelope.ts +12 -0
- package/clients/systemService/models/StringListEnvelope.ts +13 -0
- package/clients/systemService/services/AntiforgeryService.ts +29 -0
- package/clients/systemService/services/MigrationsService.ts +44 -0
- package/clients/tenantService/core/ApiError.ts +24 -24
- package/clients/tenantService/core/ApiRequestOptions.ts +16 -16
- package/clients/tenantService/core/ApiResult.ts +10 -10
- package/clients/tenantService/core/CancelablePromise.ts +130 -130
- package/clients/tenantService/core/OpenAPI.ts +31 -31
- package/clients/tenantService/core/request.ts +321 -321
- package/clients/tenantService/index.ts +33 -62
- package/clients/tenantService/models/BooleanEnvelope.ts +13 -0
- package/clients/tenantService/models/CartDto.ts +18 -0
- package/clients/tenantService/models/CartDtoEnvelope.ts +14 -0
- package/clients/tenantService/models/EmptyEnvelope.ts +11 -0
- package/clients/tenantService/models/ErrorEnvelope.ts +12 -0
- package/clients/tenantService/models/PlatformUserDto.ts +73 -0
- package/clients/tenantService/models/PlatformUserDtoListEnvelope.ts +14 -0
- package/clients/tenantService/models/SocialProfileDto.ts +39 -0
- package/clients/tenantService/models/SocialProfileDtoEnvelope.ts +14 -0
- package/clients/tenantService/models/{BusinessCreateDto.ts → TenantCreateDto.ts} +2 -1
- package/clients/tenantService/models/{BusinessDto.ts → TenantDto.ts} +16 -15
- package/clients/tenantService/models/TenantDtoEnvelope.ts +14 -0
- package/clients/tenantService/models/TenantEnrollmentDto.ts +14 -0
- package/clients/{cartService/models/WishListDtoIReadOnlyListEnvelope.ts → tenantService/models/TenantEnrollmentDtoEnvelope.ts} +3 -3
- package/clients/tenantService/models/TenantEnrollmentDtoListEnvelope.ts +14 -0
- package/clients/tenantService/models/WalletDto.ts +2 -1
- package/clients/tenantService/models/WalletDtoEnvelope.ts +14 -0
- package/clients/tenantService/models/{Error.ts → WebPortalDto.ts} +5 -3
- package/clients/tenantService/models/WebPortalDtoListEnvelope.ts +14 -0
- package/clients/tenantService/services/TenantsService.ts +230 -105
- package/clients/walletsService/core/ApiError.ts +25 -0
- package/clients/walletsService/core/ApiRequestOptions.ts +17 -0
- package/clients/walletsService/core/ApiResult.ts +11 -0
- package/clients/walletsService/core/CancelablePromise.ts +131 -0
- package/clients/walletsService/core/OpenAPI.ts +32 -0
- package/clients/walletsService/core/request.ts +322 -0
- package/clients/walletsService/index.ts +22 -0
- package/clients/walletsService/models/ErrorEnvelope.ts +12 -0
- package/clients/walletsService/models/InvoiceDto.ts +13 -0
- package/clients/walletsService/models/InvoiceDtoListEnvelope.ts +14 -0
- package/clients/walletsService/models/LocationDto.ts +31 -0
- package/clients/walletsService/models/LocationDtoListEnvelope.ts +14 -0
- package/clients/walletsService/models/OrderDto.ts +27 -0
- package/clients/walletsService/models/OrderDtoListEnvelope.ts +14 -0
- package/clients/walletsService/models/PaymentDto.ts +17 -0
- package/clients/walletsService/models/PaymentDtoListEnvelope.ts +14 -0
- package/clients/walletsService/models/WalletDto.ts +22 -0
- package/clients/walletsService/models/WalletDtoEnvelope.ts +14 -0
- package/clients/walletsService/services/WalletsService.ts +174 -0
- package/package.json +23 -21
- package/schemas/cartService/schema.s.ts +1166 -1560
- package/schemas/catalogService/schema.s.ts +5982 -6109
- package/schemas/crmService/schema.s.ts +804 -0
- package/schemas/forexService/schema.s.ts +602 -526
- package/schemas/holderService/schema.s.ts +831 -831
- package/schemas/identityService/schema.s.ts +744 -1119
- package/schemas/inventoryService/schema.s.ts +43 -425
- package/schemas/invoicingService/schema.s.ts +590 -521
- package/schemas/ordersService/schema.s.ts +605 -0
- package/schemas/pricingService/schema.s.ts +579 -549
- package/schemas/systemService/schema.s.ts +138 -0
- package/schemas/tenantService/schema.s.ts +1116 -1606
- package/schemas/walletsService/schema.s.ts +466 -0
- package/tsconfig.json +110 -0
- package/vite.config.js +29 -0
- package/wwwroot/build/bundle.js +1 -0
- package/clients/cartService/models/AccessTokenResponse.ts +0 -11
- package/clients/cartService/models/Error.ts +0 -10
- package/clients/cartService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/cartService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/cartService/models/InfoRequest.ts +0 -10
- package/clients/cartService/models/LoginRequest.ts +0 -11
- package/clients/cartService/models/RefreshRequest.ts +0 -8
- package/clients/cartService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/cartService/models/ResetPasswordRequest.ts +0 -10
- package/clients/cartService/models/ResponseStatus.ts +0 -12
- package/clients/cartService/models/TwoFactorRequest.ts +0 -12
- package/clients/cartService/models/TwoFactorResponse.ts +0 -12
- package/clients/cartService/models/WishListItemRecordDtoIReadOnlyListEnvelope.ts +0 -14
- package/clients/cartService/services/FenixAllianceAbsWebService.ts +0 -293
- package/clients/catalogService/models/AccessTokenResponse.ts +0 -11
- package/clients/catalogService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/catalogService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/catalogService/models/InfoRequest.ts +0 -10
- package/clients/catalogService/models/InfoResponse.ts +0 -9
- package/clients/catalogService/models/ItemAttachmentDtoIReadOnlyCollectionEnvelope.ts +0 -14
- package/clients/catalogService/models/ItemCategoryDtoIReadOnlyCollectionEnvelope.ts +0 -14
- package/clients/catalogService/models/ItemImageDtoIReadOnlyCollectionEnvelope.ts +0 -14
- package/clients/catalogService/models/ItemPricePolicyDto.ts +0 -35
- package/clients/catalogService/models/ItemPricePolicyDtoListEnvelope.ts +0 -14
- package/clients/catalogService/models/ItemQuestionDtoIReadOnlyCollectionEnvelope.ts +0 -14
- package/clients/catalogService/models/ItemReviewDtoIReadOnlyCollectionEnvelope.ts +0 -14
- package/clients/catalogService/models/ItemTagDtoIReadOnlyCollectionEnvelope.ts +0 -14
- package/clients/catalogService/models/ItemTypeDtoIReadOnlyCollectionEnvelope.ts +0 -14
- package/clients/catalogService/models/LoginRequest.ts +0 -11
- package/clients/catalogService/models/PricingRuleDtoIReadOnlyCollectionEnvelope.ts +0 -14
- package/clients/catalogService/models/RefreshRequest.ts +0 -8
- package/clients/catalogService/models/RegisterRequest.ts +0 -9
- package/clients/catalogService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/catalogService/models/ResetPasswordRequest.ts +0 -10
- package/clients/catalogService/models/TwoFactorRequest.ts +0 -12
- package/clients/catalogService/models/TwoFactorResponse.ts +0 -12
- package/clients/catalogService/services/FenixAllianceAbsWebService.ts +0 -293
- package/clients/contactService/index.ts +0 -28
- package/clients/contactService/models/AccessTokenResponse.ts +0 -11
- package/clients/contactService/models/ContactDto.ts +0 -44
- package/clients/contactService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/contactService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/contactService/models/InfoRequest.ts +0 -10
- package/clients/contactService/models/InfoResponse.ts +0 -9
- package/clients/contactService/models/LoginRequest.ts +0 -11
- package/clients/contactService/models/RefreshRequest.ts +0 -8
- package/clients/contactService/models/RegisterRequest.ts +0 -9
- package/clients/contactService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/contactService/models/ResetPasswordRequest.ts +0 -10
- package/clients/contactService/models/TwoFactorRequest.ts +0 -12
- package/clients/contactService/models/TwoFactorResponse.ts +0 -12
- package/clients/contactService/services/ContactsService.ts +0 -140
- package/clients/contactService/services/FenixAllianceAbsWebService.ts +0 -293
- package/clients/forexService/models/AccessTokenResponse.ts +0 -11
- package/clients/forexService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/forexService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/forexService/models/InfoRequest.ts +0 -10
- package/clients/forexService/models/InfoResponse.ts +0 -9
- package/clients/forexService/models/LoginRequest.ts +0 -11
- package/clients/forexService/models/RefreshRequest.ts +0 -8
- package/clients/forexService/models/RegisterRequest.ts +0 -9
- package/clients/forexService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/forexService/models/ResetPasswordRequest.ts +0 -10
- package/clients/forexService/models/TwoFactorRequest.ts +0 -12
- package/clients/forexService/models/TwoFactorResponse.ts +0 -12
- package/clients/forexService/services/FenixAllianceAbsWebService.ts +0 -293
- package/clients/holderService/models/AccessTokenResponse.ts +0 -11
- package/clients/holderService/models/AccountHolderCreateDto.ts +0 -34
- package/clients/holderService/models/AccountHolderDtoEnvelope.ts +0 -14
- package/clients/holderService/models/BusinessEnrollmentDto.ts +0 -19
- package/clients/holderService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/holderService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/holderService/models/InfoRequest.ts +0 -10
- package/clients/holderService/models/InfoResponse.ts +0 -9
- package/clients/holderService/models/LoginRequest.ts +0 -11
- package/clients/holderService/models/RefreshRequest.ts +0 -8
- package/clients/holderService/models/RegisterRequest.ts +0 -9
- package/clients/holderService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/holderService/models/ResetPasswordRequest.ts +0 -10
- package/clients/holderService/models/TwoFactorRequest.ts +0 -12
- package/clients/holderService/models/TwoFactorResponse.ts +0 -12
- package/clients/holderService/services/FenixAllianceAbsWebService.ts +0 -293
- package/clients/identityService/models/AccessTokenResponse.ts +0 -11
- package/clients/identityService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/identityService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/identityService/models/InfoRequest.ts +0 -10
- package/clients/identityService/models/InfoResponse.ts +0 -9
- package/clients/identityService/models/LoginRequest.ts +0 -11
- package/clients/identityService/models/RefreshRequest.ts +0 -8
- package/clients/identityService/models/RegisterRequest.ts +0 -9
- package/clients/identityService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/identityService/models/ResetPasswordRequest.ts +0 -10
- package/clients/identityService/models/TwoFactorRequest.ts +0 -12
- package/clients/identityService/models/TwoFactorResponse.ts +0 -12
- package/clients/identityService/services/FenixAllianceAbsWebService.ts +0 -293
- package/clients/inventoryService/models/AccessTokenResponse.ts +0 -11
- package/clients/inventoryService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/inventoryService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/inventoryService/models/InfoRequest.ts +0 -10
- package/clients/inventoryService/models/InfoResponse.ts +0 -9
- package/clients/inventoryService/models/LoginRequest.ts +0 -11
- package/clients/inventoryService/models/RefreshRequest.ts +0 -8
- package/clients/inventoryService/models/RegisterRequest.ts +0 -9
- package/clients/inventoryService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/inventoryService/models/ResetPasswordRequest.ts +0 -10
- package/clients/inventoryService/models/TwoFactorRequest.ts +0 -12
- package/clients/inventoryService/models/TwoFactorResponse.ts +0 -12
- package/clients/inventoryService/services/FenixAllianceAbsWebService.ts +0 -293
- package/clients/invoicingService/models/AccessTokenResponse.ts +0 -11
- package/clients/invoicingService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/invoicingService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/invoicingService/models/InfoRequest.ts +0 -10
- package/clients/invoicingService/models/InfoResponse.ts +0 -9
- package/clients/invoicingService/models/LoginRequest.ts +0 -11
- package/clients/invoicingService/models/RefreshRequest.ts +0 -8
- package/clients/invoicingService/models/RegisterRequest.ts +0 -9
- package/clients/invoicingService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/invoicingService/models/ResetPasswordRequest.ts +0 -10
- package/clients/invoicingService/models/TwoFactorRequest.ts +0 -12
- package/clients/invoicingService/models/TwoFactorResponse.ts +0 -12
- package/clients/invoicingService/services/FenixAllianceAbsWebService.ts +0 -293
- package/clients/pricingService/models/AccessTokenResponse.ts +0 -11
- package/clients/pricingService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/pricingService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/pricingService/models/InfoRequest.ts +0 -10
- package/clients/pricingService/models/InfoResponse.ts +0 -9
- package/clients/pricingService/models/LoginRequest.ts +0 -11
- package/clients/pricingService/models/RefreshRequest.ts +0 -8
- package/clients/pricingService/models/RegisterRequest.ts +0 -9
- package/clients/pricingService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/pricingService/models/ResetPasswordRequest.ts +0 -10
- package/clients/pricingService/models/TwoFactorRequest.ts +0 -12
- package/clients/pricingService/models/TwoFactorResponse.ts +0 -12
- package/clients/pricingService/services/FenixAllianceAbsWebService.ts +0 -293
- package/clients/tenantService/models/AccessTokenResponse.ts +0 -11
- package/clients/tenantService/models/AccountHolderCreateDto.ts +0 -34
- package/clients/tenantService/models/AggregateException.ts +0 -18
- package/clients/tenantService/models/Assembly.ts +0 -46
- package/clients/tenantService/models/BusinessEnrollmentDto.ts +0 -19
- package/clients/tenantService/models/BusinessEnrollmentDtoEnvelope.ts +0 -14
- package/clients/tenantService/models/BusinessEnrollmentDtoIReadOnlyListEnvelope.ts +0 -14
- package/clients/tenantService/models/ConstructorInfo.ts +0 -103
- package/clients/tenantService/models/CustomAttributeData.ts +0 -15
- package/clients/tenantService/models/CustomAttributeNamedArgument.ts +0 -13
- package/clients/tenantService/models/CustomAttributeTypedArgument.ts +0 -10
- package/clients/tenantService/models/EventInfo.ts +0 -44
- package/clients/tenantService/models/Exception.ts +0 -16
- package/clients/tenantService/models/FieldInfo.ts +0 -74
- package/clients/tenantService/models/ForgotPasswordRequest.ts +0 -8
- package/clients/tenantService/models/HttpValidationProblemDetails.ts +0 -5
- package/clients/tenantService/models/ICustomAttributeProvider.ts +0 -5
- package/clients/tenantService/models/InfoRequest.ts +0 -10
- package/clients/tenantService/models/InfoResponse.ts +0 -9
- package/clients/tenantService/models/LoginRequest.ts +0 -11
- package/clients/tenantService/models/MemberInfo.ts +0 -31
- package/clients/tenantService/models/MethodBase.ts +0 -103
- package/clients/tenantService/models/MethodInfo.ts +0 -108
- package/clients/tenantService/models/Module.ts +0 -19
- package/clients/tenantService/models/ModuleHandle.ts +0 -8
- package/clients/tenantService/models/ParameterInfo.ts +0 -40
- package/clients/tenantService/models/PropertyInfo.ts +0 -49
- package/clients/tenantService/models/RefreshRequest.ts +0 -8
- package/clients/tenantService/models/RegisterRequest.ts +0 -9
- package/clients/tenantService/models/ResendConfirmationEmailRequest.ts +0 -8
- package/clients/tenantService/models/ResetPasswordRequest.ts +0 -10
- package/clients/tenantService/models/ResponseStatus.ts +0 -12
- package/clients/tenantService/models/RuntimeFieldHandle.ts +0 -9
- package/clients/tenantService/models/RuntimeMethodHandle.ts +0 -9
- package/clients/tenantService/models/RuntimeTypeHandle.ts +0 -9
- package/clients/tenantService/models/StructLayoutAttribute.ts +0 -16
- package/clients/tenantService/models/TwoFactorRequest.ts +0 -12
- package/clients/tenantService/models/TwoFactorResponse.ts +0 -12
- package/clients/tenantService/models/Type.ts +0 -141
- package/clients/tenantService/models/TypeInfo.ts +0 -156
- package/clients/tenantService/models/WalletDtoTask.ts +0 -40
- package/clients/tenantService/models/WalletDtoTaskEnvelope.ts +0 -14
- package/clients/tenantService/services/FenixAllianceAbsWebService.ts +0 -293
- package/schemas/contactService/schema.s.ts +0 -674
- /package/clients/{contactService → crmService}/models/ContactDtoEnvelope.ts +0 -0
- /package/clients/{contactService → crmService}/models/ContactDtoListEnvelope.ts +0 -0
- /package/clients/{contactService → crmService}/models/ErrorEnvelope.ts +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export class CancelError extends Error {
|
|
6
|
+
|
|
7
|
+
constructor(message: string) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = 'CancelError';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public get isCancelled(): boolean {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface OnCancel {
|
|
18
|
+
readonly isResolved: boolean;
|
|
19
|
+
readonly isRejected: boolean;
|
|
20
|
+
readonly isCancelled: boolean;
|
|
21
|
+
|
|
22
|
+
(cancelHandler: () => void): void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class CancelablePromise<T> implements Promise<T> {
|
|
26
|
+
#isResolved: boolean;
|
|
27
|
+
#isRejected: boolean;
|
|
28
|
+
#isCancelled: boolean;
|
|
29
|
+
readonly #cancelHandlers: (() => void)[];
|
|
30
|
+
readonly #promise: Promise<T>;
|
|
31
|
+
#resolve?: (value: T | PromiseLike<T>) => void;
|
|
32
|
+
#reject?: (reason?: any) => void;
|
|
33
|
+
|
|
34
|
+
constructor(
|
|
35
|
+
executor: (
|
|
36
|
+
resolve: (value: T | PromiseLike<T>) => void,
|
|
37
|
+
reject: (reason?: any) => void,
|
|
38
|
+
onCancel: OnCancel
|
|
39
|
+
) => void
|
|
40
|
+
) {
|
|
41
|
+
this.#isResolved = false;
|
|
42
|
+
this.#isRejected = false;
|
|
43
|
+
this.#isCancelled = false;
|
|
44
|
+
this.#cancelHandlers = [];
|
|
45
|
+
this.#promise = new Promise<T>((resolve, reject) => {
|
|
46
|
+
this.#resolve = resolve;
|
|
47
|
+
this.#reject = reject;
|
|
48
|
+
|
|
49
|
+
const onResolve = (value: T | PromiseLike<T>): void => {
|
|
50
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.#isResolved = true;
|
|
54
|
+
if (this.#resolve) this.#resolve(value);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const onReject = (reason?: any): void => {
|
|
58
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
this.#isRejected = true;
|
|
62
|
+
if (this.#reject) this.#reject(reason);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const onCancel = (cancelHandler: () => void): void => {
|
|
66
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.#cancelHandlers.push(cancelHandler);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
Object.defineProperty(onCancel, 'isResolved', {
|
|
73
|
+
get: (): boolean => this.#isResolved,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
Object.defineProperty(onCancel, 'isRejected', {
|
|
77
|
+
get: (): boolean => this.#isRejected,
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
Object.defineProperty(onCancel, 'isCancelled', {
|
|
81
|
+
get: (): boolean => this.#isCancelled,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return executor(onResolve, onReject, onCancel as OnCancel);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
get [Symbol.toStringTag]() {
|
|
89
|
+
return "Cancellable Promise";
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
public then<TResult1 = T, TResult2 = never>(
|
|
93
|
+
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
|
94
|
+
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
|
|
95
|
+
): Promise<TResult1 | TResult2> {
|
|
96
|
+
return this.#promise.then(onFulfilled, onRejected);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public catch<TResult = never>(
|
|
100
|
+
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
|
|
101
|
+
): Promise<T | TResult> {
|
|
102
|
+
return this.#promise.catch(onRejected);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
public finally(onFinally?: (() => void) | null): Promise<T> {
|
|
106
|
+
return this.#promise.finally(onFinally);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
public cancel(): void {
|
|
110
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
this.#isCancelled = true;
|
|
114
|
+
if (this.#cancelHandlers.length) {
|
|
115
|
+
try {
|
|
116
|
+
for (const cancelHandler of this.#cancelHandlers) {
|
|
117
|
+
cancelHandler();
|
|
118
|
+
}
|
|
119
|
+
} catch (error) {
|
|
120
|
+
console.warn('Cancellation threw an error', error);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
this.#cancelHandlers.length = 0;
|
|
125
|
+
if (this.#reject) this.#reject(new CancelError('Request aborted'));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
public get isCancelled(): boolean {
|
|
129
|
+
return this.#isCancelled;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
6
|
+
|
|
7
|
+
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
8
|
+
type Headers = Record<string, string>;
|
|
9
|
+
|
|
10
|
+
export type OpenAPIConfig = {
|
|
11
|
+
BASE: string;
|
|
12
|
+
VERSION: string;
|
|
13
|
+
WITH_CREDENTIALS: boolean;
|
|
14
|
+
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
|
15
|
+
TOKEN?: string | Resolver<string> | undefined;
|
|
16
|
+
USERNAME?: string | Resolver<string> | undefined;
|
|
17
|
+
PASSWORD?: string | Resolver<string> | undefined;
|
|
18
|
+
HEADERS?: Headers | Resolver<Headers> | undefined;
|
|
19
|
+
ENCODE_PATH?: ((path: string) => string) | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const OpenAPI: OpenAPIConfig = {
|
|
23
|
+
BASE: '',
|
|
24
|
+
VERSION: '2.0.0.0',
|
|
25
|
+
WITH_CREDENTIALS: false,
|
|
26
|
+
CREDENTIALS: 'include',
|
|
27
|
+
TOKEN: undefined,
|
|
28
|
+
USERNAME: undefined,
|
|
29
|
+
PASSWORD: undefined,
|
|
30
|
+
HEADERS: undefined,
|
|
31
|
+
ENCODE_PATH: undefined,
|
|
32
|
+
};
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import { ApiError } from './ApiError';
|
|
6
|
+
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
7
|
+
import type { ApiResult } from './ApiResult';
|
|
8
|
+
import { CancelablePromise } from './CancelablePromise';
|
|
9
|
+
import type { OnCancel } from './CancelablePromise';
|
|
10
|
+
import type { OpenAPIConfig } from './OpenAPI';
|
|
11
|
+
|
|
12
|
+
export const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {
|
|
13
|
+
return value !== undefined && value !== null;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const isString = (value: any): value is string => {
|
|
17
|
+
return typeof value === 'string';
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const isStringWithValue = (value: any): value is string => {
|
|
21
|
+
return isString(value) && value !== '';
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const isBlob = (value: any): value is Blob => {
|
|
25
|
+
return (
|
|
26
|
+
typeof value === 'object' &&
|
|
27
|
+
typeof value.type === 'string' &&
|
|
28
|
+
typeof value.stream === 'function' &&
|
|
29
|
+
typeof value.arrayBuffer === 'function' &&
|
|
30
|
+
typeof value.constructor === 'function' &&
|
|
31
|
+
typeof value.constructor.name === 'string' &&
|
|
32
|
+
/^(Blob|File)$/.test(value.constructor.name) &&
|
|
33
|
+
/^(Blob|File)$/.test(value[Symbol.toStringTag])
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const isFormData = (value: any): value is FormData => {
|
|
38
|
+
return value instanceof FormData;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const base64 = (str: string): string => {
|
|
42
|
+
try {
|
|
43
|
+
return btoa(str);
|
|
44
|
+
} catch (err) {
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
return Buffer.from(str).toString('base64');
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const getQueryString = (params: Record<string, any>): string => {
|
|
51
|
+
const qs: string[] = [];
|
|
52
|
+
|
|
53
|
+
const append = (key: string, value: any) => {
|
|
54
|
+
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const process = (key: string, value: any) => {
|
|
58
|
+
if (isDefined(value)) {
|
|
59
|
+
if (Array.isArray(value)) {
|
|
60
|
+
value.forEach(v => {
|
|
61
|
+
process(key, v);
|
|
62
|
+
});
|
|
63
|
+
} else if (typeof value === 'object') {
|
|
64
|
+
Object.entries(value).forEach(([k, v]) => {
|
|
65
|
+
process(`${key}[${k}]`, v);
|
|
66
|
+
});
|
|
67
|
+
} else {
|
|
68
|
+
append(key, value);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
74
|
+
process(key, value);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
if (qs.length > 0) {
|
|
78
|
+
return `?${qs.join('&')}`;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return '';
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
|
|
85
|
+
const encoder = config.ENCODE_PATH || encodeURI;
|
|
86
|
+
|
|
87
|
+
const path = options.url
|
|
88
|
+
.replace('{api-version}', config.VERSION)
|
|
89
|
+
.replace(/{(.*?)}/g, (substring: string, group: string) => {
|
|
90
|
+
if (options.path?.hasOwnProperty(group)) {
|
|
91
|
+
return encoder(String(options.path[group]));
|
|
92
|
+
}
|
|
93
|
+
return substring;
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
const url = `${config.BASE}${path}`;
|
|
97
|
+
if (options.query) {
|
|
98
|
+
return `${url}${getQueryString(options.query)}`;
|
|
99
|
+
}
|
|
100
|
+
return url;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const getFormData = (options: ApiRequestOptions): FormData | undefined => {
|
|
104
|
+
if (options.formData) {
|
|
105
|
+
const formData = new FormData();
|
|
106
|
+
|
|
107
|
+
const process = (key: string, value: any) => {
|
|
108
|
+
if (isString(value) || isBlob(value)) {
|
|
109
|
+
formData.append(key, value);
|
|
110
|
+
} else {
|
|
111
|
+
formData.append(key, JSON.stringify(value));
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
Object.entries(options.formData)
|
|
116
|
+
.filter(([_, value]) => isDefined(value))
|
|
117
|
+
.forEach(([key, value]) => {
|
|
118
|
+
if (Array.isArray(value)) {
|
|
119
|
+
value.forEach(v => process(key, v));
|
|
120
|
+
} else {
|
|
121
|
+
process(key, value);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
return formData;
|
|
126
|
+
}
|
|
127
|
+
return undefined;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
131
|
+
|
|
132
|
+
export const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {
|
|
133
|
+
if (typeof resolver === 'function') {
|
|
134
|
+
return (resolver as Resolver<T>)(options);
|
|
135
|
+
}
|
|
136
|
+
return resolver;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {
|
|
140
|
+
const [token, username, password, additionalHeaders] = await Promise.all([
|
|
141
|
+
resolve(options, config.TOKEN),
|
|
142
|
+
resolve(options, config.USERNAME),
|
|
143
|
+
resolve(options, config.PASSWORD),
|
|
144
|
+
resolve(options, config.HEADERS),
|
|
145
|
+
]);
|
|
146
|
+
|
|
147
|
+
const headers = Object.entries({
|
|
148
|
+
Accept: 'application/json',
|
|
149
|
+
...additionalHeaders,
|
|
150
|
+
...options.headers,
|
|
151
|
+
})
|
|
152
|
+
.filter(([_, value]) => isDefined(value))
|
|
153
|
+
.reduce((headers, [key, value]) => ({
|
|
154
|
+
...headers,
|
|
155
|
+
[key]: String(value),
|
|
156
|
+
}), {} as Record<string, string>);
|
|
157
|
+
|
|
158
|
+
if (isStringWithValue(token)) {
|
|
159
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (isStringWithValue(username) && isStringWithValue(password)) {
|
|
163
|
+
const credentials = base64(`${username}:${password}`);
|
|
164
|
+
headers['Authorization'] = `Basic ${credentials}`;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (options.body) {
|
|
168
|
+
if (options.mediaType) {
|
|
169
|
+
headers['Content-Type'] = options.mediaType;
|
|
170
|
+
} else if (isBlob(options.body)) {
|
|
171
|
+
headers['Content-Type'] = options.body.type || 'application/octet-stream';
|
|
172
|
+
} else if (isString(options.body)) {
|
|
173
|
+
headers['Content-Type'] = 'text/plain';
|
|
174
|
+
} else if (!isFormData(options.body)) {
|
|
175
|
+
headers['Content-Type'] = 'application/json';
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return new Headers(headers);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export const getRequestBody = (options: ApiRequestOptions): any => {
|
|
183
|
+
if (options.body !== undefined) {
|
|
184
|
+
if (options.mediaType?.includes('/json')) {
|
|
185
|
+
return JSON.stringify(options.body)
|
|
186
|
+
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
|
|
187
|
+
return options.body;
|
|
188
|
+
} else {
|
|
189
|
+
return JSON.stringify(options.body);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return undefined;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export const sendRequest = async (
|
|
196
|
+
config: OpenAPIConfig,
|
|
197
|
+
options: ApiRequestOptions,
|
|
198
|
+
url: string,
|
|
199
|
+
body: any,
|
|
200
|
+
formData: FormData | undefined,
|
|
201
|
+
headers: Headers,
|
|
202
|
+
onCancel: OnCancel
|
|
203
|
+
): Promise<Response> => {
|
|
204
|
+
const controller = new AbortController();
|
|
205
|
+
|
|
206
|
+
const request: RequestInit = {
|
|
207
|
+
headers,
|
|
208
|
+
body: body ?? formData,
|
|
209
|
+
method: options.method,
|
|
210
|
+
signal: controller.signal,
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
if (config.WITH_CREDENTIALS) {
|
|
214
|
+
request.credentials = config.CREDENTIALS;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
onCancel(() => controller.abort());
|
|
218
|
+
|
|
219
|
+
return await fetch(url, request);
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => {
|
|
223
|
+
if (responseHeader) {
|
|
224
|
+
const content = response.headers.get(responseHeader);
|
|
225
|
+
if (isString(content)) {
|
|
226
|
+
return content;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return undefined;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
export const getResponseBody = async (response: Response): Promise<any> => {
|
|
233
|
+
if (response.status !== 204) {
|
|
234
|
+
try {
|
|
235
|
+
const contentType = response.headers.get('Content-Type');
|
|
236
|
+
if (contentType) {
|
|
237
|
+
const jsonTypes = ['application/json', 'application/problem+json']
|
|
238
|
+
const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type));
|
|
239
|
+
if (isJSON) {
|
|
240
|
+
return await response.json();
|
|
241
|
+
} else {
|
|
242
|
+
return await response.text();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
} catch (error) {
|
|
246
|
+
console.error(error);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return undefined;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {
|
|
253
|
+
const errors: Record<number, string> = {
|
|
254
|
+
400: 'Bad Request',
|
|
255
|
+
401: 'Unauthorized',
|
|
256
|
+
403: 'Forbidden',
|
|
257
|
+
404: 'Not Found',
|
|
258
|
+
500: 'Internal Server Error',
|
|
259
|
+
502: 'Bad Gateway',
|
|
260
|
+
503: 'Service Unavailable',
|
|
261
|
+
...options.errors,
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const error = errors[result.status];
|
|
265
|
+
if (error) {
|
|
266
|
+
throw new ApiError(options, result, error);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (!result.ok) {
|
|
270
|
+
const errorStatus = result.status ?? 'unknown';
|
|
271
|
+
const errorStatusText = result.statusText ?? 'unknown';
|
|
272
|
+
const errorBody = (() => {
|
|
273
|
+
try {
|
|
274
|
+
return JSON.stringify(result.body, null, 2);
|
|
275
|
+
} catch (e) {
|
|
276
|
+
return undefined;
|
|
277
|
+
}
|
|
278
|
+
})();
|
|
279
|
+
|
|
280
|
+
throw new ApiError(options, result,
|
|
281
|
+
`Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Request method
|
|
288
|
+
* @param config The OpenAPI configuration object
|
|
289
|
+
* @param options The request options from the service
|
|
290
|
+
* @returns CancelablePromise<T>
|
|
291
|
+
* @throws ApiError
|
|
292
|
+
*/
|
|
293
|
+
export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {
|
|
294
|
+
return new CancelablePromise(async (resolve, reject, onCancel) => {
|
|
295
|
+
try {
|
|
296
|
+
const url = getUrl(config, options);
|
|
297
|
+
const formData = getFormData(options);
|
|
298
|
+
const body = getRequestBody(options);
|
|
299
|
+
const headers = await getHeaders(config, options);
|
|
300
|
+
|
|
301
|
+
if (!onCancel.isCancelled) {
|
|
302
|
+
const response = await sendRequest(config, options, url, body, formData, headers, onCancel);
|
|
303
|
+
const responseBody = await getResponseBody(response);
|
|
304
|
+
const responseHeader = getResponseHeader(response, options.responseHeader);
|
|
305
|
+
|
|
306
|
+
const result: ApiResult = {
|
|
307
|
+
url,
|
|
308
|
+
ok: response.ok,
|
|
309
|
+
status: response.status,
|
|
310
|
+
statusText: response.statusText,
|
|
311
|
+
body: responseHeader ?? responseBody,
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
catchErrorCodes(options, result);
|
|
315
|
+
|
|
316
|
+
resolve(result.body);
|
|
317
|
+
}
|
|
318
|
+
} catch (error) {
|
|
319
|
+
reject(error);
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export { ApiError } from './core/ApiError';
|
|
6
|
+
export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|
7
|
+
export { OpenAPI } from './core/OpenAPI';
|
|
8
|
+
export type { OpenAPIConfig } from './core/OpenAPI';
|
|
9
|
+
|
|
10
|
+
export type { ErrorEnvelope } from './models/ErrorEnvelope';
|
|
11
|
+
export type { InvoiceDto } from './models/InvoiceDto';
|
|
12
|
+
export type { InvoiceDtoListEnvelope } from './models/InvoiceDtoListEnvelope';
|
|
13
|
+
export type { LocationDto } from './models/LocationDto';
|
|
14
|
+
export type { LocationDtoListEnvelope } from './models/LocationDtoListEnvelope';
|
|
15
|
+
export type { OrderDto } from './models/OrderDto';
|
|
16
|
+
export type { OrderDtoListEnvelope } from './models/OrderDtoListEnvelope';
|
|
17
|
+
export type { PaymentDto } from './models/PaymentDto';
|
|
18
|
+
export type { PaymentDtoListEnvelope } from './models/PaymentDtoListEnvelope';
|
|
19
|
+
export type { WalletDto } from './models/WalletDto';
|
|
20
|
+
export type { WalletDtoEnvelope } from './models/WalletDtoEnvelope';
|
|
21
|
+
|
|
22
|
+
export { WalletsService } from './services/WalletsService';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type ErrorEnvelope = {
|
|
6
|
+
errorMessage?: string | null;
|
|
7
|
+
readonly isSuccess?: boolean;
|
|
8
|
+
readonly timestamp?: string;
|
|
9
|
+
readonly activityId?: string | null;
|
|
10
|
+
correlationId?: string | null;
|
|
11
|
+
};
|
|
12
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type InvoiceDto = {
|
|
6
|
+
id?: string | null;
|
|
7
|
+
timestamp?: string | null;
|
|
8
|
+
orderID?: string | null;
|
|
9
|
+
businessID?: string | null;
|
|
10
|
+
forexRate?: number;
|
|
11
|
+
totalAmountInUsd?: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { InvoiceDto } from './InvoiceDto';
|
|
6
|
+
export type InvoiceDtoListEnvelope = {
|
|
7
|
+
errorMessage?: string | null;
|
|
8
|
+
readonly isSuccess?: boolean;
|
|
9
|
+
readonly timestamp?: string;
|
|
10
|
+
readonly activityId?: string | null;
|
|
11
|
+
correlationId?: string | null;
|
|
12
|
+
result?: Array<InvoiceDto> | null;
|
|
13
|
+
};
|
|
14
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type LocationDto = {
|
|
6
|
+
id?: string | null;
|
|
7
|
+
timestamp?: string | null;
|
|
8
|
+
title?: string | null;
|
|
9
|
+
business?: string | null;
|
|
10
|
+
email?: string | null;
|
|
11
|
+
phone?: string | null;
|
|
12
|
+
fax?: string | null;
|
|
13
|
+
address1?: string | null;
|
|
14
|
+
address2?: string | null;
|
|
15
|
+
address3?: string | null;
|
|
16
|
+
unit?: string | null;
|
|
17
|
+
cityId?: string | null;
|
|
18
|
+
countryStateId?: string | null;
|
|
19
|
+
postalCode?: string | null;
|
|
20
|
+
countryId?: string | null;
|
|
21
|
+
longitude?: number;
|
|
22
|
+
latitude?: number;
|
|
23
|
+
isRoutable?: boolean;
|
|
24
|
+
isGlobalPrimary?: boolean;
|
|
25
|
+
isCountryPrimary?: boolean;
|
|
26
|
+
canGenerateLabels?: boolean;
|
|
27
|
+
isDefaultSenderAddress?: boolean;
|
|
28
|
+
isDefaultReturnAddress?: boolean;
|
|
29
|
+
isDefaultSuppingLocation?: boolean;
|
|
30
|
+
};
|
|
31
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { LocationDto } from './LocationDto';
|
|
6
|
+
export type LocationDtoListEnvelope = {
|
|
7
|
+
errorMessage?: string | null;
|
|
8
|
+
readonly isSuccess?: boolean;
|
|
9
|
+
readonly timestamp?: string;
|
|
10
|
+
readonly activityId?: string | null;
|
|
11
|
+
correlationId?: string | null;
|
|
12
|
+
result?: Array<LocationDto> | null;
|
|
13
|
+
};
|
|
14
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type OrderDto = {
|
|
6
|
+
id?: string | null;
|
|
7
|
+
timestamp?: string | null;
|
|
8
|
+
firstName?: string | null;
|
|
9
|
+
lastName?: string | null;
|
|
10
|
+
billingEmail?: string | null;
|
|
11
|
+
companyName?: string | null;
|
|
12
|
+
addressLine1?: string | null;
|
|
13
|
+
addressLine2?: string | null;
|
|
14
|
+
postalCode?: string | null;
|
|
15
|
+
countryId?: string | null;
|
|
16
|
+
countryStateId?: string | null;
|
|
17
|
+
cityId?: string | null;
|
|
18
|
+
customerNotes?: string | null;
|
|
19
|
+
businessId?: string | null;
|
|
20
|
+
currencyId?: string | null;
|
|
21
|
+
orderStatus?: string | null;
|
|
22
|
+
forexRate?: number;
|
|
23
|
+
orderLinesCount?: number;
|
|
24
|
+
totalAmountInUsd?: number;
|
|
25
|
+
totalTaxesInUsd?: number;
|
|
26
|
+
};
|
|
27
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { OrderDto } from './OrderDto';
|
|
6
|
+
export type OrderDtoListEnvelope = {
|
|
7
|
+
errorMessage?: string | null;
|
|
8
|
+
readonly isSuccess?: boolean;
|
|
9
|
+
readonly timestamp?: string;
|
|
10
|
+
readonly activityId?: string | null;
|
|
11
|
+
correlationId?: string | null;
|
|
12
|
+
result?: Array<OrderDto> | null;
|
|
13
|
+
};
|
|
14
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type PaymentDto = {
|
|
6
|
+
id?: string | null;
|
|
7
|
+
timestamp?: string;
|
|
8
|
+
invoiceID?: string | null;
|
|
9
|
+
businessID?: string | null;
|
|
10
|
+
emisorWalletId?: string | null;
|
|
11
|
+
receptorWalletId?: string | null;
|
|
12
|
+
currencyID?: string | null;
|
|
13
|
+
forexRate?: number;
|
|
14
|
+
totalCost?: number;
|
|
15
|
+
totalTaxes?: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { PaymentDto } from './PaymentDto';
|
|
6
|
+
export type PaymentDtoListEnvelope = {
|
|
7
|
+
errorMessage?: string | null;
|
|
8
|
+
readonly isSuccess?: boolean;
|
|
9
|
+
readonly timestamp?: string;
|
|
10
|
+
readonly activityId?: string | null;
|
|
11
|
+
correlationId?: string | null;
|
|
12
|
+
result?: Array<PaymentDto> | null;
|
|
13
|
+
};
|
|
14
|
+
|