@fragus/sam-types 1.2.22 → 1.2.24
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
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The vehicles a product is blacklisted for, matched like a vehicle blacklist entry: `*` in model or fuel type matches
|
|
3
|
+
* any, and the model year range is inclusive with null meaning no limit.
|
|
4
|
+
*/
|
|
5
|
+
export interface IBlacklistedProductVehicle {
|
|
6
|
+
brand: string
|
|
7
|
+
model: string
|
|
8
|
+
fuelType: string
|
|
9
|
+
modelYearFrom: number | null
|
|
10
|
+
modelYearTo: number | null
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A product blacklisted by its exact name, ignoring case (a warranty, or a service agreement by its internal or
|
|
15
|
+
* external name), or by its V4 product id; exactly one is set. The owners are the providers and groups, at least one in
|
|
16
|
+
* all. A rule cannot be changed once created, only its owners.
|
|
17
|
+
*/
|
|
18
|
+
export interface IBlacklistedProductRequest {
|
|
19
|
+
productName: string | null
|
|
20
|
+
v4ProductId: number | null
|
|
21
|
+
/** Only for these vehicles; missing or null blacklists the product for every vehicle. */
|
|
22
|
+
vehicle?: IBlacklistedProductVehicle | null
|
|
23
|
+
providerIds: number[]
|
|
24
|
+
contractProviderGroupIds: number[]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Owners to add to and remove from a rule; it must keep at least one. */
|
|
28
|
+
export interface IBlacklistedProductOwnersRequest {
|
|
29
|
+
providerIds: {
|
|
30
|
+
add: number[]
|
|
31
|
+
remove: number[]
|
|
32
|
+
}
|
|
33
|
+
contractProviderGroupIds: {
|
|
34
|
+
add: number[]
|
|
35
|
+
remove: number[]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface IBlacklistedProductOwner {
|
|
40
|
+
id: number
|
|
41
|
+
name: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface IBlacklistedProductResponse {
|
|
45
|
+
id: number
|
|
46
|
+
productName: string | null
|
|
47
|
+
v4ProductId: number | null
|
|
48
|
+
vehicle: IBlacklistedProductVehicle | null
|
|
49
|
+
providers: IBlacklistedProductOwner[]
|
|
50
|
+
contractProviderGroups: IBlacklistedProductOwner[]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface IBlacklistedProductListRecord extends IBlacklistedProductResponse {
|
|
54
|
+
/** True in a sub provider's list when the rule applies to it only through its parent. */
|
|
55
|
+
parentRecord: boolean
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** The `debug` of a PRODUCT_BLACKLIST_ALREADY_EXISTS (409) response: the identical rule that exists. */
|
|
59
|
+
export interface IBlacklistedProductConflict {
|
|
60
|
+
id: number
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type BlacklistedProductOrderByType = 'id' | 'productName' | 'v4ProductId'
|
|
@@ -2,6 +2,9 @@ export interface IBlacklistedVehicleRequest {
|
|
|
2
2
|
brand: string
|
|
3
3
|
model: string
|
|
4
4
|
fuelType: string
|
|
5
|
+
/** Inclusive model year range; null on either end means no limit. */
|
|
6
|
+
modelYearFrom?: number | null
|
|
7
|
+
modelYearTo?: number | null
|
|
5
8
|
providerIds: {
|
|
6
9
|
add: number[]
|
|
7
10
|
remove: number[]
|
|
@@ -17,6 +20,8 @@ export interface IBlacklistedVehicleResponse {
|
|
|
17
20
|
brand: string
|
|
18
21
|
model: string
|
|
19
22
|
fuelType: string
|
|
23
|
+
modelYearFrom: number | null
|
|
24
|
+
modelYearTo: number | null
|
|
20
25
|
parentRecord?: boolean
|
|
21
26
|
groupRecord?: boolean
|
|
22
27
|
}
|