@uidu/client 3.2.0 → 3.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uidu/client",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
4
4
  "description": "Typed GraphQL client for the uidu platform. Server-first, framework-agnostic.",
5
5
  "license": "MIT",
6
6
  "author": "uidu",
@@ -0,0 +1,51 @@
1
+ import type { UiduClient } from './client';
2
+ import {
3
+ CreateApplicationDocument,
4
+ type CreateApplicationMutationVariables,
5
+ ListApplicationsDocument,
6
+ type ListApplicationsQuery,
7
+ type ListApplicationsQueryVariables,
8
+ } from './generated';
9
+ import { nodes } from './utils/relay';
10
+
11
+ /**
12
+ * An application submitted to a job posting (a {@link Job}).
13
+ *
14
+ * Unlike `jobs`, applications are a *first-class* GraphQL type with their own
15
+ * operations (`ListApplications`, `CreateApplication`). The `*Document`s below
16
+ * are produced by codegen from `src/queries/applications/*.graphql` — run
17
+ * `yarn workspace @uidu/client codegen` after editing those files.
18
+ *
19
+ * Reads (`listApplications`) require a Bearer token (`apiKey`): applications
20
+ * hold private candidate data. Writes (`createApplication`) are the public
21
+ * "apply to this job" path.
22
+ */
23
+ export type Application = NonNullable<
24
+ NonNullable<
25
+ NonNullable<
26
+ NonNullable<ListApplicationsQuery['currentWorkspace']>['applications']['edges']
27
+ >[number]
28
+ >['node']
29
+ >;
30
+
31
+ /** List applications across the workspace (requires a Bearer token). */
32
+ export async function listApplications(
33
+ client: UiduClient,
34
+ variables: ListApplicationsQueryVariables = {},
35
+ ): Promise<Application[]> {
36
+ const result = await client.query(ListApplicationsDocument, variables);
37
+ return nodes(result.currentWorkspace?.applications);
38
+ }
39
+
40
+ /**
41
+ * Submit an application to a job. Pass `attributes.applicableId` (the job's id)
42
+ * plus `contactAttributes` and/or `formResponseAttributes`. Returns the
43
+ * mutation payload as-is (including any `errors`) rather than throwing.
44
+ */
45
+ export async function createApplication(
46
+ client: UiduClient,
47
+ variables: CreateApplicationMutationVariables,
48
+ ) {
49
+ const result = await client.mutate(CreateApplicationDocument, variables);
50
+ return result.createApplication ?? null;
51
+ }
@@ -49285,6 +49285,21 @@ export type WorkspaceTaggingEdge = {
49285
49285
  node?: Maybe<WorkspaceTagging>;
49286
49286
  };
49287
49287
 
49288
+ export type CreateApplicationMutationVariables = Exact<{
49289
+ input: CreateApplicationInput;
49290
+ }>;
49291
+
49292
+
49293
+ export type CreateApplicationMutation = { __typename?: 'Mutation', createApplication?: { __typename?: 'CreateApplicationPayload', errors: Array<{ __typename?: 'Error', key: string, name: string, type: string }>, application?: { __typename?: 'Application', id: string, aasmState?: string | null, summary?: string | null, completedAt?: any | null, createdAt: any, contact?: { __typename?: 'Contact', id: string, humanName: string, email?: string | null } | null, applicable: { __typename: 'Call', id: string, name?: string | null, kind: CallKind } | { __typename: 'Grant' }, formResponse?: { __typename?: 'FormResponse', id: string } | null } | null } | null };
49294
+
49295
+ export type ListApplicationsQueryVariables = Exact<{
49296
+ first?: InputMaybe<Scalars['Int']['input']>;
49297
+ after?: InputMaybe<Scalars['String']['input']>;
49298
+ }>;
49299
+
49300
+
49301
+ export type ListApplicationsQuery = { __typename?: 'Query', currentWorkspace?: { __typename?: 'Workspace', applications: { __typename?: 'ApplicationConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, edges?: Array<{ __typename?: 'ApplicationEdge', node?: { __typename?: 'Application', id: string, aasmState?: string | null, summary?: string | null, completedAt?: any | null, createdAt: any, status?: { __typename?: 'Status', id: string, name?: string | null, color?: string | null } | null, contact?: { __typename?: 'Contact', id: string, humanName: string, email?: string | null } | null, applicable: { __typename: 'Call', id: string, name?: string | null, kind: CallKind } | { __typename: 'Grant' }, formResponse?: { __typename?: 'FormResponse', id: string } | null } | null } | null> | null } } | null };
49302
+
49288
49303
  export type GetBookingQueryVariables = Exact<{
49289
49304
  id: Scalars['ID']['input'];
49290
49305
  }>;
@@ -49818,6 +49833,27 @@ export type DeleteNoteMutationVariables = Exact<{
49818
49833
 
49819
49834
  export type DeleteNoteMutation = { __typename?: 'Mutation', deleteNote?: { __typename?: 'DeleteNotePayload', note?: { __typename?: 'Note', id: string } | null, errors: Array<{ __typename?: 'Error', key: string, name: string, type: string }> } | null };
49820
49835
 
49836
+ export type CreateCompensationMutationVariables = Exact<{
49837
+ input: CreateCompensationInput;
49838
+ }>;
49839
+
49840
+
49841
+ export type CreateCompensationMutation = { __typename?: 'Mutation', createCompensation?: { __typename?: 'CreateCompensationPayload', compensation?: { __typename?: 'CompensationEdge', node?: { __typename?: 'Compensation', id: string, amount: number, currency: string, frequency: string, componentType: string, effectiveFrom: any } | null } | null, errors: Array<{ __typename?: 'Error', key: string, name: string, type: string }> } | null };
49842
+
49843
+ export type UpdateCompensationMutationVariables = Exact<{
49844
+ input: UpdateCompensationInput;
49845
+ }>;
49846
+
49847
+
49848
+ export type UpdateCompensationMutation = { __typename?: 'Mutation', updateCompensation?: { __typename?: 'UpdateCompensationPayload', compensation?: { __typename?: 'Compensation', id: string, amount: number, currency: string, frequency: string, componentType: string, effectiveFrom: any } | null, errors: Array<{ __typename?: 'Error', key: string, name: string, type: string }> } | null };
49849
+
49850
+ export type DeleteCompensationMutationVariables = Exact<{
49851
+ input: DeleteCompensationInput;
49852
+ }>;
49853
+
49854
+
49855
+ export type DeleteCompensationMutation = { __typename?: 'Mutation', deleteCompensation?: { __typename?: 'DeleteCompensationPayload', compensation?: { __typename?: 'Compensation', id: string } | null, errors: Array<{ __typename?: 'Error', key: string, name: string, type: string }> } | null };
49856
+
49821
49857
  export type GetEmployeeQueryVariables = Exact<{
49822
49858
  id: Scalars['ID']['input'];
49823
49859
  weekStartingAt: Scalars['ISO8601Date']['input'];
@@ -49842,6 +49878,15 @@ export type ListEmployeesQueryVariables = Exact<{
49842
49878
 
49843
49879
  export type ListEmployeesQuery = { __typename?: 'Query', currentWorkspace?: { __typename?: 'Workspace', employees: { __typename?: 'EmployeeConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, edges?: Array<{ __typename?: 'EmployeeEdge', node?: { __typename?: 'Employee', id: string, employeeCode?: string | null, user?: { __typename?: 'User', id: string, name?: string | null, firstName?: string | null, lastName?: string | null, email?: string | null } | null, currentEmployment?: { __typename?: 'Employment', id: string, jobTitle?: string | null, contractType?: string | null, isActive: boolean, startDate: any } | null } | null } | null> | null } } | null };
49844
49880
 
49881
+ export type ListEmploymentHistoryQueryVariables = Exact<{
49882
+ first?: InputMaybe<Scalars['Int']['input']>;
49883
+ after?: InputMaybe<Scalars['String']['input']>;
49884
+ employmentsFirst?: InputMaybe<Scalars['Int']['input']>;
49885
+ }>;
49886
+
49887
+
49888
+ export type ListEmploymentHistoryQuery = { __typename?: 'Query', currentWorkspace?: { __typename?: 'Workspace', employees: { __typename?: 'EmployeeConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null }, edges?: Array<{ __typename?: 'EmployeeEdge', node?: { __typename?: 'Employee', id: string, user?: { __typename?: 'User', id: string, name?: string | null, email?: string | null } | null, employments: { __typename?: 'EmploymentConnection', edges?: Array<{ __typename?: 'EmploymentEdge', node?: { __typename?: 'Employment', id: string, startDate: any, endDate?: any | null, endReason?: string | null, jobTitle?: string | null, contractType?: string | null, ccnl?: { __typename?: 'Kind', id: string, name?: string | null } | null, compensations: { __typename?: 'CompensationConnection', edges?: Array<{ __typename?: 'CompensationEdge', node?: { __typename?: 'Compensation', id: string, amount: number, currency: string, frequency: string, componentType: string, effectiveFrom: any } | null } | null> | null } } | null } | null> | null } } | null } | null> | null } } | null };
49889
+
49845
49890
  export type ListKindsQueryVariables = Exact<{
49846
49891
  models: Array<Scalars['String']['input']> | Scalars['String']['input'];
49847
49892
  first?: InputMaybe<Scalars['Int']['input']>;
@@ -49996,6 +50041,8 @@ export type DeleteTaskMutation = { __typename?: 'Mutation', deleteTask?: { __typ
49996
50041
 
49997
50042
  export const FormFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Form"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"inputs"},"name":{"kind":"Name","value":"formQuestions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"required"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"placeholder"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"fieldKind"}},{"kind":"Field","name":{"kind":"Name","value":"rules"}},{"kind":"Field","name":{"kind":"Name","value":"preferences"}},{"kind":"Field","name":{"kind":"Name","value":"field"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"accessor"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"shortname"}},{"kind":"Field","name":{"kind":"Name","value":"uploadPresignedUrl"}},{"kind":"Field","name":{"kind":"Name","value":"uploadUrl"}},{"kind":"Field","name":{"kind":"Name","value":"uploadParams"}},{"kind":"Field","alias":{"kind":"Name","value":"options"},"name":{"kind":"Name","value":"optionList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<FormFieldsFragment, unknown>;
49998
50043
  export const FormResponseFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormResponseFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FormResponse"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"fieldValues"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"linkedRecordId"}},{"kind":"Field","name":{"kind":"Name","value":"field"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"contact"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<FormResponseFieldsFragment, unknown>;
50044
+ export const CreateApplicationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateApplication"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateApplicationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createApplication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"application"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"aasmState"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"completedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"contact"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"applicable"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Call"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"kind"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"formResponse"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]}}]} as unknown as DocumentNode<CreateApplicationMutation, CreateApplicationMutationVariables>;
50045
+ export const ListApplicationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListApplications"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"applications"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"aasmState"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"completedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"status"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"}}]}},{"kind":"Field","name":{"kind":"Name","value":"contact"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"applicable"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Call"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"kind"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"formResponse"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<ListApplicationsQuery, ListApplicationsQueryVariables>;
49999
50046
  export const GetBookingDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetBooking"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"booking"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"number"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"itemsCount"}},{"kind":"Field","name":{"kind":"Name","value":"itemsTotal"}},{"kind":"Field","name":{"kind":"Name","value":"paymentIntentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"paidAt"}},{"kind":"Field","name":{"kind":"Name","value":"refundedAt"}},{"kind":"Field","name":{"kind":"Name","value":"expiredAt"}},{"kind":"Field","name":{"kind":"Name","value":"willExpireAt"}},{"kind":"Field","name":{"kind":"Name","value":"fieldValuesByShortname"}},{"kind":"Field","name":{"kind":"Name","value":"contact"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetBookingQuery, GetBookingQueryVariables>;
50000
50047
  export const GetCalendarDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCalendar"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendar"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]}}]} as unknown as DocumentNode<GetCalendarQuery, GetCalendarQueryVariables>;
50001
50048
  export const GetCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"calendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"startTime"}},{"kind":"Field","name":{"kind":"Name","value":"endTime"}},{"kind":"Field","name":{"kind":"Name","value":"allDay"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"calendar"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}}]}},{"kind":"Field","name":{"kind":"Name","value":"primaryAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"formattedAddress"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"city"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetCalendarEventQuery, GetCalendarEventQueryVariables>;
@@ -50066,9 +50113,13 @@ export const ListKbCollectionsDocument = {"kind":"Document","definitions":[{"kin
50066
50113
  export const CreateNoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateNote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateNoteInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createNote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"note"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]}}]} as unknown as DocumentNode<CreateNoteMutation, CreateNoteMutationVariables>;
50067
50114
  export const UpdateNoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateNote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateNoteInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateNote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"note"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]}}]} as unknown as DocumentNode<UpdateNoteMutation, UpdateNoteMutationVariables>;
50068
50115
  export const DeleteNoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteNote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteNoteInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteNote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"note"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]}}]} as unknown as DocumentNode<DeleteNoteMutation, DeleteNoteMutationVariables>;
50116
+ export const CreateCompensationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateCompensation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateCompensationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createCompensation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"compensation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"amount"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"frequency"}},{"kind":"Field","name":{"kind":"Name","value":"componentType"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveFrom"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]}}]} as unknown as DocumentNode<CreateCompensationMutation, CreateCompensationMutationVariables>;
50117
+ export const UpdateCompensationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCompensation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateCompensationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateCompensation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"compensation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"amount"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"frequency"}},{"kind":"Field","name":{"kind":"Name","value":"componentType"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveFrom"}}]}},{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]}}]} as unknown as DocumentNode<UpdateCompensationMutation, UpdateCompensationMutationVariables>;
50118
+ export const DeleteCompensationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteCompensation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteCompensationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteCompensation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"compensation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]}}]} as unknown as DocumentNode<DeleteCompensationMutation, DeleteCompensationMutationVariables>;
50069
50119
  export const GetEmployeeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetEmployee"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"weekStartingAt"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ISO8601Date"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"employee"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"employeeCode"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentEmployment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"jobTitle"}},{"kind":"Field","name":{"kind":"Name","value":"contractType"}},{"kind":"Field","name":{"kind":"Name","value":"contractLevel"}},{"kind":"Field","name":{"kind":"Name","value":"classification"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}},{"kind":"Field","name":{"kind":"Name","value":"fteRatio"}},{"kind":"Field","name":{"kind":"Name","value":"primaryOffice"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"todayTimeClocks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"beginsAt"}},{"kind":"Field","name":{"kind":"Name","value":"finishesAt"}},{"kind":"Field","name":{"kind":"Name","value":"kind"}}]}},{"kind":"Field","name":{"kind":"Name","value":"weeklyShifts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"weekStartingAt"},"value":{"kind":"Variable","name":{"kind":"Name","value":"weekStartingAt"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"20"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"beginsAt"}},{"kind":"Field","name":{"kind":"Name","value":"finishesAt"}},{"kind":"Field","name":{"kind":"Name","value":"aasmState"}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetEmployeeQuery, GetEmployeeQueryVariables>;
50070
50120
  export const ListCirclesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListCircles"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"circles"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"kind"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<ListCirclesQuery, ListCirclesQueryVariables>;
50071
50121
  export const ListEmployeesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListEmployees"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"employees"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"employeeCode"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentEmployment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"jobTitle"}},{"kind":"Field","name":{"kind":"Name","value":"contractType"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"startDate"}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<ListEmployeesQuery, ListEmployeesQueryVariables>;
50122
+ export const ListEmploymentHistoryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListEmploymentHistory"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"employmentsFirst"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"employees"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"employments"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"employmentsFirst"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"startDate"}},{"kind":"Field","name":{"kind":"Name","value":"endDate"}},{"kind":"Field","name":{"kind":"Name","value":"endReason"}},{"kind":"Field","name":{"kind":"Name","value":"jobTitle"}},{"kind":"Field","name":{"kind":"Name","value":"contractType"}},{"kind":"Field","name":{"kind":"Name","value":"ccnl"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"compensations"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"20"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"amount"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"frequency"}},{"kind":"Field","name":{"kind":"Name","value":"componentType"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveFrom"}}]}}]}}]}}]}}]}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<ListEmploymentHistoryQuery, ListEmploymentHistoryQueryVariables>;
50072
50123
  export const ListKindsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListKinds"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"models"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kinds"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"models"},"value":{"kind":"Variable","name":{"kind":"Name","value":"models"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"model"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<ListKindsQuery, ListKindsQueryVariables>;
50073
50124
  export const ListOfficesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListOffices"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"offices"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<ListOfficesQuery, ListOfficesQueryVariables>;
50074
50125
  export const CreateEmployeeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateEmployee"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateEmployeeInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createEmployee"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"employee"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"employeeCode"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"errors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]}}]} as unknown as DocumentNode<CreateEmployeeMutation, CreateEmployeeMutationVariables>;
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ export { paginate } from './utils/paginate';
6
6
  export type { PaginateOptions } from './utils/paginate';
7
7
 
8
8
  export {
9
+ ListApplicationsDocument,
9
10
  ListBookingsDocument,
10
11
  ListCalendarsDocument,
11
12
  ListCalendarEventsDocument,
@@ -82,6 +83,9 @@ export {
82
83
  updateEmployment,
83
84
  deleteEmployment,
84
85
  terminateEmployment,
86
+ createCompensation,
87
+ updateCompensation,
88
+ deleteCompensation,
85
89
  } from './mutations';
86
90
 
87
91
  export {
@@ -104,6 +108,12 @@ export type { Event } from './events';
104
108
  export { getCall, listCalls } from './calls';
105
109
  export type { Call } from './calls';
106
110
 
111
+ export { getJob, listJobs } from './jobs';
112
+ export type { Job } from './jobs';
113
+
114
+ export { listApplications, createApplication } from './applications';
115
+ export type { Application } from './applications';
116
+
107
117
  export {
108
118
  getDonationCampaign,
109
119
  listDonationCampaigns,
@@ -124,8 +134,20 @@ export {
124
134
  listRoles,
125
135
  listKinds,
126
136
  listCcnls,
137
+ listEmploymentHistory,
138
+ contractEvents,
139
+ } from './people';
140
+ export type {
141
+ Employee,
142
+ Office,
143
+ Circle,
144
+ Kind,
145
+ EmploymentRecord,
146
+ CompensationRecord,
147
+ EmployeeContracts,
148
+ ContractEvent,
149
+ ContractEventType,
127
150
  } from './people';
128
- export type { Employee, Office, Circle, Kind } from './people';
129
151
 
130
152
  export {
131
153
  getBooking,
package/src/jobs.ts ADDED
@@ -0,0 +1,32 @@
1
+ import type { UiduClient } from './client';
2
+ import { getCall, listCalls, type Call } from './calls';
3
+ import { CallKind } from './generated';
4
+
5
+ /**
6
+ * A job posting — a {@link Call} whose `kind` is `job`.
7
+ *
8
+ * Jobs are a *derived view* over the `calls` domain: there is no separate
9
+ * `jobs` field in the GraphQL schema, so `listJobs`/`getJob` reuse the calls
10
+ * queries and constrain the result to `kind: job`. No codegen is required for
11
+ * this integration (contrast with `applications`, which is a first-class type).
12
+ */
13
+ export type Job = Call;
14
+
15
+ /** List job postings (calls of kind `job`). */
16
+ export async function listJobs(
17
+ client: UiduClient,
18
+ variables: Parameters<typeof listCalls>[1] = {},
19
+ ): Promise<Awaited<ReturnType<typeof listCalls>>> {
20
+ const calls = await listCalls(client, variables);
21
+ return calls.filter((call) => call.kind === CallKind.Job);
22
+ }
23
+
24
+ /** Fetch a single job posting; returns `null` if the call is not a job. */
25
+ export async function getJob(
26
+ client: UiduClient,
27
+ variables: Parameters<typeof getCall>[1],
28
+ ): Promise<Job | null> {
29
+ const call = await getCall(client, variables);
30
+ if (!call || call.kind !== CallKind.Job) return null;
31
+ return call;
32
+ }
package/src/mutations.ts CHANGED
@@ -11,6 +11,8 @@ import {
11
11
  type CreateContactMutationVariables,
12
12
  CreateCourseDocument,
13
13
  type CreateCourseMutationVariables,
14
+ CreateCompensationDocument,
15
+ type CreateCompensationMutationVariables,
14
16
  CreateDealDocument,
15
17
  type CreateDealMutationVariables,
16
18
  CreateEmployeeDocument,
@@ -29,6 +31,8 @@ import {
29
31
  type DeleteContactMutationVariables,
30
32
  DeleteCourseDocument,
31
33
  type DeleteCourseMutationVariables,
34
+ DeleteCompensationDocument,
35
+ type DeleteCompensationMutationVariables,
32
36
  DeleteDonationCampaignDocument,
33
37
  type DeleteDonationCampaignMutationVariables,
34
38
  DeleteEmploymentDocument,
@@ -47,6 +51,8 @@ import {
47
51
  type DeleteTaskMutationVariables,
48
52
  UpdateChannelDocument,
49
53
  type UpdateChannelMutationVariables,
54
+ UpdateCompensationDocument,
55
+ type UpdateCompensationMutationVariables,
50
56
  UpdateCourseDocument,
51
57
  type UpdateCourseMutationVariables,
52
58
  UpdateDealDocument,
@@ -150,6 +156,17 @@ export async function terminateEmployment(
150
156
  });
151
157
  }
152
158
 
159
+ // --- Compensation (pay items on an employment) ---
160
+ export async function createCompensation(c: UiduClient, v: CreateCompensationMutationVariables) {
161
+ return (await c.mutate(CreateCompensationDocument, v)).createCompensation ?? null;
162
+ }
163
+ export async function updateCompensation(c: UiduClient, v: UpdateCompensationMutationVariables) {
164
+ return (await c.mutate(UpdateCompensationDocument, v)).updateCompensation ?? null;
165
+ }
166
+ export async function deleteCompensation(c: UiduClient, v: DeleteCompensationMutationVariables) {
167
+ return (await c.mutate(DeleteCompensationDocument, v)).deleteCompensation ?? null;
168
+ }
169
+
153
170
  // --- Knowledge base ---
154
171
  export async function createKbCollection(c: UiduClient, v: CreateKbCollectionMutationVariables) {
155
172
  return (await c.mutate(CreateKbCollectionDocument, v)).createKbCollection ?? null;
@@ -1,6 +1,12 @@
1
1
  import { describe, expect, it, vi } from 'vitest';
2
2
  import type { UiduClient } from './client';
3
- import { listCcnls, listRoles, weekStartFor } from './people';
3
+ import {
4
+ type EmployeeContracts,
5
+ contractEvents,
6
+ listCcnls,
7
+ listRoles,
8
+ weekStartFor,
9
+ } from './people';
4
10
 
5
11
  /** Minimal fake client whose `query` returns a fixed `currentWorkspace` payload. */
6
12
  function fakeClient(currentWorkspace: unknown) {
@@ -61,3 +67,80 @@ describe('listCcnls', () => {
61
67
  expect(variables).toMatchObject({ models: ['Ccnl'] });
62
68
  });
63
69
  });
70
+
71
+ describe('contractEvents', () => {
72
+ const employees: EmployeeContracts[] = [
73
+ {
74
+ id: 'e1',
75
+ name: 'Alice',
76
+ employments: [
77
+ // deliberately out of order to exercise the sort
78
+ {
79
+ id: 'c2',
80
+ startDate: '2024-06-01',
81
+ endDate: '2025-03-31',
82
+ endReason: 'contract_end',
83
+ jobTitle: 'Senior Dev',
84
+ contractType: 'determinato',
85
+ ccnl: null,
86
+ compensations: [],
87
+ },
88
+ {
89
+ id: 'c1',
90
+ startDate: '2022-01-15',
91
+ endDate: null,
92
+ endReason: null,
93
+ jobTitle: 'Dev',
94
+ contractType: 'indeterminato',
95
+ ccnl: null,
96
+ compensations: [],
97
+ },
98
+ ],
99
+ },
100
+ {
101
+ id: 'e2',
102
+ name: 'Bob',
103
+ employments: [
104
+ {
105
+ id: 'c3',
106
+ startDate: null, // no start date → ignored
107
+ endDate: null,
108
+ endReason: null,
109
+ jobTitle: null,
110
+ contractType: null,
111
+ ccnl: null,
112
+ compensations: [],
113
+ },
114
+ ],
115
+ },
116
+ ];
117
+
118
+ it('classifies first contract as hire and later ones as variation', () => {
119
+ const events = contractEvents(employees);
120
+ const alice = events.filter((e) => e.employeeId === 'e1');
121
+ expect(alice.find((e) => e.employmentId === 'c1')?.type).toBe('hire');
122
+ // c2 yields both a variation (on its start) and a termination (on its end).
123
+ const c2Types = alice.filter((e) => e.employmentId === 'c2').map((e) => e.type);
124
+ expect(c2Types).toContain('variation');
125
+ expect(c2Types).not.toContain('hire');
126
+ });
127
+
128
+ it('emits a termination event for contracts with an end date', () => {
129
+ const events = contractEvents(employees);
130
+ const term = events.find((e) => e.type === 'termination');
131
+ expect(term).toMatchObject({
132
+ employmentId: 'c2',
133
+ date: '2025-03-31',
134
+ month: '2025-03',
135
+ endReason: 'contract_end',
136
+ });
137
+ });
138
+
139
+ it('ignores contracts without a start date and sorts most-recent first', () => {
140
+ const events = contractEvents(employees);
141
+ // Bob's undated contract produces no events.
142
+ expect(events.some((e) => e.employeeId === 'e2')).toBe(false);
143
+ const dates = events.map((e) => e.date);
144
+ expect(dates).toEqual([...dates].sort().reverse());
145
+ });
146
+ });