@benup/bensdk 1.13.9 → 1.13.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.
@@ -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: 'handlebars';
94
- mime: 'text/csv' | 'text/plain';
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?: {
@@ -205,6 +205,7 @@ export default {
205
205
  {
206
206
  benefitID: 'FLEURY_CHECKUP',
207
207
  isGrantRevokeEnabled: true,
208
+ isProduction: true,
208
209
  eligibilityType: 'BENEFIT',
209
210
  options: {
210
211
  contractID: '47d9b27a-1933-47d5-856b-6b827cb43d2c'
@@ -226,6 +227,7 @@ export default {
226
227
  benefitID: 'FLEURY_CHECKUP',
227
228
  isGrantRevokeEnabled: true,
228
229
  eligibilityType: 'BENEFIT',
230
+ isProduction: true,
229
231
  options: {
230
232
  contractID: '47d9b27a-1933-47d5-856b-6b827cb43d2c'
231
233
  },
@@ -245,6 +247,7 @@ export default {
245
247
  {
246
248
  benefitID: 'FLEURY_TELEMEDICINA',
247
249
  isGrantRevokeEnabled: true,
250
+ isProduction: true,
248
251
  eligibilityType: 'BENEFIT',
249
252
  options: {
250
253
  contractID: '06f5c5c3-8b5d-4df5-a8ab-d671a5752c11'
@@ -205,6 +205,7 @@ export default {
205
205
  {
206
206
  benefitID: 'FLEURY_CHECKUP',
207
207
  isGrantRevokeEnabled: true,
208
+ isProduction: true,
208
209
  eligibilityType: 'BENEFIT',
209
210
  options: {
210
211
  contractID: '47d9b27a-1933-47d5-856b-6b827cb43d2c'
@@ -225,6 +226,7 @@ export default {
225
226
  {
226
227
  benefitID: 'FLEURY_CHECKUP',
227
228
  isGrantRevokeEnabled: true,
229
+ isProduction: true,
228
230
  eligibilityType: 'BENEFIT',
229
231
  options: {
230
232
  contractID: '47d9b27a-1933-47d5-856b-6b827cb43d2c'
@@ -245,6 +247,7 @@ export default {
245
247
  {
246
248
  benefitID: 'FLEURY_TELEMEDICINA',
247
249
  isGrantRevokeEnabled: true,
250
+ isProduction: true,
248
251
  eligibilityType: 'BENEFIT',
249
252
  options: {
250
253
  contractID: '06f5c5c3-8b5d-4df5-a8ab-d671a5752c11'
@@ -263,6 +263,7 @@ export default {
263
263
  value: 0,
264
264
  date: '',
265
265
  productID: '',
266
+ sumAllItemsOfThisExternalEmploymentContractID: 0,
266
267
  ticketCode: '0',
267
268
  quantity: 0,
268
269
  tariffValue: 0,
@@ -206,6 +206,7 @@ export default {
206
206
  benefitID: 'FLEURY_CHECKUP',
207
207
  eligibilityType: 'BENEFIT',
208
208
  isGrantRevokeEnabled: true,
209
+ isProduction: true,
209
210
  options: {
210
211
  contractID: '47d9b27a-1933-47d5-856b-6b827cb43d2c'
211
212
  },
@@ -225,6 +226,7 @@ export default {
225
226
  {
226
227
  benefitID: 'FLEURY_CHECKUP',
227
228
  isGrantRevokeEnabled: true,
229
+ isProduction: true,
228
230
  eligibilityType: 'BENEFIT',
229
231
  options: {
230
232
  contractID: '47d9b27a-1933-47d5-856b-6b827cb43d2c'
@@ -245,6 +247,7 @@ export default {
245
247
  {
246
248
  benefitID: 'FLEURY_TELEMEDICINA',
247
249
  isGrantRevokeEnabled: true,
250
+ isProduction: true,
248
251
  eligibilityType: 'BENEFIT',
249
252
  options: {
250
253
  contractID: '06f5c5c3-8b5d-4df5-a8ab-d671a5752c11'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@benup/bensdk",
3
- "version": "1.13.9",
3
+ "version": "1.13.11",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {