@benup/bensdk 1.11.0 → 1.11.2

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.
@@ -0,0 +1,221 @@
1
+ import { RechargeActionSchema } from '#shared/schemas/action.schema';
2
+ import z from 'zod';
3
+
4
+ type DeepRequired<T> = T extends object
5
+ ? {
6
+ [P in keyof T]-?: DeepRequired<T[P]>;
7
+ }
8
+ : T;
9
+
10
+ export default {
11
+ _id: '683877a6e780f979be00048c',
12
+ batchID: 'e05db2a3-9f9e-45c3-a5a9-f2d77bb47647',
13
+ executionID: 'e05db2a3-9f9e-45c3-a5a9-f2d77bb47647',
14
+ parentActionID: '',
15
+ fingerprint: '870036743251b6e8ada273819175df6379e18142e35ffd04d696bd2b68be9d31',
16
+ action: 'RECHARGE',
17
+ benefitID: 'NEW_VALUE',
18
+ state: 'INITIAL',
19
+ target: {
20
+ employee: {
21
+ _id: '681e3f1a230ab8b41591abc1',
22
+ name: 'Gabrielle Pumpkin Verbrugghen',
23
+ cpf: '756.896.500-72',
24
+ birthdate: '1979-10-10',
25
+ address: {
26
+ number: '',
27
+ state: '',
28
+ street: '',
29
+ complement: '',
30
+ neighborhood: '',
31
+ city: '',
32
+ zipCode: '',
33
+ country: ''
34
+ },
35
+ email: '',
36
+ sex: 'M',
37
+ maritalStatus: 'NONE',
38
+ documents: {
39
+ rg: {
40
+ number: '',
41
+ state: '',
42
+ issueDate: '',
43
+ issuer: ''
44
+ }
45
+ },
46
+ createdAt: '',
47
+ updatedAt: ''
48
+ },
49
+ employmentContract: {
50
+ status: 'ADMITTED',
51
+ _id: '',
52
+ fingerprint: '',
53
+ lastSeenAtExecutionID: '',
54
+ createdAt: '',
55
+ companyID: '',
56
+ customerID: '',
57
+ accountID: '',
58
+ admissionDate: '',
59
+ externalEmploymentContractID: '',
60
+ externalPersonID: '',
61
+ position: {
62
+ code: 0,
63
+ description: ''
64
+ },
65
+ establishment: {
66
+ code: 0,
67
+ description: '',
68
+ cnpj: ''
69
+ },
70
+ startDateOfCurrentSituation: '',
71
+ situation: {
72
+ code: 0,
73
+ description: '',
74
+ origin: 'TRANSFER_IN',
75
+ transfer: {
76
+ from: {
77
+ externalEmploymentContractID: '',
78
+ externalCompanyID: ''
79
+ },
80
+ to: {
81
+ externalEmploymentContractID: '',
82
+ externalCompanyID: ''
83
+ },
84
+ transferredAt: new Date('2025-05-29T15:05:10.431+0000')
85
+ }
86
+ },
87
+ dependents: [],
88
+ isDeleted: false,
89
+ revision: 0,
90
+ employmentContractID: '',
91
+ mothersName: '',
92
+ costCenter: {
93
+ code: '',
94
+ description: ''
95
+ },
96
+ businessUnit: {
97
+ code: '',
98
+ description: ''
99
+ },
100
+ phone: '',
101
+ cellphone: '',
102
+ externalDeliveryAddress: {
103
+ address: {
104
+ number: '',
105
+ street: '',
106
+ complement: '',
107
+ neighborhood: '',
108
+ city: '',
109
+ state: '',
110
+ zipCode: '',
111
+ country: ''
112
+ },
113
+ externalDeliveryAddressID: '',
114
+ externalEstablishmentCNPJ: '',
115
+ externalEstablishmentName: ''
116
+ },
117
+ originExecutionID: '',
118
+ benefits: {
119
+ DUMMY: {
120
+ options: {},
121
+ status: 'ENABLED',
122
+ value: false,
123
+ isEligible: false,
124
+ statusOriginID: ''
125
+ }
126
+ }
127
+ },
128
+ company: {
129
+ _id: '678016b2410559c21dd53226',
130
+ accountID: '681b75421180f14cd49dafc1',
131
+ cnpj: '61.585.865/0001-51',
132
+ businessName: 'RD Saude',
133
+ tradeName: 'Raia Drogasil S/A',
134
+ createdAt: '2025-01-09T18:34:26.466Z',
135
+ updatedAt: '',
136
+ address: {
137
+ number: '',
138
+ street: '',
139
+ complement: '',
140
+ neighborhood: '',
141
+ city: '',
142
+ state: '',
143
+ zipCode: '',
144
+ country: ''
145
+ },
146
+ externalCompanyID: ''
147
+ },
148
+ payrollConfiguration: {
149
+ _id: '6836097c80d6be838db32525',
150
+ accountID: '681b75421180f14cd49dafc1',
151
+ companyID: '678016b2410559c21dd53226',
152
+ payrollSystem: 'LG_CLOUD',
153
+ eligibilitySource: 'BENEFIT_MODULE',
154
+ productToggle: {
155
+ isOrchestratorActive: true,
156
+ isManualExecutionActive: true,
157
+ isIntegratorActive: true
158
+ },
159
+ payrollReferenceCutoffDay: 20,
160
+ modifiedContractsWindowInDays: 15,
161
+ dataMapping: {
162
+ eligibility: [],
163
+ deduction: [],
164
+ situation: [],
165
+ events: [],
166
+ rechargeTemplate: []
167
+ },
168
+ version: 3,
169
+ isDeleted: false,
170
+ createdAt: '2025-05-27T18:50:36.135Z',
171
+ updatedAt: '',
172
+ deletedAt: ''
173
+ },
174
+ dependent: {
175
+ status: 'LINKED',
176
+ name: '',
177
+ cpf: '',
178
+ sex: 'M',
179
+ maritalStatus: 'NONE',
180
+ benefits: {
181
+ DUMMY: {
182
+ options: {},
183
+ status: 'ENABLED',
184
+ value: false,
185
+ isEligible: false,
186
+ statusOriginID: ''
187
+ }
188
+ },
189
+ isDeleted: false,
190
+ mothersName: '',
191
+ externalDependentID: '',
192
+ externalDependentCode: '',
193
+ birthDate: '',
194
+ relationshipType: 'OTHER'
195
+ }
196
+ },
197
+ eligibilityOptions: {
198
+ externalBenefitID: 'NV101.1',
199
+ plan: {
200
+ name: 'CLUBE DE BENEFICIOS',
201
+ externalPorductID: 'NV101.1'
202
+ }
203
+ },
204
+ ctx: {},
205
+ hooksCtx: {},
206
+ log: {},
207
+ origin: 'test',
208
+ requiresPlanApproval: false,
209
+ planID: '',
210
+ planApprovalStatus: 'APPROVED',
211
+ createdAt: new Date('2025-05-29T15:05:10.431+0000'),
212
+ updatedAt: new Date('2025-05-29T20:30:03.720+0000'),
213
+ rechargeInput: {
214
+ value: 0,
215
+ date: '',
216
+ productID: '',
217
+ ticketCode: 0,
218
+ quantity: 0,
219
+ tariffValue: 0
220
+ }
221
+ } satisfies DeepRequired<z.infer<typeof RechargeActionSchema>>;
@@ -0,0 +1,271 @@
1
+ import { GrantRevokeActionSchema } from '#shared/schemas/action.schema';
2
+ import z from 'zod';
3
+
4
+ type DeepRequired<T> = T extends object
5
+ ? {
6
+ [P in keyof T]-?: DeepRequired<T[P]>;
7
+ }
8
+ : T;
9
+
10
+ export default {
11
+ _id: '683877a6e780f979be00048c',
12
+ batchID: 'e05db2a3-9f9e-45c3-a5a9-f2d77bb47647',
13
+ executionID: 'e05db2a3-9f9e-45c3-a5a9-f2d77bb47647',
14
+ parentActionID: '',
15
+ fingerprint: '870036743251b6e8ada273819175df6379e18142e35ffd04d696bd2b68be9d31',
16
+ action: 'GRANT',
17
+ benefitID: 'NEW_VALUE',
18
+ state: 'INITIAL',
19
+ target: {
20
+ employee: {
21
+ _id: '681e3f1a230ab8b41591abc1',
22
+ name: 'Gabrielle Pumpkin Verbrugghen',
23
+ cpf: '756.896.500-72',
24
+ birthdate: '1979-10-10',
25
+ address: {
26
+ number: '',
27
+ state: '',
28
+ street: '',
29
+ complement: '',
30
+ neighborhood: '',
31
+ city: '',
32
+ zipCode: '',
33
+ country: ''
34
+ },
35
+ email: '',
36
+ sex: 'M',
37
+ maritalStatus: 'NONE',
38
+ documents: {
39
+ rg: {
40
+ number: '',
41
+ state: '',
42
+ issueDate: '',
43
+ issuer: ''
44
+ }
45
+ },
46
+ createdAt: '',
47
+ updatedAt: ''
48
+ },
49
+ employmentContract: {
50
+ status: 'ADMITTED',
51
+ _id: '',
52
+ fingerprint: '',
53
+ createdAt: '',
54
+ lastSeenAtExecutionID: '',
55
+ companyID: '',
56
+ customerID: '',
57
+ accountID: '',
58
+ admissionDate: '',
59
+ externalEmploymentContractID: '',
60
+ externalPersonID: '',
61
+ position: {
62
+ code: 0,
63
+ description: ''
64
+ },
65
+ establishment: {
66
+ code: 0,
67
+ description: '',
68
+ cnpj: ''
69
+ },
70
+ startDateOfCurrentSituation: '',
71
+ situation: {
72
+ code: 0,
73
+ description: '',
74
+ origin: 'TRANSFER_IN',
75
+ transfer: {
76
+ from: {
77
+ externalEmploymentContractID: '',
78
+ externalCompanyID: ''
79
+ },
80
+ to: {
81
+ externalEmploymentContractID: '',
82
+ externalCompanyID: ''
83
+ },
84
+ transferredAt: new Date('2025-05-29T15:05:10.431+0000')
85
+ }
86
+ },
87
+ dependents: [],
88
+ isDeleted: false,
89
+ revision: 0,
90
+ employmentContractID: '',
91
+ mothersName: '',
92
+ costCenter: {
93
+ code: '',
94
+ description: ''
95
+ },
96
+ businessUnit: {
97
+ code: '',
98
+ description: ''
99
+ },
100
+ phone: '',
101
+ cellphone: '',
102
+ externalDeliveryAddress: {
103
+ address: {
104
+ number: '',
105
+ street: '',
106
+ complement: '',
107
+ neighborhood: '',
108
+ city: '',
109
+ state: '',
110
+ zipCode: '',
111
+ country: ''
112
+ },
113
+ externalDeliveryAddressID: '',
114
+ externalEstablishmentCNPJ: '',
115
+ externalEstablishmentName: ''
116
+ },
117
+ originExecutionID: '',
118
+ benefits: {
119
+ DUMMY: {
120
+ options: {},
121
+ status: 'ENABLED',
122
+ value: false,
123
+ isEligible: false,
124
+ statusOriginID: ''
125
+ }
126
+ }
127
+ },
128
+ company: {
129
+ _id: '678016b2410559c21dd53226',
130
+ accountID: '681b75421180f14cd49dafc1',
131
+ cnpj: '61.585.865/0001-51',
132
+ businessName: 'RD Saude',
133
+ tradeName: 'Raia Drogasil S/A',
134
+ createdAt: '2025-01-09T18:34:26.466Z',
135
+ updatedAt: '',
136
+ address: {
137
+ number: '',
138
+ street: '',
139
+ complement: '',
140
+ neighborhood: '',
141
+ city: '',
142
+ state: '',
143
+ zipCode: '',
144
+ country: ''
145
+ },
146
+ externalCompanyID: ''
147
+ },
148
+ payrollConfiguration: {
149
+ _id: '6836097c80d6be838db32525',
150
+ accountID: '681b75421180f14cd49dafc1',
151
+ companyID: '678016b2410559c21dd53226',
152
+ payrollSystem: 'LG_CLOUD',
153
+ eligibilitySource: 'BENEFIT_MODULE',
154
+ productToggle: {
155
+ isOrchestratorActive: true,
156
+ isManualExecutionActive: true,
157
+ isIntegratorActive: true
158
+ },
159
+ payrollReferenceCutoffDay: 20,
160
+ modifiedContractsWindowInDays: 15,
161
+ dataMapping: {
162
+ eligibility: [
163
+ {
164
+ benefitID: 'FLEURY_CHECKUP',
165
+ eligibilityType: 'BENEFIT',
166
+ options: {
167
+ contractID: '47d9b27a-1933-47d5-856b-6b827cb43d2c'
168
+ },
169
+ settings: {
170
+ revoke: {
171
+ shouldScheduleRevoke: false,
172
+ daysInAdvanceToScheduleRevoke: 1
173
+ },
174
+ grant: {
175
+ shouldGrantBeforeAdmissionDate: false,
176
+ daysBeforeAdmissionDateToGrant: 1
177
+ }
178
+ },
179
+ eligibilityMap: [],
180
+ eligibilityCode: ''
181
+ },
182
+ {
183
+ benefitID: 'FLEURY_CHECKUP',
184
+ eligibilityType: 'BENEFIT',
185
+ options: {
186
+ contractID: '47d9b27a-1933-47d5-856b-6b827cb43d2c'
187
+ },
188
+ settings: {
189
+ revoke: {
190
+ shouldScheduleRevoke: false,
191
+ daysInAdvanceToScheduleRevoke: 1
192
+ },
193
+ grant: {
194
+ shouldGrantBeforeAdmissionDate: false,
195
+ daysBeforeAdmissionDateToGrant: 1
196
+ }
197
+ },
198
+ eligibilityMap: [],
199
+ eligibilityCode: ''
200
+ },
201
+ {
202
+ benefitID: 'FLEURY_TELEMEDICINA',
203
+ eligibilityType: 'BENEFIT',
204
+ options: {
205
+ contractID: '06f5c5c3-8b5d-4df5-a8ab-d671a5752c11'
206
+ },
207
+ settings: {
208
+ revoke: {
209
+ shouldScheduleRevoke: false,
210
+ daysInAdvanceToScheduleRevoke: 1
211
+ },
212
+ grant: {
213
+ shouldGrantBeforeAdmissionDate: false,
214
+ daysBeforeAdmissionDateToGrant: 1
215
+ }
216
+ },
217
+ eligibilityMap: [],
218
+ eligibilityCode: ''
219
+ }
220
+ ],
221
+ deduction: [],
222
+ situation: [],
223
+ events: [],
224
+ rechargeTemplate: []
225
+ },
226
+ version: 3,
227
+ isDeleted: false,
228
+ createdAt: '2025-05-27T18:50:36.135Z',
229
+ updatedAt: '',
230
+ deletedAt: ''
231
+ },
232
+ dependent: {
233
+ status: 'LINKED',
234
+ name: '',
235
+ cpf: '',
236
+ sex: 'M',
237
+ maritalStatus: 'NONE',
238
+ benefits: {
239
+ DUMMY: {
240
+ options: {},
241
+ status: 'ENABLED',
242
+ value: false,
243
+ isEligible: false,
244
+ statusOriginID: ''
245
+ }
246
+ },
247
+ isDeleted: false,
248
+ mothersName: '',
249
+ externalDependentID: '',
250
+ externalDependentCode: '',
251
+ birthDate: '',
252
+ relationshipType: 'OTHER'
253
+ }
254
+ },
255
+ eligibilityOptions: {
256
+ externalBenefitID: 'NV101.1',
257
+ plan: {
258
+ name: 'CLUBE DE BENEFICIOS',
259
+ externalPorductID: 'NV101.1'
260
+ }
261
+ },
262
+ ctx: {},
263
+ hooksCtx: {},
264
+ log: {},
265
+ origin: 'test',
266
+ requiresPlanApproval: false,
267
+ planID: '',
268
+ planApprovalStatus: 'APPROVED',
269
+ createdAt: new Date('2025-05-29T15:05:10.431+0000'),
270
+ updatedAt: new Date('2025-05-29T20:30:03.720+0000')
271
+ } satisfies DeepRequired<z.infer<typeof GrantRevokeActionSchema>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@benup/bensdk",
3
- "version": "1.11.0",
3
+ "version": "1.11.2",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {