models/service.model.ts
Service group config.
Properties |
applicationsUsedIn |
applicationsUsedIn:
|
Type : Navigation[]
|
Applications the services are used in |
id |
id:
|
Type : ServiceGroupId
|
Service group id |
images |
images:
|
Type : ServiceImage[]
|
Images to use in expansion panel |
services$ |
services$:
|
Type : Observable<ServiceConfig[]>
|
Service endpoints to call and get Swagger YAML |
subtitle |
subtitle:
|
Type : string
|
Service subtitle |
title |
title:
|
Type : string
|
Service title |
import {Navigation} from '@ghsc/nshmp-template';
import {Observable} from 'rxjs';
/**
* Service group ids
*/
export enum ServiceGroupId {
AASHTO_2023 = 'aashto-2023',
NCM = 'ncm',
NSHMP_HAZ = 'nshmp-haz',
NSHMP_WS = 'nshmp-ws',
NSHMP_WS_STATIC_HAZARD = 'nshmp-ws-static-hazard',
RTGM = 'rtgm',
}
/**
* Service config.
*/
export interface ServiceConfig {
/** Service context path */
contextPath: string;
/** Service label */
label: string;
/** Swagger enpoint */
swaggerEndPoint: string;
/** Service URL */
url: string;
}
/**
* Service group config.
*/
export interface ServiceGroup {
/** Applications the services are used in */
applicationsUsedIn: Navigation[];
/** Service group id */
id: ServiceGroupId;
/** Images to use in expansion panel */
images: ServiceImage[];
/** Service endpoints to call and get Swagger YAML */
services$: Observable<ServiceConfig[]>;
/** Service subtitle */
subtitle: string;
/** Service title */
title: string;
}
/**
* Service image
*/
export interface ServiceImage {
/** Main image */
image: string;
/** Dark mode image variant */
darkModeImage?: string;
}