@fragus/sam-types 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -0
- package/package.json +24 -0
- package/types/SettlementPaymentType.d.ts +0 -0
- package/types/SettlementPaymentType.js +1 -0
- package/types/SettlementPaymentType.js.map +1 -0
- package/types/SettlementPaymentType.ts +0 -0
- package/types/accessKey/index.d.ts +12 -0
- package/types/address.d.ts +18 -0
- package/types/admin/auth/index.d.ts +2 -0
- package/types/admin/auth/login.d.ts +28 -0
- package/types/admin/auth/roles.d.ts +10 -0
- package/types/admin/chart/contractCharts.d.ts +70 -0
- package/types/admin/chart/dashboardCharts.d.ts +57 -0
- package/types/admin/chart/index.d.ts +12 -0
- package/types/admin/contactInformation/index.d.ts +9 -0
- package/types/admin/contract/balanceStatistics.d.ts +37 -0
- package/types/admin/contract/basicInfo.d.ts +21 -0
- package/types/admin/contract/contractDetails.d.ts +82 -0
- package/types/admin/contract/health.d.ts +1 -0
- package/types/admin/contract/index.d.ts +6 -0
- package/types/admin/contract/internalContractNotes.d.ts +23 -0
- package/types/admin/contract/settleContract.d.ts +3 -0
- package/types/admin/contract/templateLookup.d.ts +20 -0
- package/types/admin/contractCreation/carData.d.ts +20 -0
- package/types/admin/contractCreation/contractCreation.d.ts +314 -0
- package/types/admin/contractCreation/index.d.ts +3 -0
- package/types/admin/contractCreation/priceCalculation.d.ts +83 -0
- package/types/admin/contractProvider/index.d.ts +47 -0
- package/types/admin/customer/customer.d.ts +29 -0
- package/types/admin/customer/customerList.d.ts +9 -0
- package/types/admin/customer/index.d.ts +2 -0
- package/types/admin/index.d.ts +13 -0
- package/types/admin/payment/index.d.ts +1 -0
- package/types/admin/payment/payment.d.ts +13 -0
- package/types/admin/product/index.d.ts +1 -0
- package/types/admin/product/product.d.ts +40 -0
- package/types/admin/stripe/index.d.ts +1 -0
- package/types/admin/stripe/stripeTOS.d.ts +7 -0
- package/types/admin/user/index.d.ts +2 -0
- package/types/admin/user/responseErrors/index.d.ts +3 -0
- package/types/admin/user/responseErrors/passwordResponseErrors.d.ts +1 -0
- package/types/admin/user/user.d.ts +23 -0
- package/types/admin/user/userList.d.ts +19 -0
- package/types/admin/vehicle/index.d.ts +1 -0
- package/types/admin/vehicle/vehicle.d.ts +58 -0
- package/types/admin/vehicleBlacklist/index.d.ts +16 -0
- package/types/admin/workshop/index.d.ts +1 -0
- package/types/admin/workshop/workshop.d.ts +5 -0
- package/types/app.d.ts +5 -0
- package/types/brand.d.ts +4 -0
- package/types/chart.d.ts +38 -0
- package/types/contactPerson.d.ts +16 -0
- package/types/contract/contract.d.ts +75 -0
- package/types/contract/contractActivation.d.ts +5 -0
- package/types/contract/contractFilter.d.ts +58 -0
- package/types/contract/contractList.d.ts +53 -0
- package/types/contract/contractOffer.d.ts +34 -0
- package/types/contract/contractQuery.d.ts +68 -0
- package/types/contractAction.d.ts +40 -0
- package/types/contractOption.d.ts +50 -0
- package/types/contractProvider.d.ts +116 -0
- package/types/contractTemplate.d.ts +94 -0
- package/types/country.d.ts +32 -0
- package/types/currency.d.ts +1 -0
- package/types/customer.d.ts +10 -0
- package/types/durationOptions.d.ts +31 -0
- package/types/errorResponse.d.ts +19 -0
- package/types/fuelType.d.ts +9 -0
- package/types/includedContractOption.d.ts +18 -0
- package/types/index.d.ts +210 -0
- package/types/index.js +166 -0
- package/types/index.js.map +1 -0
- package/types/index.ts +229 -0
- package/types/invoice.d.ts +13 -0
- package/types/locale.d.ts +24 -0
- package/types/localizationData.d.ts +7 -0
- package/types/model.d.ts +4 -0
- package/types/outage.d.ts +9 -0
- package/types/payment.d.ts +53 -0
- package/types/paymentFailureReason.d.ts +6 -0
- package/types/priceCalculation.d.ts +27 -0
- package/types/priceSpecification.d.ts +20 -0
- package/types/product.d.ts +23 -0
- package/types/productPartial.d.ts +18 -0
- package/types/providerBranding.d.ts +48 -0
- package/types/queryParams.d.ts +51 -0
- package/types/releaseNotes/index.d.ts +33 -0
- package/types/reports/reports.d.ts +50 -0
- package/types/resetPassword.d.ts +3 -0
- package/types/responseErrors/HttpStatusCodes.d.ts +391 -0
- package/types/responseErrors/adjustmentRequestResponseErrors.d.ts +1 -0
- package/types/responseErrors/adminPaymentErrors.d.ts +6 -0
- package/types/responseErrors/calculatorResponseErrors.d.ts +35 -0
- package/types/responseErrors/contractResponseErrors.d.ts +23 -0
- package/types/responseErrors/fileImportErrors.d.ts +5 -0
- package/types/responseErrors/genericResponseTypes.d.ts +33 -0
- package/types/responseErrors/importErrors.d.ts +7 -0
- package/types/responseErrors/index.d.ts +30 -0
- package/types/responseErrors/invalidProductTypeErrors.d.ts +1 -0
- package/types/responseErrors/invalidProductTypeErrors.js +3 -0
- package/types/responseErrors/invalidProductTypeErrors.js.map +1 -0
- package/types/responseErrors/invalidProductTypeErrors.ts +1 -0
- package/types/responseErrors/invoiceErrors.d.ts +1 -0
- package/types/responseErrors/invoiceErrors.js +3 -0
- package/types/responseErrors/invoiceErrors.js.map +1 -0
- package/types/responseErrors/invoiceErrors.ts +1 -0
- package/types/responseErrors/passwordResponseErrors.d.ts +6 -0
- package/types/responseErrors/paymentResponseErrors.d.ts +5 -0
- package/types/responseErrors/rateLimitErrors.d.ts +1 -0
- package/types/responseErrors/userAndCustomerErrors.d.ts +1 -0
- package/types/responseErrors/userAndCustomerErrors.js +3 -0
- package/types/responseErrors/userAndCustomerErrors.js.map +1 -0
- package/types/responseErrors/userAndCustomerErrors.ts +11 -0
- package/types/responseErrors/vatLookupResponseErrors.d.ts +3 -0
- package/types/responseErrors/vehcileBlacklistErrors.d.ts +3 -0
- package/types/responseErrors/vehicleBlacklistErrors.d.ts +2 -0
- package/types/searchQuery.d.ts +21 -0
- package/types/stripe/stripe.d.ts +49 -0
- package/types/stripe/stripeAddress.d.ts +10 -0
- package/types/stripe/stripeDateOfBirth.d.ts +5 -0
- package/types/stripe/stripeDeclineChargeOn.d.ts +4 -0
- package/types/stripe/stripeExternalAccount.d.ts +19 -0
- package/types/stripe/stripeLegalEntity.d.ts +16 -0
- package/types/stripe/stripeOwner.d.ts +9 -0
- package/types/stripe/stripeVerification.d.ts +33 -0
- package/types/termsOfService.d.ts +11 -0
- package/types/translation.d.ts +3 -0
- package/types/translations/index.d.ts +38 -0
- package/types/user.d.ts +10 -0
- package/types/userConfiguration/tableUserConfiguration.d.ts +15 -0
- package/types/userConfiguration/userConfiguration.d.ts +5 -0
- package/types/v4PricingTool/dealerAndProvider/index.d.ts +44 -0
- package/types/v4PricingTool/dealerAndProvider/index.js +3 -0
- package/types/v4PricingTool/dealerAndProvider/index.js.map +1 -0
- package/types/v4PricingTool/dealerAndProvider/index.ts +66 -0
- package/types/v4PricingTool/index.d.ts +2 -0
- package/types/v4PricingTool/productsAndContracts/index.d.ts +2 -0
- package/types/v4PricingTool/productsAndContracts/index.js +7 -0
- package/types/v4PricingTool/productsAndContracts/index.js.map +1 -0
- package/types/v4PricingTool/productsAndContracts/index.ts +10 -0
- package/types/vatLookup.d.ts +14 -0
- package/types/vehicle.d.ts +160 -0
- package/types/vehicleContracts.d.ts +15 -0
- package/types/vehiclePartial.d.ts +24 -0
- package/types/warranty.d.ts +19 -0
- package/types/webcalc/auth.d.ts +48 -0
- package/types/webcalc/index.d.ts +2 -0
- package/types/webcalc/offerRequest.d.ts +18 -0
- package/types/workshopOperation.d.ts +18 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContractState,
|
|
3
|
+
ContractValueType,
|
|
4
|
+
IEssentialContract,
|
|
5
|
+
IIncludedContractOption,
|
|
6
|
+
TV4PTProductType,
|
|
7
|
+
} from './../../index'
|
|
8
|
+
import { PaymentGateway } from './../../payment'
|
|
9
|
+
import { PriceSpecification } from './../../priceSpecification'
|
|
10
|
+
|
|
11
|
+
export interface IEssentialVehicle {
|
|
12
|
+
registrationDate: Date | string
|
|
13
|
+
modelYear: number
|
|
14
|
+
vin: string
|
|
15
|
+
registrationNumber: string
|
|
16
|
+
brandName: string
|
|
17
|
+
modelName: string
|
|
18
|
+
fuelTypeName: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IApiVehicleWithContracts extends IEssentialVehicle {
|
|
22
|
+
vehicleId: number
|
|
23
|
+
contracts: IApiVehicleContract[]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IApiVehicleWithEssentialContracts extends IEssentialVehicle {
|
|
27
|
+
contracts: IEssentialContract[]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface IApiVehicleContract {
|
|
31
|
+
serviceContractId: number
|
|
32
|
+
amount: PriceSpecification
|
|
33
|
+
contractStartDate: Date | string
|
|
34
|
+
contractEndDate: Date | string
|
|
35
|
+
tosUrl: string
|
|
36
|
+
totUrl: string
|
|
37
|
+
contractState: ContractState
|
|
38
|
+
prettyIdentifier: string
|
|
39
|
+
pdfUrl: string
|
|
40
|
+
serviceInfoPDFUrl?: string
|
|
41
|
+
includedOptions: IIncludedContractOption[]
|
|
42
|
+
contractTemplateInternalName: string // Name used internally (in pricefile etc.)
|
|
43
|
+
contractTemplateExternalName: string // The name shown to end-users.
|
|
44
|
+
duration: number
|
|
45
|
+
mileage: number
|
|
46
|
+
paymentGateway?: PaymentGateway
|
|
47
|
+
reference?: string
|
|
48
|
+
extendedFrom?: number
|
|
49
|
+
value?: number
|
|
50
|
+
valueType?: ContractValueType
|
|
51
|
+
contractProductType: null | TV4PTProductType
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IApiVehicleIncludedContractOption {
|
|
55
|
+
description: string
|
|
56
|
+
assoc: 'PROPERTY' | 'ADDITIONAL'
|
|
57
|
+
termsRef: string | null
|
|
58
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IBlacklistedVehicleRequest {
|
|
2
|
+
id?: number
|
|
3
|
+
brand: string
|
|
4
|
+
model: string
|
|
5
|
+
fuelType: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IBlacklistedVehicleResponse {
|
|
9
|
+
id: number
|
|
10
|
+
brand: string
|
|
11
|
+
model: string
|
|
12
|
+
fuelType: string
|
|
13
|
+
parentRecord?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type BlacklistedVehicleOrderByType = keyof IBlacklistedVehicleRequest
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './workshop'
|
package/types/app.d.ts
ADDED
package/types/brand.d.ts
ADDED
package/types/chart.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IPaymentFailureReason } from './index'
|
|
2
|
+
|
|
3
|
+
// Generic charting types, ie. they are not specific to one application but generally usable in most types of charts.
|
|
4
|
+
|
|
5
|
+
export interface IChartValue {
|
|
6
|
+
x: Date | string | number
|
|
7
|
+
y: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IChartDateValue extends IChartValue {
|
|
11
|
+
x: Date | string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IChartInvoiceTooltip {
|
|
15
|
+
state: number
|
|
16
|
+
successfulPaymentDate?: Date
|
|
17
|
+
failureReason?: IPaymentFailureReason
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface IChartInvoiceValue extends IChartDateValue {
|
|
21
|
+
tooltipData: IChartInvoiceTooltip
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface IChartStringValue<TooltipData = undefined> extends IChartValue {
|
|
25
|
+
x: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IProviderStats {
|
|
29
|
+
offers: number
|
|
30
|
+
created: number
|
|
31
|
+
expiring: number
|
|
32
|
+
avgDuration: number
|
|
33
|
+
avgMileage: number
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ITopSellerChart {
|
|
37
|
+
seriesTopSellers: IChartStringValue[]
|
|
38
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IAddressRequest, IAddressResponse } from './address'
|
|
2
|
+
|
|
3
|
+
export interface IContactPersonRequest {
|
|
4
|
+
name: string
|
|
5
|
+
email: string
|
|
6
|
+
phone: string
|
|
7
|
+
address: IAddressRequest
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IContactPersonResponse {
|
|
11
|
+
contactPersonId: number
|
|
12
|
+
name: string
|
|
13
|
+
email: string
|
|
14
|
+
phone: string
|
|
15
|
+
address: IAddressResponse
|
|
16
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { IEssentialContractProviderInfo } from '../admin/contractProvider'
|
|
2
|
+
import { IEssentialVehicle } from '../admin/vehicle'
|
|
3
|
+
import { IContractOptionResponse } from '../contractOption'
|
|
4
|
+
import { IContractProviderResponse } from '../contractProvider'
|
|
5
|
+
import { IContractTemplateResponse, PriceSource } from '../contractTemplate'
|
|
6
|
+
import { Customer } from '../customer'
|
|
7
|
+
import {
|
|
8
|
+
ContractState,
|
|
9
|
+
ContractValueType,
|
|
10
|
+
IIncludedContractOption,
|
|
11
|
+
PaymentGateway,
|
|
12
|
+
PriceSpecification,
|
|
13
|
+
TIsoCountry,
|
|
14
|
+
TV4PTProductType,
|
|
15
|
+
} from '../index'
|
|
16
|
+
import { ICalculationResponse } from '../priceCalculation'
|
|
17
|
+
import { Other } from '../product'
|
|
18
|
+
import { Vehicle } from '../vehicle'
|
|
19
|
+
|
|
20
|
+
export interface IEssentialContract {
|
|
21
|
+
prettyIdentifier: string
|
|
22
|
+
contractState: ContractState
|
|
23
|
+
contractStartDate: Date | string
|
|
24
|
+
contractEndDate: Date | string
|
|
25
|
+
contractName: string
|
|
26
|
+
contractProductType: null | TV4PTProductType
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface IContractDetailsForCustomer extends IEssentialContract {
|
|
30
|
+
includedOptions: IIncludedContractOption[]
|
|
31
|
+
amount: PriceSpecification
|
|
32
|
+
tosUrl: string
|
|
33
|
+
totUrl: string
|
|
34
|
+
serviceInfoPDFUrl?: string
|
|
35
|
+
valueType?: ContractValueType
|
|
36
|
+
value?: number
|
|
37
|
+
duration: number
|
|
38
|
+
vehicle: IEssentialVehicle
|
|
39
|
+
provider: IEssentialContractProviderInfo
|
|
40
|
+
paymentGateway: PaymentGateway
|
|
41
|
+
priceSource: PriceSource
|
|
42
|
+
contractProductType: null | TV4PTProductType
|
|
43
|
+
offerExpiresAt?: Date | string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface IContractResponse {
|
|
47
|
+
id: number
|
|
48
|
+
customer: Customer
|
|
49
|
+
product: Vehicle | Other
|
|
50
|
+
duration: string
|
|
51
|
+
mileage: string
|
|
52
|
+
value?: string
|
|
53
|
+
valueType?: ContractValueType
|
|
54
|
+
startMileage: number
|
|
55
|
+
startValue?: number
|
|
56
|
+
startValueType?: ContractValueType
|
|
57
|
+
template: null | IContractTemplateResponse
|
|
58
|
+
calculationMethod: number
|
|
59
|
+
options: IContractOptionResponse[]
|
|
60
|
+
payment: ICalculationResponse
|
|
61
|
+
prettyIdentifier: string
|
|
62
|
+
startDate: string
|
|
63
|
+
endDate: string
|
|
64
|
+
state: ContractState
|
|
65
|
+
contractProvider: IContractProviderResponse
|
|
66
|
+
templateImage: string
|
|
67
|
+
termsRef: string
|
|
68
|
+
termsOfTradeRef?: string
|
|
69
|
+
paymentGateway: PaymentGateway
|
|
70
|
+
offerExpiresAt?: Date
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface IBasicContractDetailsResponse extends IEssentialContract {
|
|
74
|
+
country: TIsoCountry
|
|
75
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { TContractObject } from '../admin/product'
|
|
2
|
+
import { ContractState, WarrantyState } from '../index'
|
|
3
|
+
|
|
4
|
+
export interface IContractFilterDate {
|
|
5
|
+
min: string
|
|
6
|
+
max: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IContractFilterOption {
|
|
10
|
+
title: string
|
|
11
|
+
id: ContractState
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IWarrantyFilterOption {
|
|
15
|
+
title: string
|
|
16
|
+
id: WarrantyState
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IContractFilterOptions {
|
|
20
|
+
contractStates: IContractFilterOption[]
|
|
21
|
+
templates: IContractFilterOption[]
|
|
22
|
+
options: IContractFilterOption[]
|
|
23
|
+
sellers: IContractFilterOption[]
|
|
24
|
+
subProviders: IContractFilterOption[]
|
|
25
|
+
created: IContractFilterDate
|
|
26
|
+
expired: IContractFilterDate
|
|
27
|
+
activeTypes: TContractObject[]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface IContractStatusCount {
|
|
31
|
+
contractState: ContractState
|
|
32
|
+
count: number
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IContractProductTypeCountResponse {
|
|
36
|
+
[contractObjectType: string]: number
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface IContractFilterParams {
|
|
40
|
+
contractStates: ContractState[]
|
|
41
|
+
contractObjectType: TContractObject // Renamed from contractProduct.
|
|
42
|
+
templates: number[]
|
|
43
|
+
options: number[]
|
|
44
|
+
sellers: number[]
|
|
45
|
+
subProviders: number[]
|
|
46
|
+
created: IContractFilterDate
|
|
47
|
+
expired: IContractFilterDate
|
|
48
|
+
activeTypes: TContractObject[]
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface IWarrantyFilterParams {
|
|
52
|
+
contractStates: ContractState[]
|
|
53
|
+
templates: number[]
|
|
54
|
+
options: number[]
|
|
55
|
+
sellers: number[]
|
|
56
|
+
created: IContractFilterDate
|
|
57
|
+
expired: IContractFilterDate
|
|
58
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IContractHealth } from './../admin/contract/health'
|
|
2
|
+
import { ContractState } from './../index'
|
|
3
|
+
import { IContractFilterDate, IContractFilterOption } from './contractFilter'
|
|
4
|
+
|
|
5
|
+
export interface IContractListRecord {
|
|
6
|
+
prettyIdentifier: string
|
|
7
|
+
brand: string
|
|
8
|
+
contractEndDate: Date | string
|
|
9
|
+
contractCreationDate: Date | string
|
|
10
|
+
contractState: ContractState
|
|
11
|
+
contractName: string
|
|
12
|
+
contractTemplateDescription: string
|
|
13
|
+
customerName: string
|
|
14
|
+
customerCompanyName: string
|
|
15
|
+
registrationNumber?: string
|
|
16
|
+
serialNumber?: string
|
|
17
|
+
itemNumber?: string
|
|
18
|
+
itemNumber2?: string
|
|
19
|
+
sellerName: string
|
|
20
|
+
health: IContractHealth[]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type ContractListOrderByType =
|
|
24
|
+
| 'prettyIdentifier'
|
|
25
|
+
| 'brand'
|
|
26
|
+
| 'productBrand'
|
|
27
|
+
| 'contractEndDate'
|
|
28
|
+
| 'contractCreationDate'
|
|
29
|
+
| 'contractState'
|
|
30
|
+
| 'customerCompanyName'
|
|
31
|
+
| 'contractTemplateDescription'
|
|
32
|
+
| 'contractName'
|
|
33
|
+
| 'customerName'
|
|
34
|
+
| 'registrationNumber'
|
|
35
|
+
| 'sellerName'
|
|
36
|
+
| 'serialNumber'
|
|
37
|
+
| 'serialNumber2'
|
|
38
|
+
| 'itemNumber'
|
|
39
|
+
| 'itemNumber2'
|
|
40
|
+
| 'createdByProvider'
|
|
41
|
+
|
|
42
|
+
export interface IWarrantyListRecord {
|
|
43
|
+
prettyIdentifier: string
|
|
44
|
+
brand: string
|
|
45
|
+
warrantyEndDate: Date | string
|
|
46
|
+
warrantyCreationDate: Date | string
|
|
47
|
+
warrantyState: ContractState
|
|
48
|
+
warrantyeName: string
|
|
49
|
+
customerName: string
|
|
50
|
+
customerCompanyName: string
|
|
51
|
+
registrationNumber: string
|
|
52
|
+
sellerName: string
|
|
53
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ContractValueType } from '../admin'
|
|
2
|
+
import { Customer } from '../customer'
|
|
3
|
+
import { ProductAlongItsContracts } from '../product'
|
|
4
|
+
import { VehicleAlongItsContracts } from '../vehicle'
|
|
5
|
+
import { IContractOptionResponse } from './../contractOption'
|
|
6
|
+
import { IContractTemplateResponse } from './../contractTemplate'
|
|
7
|
+
import { PaymentGateway } from './../payment'
|
|
8
|
+
|
|
9
|
+
export interface IContractOfferRequest<TProduct = VehicleAlongItsContracts> {
|
|
10
|
+
contractProviderId: number
|
|
11
|
+
userId?: number
|
|
12
|
+
customer?: Customer
|
|
13
|
+
product?: TProduct
|
|
14
|
+
duration: number
|
|
15
|
+
mileage: number
|
|
16
|
+
startDateISOString: string
|
|
17
|
+
startMileage: number
|
|
18
|
+
value?: number
|
|
19
|
+
valueType?: ContractValueType
|
|
20
|
+
startValue?: number
|
|
21
|
+
startValueType?: ContractValueType
|
|
22
|
+
template?: IContractTemplateResponse
|
|
23
|
+
options: IContractOptionResponse[]
|
|
24
|
+
paymentGateway: PaymentGateway
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface IContractOfferResponse {
|
|
28
|
+
contractId: number
|
|
29
|
+
token: string
|
|
30
|
+
paymentGateway: PaymentGateway
|
|
31
|
+
prettyIdentifier: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type ProductTypeContract = VehicleAlongItsContracts | ProductAlongItsContracts
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// @NOTE - Deprecate this file
|
|
2
|
+
import { ISearchQuery, OrderDirection } from '../queryParams'
|
|
3
|
+
import { PaymentGateway } from './../payment'
|
|
4
|
+
import { IContractFilterOptions } from './contractFilter'
|
|
5
|
+
|
|
6
|
+
export type ContractOrderBy =
|
|
7
|
+
| 'prettyIdentifier'
|
|
8
|
+
| 'contractName'
|
|
9
|
+
| 'registrationNumber'
|
|
10
|
+
| 'serialNumber'
|
|
11
|
+
| 'serialNumber2'
|
|
12
|
+
| 'itemNumber'
|
|
13
|
+
| 'itemNumber2'
|
|
14
|
+
| 'customerName'
|
|
15
|
+
| 'contractCreationDate'
|
|
16
|
+
| 'contractEndDate'
|
|
17
|
+
| 'sellerName'
|
|
18
|
+
| 'contractState'
|
|
19
|
+
| 'brand'
|
|
20
|
+
|
|
21
|
+
export type WarrantyOrderBy =
|
|
22
|
+
| 'prettyIdentifier'
|
|
23
|
+
| 'contractName'
|
|
24
|
+
| 'registrationNumber'
|
|
25
|
+
| 'serialNumber'
|
|
26
|
+
| 'serialNumber2'
|
|
27
|
+
| 'itemNumber'
|
|
28
|
+
| 'itemNumber2'
|
|
29
|
+
| 'customerName'
|
|
30
|
+
| 'contractCreationDate'
|
|
31
|
+
| 'contractEndDate'
|
|
32
|
+
| 'sellerName'
|
|
33
|
+
| 'contractState'
|
|
34
|
+
| 'brand'
|
|
35
|
+
|
|
36
|
+
export interface IContractQuery extends ISearchQuery<ContractOrderBy> {
|
|
37
|
+
createdDateStart?: Date | string
|
|
38
|
+
createdDateEnd?: Date | string
|
|
39
|
+
expirationDateStart?: Date | string
|
|
40
|
+
expirationDateEnd?: Date | string
|
|
41
|
+
createdDate?: Date | string
|
|
42
|
+
expirationDate?: Date | string
|
|
43
|
+
filtering?: IContractFilterOptions
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface IContractSearchResult {
|
|
47
|
+
prettyIdentifier: string
|
|
48
|
+
contractCreationDate: Date
|
|
49
|
+
contractEndDate: Date
|
|
50
|
+
sellerName: string
|
|
51
|
+
registrationNumber: string
|
|
52
|
+
brand: string
|
|
53
|
+
customerName: string
|
|
54
|
+
paymentMethod: PaymentGateway
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface IMappedContractQuery extends IContractQuery {
|
|
58
|
+
limit: number
|
|
59
|
+
offset: number
|
|
60
|
+
orderBy: ContractOrderBy
|
|
61
|
+
orderDirection: OrderDirection
|
|
62
|
+
createdDateStart?: Date
|
|
63
|
+
createdDateEnd?: Date
|
|
64
|
+
expirationDateStart?: Date
|
|
65
|
+
expirationDateEnd?: Date
|
|
66
|
+
createdDate?: Date
|
|
67
|
+
expirationDate?: Date
|
|
68
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ContractActionType } from './index'
|
|
2
|
+
import { PriceSpecification } from './priceSpecification'
|
|
3
|
+
|
|
4
|
+
export type TActionSeverityType = 'Info' | 'Warning' | 'Error'
|
|
5
|
+
export type TActionOrderBy = 'id' | 'created' | 'action' | 'userName' | 'comment'
|
|
6
|
+
|
|
7
|
+
export interface IContractActionRequest {
|
|
8
|
+
severityType?: TActionSeverityType
|
|
9
|
+
action: ContractActionType
|
|
10
|
+
userId: number | undefined
|
|
11
|
+
comment: string | undefined
|
|
12
|
+
details: { [k: string]: any }
|
|
13
|
+
messageId?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IContractActionResponse {
|
|
17
|
+
id: number
|
|
18
|
+
created: Date | string
|
|
19
|
+
action: ContractActionType
|
|
20
|
+
userName: string
|
|
21
|
+
comment: string
|
|
22
|
+
severityType: TActionSeverityType | null
|
|
23
|
+
details?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ISettlementActionRequest {
|
|
27
|
+
id: number
|
|
28
|
+
settlementComment: string
|
|
29
|
+
shareComment: boolean
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ISettlementActionResponse {
|
|
33
|
+
id: number
|
|
34
|
+
created: Date | string
|
|
35
|
+
type: ContractActionType
|
|
36
|
+
userName: string
|
|
37
|
+
settlementComment: string
|
|
38
|
+
shareComment: boolean
|
|
39
|
+
amount: PriceSpecification
|
|
40
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PriceSpecification } from './priceSpecification'
|
|
2
|
+
import { ITermsOfServiceResponse } from './termsOfService'
|
|
3
|
+
|
|
4
|
+
export interface IContractOptionRequest {
|
|
5
|
+
description: string
|
|
6
|
+
conditionText: string
|
|
7
|
+
weight?: number
|
|
8
|
+
price: PriceSpecification
|
|
9
|
+
contractProviderId: number
|
|
10
|
+
archived?: boolean
|
|
11
|
+
abbreviation: string
|
|
12
|
+
optionGroup: number | null
|
|
13
|
+
internalName: string
|
|
14
|
+
showOnWebcalc: boolean
|
|
15
|
+
warranty: number | null
|
|
16
|
+
calculationMethod: number | null
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IBasicContractOption {
|
|
20
|
+
internalName: string
|
|
21
|
+
description: string // External name.
|
|
22
|
+
v4FixedPrice?: boolean
|
|
23
|
+
v4PriceListID?: number
|
|
24
|
+
v4ParameterID?: number // Index of PriceList parameter (parameterID).
|
|
25
|
+
v4Value?: string | number
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IGenericContractOptionResponse extends IBasicContractOption {
|
|
29
|
+
id: number
|
|
30
|
+
price: PriceSpecification
|
|
31
|
+
conditionText: string
|
|
32
|
+
weight: number // (!) Sort order.
|
|
33
|
+
contractProviderId: number | null
|
|
34
|
+
abbreviation: string
|
|
35
|
+
optionGroup: number | null
|
|
36
|
+
warranty: number | null | undefined
|
|
37
|
+
calculationMethod: number | null
|
|
38
|
+
termsOfService?: ITermsOfServiceResponse | null
|
|
39
|
+
maxEndAge?: number
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IContractOptionResponse extends IGenericContractOptionResponse {
|
|
43
|
+
showOnWebcalc: boolean
|
|
44
|
+
maxEndMileage?: number
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface IProductContractOptionResponse extends IGenericContractOptionResponse {
|
|
48
|
+
maxEndServices?: number
|
|
49
|
+
maxEndHours?: number
|
|
50
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { IContactPersonRequest, IContactPersonResponse } from './contactPerson'
|
|
2
|
+
import { ICountryRequest, ICountryResponse } from './country'
|
|
3
|
+
import { ContractState, TCurrency, TV4PTProductType } from './index'
|
|
4
|
+
import { PaymentGateway } from './payment'
|
|
5
|
+
import { IProviderCustomizationResponse } from './providerBranding'
|
|
6
|
+
|
|
7
|
+
export interface IContractProviderRequest extends IProviderCustomizationResponse {
|
|
8
|
+
administrativeName: string
|
|
9
|
+
cvrCode: string
|
|
10
|
+
country: ICountryRequest
|
|
11
|
+
omnicarFee: number
|
|
12
|
+
paymentGateways: PaymentGateway[]
|
|
13
|
+
postmarkFromEmail: string
|
|
14
|
+
|
|
15
|
+
logo: string
|
|
16
|
+
contactFormUrl: string
|
|
17
|
+
showRegistrationSelectionPage: boolean
|
|
18
|
+
sendWelcomeLetter: boolean
|
|
19
|
+
finalizedDate: Date | null
|
|
20
|
+
providerIdentifier: string
|
|
21
|
+
contactPerson: IContactPersonRequest
|
|
22
|
+
termsOfTradeRef: string
|
|
23
|
+
visibleToOtherChildren: boolean
|
|
24
|
+
webCalcEnabled: boolean
|
|
25
|
+
webTitle: string | null
|
|
26
|
+
isUseWhiteBGOnWeb: boolean
|
|
27
|
+
isForceAllowCustomContracts: boolean
|
|
28
|
+
isShowLogoOnWeb: boolean
|
|
29
|
+
webLogoBanner: string | null
|
|
30
|
+
webLogoSquare: string | null
|
|
31
|
+
disableContractTemplates: boolean
|
|
32
|
+
productsEnabled: boolean
|
|
33
|
+
parentProviderId: number | null
|
|
34
|
+
autoSettlement: boolean
|
|
35
|
+
fragusContactPersonName: string | null
|
|
36
|
+
providerGroup: string | null
|
|
37
|
+
providerCategory: string | null
|
|
38
|
+
additionalEmails: string | null
|
|
39
|
+
isUsingV4PricingTool: boolean
|
|
40
|
+
isUseV4PTOnlyForSigning: boolean
|
|
41
|
+
isLoadOptionalProviderCustomization: boolean
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface IContractProviderResponse extends IProviderCustomizationResponse {
|
|
45
|
+
contractProviderId: number
|
|
46
|
+
administrativeName: string
|
|
47
|
+
parentProviderId: number | null
|
|
48
|
+
cvrCode: string
|
|
49
|
+
country: ICountryResponse
|
|
50
|
+
currency?: TCurrency
|
|
51
|
+
omnicarFee: number
|
|
52
|
+
paymentGateways: PaymentGateway[]
|
|
53
|
+
postmarkFromEmail: string
|
|
54
|
+
|
|
55
|
+
logo: string
|
|
56
|
+
logoUrl?: string | null
|
|
57
|
+
contactFormUrl: string
|
|
58
|
+
showRegistrationSelectionPage: boolean
|
|
59
|
+
sendWelcomeLetter: boolean
|
|
60
|
+
finalizedDate: Date | null
|
|
61
|
+
providerIdentifier: string
|
|
62
|
+
contactPerson: IContactPersonResponse
|
|
63
|
+
termsOfTradeRef: string
|
|
64
|
+
visibleToOtherChildren: boolean
|
|
65
|
+
webCalcEnabled: boolean
|
|
66
|
+
webTitle: string | null
|
|
67
|
+
isUseWhiteBGOnWeb: boolean
|
|
68
|
+
isForceAllowCustomContracts: boolean
|
|
69
|
+
isShowLogoOnWeb: boolean
|
|
70
|
+
webLogoBanner: string | null
|
|
71
|
+
webLogoBannerUrl?: string | null
|
|
72
|
+
webLogoSquare: string | null
|
|
73
|
+
webLogoSquareUrl?: string | null
|
|
74
|
+
disableContractTemplates: boolean
|
|
75
|
+
productsEnabled: boolean
|
|
76
|
+
state: ProviderState
|
|
77
|
+
autoSettlement: boolean
|
|
78
|
+
isAllowContractsWithoutVehiclePriceModel: boolean
|
|
79
|
+
fragusContactPersonName: string | null
|
|
80
|
+
providerGroup: string | null
|
|
81
|
+
providerCategory: string | null
|
|
82
|
+
additionalEmails: string | null
|
|
83
|
+
isUsingV4PricingTool: boolean
|
|
84
|
+
isUseV4PTOnlyForSigning: boolean
|
|
85
|
+
isLoadOptionalProviderCustomization: boolean // Has providerCustomizationLoaded been loaded?
|
|
86
|
+
generalConditions: string
|
|
87
|
+
optionsConditions?: string
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface IContractProviderListItemResponse {
|
|
91
|
+
administrativeName: string
|
|
92
|
+
autoSettlement: boolean
|
|
93
|
+
contractProviderId: number
|
|
94
|
+
country: ICountryResponse
|
|
95
|
+
cvrCode: string
|
|
96
|
+
disableContractTemplates: boolean
|
|
97
|
+
fragusContactPersonName: string | null
|
|
98
|
+
isAllowContractsWithoutVehiclePriceModel: boolean
|
|
99
|
+
isForceEnableCustomContract: boolean
|
|
100
|
+
isShowLogoOnWeb: boolean
|
|
101
|
+
isUseWhiteBGOnWeb: boolean
|
|
102
|
+
isUsingV4PricingTool: boolean
|
|
103
|
+
isUseV4PTOnlyForSigning: boolean
|
|
104
|
+
omnicarFee: number
|
|
105
|
+
parentProviderId: number | null
|
|
106
|
+
productsEnabled: boolean
|
|
107
|
+
providerCategory: string | null
|
|
108
|
+
providerGroup: string | null
|
|
109
|
+
providerIdentifier: string
|
|
110
|
+
state: ProviderState
|
|
111
|
+
webCalcEnabled: boolean
|
|
112
|
+
generalConditions: string
|
|
113
|
+
optionsConditions?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type ProviderState = 'Active' | 'Inactive'
|