@benup/bensdk 1.3.1 → 1.4.1
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.
- package/bin/lib/lib/consumer/index.d.ts +6 -0
- package/bin/lib/schemas/action.schema.d.ts +68 -23
- package/bin/lib/types/action.types.d.ts +2 -1
- package/bin/lib/types/benefit-definition.types.d.ts +16 -1
- package/bin/lib/types/state-handler.types.d.ts +4 -0
- package/bin/src/cli/init.js +1 -10
- package/bin/src/cli/init.js.map +1 -1
- package/bin/src/cli/templates/benefit-definition.template.ts +2 -1
- package/bin/src/cli/templates/bensdk-cli/generate.ts +29 -8
- package/bin/src/cli/templates/bensdk-cli/templates/state.handler.template.ts +7 -3
- package/package.json +1 -1
- package/bin/src/cli/templates/benefit-definition.types.template.ts +0 -66
- package/bin/src/cli/templates/bensdk-lib/types/action-base.type.ts +0 -197
- package/bin/src/cli/templates/bensdk-lib/types/action.types.ts +0 -13
- package/bin/src/cli/templates/bensdk-lib/types/base-deduction.type.ts +0 -169
- package/bin/src/cli/templates/bensdk-lib/types/base-dependent.type.ts +0 -178
- package/bin/src/cli/templates/bensdk-lib/types/base-recharge.type.ts +0 -166
- package/bin/src/cli/templates/bensdk-lib/types/benefits-definition.type.ts +0 -59
- package/bin/src/cli/templates/bensdk-lib/types/grant-revoke.type.ts +0 -160
- package/bin/src/cli/templates/bensdk-lib/types/state.handler.type.ts +0 -88
|
@@ -76,10 +76,16 @@ export interface ConsumerOptions<T> {
|
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* helper for send message to a sqs queue
|
|
79
|
+
* @param sqs
|
|
80
|
+
* @param queueUrl
|
|
81
|
+
* @param message
|
|
82
|
+
* @param attributes
|
|
79
83
|
*/
|
|
80
84
|
export declare function send(sqs: SQSClient, queueUrl: string, message: object | string, attributes: Record<string, MessageAttributeValue>): Promise<SendMessageCommandOutput>;
|
|
81
85
|
/**
|
|
82
86
|
* Create a new consumerHandler
|
|
87
|
+
* @param options
|
|
88
|
+
* @param sqs
|
|
83
89
|
*/
|
|
84
90
|
export declare const createConsumerHandler: <T>(options: ConsumerOptions<T>, sqs: SQSClient) => (rawMessage: Message) => Promise<Message | void>;
|
|
85
91
|
/**
|
|
@@ -8016,7 +8016,6 @@ export declare const DeductionFileIngestionActionSchema: z.ZodObject<{
|
|
|
8016
8016
|
};
|
|
8017
8017
|
}>;
|
|
8018
8018
|
eligibilityOptions: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
|
|
8019
|
-
ctx: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
|
8020
8019
|
hooksCtx: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
|
8021
8020
|
log: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
|
8022
8021
|
origin: z.ZodString;
|
|
@@ -8040,6 +8039,58 @@ export declare const DeductionFileIngestionActionSchema: z.ZodObject<{
|
|
|
8040
8039
|
url?: string;
|
|
8041
8040
|
size?: number;
|
|
8042
8041
|
}>;
|
|
8042
|
+
ctx: z.ZodOptional<z.ZodObject<{
|
|
8043
|
+
deductions: z.ZodArray<z.ZodObject<{
|
|
8044
|
+
cpf: z.ZodString;
|
|
8045
|
+
value: z.ZodNumber;
|
|
8046
|
+
isAccumulative: z.ZodOptional<z.ZodBoolean>;
|
|
8047
|
+
date: z.ZodString;
|
|
8048
|
+
}, "strip", z.ZodTypeAny, {
|
|
8049
|
+
value?: number;
|
|
8050
|
+
date?: string;
|
|
8051
|
+
cpf?: string;
|
|
8052
|
+
isAccumulative?: boolean;
|
|
8053
|
+
}, {
|
|
8054
|
+
value?: number;
|
|
8055
|
+
date?: string;
|
|
8056
|
+
cpf?: string;
|
|
8057
|
+
isAccumulative?: boolean;
|
|
8058
|
+
}>, "many">;
|
|
8059
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
8060
|
+
deductions: z.ZodArray<z.ZodObject<{
|
|
8061
|
+
cpf: z.ZodString;
|
|
8062
|
+
value: z.ZodNumber;
|
|
8063
|
+
isAccumulative: z.ZodOptional<z.ZodBoolean>;
|
|
8064
|
+
date: z.ZodString;
|
|
8065
|
+
}, "strip", z.ZodTypeAny, {
|
|
8066
|
+
value?: number;
|
|
8067
|
+
date?: string;
|
|
8068
|
+
cpf?: string;
|
|
8069
|
+
isAccumulative?: boolean;
|
|
8070
|
+
}, {
|
|
8071
|
+
value?: number;
|
|
8072
|
+
date?: string;
|
|
8073
|
+
cpf?: string;
|
|
8074
|
+
isAccumulative?: boolean;
|
|
8075
|
+
}>, "many">;
|
|
8076
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
8077
|
+
deductions: z.ZodArray<z.ZodObject<{
|
|
8078
|
+
cpf: z.ZodString;
|
|
8079
|
+
value: z.ZodNumber;
|
|
8080
|
+
isAccumulative: z.ZodOptional<z.ZodBoolean>;
|
|
8081
|
+
date: z.ZodString;
|
|
8082
|
+
}, "strip", z.ZodTypeAny, {
|
|
8083
|
+
value?: number;
|
|
8084
|
+
date?: string;
|
|
8085
|
+
cpf?: string;
|
|
8086
|
+
isAccumulative?: boolean;
|
|
8087
|
+
}, {
|
|
8088
|
+
value?: number;
|
|
8089
|
+
date?: string;
|
|
8090
|
+
cpf?: string;
|
|
8091
|
+
isAccumulative?: boolean;
|
|
8092
|
+
}>, "many">;
|
|
8093
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
8043
8094
|
}, "strip", z.ZodTypeAny, {
|
|
8044
8095
|
origin?: string;
|
|
8045
8096
|
state?: string;
|
|
@@ -8284,7 +8335,14 @@ export declare const DeductionFileIngestionActionSchema: z.ZodObject<{
|
|
|
8284
8335
|
eligibilityOptions?: {} & {
|
|
8285
8336
|
[k: string]: unknown;
|
|
8286
8337
|
};
|
|
8287
|
-
ctx?: {
|
|
8338
|
+
ctx?: {
|
|
8339
|
+
deductions?: {
|
|
8340
|
+
value?: number;
|
|
8341
|
+
date?: string;
|
|
8342
|
+
cpf?: string;
|
|
8343
|
+
isAccumulative?: boolean;
|
|
8344
|
+
}[];
|
|
8345
|
+
} & {
|
|
8288
8346
|
[k: string]: unknown;
|
|
8289
8347
|
};
|
|
8290
8348
|
hooksCtx?: {} & {
|
|
@@ -8543,7 +8601,14 @@ export declare const DeductionFileIngestionActionSchema: z.ZodObject<{
|
|
|
8543
8601
|
eligibilityOptions?: {} & {
|
|
8544
8602
|
[k: string]: unknown;
|
|
8545
8603
|
};
|
|
8546
|
-
ctx?: {
|
|
8604
|
+
ctx?: {
|
|
8605
|
+
deductions?: {
|
|
8606
|
+
value?: number;
|
|
8607
|
+
date?: string;
|
|
8608
|
+
cpf?: string;
|
|
8609
|
+
isAccumulative?: boolean;
|
|
8610
|
+
}[];
|
|
8611
|
+
} & {
|
|
8547
8612
|
[k: string]: unknown;
|
|
8548
8613
|
};
|
|
8549
8614
|
hooksCtx?: {} & {
|
|
@@ -12357,29 +12422,17 @@ export declare const DeductionActionSchema: z.ZodObject<{
|
|
|
12357
12422
|
updatedAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
|
|
12358
12423
|
} & {
|
|
12359
12424
|
deductionInput: z.ZodObject<{
|
|
12360
|
-
payrollSystem: z.ZodString;
|
|
12361
|
-
externalSheetID: z.ZodString;
|
|
12362
|
-
externalEventID: z.ZodString;
|
|
12363
|
-
externalSituationID: z.ZodNumber;
|
|
12364
12425
|
isAccumulative: z.ZodBoolean;
|
|
12365
12426
|
date: z.ZodString;
|
|
12366
12427
|
value: z.ZodNumber;
|
|
12367
12428
|
}, "strip", z.ZodTypeAny, {
|
|
12368
12429
|
value?: number;
|
|
12369
12430
|
date?: string;
|
|
12370
|
-
payrollSystem?: string;
|
|
12371
|
-
externalSheetID?: string;
|
|
12372
12431
|
isAccumulative?: boolean;
|
|
12373
|
-
externalSituationID?: number;
|
|
12374
|
-
externalEventID?: string;
|
|
12375
12432
|
}, {
|
|
12376
12433
|
value?: number;
|
|
12377
12434
|
date?: string;
|
|
12378
|
-
payrollSystem?: string;
|
|
12379
|
-
externalSheetID?: string;
|
|
12380
12435
|
isAccumulative?: boolean;
|
|
12381
|
-
externalSituationID?: number;
|
|
12382
|
-
externalEventID?: string;
|
|
12383
12436
|
}>;
|
|
12384
12437
|
}, "strip", z.ZodTypeAny, {
|
|
12385
12438
|
origin?: string;
|
|
@@ -12637,11 +12690,7 @@ export declare const DeductionActionSchema: z.ZodObject<{
|
|
|
12637
12690
|
deductionInput?: {
|
|
12638
12691
|
value?: number;
|
|
12639
12692
|
date?: string;
|
|
12640
|
-
payrollSystem?: string;
|
|
12641
|
-
externalSheetID?: string;
|
|
12642
12693
|
isAccumulative?: boolean;
|
|
12643
|
-
externalSituationID?: number;
|
|
12644
|
-
externalEventID?: string;
|
|
12645
12694
|
};
|
|
12646
12695
|
}, {
|
|
12647
12696
|
origin?: string;
|
|
@@ -12899,10 +12948,6 @@ export declare const DeductionActionSchema: z.ZodObject<{
|
|
|
12899
12948
|
deductionInput?: {
|
|
12900
12949
|
value?: number;
|
|
12901
12950
|
date?: string;
|
|
12902
|
-
payrollSystem?: string;
|
|
12903
|
-
externalSheetID?: string;
|
|
12904
12951
|
isAccumulative?: boolean;
|
|
12905
|
-
externalSituationID?: number;
|
|
12906
|
-
externalEventID?: string;
|
|
12907
12952
|
};
|
|
12908
12953
|
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
import { ActionSchema, DeductionActionSchema, DependentActionSchema, GrantRevokeActionSchema, RechargeActionSchema } from '../schemas/action.schema';
|
|
2
|
+
import { ActionSchema, DeductionActionSchema, DeductionFileIngestionActionSchema, DependentActionSchema, GrantRevokeActionSchema, RechargeActionSchema } from '../schemas/action.schema';
|
|
3
3
|
export type ActionBaseGrantRevoke = z.infer<typeof GrantRevokeActionSchema>;
|
|
4
4
|
export type ActionBaseRecharge = z.infer<typeof RechargeActionSchema>;
|
|
5
5
|
export type ActionBaseDeduction = z.infer<typeof DeductionActionSchema>;
|
|
6
6
|
export type ActionBaseDependent = z.infer<typeof DependentActionSchema>;
|
|
7
7
|
export type ActionBase = z.infer<typeof ActionSchema>;
|
|
8
|
+
export type ActionBaseDeductionFileIngestion = z.infer<typeof DeductionFileIngestionActionSchema>;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import { BenefitDefinitionSchema } from '../schemas/benefit-definition.schema';
|
|
3
|
-
|
|
3
|
+
type Base = z.infer<typeof BenefitDefinitionSchema>;
|
|
4
|
+
export type BenefitDefinition = Omit<Base, 'stateMachine'> & {
|
|
5
|
+
stateMachine: Base['stateMachine'] & {
|
|
6
|
+
DEDUCTION_FILE_INGESTION?: {
|
|
7
|
+
REQUESTED_DEDUCTION_FILE_INGESTION: {
|
|
8
|
+
next: 'PENDING_CREATE_DEDUCTION' | string;
|
|
9
|
+
};
|
|
10
|
+
} & any;
|
|
11
|
+
DEDUCTION?: {
|
|
12
|
+
REQUESTED_DEDUCTION: {
|
|
13
|
+
next: 'REQUESTED_PAYROLL_DEDUCTION' | string;
|
|
14
|
+
};
|
|
15
|
+
} & any;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export {};
|
package/bin/src/cli/init.js
CHANGED
|
@@ -11,7 +11,6 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
11
11
|
const __dirname = path.dirname(__filename);
|
|
12
12
|
const templatesDir = path.join(__dirname, 'templates');
|
|
13
13
|
const benefitDefinitionTemplate = fs.readFileSync(path.join(templatesDir, 'benefit-definition.template.ts'), 'utf-8');
|
|
14
|
-
const benefitDefinitionTypesTemplate = fs.readFileSync(path.join(templatesDir, 'benefit-definition.types.template.ts'), 'utf-8');
|
|
15
14
|
const staticFiles = fs.readdirSync(path.join(templatesDir, 'bensdk-base'));
|
|
16
15
|
export default async function (benefitID) {
|
|
17
16
|
const availableActions = ['GRANT', 'REVOKE'];
|
|
@@ -30,35 +29,27 @@ export default async function (benefitID) {
|
|
|
30
29
|
packageTemplate.name = benefitID;
|
|
31
30
|
let benefitDefinition = benefitDefinitionTemplate.replace(/benefitID: '.*'/, `benefitID: "${benefitID.toUpperCase()}"`);
|
|
32
31
|
benefitDefinition = benefitDefinition.replace(/availableActions: \[\].*/, `availableActions: [${actions.join(', ')}],`);
|
|
33
|
-
let benefitDefinitionTypes = benefitDefinitionTypesTemplate;
|
|
34
32
|
if (!customAvailableActions.includes('RECHARGE')) {
|
|
35
33
|
benefitDefinition = benefitDefinition.replace(/\/\*\* <recharge> \*\/[\s\S]*?\/\*\* <\/recharge> \*\//g, '');
|
|
36
|
-
benefitDefinitionTypes = benefitDefinitionTypes.replace(/\/\*\* <recharge> \*\/[\s\S]*?\/\*\* <\/recharge> \*\//g, '');
|
|
37
34
|
}
|
|
38
35
|
else {
|
|
39
36
|
// If RECHARGE is selected, just remove the recharge comment markers
|
|
40
37
|
benefitDefinition = benefitDefinition.replace(/\/\*\* <recharge> \*\/\n?/g, '');
|
|
41
38
|
benefitDefinition = benefitDefinition.replace(/\/\*\* <\/recharge> \*\/\n?/g, '');
|
|
42
|
-
benefitDefinitionTypes = benefitDefinitionTypes.replace(/\/\*\* <recharge> \*\/\n?/g, '');
|
|
43
|
-
benefitDefinitionTypes = benefitDefinitionTypes.replace(/\/\*\* <\/recharge> \*\/\n?/g, '');
|
|
44
39
|
}
|
|
45
40
|
if (!customAvailableActions.includes('GRANT_DEPENDENT') &&
|
|
46
41
|
!customAvailableActions.includes('REVOKE_DEPENDENT')) {
|
|
47
42
|
benefitDefinition = benefitDefinition.replace(/\/\*\* <dependent> \*\/[\s\S]*?\/\*\* <\/dependent> \*\//g, '');
|
|
48
|
-
benefitDefinitionTypes = benefitDefinitionTypes.replace(/\/\*\* <dependent> \*\/[\s\S]*?\/\*\* <\/dependent> \*\//g, '');
|
|
49
43
|
}
|
|
50
44
|
else {
|
|
51
45
|
// If RECHARGE is selected, just remove the recharge comment markers
|
|
52
46
|
benefitDefinition = benefitDefinition.replace(/\/\*\* <dependent> \*\/\n?/g, '');
|
|
53
47
|
benefitDefinition = benefitDefinition.replace(/\/\*\* <\/dependent> \*\/\n?/g, '');
|
|
54
|
-
benefitDefinitionTypes = benefitDefinitionTypes.replace(/\/\*\* <dependent> \*\/\n?/g, '');
|
|
55
|
-
benefitDefinitionTypes = benefitDefinitionTypes.replace(/\/\*\* <\/dependent> \*\/\n?/g, '');
|
|
56
48
|
}
|
|
57
49
|
const currentDirectory = process.cwd();
|
|
58
50
|
const appDirectory = `${currentDirectory}/${benefitID}`;
|
|
59
51
|
fs.mkdirSync(`${appDirectory}/src`, { recursive: true });
|
|
60
52
|
fs.writeFileSync(`${appDirectory}/src/benefit-definition.ts`, benefitDefinition);
|
|
61
|
-
fs.writeFileSync(`${appDirectory}/src/benefit-definition.types.ts`, benefitDefinitionTypes);
|
|
62
53
|
fs.mkdirSync(`${appDirectory}/src/lib`, { recursive: true });
|
|
63
54
|
fs.cpSync(path.join(templatesDir, 'bensdk-lib'), `${appDirectory}/src/lib`, { recursive: true });
|
|
64
55
|
fs.mkdirSync(`${appDirectory}/bin/server`, { recursive: true });
|
|
@@ -79,7 +70,7 @@ export default async function (benefitID) {
|
|
|
79
70
|
console.log(chalk.green('✔ Project created'));
|
|
80
71
|
spinner.text = 'Building benSDK app';
|
|
81
72
|
spinner.start();
|
|
82
|
-
exec(`cd ${appDirectory} && npm install > /dev/null && npm run format > /dev/null && cd bin/viewer && npx vite build > /dev/null`, (error, stdout, stderr) => {
|
|
73
|
+
exec(`cd ${appDirectory} && npm install > /dev/null && npm install @benup/bensdk > /dev/null && npm run format > /dev/null && cd bin/viewer && npx vite build > /dev/null`, (error, stdout, stderr) => {
|
|
83
74
|
if (error || stderr) {
|
|
84
75
|
console.log(error, stderr);
|
|
85
76
|
console.log(chalk.red('Something was wrong during Building benSDK app'));
|
package/bin/src/cli/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/init.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,eAAe,MAAM,mCAAmC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEtF,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAEvD,MAAM,yBAAyB,GAAG,EAAE,CAAC,YAAY,CAC/C,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,gCAAgC,CAAC,EACzD,OAAO,CACR,CAAC;AAEF,MAAM,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/init.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACr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1,3 +1,4 @@
|
|
|
1
|
+
import { BenefitDefinition } from '@benup/bensdk/bin/lib/types/benefit-definition.types';
|
|
1
2
|
import z from 'zod';
|
|
2
3
|
|
|
3
4
|
const benefitDefinition = {
|
|
@@ -165,6 +166,6 @@ const benefitDefinition = {
|
|
|
165
166
|
/** </recharge> */
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
|
-
};
|
|
169
|
+
} satisfies BenefitDefinition;
|
|
169
170
|
|
|
170
171
|
export default benefitDefinition;
|
|
@@ -34,10 +34,21 @@ async function main() {
|
|
|
34
34
|
|
|
35
35
|
const fileName = `${state.toLocaleLowerCase()}.handler.ts`;
|
|
36
36
|
let stateHandler = stateHandlerTemplate;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const actionSize = action
|
|
38
|
+
.split('_')
|
|
39
|
+
let actionInCamelCase = '';
|
|
40
|
+
if(actionSize.length === 1){
|
|
41
|
+
actionInCamelCase = action.split('')
|
|
42
|
+
.map((word, index) => index === 0 ? word.toUpperCase() : word.toLowerCase())
|
|
40
43
|
.join('');
|
|
44
|
+
} else {
|
|
45
|
+
actionInCamelCase = action
|
|
46
|
+
.split('_')[1]
|
|
47
|
+
.split('')
|
|
48
|
+
.map((word, index) => index === 0 ? word.toUpperCase() : word.toLowerCase())
|
|
49
|
+
.join('');
|
|
50
|
+
}
|
|
51
|
+
|
|
41
52
|
|
|
42
53
|
stateHandler = stateHandler.replace(
|
|
43
54
|
'// StateMachine,',
|
|
@@ -49,18 +60,28 @@ async function main() {
|
|
|
49
60
|
`import benefitDefinition from '../benefit-definition';`
|
|
50
61
|
);
|
|
51
62
|
|
|
63
|
+
if(action === 'GRANT' || action === 'REVOKE'){
|
|
64
|
+
stateHandler = stateHandler.replace(
|
|
65
|
+
'// import {Action}',
|
|
66
|
+
`import { ActionBaseGrantRevoke as Action} from '@benup/bensdk/bin/lib/types/action.types'`
|
|
67
|
+
);
|
|
68
|
+
} else {
|
|
52
69
|
stateHandler = stateHandler.replace(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
stateHandler = stateHandler.replace('// Action,', `Action${actionInCamelCase},`);
|
|
70
|
+
'// import {Action}',
|
|
71
|
+
`import { ActionBase${actionInCamelCase} as Action} from '@benup/bensdk/bin/lib/types/action.types'`
|
|
72
|
+
);
|
|
73
|
+
}
|
|
58
74
|
|
|
59
75
|
stateHandler = stateHandler.replace(
|
|
60
76
|
'// ActionLog[""],',
|
|
61
77
|
`ActionLog${actionInCamelCase}["${state}"],`
|
|
62
78
|
);
|
|
63
79
|
|
|
80
|
+
stateHandler = stateHandler.replace(
|
|
81
|
+
'// ActionLogType',
|
|
82
|
+
`export type ActionLog${actionInCamelCase} = z.infer<typeof benefitDefinition.actions.log.${action}>;`
|
|
83
|
+
);
|
|
84
|
+
|
|
64
85
|
const handlersDir = `${process.cwd()}/src/handlers`;
|
|
65
86
|
if (!fs.existsSync(handlersDir)) {
|
|
66
87
|
fs.mkdirSync(handlersDir, { recursive: true });
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
2
2
|
// import benefitDefinition from '../benefit-definition';
|
|
3
|
-
// import {Action}
|
|
4
|
-
import { StateHandler } from '
|
|
3
|
+
// import {Action}
|
|
4
|
+
import { StateHandler } from '@benup/bensdk/bin/lib/types/state-handler.types';
|
|
5
|
+
import z from 'zod';
|
|
5
6
|
import { getLogsFromResponse } from '../lib/utils/logs';
|
|
6
7
|
|
|
7
8
|
export interface BenefitResponse {
|
|
@@ -14,8 +15,11 @@ export const options = {
|
|
|
14
15
|
maxRetries: 10
|
|
15
16
|
};
|
|
16
17
|
|
|
18
|
+
// ActionLogType
|
|
19
|
+
type ActionCtx = z.infer<typeof benefitDefinition.actions.ctx>;
|
|
20
|
+
|
|
17
21
|
const handler: StateHandler<
|
|
18
|
-
|
|
22
|
+
Action,
|
|
19
23
|
// ActionLog[""],
|
|
20
24
|
ActionCtx
|
|
21
25
|
> = async (message, action, ctx) => {
|
package/package.json
CHANGED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import z from 'zod';
|
|
2
|
-
import benefitDefinition from './benefit-definition';
|
|
3
|
-
import {
|
|
4
|
-
ActionBaseDependent,
|
|
5
|
-
ActionBaseGrantRevoke,
|
|
6
|
-
ActionBaseRecharge
|
|
7
|
-
} from './lib/types/action.types';
|
|
8
|
-
|
|
9
|
-
type ActionEligibilityOptionsGrant = z.infer<
|
|
10
|
-
typeof benefitDefinition.actions.eligibilityOptions.GRANT
|
|
11
|
-
>;
|
|
12
|
-
/** <recharge> */
|
|
13
|
-
type ActionEligibilityOptionsRecharge = z.infer<
|
|
14
|
-
typeof benefitDefinition.actions.eligibilityOptions.RECHARGE
|
|
15
|
-
>;
|
|
16
|
-
/** </recharge> */
|
|
17
|
-
/** <dependent> */
|
|
18
|
-
type ActionEligibilityOptionsDependent = z.infer<
|
|
19
|
-
typeof benefitDefinition.actions.eligibilityOptions.GRANT_DEPENDENT
|
|
20
|
-
>;
|
|
21
|
-
/** </dependent> */
|
|
22
|
-
export type ActionCtx = z.infer<typeof benefitDefinition.actions.ctx>;
|
|
23
|
-
|
|
24
|
-
export type ActionLogGrant = z.infer<typeof benefitDefinition.actions.log.GRANT>;
|
|
25
|
-
|
|
26
|
-
export type ActionLogRevoke = z.infer<typeof benefitDefinition.actions.log.REVOKE>;
|
|
27
|
-
/** <recharge> */
|
|
28
|
-
export type ActionLogRecharge = z.infer<typeof benefitDefinition.actions.log.RECHARGE>;
|
|
29
|
-
/** </recharge> */
|
|
30
|
-
/** <dependent> */
|
|
31
|
-
export type ActionLogGrantDependent = z.infer<typeof benefitDefinition.actions.log.GRANT_DEPENDENT>;
|
|
32
|
-
export type ActionLogRevokeDependent = z.infer<
|
|
33
|
-
typeof benefitDefinition.actions.log.REVOKE_DEPENDENT
|
|
34
|
-
>;
|
|
35
|
-
/** </dependent> */
|
|
36
|
-
export type ActionGrant = ActionBaseGrantRevoke & {
|
|
37
|
-
ctx: ActionCtx;
|
|
38
|
-
eligibilityOptions: ActionEligibilityOptionsGrant;
|
|
39
|
-
logs: ActionLogGrant;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export type ActionRevoke = ActionBaseGrantRevoke & {
|
|
43
|
-
ctx: ActionCtx;
|
|
44
|
-
eligibilityOptions: ActionEligibilityOptionsGrant;
|
|
45
|
-
logs: ActionLogRevoke;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/** <recharge> */
|
|
49
|
-
export type ActionRecharge = ActionBaseRecharge & {
|
|
50
|
-
ctx: ActionCtx;
|
|
51
|
-
eligibilityOptions: ActionEligibilityOptionsRecharge;
|
|
52
|
-
logs: ActionLogRecharge;
|
|
53
|
-
};
|
|
54
|
-
/** </recharge> */
|
|
55
|
-
/** <dependent> */
|
|
56
|
-
export type ActionGrantDependent = ActionBaseDependent & {
|
|
57
|
-
ctx: ActionCtx;
|
|
58
|
-
eligibilityOptions: ActionEligibilityOptionsDependent;
|
|
59
|
-
logs: ActionLogGrantDependent;
|
|
60
|
-
};
|
|
61
|
-
export type ActionRevokeDependent = ActionBaseDependent & {
|
|
62
|
-
ctx: ActionCtx;
|
|
63
|
-
eligibilityOptions: ActionEligibilityOptionsDependent;
|
|
64
|
-
logs: ActionLogRevokeDependent;
|
|
65
|
-
};
|
|
66
|
-
/** </dependent> */
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
export type ActionBase = {
|
|
2
|
-
_id: string;
|
|
3
|
-
batchID?: string | undefined;
|
|
4
|
-
parentActionID?: string | undefined;
|
|
5
|
-
fingerprint?: string | undefined;
|
|
6
|
-
benefitID: string;
|
|
7
|
-
action: 'GRANT' | 'REVOKE' | 'DEDUCTION' | 'RECHARGE' | 'GRANT_DEPENDENT' | 'REVOKE_DEPENDENT';
|
|
8
|
-
state: string;
|
|
9
|
-
target: {
|
|
10
|
-
dependent: {
|
|
11
|
-
externalDependentID: string;
|
|
12
|
-
externalDependentCode: string;
|
|
13
|
-
name: string;
|
|
14
|
-
/** CPF in format 000.000.000-00 */
|
|
15
|
-
cpf: string;
|
|
16
|
-
birthDate: string;
|
|
17
|
-
sex: 'M' | 'F';
|
|
18
|
-
relationshipType: string;
|
|
19
|
-
maritalStatus: string;
|
|
20
|
-
benefits: {
|
|
21
|
-
[x: string]: {
|
|
22
|
-
value: boolean;
|
|
23
|
-
options?: {} | undefined;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
status: 'LINKED' | 'UNLINKED';
|
|
27
|
-
};
|
|
28
|
-
employee: {
|
|
29
|
-
_id: string;
|
|
30
|
-
name: string;
|
|
31
|
-
/** CPF in format 000.000.000-00 */
|
|
32
|
-
cpf: string;
|
|
33
|
-
birthdate: string;
|
|
34
|
-
address: {
|
|
35
|
-
street: string;
|
|
36
|
-
number: string;
|
|
37
|
-
complement?: string | undefined;
|
|
38
|
-
neighborhood: string;
|
|
39
|
-
city: string;
|
|
40
|
-
state: string;
|
|
41
|
-
zipCode: string;
|
|
42
|
-
country: string;
|
|
43
|
-
};
|
|
44
|
-
email?: string | undefined;
|
|
45
|
-
createdAt: string;
|
|
46
|
-
updatedAt?: string | undefined;
|
|
47
|
-
};
|
|
48
|
-
employmentContract: {
|
|
49
|
-
_id: string;
|
|
50
|
-
companyID: string;
|
|
51
|
-
customerID: string;
|
|
52
|
-
accountID: string;
|
|
53
|
-
admissionDate: string;
|
|
54
|
-
externalEmploymentContractID: string;
|
|
55
|
-
position: {
|
|
56
|
-
code: number;
|
|
57
|
-
description: string;
|
|
58
|
-
};
|
|
59
|
-
establishment: {
|
|
60
|
-
code: number;
|
|
61
|
-
description: string;
|
|
62
|
-
};
|
|
63
|
-
startDateOfCurrentSituation: string;
|
|
64
|
-
situation: {
|
|
65
|
-
code: number;
|
|
66
|
-
description: string;
|
|
67
|
-
};
|
|
68
|
-
benefits: {
|
|
69
|
-
[x: string]: {
|
|
70
|
-
value: boolean;
|
|
71
|
-
options?: {} | undefined;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
status: 'ADMITTED' | 'DISMISSED' | 'SUSPENDED' | 'IGNORED';
|
|
75
|
-
fingerprint: string;
|
|
76
|
-
createdAt: string;
|
|
77
|
-
isDeleted?: boolean;
|
|
78
|
-
};
|
|
79
|
-
company: {
|
|
80
|
-
_id: string;
|
|
81
|
-
accountID: string;
|
|
82
|
-
externalCompanyID: string;
|
|
83
|
-
cnpj: string;
|
|
84
|
-
/** razao social */
|
|
85
|
-
businessName: string;
|
|
86
|
-
/** nome fantasia */
|
|
87
|
-
tradeName: string;
|
|
88
|
-
address?:
|
|
89
|
-
| {
|
|
90
|
-
street: string;
|
|
91
|
-
number: string;
|
|
92
|
-
complement?: string | undefined;
|
|
93
|
-
neighborhood: string;
|
|
94
|
-
city: string;
|
|
95
|
-
state: string;
|
|
96
|
-
zipCode: string;
|
|
97
|
-
country: string;
|
|
98
|
-
}
|
|
99
|
-
| undefined;
|
|
100
|
-
createdAt: string;
|
|
101
|
-
updatedAt?: string | undefined;
|
|
102
|
-
};
|
|
103
|
-
payrollConfiguration: {
|
|
104
|
-
_id: string;
|
|
105
|
-
accountID: string;
|
|
106
|
-
companyID: string;
|
|
107
|
-
payrollSystem: 'LG_ONPREMISE_VLI' | 'LG_CLOUD' | 'LG_ONPREMISE_AMBEV';
|
|
108
|
-
eligibilitySource: 'BENEFIT_MODULE' | 'ADDITIONAL_ATTRIBUTE';
|
|
109
|
-
productToggle?: {
|
|
110
|
-
isOcherstratorActive?: boolean;
|
|
111
|
-
isIntegratorActive?: boolean;
|
|
112
|
-
};
|
|
113
|
-
cutoffDay: number;
|
|
114
|
-
modifiedContractsWindowInDays: number;
|
|
115
|
-
dataMapping: {
|
|
116
|
-
eligibility?:
|
|
117
|
-
| {
|
|
118
|
-
benefitID: string;
|
|
119
|
-
eligibilityType: 'BENEFIT' | 'ATTRIBUTE' | 'ELIGIBLE_TO_ALL';
|
|
120
|
-
eligibilityCode?: (number | string) | undefined;
|
|
121
|
-
eligibilityMap?:
|
|
122
|
-
| {
|
|
123
|
-
eligibilityValue: (boolean | number) | string;
|
|
124
|
-
isEligible: boolean;
|
|
125
|
-
options: {};
|
|
126
|
-
}[]
|
|
127
|
-
| undefined;
|
|
128
|
-
}[]
|
|
129
|
-
| undefined;
|
|
130
|
-
deduction?:
|
|
131
|
-
| {
|
|
132
|
-
benefitID: string;
|
|
133
|
-
deduction: {
|
|
134
|
-
externalPayrollID: number;
|
|
135
|
-
externalPayrollEventID: number;
|
|
136
|
-
};
|
|
137
|
-
refund?:
|
|
138
|
-
| {
|
|
139
|
-
externalPayrollID: number;
|
|
140
|
-
externalPayrollEventID: number;
|
|
141
|
-
}
|
|
142
|
-
| undefined;
|
|
143
|
-
meta?: {} | undefined;
|
|
144
|
-
}[]
|
|
145
|
-
| undefined;
|
|
146
|
-
recharge?:
|
|
147
|
-
| {
|
|
148
|
-
rechargeID: string;
|
|
149
|
-
label?: string | undefined;
|
|
150
|
-
eventID: number;
|
|
151
|
-
sheetID: number;
|
|
152
|
-
benefitID: string;
|
|
153
|
-
productID?: string | undefined;
|
|
154
|
-
executionCron: string;
|
|
155
|
-
rechargeDate?: number | undefined;
|
|
156
|
-
}[]
|
|
157
|
-
| undefined;
|
|
158
|
-
situation?:
|
|
159
|
-
| {
|
|
160
|
-
code: number;
|
|
161
|
-
value: 'ADMITTED' | 'DISMISSED' | 'SUSPENDED' | 'IGNORED';
|
|
162
|
-
}[]
|
|
163
|
-
| undefined;
|
|
164
|
-
};
|
|
165
|
-
version: 2;
|
|
166
|
-
isDeleted?: boolean;
|
|
167
|
-
createdAt: string;
|
|
168
|
-
updatedAt?: string | undefined;
|
|
169
|
-
deletedAt?: string | undefined;
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
eligibilityOptions: {};
|
|
173
|
-
ctx?: {} | undefined;
|
|
174
|
-
log?: {} | undefined;
|
|
175
|
-
origin: string;
|
|
176
|
-
rechargeInput?:
|
|
177
|
-
| {
|
|
178
|
-
externalSheetID: string;
|
|
179
|
-
externalEventID: string;
|
|
180
|
-
date: string;
|
|
181
|
-
value: number;
|
|
182
|
-
}
|
|
183
|
-
| undefined;
|
|
184
|
-
deductionInput?:
|
|
185
|
-
| {
|
|
186
|
-
payrollSystem: string;
|
|
187
|
-
externalSheetID: string;
|
|
188
|
-
externalEventID: string;
|
|
189
|
-
externalSituationID: number;
|
|
190
|
-
isAccumulative: boolean;
|
|
191
|
-
date: string;
|
|
192
|
-
value: number;
|
|
193
|
-
}
|
|
194
|
-
| undefined;
|
|
195
|
-
createdAt: string;
|
|
196
|
-
updatedAt?: string | undefined;
|
|
197
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ActionBase } from './action-base.type';
|
|
2
|
-
import { ActionBaseDeduction } from './base-deduction.type';
|
|
3
|
-
import { ActionBaseDependent } from './base-dependent.type';
|
|
4
|
-
import { ActionBaseRecharge } from './base-recharge.type';
|
|
5
|
-
import { ActionBaseGrantRevoke } from './grant-revoke.type';
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
ActionBase,
|
|
9
|
-
ActionBaseDeduction,
|
|
10
|
-
ActionBaseDependent,
|
|
11
|
-
ActionBaseGrantRevoke,
|
|
12
|
-
ActionBaseRecharge
|
|
13
|
-
};
|