@alexisapp/leave-core 0.0.1-beta.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/README.md +260 -0
- package/dist/chunk-P5WZALLT.mjs +1633 -0
- package/dist/chunk-R7NHFDIU.mjs +53 -0
- package/dist/chunk-TUQKZ7GW.mjs +207 -0
- package/dist/chunk-VS74AXZ6.mjs +70 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.mjs +23 -0
- package/dist/domain/index.d.ts +2 -0
- package/dist/domain/index.mjs +0 -0
- package/dist/en-GB-TSTNTOGN.mjs +81 -0
- package/dist/forms/index.d.ts +2 -0
- package/dist/forms/index.mjs +0 -0
- package/dist/graphql-BI4OTV8N.d.ts +1814 -0
- package/dist/hooks/index.d.ts +50 -0
- package/dist/hooks/index.mjs +106 -0
- package/dist/i18n/index.d.ts +18 -0
- package/dist/i18n/index.mjs +16 -0
- package/dist/index.d.ts +133 -0
- package/dist/index.mjs +109 -0
- package/dist/leaveStatusUtils-C26heVdh.d.ts +11 -0
- package/dist/mutations/index.d.ts +2 -0
- package/dist/mutations/index.mjs +0 -0
- package/dist/queries/index.d.ts +489 -0
- package/dist/queries/index.mjs +15 -0
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/index.mjs +0 -0
- package/dist/utils/index.d.ts +40 -0
- package/dist/utils/index.mjs +53 -0
- package/package.json +94 -0
- package/src/client/createKyInstance.ts +34 -0
- package/src/client/execute.ts +153 -0
- package/src/client/index.ts +4 -0
- package/src/client/initializeClient.ts +48 -0
- package/src/client/resetClient.ts +10 -0
- package/src/client/types.ts +12 -0
- package/src/components/AsyncBoundary.tsx +29 -0
- package/src/components/index.ts +1 -0
- package/src/domain/index.ts +2 -0
- package/src/errors/AuthError.ts +12 -0
- package/src/errors/DomainError.ts +15 -0
- package/src/errors/GraphQLError.ts +16 -0
- package/src/errors/LeaveError.ts +13 -0
- package/src/errors/NetworkError.ts +12 -0
- package/src/errors/classifyError.ts +46 -0
- package/src/errors/errorMessages.ts +69 -0
- package/src/errors/index.ts +13 -0
- package/src/forms/index.ts +2 -0
- package/src/graphql/codegen-gateway.ts +26 -0
- package/src/graphql/codegen-hr-core.ts +31 -0
- package/src/graphql/generated-gateway/fragment-masking.ts +84 -0
- package/src/graphql/generated-gateway/gql.ts +140 -0
- package/src/graphql/generated-gateway/graphql.ts +10828 -0
- package/src/graphql/generated-gateway/index.ts +2 -0
- package/src/graphql/generated-hr-core/fragment-masking.ts +84 -0
- package/src/graphql/generated-hr-core/gql.ts +185 -0
- package/src/graphql/generated-hr-core/graphql.ts +19385 -0
- package/src/graphql/generated-hr-core/index.ts +2 -0
- package/src/graphql/index.ts +278 -0
- package/src/graphql/operations/gateway/leave-change/mutations.graphql +74 -0
- package/src/graphql/operations/gateway/leave-change/queries.graphql +51 -0
- package/src/graphql/operations/gateway/leave-policy-employee-reference/mutations.graphql +26 -0
- package/src/graphql/operations/gateway/leave-self-certified/mutations.graphql +45 -0
- package/src/graphql/operations/gateway/leave-self-certified/queries.graphql +80 -0
- package/src/graphql/operations/gateway/leave-type-code/mutations.graphql +25 -0
- package/src/graphql/operations/gateway/self-certified-policy/mutations.graphql +29 -0
- package/src/graphql/operations/gateway/self-certified-policy/queries.graphql +34 -0
- package/src/graphql/operations/gateway/time-bank/mutations.graphql +23 -0
- package/src/graphql/operations/gateway/time-bank/queries.graphql +5 -0
- package/src/graphql/operations/gateway/time-off-settings/mutations.graphql +19 -0
- package/src/graphql/operations/gateway/time-off-settings/queries.graphql +15 -0
- package/src/graphql/operations/gateway/user/queries.graphql +11 -0
- package/src/graphql/operations/hr-core/balance/mutations.graphql +34 -0
- package/src/graphql/operations/hr-core/balance/queries.graphql +21 -0
- package/src/graphql/operations/hr-core/employee/queries.graphql +27 -0
- package/src/graphql/operations/hr-core/employment/queries.graphql +40 -0
- package/src/graphql/operations/hr-core/file/mutations.graphql +15 -0
- package/src/graphql/operations/hr-core/group/queries.graphql +13 -0
- package/src/graphql/operations/hr-core/leave/mutations.graphql +68 -0
- package/src/graphql/operations/hr-core/leave/queries.graphql +150 -0
- package/src/graphql/operations/hr-core/leave-type/queries.graphql +33 -0
- package/src/graphql/operations/hr-core/member/queries.graphql +58 -0
- package/src/graphql/operations/hr-core/office/queries.graphql +26 -0
- package/src/graphql/operations/hr-core/policy/mutations.graphql +43 -0
- package/src/graphql/operations/hr-core/policy/queries.graphql +46 -0
- package/src/graphql/operations/hr-core/scope/mutations.graphql +19 -0
- package/src/graphql/operations/hr-core/team/queries.graphql +14 -0
- package/src/graphql/operations/hr-core/user/queries.graphql +37 -0
- package/src/graphql/operations/hr-core/work-calendar/queries.graphql +60 -0
- package/src/graphql/operations/hr-core/work-week/queries.graphql +139 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useBalance.ts +58 -0
- package/src/hooks/useCurrentEmployeeId.ts +15 -0
- package/src/hooks/useLeaveList.ts +91 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/instance.ts +52 -0
- package/src/i18n/locale.ts +23 -0
- package/src/i18n/translations/en-GB.json +67 -0
- package/src/index.ts +19 -0
- package/src/mutations/index.ts +2 -0
- package/src/queries/employeeQueryFactory.ts +97 -0
- package/src/queries/index.ts +5 -0
- package/src/queries/leaveQueryFactory.ts +171 -0
- package/src/queries/policyQueryFactory.ts +87 -0
- package/src/queries/settingsQueryFactory.ts +31 -0
- package/src/queries/userQueryFactory.ts +13 -0
- package/src/stores/index.ts +2 -0
- package/src/utils/__tests__/formatDateRangeUtils.test.ts +61 -0
- package/src/utils/__tests__/leaveStatusUtils.test.ts +27 -0
- package/src/utils/__tests__/splitLeaveSectionsUtils.test.ts +71 -0
- package/src/utils/formatDateRangeUtils.ts +71 -0
- package/src/utils/index.ts +8 -0
- package/src/utils/leaveStatusUtils.ts +39 -0
- package/src/utils/splitLeaveSectionsUtils.ts +46 -0
- package/src/utils/typeSafeUtils.ts +4 -0
|
@@ -0,0 +1,1633 @@
|
|
|
1
|
+
import {
|
|
2
|
+
execute
|
|
3
|
+
} from "./chunk-TUQKZ7GW.mjs";
|
|
4
|
+
|
|
5
|
+
// src/queries/leaveQueryFactory.ts
|
|
6
|
+
import { queryOptions } from "@tanstack/react-query";
|
|
7
|
+
|
|
8
|
+
// src/graphql/generated-gateway/graphql.ts
|
|
9
|
+
var TypedDocumentString = class extends String {
|
|
10
|
+
__apiType;
|
|
11
|
+
value;
|
|
12
|
+
__meta__;
|
|
13
|
+
constructor(value, __meta__) {
|
|
14
|
+
super(value);
|
|
15
|
+
this.value = value;
|
|
16
|
+
this.__meta__ = __meta__;
|
|
17
|
+
}
|
|
18
|
+
toString() {
|
|
19
|
+
return this.value;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var CreateLeaveChangeDocument = new TypedDocumentString(`
|
|
23
|
+
mutation CreateLeaveChange($input: CreateLeaveChangeInput!) {
|
|
24
|
+
leaveChangeCreate(input: $input) {
|
|
25
|
+
id
|
|
26
|
+
leaveIds
|
|
27
|
+
employeeId
|
|
28
|
+
companyId
|
|
29
|
+
leavePolicyId
|
|
30
|
+
status
|
|
31
|
+
type
|
|
32
|
+
requestNote
|
|
33
|
+
requestedChanges {
|
|
34
|
+
startDate
|
|
35
|
+
endDate
|
|
36
|
+
localStartDate
|
|
37
|
+
localEndDate
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`);
|
|
42
|
+
var UpdateLeaveChangeDocument = new TypedDocumentString(`
|
|
43
|
+
mutation UpdateLeaveChange($id: String!, $input: UpdateLeaveChangeInput!) {
|
|
44
|
+
leaveChangeUpdate(id: $id, input: $input) {
|
|
45
|
+
id
|
|
46
|
+
leaveIds
|
|
47
|
+
employeeId
|
|
48
|
+
companyId
|
|
49
|
+
leavePolicyId
|
|
50
|
+
status
|
|
51
|
+
type
|
|
52
|
+
approvalNote
|
|
53
|
+
requestNote
|
|
54
|
+
requestedChanges {
|
|
55
|
+
startDate
|
|
56
|
+
endDate
|
|
57
|
+
localStartDate
|
|
58
|
+
localEndDate
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`);
|
|
63
|
+
var CreateLeaveChangeUpdateDocument = new TypedDocumentString(`
|
|
64
|
+
mutation CreateLeaveChangeUpdate($input: CreateLeaveChangeUpdateInput!) {
|
|
65
|
+
leaveChangeCreateUpdate(input: $input) {
|
|
66
|
+
id
|
|
67
|
+
leaveIds
|
|
68
|
+
employeeId
|
|
69
|
+
companyId
|
|
70
|
+
leavePolicyId
|
|
71
|
+
status
|
|
72
|
+
type
|
|
73
|
+
requestNote
|
|
74
|
+
requestedChanges {
|
|
75
|
+
startDate
|
|
76
|
+
endDate
|
|
77
|
+
localStartDate
|
|
78
|
+
localEndDate
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
`);
|
|
83
|
+
var CreateLeaveChangeRevokeDocument = new TypedDocumentString(`
|
|
84
|
+
mutation CreateLeaveChangeRevoke($input: CreateLeaveChangeRevokeInput!) {
|
|
85
|
+
leaveChangeCreateRevoke(input: $input) {
|
|
86
|
+
id
|
|
87
|
+
leaveIds
|
|
88
|
+
employeeId
|
|
89
|
+
companyId
|
|
90
|
+
leavePolicyId
|
|
91
|
+
status
|
|
92
|
+
type
|
|
93
|
+
requestNote
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
`);
|
|
97
|
+
var DeleteLeaveChangeDocument = new TypedDocumentString(`
|
|
98
|
+
mutation DeleteLeaveChange($id: String!) {
|
|
99
|
+
leaveChangeDelete(id: $id)
|
|
100
|
+
}
|
|
101
|
+
`);
|
|
102
|
+
var GetLeaveChangeDocument = new TypedDocumentString(`
|
|
103
|
+
query GetLeaveChange($id: String!) {
|
|
104
|
+
leaveChange(id: $id) {
|
|
105
|
+
id
|
|
106
|
+
leaveIds
|
|
107
|
+
employeeId
|
|
108
|
+
companyId
|
|
109
|
+
leavePolicyId
|
|
110
|
+
status
|
|
111
|
+
type
|
|
112
|
+
approvalNote
|
|
113
|
+
requestNote
|
|
114
|
+
approverUserIds
|
|
115
|
+
requestedChanges {
|
|
116
|
+
startDate
|
|
117
|
+
endDate
|
|
118
|
+
localStartDate
|
|
119
|
+
localEndDate
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
`);
|
|
124
|
+
var ListLeaveChangesDocument = new TypedDocumentString(`
|
|
125
|
+
query ListLeaveChanges($filters: LeaveChangeFiltersInput, $limit: Float, $offset: Float, $sort: LeaveChangeSortInput) {
|
|
126
|
+
leaveChangeList(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {
|
|
127
|
+
data {
|
|
128
|
+
id
|
|
129
|
+
leaveIds
|
|
130
|
+
employeeId
|
|
131
|
+
companyId
|
|
132
|
+
leavePolicyId
|
|
133
|
+
status
|
|
134
|
+
type
|
|
135
|
+
approvalNote
|
|
136
|
+
requestNote
|
|
137
|
+
approverUserIds
|
|
138
|
+
requestedChanges {
|
|
139
|
+
startDate
|
|
140
|
+
endDate
|
|
141
|
+
localStartDate
|
|
142
|
+
localEndDate
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
count
|
|
146
|
+
total
|
|
147
|
+
offset
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
`);
|
|
151
|
+
var CreateLeavePolicyEmployeeReferenceDocument = new TypedDocumentString(`
|
|
152
|
+
mutation CreateLeavePolicyEmployeeReference($input: CreateLeavePolicyEmployeeReferenceRequest!) {
|
|
153
|
+
leavePolicyEmployeeReferenceCreate(input: $input) {
|
|
154
|
+
id
|
|
155
|
+
parentId
|
|
156
|
+
referenceId
|
|
157
|
+
effectiveFrom
|
|
158
|
+
namespace {
|
|
159
|
+
leaveTypeId
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
`);
|
|
164
|
+
var UpdateLeavePolicyEmployeeReferenceDocument = new TypedDocumentString(`
|
|
165
|
+
mutation UpdateLeavePolicyEmployeeReference($id: String!, $input: UpdateLeavePolicyEmployeeReferenceRequest!) {
|
|
166
|
+
leavePolicyEmployeeReferenceUpdate(id: $id, input: $input) {
|
|
167
|
+
id
|
|
168
|
+
parentId
|
|
169
|
+
referenceId
|
|
170
|
+
effectiveFrom
|
|
171
|
+
namespace {
|
|
172
|
+
leaveTypeId
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
`);
|
|
177
|
+
var CreateLeaveSelfCertifiedDocument = new TypedDocumentString(`
|
|
178
|
+
mutation CreateLeaveSelfCertified($input: CreateLeaveSelfCertifiedInput!) {
|
|
179
|
+
leaveSelfCertifiedCreate(input: $input) {
|
|
180
|
+
id
|
|
181
|
+
employeeId
|
|
182
|
+
companyId
|
|
183
|
+
startDate
|
|
184
|
+
endDate
|
|
185
|
+
localStartDate
|
|
186
|
+
localEndDate
|
|
187
|
+
description
|
|
188
|
+
status
|
|
189
|
+
policyId
|
|
190
|
+
typeId
|
|
191
|
+
timezone
|
|
192
|
+
timezoneOffset
|
|
193
|
+
workingMinutes
|
|
194
|
+
created
|
|
195
|
+
updated
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
`);
|
|
199
|
+
var UpdateLeaveSelfCertifiedDocument = new TypedDocumentString(`
|
|
200
|
+
mutation UpdateLeaveSelfCertified($id: String!, $input: UpdateLeaveSelfCertifiedInput!) {
|
|
201
|
+
leaveSelfCertifiedUpdate(id: $id, input: $input) {
|
|
202
|
+
id
|
|
203
|
+
employeeId
|
|
204
|
+
companyId
|
|
205
|
+
startDate
|
|
206
|
+
endDate
|
|
207
|
+
localStartDate
|
|
208
|
+
localEndDate
|
|
209
|
+
description
|
|
210
|
+
status
|
|
211
|
+
policyId
|
|
212
|
+
typeId
|
|
213
|
+
timezone
|
|
214
|
+
timezoneOffset
|
|
215
|
+
workingMinutes
|
|
216
|
+
created
|
|
217
|
+
updated
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
`);
|
|
221
|
+
var DeleteLeaveSelfCertifiedDocument = new TypedDocumentString(`
|
|
222
|
+
mutation DeleteLeaveSelfCertified($id: String!) {
|
|
223
|
+
leaveSelfCertifiedDelete(id: $id)
|
|
224
|
+
}
|
|
225
|
+
`);
|
|
226
|
+
var GetLeaveSelfCertifiedDocument = new TypedDocumentString(`
|
|
227
|
+
query GetLeaveSelfCertified($id: String!) {
|
|
228
|
+
leaveSelfCertified(id: $id) {
|
|
229
|
+
id
|
|
230
|
+
employeeId
|
|
231
|
+
companyId
|
|
232
|
+
startDate
|
|
233
|
+
endDate
|
|
234
|
+
localStartDate
|
|
235
|
+
localEndDate
|
|
236
|
+
description
|
|
237
|
+
status
|
|
238
|
+
policyId
|
|
239
|
+
typeId
|
|
240
|
+
timezone
|
|
241
|
+
timezoneOffset
|
|
242
|
+
workingMinutes
|
|
243
|
+
created
|
|
244
|
+
updated
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
`);
|
|
248
|
+
var ListLeaveSelfCertifiedDocument = new TypedDocumentString(`
|
|
249
|
+
query ListLeaveSelfCertified($filters: LeaveSelfCertifiedFiltersInput, $limit: Float, $offset: Float) {
|
|
250
|
+
leaveSelfCertifiedList(filters: $filters, limit: $limit, offset: $offset) {
|
|
251
|
+
data {
|
|
252
|
+
id
|
|
253
|
+
employeeId
|
|
254
|
+
companyId
|
|
255
|
+
startDate
|
|
256
|
+
endDate
|
|
257
|
+
localStartDate
|
|
258
|
+
localEndDate
|
|
259
|
+
description
|
|
260
|
+
status
|
|
261
|
+
policyId
|
|
262
|
+
typeId
|
|
263
|
+
timezone
|
|
264
|
+
timezoneOffset
|
|
265
|
+
workingMinutes
|
|
266
|
+
created
|
|
267
|
+
updated
|
|
268
|
+
}
|
|
269
|
+
count
|
|
270
|
+
total
|
|
271
|
+
offset
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
`);
|
|
275
|
+
var ListLeaveSelfCertifiedVisibleDocument = new TypedDocumentString(`
|
|
276
|
+
query ListLeaveSelfCertifiedVisible($filters: LeaveSelfCertifiedFiltersInput, $limit: Float, $offset: Float) {
|
|
277
|
+
leaveSelfCertifiedListVisible(filters: $filters, limit: $limit, offset: $offset) {
|
|
278
|
+
data {
|
|
279
|
+
id
|
|
280
|
+
employeeId
|
|
281
|
+
companyId
|
|
282
|
+
startDate
|
|
283
|
+
endDate
|
|
284
|
+
localStartDate
|
|
285
|
+
localEndDate
|
|
286
|
+
description
|
|
287
|
+
status
|
|
288
|
+
policyId
|
|
289
|
+
typeId
|
|
290
|
+
timezone
|
|
291
|
+
timezoneOffset
|
|
292
|
+
workingMinutes
|
|
293
|
+
created
|
|
294
|
+
updated
|
|
295
|
+
}
|
|
296
|
+
count
|
|
297
|
+
total
|
|
298
|
+
offset
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
`);
|
|
302
|
+
var CreateLeaveTypeCodeDocument = new TypedDocumentString(`
|
|
303
|
+
mutation CreateLeaveTypeCode($input: CreateLeaveTypeCodeInput!) {
|
|
304
|
+
leaveTypeCodeCreate(input: $input) {
|
|
305
|
+
id
|
|
306
|
+
code
|
|
307
|
+
companyId
|
|
308
|
+
leaveTypeId
|
|
309
|
+
created
|
|
310
|
+
createdById
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
`);
|
|
314
|
+
var UpdateLeaveTypeCodeDocument = new TypedDocumentString(`
|
|
315
|
+
mutation UpdateLeaveTypeCode($id: String!, $input: UpdateLeaveTypeCodeInput!) {
|
|
316
|
+
leaveTypeCodeUpdate(id: $id, input: $input) {
|
|
317
|
+
id
|
|
318
|
+
code
|
|
319
|
+
companyId
|
|
320
|
+
leaveTypeId
|
|
321
|
+
created
|
|
322
|
+
createdById
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
`);
|
|
326
|
+
var DeleteLeaveTypeCodeDocument = new TypedDocumentString(`
|
|
327
|
+
mutation DeleteLeaveTypeCode($id: String!) {
|
|
328
|
+
leaveTypeCodeDelete(id: $id)
|
|
329
|
+
}
|
|
330
|
+
`);
|
|
331
|
+
var CreateSelfCertifiedPolicyDocument = new TypedDocumentString(`
|
|
332
|
+
mutation CreateSelfCertifiedPolicy($input: CreateLeaveSelfCertifiedPolicyInput!) {
|
|
333
|
+
leaveSelfCertifiedPolicyCreate(input: $input) {
|
|
334
|
+
id
|
|
335
|
+
leavePolicyId
|
|
336
|
+
allowance {
|
|
337
|
+
periodInMonths
|
|
338
|
+
maxAmountOfDaysPerRequest
|
|
339
|
+
maxAmountOfRequestsInPeriod
|
|
340
|
+
strict
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
`);
|
|
345
|
+
var UpdateSelfCertifiedPolicyDocument = new TypedDocumentString(`
|
|
346
|
+
mutation UpdateSelfCertifiedPolicy($id: String!, $input: UpdateLeaveSelfCertifiedPolicyInput!) {
|
|
347
|
+
leaveSelfCertifiedPolicyUpdate(id: $id, input: $input) {
|
|
348
|
+
id
|
|
349
|
+
leavePolicyId
|
|
350
|
+
allowance {
|
|
351
|
+
periodInMonths
|
|
352
|
+
maxAmountOfDaysPerRequest
|
|
353
|
+
maxAmountOfRequestsInPeriod
|
|
354
|
+
strict
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
`);
|
|
359
|
+
var DeleteSelfCertifiedPolicyDocument = new TypedDocumentString(`
|
|
360
|
+
mutation DeleteSelfCertifiedPolicy($id: String!) {
|
|
361
|
+
leaveSelfCertifiedPolicyDelete(id: $id)
|
|
362
|
+
}
|
|
363
|
+
`);
|
|
364
|
+
var GetLeaveSelfCertifiedPolicyDocument = new TypedDocumentString(`
|
|
365
|
+
query GetLeaveSelfCertifiedPolicy($id: String!) {
|
|
366
|
+
leaveSelfCertifiedPolicy(id: $id) {
|
|
367
|
+
id
|
|
368
|
+
leavePolicyId
|
|
369
|
+
allowance {
|
|
370
|
+
periodInMonths
|
|
371
|
+
maxAmountOfDaysPerRequest
|
|
372
|
+
maxAmountOfRequestsInPeriod
|
|
373
|
+
strict
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
`);
|
|
378
|
+
var ListSelfCertifiedPoliciesDocument = new TypedDocumentString(`
|
|
379
|
+
query ListSelfCertifiedPolicies($filters: LeaveSelfCertifiedPolicyFiltersInput, $limit: Float, $offset: Float) {
|
|
380
|
+
leaveSelfCertifiedPolicyList(filters: $filters, limit: $limit, offset: $offset) {
|
|
381
|
+
data {
|
|
382
|
+
id
|
|
383
|
+
leavePolicyId
|
|
384
|
+
allowance {
|
|
385
|
+
periodInMonths
|
|
386
|
+
maxAmountOfDaysPerRequest
|
|
387
|
+
maxAmountOfRequestsInPeriod
|
|
388
|
+
strict
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
count
|
|
392
|
+
total
|
|
393
|
+
offset
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
`);
|
|
397
|
+
var TimeBankAdjustmentDocument = new TypedDocumentString(`
|
|
398
|
+
mutation TimeBankAdjustment($input: TimeBankAdjustmentInput!) {
|
|
399
|
+
timeBankAdjustment(input: $input) {
|
|
400
|
+
id
|
|
401
|
+
employeeId
|
|
402
|
+
companyId
|
|
403
|
+
minutes
|
|
404
|
+
comment
|
|
405
|
+
type
|
|
406
|
+
created
|
|
407
|
+
updated
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
`);
|
|
411
|
+
var TimeBankAdjustmentDeleteDocument = new TypedDocumentString(`
|
|
412
|
+
mutation TimeBankAdjustmentDelete($id: String!) {
|
|
413
|
+
timeBankAdjustmentDelete(id: $id)
|
|
414
|
+
}
|
|
415
|
+
`);
|
|
416
|
+
var TimeBankExportDocument = new TypedDocumentString(`
|
|
417
|
+
mutation TimeBankExport($employeeIds: [String!]!) {
|
|
418
|
+
timeBankExport(employeeIds: $employeeIds) {
|
|
419
|
+
exportFileId
|
|
420
|
+
exportFileUrl
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
`);
|
|
424
|
+
var GetTimeBankBalanceDocument = new TypedDocumentString(`
|
|
425
|
+
query GetTimeBankBalance($employeeId: String!) {
|
|
426
|
+
timeBankBalance(employeeId: $employeeId) {
|
|
427
|
+
minutes
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
`);
|
|
431
|
+
var CreateTimeOffSettingsDocument = new TypedDocumentString(`
|
|
432
|
+
mutation CreateTimeOffSettings($input: CreateTimeOffSettingsInput!) {
|
|
433
|
+
timeOffSettingsCreate(input: $input) {
|
|
434
|
+
id
|
|
435
|
+
key
|
|
436
|
+
value
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
`);
|
|
440
|
+
var UpdateTimeOffSettingsDocument = new TypedDocumentString(`
|
|
441
|
+
mutation UpdateTimeOffSettings($key: String!, $input: UpdateTimeOffSettingsInput!) {
|
|
442
|
+
timeOffSettingsUpdate(key: $key, input: $input) {
|
|
443
|
+
id
|
|
444
|
+
key
|
|
445
|
+
value
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
`);
|
|
449
|
+
var DeleteTimeOffSettingsDocument = new TypedDocumentString(`
|
|
450
|
+
mutation DeleteTimeOffSettings($id: String!) {
|
|
451
|
+
timeOffSettingsDelete(id: $id)
|
|
452
|
+
}
|
|
453
|
+
`);
|
|
454
|
+
var GetTimeOffSettingsDocument = new TypedDocumentString(`
|
|
455
|
+
query GetTimeOffSettings($id: String!) {
|
|
456
|
+
timeOffSettingsGet(id: $id) {
|
|
457
|
+
id
|
|
458
|
+
key
|
|
459
|
+
value
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
`);
|
|
463
|
+
var GetTimeOffSettingsByKeyDocument = new TypedDocumentString(`
|
|
464
|
+
query GetTimeOffSettingsByKey($key: String!) {
|
|
465
|
+
timeOffSettingsGetByKey(key: $key) {
|
|
466
|
+
id
|
|
467
|
+
key
|
|
468
|
+
value
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
`);
|
|
472
|
+
var MeDocument = new TypedDocumentString(`
|
|
473
|
+
query Me {
|
|
474
|
+
me {
|
|
475
|
+
id
|
|
476
|
+
membership {
|
|
477
|
+
id
|
|
478
|
+
employeeId
|
|
479
|
+
companyId
|
|
480
|
+
role
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
`);
|
|
485
|
+
|
|
486
|
+
// src/graphql/generated-hr-core/graphql.ts
|
|
487
|
+
var TypedDocumentString2 = class extends String {
|
|
488
|
+
__apiType;
|
|
489
|
+
value;
|
|
490
|
+
__meta__;
|
|
491
|
+
constructor(value, __meta__) {
|
|
492
|
+
super(value);
|
|
493
|
+
this.value = value;
|
|
494
|
+
this.__meta__ = __meta__;
|
|
495
|
+
}
|
|
496
|
+
toString() {
|
|
497
|
+
return this.value;
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
var CreateVacationAdjustmentDocument = new TypedDocumentString2(`
|
|
501
|
+
mutation CreateVacationAdjustment($employeeVacationAdjustment: EmployeeVacationAdjustmentCreateInput!) {
|
|
502
|
+
employeeVacationAdjustment {
|
|
503
|
+
create(employeeVacationAdjustment: $employeeVacationAdjustment) {
|
|
504
|
+
id
|
|
505
|
+
employeeId
|
|
506
|
+
companyId
|
|
507
|
+
adjustment
|
|
508
|
+
comment
|
|
509
|
+
date
|
|
510
|
+
created
|
|
511
|
+
updated
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
`);
|
|
516
|
+
var UpdateVacationAdjustmentDocument = new TypedDocumentString2(`
|
|
517
|
+
mutation UpdateVacationAdjustment($id: ID!, $employeeVacationAdjustment: EmployeeVacationAdjustmentUpdateInput!) {
|
|
518
|
+
employeeVacationAdjustment(id: $id) {
|
|
519
|
+
update(employeeVacationAdjustment: $employeeVacationAdjustment) {
|
|
520
|
+
id
|
|
521
|
+
employeeId
|
|
522
|
+
companyId
|
|
523
|
+
adjustment
|
|
524
|
+
comment
|
|
525
|
+
date
|
|
526
|
+
created
|
|
527
|
+
updated
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
`);
|
|
532
|
+
var ListVacationAdjustmentsDocument = new TypedDocumentString2(`
|
|
533
|
+
query ListVacationAdjustments($filters: EmployeeVacationAdjustmentFilterInput, $limit: Int, $skip: Int, $sort: EmployeeVacationAdjustmentSortInput) {
|
|
534
|
+
employeeVacationAdjustments(
|
|
535
|
+
filters: $filters
|
|
536
|
+
limit: $limit
|
|
537
|
+
skip: $skip
|
|
538
|
+
sort: $sort
|
|
539
|
+
) {
|
|
540
|
+
rows {
|
|
541
|
+
id
|
|
542
|
+
employeeId
|
|
543
|
+
companyId
|
|
544
|
+
adjustment
|
|
545
|
+
comment
|
|
546
|
+
date
|
|
547
|
+
created
|
|
548
|
+
updated
|
|
549
|
+
}
|
|
550
|
+
count
|
|
551
|
+
next
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
`);
|
|
555
|
+
var GetEmployeeDocument = new TypedDocumentString2(`
|
|
556
|
+
query GetEmployee($id: ID!) {
|
|
557
|
+
employee(id: $id) {
|
|
558
|
+
id
|
|
559
|
+
companyId
|
|
560
|
+
status
|
|
561
|
+
workEmail
|
|
562
|
+
user {
|
|
563
|
+
id
|
|
564
|
+
firstName
|
|
565
|
+
lastName
|
|
566
|
+
displayName
|
|
567
|
+
email
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
`);
|
|
572
|
+
var ListEmployeesDocument = new TypedDocumentString2(`
|
|
573
|
+
query ListEmployees($filters: EmployeeFilterInput!) {
|
|
574
|
+
employees(filters: $filters) {
|
|
575
|
+
rows {
|
|
576
|
+
id
|
|
577
|
+
user {
|
|
578
|
+
id
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
count
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
`);
|
|
585
|
+
var GetEmploymentDocument = new TypedDocumentString2(`
|
|
586
|
+
query GetEmployment($id: ID!) {
|
|
587
|
+
employment(id: $id) {
|
|
588
|
+
id
|
|
589
|
+
employeeId
|
|
590
|
+
companyId
|
|
591
|
+
typeId
|
|
592
|
+
country
|
|
593
|
+
startDate
|
|
594
|
+
endDate
|
|
595
|
+
rate
|
|
596
|
+
terminated
|
|
597
|
+
publicHolidayCalendarId
|
|
598
|
+
created
|
|
599
|
+
updated
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
`);
|
|
603
|
+
var ListEmploymentsDocument = new TypedDocumentString2(`
|
|
604
|
+
query ListEmployments($filters: EmploymentFilter, $limit: Int, $skip: Int, $sort: EmploymentSortInput) {
|
|
605
|
+
employments(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {
|
|
606
|
+
rows {
|
|
607
|
+
id
|
|
608
|
+
employeeId
|
|
609
|
+
companyId
|
|
610
|
+
typeId
|
|
611
|
+
country
|
|
612
|
+
startDate
|
|
613
|
+
endDate
|
|
614
|
+
rate
|
|
615
|
+
terminated
|
|
616
|
+
publicHolidayCalendarId
|
|
617
|
+
}
|
|
618
|
+
count
|
|
619
|
+
next
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
`);
|
|
623
|
+
var UploadFileDocument = new TypedDocumentString2(`
|
|
624
|
+
mutation UploadFile($file: Upload!, $type: FileType!, $parentId: String, $parentType: FileParentType) {
|
|
625
|
+
upload(file: $file, type: $type, parentId: $parentId, parentType: $parentType) {
|
|
626
|
+
id
|
|
627
|
+
fileName
|
|
628
|
+
extension
|
|
629
|
+
mimeType
|
|
630
|
+
url
|
|
631
|
+
type
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
`);
|
|
635
|
+
var ListGroupsDocument = new TypedDocumentString2(`
|
|
636
|
+
query ListGroups($companyId: ID!) {
|
|
637
|
+
company(id: $companyId) {
|
|
638
|
+
groups {
|
|
639
|
+
id
|
|
640
|
+
name
|
|
641
|
+
description
|
|
642
|
+
costCenterId
|
|
643
|
+
effectiveCostCenterId
|
|
644
|
+
parentId
|
|
645
|
+
leadUserId
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
`);
|
|
650
|
+
var ListLeaveTypesDocument = new TypedDocumentString2(`
|
|
651
|
+
query ListLeaveTypes($filters: FilterGroupInput!, $limit: Int, $skip: Int, $sortBy: [SortByInput]) {
|
|
652
|
+
leaveTypeList(filters: $filters, limit: $limit, skip: $skip, sortBy: $sortBy) {
|
|
653
|
+
rows {
|
|
654
|
+
id
|
|
655
|
+
name
|
|
656
|
+
displayName
|
|
657
|
+
kind
|
|
658
|
+
deductible
|
|
659
|
+
paid
|
|
660
|
+
disabled
|
|
661
|
+
archived
|
|
662
|
+
minimumDuration
|
|
663
|
+
allowHalfDays
|
|
664
|
+
allowChild
|
|
665
|
+
}
|
|
666
|
+
count
|
|
667
|
+
next
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
`);
|
|
671
|
+
var GetEmployeeLeaveTypesDocument = new TypedDocumentString2(`
|
|
672
|
+
query GetEmployeeLeaveTypes($employeeId: ID!) {
|
|
673
|
+
employeeLeaveTypeList(employeeId: $employeeId) {
|
|
674
|
+
id
|
|
675
|
+
name
|
|
676
|
+
displayName
|
|
677
|
+
kind
|
|
678
|
+
deductible
|
|
679
|
+
paid
|
|
680
|
+
disabled
|
|
681
|
+
minimumDuration
|
|
682
|
+
allowHalfDays
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
`);
|
|
686
|
+
var CreateLeaveDocument = new TypedDocumentString2(`
|
|
687
|
+
mutation CreateLeave($id: ID!, $leave: LeaveCreateInput!) {
|
|
688
|
+
leave(id: $id) {
|
|
689
|
+
create(leave: $leave) {
|
|
690
|
+
id
|
|
691
|
+
status
|
|
692
|
+
duration
|
|
693
|
+
startDate
|
|
694
|
+
endDate
|
|
695
|
+
localStartDate
|
|
696
|
+
localEndDate
|
|
697
|
+
description
|
|
698
|
+
timezone
|
|
699
|
+
workingMinutes
|
|
700
|
+
type {
|
|
701
|
+
id
|
|
702
|
+
name
|
|
703
|
+
kind
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
`);
|
|
709
|
+
var UpdateLeaveDocument = new TypedDocumentString2(`
|
|
710
|
+
mutation UpdateLeave($id: ID!, $leave: LeaveUpdateInput!) {
|
|
711
|
+
leave(id: $id) {
|
|
712
|
+
update(leave: $leave) {
|
|
713
|
+
id
|
|
714
|
+
status
|
|
715
|
+
duration
|
|
716
|
+
startDate
|
|
717
|
+
endDate
|
|
718
|
+
localStartDate
|
|
719
|
+
localEndDate
|
|
720
|
+
description
|
|
721
|
+
timezone
|
|
722
|
+
workingMinutes
|
|
723
|
+
type {
|
|
724
|
+
id
|
|
725
|
+
name
|
|
726
|
+
kind
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
`);
|
|
732
|
+
var RemoveLeaveDocument = new TypedDocumentString2(`
|
|
733
|
+
mutation RemoveLeave($id: ID!) {
|
|
734
|
+
leave(id: $id) {
|
|
735
|
+
remove {
|
|
736
|
+
id
|
|
737
|
+
status
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
`);
|
|
742
|
+
var AddLeaveAttachmentDocument = new TypedDocumentString2(`
|
|
743
|
+
mutation AddLeaveAttachment($id: ID!, $fileId: ID!) {
|
|
744
|
+
leave(id: $id) {
|
|
745
|
+
addAttachment(fileId: $fileId) {
|
|
746
|
+
id
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
`);
|
|
751
|
+
var RemoveLeaveAttachmentDocument = new TypedDocumentString2(`
|
|
752
|
+
mutation RemoveLeaveAttachment($id: ID!, $fileId: ID!) {
|
|
753
|
+
leave(id: $id) {
|
|
754
|
+
removeAttachment(fileId: $fileId) {
|
|
755
|
+
id
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
`);
|
|
760
|
+
var GetLeaveDocument = new TypedDocumentString2(`
|
|
761
|
+
query GetLeave($id: ID!) {
|
|
762
|
+
leave(id: $id) {
|
|
763
|
+
id
|
|
764
|
+
status
|
|
765
|
+
duration
|
|
766
|
+
startDate
|
|
767
|
+
endDate
|
|
768
|
+
localStartDate
|
|
769
|
+
localEndDate
|
|
770
|
+
description
|
|
771
|
+
timezone
|
|
772
|
+
timezoneOffset
|
|
773
|
+
workingMinutes
|
|
774
|
+
type {
|
|
775
|
+
id
|
|
776
|
+
name
|
|
777
|
+
kind
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
`);
|
|
782
|
+
var ListLeaveDocument = new TypedDocumentString2(`
|
|
783
|
+
query ListLeave($filters: LeaveFilterInput, $limit: Int, $skip: Int, $sort: LeaveSortInput) {
|
|
784
|
+
listLeave(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {
|
|
785
|
+
rows {
|
|
786
|
+
id
|
|
787
|
+
status
|
|
788
|
+
duration
|
|
789
|
+
startDate
|
|
790
|
+
endDate
|
|
791
|
+
localStartDate
|
|
792
|
+
localEndDate
|
|
793
|
+
description
|
|
794
|
+
timezone
|
|
795
|
+
workingMinutes
|
|
796
|
+
type {
|
|
797
|
+
id
|
|
798
|
+
name
|
|
799
|
+
kind
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
count
|
|
803
|
+
next
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
`);
|
|
807
|
+
var ListLeaveVisibleDocument = new TypedDocumentString2(`
|
|
808
|
+
query ListLeaveVisible {
|
|
809
|
+
leaveListVisible {
|
|
810
|
+
id
|
|
811
|
+
status
|
|
812
|
+
duration
|
|
813
|
+
startDate
|
|
814
|
+
endDate
|
|
815
|
+
localStartDate
|
|
816
|
+
localEndDate
|
|
817
|
+
description
|
|
818
|
+
timezone
|
|
819
|
+
workingMinutes
|
|
820
|
+
type {
|
|
821
|
+
id
|
|
822
|
+
name
|
|
823
|
+
kind
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
`);
|
|
828
|
+
var GetEmployeeVacationBalanceDocument = new TypedDocumentString2(`
|
|
829
|
+
query GetEmployeeVacationBalance($id: ID!) {
|
|
830
|
+
employeeVacationBalance(id: $id) {
|
|
831
|
+
id
|
|
832
|
+
employeeId
|
|
833
|
+
leaveTypeId
|
|
834
|
+
leavePolicyId
|
|
835
|
+
earnedAmount
|
|
836
|
+
adjustmentAmount
|
|
837
|
+
spentAmount
|
|
838
|
+
balanceAmount
|
|
839
|
+
balanceAmountPlusUnpaidLeft
|
|
840
|
+
balanceAmountUnpaidLeft
|
|
841
|
+
savedDaysLeft
|
|
842
|
+
vacationYearStart
|
|
843
|
+
vacationYearEnd
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
`);
|
|
847
|
+
var ListEmployeeVacationBalanceDocument = new TypedDocumentString2(`
|
|
848
|
+
query ListEmployeeVacationBalance($filters: EmployeeVacationBalanceFilterInput, $limit: Int, $skip: Int) {
|
|
849
|
+
employeeVacationBalanceList(filters: $filters, limit: $limit, skip: $skip) {
|
|
850
|
+
rows {
|
|
851
|
+
id
|
|
852
|
+
employeeId
|
|
853
|
+
leaveTypeId
|
|
854
|
+
leavePolicyId
|
|
855
|
+
earnedAmount
|
|
856
|
+
adjustmentAmount
|
|
857
|
+
spentAmount
|
|
858
|
+
balanceAmount
|
|
859
|
+
balanceAmountPlusUnpaidLeft
|
|
860
|
+
balanceAmountUnpaidLeft
|
|
861
|
+
savedDaysLeft
|
|
862
|
+
vacationYearStart
|
|
863
|
+
vacationYearEnd
|
|
864
|
+
}
|
|
865
|
+
count
|
|
866
|
+
next
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
`);
|
|
870
|
+
var GetLeaveUsageDocument = new TypedDocumentString2(`
|
|
871
|
+
query GetLeaveUsage($employeeId: ID!, $typeIds: [ID]!, $from: DateTime!, $to: DateTime!, $childId: ID) {
|
|
872
|
+
leaveUsage(
|
|
873
|
+
employeeId: $employeeId
|
|
874
|
+
typeIds: $typeIds
|
|
875
|
+
from: $from
|
|
876
|
+
to: $to
|
|
877
|
+
childId: $childId
|
|
878
|
+
) {
|
|
879
|
+
typeId
|
|
880
|
+
days
|
|
881
|
+
occurences
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
`);
|
|
885
|
+
var GetLeaveOverlapsDocument = new TypedDocumentString2(`
|
|
886
|
+
query GetLeaveOverlaps($leaveId: ObjectId!) {
|
|
887
|
+
leaveOverlaps(leaveId: $leaveId) {
|
|
888
|
+
id
|
|
889
|
+
status
|
|
890
|
+
duration
|
|
891
|
+
startDate
|
|
892
|
+
endDate
|
|
893
|
+
localStartDate
|
|
894
|
+
localEndDate
|
|
895
|
+
workingMinutes
|
|
896
|
+
type {
|
|
897
|
+
id
|
|
898
|
+
name
|
|
899
|
+
kind
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
`);
|
|
904
|
+
var GetLeaveApproversDocument = new TypedDocumentString2(`
|
|
905
|
+
query GetLeaveApprovers($companyId: ObjectId!, $employeeId: ObjectId!, $leaveTypeId: ObjectId!) {
|
|
906
|
+
leaveApprovers(
|
|
907
|
+
companyId: $companyId
|
|
908
|
+
employeeId: $employeeId
|
|
909
|
+
leaveTypeId: $leaveTypeId
|
|
910
|
+
) {
|
|
911
|
+
id
|
|
912
|
+
firstName
|
|
913
|
+
lastName
|
|
914
|
+
displayName
|
|
915
|
+
email
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
`);
|
|
919
|
+
var ActiveMembershipListDocument = new TypedDocumentString2(`
|
|
920
|
+
query ActiveMembershipList($companyId: ObjectId!) {
|
|
921
|
+
basicMemberships(companyId: $companyId) {
|
|
922
|
+
id
|
|
923
|
+
userId
|
|
924
|
+
companyId
|
|
925
|
+
employeeId
|
|
926
|
+
role
|
|
927
|
+
active
|
|
928
|
+
isOffboarded
|
|
929
|
+
inviteSent
|
|
930
|
+
user {
|
|
931
|
+
id
|
|
932
|
+
email
|
|
933
|
+
firstName
|
|
934
|
+
lastName
|
|
935
|
+
created
|
|
936
|
+
avatarUrl
|
|
937
|
+
}
|
|
938
|
+
employee {
|
|
939
|
+
id
|
|
940
|
+
status
|
|
941
|
+
managerUserId
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
`);
|
|
946
|
+
var ExtendedMembershipListDocument = new TypedDocumentString2(`
|
|
947
|
+
query ExtendedMembershipList($companyId: ObjectId!) {
|
|
948
|
+
basicMemberships(companyId: $companyId) {
|
|
949
|
+
id
|
|
950
|
+
userId
|
|
951
|
+
companyId
|
|
952
|
+
employeeId
|
|
953
|
+
role
|
|
954
|
+
active
|
|
955
|
+
isOffboarded
|
|
956
|
+
inviteSent
|
|
957
|
+
user {
|
|
958
|
+
id
|
|
959
|
+
email
|
|
960
|
+
firstName
|
|
961
|
+
lastName
|
|
962
|
+
created
|
|
963
|
+
avatarUrl
|
|
964
|
+
}
|
|
965
|
+
employee {
|
|
966
|
+
id
|
|
967
|
+
status
|
|
968
|
+
managerUserId
|
|
969
|
+
groupId
|
|
970
|
+
employmentTypeId
|
|
971
|
+
organizationId
|
|
972
|
+
officeId
|
|
973
|
+
hireDate
|
|
974
|
+
titleId
|
|
975
|
+
title
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
`);
|
|
980
|
+
var ListOfficesDocument = new TypedDocumentString2(`
|
|
981
|
+
query ListOffices($filters: OfficeFilterInput, $limit: Int, $skip: Int, $sort: OfficeSortInput) {
|
|
982
|
+
offices(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {
|
|
983
|
+
rows {
|
|
984
|
+
id
|
|
985
|
+
name
|
|
986
|
+
email
|
|
987
|
+
phone
|
|
988
|
+
timezone
|
|
989
|
+
publicHolidayCalendarId
|
|
990
|
+
visitingAddress {
|
|
991
|
+
name
|
|
992
|
+
street
|
|
993
|
+
postalCode
|
|
994
|
+
city
|
|
995
|
+
country
|
|
996
|
+
}
|
|
997
|
+
postAddress {
|
|
998
|
+
name
|
|
999
|
+
street
|
|
1000
|
+
postalCode
|
|
1001
|
+
city
|
|
1002
|
+
country
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
`);
|
|
1008
|
+
var CreateLeavePolicyDocument = new TypedDocumentString2(`
|
|
1009
|
+
mutation CreateLeavePolicy($leavePolicy: LeavePolicyCreateInput!) {
|
|
1010
|
+
leavePolicy {
|
|
1011
|
+
create(leavePolicy: $leavePolicy) {
|
|
1012
|
+
id
|
|
1013
|
+
companyId
|
|
1014
|
+
leaveTypeId
|
|
1015
|
+
name
|
|
1016
|
+
description
|
|
1017
|
+
requireApproval
|
|
1018
|
+
allowAttachments
|
|
1019
|
+
minimumDuration
|
|
1020
|
+
allowEmployeeRevoke
|
|
1021
|
+
allowEmployeeEdit
|
|
1022
|
+
changeRequestGracePeriod
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
`);
|
|
1027
|
+
var UpdateLeavePolicyDocument = new TypedDocumentString2(`
|
|
1028
|
+
mutation UpdateLeavePolicy($id: ID!, $leavePolicy: LeavePolicyUpdateInput!) {
|
|
1029
|
+
leavePolicy(id: $id) {
|
|
1030
|
+
update(leavePolicy: $leavePolicy) {
|
|
1031
|
+
id
|
|
1032
|
+
companyId
|
|
1033
|
+
leaveTypeId
|
|
1034
|
+
name
|
|
1035
|
+
description
|
|
1036
|
+
requireApproval
|
|
1037
|
+
allowAttachments
|
|
1038
|
+
minimumDuration
|
|
1039
|
+
allowEmployeeRevoke
|
|
1040
|
+
allowEmployeeEdit
|
|
1041
|
+
changeRequestGracePeriod
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
`);
|
|
1046
|
+
var RemoveLeavePolicyDocument = new TypedDocumentString2(`
|
|
1047
|
+
mutation RemoveLeavePolicy($id: ID!) {
|
|
1048
|
+
leavePolicy(id: $id) {
|
|
1049
|
+
remove {
|
|
1050
|
+
id
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
`);
|
|
1055
|
+
var GetLeavePolicyDocument = new TypedDocumentString2(`
|
|
1056
|
+
query GetLeavePolicy($id: ID!) {
|
|
1057
|
+
leavePolicy(id: $id) {
|
|
1058
|
+
id
|
|
1059
|
+
companyId
|
|
1060
|
+
leaveTypeId
|
|
1061
|
+
name
|
|
1062
|
+
description
|
|
1063
|
+
requireApproval
|
|
1064
|
+
allowAttachments
|
|
1065
|
+
minimumDuration
|
|
1066
|
+
allowEmployeeRevoke
|
|
1067
|
+
allowEmployeeEdit
|
|
1068
|
+
changeRequestGracePeriod
|
|
1069
|
+
allowance {
|
|
1070
|
+
includeUnusedDaysInNewBalance
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
`);
|
|
1075
|
+
var ListLeavePoliciesDocument = new TypedDocumentString2(`
|
|
1076
|
+
query ListLeavePolicies($filters: LeavePolicyFilterInput, $limit: Int, $skip: Int, $sort: LeavePolicySortInput) {
|
|
1077
|
+
leavePolicies(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {
|
|
1078
|
+
rows {
|
|
1079
|
+
id
|
|
1080
|
+
companyId
|
|
1081
|
+
leaveTypeId
|
|
1082
|
+
name
|
|
1083
|
+
description
|
|
1084
|
+
requireApproval
|
|
1085
|
+
allowAttachments
|
|
1086
|
+
minimumDuration
|
|
1087
|
+
allowEmployeeRevoke
|
|
1088
|
+
allowEmployeeEdit
|
|
1089
|
+
changeRequestGracePeriod
|
|
1090
|
+
allowance {
|
|
1091
|
+
includeUnusedDaysInNewBalance
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
count
|
|
1095
|
+
next
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
`);
|
|
1099
|
+
var UpdateScopeDocument = new TypedDocumentString2(`
|
|
1100
|
+
mutation UpdateScope($id: String!, $scope: ScopeInput!) {
|
|
1101
|
+
scope(id: $id) {
|
|
1102
|
+
update(scope: $scope) {
|
|
1103
|
+
id
|
|
1104
|
+
companyId
|
|
1105
|
+
parentId
|
|
1106
|
+
parentType
|
|
1107
|
+
entireCompany
|
|
1108
|
+
employeeScope
|
|
1109
|
+
employeeIds
|
|
1110
|
+
employmentTypeScope
|
|
1111
|
+
excludeEmployeeScope
|
|
1112
|
+
groupScope
|
|
1113
|
+
officeScope
|
|
1114
|
+
organizationScope
|
|
1115
|
+
teamScope
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
`);
|
|
1120
|
+
var ListTeamsDocument = new TypedDocumentString2(`
|
|
1121
|
+
query ListTeams($filters: FilterGroupInput, $limit: Int, $skip: Int, $sortBy: [SortByInput]) {
|
|
1122
|
+
teamList(filters: $filters, limit: $limit, skip: $skip, sortBy: $sortBy) {
|
|
1123
|
+
rows {
|
|
1124
|
+
id
|
|
1125
|
+
companyId
|
|
1126
|
+
name
|
|
1127
|
+
description
|
|
1128
|
+
bgColor
|
|
1129
|
+
fgColor
|
|
1130
|
+
employeeIdList
|
|
1131
|
+
leadUserId
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
`);
|
|
1136
|
+
var GetCurrentUserDocument = new TypedDocumentString2(`
|
|
1137
|
+
query GetCurrentUser {
|
|
1138
|
+
me {
|
|
1139
|
+
id
|
|
1140
|
+
email
|
|
1141
|
+
firstName
|
|
1142
|
+
lastName
|
|
1143
|
+
locale
|
|
1144
|
+
phone
|
|
1145
|
+
homeAddress {
|
|
1146
|
+
country
|
|
1147
|
+
}
|
|
1148
|
+
bankAccount {
|
|
1149
|
+
country
|
|
1150
|
+
}
|
|
1151
|
+
avatarUrl
|
|
1152
|
+
created
|
|
1153
|
+
membership {
|
|
1154
|
+
id
|
|
1155
|
+
userId
|
|
1156
|
+
companyId
|
|
1157
|
+
employeeId
|
|
1158
|
+
role
|
|
1159
|
+
active
|
|
1160
|
+
inviteSent
|
|
1161
|
+
featureAccessList
|
|
1162
|
+
company {
|
|
1163
|
+
id
|
|
1164
|
+
name
|
|
1165
|
+
disableRemoteWork
|
|
1166
|
+
}
|
|
1167
|
+
employee {
|
|
1168
|
+
id
|
|
1169
|
+
status
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
`);
|
|
1175
|
+
var ListCompanyHolidaysDocument = new TypedDocumentString2(`
|
|
1176
|
+
query ListCompanyHolidays($filters: CompanyHolidayFilterInput, $limit: Int, $skip: Int, $sort: CompanyHolidaySortInput) {
|
|
1177
|
+
companyHolidays(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {
|
|
1178
|
+
rows {
|
|
1179
|
+
id
|
|
1180
|
+
name
|
|
1181
|
+
startDate
|
|
1182
|
+
endDate
|
|
1183
|
+
created
|
|
1184
|
+
updated
|
|
1185
|
+
}
|
|
1186
|
+
count
|
|
1187
|
+
next
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
`);
|
|
1191
|
+
var ListPublicHolidaysDocument = new TypedDocumentString2(`
|
|
1192
|
+
query ListPublicHolidays($filters: PublicHolidayFilterInput, $limit: Int, $skip: Int, $sort: PublicHolidaySortInput) {
|
|
1193
|
+
publicHolidays(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {
|
|
1194
|
+
rows {
|
|
1195
|
+
id
|
|
1196
|
+
name
|
|
1197
|
+
label
|
|
1198
|
+
date
|
|
1199
|
+
country
|
|
1200
|
+
public
|
|
1201
|
+
calendarId
|
|
1202
|
+
}
|
|
1203
|
+
count
|
|
1204
|
+
next
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
`);
|
|
1208
|
+
var ListRestrictedDatesDocument = new TypedDocumentString2(`
|
|
1209
|
+
query ListRestrictedDates($filters: RestrictedDateFilterInput, $limit: Int, $skip: Int, $sort: RestrictedDateSortInput) {
|
|
1210
|
+
restrictedDates(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {
|
|
1211
|
+
rows {
|
|
1212
|
+
id
|
|
1213
|
+
name
|
|
1214
|
+
startDate
|
|
1215
|
+
endDate
|
|
1216
|
+
created
|
|
1217
|
+
updated
|
|
1218
|
+
}
|
|
1219
|
+
count
|
|
1220
|
+
next
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
`);
|
|
1224
|
+
var GetWorkWeekDocument = new TypedDocumentString2(`
|
|
1225
|
+
query GetWorkWeek($id: ID!) {
|
|
1226
|
+
workWeek(id: $id) {
|
|
1227
|
+
id
|
|
1228
|
+
companyId
|
|
1229
|
+
employeeId
|
|
1230
|
+
officeId
|
|
1231
|
+
effectiveFrom
|
|
1232
|
+
effectiveTo
|
|
1233
|
+
duration
|
|
1234
|
+
timezone
|
|
1235
|
+
monday {
|
|
1236
|
+
working
|
|
1237
|
+
duration
|
|
1238
|
+
shifts {
|
|
1239
|
+
startHour
|
|
1240
|
+
startMinute
|
|
1241
|
+
endHour
|
|
1242
|
+
endMinute
|
|
1243
|
+
duration
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
tuesday {
|
|
1247
|
+
working
|
|
1248
|
+
duration
|
|
1249
|
+
shifts {
|
|
1250
|
+
startHour
|
|
1251
|
+
startMinute
|
|
1252
|
+
endHour
|
|
1253
|
+
endMinute
|
|
1254
|
+
duration
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
wednesday {
|
|
1258
|
+
working
|
|
1259
|
+
duration
|
|
1260
|
+
shifts {
|
|
1261
|
+
startHour
|
|
1262
|
+
startMinute
|
|
1263
|
+
endHour
|
|
1264
|
+
endMinute
|
|
1265
|
+
duration
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
thursday {
|
|
1269
|
+
working
|
|
1270
|
+
duration
|
|
1271
|
+
shifts {
|
|
1272
|
+
startHour
|
|
1273
|
+
startMinute
|
|
1274
|
+
endHour
|
|
1275
|
+
endMinute
|
|
1276
|
+
duration
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
friday {
|
|
1280
|
+
working
|
|
1281
|
+
duration
|
|
1282
|
+
shifts {
|
|
1283
|
+
startHour
|
|
1284
|
+
startMinute
|
|
1285
|
+
endHour
|
|
1286
|
+
endMinute
|
|
1287
|
+
duration
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
saturday {
|
|
1291
|
+
working
|
|
1292
|
+
duration
|
|
1293
|
+
shifts {
|
|
1294
|
+
startHour
|
|
1295
|
+
startMinute
|
|
1296
|
+
endHour
|
|
1297
|
+
endMinute
|
|
1298
|
+
duration
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
sunday {
|
|
1302
|
+
working
|
|
1303
|
+
duration
|
|
1304
|
+
shifts {
|
|
1305
|
+
startHour
|
|
1306
|
+
startMinute
|
|
1307
|
+
endHour
|
|
1308
|
+
endMinute
|
|
1309
|
+
duration
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
`);
|
|
1315
|
+
var ListWorkWeeksDocument = new TypedDocumentString2(`
|
|
1316
|
+
query ListWorkWeeks($filters: WorkWeekFilterInput, $limit: Int, $skip: Int, $sort: WorkWeekSortInput) {
|
|
1317
|
+
workWeeks(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {
|
|
1318
|
+
rows {
|
|
1319
|
+
id
|
|
1320
|
+
companyId
|
|
1321
|
+
employeeId
|
|
1322
|
+
officeId
|
|
1323
|
+
effectiveFrom
|
|
1324
|
+
effectiveTo
|
|
1325
|
+
duration
|
|
1326
|
+
timezone
|
|
1327
|
+
monday {
|
|
1328
|
+
working
|
|
1329
|
+
duration
|
|
1330
|
+
}
|
|
1331
|
+
tuesday {
|
|
1332
|
+
working
|
|
1333
|
+
duration
|
|
1334
|
+
}
|
|
1335
|
+
wednesday {
|
|
1336
|
+
working
|
|
1337
|
+
duration
|
|
1338
|
+
}
|
|
1339
|
+
thursday {
|
|
1340
|
+
working
|
|
1341
|
+
duration
|
|
1342
|
+
}
|
|
1343
|
+
friday {
|
|
1344
|
+
working
|
|
1345
|
+
duration
|
|
1346
|
+
}
|
|
1347
|
+
saturday {
|
|
1348
|
+
working
|
|
1349
|
+
duration
|
|
1350
|
+
}
|
|
1351
|
+
sunday {
|
|
1352
|
+
working
|
|
1353
|
+
duration
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
count
|
|
1357
|
+
next
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
`);
|
|
1361
|
+
|
|
1362
|
+
// src/queries/leaveQueryFactory.ts
|
|
1363
|
+
var leaveQueries = {
|
|
1364
|
+
all: ["leave"],
|
|
1365
|
+
lists: () => [...leaveQueries.all, "list"],
|
|
1366
|
+
list: (variables) => queryOptions({
|
|
1367
|
+
queryKey: [...leaveQueries.lists(), variables],
|
|
1368
|
+
queryFn: ({ signal }) => execute.hrCore({ query: ListLeaveDocument, variables, signal })
|
|
1369
|
+
}),
|
|
1370
|
+
listVisible: () => queryOptions({
|
|
1371
|
+
queryKey: [...leaveQueries.lists(), "visible"],
|
|
1372
|
+
queryFn: ({ signal }) => execute.hrCore({ query: ListLeaveVisibleDocument, variables: {}, signal })
|
|
1373
|
+
}),
|
|
1374
|
+
details: () => [...leaveQueries.all, "detail"],
|
|
1375
|
+
detail: (id) => queryOptions({
|
|
1376
|
+
queryKey: [...leaveQueries.details(), id],
|
|
1377
|
+
queryFn: ({ signal }) => execute.hrCore({ query: GetLeaveDocument, variables: { id }, signal })
|
|
1378
|
+
}),
|
|
1379
|
+
balances: () => [...leaveQueries.all, "balance"],
|
|
1380
|
+
balance: (employeeId) => queryOptions({
|
|
1381
|
+
queryKey: [...leaveQueries.balances(), employeeId],
|
|
1382
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1383
|
+
query: GetEmployeeVacationBalanceDocument,
|
|
1384
|
+
variables: { id: employeeId },
|
|
1385
|
+
signal
|
|
1386
|
+
})
|
|
1387
|
+
}),
|
|
1388
|
+
balanceList: (variables) => queryOptions({
|
|
1389
|
+
queryKey: [...leaveQueries.balances(), "list", variables],
|
|
1390
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1391
|
+
query: ListEmployeeVacationBalanceDocument,
|
|
1392
|
+
variables,
|
|
1393
|
+
signal
|
|
1394
|
+
})
|
|
1395
|
+
}),
|
|
1396
|
+
usages: () => [...leaveQueries.all, "usage"],
|
|
1397
|
+
usage: (variables) => queryOptions({
|
|
1398
|
+
queryKey: [...leaveQueries.usages(), variables],
|
|
1399
|
+
queryFn: ({ signal }) => execute.hrCore({ query: GetLeaveUsageDocument, variables, signal })
|
|
1400
|
+
}),
|
|
1401
|
+
overlaps: () => [...leaveQueries.all, "overlap"],
|
|
1402
|
+
overlap: (leaveId) => queryOptions({
|
|
1403
|
+
queryKey: [...leaveQueries.overlaps(), leaveId],
|
|
1404
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1405
|
+
query: GetLeaveOverlapsDocument,
|
|
1406
|
+
variables: { leaveId },
|
|
1407
|
+
signal
|
|
1408
|
+
})
|
|
1409
|
+
}),
|
|
1410
|
+
approvers: () => [...leaveQueries.all, "approver"],
|
|
1411
|
+
approver: (variables) => queryOptions({
|
|
1412
|
+
queryKey: [...leaveQueries.approvers(), variables],
|
|
1413
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1414
|
+
query: GetLeaveApproversDocument,
|
|
1415
|
+
variables,
|
|
1416
|
+
signal
|
|
1417
|
+
})
|
|
1418
|
+
}),
|
|
1419
|
+
selfCertified: () => [...leaveQueries.all, "self-certified"],
|
|
1420
|
+
selfCertifiedList: (variables) => queryOptions({
|
|
1421
|
+
queryKey: [...leaveQueries.selfCertified(), "list", variables],
|
|
1422
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1423
|
+
query: ListLeaveSelfCertifiedDocument,
|
|
1424
|
+
variables,
|
|
1425
|
+
signal
|
|
1426
|
+
})
|
|
1427
|
+
}),
|
|
1428
|
+
selfCertifiedListVisible: (variables) => queryOptions({
|
|
1429
|
+
queryKey: [...leaveQueries.selfCertified(), "listVisible", variables],
|
|
1430
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1431
|
+
query: ListLeaveSelfCertifiedVisibleDocument,
|
|
1432
|
+
variables,
|
|
1433
|
+
signal
|
|
1434
|
+
})
|
|
1435
|
+
}),
|
|
1436
|
+
selfCertifiedDetail: (id) => queryOptions({
|
|
1437
|
+
queryKey: [...leaveQueries.selfCertified(), "detail", id],
|
|
1438
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1439
|
+
query: GetLeaveSelfCertifiedDocument,
|
|
1440
|
+
variables: { id },
|
|
1441
|
+
signal
|
|
1442
|
+
})
|
|
1443
|
+
}),
|
|
1444
|
+
approvals: () => [...leaveQueries.all, "approval"],
|
|
1445
|
+
approvalQueue: (variables) => queryOptions({
|
|
1446
|
+
queryKey: [...leaveQueries.approvals(), "list", variables],
|
|
1447
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1448
|
+
query: ListLeaveChangesDocument,
|
|
1449
|
+
variables,
|
|
1450
|
+
signal
|
|
1451
|
+
})
|
|
1452
|
+
}),
|
|
1453
|
+
approvalDetail: (id) => queryOptions({
|
|
1454
|
+
queryKey: [...leaveQueries.approvals(), "detail", id],
|
|
1455
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1456
|
+
query: GetLeaveChangeDocument,
|
|
1457
|
+
variables: { id },
|
|
1458
|
+
signal
|
|
1459
|
+
})
|
|
1460
|
+
}),
|
|
1461
|
+
timeBanks: () => [...leaveQueries.all, "time-bank"],
|
|
1462
|
+
timeBank: (employeeId) => queryOptions({
|
|
1463
|
+
queryKey: [...leaveQueries.timeBanks(), employeeId],
|
|
1464
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1465
|
+
query: GetTimeBankBalanceDocument,
|
|
1466
|
+
variables: { employeeId },
|
|
1467
|
+
signal
|
|
1468
|
+
})
|
|
1469
|
+
})
|
|
1470
|
+
};
|
|
1471
|
+
|
|
1472
|
+
// src/queries/policyQueryFactory.ts
|
|
1473
|
+
import { queryOptions as queryOptions2 } from "@tanstack/react-query";
|
|
1474
|
+
var policyQueries = {
|
|
1475
|
+
all: ["policy"],
|
|
1476
|
+
lists: () => [...policyQueries.all, "list"],
|
|
1477
|
+
list: (variables) => queryOptions2({
|
|
1478
|
+
queryKey: [...policyQueries.lists(), variables],
|
|
1479
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1480
|
+
query: ListLeavePoliciesDocument,
|
|
1481
|
+
variables,
|
|
1482
|
+
signal
|
|
1483
|
+
})
|
|
1484
|
+
}),
|
|
1485
|
+
details: () => [...policyQueries.all, "detail"],
|
|
1486
|
+
detail: (id) => queryOptions2({
|
|
1487
|
+
queryKey: [...policyQueries.details(), id],
|
|
1488
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1489
|
+
query: GetLeavePolicyDocument,
|
|
1490
|
+
variables: { id },
|
|
1491
|
+
signal
|
|
1492
|
+
})
|
|
1493
|
+
}),
|
|
1494
|
+
selfCertified: () => [...policyQueries.all, "self-certified"],
|
|
1495
|
+
selfCertifiedList: (variables) => queryOptions2({
|
|
1496
|
+
queryKey: [...policyQueries.selfCertified(), "list", variables],
|
|
1497
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1498
|
+
query: ListSelfCertifiedPoliciesDocument,
|
|
1499
|
+
variables,
|
|
1500
|
+
signal
|
|
1501
|
+
})
|
|
1502
|
+
}),
|
|
1503
|
+
selfCertifiedDetail: (id) => queryOptions2({
|
|
1504
|
+
queryKey: [...policyQueries.selfCertified(), "detail", id],
|
|
1505
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1506
|
+
query: GetLeaveSelfCertifiedPolicyDocument,
|
|
1507
|
+
variables: { id },
|
|
1508
|
+
signal
|
|
1509
|
+
})
|
|
1510
|
+
}),
|
|
1511
|
+
leaveTypes: () => [...policyQueries.all, "leave-type"],
|
|
1512
|
+
leaveTypeList: (variables) => queryOptions2({
|
|
1513
|
+
queryKey: [...policyQueries.leaveTypes(), "list", variables],
|
|
1514
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1515
|
+
query: ListLeaveTypesDocument,
|
|
1516
|
+
variables,
|
|
1517
|
+
signal
|
|
1518
|
+
})
|
|
1519
|
+
}),
|
|
1520
|
+
employeeLeaveTypes: (employeeId) => queryOptions2({
|
|
1521
|
+
queryKey: [...policyQueries.leaveTypes(), "employee", employeeId],
|
|
1522
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1523
|
+
query: GetEmployeeLeaveTypesDocument,
|
|
1524
|
+
variables: { employeeId },
|
|
1525
|
+
signal
|
|
1526
|
+
})
|
|
1527
|
+
})
|
|
1528
|
+
};
|
|
1529
|
+
|
|
1530
|
+
// src/queries/employeeQueryFactory.ts
|
|
1531
|
+
import { queryOptions as queryOptions3 } from "@tanstack/react-query";
|
|
1532
|
+
var employeeQueries = {
|
|
1533
|
+
all: ["employee"],
|
|
1534
|
+
details: () => [...employeeQueries.all, "detail"],
|
|
1535
|
+
detail: (id) => queryOptions3({
|
|
1536
|
+
queryKey: [...employeeQueries.details(), id],
|
|
1537
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1538
|
+
query: GetEmployeeDocument,
|
|
1539
|
+
variables: { id },
|
|
1540
|
+
signal
|
|
1541
|
+
})
|
|
1542
|
+
}),
|
|
1543
|
+
employments: () => [...employeeQueries.all, "employment"],
|
|
1544
|
+
employment: (id) => queryOptions3({
|
|
1545
|
+
queryKey: [...employeeQueries.employments(), id],
|
|
1546
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1547
|
+
query: GetEmploymentDocument,
|
|
1548
|
+
variables: { id },
|
|
1549
|
+
signal
|
|
1550
|
+
})
|
|
1551
|
+
}),
|
|
1552
|
+
employmentList: (variables) => queryOptions3({
|
|
1553
|
+
queryKey: [...employeeQueries.employments(), "list", variables],
|
|
1554
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1555
|
+
query: ListEmploymentsDocument,
|
|
1556
|
+
variables,
|
|
1557
|
+
signal
|
|
1558
|
+
})
|
|
1559
|
+
}),
|
|
1560
|
+
workWeeks: () => [...employeeQueries.all, "work-week"],
|
|
1561
|
+
workWeek: (variables) => queryOptions3({
|
|
1562
|
+
queryKey: [...employeeQueries.workWeeks(), variables],
|
|
1563
|
+
queryFn: ({ signal }) => execute.hrCore({ query: GetWorkWeekDocument, variables, signal })
|
|
1564
|
+
}),
|
|
1565
|
+
holidays: () => [...employeeQueries.all, "holiday"],
|
|
1566
|
+
companyHolidays: (variables) => queryOptions3({
|
|
1567
|
+
queryKey: [...employeeQueries.holidays(), "company", variables],
|
|
1568
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1569
|
+
query: ListCompanyHolidaysDocument,
|
|
1570
|
+
variables,
|
|
1571
|
+
signal
|
|
1572
|
+
})
|
|
1573
|
+
}),
|
|
1574
|
+
publicHolidays: (variables) => queryOptions3({
|
|
1575
|
+
queryKey: [...employeeQueries.holidays(), "public", variables],
|
|
1576
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1577
|
+
query: ListPublicHolidaysDocument,
|
|
1578
|
+
variables,
|
|
1579
|
+
signal
|
|
1580
|
+
})
|
|
1581
|
+
}),
|
|
1582
|
+
restrictedDates: () => [...employeeQueries.all, "restricted-date"],
|
|
1583
|
+
restrictedDateList: (variables) => queryOptions3({
|
|
1584
|
+
queryKey: [...employeeQueries.restrictedDates(), variables],
|
|
1585
|
+
queryFn: ({ signal }) => execute.hrCore({
|
|
1586
|
+
query: ListRestrictedDatesDocument,
|
|
1587
|
+
variables,
|
|
1588
|
+
signal
|
|
1589
|
+
})
|
|
1590
|
+
})
|
|
1591
|
+
};
|
|
1592
|
+
|
|
1593
|
+
// src/queries/settingsQueryFactory.ts
|
|
1594
|
+
import { queryOptions as queryOptions4 } from "@tanstack/react-query";
|
|
1595
|
+
var settingsQueries = {
|
|
1596
|
+
all: ["settings"],
|
|
1597
|
+
details: () => [...settingsQueries.all, "detail"],
|
|
1598
|
+
detail: (id) => queryOptions4({
|
|
1599
|
+
queryKey: [...settingsQueries.details(), id],
|
|
1600
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1601
|
+
query: GetTimeOffSettingsDocument,
|
|
1602
|
+
variables: { id },
|
|
1603
|
+
signal
|
|
1604
|
+
})
|
|
1605
|
+
}),
|
|
1606
|
+
keys: () => [...settingsQueries.all, "key"],
|
|
1607
|
+
byKey: (key) => queryOptions4({
|
|
1608
|
+
queryKey: [...settingsQueries.keys(), key],
|
|
1609
|
+
queryFn: ({ signal }) => execute.gateway({
|
|
1610
|
+
query: GetTimeOffSettingsByKeyDocument,
|
|
1611
|
+
variables: { key },
|
|
1612
|
+
signal
|
|
1613
|
+
})
|
|
1614
|
+
})
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
// src/queries/userQueryFactory.ts
|
|
1618
|
+
import { queryOptions as queryOptions5 } from "@tanstack/react-query";
|
|
1619
|
+
var userQueries = {
|
|
1620
|
+
all: ["user"],
|
|
1621
|
+
me: () => queryOptions5({
|
|
1622
|
+
queryKey: [...userQueries.all, "me"],
|
|
1623
|
+
queryFn: ({ signal }) => execute.gateway({ query: MeDocument, variables: {}, signal })
|
|
1624
|
+
})
|
|
1625
|
+
};
|
|
1626
|
+
|
|
1627
|
+
export {
|
|
1628
|
+
leaveQueries,
|
|
1629
|
+
policyQueries,
|
|
1630
|
+
employeeQueries,
|
|
1631
|
+
settingsQueries,
|
|
1632
|
+
userQueries
|
|
1633
|
+
};
|