@fragus/sam-types 1.0.75 → 1.0.78
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/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ContractState } from '../../index'
|
|
1
2
|
import { TV4PTProductType } from '../../v4PricingTool'
|
|
2
3
|
import { ContractType, ContractValueType, ServiceContractFlag } from './../../admin/contractCreation'
|
|
3
4
|
import { IContactPersonResponse } from './../../contactPerson'
|
|
@@ -7,77 +8,91 @@ import { IIncludedContractOption } from './../../includedContractOption'
|
|
|
7
8
|
import { PaymentGateway } from './../../payment'
|
|
8
9
|
import { PriceSpecification } from './../../priceSpecification'
|
|
9
10
|
|
|
10
|
-
export interface
|
|
11
|
-
|
|
11
|
+
export interface IAdminCustomTermsRecord {
|
|
12
|
+
customTerms: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IFileItem {
|
|
16
|
+
name: string
|
|
17
|
+
v4URL: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* This interface is used for contract settlement page in Admin.
|
|
22
|
+
* Contains calculated value of mileage | hours | services for contract.
|
|
23
|
+
*/
|
|
24
|
+
export interface IEstimatedContractValue {
|
|
25
|
+
estimatedValue: number
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* This interface is used for contract details page in Admin.
|
|
30
|
+
* It contains all the necessary/basic information about the contract for header, and shared data for tabs.
|
|
31
|
+
*/
|
|
32
|
+
export interface IContractDetailsBasic {
|
|
33
|
+
prettyIdentifier: string
|
|
34
|
+
contractState: ContractState
|
|
12
35
|
contractType: ContractType
|
|
13
36
|
contractProductType: null | TV4PTProductType
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
37
|
+
contractName: string
|
|
38
|
+
priceSource: PriceSource | null
|
|
39
|
+
paymentGateway: PaymentGateway
|
|
40
|
+
isProduct: boolean
|
|
41
|
+
offerExpiresAt: Date
|
|
42
|
+
customerTotalCost: number
|
|
43
|
+
serviceVariantName?: string
|
|
44
|
+
settledUnits: number | null
|
|
45
|
+
contractTemplateMinPaymentsCount: number | null
|
|
46
|
+
expirationDate: Date
|
|
47
|
+
isExtendedFromAnotherContract: boolean
|
|
48
|
+
|
|
49
|
+
valueType: ContractValueType
|
|
19
50
|
startValueType: ContractValueType
|
|
20
|
-
|
|
21
|
-
maxEndValue?: number
|
|
22
|
-
endMileage: number // End-mileage [km] at end of duration [months].
|
|
23
|
-
maxEndMileage?: number // Absolute maximum end-mileage [km] for product - Hard mileage cap/limit.
|
|
24
|
-
expirationDate: Date | string
|
|
25
|
-
extendedFrom: IContractResponse | null
|
|
26
|
-
includedOptions: IIncludedContractOption[] | null
|
|
51
|
+
startValue?: number
|
|
27
52
|
value?: number
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
paymentMethod: PaymentGateway
|
|
32
|
-
cardWallet: string | null // wallet name, e.g. 'apple_pay', 'google_pay', 'link', used for card payment
|
|
33
|
-
prettyIdentifierShort: string
|
|
34
|
-
prettyIdentifier: string
|
|
35
|
-
providerPayments: number
|
|
36
|
-
providerShare: PriceSpecification
|
|
37
|
-
reference: string
|
|
38
|
-
warrantyReference?: string
|
|
39
|
-
seller?: IContactPersonResponse
|
|
53
|
+
|
|
54
|
+
calculationMethod?: number
|
|
55
|
+
endMileage: number
|
|
40
56
|
startDate: Date | string
|
|
41
|
-
|
|
42
|
-
termsOfTradePdfUrl: string
|
|
43
|
-
filesContainerAlongContract: null | IFileItem[] // Optional extra files, except the TOS file.
|
|
57
|
+
duration: number
|
|
44
58
|
totalPrice: PriceSpecification
|
|
45
|
-
|
|
46
|
-
contractName: string // Contract (template) name.
|
|
47
|
-
priceSource: null | PriceSource
|
|
48
|
-
contractTemplateDescription: string
|
|
49
|
-
contractTemplateMinPaymentsCount: number | null
|
|
50
|
-
contractTemplateIsArchived: boolean
|
|
51
|
-
isProduct: boolean
|
|
52
|
-
serviceVariantId: string
|
|
53
|
-
flags: ServiceContractFlag[]
|
|
54
|
-
stripeCustomerLink: string | null
|
|
55
|
-
stripeSubscriptionLink: string | null
|
|
56
|
-
customTerms?: string
|
|
57
|
-
adjustedFrom?: string
|
|
58
|
-
adjustedTo?: string
|
|
59
|
-
createdByProvider?: string
|
|
60
|
-
provider?: string
|
|
61
|
-
settledUnits?: number | null
|
|
62
|
-
overdrivenCharge?: number
|
|
59
|
+
underHoursCharge?: number
|
|
63
60
|
underdrivenCharge?: number
|
|
64
|
-
|
|
61
|
+
underServicesCharge?: number
|
|
65
62
|
overHoursCharge?: number
|
|
66
|
-
underHoursCharge?: number
|
|
67
63
|
overServicesCharge?: number
|
|
68
|
-
|
|
69
|
-
}
|
|
64
|
+
overdrivenCharge?: number
|
|
70
65
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
startMileage?: number
|
|
67
|
+
serviceVariantId: string
|
|
68
|
+
serviceContractId?: number
|
|
69
|
+
providerShare: PriceSpecification
|
|
74
70
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
monthlyPrice: PriceSpecification
|
|
72
|
+
mileage: number
|
|
73
|
+
maxEndMileage?: number
|
|
74
|
+
warrantyReference?: string
|
|
78
75
|
}
|
|
79
76
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
/**
|
|
78
|
+
* This interface is used for contract details page in Admin but for specifics section.
|
|
79
|
+
* It contains additional information about the contract that is not necessary for header and shared data, but is necessary for specifics tab.
|
|
80
|
+
* There is joined data from different tables, so it is separated from basic response.
|
|
81
|
+
*/
|
|
82
|
+
export interface IContractDetailsSpecifics {
|
|
83
|
+
includedOptions: IIncludedContractOption[] | null
|
|
84
|
+
termsPdfUrl: string
|
|
85
|
+
termsOfTradePdfUrl: string
|
|
86
|
+
stripeSubscriptionLink: string | null
|
|
87
|
+
stripeCustomerLink: string | null
|
|
88
|
+
seller: { name: string; email: string }
|
|
89
|
+
providerName: string
|
|
90
|
+
extendedFrom?: string
|
|
91
|
+
adjustedTo?: string
|
|
92
|
+
customTerms?: string
|
|
93
|
+
createdByProvider: string
|
|
94
|
+
contractTemplateId: number | null
|
|
95
|
+
contractPdfUrl: string
|
|
96
|
+
cardWallet: string | null
|
|
97
|
+
filesContainerAlongContract: null | IFileItem[]
|
|
83
98
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IContractDetailsRecord } from '..'
|
|
2
1
|
import { DurationOptions, IContractOptionResponse, TMileageDurationsMap, TV4PTProductType } from '../..'
|
|
3
2
|
import { IContractTemplateResponse, IGenericContractTemplateResponse, PriceSource } from '../../contractTemplate'
|
|
4
3
|
import { PaymentGateway, PaymentType } from '../../payment'
|
|
@@ -10,7 +9,6 @@ import { PriceSpecification } from './../../priceSpecification'
|
|
|
10
9
|
import { ICarCollection } from './carData'
|
|
11
10
|
import { IContractCalculationResponse } from './priceCalculation'
|
|
12
11
|
|
|
13
|
-
|
|
14
12
|
export type ContractType = 'STANDARD' | 'CUSTOM' | 'EXTERNAL'
|
|
15
13
|
|
|
16
14
|
export type ServiceContractFlag = 'DISTRIBUTE_DOWNPAYMENT' | 'NULLIFY_DOWNPAYMENT'
|
|
@@ -269,10 +267,6 @@ export interface IAdminContractActivationRequest {
|
|
|
269
267
|
creditCardToken?: string
|
|
270
268
|
}
|
|
271
269
|
|
|
272
|
-
export interface IAdminContractActivationResponse {
|
|
273
|
-
serviceContract: IContractDetailsRecord
|
|
274
|
-
}
|
|
275
|
-
|
|
276
270
|
export interface IAdminContractResponse {
|
|
277
271
|
type: ContractType
|
|
278
272
|
contractName: string
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PriceSource } from '../../contractTemplate'
|
|
2
|
-
import { ContractState, ContractType, IIncludedContractOption, PaymentGateway, TV4PTProductType } from '../../index'
|
|
3
|
-
import { IContractHealth } from './health'
|
|
4
|
-
|
|
5
|
-
export interface IBasicContractInfo {
|
|
6
|
-
contractState: ContractState
|
|
7
|
-
contractStateName: string
|
|
8
|
-
contractType: ContractType
|
|
9
|
-
contractProductType: null | TV4PTProductType
|
|
10
|
-
priceSource: PriceSource | null
|
|
11
|
-
extendedFromId: number | null
|
|
12
|
-
extendedToId: number | null
|
|
13
|
-
paymentGateway: PaymentGateway
|
|
14
|
-
contractName: string // Contract (template) name.
|
|
15
|
-
templateDescription: string
|
|
16
|
-
additionalOptions: IIncludedContractOption[]
|
|
17
|
-
health: IContractHealth[]
|
|
18
|
-
productContract: boolean
|
|
19
|
-
offerExpirationDate?: string
|
|
20
|
-
}
|