@fragus/sam-types 1.0.78 → 1.0.80
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 +1 -1
- package/types/admin/chart/contractCharts.d.ts +0 -1
- package/types/admin/contract/basicInfo.d.ts +20 -0
- package/types/admin/contract/contractDetails.d.ts +60 -75
- package/types/admin/contract/index.d.ts +1 -0
- package/types/admin/contractCreation/contractCreation.d.ts +6 -0
- package/types/contractProvider.d.ts +2 -0
- package/types/pinLookup.d.ts +8 -1
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ContractState } from '../../index'
|
|
2
1
|
import { TV4PTProductType } from '../../v4PricingTool'
|
|
3
2
|
import { ContractType, ContractValueType, ServiceContractFlag } from './../../admin/contractCreation'
|
|
4
3
|
import { IContactPersonResponse } from './../../contactPerson'
|
|
@@ -8,91 +7,77 @@ import { IIncludedContractOption } from './../../includedContractOption'
|
|
|
8
7
|
import { PaymentGateway } from './../../payment'
|
|
9
8
|
import { PriceSpecification } from './../../priceSpecification'
|
|
10
9
|
|
|
11
|
-
export interface
|
|
12
|
-
|
|
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
|
|
10
|
+
export interface IContractDetailsRecord {
|
|
11
|
+
serviceContractId?: number // Note: Do not expose this id for non-Devs/normal users, use the pretty-id for those. For debugging purposes, etc.
|
|
35
12
|
contractType: ContractType
|
|
36
13
|
contractProductType: null | TV4PTProductType
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
|
50
|
-
startValueType: ContractValueType
|
|
14
|
+
contractPdfUrl: string
|
|
15
|
+
duration: number // Duration [months].
|
|
16
|
+
startMileage?: number // Current meter/odometer-reading [km].
|
|
17
|
+
mileage: number // Allowed mileage/distance [km] to drive during contract duration [months].
|
|
51
18
|
startValue?: number
|
|
19
|
+
startValueType: ContractValueType
|
|
20
|
+
endValue?: number
|
|
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
|
|
52
27
|
value?: number
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
28
|
+
valueType: ContractValueType
|
|
29
|
+
monthlyTemplatePrice: PriceSpecification
|
|
30
|
+
monthlyPrice: PriceSpecification
|
|
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
|
|
56
40
|
startDate: Date | string
|
|
57
|
-
|
|
41
|
+
termsPdfUrl: string
|
|
42
|
+
termsOfTradePdfUrl: string
|
|
43
|
+
filesContainerAlongContract: null | IFileItem[] // Optional extra files, except the TOS file.
|
|
58
44
|
totalPrice: PriceSpecification
|
|
59
|
-
|
|
45
|
+
contractTemplateId: null | number
|
|
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
|
|
60
63
|
underdrivenCharge?: number
|
|
61
|
-
|
|
64
|
+
calculationMethod?: number
|
|
62
65
|
overHoursCharge?: number
|
|
66
|
+
underHoursCharge?: number
|
|
63
67
|
overServicesCharge?: number
|
|
64
|
-
|
|
68
|
+
underServicesCharge?: number
|
|
69
|
+
}
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
providerShare: PriceSpecification
|
|
71
|
+
export interface IAdminCustomTermsRecord {
|
|
72
|
+
customTerms: string
|
|
73
|
+
}
|
|
70
74
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
warrantyReference?: string
|
|
75
|
+
export interface IUnitsListResponse {
|
|
76
|
+
units: number
|
|
77
|
+
date: Date | string
|
|
75
78
|
}
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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[]
|
|
80
|
+
export interface IFileItem {
|
|
81
|
+
name: string
|
|
82
|
+
v4URL: string
|
|
98
83
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IContractDetailsRecord } from '..'
|
|
1
2
|
import { DurationOptions, IContractOptionResponse, TMileageDurationsMap, TV4PTProductType } from '../..'
|
|
2
3
|
import { IContractTemplateResponse, IGenericContractTemplateResponse, PriceSource } from '../../contractTemplate'
|
|
3
4
|
import { PaymentGateway, PaymentType } from '../../payment'
|
|
@@ -9,6 +10,7 @@ import { PriceSpecification } from './../../priceSpecification'
|
|
|
9
10
|
import { ICarCollection } from './carData'
|
|
10
11
|
import { IContractCalculationResponse } from './priceCalculation'
|
|
11
12
|
|
|
13
|
+
|
|
12
14
|
export type ContractType = 'STANDARD' | 'CUSTOM' | 'EXTERNAL'
|
|
13
15
|
|
|
14
16
|
export type ServiceContractFlag = 'DISTRIBUTE_DOWNPAYMENT' | 'NULLIFY_DOWNPAYMENT'
|
|
@@ -267,6 +269,10 @@ export interface IAdminContractActivationRequest {
|
|
|
267
269
|
creditCardToken?: string
|
|
268
270
|
}
|
|
269
271
|
|
|
272
|
+
export interface IAdminContractActivationResponse {
|
|
273
|
+
serviceContract: IContractDetailsRecord
|
|
274
|
+
}
|
|
275
|
+
|
|
270
276
|
export interface IAdminContractResponse {
|
|
271
277
|
type: ContractType
|
|
272
278
|
contractName: string
|
|
@@ -84,6 +84,8 @@ export interface IContractProviderResponse extends IProviderCustomizationRespons
|
|
|
84
84
|
generalConditions: string
|
|
85
85
|
optionsConditions?: string
|
|
86
86
|
stripeForeignId?: string
|
|
87
|
+
created: Date
|
|
88
|
+
updated: Date
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
export interface IContractProviderListItemResponse {
|
package/types/pinLookup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface IPinLookupResult {
|
|
2
2
|
personalIdentityNo: string
|
|
3
3
|
firstName: string
|
|
4
4
|
fullFirstNames: string
|
|
@@ -10,3 +10,10 @@ export interface IPinLookupResponse {
|
|
|
10
10
|
postalCode: string
|
|
11
11
|
city: string
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
export interface IPinLookupResponse {
|
|
15
|
+
name: string
|
|
16
|
+
address: string
|
|
17
|
+
city: string
|
|
18
|
+
zip: string
|
|
19
|
+
}
|