-
Notifications
You must be signed in to change notification settings - Fork 70
/
keys.ts
32 lines (26 loc) · 923 Bytes
/
keys.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2023 Sourcefuse Technologies
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
import {BindingKey} from '@loopback/core';
import {ExpressRequestHandler} from '@loopback/rest';
import {BINDING_PREFIX} from './constants';
import {HttpMethod} from './enums';
import {CoreConfig} from './types';
export namespace SFCoreBindings {
export const i18n = BindingKey.create<i18nAPI>(`${BINDING_PREFIX}.i18n`);
export const config = BindingKey.create<CoreConfig>(
'sf.packages.core.config',
);
export const EXPRESS_MIDDLEWARES = BindingKey.create<ExpressRequestHandler[]>(
`sf.packages.core.expressMiddlewares`,
);
}
const hiddenKey = 'sf.oas.hiddenEndpoints';
export type OasHiddenApi = {
path: string;
httpMethod: HttpMethod;
};
export namespace OASBindings {
export const HiddenEndpoint = BindingKey.create<OasHiddenApi[]>(hiddenKey);
}