@fragus/sam-types 1.2.6 → 1.2.8
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/contractCreation/contractCreation.d.ts +2 -1
- package/types/admin/contractCreation/priceCalculation.d.ts +10 -1
- package/types/contractProvider.d.ts +7 -0
- package/types/responseErrors/contractProviderErrors.d.ts +1 -0
- package/types/responseErrors/index.d.ts +2 -0
- package/types/responseErrors/userAndCustomerErrors.d.ts +1 -1
- package/types/responseErrors/userAndCustomerErrors.ts +1 -0
package/package.json
CHANGED
|
@@ -20,6 +20,7 @@ export interface IContractCreationData {
|
|
|
20
20
|
templates: IGenericContractTemplateResponse[]
|
|
21
21
|
templatesAllDisabled?: boolean
|
|
22
22
|
hiddenNetPrice: boolean
|
|
23
|
+
hideRetailPriceTooltip: boolean
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export interface IProviderHasAccessToProductsRequest {
|
|
@@ -229,7 +230,7 @@ export interface IAvailableFreeWarrantyDurationPrice {
|
|
|
229
230
|
finlandPriceId?: number
|
|
230
231
|
totalPrice: PriceSpecification
|
|
231
232
|
isEnabledAndAvailable?: boolean | null // Dependent of optional user setting for this DurationPrice-group or default setting in WarrantyData.
|
|
232
|
-
debug?:
|
|
233
|
+
debug?: unknown // For debugging purposes.
|
|
233
234
|
}
|
|
234
235
|
|
|
235
236
|
export interface IAvailableFreeWarranty {
|
|
@@ -57,6 +57,14 @@ export interface IStandardV4PricingToolContractCalculationRequest extends IContr
|
|
|
57
57
|
v4ProductId: number // V4 contract product / "template" id.
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* The V4 retail price, set only for providers using it; the dealer price fields stay unchanged.
|
|
62
|
+
*/
|
|
63
|
+
export interface IRetailPriceCalculation {
|
|
64
|
+
amountPrPayment: PriceSpecification
|
|
65
|
+
contractCost: PriceSpecification
|
|
66
|
+
}
|
|
67
|
+
|
|
60
68
|
/**
|
|
61
69
|
* The type returned by a price calculation.
|
|
62
70
|
*/
|
|
@@ -78,6 +86,7 @@ export interface IContractCalculationResponse {
|
|
|
78
86
|
providerCost: PriceSpecification
|
|
79
87
|
providerPayments: number
|
|
80
88
|
providerShare: PriceSpecification
|
|
81
|
-
|
|
89
|
+
retailPrice?: IRetailPriceCalculation
|
|
90
|
+
x_debugData?: Record<string, unknown> | null // For debugging purposes.
|
|
82
91
|
serviceInfo?: string[] // Service information, mainly for ax.
|
|
83
92
|
}
|
|
@@ -41,6 +41,9 @@ export interface IContractProviderRequest extends IProviderCustomizationResponse
|
|
|
41
41
|
optionsConditions?: string
|
|
42
42
|
fetchWarrantiesFromV4: boolean
|
|
43
43
|
hiddenNetPrice: boolean
|
|
44
|
+
useRetailPrice?: boolean
|
|
45
|
+
/** Only allowed together with `useRetailPrice`. */
|
|
46
|
+
hideRetailPriceTooltip?: boolean
|
|
44
47
|
v4ProviderId: number | null
|
|
45
48
|
/** Groups the provider joins on create; an update ignores it. */
|
|
46
49
|
contractProviderGroupIds?: number[]
|
|
@@ -93,6 +96,8 @@ export interface IContractProviderResponse extends IProviderCustomizationRespons
|
|
|
93
96
|
created: Date
|
|
94
97
|
updated: Date
|
|
95
98
|
hiddenNetPrice: boolean
|
|
99
|
+
useRetailPrice: boolean
|
|
100
|
+
hideRetailPriceTooltip: boolean
|
|
96
101
|
/** Read-only, from the provider's `FRAGUS_INVOICING` flag. */
|
|
97
102
|
fragusInvoicing?: boolean
|
|
98
103
|
/** Read-only, from the provider's `INTERNAL_USE` flag. */
|
|
@@ -209,6 +214,8 @@ export interface IContractProviderOverviewDetails {
|
|
|
209
214
|
disableContractTemplates: boolean
|
|
210
215
|
fetchWarrantiesFromV4: boolean
|
|
211
216
|
hiddenNetPrice: boolean
|
|
217
|
+
useRetailPrice: boolean
|
|
218
|
+
hideRetailPriceTooltip: boolean
|
|
212
219
|
}
|
|
213
220
|
|
|
214
221
|
export interface IPaginatedContractProviderListResponse {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ContractProviderErrors = 'HIDE_RETAIL_PRICE_TOOLTIP_REQUIRES_USE_RETAIL_PRICE'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AdjustmentRequestResponseErrors } from './adjustmentRequestResponseErrors'
|
|
2
2
|
import { AdminPaymentErrors } from './adminPaymentErrors'
|
|
3
3
|
import { CalculatorResponseErrors } from './calculatorResponseErrors'
|
|
4
|
+
import { ContractProviderErrors } from './contractProviderErrors'
|
|
4
5
|
import { ContractProviderGroupErrors } from './contractProviderGroupErrors'
|
|
5
6
|
import { ContractResponseErrors } from './contractResponseErrors'
|
|
6
7
|
import { GenericResponseErrors } from './genericResponseTypes'
|
|
@@ -18,6 +19,7 @@ export type ResponseErrors =
|
|
|
18
19
|
| AdjustmentRequestResponseErrors
|
|
19
20
|
| AdminPaymentErrors
|
|
20
21
|
| CalculatorResponseErrors
|
|
22
|
+
| ContractProviderErrors
|
|
21
23
|
| ContractProviderGroupErrors
|
|
22
24
|
| ContractResponseErrors
|
|
23
25
|
| GenericResponseErrors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type UserAndCustomerErrors = 'GENERIC_CONTACT_PERSON_NOT_FOUND' | 'GENERIC_CUSTOMER_ALREADY_EXISTS' | 'GENERIC_CUSTOMER_EMAIL_ALREADY_EXISTS_AS_USER' | 'GENERIC_CUSTOMER_NOT_FOUND' | 'GENERIC_FORBIDDEN_ROLE' | 'GENERIC_NODE_ROLE_NOT_FOUND' | 'GENERIC_USER_ALREADY_EXISTS' | 'GENERIC_USER_CONFIGURATION_NOT_FOUND' | 'GENERIC_USER_NOT_FOUND' | 'GENERIC_USERNAME_OR_PASSWORD_NOT_FOUND';
|
|
1
|
+
export declare type UserAndCustomerErrors = 'GENERIC_CONTACT_PERSON_NOT_FOUND' | 'GENERIC_CUSTOMER_ALREADY_EXISTS' | 'GENERIC_CUSTOMER_EMAIL_ALREADY_EXISTS_AS_USER' | 'GENERIC_CUSTOMER_NOT_FOUND' | 'GENERIC_FORBIDDEN_ROLE' | 'REPORTS_USER_NO_ADMIN_LOGIN' | 'GENERIC_NODE_ROLE_NOT_FOUND' | 'GENERIC_USER_ALREADY_EXISTS' | 'GENERIC_USER_CONFIGURATION_NOT_FOUND' | 'GENERIC_USER_NOT_FOUND' | 'GENERIC_USERNAME_OR_PASSWORD_NOT_FOUND';
|
|
@@ -4,6 +4,7 @@ export type UserAndCustomerErrors =
|
|
|
4
4
|
| 'GENERIC_CUSTOMER_EMAIL_ALREADY_EXISTS_AS_USER' // The customer's email already exists as a (Seller/Admin/SuperAdmin/...) -User.
|
|
5
5
|
| 'GENERIC_CUSTOMER_NOT_FOUND'
|
|
6
6
|
| 'GENERIC_FORBIDDEN_ROLE'
|
|
7
|
+
| 'REPORTS_USER_NO_ADMIN_LOGIN' // Admin login refused: the user only has the reports role, used through the report API.
|
|
7
8
|
| 'GENERIC_NODE_ROLE_NOT_FOUND'
|
|
8
9
|
| 'GENERIC_USER_ALREADY_EXISTS'
|
|
9
10
|
| 'GENERIC_USER_CONFIGURATION_NOT_FOUND'
|