@fragus/sam-types 1.2.9 → 1.2.10
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/contract/contractDetails.d.ts +2 -0
- package/types/admin/contractCreation/contractCreation.d.ts +1 -2
- package/types/admin/contractCreation/priceCalculation.d.ts +1 -10
- package/types/admin/contractProvider/index.d.ts +2 -0
- package/types/admin/user/user.d.ts +9 -0
- package/types/contractProvider.d.ts +21 -7
- package/types/contractProviderFlags.d.ts +1 -1
- package/types/errorResponse.d.ts +9 -0
- package/types/fragusInvoicing.d.ts +19 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +1 -0
- package/types/index.js.map +1 -1
- package/types/index.ts +3 -0
- package/types/payment.d.ts +1 -1
- package/types/providerInvoice.d.ts +30 -0
- package/types/responseErrors/contractResponseErrors.d.ts +18 -0
- package/types/responseErrors/index.d.ts +0 -2
- package/types/responseErrors/passwordResponseErrors.d.ts +6 -0
- package/types/responseErrors/userAndCustomerErrors.d.ts +1 -1
- package/types/responseErrors/userAndCustomerErrors.ts +1 -0
- package/types/user.d.ts +2 -0
- package/types/v4PricingTool/productsAndContracts/index.d.ts +1 -1
- package/types/v4PricingTool/productsAndContracts/index.js.map +1 -1
- package/types/v4PricingTool/productsAndContracts/index.ts +2 -0
- package/types/responseErrors/contractProviderErrors.d.ts +0 -1
package/package.json
CHANGED
|
@@ -20,7 +20,6 @@ export interface IContractCreationData {
|
|
|
20
20
|
templates: IGenericContractTemplateResponse[]
|
|
21
21
|
templatesAllDisabled?: boolean
|
|
22
22
|
hiddenNetPrice: boolean
|
|
23
|
-
hideRetailPriceTooltip: boolean
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
export interface IProviderHasAccessToProductsRequest {
|
|
@@ -230,7 +229,7 @@ export interface IAvailableFreeWarrantyDurationPrice {
|
|
|
230
229
|
finlandPriceId?: number
|
|
231
230
|
totalPrice: PriceSpecification
|
|
232
231
|
isEnabledAndAvailable?: boolean | null // Dependent of optional user setting for this DurationPrice-group or default setting in WarrantyData.
|
|
233
|
-
debug?:
|
|
232
|
+
debug?: any // For debugging purposes.
|
|
234
233
|
}
|
|
235
234
|
|
|
236
235
|
export interface IAvailableFreeWarranty {
|
|
@@ -57,14 +57,6 @@ 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
|
-
|
|
68
60
|
/**
|
|
69
61
|
* The type returned by a price calculation.
|
|
70
62
|
*/
|
|
@@ -86,7 +78,6 @@ export interface IContractCalculationResponse {
|
|
|
86
78
|
providerCost: PriceSpecification
|
|
87
79
|
providerPayments: number
|
|
88
80
|
providerShare: PriceSpecification
|
|
89
|
-
|
|
90
|
-
x_debugData?: Record<string, unknown> | null // For debugging purposes.
|
|
81
|
+
x_debugData?: any // For debugging purposes.
|
|
91
82
|
serviceInfo?: string[] // Service information, mainly for ax.
|
|
92
83
|
}
|
|
@@ -32,6 +32,8 @@ export interface IContractProviderInfo extends IEssentialContractProviderInfo {
|
|
|
32
32
|
inactive: boolean
|
|
33
33
|
isUsingV4PricingTool: boolean
|
|
34
34
|
isUseV4PTOnlyForSigning: boolean
|
|
35
|
+
fragusInvoicing?: boolean
|
|
36
|
+
isInternalUse?: boolean
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export interface ICreateTestContractProvider {
|
|
@@ -7,6 +7,15 @@ export interface IAdminUserInfo {
|
|
|
7
7
|
email: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* When the logged-in user's password was last set and when it expires, as ISO dates. Both are null for a password
|
|
12
|
+
* set before expiry was introduced and not dated yet, which never expires.
|
|
13
|
+
*/
|
|
14
|
+
export interface IPasswordStatus {
|
|
15
|
+
changedAt: string | null
|
|
16
|
+
expiresAt: string | null
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
export interface IUserPasswordChangeRequest {
|
|
11
20
|
password: string
|
|
12
21
|
newPassword: string
|
|
@@ -41,9 +41,6 @@ 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
|
|
47
44
|
v4ProviderId: number | null
|
|
48
45
|
/** Groups the provider joins on create; an update ignores it. */
|
|
49
46
|
contractProviderGroupIds?: number[]
|
|
@@ -96,11 +93,26 @@ export interface IContractProviderResponse extends IProviderCustomizationRespons
|
|
|
96
93
|
created: Date
|
|
97
94
|
updated: Date
|
|
98
95
|
hiddenNetPrice: boolean
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
/** Read-only, from the provider's `FRAGUS_INVOICING` flag. */
|
|
97
|
+
fragusInvoicing?: boolean
|
|
98
|
+
/** Read-only, from the provider's `INTERNAL_USE` flag. */
|
|
99
|
+
isInternalUse?: boolean
|
|
100
|
+
fixedCustomer?: IFixedCustomerData | null
|
|
101
101
|
v4ProviderId: number | null
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/** The fixed customer of an internal-use provider; its country is the provider's. */
|
|
105
|
+
export interface IFixedCustomerData {
|
|
106
|
+
name: string
|
|
107
|
+
companyName: string
|
|
108
|
+
cvr: string
|
|
109
|
+
phone: string
|
|
110
|
+
email: string
|
|
111
|
+
address1: string
|
|
112
|
+
postalCode: string
|
|
113
|
+
city: string
|
|
114
|
+
}
|
|
115
|
+
|
|
104
116
|
export interface IContractProviderListItemResponse {
|
|
105
117
|
administrativeName: string
|
|
106
118
|
contractProviderId: number
|
|
@@ -127,6 +139,7 @@ export type TContractProviderSettingsSection =
|
|
|
127
139
|
| 'conditions'
|
|
128
140
|
| 'customization'
|
|
129
141
|
| 'cvrCode'
|
|
142
|
+
| 'fixedCustomer'
|
|
130
143
|
|
|
131
144
|
export interface IContractProviderSettingsResponse {
|
|
132
145
|
administrativeName: string
|
|
@@ -156,6 +169,8 @@ export interface IContractProviderSettingsResponse {
|
|
|
156
169
|
webLogoBannerUrl: string | null
|
|
157
170
|
}
|
|
158
171
|
hasParent: boolean
|
|
172
|
+
/** Null while the provider is not in internal use. */
|
|
173
|
+
fixedCustomer?: IFixedCustomerData | null
|
|
159
174
|
}
|
|
160
175
|
|
|
161
176
|
export type TContractProviderSettingsSectionValue =
|
|
@@ -165,6 +180,7 @@ export type TContractProviderSettingsSectionValue =
|
|
|
165
180
|
| TProviderConditionsValue
|
|
166
181
|
| TProviderCustomizationValue
|
|
167
182
|
| TProviderCvrCodeValue
|
|
183
|
+
| IFixedCustomerData
|
|
168
184
|
|
|
169
185
|
export type TProviderGeneralInfoValue = Pick<
|
|
170
186
|
IContractProviderSettingsResponse,
|
|
@@ -193,8 +209,6 @@ export interface IContractProviderOverviewDetails {
|
|
|
193
209
|
disableContractTemplates: boolean
|
|
194
210
|
fetchWarrantiesFromV4: boolean
|
|
195
211
|
hiddenNetPrice: boolean
|
|
196
|
-
useRetailPrice: boolean
|
|
197
|
-
hideRetailPriceTooltip: boolean
|
|
198
212
|
}
|
|
199
213
|
|
|
200
214
|
export interface IPaginatedContractProviderListResponse {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TContractProviderFlagKey = 'RENAULT_UNIQ_PDF_FORMAT'
|
|
1
|
+
export type TContractProviderFlagKey = 'RENAULT_UNIQ_PDF_FORMAT' | 'FRAGUS_INVOICING' | 'INTERNAL_USE'
|
|
2
2
|
|
|
3
3
|
/** Exactly one of the two ids is sent: a flag row is owned by a provider or by a group. */
|
|
4
4
|
export interface ContractProviderFlagRequest {
|
package/types/errorResponse.d.ts
CHANGED
|
@@ -9,6 +9,15 @@ export interface ApiError {
|
|
|
9
9
|
messageReplacements?: { [key in string]: string }
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The answer to a login whose password has expired. The token is a reset-password token, so the app can send the user
|
|
14
|
+
* to its reset-password page to choose a new one.
|
|
15
|
+
*/
|
|
16
|
+
export interface IPasswordExpiredError {
|
|
17
|
+
message: 'PASSWORD_EXPIRED'
|
|
18
|
+
resetToken: string
|
|
19
|
+
}
|
|
20
|
+
|
|
12
21
|
export interface INoContractsAvailableErrorParams {
|
|
13
22
|
matchedData: VehiclePartial
|
|
14
23
|
lookupCountry: null | {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IFixedCustomerData } from './contractProvider'
|
|
2
|
+
|
|
3
|
+
export interface IFragusInvoicingProviderRequest {
|
|
4
|
+
contractProviderId: number
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface IFragusInvoicingProviderResponse {
|
|
8
|
+
contractProviderId: number
|
|
9
|
+
contractProviderName: string
|
|
10
|
+
country: string
|
|
11
|
+
updatedByUser: string
|
|
12
|
+
isInternalUse: boolean
|
|
13
|
+
/** The saved fixed customer, or a prefill built from the provider's contact person. */
|
|
14
|
+
fixedCustomer: IFixedCustomerData
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IInternalUseRequest {
|
|
18
|
+
fixedCustomer: IFixedCustomerData
|
|
19
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export declare enum ContractActionType {
|
|
|
75
75
|
expireContract = 410,
|
|
76
76
|
sendContractExpiredMail = 411,
|
|
77
77
|
changeVehicleData = 420,
|
|
78
|
+
changeSeller = 430,
|
|
78
79
|
changeCustomerData = 440,
|
|
79
80
|
changePaymentData = 460,
|
|
80
81
|
modify = 500,
|
|
@@ -182,6 +183,7 @@ export * from './priceCalculation';
|
|
|
182
183
|
export * from './priceSpecification';
|
|
183
184
|
export * from './product';
|
|
184
185
|
export * from './providerBranding';
|
|
186
|
+
export * from './providerInvoice';
|
|
185
187
|
export * from './queryParams';
|
|
186
188
|
export * from './reports/reports';
|
|
187
189
|
export * from './resetPassword';
|
|
@@ -218,5 +220,6 @@ export * from './pinLookup';
|
|
|
218
220
|
export * from './ISendEmail';
|
|
219
221
|
export * from './emailCampaign';
|
|
220
222
|
export * from './contractProviderFlags';
|
|
223
|
+
export * from './fragusInvoicing';
|
|
221
224
|
export * from './providerDocument';
|
|
222
225
|
export * from './contractProviderGroup';
|
package/types/index.js
CHANGED
|
@@ -86,6 +86,7 @@ var ContractActionType;
|
|
|
86
86
|
ContractActionType[ContractActionType["expireContract"] = 410] = "expireContract";
|
|
87
87
|
ContractActionType[ContractActionType["sendContractExpiredMail"] = 411] = "sendContractExpiredMail";
|
|
88
88
|
ContractActionType[ContractActionType["changeVehicleData"] = 420] = "changeVehicleData";
|
|
89
|
+
ContractActionType[ContractActionType["changeSeller"] = 430] = "changeSeller";
|
|
89
90
|
ContractActionType[ContractActionType["changeCustomerData"] = 440] = "changeCustomerData";
|
|
90
91
|
ContractActionType[ContractActionType["changePaymentData"] = 460] = "changePaymentData";
|
|
91
92
|
ContractActionType[ContractActionType["modify"] = 500] = "modify";
|
package/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;AAAA,IAAY,aAgBX;AAhBD,WAAY,aAAa;IACvB,mDAAS,CAAA;IACT,qDAAW,CAAA;IACX,mEAAkB,CAAA;IAClB,mEAAkB,CAAA;IAClB,qEAAmB,CAAA;IACnB,uDAAY,CAAA;IACZ,qEAAmB,CAAA;IACnB,2FAA8B,CAAA;IAC9B,6DAAe,CAAA;IACf,qFAA2B,CAAA;IAC3B,+DAAgB,CAAA;IAChB,2DAAc,CAAA;IAC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AAhB,wBAAgB,KAAhB,wBAAgB,QAE3B;AAID,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,2DAAO,CAAA;IACP,iEAAU,CAAA;IACV,6DAAQ,CAAA;AACV,CAAC,EAJW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAI9B;AAED,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,6EAAc,CAAA;IACd,+EAAW,CAAA;IACX,mFAAa,CAAA;IACb,uFAAe,CAAA;AACjB,CAAC,EALW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAKhC;AAED,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,mDAAS,CAAA;IACT,6DAAU,CAAA;IACV,+CAAG,CAAA;IACH,uDAAO,CAAA;AACT,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB;AAED,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,6CAAK,CAAA;IACL,yCAAG,CAAA;IACH,iDAAO,CAAA;IACP,iDAAO,CAAA;IACP,mDAAQ,CAAA;AACV,CAAC,EAPW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAOrB;AAED,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,6DAAQ,CAAA;IACR,+DAAK,CAAA;IACL,uEAAS,CAAA;AACX,CAAC,EAJW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAI9B;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iFAAqB,CAAA;IACrB,2DAAM,CAAA;AACR,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B;AAuED,qCAA+B"}
|
package/types/index.ts
CHANGED
|
@@ -80,6 +80,7 @@ export enum ContractActionType {
|
|
|
80
80
|
expireContract = 410, // The contract expired.
|
|
81
81
|
sendContractExpiredMail = 411, // A expired mail was sent to the customer.
|
|
82
82
|
changeVehicleData = 420, // Meta data for the vehicle was changed.
|
|
83
|
+
changeSeller = 430, // A superadmin changed the contract's seller; the old and new seller are in the details.
|
|
83
84
|
changeCustomerData = 440, // Meta data for the customer was changed.
|
|
84
85
|
changePaymentData = 460, // Information about payment was changed.
|
|
85
86
|
modify = 500, // (extended) The contract was changed in a way that changes the financial agreement, if a new contract was created as a sideeffect, information about the new contract is in the details.
|
|
@@ -201,6 +202,7 @@ export * from './priceCalculation'
|
|
|
201
202
|
export * from './priceSpecification'
|
|
202
203
|
export * from './product'
|
|
203
204
|
export * from './providerBranding'
|
|
205
|
+
export * from './providerInvoice'
|
|
204
206
|
export * from './queryParams'
|
|
205
207
|
export * from './reports/reports'
|
|
206
208
|
export * from './resetPassword'
|
|
@@ -237,5 +239,6 @@ export * from './pinLookup'
|
|
|
237
239
|
export * from './ISendEmail'
|
|
238
240
|
export * from './emailCampaign'
|
|
239
241
|
export * from './contractProviderFlags'
|
|
242
|
+
export * from './fragusInvoicing'
|
|
240
243
|
export * from './providerDocument'
|
|
241
244
|
export * from './contractProviderGroup'
|
package/types/payment.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { SettlementPaymentType } from './index'
|
|
|
2
2
|
import { PriceSpecification } from './priceSpecification'
|
|
3
3
|
|
|
4
4
|
/** Supported payment gateways. */
|
|
5
|
-
export type PaymentGateway = 'Stripe' | 'B2B' | 'V4' | 'NONE' | 'Mock'
|
|
5
|
+
export type PaymentGateway = 'Stripe' | 'B2B' | 'V4' | 'NONE' | 'Mock' | 'FragusSubscription' | 'FragusPrePaid'
|
|
6
6
|
|
|
7
7
|
/** Supported payment types. */
|
|
8
8
|
export type PaymentType = 'automatic' | 'manual'
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PriceSpecification } from './priceSpecification'
|
|
2
|
+
|
|
3
|
+
export type ProviderInvoiceState = 'Pending' | 'Paid' | 'Canceled'
|
|
4
|
+
|
|
5
|
+
export type BillingEntrySource = 'Stripe' | 'Fragus'
|
|
6
|
+
|
|
7
|
+
export type BillingEntryKind = 'Subscription' | 'PrePaid'
|
|
8
|
+
|
|
9
|
+
export interface IProviderInvoiceListRecord {
|
|
10
|
+
id: number
|
|
11
|
+
period: string // YYYY-MM
|
|
12
|
+
state: ProviderInvoiceState
|
|
13
|
+
amount: PriceSpecification
|
|
14
|
+
contractCount: number
|
|
15
|
+
created: string // ISO
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IContractBillingEntry {
|
|
19
|
+
id: number
|
|
20
|
+
contractPrettyId: string
|
|
21
|
+
source: BillingEntrySource
|
|
22
|
+
kind: BillingEntryKind
|
|
23
|
+
coverageStart: string // ISO
|
|
24
|
+
coverageEnd: string // ISO, exclusive
|
|
25
|
+
amount: PriceSpecification
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IProviderInvoiceDetails extends IProviderInvoiceListRecord {
|
|
29
|
+
entries: IContractBillingEntry[]
|
|
30
|
+
}
|
|
@@ -3,6 +3,8 @@ export type ContractResponseErrors =
|
|
|
3
3
|
| PostContractResponseErrors
|
|
4
4
|
| ContractActivationPreventedBySystemForThisVehicle
|
|
5
5
|
| WarrantyCheckErrors
|
|
6
|
+
| FragusInvoicingErrors
|
|
7
|
+
| InternalUseErrors
|
|
6
8
|
|
|
7
9
|
type ContractUpdateErrors = 'CONTRACT_TRANSITION_INVALID_OR_ILLEGAL'
|
|
8
10
|
type PostContractResponseErrors = 'CONTRACT_MISSING_OR_INVALID_INFORMATION' | 'ITEM_SERIALNO_ACTIVE_CONTRACT_EXISTS'
|
|
@@ -21,3 +23,19 @@ type WarrantyCheckErrors =
|
|
|
21
23
|
| 'WARRANTY_MODEL_NOT_FOUND'
|
|
22
24
|
| 'WARRANTY_NOT_AVAILABLE_FOR_VEHICLE'
|
|
23
25
|
|
|
26
|
+
type FragusInvoicingErrors =
|
|
27
|
+
| 'FRAGUS_INVOICING_WEBCALC_NOT_AVAILABLE'
|
|
28
|
+
| 'FRAGUS_INVOICING_HAS_FRAGUS_CONTRACTS'
|
|
29
|
+
| 'FRAGUS_INVOICING_DEALER_PAID_NOT_AVAILABLE'
|
|
30
|
+
| 'FRAGUS_INVOICING_HAS_INTERNAL_USE'
|
|
31
|
+
|
|
32
|
+
type InternalUseErrors =
|
|
33
|
+
| 'INTERNAL_USE_REQUIRES_FRAGUS_INVOICING'
|
|
34
|
+
| 'INTERNAL_USE_NOT_ENABLED'
|
|
35
|
+
| 'INTERNAL_USE_OFFER_NOT_AVAILABLE'
|
|
36
|
+
| 'INTERNAL_USE_STRIPE_NOT_AVAILABLE'
|
|
37
|
+
| 'INTERNAL_USE_WEBCALC_NOT_AVAILABLE'
|
|
38
|
+
| 'INTERNAL_USE_FIXED_CUSTOMER_NO_LOGIN'
|
|
39
|
+
| 'INTERNAL_USE_OWNER_CHANGE_NOT_AVAILABLE'
|
|
40
|
+
| 'INTERNAL_USE_FIXED_CUSTOMER_READ_ONLY'
|
|
41
|
+
| 'INTERNAL_USE_FIXED_CUSTOMER_NOT_ALLOWED'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AdjustmentRequestResponseErrors } from './adjustmentRequestResponseErrors'
|
|
2
2
|
import { AdminPaymentErrors } from './adminPaymentErrors'
|
|
3
3
|
import { CalculatorResponseErrors } from './calculatorResponseErrors'
|
|
4
|
-
import { ContractProviderErrors } from './contractProviderErrors'
|
|
5
4
|
import { ContractProviderGroupErrors } from './contractProviderGroupErrors'
|
|
6
5
|
import { ContractResponseErrors } from './contractResponseErrors'
|
|
7
6
|
import { GenericResponseErrors } from './genericResponseTypes'
|
|
@@ -19,7 +18,6 @@ export type ResponseErrors =
|
|
|
19
18
|
| AdjustmentRequestResponseErrors
|
|
20
19
|
| AdminPaymentErrors
|
|
21
20
|
| CalculatorResponseErrors
|
|
22
|
-
| ContractProviderErrors
|
|
23
21
|
| ContractProviderGroupErrors
|
|
24
22
|
| ContractResponseErrors
|
|
25
23
|
| GenericResponseErrors
|
|
@@ -4,3 +4,9 @@ export type PasswordErrors =
|
|
|
4
4
|
| 'WRONG_CURRENT_PASSWORD'
|
|
5
5
|
| 'WRONG_PASSWORD'
|
|
6
6
|
| 'MISSING_PASSWORD'
|
|
7
|
+
/** Login refused because the password is over a year old; see IPasswordExpiredError. */
|
|
8
|
+
| 'PASSWORD_EXPIRED'
|
|
9
|
+
/** A new password refused for being a common one, or for containing the user's email or name. */
|
|
10
|
+
| 'PASSWORD_TOO_COMMON'
|
|
11
|
+
/** A new password refused for being the same as the current one. */
|
|
12
|
+
| 'PASSWORD_UNCHANGED'
|
|
@@ -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'
|
package/types/user.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare type TV4PTProductType = 'ServiceAgreement' | 'Warranty' | 'WarrantyAndServiceAgreement';
|
|
2
|
-
export declare type TV4PTPaymentType = 'DealerPaid' | 'CustomerSubscription';
|
|
2
|
+
export declare type TV4PTPaymentType = 'DealerPaid' | 'CustomerSubscription' | 'FragusSubscription' | 'FragusPrePaid';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAQA,yFAAyF;AACzF,kFAAkF;AAClF,6EAA6E;AAC7E,gFAAgF"}
|
|
@@ -4,6 +4,8 @@ export type TV4PTProductType = 'ServiceAgreement' | 'Warranty' | 'WarrantyAndSer
|
|
|
4
4
|
export type TV4PTPaymentType =
|
|
5
5
|
| 'DealerPaid' // One-time dealer payment via V4.
|
|
6
6
|
| 'CustomerSubscription' // Customer monthly subscription.
|
|
7
|
+
| 'FragusSubscription' // Fragus Invoicing, sent to V4 as 'CustomerSubscription'.
|
|
8
|
+
| 'FragusPrePaid' // Fragus Invoicing, sent to V4 as 'DealerPaid'.
|
|
7
9
|
// | 'CustomerPaymentCard' // Deprecated, use 'CustomerSubscription' instead. /2023-01-01
|
|
8
10
|
// | 'Subscription' // Deprecated, use 'CustomerSubscription' instead. /2023-01-01
|
|
9
11
|
// | 'DealerPaidMonthly' // Deprecated, use 'DealerPaid' instead. /2023-01-01
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ContractProviderErrors = 'HIDE_RETAIL_PRICE_TOOLTIP_REQUIRES_USE_RETAIL_PRICE'
|