@fragus/sam-types 1.2.0 → 1.2.2
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/contractProvider.d.ts +3 -5
- package/types/contractProviderFlags.d.ts +1 -1
- package/types/fragusInvoicing.d.ts +19 -0
- package/types/index.d.ts +1 -0
- package/types/index.ts +1 -0
- package/types/providerInvoice.d.ts +3 -8
- package/types/responseErrors/contractResponseErrors.d.ts +2 -1
package/package.json
CHANGED
|
@@ -41,11 +41,6 @@ export interface IContractProviderRequest extends IProviderCustomizationResponse
|
|
|
41
41
|
optionsConditions?: string
|
|
42
42
|
fetchWarrantiesFromV4: boolean
|
|
43
43
|
hiddenNetPrice: boolean
|
|
44
|
-
/** Restricts the provider to the Fragus gateways while on. */
|
|
45
|
-
fragusInvoicing?: boolean
|
|
46
|
-
/** New contracts use the provider's one fixed customer while on. */
|
|
47
|
-
isInternalUse?: boolean
|
|
48
|
-
fixedCustomer?: IFixedCustomerData
|
|
49
44
|
v4ProviderId: number | null
|
|
50
45
|
/** Groups the provider joins on create; an update ignores it. */
|
|
51
46
|
contractProviderGroupIds?: number[]
|
|
@@ -98,7 +93,9 @@ export interface IContractProviderResponse extends IProviderCustomizationRespons
|
|
|
98
93
|
created: Date
|
|
99
94
|
updated: Date
|
|
100
95
|
hiddenNetPrice: boolean
|
|
96
|
+
/** Read-only, from the provider's `FRAGUS_INVOICING` flag. */
|
|
101
97
|
fragusInvoicing?: boolean
|
|
98
|
+
/** Read-only, from the provider's `INTERNAL_USE` flag. */
|
|
102
99
|
isInternalUse?: boolean
|
|
103
100
|
fixedCustomer?: IFixedCustomerData | null
|
|
104
101
|
v4ProviderId: number | null
|
|
@@ -110,6 +107,7 @@ export interface IFixedCustomerData {
|
|
|
110
107
|
companyName: string
|
|
111
108
|
cvr: string
|
|
112
109
|
phone: string
|
|
110
|
+
email: string
|
|
113
111
|
address1: string
|
|
114
112
|
postalCode: string
|
|
115
113
|
city: string
|
|
@@ -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 {
|
|
@@ -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
|
@@ -219,5 +219,6 @@ export * from './pinLookup';
|
|
|
219
219
|
export * from './ISendEmail';
|
|
220
220
|
export * from './emailCampaign';
|
|
221
221
|
export * from './contractProviderFlags';
|
|
222
|
+
export * from './fragusInvoicing';
|
|
222
223
|
export * from './providerDocument';
|
|
223
224
|
export * from './contractProviderGroup';
|
package/types/index.ts
CHANGED
|
@@ -238,5 +238,6 @@ export * from './pinLookup'
|
|
|
238
238
|
export * from './ISendEmail'
|
|
239
239
|
export * from './emailCampaign'
|
|
240
240
|
export * from './contractProviderFlags'
|
|
241
|
+
export * from './fragusInvoicing'
|
|
241
242
|
export * from './providerDocument'
|
|
242
243
|
export * from './contractProviderGroup'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PriceSpecification } from './priceSpecification'
|
|
2
2
|
|
|
3
3
|
export type ProviderInvoiceState = 'Pending' | 'Paid' | 'Canceled'
|
|
4
4
|
|
|
@@ -6,14 +6,11 @@ export type BillingEntrySource = 'Stripe' | 'Fragus'
|
|
|
6
6
|
|
|
7
7
|
export type BillingEntryKind = 'Subscription' | 'PrePaid'
|
|
8
8
|
|
|
9
|
-
// Amounts are in cents, excl. VAT.
|
|
10
9
|
export interface IProviderInvoiceListRecord {
|
|
11
10
|
id: number
|
|
12
11
|
period: string // YYYY-MM
|
|
13
12
|
state: ProviderInvoiceState
|
|
14
|
-
amount:
|
|
15
|
-
vat: number
|
|
16
|
-
currency: TCurrency
|
|
13
|
+
amount: PriceSpecification
|
|
17
14
|
contractCount: number
|
|
18
15
|
created: string // ISO
|
|
19
16
|
}
|
|
@@ -25,9 +22,7 @@ export interface IContractBillingEntry {
|
|
|
25
22
|
kind: BillingEntryKind
|
|
26
23
|
coverageStart: string // ISO
|
|
27
24
|
coverageEnd: string // ISO, exclusive
|
|
28
|
-
amount:
|
|
29
|
-
vat: number
|
|
30
|
-
currency: TCurrency
|
|
25
|
+
amount: PriceSpecification
|
|
31
26
|
}
|
|
32
27
|
|
|
33
28
|
export interface IProviderInvoiceDetails extends IProviderInvoiceListRecord {
|
|
@@ -27,9 +27,10 @@ type FragusInvoicingErrors =
|
|
|
27
27
|
| 'FRAGUS_INVOICING_WEBCALC_NOT_AVAILABLE'
|
|
28
28
|
| 'FRAGUS_INVOICING_HAS_FRAGUS_CONTRACTS'
|
|
29
29
|
| 'FRAGUS_INVOICING_DEALER_PAID_NOT_AVAILABLE'
|
|
30
|
+
| 'FRAGUS_INVOICING_HAS_INTERNAL_USE'
|
|
30
31
|
|
|
31
32
|
type InternalUseErrors =
|
|
32
|
-
| '
|
|
33
|
+
| 'INTERNAL_USE_REQUIRES_FRAGUS_INVOICING'
|
|
33
34
|
| 'INTERNAL_USE_NOT_ENABLED'
|
|
34
35
|
| 'INTERNAL_USE_OFFER_NOT_AVAILABLE'
|
|
35
36
|
| 'INTERNAL_USE_STRIPE_NOT_AVAILABLE'
|