Fixes for metamigo-worker build errors

This commit is contained in:
Darren Clarke 2023-03-13 16:21:43 +00:00
parent 68736c0c90
commit ab7844827e
4 changed files with 444 additions and 3 deletions

View file

@ -257,6 +257,71 @@ export const configSchema = {
env: "SIGNALD_SOCKET",
},
},
leafcutter: {
enabled: {
doc: "Whether to enable leafcutter functionality",
format: "Boolean",
default: false,
env: "LEAFCUTTER_ENABLED",
},
zammadApiUrl: {
doc: "The full base zammad api url",
format: String,
default: undefined,
env: "ZAMMAD_API_URL"
},
zammadApiKey: {
doc: "The zammad api key",
format: String,
default: undefined,
sensitive: true,
env: "ZAMMAD_API_KEY"
},
labelStudioApiUrl: {
doc: "The full base label studio api url",
format: String,
default: undefined,
env: "LABEL_STUDIO_API_URL"
},
labelStudioApiKey: {
doc: "The label studio api key",
format: String,
default: undefined,
sensitive: true,
env: "LABEL_STUDIO_API_KEY"
},
contributorId: {
doc: "The leafcutter contributor id",
format: String,
default: undefined,
env: "LEAFCUTTER_CONTRIBUTOR_ID"
},
contributorName: {
doc: "The leafcutter contributor name",
format: String,
default: undefined,
env: "LEAFCUTTER_CONTRIBUTOR_NAME"
},
opensearchApiUrl: {
doc: "The opensearch api url",
format: String,
default: undefined,
env: "OPENSEARCH_API_URL"
},
opensearchUsername: {
doc: "The opensearch username",
format: String,
default: undefined,
env: "OPENSEARCH_USERNAME"
},
opensearchPassword: {
doc: "The opensearch password",
format: String,
default: undefined,
sensative: true,
env: "OPENSEARCH_PASSWORD"
},
}
};
// define the interfaces for the concrete config objects
@ -314,6 +379,19 @@ export interface ISignaldConifg {
socket: string;
}
export interface ILeafcutterConfig {
enabled: boolean;
zammadApiUrl: string;
zammadApiKey: string;
labelStudioApiUrl: string;
labelStudioApiKey: string;
contributorId: string;
contributorName: string;
opensearchApiUrl: string;
opensearchUsername: string;
opensearchPassword: string;
}
// Extend the metamigo base type to add your app's custom config along side the out
// of the box Metamigo config
export interface IAppConfig extends Metamigo.IMetamigoConfig {
@ -325,6 +403,7 @@ export interface IAppConfig extends Metamigo.IMetamigoConfig {
nextAuth: INextAuthConfig;
cfaccess: ICFAccessConfig;
signald: ISignaldConifg;
leafcutter: ILeafcutterConfig;
}
export type IAppConvict = Metamigo.ExtendedConvict<IAppConfig>;