@fragus/sam-types 1.2.14 → 1.2.15
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/contractProvider/index.d.ts +1 -0
- package/types/contractProviderFlags.d.ts +1 -0
- package/types/contractProviderGroup.d.ts +1 -0
- package/types/dashboardBanner.d.ts +0 -5
- package/types/index.d.ts +1 -0
- package/types/index.ts +1 -0
- package/types/priceSign.d.ts +146 -0
- package/types/responseErrors/index.d.ts +2 -0
- package/types/responseErrors/priceSignResponseErrors.d.ts +5 -0
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ export type TContractProviderFlagKey =
|
|
|
3
3
|
| 'ALPINE_EXTENDED_PDF_TITLE'
|
|
4
4
|
| 'FRAGUS_INVOICING'
|
|
5
5
|
| 'INTERNAL_USE'
|
|
6
|
+
| 'PRICE_SIGNS'
|
|
6
7
|
|
|
7
8
|
/** Exactly one of the two ids is sent: a flag row is owned by a provider or by a group. */
|
|
8
9
|
export interface ContractProviderFlagRequest {
|
|
@@ -11,10 +11,6 @@ export interface DashboardBannerRequest {
|
|
|
11
11
|
*/
|
|
12
12
|
countryIso?: TIsoCountry | null
|
|
13
13
|
contractProviderGroupId?: number | null
|
|
14
|
-
/**
|
|
15
|
-
* An https link (a campaign or information page) that Admin shows as a QR code under the text; null for none.
|
|
16
|
-
*/
|
|
17
|
-
qrUrl?: string | null
|
|
18
14
|
/**
|
|
19
15
|
* ISO date string (YYYY-MM-DD) for the start date of the banner
|
|
20
16
|
*/
|
|
@@ -40,5 +36,4 @@ export interface DashboardBannerResponse extends DashboardBannerRequest {
|
|
|
40
36
|
*/
|
|
41
37
|
export interface ProviderDashboardBannerResponse {
|
|
42
38
|
text: string
|
|
43
|
-
qrUrl: string | null
|
|
44
39
|
}
|
package/types/index.d.ts
CHANGED
package/types/index.ts
CHANGED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { TIsoCountry } from './country'
|
|
2
|
+
|
|
3
|
+
export type TPriceSignMonths = number
|
|
4
|
+
|
|
5
|
+
export type TPriceSignFormat = 'pdf' | 'png' | 'jpeg'
|
|
6
|
+
|
|
7
|
+
/** Limits the api enforces on templates and HP indices; Superadmin builds its form from them. */
|
|
8
|
+
export interface IPriceSignLimits {
|
|
9
|
+
minMonths: number
|
|
10
|
+
maxMonths: number
|
|
11
|
+
maxHpTiers: number
|
|
12
|
+
minPeriods: number
|
|
13
|
+
maxPeriods: number
|
|
14
|
+
/** Max periods on a sign whose HP index has `maxHpTiers` tiers. */
|
|
15
|
+
maxPeriodsWithMaxTiers: number
|
|
16
|
+
countries: TIsoCountry[]
|
|
17
|
+
/** Durations offered as one-click picks; any other whole month in range can still be added. */
|
|
18
|
+
quickPickMonths: TPriceSignMonths[]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IPriceSignPeriod {
|
|
22
|
+
months: TPriceSignMonths
|
|
23
|
+
suggestedPrice: string
|
|
24
|
+
suggestedSupplements: string[]
|
|
25
|
+
excludedTiers: number[]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IPriceSignBenefit {
|
|
29
|
+
title: string
|
|
30
|
+
body: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface IPriceSignDealerPrice {
|
|
34
|
+
months: TPriceSignMonths
|
|
35
|
+
price: string
|
|
36
|
+
supplements: string[]
|
|
37
|
+
hidden: boolean
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface IPriceSignHpIndex {
|
|
41
|
+
hpIndexId: number
|
|
42
|
+
country: TIsoCountry
|
|
43
|
+
name: string
|
|
44
|
+
tiers: number[]
|
|
45
|
+
usedBy?: string[]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface IPriceSignTemplate {
|
|
49
|
+
templateId: number
|
|
50
|
+
country: TIsoCountry
|
|
51
|
+
templateName: string
|
|
52
|
+
visible: boolean
|
|
53
|
+
name: string
|
|
54
|
+
nameAccent: string
|
|
55
|
+
years: string
|
|
56
|
+
km: string
|
|
57
|
+
deductible: string
|
|
58
|
+
repairLimit: string
|
|
59
|
+
hpIndexId: number | null
|
|
60
|
+
periods: IPriceSignPeriod[]
|
|
61
|
+
intro: string
|
|
62
|
+
coverageIntro: string
|
|
63
|
+
bullets: string[]
|
|
64
|
+
footnote: string
|
|
65
|
+
updatedBy: string | null
|
|
66
|
+
updatedAt: string
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface IPriceSignCombo {
|
|
70
|
+
comboId: number
|
|
71
|
+
country: TIsoCountry
|
|
72
|
+
templateName: string
|
|
73
|
+
visible: boolean
|
|
74
|
+
pages: [number, number]
|
|
75
|
+
updatedBy: string | null
|
|
76
|
+
updatedAt: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface IPriceSignSharedContent {
|
|
80
|
+
country: TIsoCountry
|
|
81
|
+
familyName: string
|
|
82
|
+
repairLimitLabel: string
|
|
83
|
+
repairLimitNote: string
|
|
84
|
+
benefits: IPriceSignBenefit[]
|
|
85
|
+
coverageHeading: string
|
|
86
|
+
periodsHeading: string
|
|
87
|
+
vatNote: string
|
|
88
|
+
supplementLabel: string
|
|
89
|
+
tierHeading: string
|
|
90
|
+
tierLabel: string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface IPriceSignGroupSetup {
|
|
94
|
+
templateId: number
|
|
95
|
+
hpIndexId: number | null
|
|
96
|
+
periods: IPriceSignPeriod[]
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface IPriceSignGroupConflict {
|
|
100
|
+
providerId: number
|
|
101
|
+
providerName: string
|
|
102
|
+
templateId: number
|
|
103
|
+
otherGroupName: string
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface IPriceSignGroup {
|
|
107
|
+
groupId: number
|
|
108
|
+
name: string
|
|
109
|
+
templateIds: number[]
|
|
110
|
+
conflicts: IPriceSignGroupConflict[]
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface IPriceSignDealerPrices {
|
|
114
|
+
templateId: number
|
|
115
|
+
hpIndexId: number | null
|
|
116
|
+
prices: IPriceSignDealerPrice[]
|
|
117
|
+
updatedAt: string
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface IPriceSignCatalog {
|
|
121
|
+
shared: IPriceSignSharedContent
|
|
122
|
+
hpIndices: IPriceSignHpIndex[]
|
|
123
|
+
templates: IPriceSignTemplate[]
|
|
124
|
+
combos: IPriceSignCombo[]
|
|
125
|
+
groupName: string | null
|
|
126
|
+
logoUrl: string | null
|
|
127
|
+
logoUsable: boolean
|
|
128
|
+
downloadAvailable: boolean
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface IPriceSignRenderRequest {
|
|
132
|
+
/** Exactly one of the two ids is sent: one template or one combo. */
|
|
133
|
+
templateId?: number
|
|
134
|
+
comboId?: number
|
|
135
|
+
logo: 'provider' | 'none' | { dataUrl: string }
|
|
136
|
+
prices?: IPriceSignDealerPrice[][]
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface IPriceSignEditorPreviewRequest {
|
|
140
|
+
template: Pick<IPriceSignTemplate, Exclude<keyof IPriceSignTemplate, 'templateId' | 'updatedBy' | 'updatedAt'>> & {
|
|
141
|
+
templateId?: number
|
|
142
|
+
}
|
|
143
|
+
shared?: IPriceSignSharedContent
|
|
144
|
+
groupId?: number
|
|
145
|
+
prices?: IPriceSignDealerPrice[]
|
|
146
|
+
}
|
|
@@ -9,6 +9,7 @@ import { ImportErrors } from './importErrors'
|
|
|
9
9
|
import { InvalidProductTypeErrors } from './invalidProductTypeErrors'
|
|
10
10
|
import { InvoiceErrors } from './invoiceErrors'
|
|
11
11
|
import { PasswordErrors } from './passwordResponseErrors'
|
|
12
|
+
import { PriceSignResponseErrors } from './priceSignResponseErrors'
|
|
12
13
|
import { paymentResponseErrors } from './paymentResponseErrors'
|
|
13
14
|
import { RateLimitErrors } from './rateLimitErrors'
|
|
14
15
|
import { UserAndCustomerErrors } from './userAndCustomerErrors'
|
|
@@ -32,3 +33,4 @@ export type ResponseErrors =
|
|
|
32
33
|
| VatLookupResponseErrors
|
|
33
34
|
| VehcileBlacklistErrors
|
|
34
35
|
| InvoiceErrors
|
|
36
|
+
| PriceSignResponseErrors
|