@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,84 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { ResultOf, DocumentTypeDecoration } from '@graphql-typed-document-node/core';
|
|
3
|
+
import { Incremental, TypedDocumentString } from './graphql';
|
|
4
|
+
|
|
5
|
+
export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> =
|
|
6
|
+
TDocumentType extends DocumentTypeDecoration<infer TType, any>
|
|
7
|
+
? [TType] extends [{ ' $fragmentName'?: infer TKey }]
|
|
8
|
+
? TKey extends string
|
|
9
|
+
? { ' $fragmentRefs'?: { [key in TKey]: TType } }
|
|
10
|
+
: never
|
|
11
|
+
: never
|
|
12
|
+
: never;
|
|
13
|
+
|
|
14
|
+
// return non-nullable if `fragmentType` is non-nullable
|
|
15
|
+
export function useFragment<TType>(
|
|
16
|
+
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
17
|
+
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>
|
|
18
|
+
): TType;
|
|
19
|
+
// return nullable if `fragmentType` is undefined
|
|
20
|
+
export function useFragment<TType>(
|
|
21
|
+
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
22
|
+
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined
|
|
23
|
+
): TType | undefined;
|
|
24
|
+
// return nullable if `fragmentType` is nullable
|
|
25
|
+
export function useFragment<TType>(
|
|
26
|
+
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
27
|
+
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null
|
|
28
|
+
): TType | null;
|
|
29
|
+
// return nullable if `fragmentType` is nullable or undefined
|
|
30
|
+
export function useFragment<TType>(
|
|
31
|
+
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
32
|
+
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined
|
|
33
|
+
): TType | null | undefined;
|
|
34
|
+
// return array of non-nullable if `fragmentType` is array of non-nullable
|
|
35
|
+
export function useFragment<TType>(
|
|
36
|
+
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
37
|
+
fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>
|
|
38
|
+
): Array<TType>;
|
|
39
|
+
// return array of nullable if `fragmentType` is array of nullable
|
|
40
|
+
export function useFragment<TType>(
|
|
41
|
+
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
42
|
+
fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined
|
|
43
|
+
): Array<TType> | null | undefined;
|
|
44
|
+
// return readonly array of non-nullable if `fragmentType` is array of non-nullable
|
|
45
|
+
export function useFragment<TType>(
|
|
46
|
+
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
47
|
+
fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>
|
|
48
|
+
): ReadonlyArray<TType>;
|
|
49
|
+
// return readonly array of nullable if `fragmentType` is array of nullable
|
|
50
|
+
export function useFragment<TType>(
|
|
51
|
+
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
52
|
+
fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined
|
|
53
|
+
): ReadonlyArray<TType> | null | undefined;
|
|
54
|
+
export function useFragment<TType>(
|
|
55
|
+
_documentNode: DocumentTypeDecoration<TType, any>,
|
|
56
|
+
fragmentType:
|
|
57
|
+
| FragmentType<DocumentTypeDecoration<TType, any>>
|
|
58
|
+
| Array<FragmentType<DocumentTypeDecoration<TType, any>>>
|
|
59
|
+
| ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>
|
|
60
|
+
| null
|
|
61
|
+
| undefined
|
|
62
|
+
): TType | Array<TType> | ReadonlyArray<TType> | null | undefined {
|
|
63
|
+
return fragmentType as any;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function makeFragmentData<
|
|
67
|
+
F extends DocumentTypeDecoration<any, any>,
|
|
68
|
+
FT extends ResultOf<F>,
|
|
69
|
+
>(data: FT, _fragment: F): FragmentType<F> {
|
|
70
|
+
return data as FragmentType<F>;
|
|
71
|
+
}
|
|
72
|
+
export function isFragmentReady<TQuery, TFrag>(
|
|
73
|
+
queryNode: TypedDocumentString<TQuery, any>,
|
|
74
|
+
fragmentNode: TypedDocumentString<TFrag, any>,
|
|
75
|
+
data: FragmentType<TypedDocumentString<Incremental<TFrag>, any>> | null | undefined
|
|
76
|
+
): data is FragmentType<typeof fragmentNode> {
|
|
77
|
+
const deferredFields = queryNode.__meta__?.deferredFields as Record<string, (keyof TFrag)[]>;
|
|
78
|
+
const fragName = fragmentNode.__meta__?.fragmentName as string | undefined;
|
|
79
|
+
|
|
80
|
+
if (!deferredFields || !fragName) return true;
|
|
81
|
+
|
|
82
|
+
const fields = deferredFields[fragName] ?? [];
|
|
83
|
+
return fields.length > 0 && fields.every((field) => data && field in data);
|
|
84
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import * as types from './graphql';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Map of all GraphQL operations in the project.
|
|
6
|
+
*
|
|
7
|
+
* This map has several performance disadvantages:
|
|
8
|
+
* 1. It is not tree-shakeable, so it will include all operations in the project.
|
|
9
|
+
* 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
|
|
10
|
+
* 3. It does not support dead code elimination, so it will add unused operations.
|
|
11
|
+
*
|
|
12
|
+
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
13
|
+
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
|
|
14
|
+
*/
|
|
15
|
+
type Documents = {
|
|
16
|
+
'mutation CreateVacationAdjustment($employeeVacationAdjustment: EmployeeVacationAdjustmentCreateInput!) {\n employeeVacationAdjustment {\n create(employeeVacationAdjustment: $employeeVacationAdjustment) {\n id\n employeeId\n companyId\n adjustment\n comment\n date\n created\n updated\n }\n }\n}\n\nmutation UpdateVacationAdjustment($id: ID!, $employeeVacationAdjustment: EmployeeVacationAdjustmentUpdateInput!) {\n employeeVacationAdjustment(id: $id) {\n update(employeeVacationAdjustment: $employeeVacationAdjustment) {\n id\n employeeId\n companyId\n adjustment\n comment\n date\n created\n updated\n }\n }\n}': typeof types.CreateVacationAdjustmentDocument;
|
|
17
|
+
'query ListVacationAdjustments($filters: EmployeeVacationAdjustmentFilterInput, $limit: Int, $skip: Int, $sort: EmployeeVacationAdjustmentSortInput) {\n employeeVacationAdjustments(\n filters: $filters\n limit: $limit\n skip: $skip\n sort: $sort\n ) {\n rows {\n id\n employeeId\n companyId\n adjustment\n comment\n date\n created\n updated\n }\n count\n next\n }\n}': typeof types.ListVacationAdjustmentsDocument;
|
|
18
|
+
'query GetEmployee($id: ID!) {\n employee(id: $id) {\n id\n companyId\n status\n workEmail\n user {\n id\n firstName\n lastName\n displayName\n email\n }\n }\n}\n\nquery ListEmployees($filters: EmployeeFilterInput!) {\n employees(filters: $filters) {\n rows {\n id\n user {\n id\n }\n }\n count\n }\n}': typeof types.GetEmployeeDocument;
|
|
19
|
+
'query GetEmployment($id: ID!) {\n employment(id: $id) {\n id\n employeeId\n companyId\n typeId\n country\n startDate\n endDate\n rate\n terminated\n publicHolidayCalendarId\n created\n updated\n }\n}\n\nquery ListEmployments($filters: EmploymentFilter, $limit: Int, $skip: Int, $sort: EmploymentSortInput) {\n employments(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n employeeId\n companyId\n typeId\n country\n startDate\n endDate\n rate\n terminated\n publicHolidayCalendarId\n }\n count\n next\n }\n}': typeof types.GetEmploymentDocument;
|
|
20
|
+
'mutation UploadFile($file: Upload!, $type: FileType!, $parentId: String, $parentType: FileParentType) {\n upload(file: $file, type: $type, parentId: $parentId, parentType: $parentType) {\n id\n fileName\n extension\n mimeType\n url\n type\n }\n}': typeof types.UploadFileDocument;
|
|
21
|
+
'query ListGroups($companyId: ID!) {\n company(id: $companyId) {\n groups {\n id\n name\n description\n costCenterId\n effectiveCostCenterId\n parentId\n leadUserId\n }\n }\n}': typeof types.ListGroupsDocument;
|
|
22
|
+
'query ListLeaveTypes($filters: FilterGroupInput!, $limit: Int, $skip: Int, $sortBy: [SortByInput]) {\n leaveTypeList(filters: $filters, limit: $limit, skip: $skip, sortBy: $sortBy) {\n rows {\n id\n name\n displayName\n kind\n deductible\n paid\n disabled\n archived\n minimumDuration\n allowHalfDays\n allowChild\n }\n count\n next\n }\n}\n\nquery GetEmployeeLeaveTypes($employeeId: ID!) {\n employeeLeaveTypeList(employeeId: $employeeId) {\n id\n name\n displayName\n kind\n deductible\n paid\n disabled\n minimumDuration\n allowHalfDays\n }\n}': typeof types.ListLeaveTypesDocument;
|
|
23
|
+
'mutation CreateLeave($id: ID!, $leave: LeaveCreateInput!) {\n leave(id: $id) {\n create(leave: $leave) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n }\n}\n\nmutation UpdateLeave($id: ID!, $leave: LeaveUpdateInput!) {\n leave(id: $id) {\n update(leave: $leave) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n }\n}\n\nmutation RemoveLeave($id: ID!) {\n leave(id: $id) {\n remove {\n id\n status\n }\n }\n}\n\nmutation AddLeaveAttachment($id: ID!, $fileId: ID!) {\n leave(id: $id) {\n addAttachment(fileId: $fileId) {\n id\n }\n }\n}\n\nmutation RemoveLeaveAttachment($id: ID!, $fileId: ID!) {\n leave(id: $id) {\n removeAttachment(fileId: $fileId) {\n id\n }\n }\n}': typeof types.CreateLeaveDocument;
|
|
24
|
+
'query GetLeave($id: ID!) {\n leave(id: $id) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n timezoneOffset\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n}\n\nquery ListLeave($filters: LeaveFilterInput, $limit: Int, $skip: Int, $sort: LeaveSortInput) {\n listLeave(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n count\n next\n }\n}\n\nquery ListLeaveVisible {\n leaveListVisible {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n}\n\nquery GetEmployeeVacationBalance($id: ID!) {\n employeeVacationBalance(id: $id) {\n id\n employeeId\n leaveTypeId\n leavePolicyId\n earnedAmount\n adjustmentAmount\n spentAmount\n balanceAmount\n balanceAmountPlusUnpaidLeft\n balanceAmountUnpaidLeft\n savedDaysLeft\n vacationYearStart\n vacationYearEnd\n }\n}\n\nquery ListEmployeeVacationBalance($filters: EmployeeVacationBalanceFilterInput, $limit: Int, $skip: Int) {\n employeeVacationBalanceList(filters: $filters, limit: $limit, skip: $skip) {\n rows {\n id\n employeeId\n leaveTypeId\n leavePolicyId\n earnedAmount\n adjustmentAmount\n spentAmount\n balanceAmount\n balanceAmountPlusUnpaidLeft\n balanceAmountUnpaidLeft\n savedDaysLeft\n vacationYearStart\n vacationYearEnd\n }\n count\n next\n }\n}\n\nquery GetLeaveUsage($employeeId: ID!, $typeIds: [ID]!, $from: DateTime!, $to: DateTime!, $childId: ID) {\n leaveUsage(\n employeeId: $employeeId\n typeIds: $typeIds\n from: $from\n to: $to\n childId: $childId\n ) {\n typeId\n days\n occurences\n }\n}\n\nquery GetLeaveOverlaps($leaveId: ObjectId!) {\n leaveOverlaps(leaveId: $leaveId) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n}\n\nquery GetLeaveApprovers($companyId: ObjectId!, $employeeId: ObjectId!, $leaveTypeId: ObjectId!) {\n leaveApprovers(\n companyId: $companyId\n employeeId: $employeeId\n leaveTypeId: $leaveTypeId\n ) {\n id\n firstName\n lastName\n displayName\n email\n }\n}': typeof types.GetLeaveDocument;
|
|
25
|
+
'query ActiveMembershipList($companyId: ObjectId!) {\n basicMemberships(companyId: $companyId) {\n id\n userId\n companyId\n employeeId\n role\n active\n isOffboarded\n inviteSent\n user {\n id\n email\n firstName\n lastName\n created\n avatarUrl\n }\n employee {\n id\n status\n managerUserId\n }\n }\n}\n\nquery ExtendedMembershipList($companyId: ObjectId!) {\n basicMemberships(companyId: $companyId) {\n id\n userId\n companyId\n employeeId\n role\n active\n isOffboarded\n inviteSent\n user {\n id\n email\n firstName\n lastName\n created\n avatarUrl\n }\n employee {\n id\n status\n managerUserId\n groupId\n employmentTypeId\n organizationId\n officeId\n hireDate\n titleId\n title\n }\n }\n}': typeof types.ActiveMembershipListDocument;
|
|
26
|
+
'query ListOffices($filters: OfficeFilterInput, $limit: Int, $skip: Int, $sort: OfficeSortInput) {\n offices(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n email\n phone\n timezone\n publicHolidayCalendarId\n visitingAddress {\n name\n street\n postalCode\n city\n country\n }\n postAddress {\n name\n street\n postalCode\n city\n country\n }\n }\n }\n}': typeof types.ListOfficesDocument;
|
|
27
|
+
'mutation CreateLeavePolicy($leavePolicy: LeavePolicyCreateInput!) {\n leavePolicy {\n create(leavePolicy: $leavePolicy) {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n }\n }\n}\n\nmutation UpdateLeavePolicy($id: ID!, $leavePolicy: LeavePolicyUpdateInput!) {\n leavePolicy(id: $id) {\n update(leavePolicy: $leavePolicy) {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n }\n }\n}\n\nmutation RemoveLeavePolicy($id: ID!) {\n leavePolicy(id: $id) {\n remove {\n id\n }\n }\n}': typeof types.CreateLeavePolicyDocument;
|
|
28
|
+
'query GetLeavePolicy($id: ID!) {\n leavePolicy(id: $id) {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n allowance {\n includeUnusedDaysInNewBalance\n }\n }\n}\n\nquery ListLeavePolicies($filters: LeavePolicyFilterInput, $limit: Int, $skip: Int, $sort: LeavePolicySortInput) {\n leavePolicies(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n allowance {\n includeUnusedDaysInNewBalance\n }\n }\n count\n next\n }\n}': typeof types.GetLeavePolicyDocument;
|
|
29
|
+
'mutation UpdateScope($id: String!, $scope: ScopeInput!) {\n scope(id: $id) {\n update(scope: $scope) {\n id\n companyId\n parentId\n parentType\n entireCompany\n employeeScope\n employeeIds\n employmentTypeScope\n excludeEmployeeScope\n groupScope\n officeScope\n organizationScope\n teamScope\n }\n }\n}': typeof types.UpdateScopeDocument;
|
|
30
|
+
'query ListTeams($filters: FilterGroupInput, $limit: Int, $skip: Int, $sortBy: [SortByInput]) {\n teamList(filters: $filters, limit: $limit, skip: $skip, sortBy: $sortBy) {\n rows {\n id\n companyId\n name\n description\n bgColor\n fgColor\n employeeIdList\n leadUserId\n }\n }\n}': typeof types.ListTeamsDocument;
|
|
31
|
+
'query GetCurrentUser {\n me {\n id\n email\n firstName\n lastName\n locale\n phone\n homeAddress {\n country\n }\n bankAccount {\n country\n }\n avatarUrl\n created\n membership {\n id\n userId\n companyId\n employeeId\n role\n active\n inviteSent\n featureAccessList\n company {\n id\n name\n disableRemoteWork\n }\n employee {\n id\n status\n }\n }\n }\n}': typeof types.GetCurrentUserDocument;
|
|
32
|
+
'query ListCompanyHolidays($filters: CompanyHolidayFilterInput, $limit: Int, $skip: Int, $sort: CompanyHolidaySortInput) {\n companyHolidays(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n startDate\n endDate\n created\n updated\n }\n count\n next\n }\n}\n\nquery ListPublicHolidays($filters: PublicHolidayFilterInput, $limit: Int, $skip: Int, $sort: PublicHolidaySortInput) {\n publicHolidays(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n label\n date\n country\n public\n calendarId\n }\n count\n next\n }\n}\n\nquery ListRestrictedDates($filters: RestrictedDateFilterInput, $limit: Int, $skip: Int, $sort: RestrictedDateSortInput) {\n restrictedDates(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n startDate\n endDate\n created\n updated\n }\n count\n next\n }\n}': typeof types.ListCompanyHolidaysDocument;
|
|
33
|
+
'query GetWorkWeek($id: ID!) {\n workWeek(id: $id) {\n id\n companyId\n employeeId\n officeId\n effectiveFrom\n effectiveTo\n duration\n timezone\n monday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n tuesday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n wednesday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n thursday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n friday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n saturday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n sunday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n }\n}\n\nquery ListWorkWeeks($filters: WorkWeekFilterInput, $limit: Int, $skip: Int, $sort: WorkWeekSortInput) {\n workWeeks(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n companyId\n employeeId\n officeId\n effectiveFrom\n effectiveTo\n duration\n timezone\n monday {\n working\n duration\n }\n tuesday {\n working\n duration\n }\n wednesday {\n working\n duration\n }\n thursday {\n working\n duration\n }\n friday {\n working\n duration\n }\n saturday {\n working\n duration\n }\n sunday {\n working\n duration\n }\n }\n count\n next\n }\n}': typeof types.GetWorkWeekDocument;
|
|
34
|
+
};
|
|
35
|
+
const documents: Documents = {
|
|
36
|
+
'mutation CreateVacationAdjustment($employeeVacationAdjustment: EmployeeVacationAdjustmentCreateInput!) {\n employeeVacationAdjustment {\n create(employeeVacationAdjustment: $employeeVacationAdjustment) {\n id\n employeeId\n companyId\n adjustment\n comment\n date\n created\n updated\n }\n }\n}\n\nmutation UpdateVacationAdjustment($id: ID!, $employeeVacationAdjustment: EmployeeVacationAdjustmentUpdateInput!) {\n employeeVacationAdjustment(id: $id) {\n update(employeeVacationAdjustment: $employeeVacationAdjustment) {\n id\n employeeId\n companyId\n adjustment\n comment\n date\n created\n updated\n }\n }\n}':
|
|
37
|
+
types.CreateVacationAdjustmentDocument,
|
|
38
|
+
'query ListVacationAdjustments($filters: EmployeeVacationAdjustmentFilterInput, $limit: Int, $skip: Int, $sort: EmployeeVacationAdjustmentSortInput) {\n employeeVacationAdjustments(\n filters: $filters\n limit: $limit\n skip: $skip\n sort: $sort\n ) {\n rows {\n id\n employeeId\n companyId\n adjustment\n comment\n date\n created\n updated\n }\n count\n next\n }\n}':
|
|
39
|
+
types.ListVacationAdjustmentsDocument,
|
|
40
|
+
'query GetEmployee($id: ID!) {\n employee(id: $id) {\n id\n companyId\n status\n workEmail\n user {\n id\n firstName\n lastName\n displayName\n email\n }\n }\n}\n\nquery ListEmployees($filters: EmployeeFilterInput!) {\n employees(filters: $filters) {\n rows {\n id\n user {\n id\n }\n }\n count\n }\n}':
|
|
41
|
+
types.GetEmployeeDocument,
|
|
42
|
+
'query GetEmployment($id: ID!) {\n employment(id: $id) {\n id\n employeeId\n companyId\n typeId\n country\n startDate\n endDate\n rate\n terminated\n publicHolidayCalendarId\n created\n updated\n }\n}\n\nquery ListEmployments($filters: EmploymentFilter, $limit: Int, $skip: Int, $sort: EmploymentSortInput) {\n employments(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n employeeId\n companyId\n typeId\n country\n startDate\n endDate\n rate\n terminated\n publicHolidayCalendarId\n }\n count\n next\n }\n}':
|
|
43
|
+
types.GetEmploymentDocument,
|
|
44
|
+
'mutation UploadFile($file: Upload!, $type: FileType!, $parentId: String, $parentType: FileParentType) {\n upload(file: $file, type: $type, parentId: $parentId, parentType: $parentType) {\n id\n fileName\n extension\n mimeType\n url\n type\n }\n}':
|
|
45
|
+
types.UploadFileDocument,
|
|
46
|
+
'query ListGroups($companyId: ID!) {\n company(id: $companyId) {\n groups {\n id\n name\n description\n costCenterId\n effectiveCostCenterId\n parentId\n leadUserId\n }\n }\n}':
|
|
47
|
+
types.ListGroupsDocument,
|
|
48
|
+
'query ListLeaveTypes($filters: FilterGroupInput!, $limit: Int, $skip: Int, $sortBy: [SortByInput]) {\n leaveTypeList(filters: $filters, limit: $limit, skip: $skip, sortBy: $sortBy) {\n rows {\n id\n name\n displayName\n kind\n deductible\n paid\n disabled\n archived\n minimumDuration\n allowHalfDays\n allowChild\n }\n count\n next\n }\n}\n\nquery GetEmployeeLeaveTypes($employeeId: ID!) {\n employeeLeaveTypeList(employeeId: $employeeId) {\n id\n name\n displayName\n kind\n deductible\n paid\n disabled\n minimumDuration\n allowHalfDays\n }\n}':
|
|
49
|
+
types.ListLeaveTypesDocument,
|
|
50
|
+
'mutation CreateLeave($id: ID!, $leave: LeaveCreateInput!) {\n leave(id: $id) {\n create(leave: $leave) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n }\n}\n\nmutation UpdateLeave($id: ID!, $leave: LeaveUpdateInput!) {\n leave(id: $id) {\n update(leave: $leave) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n }\n}\n\nmutation RemoveLeave($id: ID!) {\n leave(id: $id) {\n remove {\n id\n status\n }\n }\n}\n\nmutation AddLeaveAttachment($id: ID!, $fileId: ID!) {\n leave(id: $id) {\n addAttachment(fileId: $fileId) {\n id\n }\n }\n}\n\nmutation RemoveLeaveAttachment($id: ID!, $fileId: ID!) {\n leave(id: $id) {\n removeAttachment(fileId: $fileId) {\n id\n }\n }\n}':
|
|
51
|
+
types.CreateLeaveDocument,
|
|
52
|
+
'query GetLeave($id: ID!) {\n leave(id: $id) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n timezoneOffset\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n}\n\nquery ListLeave($filters: LeaveFilterInput, $limit: Int, $skip: Int, $sort: LeaveSortInput) {\n listLeave(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n count\n next\n }\n}\n\nquery ListLeaveVisible {\n leaveListVisible {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n}\n\nquery GetEmployeeVacationBalance($id: ID!) {\n employeeVacationBalance(id: $id) {\n id\n employeeId\n leaveTypeId\n leavePolicyId\n earnedAmount\n adjustmentAmount\n spentAmount\n balanceAmount\n balanceAmountPlusUnpaidLeft\n balanceAmountUnpaidLeft\n savedDaysLeft\n vacationYearStart\n vacationYearEnd\n }\n}\n\nquery ListEmployeeVacationBalance($filters: EmployeeVacationBalanceFilterInput, $limit: Int, $skip: Int) {\n employeeVacationBalanceList(filters: $filters, limit: $limit, skip: $skip) {\n rows {\n id\n employeeId\n leaveTypeId\n leavePolicyId\n earnedAmount\n adjustmentAmount\n spentAmount\n balanceAmount\n balanceAmountPlusUnpaidLeft\n balanceAmountUnpaidLeft\n savedDaysLeft\n vacationYearStart\n vacationYearEnd\n }\n count\n next\n }\n}\n\nquery GetLeaveUsage($employeeId: ID!, $typeIds: [ID]!, $from: DateTime!, $to: DateTime!, $childId: ID) {\n leaveUsage(\n employeeId: $employeeId\n typeIds: $typeIds\n from: $from\n to: $to\n childId: $childId\n ) {\n typeId\n days\n occurences\n }\n}\n\nquery GetLeaveOverlaps($leaveId: ObjectId!) {\n leaveOverlaps(leaveId: $leaveId) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n}\n\nquery GetLeaveApprovers($companyId: ObjectId!, $employeeId: ObjectId!, $leaveTypeId: ObjectId!) {\n leaveApprovers(\n companyId: $companyId\n employeeId: $employeeId\n leaveTypeId: $leaveTypeId\n ) {\n id\n firstName\n lastName\n displayName\n email\n }\n}':
|
|
53
|
+
types.GetLeaveDocument,
|
|
54
|
+
'query ActiveMembershipList($companyId: ObjectId!) {\n basicMemberships(companyId: $companyId) {\n id\n userId\n companyId\n employeeId\n role\n active\n isOffboarded\n inviteSent\n user {\n id\n email\n firstName\n lastName\n created\n avatarUrl\n }\n employee {\n id\n status\n managerUserId\n }\n }\n}\n\nquery ExtendedMembershipList($companyId: ObjectId!) {\n basicMemberships(companyId: $companyId) {\n id\n userId\n companyId\n employeeId\n role\n active\n isOffboarded\n inviteSent\n user {\n id\n email\n firstName\n lastName\n created\n avatarUrl\n }\n employee {\n id\n status\n managerUserId\n groupId\n employmentTypeId\n organizationId\n officeId\n hireDate\n titleId\n title\n }\n }\n}':
|
|
55
|
+
types.ActiveMembershipListDocument,
|
|
56
|
+
'query ListOffices($filters: OfficeFilterInput, $limit: Int, $skip: Int, $sort: OfficeSortInput) {\n offices(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n email\n phone\n timezone\n publicHolidayCalendarId\n visitingAddress {\n name\n street\n postalCode\n city\n country\n }\n postAddress {\n name\n street\n postalCode\n city\n country\n }\n }\n }\n}':
|
|
57
|
+
types.ListOfficesDocument,
|
|
58
|
+
'mutation CreateLeavePolicy($leavePolicy: LeavePolicyCreateInput!) {\n leavePolicy {\n create(leavePolicy: $leavePolicy) {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n }\n }\n}\n\nmutation UpdateLeavePolicy($id: ID!, $leavePolicy: LeavePolicyUpdateInput!) {\n leavePolicy(id: $id) {\n update(leavePolicy: $leavePolicy) {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n }\n }\n}\n\nmutation RemoveLeavePolicy($id: ID!) {\n leavePolicy(id: $id) {\n remove {\n id\n }\n }\n}':
|
|
59
|
+
types.CreateLeavePolicyDocument,
|
|
60
|
+
'query GetLeavePolicy($id: ID!) {\n leavePolicy(id: $id) {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n allowance {\n includeUnusedDaysInNewBalance\n }\n }\n}\n\nquery ListLeavePolicies($filters: LeavePolicyFilterInput, $limit: Int, $skip: Int, $sort: LeavePolicySortInput) {\n leavePolicies(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n allowance {\n includeUnusedDaysInNewBalance\n }\n }\n count\n next\n }\n}':
|
|
61
|
+
types.GetLeavePolicyDocument,
|
|
62
|
+
'mutation UpdateScope($id: String!, $scope: ScopeInput!) {\n scope(id: $id) {\n update(scope: $scope) {\n id\n companyId\n parentId\n parentType\n entireCompany\n employeeScope\n employeeIds\n employmentTypeScope\n excludeEmployeeScope\n groupScope\n officeScope\n organizationScope\n teamScope\n }\n }\n}':
|
|
63
|
+
types.UpdateScopeDocument,
|
|
64
|
+
'query ListTeams($filters: FilterGroupInput, $limit: Int, $skip: Int, $sortBy: [SortByInput]) {\n teamList(filters: $filters, limit: $limit, skip: $skip, sortBy: $sortBy) {\n rows {\n id\n companyId\n name\n description\n bgColor\n fgColor\n employeeIdList\n leadUserId\n }\n }\n}':
|
|
65
|
+
types.ListTeamsDocument,
|
|
66
|
+
'query GetCurrentUser {\n me {\n id\n email\n firstName\n lastName\n locale\n phone\n homeAddress {\n country\n }\n bankAccount {\n country\n }\n avatarUrl\n created\n membership {\n id\n userId\n companyId\n employeeId\n role\n active\n inviteSent\n featureAccessList\n company {\n id\n name\n disableRemoteWork\n }\n employee {\n id\n status\n }\n }\n }\n}':
|
|
67
|
+
types.GetCurrentUserDocument,
|
|
68
|
+
'query ListCompanyHolidays($filters: CompanyHolidayFilterInput, $limit: Int, $skip: Int, $sort: CompanyHolidaySortInput) {\n companyHolidays(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n startDate\n endDate\n created\n updated\n }\n count\n next\n }\n}\n\nquery ListPublicHolidays($filters: PublicHolidayFilterInput, $limit: Int, $skip: Int, $sort: PublicHolidaySortInput) {\n publicHolidays(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n label\n date\n country\n public\n calendarId\n }\n count\n next\n }\n}\n\nquery ListRestrictedDates($filters: RestrictedDateFilterInput, $limit: Int, $skip: Int, $sort: RestrictedDateSortInput) {\n restrictedDates(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n startDate\n endDate\n created\n updated\n }\n count\n next\n }\n}':
|
|
69
|
+
types.ListCompanyHolidaysDocument,
|
|
70
|
+
'query GetWorkWeek($id: ID!) {\n workWeek(id: $id) {\n id\n companyId\n employeeId\n officeId\n effectiveFrom\n effectiveTo\n duration\n timezone\n monday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n tuesday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n wednesday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n thursday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n friday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n saturday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n sunday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n }\n}\n\nquery ListWorkWeeks($filters: WorkWeekFilterInput, $limit: Int, $skip: Int, $sort: WorkWeekSortInput) {\n workWeeks(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n companyId\n employeeId\n officeId\n effectiveFrom\n effectiveTo\n duration\n timezone\n monday {\n working\n duration\n }\n tuesday {\n working\n duration\n }\n wednesday {\n working\n duration\n }\n thursday {\n working\n duration\n }\n friday {\n working\n duration\n }\n saturday {\n working\n duration\n }\n sunday {\n working\n duration\n }\n }\n count\n next\n }\n}':
|
|
71
|
+
types.GetWorkWeekDocument,
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
76
|
+
*/
|
|
77
|
+
export function graphql(
|
|
78
|
+
source: 'mutation CreateVacationAdjustment($employeeVacationAdjustment: EmployeeVacationAdjustmentCreateInput!) {\n employeeVacationAdjustment {\n create(employeeVacationAdjustment: $employeeVacationAdjustment) {\n id\n employeeId\n companyId\n adjustment\n comment\n date\n created\n updated\n }\n }\n}\n\nmutation UpdateVacationAdjustment($id: ID!, $employeeVacationAdjustment: EmployeeVacationAdjustmentUpdateInput!) {\n employeeVacationAdjustment(id: $id) {\n update(employeeVacationAdjustment: $employeeVacationAdjustment) {\n id\n employeeId\n companyId\n adjustment\n comment\n date\n created\n updated\n }\n }\n}'
|
|
79
|
+
): typeof import('./graphql').CreateVacationAdjustmentDocument;
|
|
80
|
+
/**
|
|
81
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
82
|
+
*/
|
|
83
|
+
export function graphql(
|
|
84
|
+
source: 'query ListVacationAdjustments($filters: EmployeeVacationAdjustmentFilterInput, $limit: Int, $skip: Int, $sort: EmployeeVacationAdjustmentSortInput) {\n employeeVacationAdjustments(\n filters: $filters\n limit: $limit\n skip: $skip\n sort: $sort\n ) {\n rows {\n id\n employeeId\n companyId\n adjustment\n comment\n date\n created\n updated\n }\n count\n next\n }\n}'
|
|
85
|
+
): typeof import('./graphql').ListVacationAdjustmentsDocument;
|
|
86
|
+
/**
|
|
87
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
88
|
+
*/
|
|
89
|
+
export function graphql(
|
|
90
|
+
source: 'query GetEmployee($id: ID!) {\n employee(id: $id) {\n id\n companyId\n status\n workEmail\n user {\n id\n firstName\n lastName\n displayName\n email\n }\n }\n}\n\nquery ListEmployees($filters: EmployeeFilterInput!) {\n employees(filters: $filters) {\n rows {\n id\n user {\n id\n }\n }\n count\n }\n}'
|
|
91
|
+
): typeof import('./graphql').GetEmployeeDocument;
|
|
92
|
+
/**
|
|
93
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
94
|
+
*/
|
|
95
|
+
export function graphql(
|
|
96
|
+
source: 'query GetEmployment($id: ID!) {\n employment(id: $id) {\n id\n employeeId\n companyId\n typeId\n country\n startDate\n endDate\n rate\n terminated\n publicHolidayCalendarId\n created\n updated\n }\n}\n\nquery ListEmployments($filters: EmploymentFilter, $limit: Int, $skip: Int, $sort: EmploymentSortInput) {\n employments(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n employeeId\n companyId\n typeId\n country\n startDate\n endDate\n rate\n terminated\n publicHolidayCalendarId\n }\n count\n next\n }\n}'
|
|
97
|
+
): typeof import('./graphql').GetEmploymentDocument;
|
|
98
|
+
/**
|
|
99
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
100
|
+
*/
|
|
101
|
+
export function graphql(
|
|
102
|
+
source: 'mutation UploadFile($file: Upload!, $type: FileType!, $parentId: String, $parentType: FileParentType) {\n upload(file: $file, type: $type, parentId: $parentId, parentType: $parentType) {\n id\n fileName\n extension\n mimeType\n url\n type\n }\n}'
|
|
103
|
+
): typeof import('./graphql').UploadFileDocument;
|
|
104
|
+
/**
|
|
105
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
106
|
+
*/
|
|
107
|
+
export function graphql(
|
|
108
|
+
source: 'query ListGroups($companyId: ID!) {\n company(id: $companyId) {\n groups {\n id\n name\n description\n costCenterId\n effectiveCostCenterId\n parentId\n leadUserId\n }\n }\n}'
|
|
109
|
+
): typeof import('./graphql').ListGroupsDocument;
|
|
110
|
+
/**
|
|
111
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
112
|
+
*/
|
|
113
|
+
export function graphql(
|
|
114
|
+
source: 'query ListLeaveTypes($filters: FilterGroupInput!, $limit: Int, $skip: Int, $sortBy: [SortByInput]) {\n leaveTypeList(filters: $filters, limit: $limit, skip: $skip, sortBy: $sortBy) {\n rows {\n id\n name\n displayName\n kind\n deductible\n paid\n disabled\n archived\n minimumDuration\n allowHalfDays\n allowChild\n }\n count\n next\n }\n}\n\nquery GetEmployeeLeaveTypes($employeeId: ID!) {\n employeeLeaveTypeList(employeeId: $employeeId) {\n id\n name\n displayName\n kind\n deductible\n paid\n disabled\n minimumDuration\n allowHalfDays\n }\n}'
|
|
115
|
+
): typeof import('./graphql').ListLeaveTypesDocument;
|
|
116
|
+
/**
|
|
117
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
118
|
+
*/
|
|
119
|
+
export function graphql(
|
|
120
|
+
source: 'mutation CreateLeave($id: ID!, $leave: LeaveCreateInput!) {\n leave(id: $id) {\n create(leave: $leave) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n }\n}\n\nmutation UpdateLeave($id: ID!, $leave: LeaveUpdateInput!) {\n leave(id: $id) {\n update(leave: $leave) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n }\n}\n\nmutation RemoveLeave($id: ID!) {\n leave(id: $id) {\n remove {\n id\n status\n }\n }\n}\n\nmutation AddLeaveAttachment($id: ID!, $fileId: ID!) {\n leave(id: $id) {\n addAttachment(fileId: $fileId) {\n id\n }\n }\n}\n\nmutation RemoveLeaveAttachment($id: ID!, $fileId: ID!) {\n leave(id: $id) {\n removeAttachment(fileId: $fileId) {\n id\n }\n }\n}'
|
|
121
|
+
): typeof import('./graphql').CreateLeaveDocument;
|
|
122
|
+
/**
|
|
123
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
124
|
+
*/
|
|
125
|
+
export function graphql(
|
|
126
|
+
source: 'query GetLeave($id: ID!) {\n leave(id: $id) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n timezoneOffset\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n}\n\nquery ListLeave($filters: LeaveFilterInput, $limit: Int, $skip: Int, $sort: LeaveSortInput) {\n listLeave(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n count\n next\n }\n}\n\nquery ListLeaveVisible {\n leaveListVisible {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n description\n timezone\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n}\n\nquery GetEmployeeVacationBalance($id: ID!) {\n employeeVacationBalance(id: $id) {\n id\n employeeId\n leaveTypeId\n leavePolicyId\n earnedAmount\n adjustmentAmount\n spentAmount\n balanceAmount\n balanceAmountPlusUnpaidLeft\n balanceAmountUnpaidLeft\n savedDaysLeft\n vacationYearStart\n vacationYearEnd\n }\n}\n\nquery ListEmployeeVacationBalance($filters: EmployeeVacationBalanceFilterInput, $limit: Int, $skip: Int) {\n employeeVacationBalanceList(filters: $filters, limit: $limit, skip: $skip) {\n rows {\n id\n employeeId\n leaveTypeId\n leavePolicyId\n earnedAmount\n adjustmentAmount\n spentAmount\n balanceAmount\n balanceAmountPlusUnpaidLeft\n balanceAmountUnpaidLeft\n savedDaysLeft\n vacationYearStart\n vacationYearEnd\n }\n count\n next\n }\n}\n\nquery GetLeaveUsage($employeeId: ID!, $typeIds: [ID]!, $from: DateTime!, $to: DateTime!, $childId: ID) {\n leaveUsage(\n employeeId: $employeeId\n typeIds: $typeIds\n from: $from\n to: $to\n childId: $childId\n ) {\n typeId\n days\n occurences\n }\n}\n\nquery GetLeaveOverlaps($leaveId: ObjectId!) {\n leaveOverlaps(leaveId: $leaveId) {\n id\n status\n duration\n startDate\n endDate\n localStartDate\n localEndDate\n workingMinutes\n type {\n id\n name\n kind\n }\n }\n}\n\nquery GetLeaveApprovers($companyId: ObjectId!, $employeeId: ObjectId!, $leaveTypeId: ObjectId!) {\n leaveApprovers(\n companyId: $companyId\n employeeId: $employeeId\n leaveTypeId: $leaveTypeId\n ) {\n id\n firstName\n lastName\n displayName\n email\n }\n}'
|
|
127
|
+
): typeof import('./graphql').GetLeaveDocument;
|
|
128
|
+
/**
|
|
129
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
130
|
+
*/
|
|
131
|
+
export function graphql(
|
|
132
|
+
source: 'query ActiveMembershipList($companyId: ObjectId!) {\n basicMemberships(companyId: $companyId) {\n id\n userId\n companyId\n employeeId\n role\n active\n isOffboarded\n inviteSent\n user {\n id\n email\n firstName\n lastName\n created\n avatarUrl\n }\n employee {\n id\n status\n managerUserId\n }\n }\n}\n\nquery ExtendedMembershipList($companyId: ObjectId!) {\n basicMemberships(companyId: $companyId) {\n id\n userId\n companyId\n employeeId\n role\n active\n isOffboarded\n inviteSent\n user {\n id\n email\n firstName\n lastName\n created\n avatarUrl\n }\n employee {\n id\n status\n managerUserId\n groupId\n employmentTypeId\n organizationId\n officeId\n hireDate\n titleId\n title\n }\n }\n}'
|
|
133
|
+
): typeof import('./graphql').ActiveMembershipListDocument;
|
|
134
|
+
/**
|
|
135
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
136
|
+
*/
|
|
137
|
+
export function graphql(
|
|
138
|
+
source: 'query ListOffices($filters: OfficeFilterInput, $limit: Int, $skip: Int, $sort: OfficeSortInput) {\n offices(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n email\n phone\n timezone\n publicHolidayCalendarId\n visitingAddress {\n name\n street\n postalCode\n city\n country\n }\n postAddress {\n name\n street\n postalCode\n city\n country\n }\n }\n }\n}'
|
|
139
|
+
): typeof import('./graphql').ListOfficesDocument;
|
|
140
|
+
/**
|
|
141
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
142
|
+
*/
|
|
143
|
+
export function graphql(
|
|
144
|
+
source: 'mutation CreateLeavePolicy($leavePolicy: LeavePolicyCreateInput!) {\n leavePolicy {\n create(leavePolicy: $leavePolicy) {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n }\n }\n}\n\nmutation UpdateLeavePolicy($id: ID!, $leavePolicy: LeavePolicyUpdateInput!) {\n leavePolicy(id: $id) {\n update(leavePolicy: $leavePolicy) {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n }\n }\n}\n\nmutation RemoveLeavePolicy($id: ID!) {\n leavePolicy(id: $id) {\n remove {\n id\n }\n }\n}'
|
|
145
|
+
): typeof import('./graphql').CreateLeavePolicyDocument;
|
|
146
|
+
/**
|
|
147
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
148
|
+
*/
|
|
149
|
+
export function graphql(
|
|
150
|
+
source: 'query GetLeavePolicy($id: ID!) {\n leavePolicy(id: $id) {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n allowance {\n includeUnusedDaysInNewBalance\n }\n }\n}\n\nquery ListLeavePolicies($filters: LeavePolicyFilterInput, $limit: Int, $skip: Int, $sort: LeavePolicySortInput) {\n leavePolicies(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n companyId\n leaveTypeId\n name\n description\n requireApproval\n allowAttachments\n minimumDuration\n allowEmployeeRevoke\n allowEmployeeEdit\n changeRequestGracePeriod\n allowance {\n includeUnusedDaysInNewBalance\n }\n }\n count\n next\n }\n}'
|
|
151
|
+
): typeof import('./graphql').GetLeavePolicyDocument;
|
|
152
|
+
/**
|
|
153
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
154
|
+
*/
|
|
155
|
+
export function graphql(
|
|
156
|
+
source: 'mutation UpdateScope($id: String!, $scope: ScopeInput!) {\n scope(id: $id) {\n update(scope: $scope) {\n id\n companyId\n parentId\n parentType\n entireCompany\n employeeScope\n employeeIds\n employmentTypeScope\n excludeEmployeeScope\n groupScope\n officeScope\n organizationScope\n teamScope\n }\n }\n}'
|
|
157
|
+
): typeof import('./graphql').UpdateScopeDocument;
|
|
158
|
+
/**
|
|
159
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
160
|
+
*/
|
|
161
|
+
export function graphql(
|
|
162
|
+
source: 'query ListTeams($filters: FilterGroupInput, $limit: Int, $skip: Int, $sortBy: [SortByInput]) {\n teamList(filters: $filters, limit: $limit, skip: $skip, sortBy: $sortBy) {\n rows {\n id\n companyId\n name\n description\n bgColor\n fgColor\n employeeIdList\n leadUserId\n }\n }\n}'
|
|
163
|
+
): typeof import('./graphql').ListTeamsDocument;
|
|
164
|
+
/**
|
|
165
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
166
|
+
*/
|
|
167
|
+
export function graphql(
|
|
168
|
+
source: 'query GetCurrentUser {\n me {\n id\n email\n firstName\n lastName\n locale\n phone\n homeAddress {\n country\n }\n bankAccount {\n country\n }\n avatarUrl\n created\n membership {\n id\n userId\n companyId\n employeeId\n role\n active\n inviteSent\n featureAccessList\n company {\n id\n name\n disableRemoteWork\n }\n employee {\n id\n status\n }\n }\n }\n}'
|
|
169
|
+
): typeof import('./graphql').GetCurrentUserDocument;
|
|
170
|
+
/**
|
|
171
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
172
|
+
*/
|
|
173
|
+
export function graphql(
|
|
174
|
+
source: 'query ListCompanyHolidays($filters: CompanyHolidayFilterInput, $limit: Int, $skip: Int, $sort: CompanyHolidaySortInput) {\n companyHolidays(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n startDate\n endDate\n created\n updated\n }\n count\n next\n }\n}\n\nquery ListPublicHolidays($filters: PublicHolidayFilterInput, $limit: Int, $skip: Int, $sort: PublicHolidaySortInput) {\n publicHolidays(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n label\n date\n country\n public\n calendarId\n }\n count\n next\n }\n}\n\nquery ListRestrictedDates($filters: RestrictedDateFilterInput, $limit: Int, $skip: Int, $sort: RestrictedDateSortInput) {\n restrictedDates(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n name\n startDate\n endDate\n created\n updated\n }\n count\n next\n }\n}'
|
|
175
|
+
): typeof import('./graphql').ListCompanyHolidaysDocument;
|
|
176
|
+
/**
|
|
177
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
178
|
+
*/
|
|
179
|
+
export function graphql(
|
|
180
|
+
source: 'query GetWorkWeek($id: ID!) {\n workWeek(id: $id) {\n id\n companyId\n employeeId\n officeId\n effectiveFrom\n effectiveTo\n duration\n timezone\n monday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n tuesday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n wednesday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n thursday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n friday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n saturday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n sunday {\n working\n duration\n shifts {\n startHour\n startMinute\n endHour\n endMinute\n duration\n }\n }\n }\n}\n\nquery ListWorkWeeks($filters: WorkWeekFilterInput, $limit: Int, $skip: Int, $sort: WorkWeekSortInput) {\n workWeeks(filters: $filters, limit: $limit, skip: $skip, sort: $sort) {\n rows {\n id\n companyId\n employeeId\n officeId\n effectiveFrom\n effectiveTo\n duration\n timezone\n monday {\n working\n duration\n }\n tuesday {\n working\n duration\n }\n wednesday {\n working\n duration\n }\n thursday {\n working\n duration\n }\n friday {\n working\n duration\n }\n saturday {\n working\n duration\n }\n sunday {\n working\n duration\n }\n }\n count\n next\n }\n}'
|
|
181
|
+
): typeof import('./graphql').GetWorkWeekDocument;
|
|
182
|
+
|
|
183
|
+
export function graphql(source: string) {
|
|
184
|
+
return (documents as any)[source] ?? {};
|
|
185
|
+
}
|