@fragus/sam-types 1.0.9 → 1.0.11

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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.9",
2
+ "version": "1.0.11",
3
3
  "name": "@fragus/sam-types",
4
4
  "description": "Typescript interfaces for all types used to communicate between SAM client(s) and the SAM API",
5
5
  "author": "Fragus",
@@ -1,14 +1,21 @@
1
- import { TIsoCountry } from 'country'
1
+ import { TIsoCountry } from '../../country'
2
2
 
3
3
  export type UserRole = 'system' | 'superadmin' | 'admin' | 'seller' | 'customer' | 'reports' | 'observer'
4
4
 
5
+ export interface UserRoleProviderInfo {
6
+ id: number
7
+ administrativeName: string
8
+ inactive?: boolean
9
+ }
10
+
5
11
  export interface UserRoleRecord {
6
12
  role: UserRole
7
- contractProvider: {
8
- id: number
9
- administrativeName: string
10
- inactive?: boolean
11
- }
13
+ contractProvider: UserRoleProviderInfo
12
14
  }
13
15
 
14
- export type TUserRolesByCountry = Record<TIsoCountry, UserRoleRecord[]>
16
+ export type TUserPermittedProvidersByCountry = Record<TIsoCountry, UserRoleProviderInfo[]>
17
+
18
+ export interface UserPermittedProvidersResponse {
19
+ allProviders: TUserPermittedProvidersByCountry
20
+ adminProviders?: TUserPermittedProvidersByCountry
21
+ }