@uidu/client 3.1.1 → 3.2.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/CHANGELOG.md +18 -0
- package/dist/declarations/src/generated/index.d.ts +212 -0
- package/dist/declarations/src/index.d.ts +3 -3
- package/dist/declarations/src/mutations.d.ts +122 -1
- package/dist/declarations/src/people.d.ts +23 -1
- package/dist/uidu-client.cjs.dev.js +95 -1
- package/dist/uidu-client.cjs.prod.js +95 -1
- package/dist/uidu-client.esm.js +85 -2
- package/package.json +1 -1
- package/src/generated/index.ts +68 -0
- package/src/index.ts +17 -2
- package/src/mutations.test.ts +43 -0
- package/src/mutations.ts +49 -0
- package/src/people.test.ts +37 -2
- package/src/people.ts +93 -0
- package/src/queries/people/ListCircles.graphql +17 -0
- package/src/queries/people/ListKinds.graphql +18 -0
- package/src/queries/people/ListOffices.graphql +16 -0
- package/src/queries/people/PeopleMutations.graphql +88 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @uidu/client
|
|
2
2
|
|
|
3
|
+
## 3.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5d1f0a9: Add the People/HR authoring domain.
|
|
8
|
+
|
|
9
|
+
`@uidu/client` now exposes employee & employment writes — `createEmployee`,
|
|
10
|
+
`updateEmployee`, `createEmployment`, `updateEmployment`, `deleteEmployment`
|
|
11
|
+
and the semantic helper `terminateEmployment({ id, endDate, endReason })` — plus
|
|
12
|
+
reference-data reads for populating employment forms: `listOffices`,
|
|
13
|
+
`listCircles`, `listRoles` (role-Circles only), `listKinds` and `listCcnls`,
|
|
14
|
+
with exported `Office`, `Circle` and `Kind` types.
|
|
15
|
+
|
|
16
|
+
This makes hires, terminations and contract variations first-class SDK
|
|
17
|
+
operations instead of hand-written GraphQL. The `uidu` CLI gains matching nouns:
|
|
18
|
+
`employees create|update`, `employment create|update|delete`, and
|
|
19
|
+
`offices|roles|ccnls list`.
|
|
20
|
+
|
|
3
21
|
## 3.1.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -44624,6 +44624,33 @@ export type GetEmployeeQuery = {
|
|
|
44624
44624
|
} | null;
|
|
44625
44625
|
} | null;
|
|
44626
44626
|
};
|
|
44627
|
+
export type ListCirclesQueryVariables = Exact<{
|
|
44628
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
44629
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
44630
|
+
}>;
|
|
44631
|
+
export type ListCirclesQuery = {
|
|
44632
|
+
__typename?: 'Query';
|
|
44633
|
+
currentWorkspace?: {
|
|
44634
|
+
__typename?: 'Workspace';
|
|
44635
|
+
circles: {
|
|
44636
|
+
__typename?: 'CircleConnection';
|
|
44637
|
+
pageInfo: {
|
|
44638
|
+
__typename?: 'PageInfo';
|
|
44639
|
+
hasNextPage: boolean;
|
|
44640
|
+
endCursor?: string | null;
|
|
44641
|
+
};
|
|
44642
|
+
edges?: Array<{
|
|
44643
|
+
__typename?: 'CircleEdge';
|
|
44644
|
+
node?: {
|
|
44645
|
+
__typename?: 'Circle';
|
|
44646
|
+
id: string;
|
|
44647
|
+
name?: string | null;
|
|
44648
|
+
kind?: string | null;
|
|
44649
|
+
} | null;
|
|
44650
|
+
} | null> | null;
|
|
44651
|
+
};
|
|
44652
|
+
} | null;
|
|
44653
|
+
};
|
|
44627
44654
|
export type ListEmployeesQueryVariables = Exact<{
|
|
44628
44655
|
first?: InputMaybe<Scalars['Int']['input']>;
|
|
44629
44656
|
after?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -44666,6 +44693,183 @@ export type ListEmployeesQuery = {
|
|
|
44666
44693
|
};
|
|
44667
44694
|
} | null;
|
|
44668
44695
|
};
|
|
44696
|
+
export type ListKindsQueryVariables = Exact<{
|
|
44697
|
+
models: Array<Scalars['String']['input']> | Scalars['String']['input'];
|
|
44698
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
44699
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
44700
|
+
}>;
|
|
44701
|
+
export type ListKindsQuery = {
|
|
44702
|
+
__typename?: 'Query';
|
|
44703
|
+
currentWorkspace?: {
|
|
44704
|
+
__typename?: 'Workspace';
|
|
44705
|
+
kinds?: {
|
|
44706
|
+
__typename?: 'KindConnection';
|
|
44707
|
+
pageInfo: {
|
|
44708
|
+
__typename?: 'PageInfo';
|
|
44709
|
+
hasNextPage: boolean;
|
|
44710
|
+
endCursor?: string | null;
|
|
44711
|
+
};
|
|
44712
|
+
edges?: Array<{
|
|
44713
|
+
__typename?: 'KindEdge';
|
|
44714
|
+
node?: {
|
|
44715
|
+
__typename?: 'Kind';
|
|
44716
|
+
id: string;
|
|
44717
|
+
name?: string | null;
|
|
44718
|
+
code?: string | null;
|
|
44719
|
+
model?: string | null;
|
|
44720
|
+
} | null;
|
|
44721
|
+
} | null> | null;
|
|
44722
|
+
} | null;
|
|
44723
|
+
} | null;
|
|
44724
|
+
};
|
|
44725
|
+
export type ListOfficesQueryVariables = Exact<{
|
|
44726
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
44727
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
44728
|
+
}>;
|
|
44729
|
+
export type ListOfficesQuery = {
|
|
44730
|
+
__typename?: 'Query';
|
|
44731
|
+
currentWorkspace?: {
|
|
44732
|
+
__typename?: 'Workspace';
|
|
44733
|
+
offices?: {
|
|
44734
|
+
__typename?: 'OfficeConnection';
|
|
44735
|
+
pageInfo: {
|
|
44736
|
+
__typename?: 'PageInfo';
|
|
44737
|
+
hasNextPage: boolean;
|
|
44738
|
+
endCursor?: string | null;
|
|
44739
|
+
};
|
|
44740
|
+
edges?: Array<{
|
|
44741
|
+
__typename?: 'OfficeEdge';
|
|
44742
|
+
node?: {
|
|
44743
|
+
__typename?: 'Office';
|
|
44744
|
+
id: string;
|
|
44745
|
+
name?: string | null;
|
|
44746
|
+
} | null;
|
|
44747
|
+
} | null> | null;
|
|
44748
|
+
} | null;
|
|
44749
|
+
} | null;
|
|
44750
|
+
};
|
|
44751
|
+
export type CreateEmployeeMutationVariables = Exact<{
|
|
44752
|
+
input: CreateEmployeeInput;
|
|
44753
|
+
}>;
|
|
44754
|
+
export type CreateEmployeeMutation = {
|
|
44755
|
+
__typename?: 'Mutation';
|
|
44756
|
+
createEmployee?: {
|
|
44757
|
+
__typename?: 'CreateEmployeePayload';
|
|
44758
|
+
employee?: {
|
|
44759
|
+
__typename?: 'EmployeeEdge';
|
|
44760
|
+
node?: {
|
|
44761
|
+
__typename?: 'Employee';
|
|
44762
|
+
id: string;
|
|
44763
|
+
employeeCode?: string | null;
|
|
44764
|
+
user?: {
|
|
44765
|
+
__typename?: 'User';
|
|
44766
|
+
id: string;
|
|
44767
|
+
name?: string | null;
|
|
44768
|
+
email?: string | null;
|
|
44769
|
+
} | null;
|
|
44770
|
+
} | null;
|
|
44771
|
+
} | null;
|
|
44772
|
+
errors: Array<{
|
|
44773
|
+
__typename?: 'Error';
|
|
44774
|
+
key: string;
|
|
44775
|
+
name: string;
|
|
44776
|
+
type: string;
|
|
44777
|
+
}>;
|
|
44778
|
+
} | null;
|
|
44779
|
+
};
|
|
44780
|
+
export type UpdateEmployeeMutationVariables = Exact<{
|
|
44781
|
+
input: UpdateEmployeeInput;
|
|
44782
|
+
}>;
|
|
44783
|
+
export type UpdateEmployeeMutation = {
|
|
44784
|
+
__typename?: 'Mutation';
|
|
44785
|
+
updateEmployee?: {
|
|
44786
|
+
__typename?: 'UpdateEmployeePayload';
|
|
44787
|
+
employee?: {
|
|
44788
|
+
__typename?: 'Employee';
|
|
44789
|
+
id: string;
|
|
44790
|
+
employeeCode?: string | null;
|
|
44791
|
+
} | null;
|
|
44792
|
+
errors: Array<{
|
|
44793
|
+
__typename?: 'Error';
|
|
44794
|
+
key: string;
|
|
44795
|
+
name: string;
|
|
44796
|
+
type: string;
|
|
44797
|
+
}>;
|
|
44798
|
+
} | null;
|
|
44799
|
+
};
|
|
44800
|
+
export type CreateEmploymentMutationVariables = Exact<{
|
|
44801
|
+
input: CreateEmploymentInput;
|
|
44802
|
+
}>;
|
|
44803
|
+
export type CreateEmploymentMutation = {
|
|
44804
|
+
__typename?: 'Mutation';
|
|
44805
|
+
createEmployment?: {
|
|
44806
|
+
__typename?: 'CreateEmploymentPayload';
|
|
44807
|
+
employment?: {
|
|
44808
|
+
__typename?: 'EmploymentEdge';
|
|
44809
|
+
node?: {
|
|
44810
|
+
__typename?: 'Employment';
|
|
44811
|
+
id: string;
|
|
44812
|
+
jobTitle?: string | null;
|
|
44813
|
+
contractType?: string | null;
|
|
44814
|
+
classification?: string | null;
|
|
44815
|
+
startDate: any;
|
|
44816
|
+
endDate?: any | null;
|
|
44817
|
+
isActive: boolean;
|
|
44818
|
+
} | null;
|
|
44819
|
+
} | null;
|
|
44820
|
+
errors: Array<{
|
|
44821
|
+
__typename?: 'Error';
|
|
44822
|
+
key: string;
|
|
44823
|
+
name: string;
|
|
44824
|
+
type: string;
|
|
44825
|
+
}>;
|
|
44826
|
+
} | null;
|
|
44827
|
+
};
|
|
44828
|
+
export type UpdateEmploymentMutationVariables = Exact<{
|
|
44829
|
+
input: UpdateEmploymentInput;
|
|
44830
|
+
}>;
|
|
44831
|
+
export type UpdateEmploymentMutation = {
|
|
44832
|
+
__typename?: 'Mutation';
|
|
44833
|
+
updateEmployment?: {
|
|
44834
|
+
__typename?: 'UpdateEmploymentPayload';
|
|
44835
|
+
employment?: {
|
|
44836
|
+
__typename?: 'Employment';
|
|
44837
|
+
id: string;
|
|
44838
|
+
jobTitle?: string | null;
|
|
44839
|
+
contractType?: string | null;
|
|
44840
|
+
classification?: string | null;
|
|
44841
|
+
startDate: any;
|
|
44842
|
+
endDate?: any | null;
|
|
44843
|
+
endReason?: string | null;
|
|
44844
|
+
isActive: boolean;
|
|
44845
|
+
} | null;
|
|
44846
|
+
errors: Array<{
|
|
44847
|
+
__typename?: 'Error';
|
|
44848
|
+
key: string;
|
|
44849
|
+
name: string;
|
|
44850
|
+
type: string;
|
|
44851
|
+
}>;
|
|
44852
|
+
} | null;
|
|
44853
|
+
};
|
|
44854
|
+
export type DeleteEmploymentMutationVariables = Exact<{
|
|
44855
|
+
input: DeleteEmploymentInput;
|
|
44856
|
+
}>;
|
|
44857
|
+
export type DeleteEmploymentMutation = {
|
|
44858
|
+
__typename?: 'Mutation';
|
|
44859
|
+
deleteEmployment?: {
|
|
44860
|
+
__typename?: 'DeleteEmploymentPayload';
|
|
44861
|
+
employment?: {
|
|
44862
|
+
__typename?: 'Employment';
|
|
44863
|
+
id: string;
|
|
44864
|
+
} | null;
|
|
44865
|
+
errors: Array<{
|
|
44866
|
+
__typename?: 'Error';
|
|
44867
|
+
key: string;
|
|
44868
|
+
name: string;
|
|
44869
|
+
type: string;
|
|
44870
|
+
}>;
|
|
44871
|
+
} | null;
|
|
44872
|
+
};
|
|
44669
44873
|
export type SearchQueryVariables = Exact<{
|
|
44670
44874
|
models?: InputMaybe<Array<Scalars['String']['input']> | Scalars['String']['input']>;
|
|
44671
44875
|
params?: InputMaybe<SearchParams>;
|
|
@@ -45125,7 +45329,15 @@ export declare const CreateNoteDocument: DocumentNode<CreateNoteMutation, Create
|
|
|
45125
45329
|
export declare const UpdateNoteDocument: DocumentNode<UpdateNoteMutation, UpdateNoteMutationVariables>;
|
|
45126
45330
|
export declare const DeleteNoteDocument: DocumentNode<DeleteNoteMutation, DeleteNoteMutationVariables>;
|
|
45127
45331
|
export declare const GetEmployeeDocument: DocumentNode<GetEmployeeQuery, GetEmployeeQueryVariables>;
|
|
45332
|
+
export declare const ListCirclesDocument: DocumentNode<ListCirclesQuery, ListCirclesQueryVariables>;
|
|
45128
45333
|
export declare const ListEmployeesDocument: DocumentNode<ListEmployeesQuery, ListEmployeesQueryVariables>;
|
|
45334
|
+
export declare const ListKindsDocument: DocumentNode<ListKindsQuery, ListKindsQueryVariables>;
|
|
45335
|
+
export declare const ListOfficesDocument: DocumentNode<ListOfficesQuery, ListOfficesQueryVariables>;
|
|
45336
|
+
export declare const CreateEmployeeDocument: DocumentNode<CreateEmployeeMutation, CreateEmployeeMutationVariables>;
|
|
45337
|
+
export declare const UpdateEmployeeDocument: DocumentNode<UpdateEmployeeMutation, UpdateEmployeeMutationVariables>;
|
|
45338
|
+
export declare const CreateEmploymentDocument: DocumentNode<CreateEmploymentMutation, CreateEmploymentMutationVariables>;
|
|
45339
|
+
export declare const UpdateEmploymentDocument: DocumentNode<UpdateEmploymentMutation, UpdateEmploymentMutationVariables>;
|
|
45340
|
+
export declare const DeleteEmploymentDocument: DocumentNode<DeleteEmploymentMutation, DeleteEmploymentMutationVariables>;
|
|
45129
45341
|
export declare const SearchDocument: DocumentNode<SearchQuery, SearchQueryVariables>;
|
|
45130
45342
|
export declare const CreateSpaceDocument: DocumentNode<CreateSpaceMutation, CreateSpaceMutationVariables>;
|
|
45131
45343
|
export declare const UpdateSpaceDocument: DocumentNode<UpdateSpaceMutation, UpdateSpaceMutationVariables>;
|
|
@@ -10,7 +10,7 @@ export { createWorkspace, generateWorkspaceApiCredentials, } from "./system.js";
|
|
|
10
10
|
export { createSpace } from "./spaces.js";
|
|
11
11
|
export { createTask } from "./tasks.js";
|
|
12
12
|
export { createNote } from "./notes.js";
|
|
13
|
-
export { createCourse, updateCourse, deleteCourse, createForm, updateForm, deleteForm, createContact, deleteContact, createDeal, updateDeal, createKbCollection, updateKbCollection, deleteKbCollection, createKbArticle, updateKbArticle, deleteKbArticle, createChannel, updateChannel, deleteChannel, updateEvent, updateStory, updateDonationCampaign, deleteDonationCampaign, updateTask, deleteTask, updateNote, deleteNote, updateSpace, deleteSpace, } from "./mutations.js";
|
|
13
|
+
export { createCourse, updateCourse, deleteCourse, createForm, updateForm, deleteForm, createContact, deleteContact, createDeal, updateDeal, createKbCollection, updateKbCollection, deleteKbCollection, createKbArticle, updateKbArticle, deleteKbArticle, createChannel, updateChannel, deleteChannel, updateEvent, updateStory, updateDonationCampaign, deleteDonationCampaign, updateTask, deleteTask, updateNote, deleteNote, updateSpace, deleteSpace, createEmployee, updateEmployee, createEmployment, updateEmployment, deleteEmployment, terminateEmployment, } from "./mutations.js";
|
|
14
14
|
export { getForm, listForms, createFormResponse, updateFormResponse, } from "./forms.js";
|
|
15
15
|
export type { Form } from "./forms.js";
|
|
16
16
|
export { getChannel } from "./help-center.js";
|
|
@@ -25,8 +25,8 @@ export { getDonationCampaign, listDonationCampaigns, createDonation, createDonat
|
|
|
25
25
|
export type { DonationCampaign } from "./donations.js";
|
|
26
26
|
export { getStory, listStories, createStory } from "./stories.js";
|
|
27
27
|
export type { Story } from "./stories.js";
|
|
28
|
-
export { listEmployees, getEmployee, weekStartFor } from "./people.js";
|
|
29
|
-
export type { Employee } from "./people.js";
|
|
28
|
+
export { listEmployees, getEmployee, weekStartFor, listOffices, listCircles, listRoles, listKinds, listCcnls, } from "./people.js";
|
|
29
|
+
export type { Employee, Office, Circle, Kind } from "./people.js";
|
|
30
30
|
export { getBooking, listBookings, getCalendar, listCalendars, getCalendarEvent, listCalendarEvents, } from "./bookings.js";
|
|
31
31
|
export type { Booking, Calendar, CalendarEvent } from "./bookings.js";
|
|
32
32
|
export { getCourse, listCourses, getEnrollment, listEnrollments, getLecture, listLectures, } from "./courses.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
|
-
import { type CreateChannelMutationVariables, type CreateContactMutationVariables, type CreateCourseMutationVariables, type CreateDealMutationVariables, type CreateFormMutationVariables, type CreateKbArticleMutationVariables, type CreateKbCollectionMutationVariables, type DeleteChannelMutationVariables, type DeleteContactMutationVariables, type DeleteCourseMutationVariables, type DeleteDonationCampaignMutationVariables, type DeleteFormMutationVariables, type DeleteKbArticleMutationVariables, type DeleteKbCollectionMutationVariables, type DeleteNoteMutationVariables, type DeleteSpaceMutationVariables, type DeleteTaskMutationVariables, type UpdateChannelMutationVariables, type UpdateCourseMutationVariables, type UpdateDealMutationVariables, type UpdateDonationCampaignMutationVariables, type UpdateEventMutationVariables, type UpdateFormMutationVariables, type UpdateKbArticleMutationVariables, type UpdateKbCollectionMutationVariables, type UpdateNoteMutationVariables, type UpdateSpaceMutationVariables, type UpdateStoryMutationVariables, type UpdateTaskMutationVariables } from "./generated/index.js";
|
|
2
|
+
import { type CreateChannelMutationVariables, type CreateContactMutationVariables, type CreateCourseMutationVariables, type CreateDealMutationVariables, type CreateEmployeeMutationVariables, type CreateEmploymentMutationVariables, type CreateFormMutationVariables, type CreateKbArticleMutationVariables, type CreateKbCollectionMutationVariables, type DeleteChannelMutationVariables, type DeleteContactMutationVariables, type DeleteCourseMutationVariables, type DeleteDonationCampaignMutationVariables, type DeleteEmploymentMutationVariables, type DeleteFormMutationVariables, type DeleteKbArticleMutationVariables, type DeleteKbCollectionMutationVariables, type DeleteNoteMutationVariables, type DeleteSpaceMutationVariables, type DeleteTaskMutationVariables, type UpdateChannelMutationVariables, type UpdateCourseMutationVariables, type UpdateDealMutationVariables, type UpdateDonationCampaignMutationVariables, type UpdateEmployeeMutationVariables, type UpdateEmploymentMutationVariables, type UpdateEventMutationVariables, type UpdateFormMutationVariables, type UpdateKbArticleMutationVariables, type UpdateKbCollectionMutationVariables, type UpdateNoteMutationVariables, type UpdateSpaceMutationVariables, type UpdateStoryMutationVariables, type UpdateTaskMutationVariables } from "./generated/index.js";
|
|
3
3
|
export declare function createCourse(c: UiduClient, v: CreateCourseMutationVariables): Promise<{
|
|
4
4
|
__typename?: "CreateCoursePayload";
|
|
5
5
|
course?: {
|
|
@@ -136,6 +136,127 @@ export declare function updateDeal(c: UiduClient, v: UpdateDealMutationVariables
|
|
|
136
136
|
type: string;
|
|
137
137
|
}>;
|
|
138
138
|
} | null>;
|
|
139
|
+
export declare function createEmployee(c: UiduClient, v: CreateEmployeeMutationVariables): Promise<{
|
|
140
|
+
__typename?: "CreateEmployeePayload";
|
|
141
|
+
employee?: {
|
|
142
|
+
__typename?: "EmployeeEdge";
|
|
143
|
+
node?: {
|
|
144
|
+
__typename?: "Employee";
|
|
145
|
+
id: string;
|
|
146
|
+
employeeCode?: string | null;
|
|
147
|
+
user?: {
|
|
148
|
+
__typename?: "User";
|
|
149
|
+
id: string;
|
|
150
|
+
name?: string | null;
|
|
151
|
+
email?: string | null;
|
|
152
|
+
} | null;
|
|
153
|
+
} | null;
|
|
154
|
+
} | null;
|
|
155
|
+
errors: Array<{
|
|
156
|
+
__typename?: "Error";
|
|
157
|
+
key: string;
|
|
158
|
+
name: string;
|
|
159
|
+
type: string;
|
|
160
|
+
}>;
|
|
161
|
+
} | null>;
|
|
162
|
+
export declare function updateEmployee(c: UiduClient, v: UpdateEmployeeMutationVariables): Promise<{
|
|
163
|
+
__typename?: "UpdateEmployeePayload";
|
|
164
|
+
employee?: {
|
|
165
|
+
__typename?: "Employee";
|
|
166
|
+
id: string;
|
|
167
|
+
employeeCode?: string | null;
|
|
168
|
+
} | null;
|
|
169
|
+
errors: Array<{
|
|
170
|
+
__typename?: "Error";
|
|
171
|
+
key: string;
|
|
172
|
+
name: string;
|
|
173
|
+
type: string;
|
|
174
|
+
}>;
|
|
175
|
+
} | null>;
|
|
176
|
+
export declare function createEmployment(c: UiduClient, v: CreateEmploymentMutationVariables): Promise<{
|
|
177
|
+
__typename?: "CreateEmploymentPayload";
|
|
178
|
+
employment?: {
|
|
179
|
+
__typename?: "EmploymentEdge";
|
|
180
|
+
node?: {
|
|
181
|
+
__typename?: "Employment";
|
|
182
|
+
id: string;
|
|
183
|
+
jobTitle?: string | null;
|
|
184
|
+
contractType?: string | null;
|
|
185
|
+
classification?: string | null;
|
|
186
|
+
startDate: any;
|
|
187
|
+
endDate?: any | null;
|
|
188
|
+
isActive: boolean;
|
|
189
|
+
} | null;
|
|
190
|
+
} | null;
|
|
191
|
+
errors: Array<{
|
|
192
|
+
__typename?: "Error";
|
|
193
|
+
key: string;
|
|
194
|
+
name: string;
|
|
195
|
+
type: string;
|
|
196
|
+
}>;
|
|
197
|
+
} | null>;
|
|
198
|
+
export declare function updateEmployment(c: UiduClient, v: UpdateEmploymentMutationVariables): Promise<{
|
|
199
|
+
__typename?: "UpdateEmploymentPayload";
|
|
200
|
+
employment?: {
|
|
201
|
+
__typename?: "Employment";
|
|
202
|
+
id: string;
|
|
203
|
+
jobTitle?: string | null;
|
|
204
|
+
contractType?: string | null;
|
|
205
|
+
classification?: string | null;
|
|
206
|
+
startDate: any;
|
|
207
|
+
endDate?: any | null;
|
|
208
|
+
endReason?: string | null;
|
|
209
|
+
isActive: boolean;
|
|
210
|
+
} | null;
|
|
211
|
+
errors: Array<{
|
|
212
|
+
__typename?: "Error";
|
|
213
|
+
key: string;
|
|
214
|
+
name: string;
|
|
215
|
+
type: string;
|
|
216
|
+
}>;
|
|
217
|
+
} | null>;
|
|
218
|
+
export declare function deleteEmployment(c: UiduClient, v: DeleteEmploymentMutationVariables): Promise<{
|
|
219
|
+
__typename?: "DeleteEmploymentPayload";
|
|
220
|
+
employment?: {
|
|
221
|
+
__typename?: "Employment";
|
|
222
|
+
id: string;
|
|
223
|
+
} | null;
|
|
224
|
+
errors: Array<{
|
|
225
|
+
__typename?: "Error";
|
|
226
|
+
key: string;
|
|
227
|
+
name: string;
|
|
228
|
+
type: string;
|
|
229
|
+
}>;
|
|
230
|
+
} | null>;
|
|
231
|
+
/**
|
|
232
|
+
* Terminate (cessazione) an employment by closing it with an end date and
|
|
233
|
+
* reason. Thin semantic wrapper over {@link updateEmployment}.
|
|
234
|
+
* `endReason` is one of: resignation, termination, contract_end, retirement, other.
|
|
235
|
+
*/
|
|
236
|
+
export declare function terminateEmployment(c: UiduClient, args: {
|
|
237
|
+
id: string;
|
|
238
|
+
endDate: string;
|
|
239
|
+
endReason?: string;
|
|
240
|
+
}): Promise<{
|
|
241
|
+
__typename?: "UpdateEmploymentPayload";
|
|
242
|
+
employment?: {
|
|
243
|
+
__typename?: "Employment";
|
|
244
|
+
id: string;
|
|
245
|
+
jobTitle?: string | null;
|
|
246
|
+
contractType?: string | null;
|
|
247
|
+
classification?: string | null;
|
|
248
|
+
startDate: any;
|
|
249
|
+
endDate?: any | null;
|
|
250
|
+
endReason?: string | null;
|
|
251
|
+
isActive: boolean;
|
|
252
|
+
} | null;
|
|
253
|
+
errors: Array<{
|
|
254
|
+
__typename?: "Error";
|
|
255
|
+
key: string;
|
|
256
|
+
name: string;
|
|
257
|
+
type: string;
|
|
258
|
+
}>;
|
|
259
|
+
} | null>;
|
|
139
260
|
export declare function createKbCollection(c: UiduClient, v: CreateKbCollectionMutationVariables): Promise<{
|
|
140
261
|
__typename?: "CreateKbCollectionPayload";
|
|
141
262
|
kbCollection?: {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
|
-
import { type GetEmployeeQuery, type GetEmployeeQueryVariables, type ListEmployeesQueryVariables } from "./generated/index.js";
|
|
2
|
+
import { type GetEmployeeQuery, type GetEmployeeQueryVariables, type ListCirclesQuery, type ListCirclesQueryVariables, type ListEmployeesQueryVariables, type ListKindsQuery, type ListKindsQueryVariables, type ListOfficesQuery, type ListOfficesQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Employee = NonNullable<NonNullable<GetEmployeeQuery['currentWorkspace']>['employee']>;
|
|
4
|
+
export type Circle = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListCirclesQuery['currentWorkspace']>['circles']>['edges']>[number]>['node']>;
|
|
5
|
+
export type Office = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListOfficesQuery['currentWorkspace']>['offices']>['edges']>[number]>['node']>;
|
|
6
|
+
/** A `Kind` record — CCNLs (national collective labor contracts) are Kinds. */
|
|
7
|
+
export type Kind = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListKindsQuery['currentWorkspace']>['kinds']>['edges']>[number]>['node']>;
|
|
4
8
|
export declare function listEmployees(client: UiduClient, variables?: ListEmployeesQueryVariables): Promise<{
|
|
5
9
|
__typename?: "Employee";
|
|
6
10
|
id: string;
|
|
@@ -29,3 +33,21 @@ export declare function getEmployee(client: UiduClient, variables: GetEmployeeQu
|
|
|
29
33
|
* other weekly-aggregated employee fields).
|
|
30
34
|
*/
|
|
31
35
|
export declare function weekStartFor(date?: Date): string;
|
|
36
|
+
/** List the workspace offices — used for an employment's `employmentOfficesAttributes`. */
|
|
37
|
+
export declare function listOffices(client: UiduClient, variables?: ListOfficesQueryVariables): Promise<Office[]>;
|
|
38
|
+
/**
|
|
39
|
+
* List the workspace circles. Circles come in two flavours distinguished by
|
|
40
|
+
* `kind`: org units (e.g. departments — used as an employment's `circleId`) and
|
|
41
|
+
* roles (`kind === 'role'` — used as an employment's `roleId`). Use
|
|
42
|
+
* {@link listRoles} when you only want the role-Circles.
|
|
43
|
+
*/
|
|
44
|
+
export declare function listCircles(client: UiduClient, variables?: ListCirclesQueryVariables): Promise<Circle[]>;
|
|
45
|
+
/** List only the role-Circles (structured job titles) — an employment's `roleId`. */
|
|
46
|
+
export declare function listRoles(client: UiduClient, variables?: ListCirclesQueryVariables): Promise<Circle[]>;
|
|
47
|
+
/** List `Kind` records for the given polymorphic models. */
|
|
48
|
+
export declare function listKinds(client: UiduClient, variables: ListKindsQueryVariables): Promise<Kind[]>;
|
|
49
|
+
/**
|
|
50
|
+
* List the CCNLs (national collective labor contracts) configured for the
|
|
51
|
+
* workspace — used for an employment's `ccnlId`.
|
|
52
|
+
*/
|
|
53
|
+
export declare function listCcnls(client: UiduClient, variables?: Omit<ListKindsQueryVariables, 'models'>): Promise<Kind[]>;
|