@benup/bensdk 1.13.10 → 1.13.12
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.
|
@@ -80,19 +80,31 @@ export type DeductionPlanResult = {
|
|
|
80
80
|
externalEventID: string;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
+
export type FileIntegrationParamsCtx = {
|
|
84
|
+
logger: pino.Logger;
|
|
85
|
+
currentCtx: Record<string, unknown>;
|
|
86
|
+
};
|
|
87
|
+
export type FileIntegrationParamsResult = {
|
|
88
|
+
paramsResult: 'FAILED';
|
|
89
|
+
reason: string;
|
|
90
|
+
} | {
|
|
91
|
+
paramsResult: 'SUCCEEDED';
|
|
92
|
+
params: Record<string, unknown>;
|
|
93
|
+
};
|
|
83
94
|
export type BenefitDefinition = Omit<Base, 'stateMachine'> & {
|
|
84
95
|
rateLimit?: RateLimitConfig;
|
|
85
|
-
/**
|
|
86
|
-
* Defines if the benefit integrates via file-exchange
|
|
87
|
-
* if so it should define which engine-type use via type
|
|
88
|
-
* which mime-type of file generated a csv? so 'text/csv'
|
|
89
|
-
* and template field defines other name for template used file, the default is
|
|
90
|
-
* looking for #shared/definitions/benefitID/template.handlebars so it will become -> #shared/definitions/benefitID/{{template}}
|
|
91
|
-
*/
|
|
92
96
|
fileIntegration?: {
|
|
93
|
-
type
|
|
94
|
-
mime
|
|
97
|
+
type?: 'handlebars' | 'layout-eb';
|
|
98
|
+
/** @deprecated use `params.resolveHandler` to return mime via the resolved params */
|
|
99
|
+
mime?: string;
|
|
100
|
+
/** @deprecated use `params.resolveHandler` to return the template via the resolved params */
|
|
95
101
|
template?: string;
|
|
102
|
+
outcomeResult?: {
|
|
103
|
+
handler?: (ctx: any) => Promise<any>;
|
|
104
|
+
};
|
|
105
|
+
params?: {
|
|
106
|
+
resolveHandler?: (ctx: FileIntegrationParamsCtx) => Promise<FileIntegrationParamsResult>;
|
|
107
|
+
};
|
|
96
108
|
};
|
|
97
109
|
stateMachine: Base['stateMachine'] & {
|
|
98
110
|
DEDUCTION_FILE_INGESTION?: {
|