@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,314 @@
|
|
|
1
|
+
import { IContractDetailsRecord } from '..'
|
|
2
|
+
import { DurationOptions, IContractOptionResponse, TMileageDurationsMap, TV4PTProductType } from '../..'
|
|
3
|
+
import { IContractTemplateResponse, IGenericContractTemplateResponse, PriceSource } from '../../contractTemplate'
|
|
4
|
+
import { PaymentGateway, PaymentType } from '../../payment'
|
|
5
|
+
import { Other } from '../../product'
|
|
6
|
+
import { ITermsOfServiceResponse } from '../../termsOfService'
|
|
7
|
+
import { IVehicleInfo, TVehicleType, Vehicle, VehicleAlongItsContracts } from '../../vehicle'
|
|
8
|
+
import { IAdminCustomer } from '../customer/customer'
|
|
9
|
+
import { PriceSpecification } from './../../priceSpecification'
|
|
10
|
+
import { ICarCollection } from './carData'
|
|
11
|
+
import { IContractCalculationResponse } from './priceCalculation'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export type ContractType = 'STANDARD' | 'CUSTOM' | 'EXTERNAL'
|
|
15
|
+
|
|
16
|
+
export type ServiceContractFlag = 'DISTRIBUTE_DOWNPAYMENT' | 'NULLIFY_DOWNPAYMENT'
|
|
17
|
+
|
|
18
|
+
export interface IContractCreationData {
|
|
19
|
+
payment: IContractCreationPayment
|
|
20
|
+
termsOfTradeRef?: string
|
|
21
|
+
cars: ICarCollection
|
|
22
|
+
templates: IGenericContractTemplateResponse[]
|
|
23
|
+
templatesAllDisabled?: boolean
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IProviderHasAccessToProductsRequest {
|
|
27
|
+
providerId: number | string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface IProviderHasAccessToProductsResponse {
|
|
31
|
+
hasAccess: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IContractCreationPayment {
|
|
35
|
+
stripeToken: string
|
|
36
|
+
paymentGateways: PaymentGateway[]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type ContractValueTypeEnum = 'Mileage' | 'Hours' | 'Services' | 'None'
|
|
40
|
+
export type ContractValueType = Exclude<ContractValueTypeEnum, 'None'> | undefined
|
|
41
|
+
|
|
42
|
+
interface ICommonContractUpdateRequest {
|
|
43
|
+
priceSource?: PriceSource
|
|
44
|
+
contractProductType: TV4PTProductType | null
|
|
45
|
+
contractProviderId: number
|
|
46
|
+
contractTemplateId: number | null
|
|
47
|
+
serviceVariantId: string
|
|
48
|
+
serviceVariantName: string
|
|
49
|
+
value?: number
|
|
50
|
+
valueType: ContractValueType
|
|
51
|
+
duration: number
|
|
52
|
+
mileage?: number
|
|
53
|
+
startDateISOString: string
|
|
54
|
+
optionIds: number[]
|
|
55
|
+
providerPayments: number
|
|
56
|
+
providerShare: number
|
|
57
|
+
reference?: string
|
|
58
|
+
startMileage?: number
|
|
59
|
+
startValue?: number
|
|
60
|
+
startValueType: ContractValueType
|
|
61
|
+
type: ContractType
|
|
62
|
+
offerExpiresAt?: Date
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface ISubscription {
|
|
66
|
+
amountPrPayment: PriceSpecification
|
|
67
|
+
firstPaymentDate: Date
|
|
68
|
+
lastPaymentDate: Date
|
|
69
|
+
numberOfPayments: number
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface IOptionInfo {
|
|
73
|
+
name: string
|
|
74
|
+
abbreviation: string
|
|
75
|
+
description: string
|
|
76
|
+
termsOfService?: ITermsOfServiceResponse | null
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface IContractInfo {
|
|
80
|
+
templateName: string
|
|
81
|
+
prettyIdentifier: string
|
|
82
|
+
minimumPaymentsCount: null | number
|
|
83
|
+
termsUrl: string
|
|
84
|
+
duration: number
|
|
85
|
+
mileage: number
|
|
86
|
+
value: number | undefined
|
|
87
|
+
startMileage: number
|
|
88
|
+
startDate: Date
|
|
89
|
+
endDate: Date
|
|
90
|
+
includedOptions: IOptionInfo[]
|
|
91
|
+
additionalOptions: IOptionInfo[]
|
|
92
|
+
startValue: number | undefined
|
|
93
|
+
startValueType: ContractValueType | undefined
|
|
94
|
+
valueType: ContractValueType | undefined
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface IContractProviderPaymentInfo {
|
|
98
|
+
administrativeName: string
|
|
99
|
+
address: string
|
|
100
|
+
postal_code: string
|
|
101
|
+
city: string
|
|
102
|
+
phone: string
|
|
103
|
+
termsUrl: string
|
|
104
|
+
}
|
|
105
|
+
interface IPublicKeyResponse {
|
|
106
|
+
publicKey: string
|
|
107
|
+
stripeAccount: string
|
|
108
|
+
}
|
|
109
|
+
/*
|
|
110
|
+
* The folling info is only what the paying "customer" needs to know
|
|
111
|
+
* when presenting this info. For more specific and sensitive info,
|
|
112
|
+
* it is already saved on the database.
|
|
113
|
+
*/
|
|
114
|
+
interface IBasicPaymentInformationResponse {
|
|
115
|
+
publicKey: string
|
|
116
|
+
contractProvider: IContractProviderPaymentInfo
|
|
117
|
+
contract: IContractInfo
|
|
118
|
+
totalAmount: PriceSpecification | null
|
|
119
|
+
minimumTotalAmount: PriceSpecification | null
|
|
120
|
+
downpayment: PriceSpecification
|
|
121
|
+
subscriptions: ISubscription[]
|
|
122
|
+
paymentGateway: PaymentGateway
|
|
123
|
+
}
|
|
124
|
+
/*
|
|
125
|
+
* The folling info is only what the paying "customer" needs to know
|
|
126
|
+
* when presenting this info. For more specific and sensitive info,
|
|
127
|
+
* it is already saved on the database.
|
|
128
|
+
*/
|
|
129
|
+
interface IPaymentInformationResponse extends IBasicPaymentInformationResponse {
|
|
130
|
+
customer: IAdminCustomer
|
|
131
|
+
product: Vehicle | Other
|
|
132
|
+
}
|
|
133
|
+
interface ISetupIntentResponse {
|
|
134
|
+
clientSecret: string
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface ISetPaymentMethodRequest {
|
|
138
|
+
contractId: string | number
|
|
139
|
+
paymentMethodId: string
|
|
140
|
+
}
|
|
141
|
+
interface ISetPaymentMethodResponse {
|
|
142
|
+
status: 'processing' | 'succeeded'
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
interface ICommonContractCreationRequest extends ICommonContractUpdateRequest {
|
|
146
|
+
contractTemplateName: string
|
|
147
|
+
product: Vehicle | Other
|
|
148
|
+
paymentGateway: PaymentGateway
|
|
149
|
+
customerId?: number
|
|
150
|
+
customer?: IAdminCustomer
|
|
151
|
+
invoiceCustomerId?: number
|
|
152
|
+
invoiceCustomer?: IAdminCustomer
|
|
153
|
+
isDownpaymentDistributed: boolean
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface IContractAdjustmentRequest extends ICommonContractUpdateRequest {
|
|
157
|
+
amountPerPayment?: number
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface ICustomContractCreationRequest extends ICommonContractCreationRequest {
|
|
161
|
+
type: 'CUSTOM'
|
|
162
|
+
amountPerPayment: number
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface IStandardContractCreationRequest extends ICommonContractCreationRequest {
|
|
166
|
+
type: 'STANDARD'
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface IStandardV4PricingToolContractCreationRequest extends IStandardContractCreationRequest {
|
|
170
|
+
vehicleInfo: IVehicleInfo
|
|
171
|
+
v4ProductId: number
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface IStandardV4PricingToolContractPrintCreationRequest
|
|
175
|
+
extends IStandardV4PricingToolContractCreationRequest {
|
|
176
|
+
type: 'STANDARD'
|
|
177
|
+
amountPerPayment?: number
|
|
178
|
+
adjustedFrom?: string
|
|
179
|
+
isAdjustment?: boolean
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface IContractPrintCreationRequest extends ICommonContractCreationRequest {
|
|
183
|
+
type: 'STANDARD' | 'CUSTOM'
|
|
184
|
+
amountPerPayment?: number
|
|
185
|
+
adjustedFrom?: string
|
|
186
|
+
isAdjustment?: boolean
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @deprecated warrantyId Not needed, if using the "NEW WAY" and V4PT, this will be loaded from the already saved contract.
|
|
191
|
+
* @deprecated modelModelId
|
|
192
|
+
* @deprecated finlandPriceId
|
|
193
|
+
*/
|
|
194
|
+
export interface ICreateDelaerPaidContractRequest {
|
|
195
|
+
prettyIdentifier: string | null
|
|
196
|
+
warrantyId: number | null // SAM Warranty ID.
|
|
197
|
+
warrantyLengthMonths: number
|
|
198
|
+
modelModelId?: number
|
|
199
|
+
vehicleAlongItsContracts: Vehicle | VehicleAlongItsContracts
|
|
200
|
+
startMileage: number
|
|
201
|
+
customerId?: number
|
|
202
|
+
customer?: IAdminCustomer
|
|
203
|
+
startDate: Date | null
|
|
204
|
+
finlandPriceId?: number
|
|
205
|
+
endMileage?: number // For debugging.
|
|
206
|
+
reference?: string
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface ICreateDelaerPaidContractResponse {
|
|
210
|
+
req: ICreateDelaerPaidContractRequest
|
|
211
|
+
success: boolean
|
|
212
|
+
error: string
|
|
213
|
+
startDate: Date
|
|
214
|
+
endDate: Date
|
|
215
|
+
warrantyType: string
|
|
216
|
+
customerId: number
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface IAvailableFreeWarrantyDurationPrice {
|
|
220
|
+
allowedDistanceMileage: undefined | number // Allowed driving limit/distance during this Warranty duration.
|
|
221
|
+
allowedPowerV4Interval:
|
|
222
|
+
| undefined
|
|
223
|
+
| {
|
|
224
|
+
lookedUpEngineMaxPower: number
|
|
225
|
+
minEngineMaxPower: number
|
|
226
|
+
maxEngineMaxPower: number
|
|
227
|
+
}
|
|
228
|
+
customerPrice: PriceSpecification | null
|
|
229
|
+
durationMonths: number
|
|
230
|
+
finlandPriceId?: number
|
|
231
|
+
totalPrice: PriceSpecification
|
|
232
|
+
isEnabledAndAvailable?: boolean | null // Dependent of optional user setting for this DurationPrice-group or default setting in WarrantyData.
|
|
233
|
+
debug?: any // For debugging purposes.
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface IAvailableFreeWarranty {
|
|
237
|
+
warrantyId: number
|
|
238
|
+
warrantyName: string
|
|
239
|
+
description: string
|
|
240
|
+
maxYears: number
|
|
241
|
+
oneTimeFeeYear: PriceSpecification
|
|
242
|
+
externalId: number
|
|
243
|
+
calculationMethod: 100 | 200
|
|
244
|
+
maxStartMileage: number
|
|
245
|
+
maxEndMileage: number // The absolute maximum End-Mileage Odometer reading for this product.
|
|
246
|
+
maxStartHours?: number
|
|
247
|
+
maxEndHours?: number
|
|
248
|
+
maxStartServices?: number
|
|
249
|
+
maxEndServices?: number
|
|
250
|
+
warrantyTermsRef: string
|
|
251
|
+
contractStartDate: Date
|
|
252
|
+
durationsPrices: IAvailableFreeWarrantyDurationPrice[]
|
|
253
|
+
weight: number
|
|
254
|
+
warrantyColor: string
|
|
255
|
+
warrantyBGColor: string | null
|
|
256
|
+
fuelTypes: null | string[] // Only available for these fuelTypes, null means all fuelTypes.
|
|
257
|
+
vehicleTypes: null | TVehicleType[] // Only available for these vehicleTypes, null means all vehicleTypes.
|
|
258
|
+
isForbidDealerPaid: boolean
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface IContractCreationResponse {
|
|
262
|
+
serviceContractId: number
|
|
263
|
+
prettyIdentifier: string
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export interface IAdminContractActivationRequest {
|
|
267
|
+
paymentGateway: PaymentGateway
|
|
268
|
+
paymentType: PaymentType
|
|
269
|
+
creditCardToken?: string
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface IAdminContractActivationResponse {
|
|
273
|
+
serviceContract: IContractDetailsRecord
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface IAdminContractResponse {
|
|
277
|
+
type: ContractType
|
|
278
|
+
contractName: string
|
|
279
|
+
product: Vehicle | Other
|
|
280
|
+
contractTemplate: IContractTemplateResponse
|
|
281
|
+
additionalOptions: IContractOptionResponse[]
|
|
282
|
+
includedAdditionalOptions: IContractOptionResponse[]
|
|
283
|
+
durations: DurationOptions[]
|
|
284
|
+
mileageDurationsMap: TMileageDurationsMap | null // Structure for ContractFlowDurationMileageVer2 for V4PricingTool contracts.
|
|
285
|
+
duration: number
|
|
286
|
+
mileage: number
|
|
287
|
+
startMileage: number
|
|
288
|
+
contractStartDateISO: null | Date
|
|
289
|
+
value: number | undefined
|
|
290
|
+
valueType: ContractValueType
|
|
291
|
+
startValue: number | undefined
|
|
292
|
+
startValueType: ContractValueType
|
|
293
|
+
paymentGateway: PaymentGateway
|
|
294
|
+
customerId: number
|
|
295
|
+
customer: IAdminCustomer
|
|
296
|
+
availableTemplatesExtension?: IContractTemplateResponse[]
|
|
297
|
+
availableDurationsExtension?: DurationOptions[]
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface IAdminContractAdjustmentResponse extends IAdminContractResponse {
|
|
301
|
+
payments: IContractCalculationResponse
|
|
302
|
+
invoiceCustomerId: number
|
|
303
|
+
invoiceCustomer: IAdminCustomer
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export interface IAdminContractOfferCopyResponse extends IAdminContractResponse {
|
|
307
|
+
payments: Partial<IContractCalculationResponse>
|
|
308
|
+
reference: string
|
|
309
|
+
customTerms: string
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export interface IContractOfferPrintData {
|
|
313
|
+
token: string
|
|
314
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { PriceSource, TV4PTProductType } from '../../'
|
|
2
|
+
import { PriceSpecification } from '../../priceSpecification'
|
|
3
|
+
import { IVehicleInfo } from '../../vehicle'
|
|
4
|
+
import { ContractType, ContractValueType } from './contractCreation'
|
|
5
|
+
|
|
6
|
+
export interface IContractCalculationRequest {
|
|
7
|
+
priceSource?: PriceSource
|
|
8
|
+
contractProductType: TV4PTProductType | null
|
|
9
|
+
contractTemplateId: number
|
|
10
|
+
duration: number // AKA durationMonths, in months.
|
|
11
|
+
startDateISOString: string
|
|
12
|
+
isAdjustment: boolean
|
|
13
|
+
isDownpaymentDistributed: boolean
|
|
14
|
+
mileage: number // AKA distance, in km.
|
|
15
|
+
modelYear: number
|
|
16
|
+
optionIds: number[]
|
|
17
|
+
providerPayments: number
|
|
18
|
+
providerShare: number
|
|
19
|
+
registrationDate: string
|
|
20
|
+
registrationNumber: string
|
|
21
|
+
serviceVariantId: string
|
|
22
|
+
type: ContractType
|
|
23
|
+
valueType: ContractValueType
|
|
24
|
+
adjustedFrom?: string
|
|
25
|
+
startMileage?: number
|
|
26
|
+
startValue?: number
|
|
27
|
+
startValueType?: ContractValueType
|
|
28
|
+
value?: number
|
|
29
|
+
vin?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface IStandardContractCalculationRequest extends IContractCalculationRequest {
|
|
33
|
+
brandId: number
|
|
34
|
+
productModelId: number
|
|
35
|
+
fuelTypeId: number
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface IStandardAxContractCalculationRequest extends IContractCalculationRequest {
|
|
39
|
+
brandName: string
|
|
40
|
+
productModelName: string
|
|
41
|
+
fuelTypeName: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ICustomContractCalculationRequest extends IContractCalculationRequest {
|
|
45
|
+
amountPerPayment: number
|
|
46
|
+
brandName: string
|
|
47
|
+
productModelName: string
|
|
48
|
+
fuelTypeName: string
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* For V4PricingTool.
|
|
53
|
+
* @note The product in v4ProductId, not to be confused with product that is either a Vehicle or Other.
|
|
54
|
+
*/
|
|
55
|
+
export interface IStandardV4PricingToolContractCalculationRequest extends IContractCalculationRequest {
|
|
56
|
+
vehicleInfo: IVehicleInfo
|
|
57
|
+
v4ProductId: number // V4 contract product / "template" id.
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The type returned by a price calculation.
|
|
62
|
+
*/
|
|
63
|
+
export interface IContractCalculationResponse {
|
|
64
|
+
adjustedAmount?: PriceSpecification
|
|
65
|
+
adjustedContractFullCost?: PriceSpecification
|
|
66
|
+
adjustedPaymentsLeft?: number
|
|
67
|
+
amountPrPayment: PriceSpecification
|
|
68
|
+
contractCost: PriceSpecification
|
|
69
|
+
contractEndDate: string
|
|
70
|
+
contractStartDate: string
|
|
71
|
+
customerCost: PriceSpecification
|
|
72
|
+
customerPayments: number
|
|
73
|
+
customerShare: PriceSpecification
|
|
74
|
+
distributedAmount: PriceSpecification
|
|
75
|
+
downpayment: PriceSpecification
|
|
76
|
+
firstPaymentDate: string
|
|
77
|
+
isDownpaymentDistributed: boolean
|
|
78
|
+
providerCost: PriceSpecification
|
|
79
|
+
providerPayments: number
|
|
80
|
+
providerShare: PriceSpecification
|
|
81
|
+
x_debugData?: any // For debugging purposes.
|
|
82
|
+
serviceInfo?: string[] // Service information, mainly for ax.
|
|
83
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IApiOtherWithContracts } from '../../admin/product'
|
|
2
|
+
import { IApiVehicleWithContracts } from '../../admin/vehicle'
|
|
3
|
+
import { IsoLocale } from '../../locale'
|
|
4
|
+
|
|
5
|
+
export type ContractProviderOrderBy = 'providerId' | 'administrativeName' | 'inactive'
|
|
6
|
+
|
|
7
|
+
export interface IEssentialContractProviderInfo {
|
|
8
|
+
administrativeName: string
|
|
9
|
+
email: string
|
|
10
|
+
phone: string
|
|
11
|
+
// TODO: add TIsoCountry type
|
|
12
|
+
country: string
|
|
13
|
+
logo: string
|
|
14
|
+
isShowLogoOnWeb?: boolean
|
|
15
|
+
webLogoBanner?: string | null
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IContractProviderInfo extends IEssentialContractProviderInfo {
|
|
19
|
+
providerId: number
|
|
20
|
+
parentProviderId: number | null
|
|
21
|
+
address1: string
|
|
22
|
+
address2?: string
|
|
23
|
+
city: string
|
|
24
|
+
zipcode: string
|
|
25
|
+
locale: IsoLocale
|
|
26
|
+
currency: string
|
|
27
|
+
webTitle?: string | null
|
|
28
|
+
isUseWhiteBGOnWeb?: boolean
|
|
29
|
+
isForceEnableCustomContracts?: boolean
|
|
30
|
+
productsEnabled?: boolean
|
|
31
|
+
webLogoSquare?: string | null
|
|
32
|
+
vatPct: number
|
|
33
|
+
inactive: boolean
|
|
34
|
+
isUsingV4PricingTool: boolean
|
|
35
|
+
isUseV4PTOnlyForSigning: boolean
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ICreateTestContractProvider {
|
|
39
|
+
administrativeName: string
|
|
40
|
+
countryIsoCode: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface IProviderWithContracts {
|
|
44
|
+
provider: IContractProviderInfo
|
|
45
|
+
vehicles?: IApiVehicleWithContracts[]
|
|
46
|
+
products?: IApiOtherWithContracts[]
|
|
47
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Note: response is handled as 200 OK or 500 Internal Server Error.
|
|
2
|
+
export interface IAdminCustomerLoginRequest {
|
|
3
|
+
prettyIdentifier: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface IAdminCustomer {
|
|
7
|
+
id?: number
|
|
8
|
+
prettyIdentifier?: string
|
|
9
|
+
name: string
|
|
10
|
+
email: string
|
|
11
|
+
emailBounceType?: string | undefined
|
|
12
|
+
phone: string
|
|
13
|
+
address: string
|
|
14
|
+
city: string
|
|
15
|
+
zip: string | number
|
|
16
|
+
customerType: CustomerType
|
|
17
|
+
cvr?: string
|
|
18
|
+
ean?: string
|
|
19
|
+
companyName?: string
|
|
20
|
+
vatLookup?: VatLookup
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CustomerUpdateResponse extends IAdminCustomer {
|
|
24
|
+
extSysCustomerUpdateMessage?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type CustomerType = 'PRIVATE' | 'BUSINESS'
|
|
28
|
+
|
|
29
|
+
export type VatLookup = 'INTERNAL' | 'REMOTE'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './auth'
|
|
2
|
+
export * from './chart'
|
|
3
|
+
export * from './contract'
|
|
4
|
+
export * from './contractCreation'
|
|
5
|
+
export * from './customer'
|
|
6
|
+
export * from './vehicle'
|
|
7
|
+
export * from './workshop'
|
|
8
|
+
export * from './user'
|
|
9
|
+
export * from './stripe'
|
|
10
|
+
export * from './payment'
|
|
11
|
+
export * from './product'
|
|
12
|
+
export * from './contractProvider'
|
|
13
|
+
export * from './contactInformation'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './payment';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './product'
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ContractState, IIncludedContractOption, TV4PTProductType } from './../../index'
|
|
2
|
+
import { PaymentGateway } from './../../payment'
|
|
3
|
+
import { PriceSpecification } from './../../priceSpecification'
|
|
4
|
+
|
|
5
|
+
export type TContractObject = 'Product' | 'Vehicle' // Renamed from: export type ProductType = 'Product' | 'Vehicle'
|
|
6
|
+
|
|
7
|
+
export interface IApiOtherWithContracts {
|
|
8
|
+
otherId: number
|
|
9
|
+
registrationDate: Date | string
|
|
10
|
+
modelYear: number
|
|
11
|
+
serialNumber: string
|
|
12
|
+
serialNumber2: string
|
|
13
|
+
itemNumber: string
|
|
14
|
+
itemNumber2: string
|
|
15
|
+
brandName: string
|
|
16
|
+
modelName: string
|
|
17
|
+
fuelTypeName: string
|
|
18
|
+
contracts: IApiOtherContract[]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IApiOtherContract {
|
|
22
|
+
serviceContractId: number
|
|
23
|
+
amount: PriceSpecification
|
|
24
|
+
contractStartDate: Date | string
|
|
25
|
+
contractEndDate: Date | string
|
|
26
|
+
tosUrl: string
|
|
27
|
+
totUrl: string
|
|
28
|
+
contractState: ContractState
|
|
29
|
+
prettyIdentifier: string
|
|
30
|
+
pdfUrl: string
|
|
31
|
+
includedOptions: IIncludedContractOption[]
|
|
32
|
+
contractTemplateInternalName: string // Name used internally (in pricefile etc.)
|
|
33
|
+
contractTemplateExternalName: string // The name shown to end-users.
|
|
34
|
+
duration: number
|
|
35
|
+
mileage: number
|
|
36
|
+
paymentGateway?: PaymentGateway
|
|
37
|
+
reference?: string
|
|
38
|
+
extendedFrom?: number
|
|
39
|
+
contractProductType: null | TV4PTProductType
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './stripeTOS'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PasswordErrors = 'PASSWORD_MISMATCH' | 'PASSWORD_VALIDATION_ERROR'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface IAdminUserInfo {
|
|
2
|
+
name: string
|
|
3
|
+
phone: string
|
|
4
|
+
address: string
|
|
5
|
+
zip: string
|
|
6
|
+
city: string
|
|
7
|
+
email: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IUserPasswordChangeRequest {
|
|
11
|
+
password: string
|
|
12
|
+
newPassword: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ICustomerPasswordChangeRequest {
|
|
16
|
+
newPassword: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IUserRoleChangeRequest {
|
|
20
|
+
roleId: number
|
|
21
|
+
contractProviderId: number
|
|
22
|
+
token: string
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UserRole } from '../auth'
|
|
2
|
+
|
|
3
|
+
export type UserListOrderByType = 'name' | 'role' | 'email' | 'phone' | 'providerId'
|
|
4
|
+
|
|
5
|
+
interface INullableRole {
|
|
6
|
+
providerId: number
|
|
7
|
+
role: UserRole | null
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IUserListRecord {
|
|
11
|
+
userId?: number
|
|
12
|
+
name: string
|
|
13
|
+
email: string
|
|
14
|
+
phone: string
|
|
15
|
+
role?: UserRole
|
|
16
|
+
roles?: INullableRole[]
|
|
17
|
+
localeCode?: string
|
|
18
|
+
departmentName?: string
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './vehicle'
|