@fragus/sam-types 1.2.25 → 1.2.26
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/auth/roles.d.ts +2 -0
- package/types/admin/blacklist/index.d.ts +34 -0
- package/types/admin/productBlacklist/index.d.ts +3 -10
- package/types/admin/vehicleBlacklist/index.d.ts +1 -22
- package/types/responseErrors/vehcileBlacklistErrors.d.ts +2 -1
- package/types/responseErrors/vehicleBlacklistErrors.d.ts +0 -2
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IContractProviderGroupListItem } from '../../contractProviderGroup'
|
|
2
|
+
|
|
3
|
+
/** Owners to add to and remove from a blacklist rule; it must keep at least one. */
|
|
4
|
+
export interface IBlacklistOwnersRequest {
|
|
5
|
+
providerIds: {
|
|
6
|
+
add: number[]
|
|
7
|
+
remove: number[]
|
|
8
|
+
}
|
|
9
|
+
contractProviderGroupIds: {
|
|
10
|
+
add: number[]
|
|
11
|
+
remove: number[]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** A provider or a provider group a blacklist rule applies to. */
|
|
16
|
+
export interface IBlacklistOwner {
|
|
17
|
+
id: number
|
|
18
|
+
name: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** The `debug` of an ALREADY_EXISTS (409) response of either blacklist: the identical rule that exists. */
|
|
22
|
+
export interface IBlacklistConflict {
|
|
23
|
+
id: number
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** The `debug` of a BLACKLIST_OWNER_COVERED_BY_GROUP (400) response: providers a group owning the rule covers. */
|
|
27
|
+
export interface IBlacklistOwnerCoveredByGroup {
|
|
28
|
+
providerIds: number[]
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** A provider group as the blacklist forms pick it, with its members to show which providers it covers. */
|
|
32
|
+
export interface IBlacklistGroupOption extends IContractProviderGroupListItem {
|
|
33
|
+
memberProviderIds: number[]
|
|
34
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBlacklistOwner, IBlacklistOwnersRequest } from '../
|
|
1
|
+
import { IBlacklistOwner, IBlacklistOwnersRequest } from '../blacklist'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The vehicles a product is blacklisted for, matched like a vehicle blacklist entry: `*` in model or fuel type matches
|
|
@@ -28,22 +28,15 @@ export interface IBlacklistedProductRequest {
|
|
|
28
28
|
|
|
29
29
|
export type IBlacklistedProductOwnersRequest = IBlacklistOwnersRequest
|
|
30
30
|
|
|
31
|
-
export type IBlacklistedProductOwner = IBlacklistOwner
|
|
32
|
-
|
|
33
31
|
export interface IBlacklistedProductResponse {
|
|
34
32
|
id: number
|
|
35
33
|
productName: string | null
|
|
36
34
|
v4ProductId: number | null
|
|
37
35
|
vehicle: IBlacklistedProductVehicle | null
|
|
38
|
-
providers:
|
|
39
|
-
contractProviderGroups:
|
|
36
|
+
providers: IBlacklistOwner[]
|
|
37
|
+
contractProviderGroups: IBlacklistOwner[]
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
export type IBlacklistedProductListRecord = IBlacklistedProductResponse
|
|
43
41
|
|
|
44
|
-
/** The `debug` of a PRODUCT_BLACKLIST_ALREADY_EXISTS (409) response: the identical rule that exists. */
|
|
45
|
-
export interface IBlacklistedProductConflict {
|
|
46
|
-
id: number
|
|
47
|
-
}
|
|
48
|
-
|
|
49
42
|
export type BlacklistedProductOrderByType = 'id' | 'productName' | 'v4ProductId'
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface IBlacklistOwnersRequest {
|
|
3
|
-
providerIds: {
|
|
4
|
-
add: number[]
|
|
5
|
-
remove: number[]
|
|
6
|
-
}
|
|
7
|
-
contractProviderGroupIds: {
|
|
8
|
-
add: number[]
|
|
9
|
-
remove: number[]
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/** A provider or a provider group a blacklist rule applies to. */
|
|
14
|
-
export interface IBlacklistOwner {
|
|
15
|
-
id: number
|
|
16
|
-
name: string
|
|
17
|
-
}
|
|
1
|
+
import { IBlacklistOwner } from '../blacklist'
|
|
18
2
|
|
|
19
3
|
/**
|
|
20
4
|
* A vehicle blacklisted for its owners: the providers and groups, at least one in all. A rule cannot be changed once
|
|
@@ -44,9 +28,4 @@ export interface IBlacklistedVehicleResponse {
|
|
|
44
28
|
|
|
45
29
|
export type IBlacklistedVehicleListRecord = IBlacklistedVehicleResponse
|
|
46
30
|
|
|
47
|
-
/** The `debug` of a VEHICLE_BLACKLIST_ALREADY_EXISTS (409) response: the identical rule that exists. */
|
|
48
|
-
export interface IBlacklistedVehicleConflict {
|
|
49
|
-
id: number
|
|
50
|
-
}
|
|
51
|
-
|
|
52
31
|
export type BlacklistedVehicleOrderByType = 'id' | 'brand' | 'model' | 'fuelType'
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export type VehcileBlacklistErrors =
|
|
2
|
-
| 'DUPLICATE_RECORD'
|
|
3
2
|
| 'VEHICLE_BLACKLIST_NOT_FOUND'
|
|
4
3
|
| 'VEHICLE_BLACKLIST_ALREADY_EXISTS'
|
|
5
4
|
| 'PRODUCT_BLACKLIST_NOT_FOUND'
|
|
6
5
|
| 'PRODUCT_BLACKLIST_ALREADY_EXISTS'
|
|
7
6
|
| 'CONTRACT_PRODUCT_BLACKLISTED'
|
|
7
|
+
| 'BLACKLIST_LAST_OWNER'
|
|
8
|
+
| 'BLACKLIST_OWNER_COVERED_BY_GROUP'
|