@uidu/client 3.0.0 → 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 +35 -0
- package/README.md +56 -0
- package/dist/declarations/src/bookings.d.ts +58 -0
- package/dist/declarations/src/calls.d.ts +26 -0
- package/dist/declarations/src/campaigns.d.ts +39 -0
- package/dist/declarations/src/client.d.ts +10 -0
- package/dist/declarations/src/cms.d.ts +75 -0
- package/dist/declarations/src/contacts.d.ts +36 -0
- package/dist/declarations/src/courses.d.ts +68 -0
- package/dist/declarations/src/donations.d.ts +51 -0
- package/dist/declarations/src/events.d.ts +59 -0
- package/dist/declarations/src/forms.d.ts +69 -0
- package/dist/declarations/src/generated/index.d.ts +45354 -0
- package/dist/declarations/src/help-center.d.ts +4 -0
- package/dist/declarations/src/index.d.ts +39 -0
- package/dist/declarations/src/kb.d.ts +30 -0
- package/dist/declarations/src/mutations.d.ts +515 -0
- package/dist/declarations/src/notes.d.ts +18 -0
- package/dist/declarations/src/people.d.ts +53 -0
- package/dist/declarations/src/search.d.ts +4 -0
- package/dist/declarations/src/spaces.d.ts +19 -0
- package/dist/declarations/src/stories.d.ts +28 -0
- package/dist/declarations/src/system.d.ts +36 -0
- package/dist/declarations/src/tasks.d.ts +16 -0
- package/dist/declarations/src/types.d.ts +19 -0
- package/dist/declarations/src/utils/paginate.d.ts +34 -0
- package/dist/uidu-client.cjs.d.ts +2 -2
- package/dist/uidu-client.cjs.dev.js +682 -0
- package/dist/uidu-client.cjs.js +6 -15
- package/dist/uidu-client.cjs.prod.js +682 -0
- package/dist/uidu-client.esm.js +560 -0
- package/package.json +8 -3
- package/src/cms.ts +43 -0
- package/src/donations.ts +10 -0
- package/src/events.ts +10 -0
- package/src/generated/index.ts +2967 -84
- package/src/index.ts +70 -5
- package/src/mutations.test.ts +43 -0
- package/src/mutations.ts +216 -0
- package/src/notes.ts +15 -0
- package/src/people.test.ts +63 -0
- package/src/people.ts +93 -0
- package/src/queries/cms/CreateFieldValue.graphql +16 -0
- package/src/queries/cms/CreatePage.graphql +15 -0
- package/src/queries/cms/CreatePageBlock.graphql +14 -0
- package/src/queries/cms/CreateProject.graphql +16 -0
- package/src/queries/contacts/ContactMutations.graphql +53 -0
- package/src/queries/courses/CourseMutations.graphql +38 -0
- package/src/queries/donations/CreateDonationCampaign.graphql +13 -0
- package/src/queries/donations/DonationCampaignMutations.graphql +25 -0
- package/src/queries/events/CreateEvent.graphql +13 -0
- package/src/queries/events/UpdateEvent.graphql +12 -0
- package/src/queries/forms/FormMutations.graphql +40 -0
- package/src/queries/help-center/ChannelMutations.graphql +40 -0
- package/src/queries/kb/KbMutations.graphql +81 -0
- package/src/queries/notes/CreateNote.graphql +14 -0
- package/src/queries/notes/NoteMutations.graphql +25 -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/src/queries/spaces/CreateSpace.graphql +15 -0
- package/src/queries/spaces/SpaceMutations.graphql +25 -0
- package/src/queries/stories/CreateStory.graphql +13 -0
- package/src/queries/stories/UpdateStory.graphql +12 -0
- package/src/queries/system/CreateWorkspace.graphql +15 -0
- package/src/queries/system/GenerateWorkspaceApiCredentials.graphql +18 -0
- package/src/queries/tasks/CreateTask.graphql +13 -0
- package/src/queries/tasks/TaskMutations.graphql +25 -0
- package/src/spaces.ts +15 -0
- package/src/stories.ts +10 -0
- package/src/system.ts +33 -0
- package/src/tasks.ts +15 -0
- package/src/utils/paginate.test.ts +116 -0
- package/src/utils/relay.test.ts +35 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.js";
|
|
2
|
+
import { type GetChannelQuery, type GetChannelQueryVariables } from "./generated/index.js";
|
|
3
|
+
export type Channel = NonNullable<NonNullable<GetChannelQuery['currentWorkspace']>['channel']>;
|
|
4
|
+
export declare function getChannel(client: UiduClient, variables: GetChannelQueryVariables): Promise<Channel | null>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export { UiduClient, createClient } from "./client.js";
|
|
2
|
+
export { UiduError } from "./types.js";
|
|
3
|
+
export type { UiduClientConfig, UiduErrorOptions } from "./types.js";
|
|
4
|
+
export { paginate } from "./utils/paginate.js";
|
|
5
|
+
export type { PaginateOptions } from "./utils/paginate.js";
|
|
6
|
+
export { ListBookingsDocument, ListCalendarsDocument, ListCalendarEventsDocument, ListCallsDocument, ListCampaignsDocument, ListEmailCampaignsDocument, ListCoursesDocument, ListDealsDocument, ListDonationCampaignsDocument, ListEmployeesDocument, ListEnrollmentsDocument, ListEventsDocument, ListFormsDocument, ListKbArticlesDocument, ListKbCollectionsDocument, ListLecturesDocument, ListPagesDocument, ListStoriesDocument, } from "./generated/index.js";
|
|
7
|
+
export { getPage, listPages, getTemplate, createProject, createPage, createPageBlock, createFieldValue, } from "./cms.js";
|
|
8
|
+
export type { Page, Template } from "./cms.js";
|
|
9
|
+
export { createWorkspace, generateWorkspaceApiCredentials, } from "./system.js";
|
|
10
|
+
export { createSpace } from "./spaces.js";
|
|
11
|
+
export { createTask } from "./tasks.js";
|
|
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, createEmployee, updateEmployee, createEmployment, updateEmployment, deleteEmployment, terminateEmployment, } from "./mutations.js";
|
|
14
|
+
export { getForm, listForms, createFormResponse, updateFormResponse, } from "./forms.js";
|
|
15
|
+
export type { Form } from "./forms.js";
|
|
16
|
+
export { getChannel } from "./help-center.js";
|
|
17
|
+
export type { Channel } from "./help-center.js";
|
|
18
|
+
export { search } from "./search.js";
|
|
19
|
+
export type { SearchResult } from "./search.js";
|
|
20
|
+
export { getEvent, listEvents, createAttendance, createEvent } from "./events.js";
|
|
21
|
+
export type { Event } from "./events.js";
|
|
22
|
+
export { getCall, listCalls } from "./calls.js";
|
|
23
|
+
export type { Call } from "./calls.js";
|
|
24
|
+
export { getDonationCampaign, listDonationCampaigns, createDonation, createDonationCampaign, } from "./donations.js";
|
|
25
|
+
export type { DonationCampaign } from "./donations.js";
|
|
26
|
+
export { getStory, listStories, createStory } from "./stories.js";
|
|
27
|
+
export type { Story } from "./stories.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
|
+
export { getBooking, listBookings, getCalendar, listCalendars, getCalendarEvent, listCalendarEvents, } from "./bookings.js";
|
|
31
|
+
export type { Booking, Calendar, CalendarEvent } from "./bookings.js";
|
|
32
|
+
export { getCourse, listCourses, getEnrollment, listEnrollments, getLecture, listLectures, } from "./courses.js";
|
|
33
|
+
export type { Course, Enrollment, Lecture } from "./courses.js";
|
|
34
|
+
export { getCampaign, listCampaigns, listEmailCampaigns, } from "./campaigns.js";
|
|
35
|
+
export type { Campaign } from "./campaigns.js";
|
|
36
|
+
export { getContact, listContacts, getDeal, listDeals, } from "./contacts.js";
|
|
37
|
+
export type { Contact, Deal } from "./contacts.js";
|
|
38
|
+
export { getKbArticle, listKbArticles, getKbCollection, listKbCollections, } from "./kb.js";
|
|
39
|
+
export type { KbArticle, KbCollection } from "./kb.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.js";
|
|
2
|
+
import { type GetKbArticleQuery, type GetKbArticleQueryVariables, type GetKbCollectionQuery, type GetKbCollectionQueryVariables, type ListKbArticlesQueryVariables, type ListKbCollectionsQueryVariables } from "./generated/index.js";
|
|
3
|
+
export type KbArticle = NonNullable<NonNullable<GetKbArticleQuery['currentWorkspace']>['kbArticle']>;
|
|
4
|
+
export type KbCollection = NonNullable<NonNullable<GetKbCollectionQuery['currentWorkspace']>['kbCollection']>;
|
|
5
|
+
export declare function getKbArticle(client: UiduClient, variables: GetKbArticleQueryVariables): Promise<KbArticle | null>;
|
|
6
|
+
export declare function listKbArticles(client: UiduClient, variables?: ListKbArticlesQueryVariables): Promise<{
|
|
7
|
+
__typename?: "KbArticle";
|
|
8
|
+
id: string;
|
|
9
|
+
name?: string | null;
|
|
10
|
+
position: number;
|
|
11
|
+
isDraft?: boolean | null;
|
|
12
|
+
createdAt: any;
|
|
13
|
+
updatedAt: any;
|
|
14
|
+
kbCollection?: {
|
|
15
|
+
__typename?: "KbCollection";
|
|
16
|
+
id: string;
|
|
17
|
+
name?: any | null;
|
|
18
|
+
} | null;
|
|
19
|
+
}[]>;
|
|
20
|
+
export declare function getKbCollection(client: UiduClient, variables: GetKbCollectionQueryVariables): Promise<KbCollection | null>;
|
|
21
|
+
export declare function listKbCollections(client: UiduClient, variables?: ListKbCollectionsQueryVariables): Promise<{
|
|
22
|
+
__typename?: "KbCollection";
|
|
23
|
+
id: string;
|
|
24
|
+
name?: any | null;
|
|
25
|
+
description?: any | null;
|
|
26
|
+
iconData?: any | null;
|
|
27
|
+
position: number;
|
|
28
|
+
createdAt: any;
|
|
29
|
+
updatedAt: any;
|
|
30
|
+
}[]>;
|
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.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
|
+
export declare function createCourse(c: UiduClient, v: CreateCourseMutationVariables): Promise<{
|
|
4
|
+
__typename?: "CreateCoursePayload";
|
|
5
|
+
course?: {
|
|
6
|
+
__typename?: "Course";
|
|
7
|
+
id: string;
|
|
8
|
+
} | null;
|
|
9
|
+
errors: Array<{
|
|
10
|
+
__typename?: "Error";
|
|
11
|
+
key: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
}>;
|
|
15
|
+
} | null>;
|
|
16
|
+
export declare function updateCourse(c: UiduClient, v: UpdateCourseMutationVariables): Promise<{
|
|
17
|
+
__typename?: "UpdateCoursePayload";
|
|
18
|
+
course?: {
|
|
19
|
+
__typename?: "Course";
|
|
20
|
+
id: string;
|
|
21
|
+
} | null;
|
|
22
|
+
errors: Array<{
|
|
23
|
+
__typename?: "Error";
|
|
24
|
+
key: string;
|
|
25
|
+
name: string;
|
|
26
|
+
type: string;
|
|
27
|
+
}>;
|
|
28
|
+
} | null>;
|
|
29
|
+
export declare function deleteCourse(c: UiduClient, v: DeleteCourseMutationVariables): Promise<{
|
|
30
|
+
__typename?: "DeleteCoursePayload";
|
|
31
|
+
course?: {
|
|
32
|
+
__typename?: "Course";
|
|
33
|
+
id: string;
|
|
34
|
+
} | null;
|
|
35
|
+
errors: Array<{
|
|
36
|
+
__typename?: "Error";
|
|
37
|
+
key: string;
|
|
38
|
+
name: string;
|
|
39
|
+
type: string;
|
|
40
|
+
}>;
|
|
41
|
+
} | null>;
|
|
42
|
+
export declare function createForm(c: UiduClient, v: CreateFormMutationVariables): Promise<{
|
|
43
|
+
__typename?: "CreateFormPayload";
|
|
44
|
+
form?: {
|
|
45
|
+
__typename?: "FormEdge";
|
|
46
|
+
node?: {
|
|
47
|
+
__typename?: "Form";
|
|
48
|
+
id: string;
|
|
49
|
+
} | null;
|
|
50
|
+
} | null;
|
|
51
|
+
errors: Array<{
|
|
52
|
+
__typename?: "Error";
|
|
53
|
+
key: string;
|
|
54
|
+
name: string;
|
|
55
|
+
type: string;
|
|
56
|
+
}>;
|
|
57
|
+
} | null>;
|
|
58
|
+
export declare function updateForm(c: UiduClient, v: UpdateFormMutationVariables): Promise<{
|
|
59
|
+
__typename?: "UpdateFormPayload";
|
|
60
|
+
form?: {
|
|
61
|
+
__typename?: "Form";
|
|
62
|
+
id: string;
|
|
63
|
+
} | null;
|
|
64
|
+
errors: Array<{
|
|
65
|
+
__typename?: "Error";
|
|
66
|
+
key: string;
|
|
67
|
+
name: string;
|
|
68
|
+
type: string;
|
|
69
|
+
}>;
|
|
70
|
+
} | null>;
|
|
71
|
+
export declare function deleteForm(c: UiduClient, v: DeleteFormMutationVariables): Promise<{
|
|
72
|
+
__typename?: "DeleteFormPayload";
|
|
73
|
+
form?: {
|
|
74
|
+
__typename?: "Form";
|
|
75
|
+
id: string;
|
|
76
|
+
} | null;
|
|
77
|
+
errors: Array<{
|
|
78
|
+
__typename?: "Error";
|
|
79
|
+
key: string;
|
|
80
|
+
name: string;
|
|
81
|
+
type: string;
|
|
82
|
+
}>;
|
|
83
|
+
} | null>;
|
|
84
|
+
export declare function createContact(c: UiduClient, v: CreateContactMutationVariables): Promise<{
|
|
85
|
+
__typename?: "CreateContactPayload";
|
|
86
|
+
contact?: {
|
|
87
|
+
__typename?: "Contact";
|
|
88
|
+
id: string;
|
|
89
|
+
} | null;
|
|
90
|
+
errors: Array<{
|
|
91
|
+
__typename?: "Error";
|
|
92
|
+
key: string;
|
|
93
|
+
name: string;
|
|
94
|
+
type: string;
|
|
95
|
+
}>;
|
|
96
|
+
} | null>;
|
|
97
|
+
export declare function deleteContact(c: UiduClient, v: DeleteContactMutationVariables): Promise<{
|
|
98
|
+
__typename?: "DeleteContactPayload";
|
|
99
|
+
contact?: {
|
|
100
|
+
__typename?: "Contact";
|
|
101
|
+
id: string;
|
|
102
|
+
} | null;
|
|
103
|
+
errors: Array<{
|
|
104
|
+
__typename?: "Error";
|
|
105
|
+
key: string;
|
|
106
|
+
name: string;
|
|
107
|
+
type: string;
|
|
108
|
+
}>;
|
|
109
|
+
} | null>;
|
|
110
|
+
export declare function createDeal(c: UiduClient, v: CreateDealMutationVariables): Promise<{
|
|
111
|
+
__typename?: "CreateDealPayload";
|
|
112
|
+
deal?: {
|
|
113
|
+
__typename?: "DealEdge";
|
|
114
|
+
node?: {
|
|
115
|
+
__typename?: "Deal";
|
|
116
|
+
id: string;
|
|
117
|
+
} | null;
|
|
118
|
+
} | null;
|
|
119
|
+
errors: Array<{
|
|
120
|
+
__typename?: "Error";
|
|
121
|
+
key: string;
|
|
122
|
+
name: string;
|
|
123
|
+
type: string;
|
|
124
|
+
}>;
|
|
125
|
+
} | null>;
|
|
126
|
+
export declare function updateDeal(c: UiduClient, v: UpdateDealMutationVariables): Promise<{
|
|
127
|
+
__typename?: "UpdateDealPayload";
|
|
128
|
+
deal?: {
|
|
129
|
+
__typename?: "Deal";
|
|
130
|
+
id: string;
|
|
131
|
+
} | null;
|
|
132
|
+
errors: Array<{
|
|
133
|
+
__typename?: "Error";
|
|
134
|
+
key: string;
|
|
135
|
+
name: string;
|
|
136
|
+
type: string;
|
|
137
|
+
}>;
|
|
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>;
|
|
260
|
+
export declare function createKbCollection(c: UiduClient, v: CreateKbCollectionMutationVariables): Promise<{
|
|
261
|
+
__typename?: "CreateKbCollectionPayload";
|
|
262
|
+
kbCollection?: {
|
|
263
|
+
__typename?: "KbCollectionEdge";
|
|
264
|
+
node?: {
|
|
265
|
+
__typename?: "KbCollection";
|
|
266
|
+
id: string;
|
|
267
|
+
} | null;
|
|
268
|
+
} | null;
|
|
269
|
+
errors: Array<{
|
|
270
|
+
__typename?: "Error";
|
|
271
|
+
key: string;
|
|
272
|
+
name: string;
|
|
273
|
+
type: string;
|
|
274
|
+
}>;
|
|
275
|
+
} | null>;
|
|
276
|
+
export declare function updateKbCollection(c: UiduClient, v: UpdateKbCollectionMutationVariables): Promise<{
|
|
277
|
+
__typename?: "UpdateKbCollectionPayload";
|
|
278
|
+
kbCollection?: {
|
|
279
|
+
__typename?: "KbCollection";
|
|
280
|
+
id: string;
|
|
281
|
+
} | null;
|
|
282
|
+
errors: Array<{
|
|
283
|
+
__typename?: "Error";
|
|
284
|
+
key: string;
|
|
285
|
+
name: string;
|
|
286
|
+
type: string;
|
|
287
|
+
}>;
|
|
288
|
+
} | null>;
|
|
289
|
+
export declare function deleteKbCollection(c: UiduClient, v: DeleteKbCollectionMutationVariables): Promise<{
|
|
290
|
+
__typename?: "DeleteKbCollectionPayload";
|
|
291
|
+
kbCollection?: {
|
|
292
|
+
__typename?: "KbCollection";
|
|
293
|
+
id: string;
|
|
294
|
+
} | null;
|
|
295
|
+
errors: Array<{
|
|
296
|
+
__typename?: "Error";
|
|
297
|
+
key: string;
|
|
298
|
+
name: string;
|
|
299
|
+
type: string;
|
|
300
|
+
}>;
|
|
301
|
+
} | null>;
|
|
302
|
+
export declare function createKbArticle(c: UiduClient, v: CreateKbArticleMutationVariables): Promise<{
|
|
303
|
+
__typename?: "CreateKbArticlePayload";
|
|
304
|
+
kbArticle?: {
|
|
305
|
+
__typename?: "KbArticleEdge";
|
|
306
|
+
node?: {
|
|
307
|
+
__typename?: "KbArticle";
|
|
308
|
+
id: string;
|
|
309
|
+
} | null;
|
|
310
|
+
} | null;
|
|
311
|
+
errors: Array<{
|
|
312
|
+
__typename?: "Error";
|
|
313
|
+
key: string;
|
|
314
|
+
name: string;
|
|
315
|
+
type: string;
|
|
316
|
+
}>;
|
|
317
|
+
} | null>;
|
|
318
|
+
export declare function updateKbArticle(c: UiduClient, v: UpdateKbArticleMutationVariables): Promise<{
|
|
319
|
+
__typename?: "UpdateKbArticlePayload";
|
|
320
|
+
kbArticle?: {
|
|
321
|
+
__typename?: "KbArticle";
|
|
322
|
+
id: string;
|
|
323
|
+
} | null;
|
|
324
|
+
errors: Array<{
|
|
325
|
+
__typename?: "Error";
|
|
326
|
+
key: string;
|
|
327
|
+
name: string;
|
|
328
|
+
type: string;
|
|
329
|
+
}>;
|
|
330
|
+
} | null>;
|
|
331
|
+
export declare function deleteKbArticle(c: UiduClient, v: DeleteKbArticleMutationVariables): Promise<{
|
|
332
|
+
__typename?: "DeleteKbArticlePayload";
|
|
333
|
+
kbArticle?: {
|
|
334
|
+
__typename?: "KbArticle";
|
|
335
|
+
id: string;
|
|
336
|
+
} | null;
|
|
337
|
+
errors: Array<{
|
|
338
|
+
__typename?: "Error";
|
|
339
|
+
key: string;
|
|
340
|
+
name: string;
|
|
341
|
+
type: string;
|
|
342
|
+
}>;
|
|
343
|
+
} | null>;
|
|
344
|
+
export declare function createChannel(c: UiduClient, v: CreateChannelMutationVariables): Promise<{
|
|
345
|
+
__typename?: "CreateChannelPayload";
|
|
346
|
+
channel?: {
|
|
347
|
+
__typename?: "ChannelEdge";
|
|
348
|
+
node?: {
|
|
349
|
+
__typename?: "Channel";
|
|
350
|
+
id: string;
|
|
351
|
+
} | null;
|
|
352
|
+
} | null;
|
|
353
|
+
errors: Array<{
|
|
354
|
+
__typename?: "Error";
|
|
355
|
+
key: string;
|
|
356
|
+
name: string;
|
|
357
|
+
type: string;
|
|
358
|
+
}>;
|
|
359
|
+
} | null>;
|
|
360
|
+
export declare function updateChannel(c: UiduClient, v: UpdateChannelMutationVariables): Promise<{
|
|
361
|
+
__typename?: "UpdateChannelPayload";
|
|
362
|
+
channel?: {
|
|
363
|
+
__typename?: "Channel";
|
|
364
|
+
id: string;
|
|
365
|
+
} | null;
|
|
366
|
+
errors: Array<{
|
|
367
|
+
__typename?: "Error";
|
|
368
|
+
key: string;
|
|
369
|
+
name: string;
|
|
370
|
+
type: string;
|
|
371
|
+
}>;
|
|
372
|
+
} | null>;
|
|
373
|
+
export declare function deleteChannel(c: UiduClient, v: DeleteChannelMutationVariables): Promise<{
|
|
374
|
+
__typename?: "DeleteChannelPayload";
|
|
375
|
+
channel?: {
|
|
376
|
+
__typename?: "Channel";
|
|
377
|
+
id: string;
|
|
378
|
+
} | null;
|
|
379
|
+
errors: Array<{
|
|
380
|
+
__typename?: "Error";
|
|
381
|
+
key: string;
|
|
382
|
+
name: string;
|
|
383
|
+
type: string;
|
|
384
|
+
}>;
|
|
385
|
+
} | null>;
|
|
386
|
+
export declare function updateEvent(c: UiduClient, v: UpdateEventMutationVariables): Promise<{
|
|
387
|
+
__typename?: "UpdateEventPayload";
|
|
388
|
+
event?: {
|
|
389
|
+
__typename?: "Event";
|
|
390
|
+
id: string;
|
|
391
|
+
} | null;
|
|
392
|
+
errors: Array<{
|
|
393
|
+
__typename?: "Error";
|
|
394
|
+
key: string;
|
|
395
|
+
name: string;
|
|
396
|
+
type: string;
|
|
397
|
+
}>;
|
|
398
|
+
} | null>;
|
|
399
|
+
export declare function updateStory(c: UiduClient, v: UpdateStoryMutationVariables): Promise<{
|
|
400
|
+
__typename?: "UpdateStoryPayload";
|
|
401
|
+
story?: {
|
|
402
|
+
__typename?: "Story";
|
|
403
|
+
id: string;
|
|
404
|
+
} | null;
|
|
405
|
+
errors: Array<{
|
|
406
|
+
__typename?: "Error";
|
|
407
|
+
key: string;
|
|
408
|
+
name: string;
|
|
409
|
+
type: string;
|
|
410
|
+
}>;
|
|
411
|
+
} | null>;
|
|
412
|
+
export declare function updateDonationCampaign(c: UiduClient, v: UpdateDonationCampaignMutationVariables): Promise<{
|
|
413
|
+
__typename?: "UpdateDonationCampaignPayload";
|
|
414
|
+
donationCampaign?: {
|
|
415
|
+
__typename?: "DonationCampaign";
|
|
416
|
+
id: string;
|
|
417
|
+
} | null;
|
|
418
|
+
errors: Array<{
|
|
419
|
+
__typename?: "Error";
|
|
420
|
+
key: string;
|
|
421
|
+
name: string;
|
|
422
|
+
type: string;
|
|
423
|
+
}>;
|
|
424
|
+
} | null>;
|
|
425
|
+
export declare function deleteDonationCampaign(c: UiduClient, v: DeleteDonationCampaignMutationVariables): Promise<{
|
|
426
|
+
__typename?: "DeleteDonationCampaignPayload";
|
|
427
|
+
donationCampaign?: {
|
|
428
|
+
__typename?: "DonationCampaign";
|
|
429
|
+
id: string;
|
|
430
|
+
} | null;
|
|
431
|
+
errors: Array<{
|
|
432
|
+
__typename?: "Error";
|
|
433
|
+
key: string;
|
|
434
|
+
name: string;
|
|
435
|
+
type: string;
|
|
436
|
+
}>;
|
|
437
|
+
} | null>;
|
|
438
|
+
export declare function updateTask(c: UiduClient, v: UpdateTaskMutationVariables): Promise<{
|
|
439
|
+
__typename?: "UpdateTaskPayload";
|
|
440
|
+
task?: {
|
|
441
|
+
__typename?: "Task";
|
|
442
|
+
id: string;
|
|
443
|
+
} | null;
|
|
444
|
+
errors: Array<{
|
|
445
|
+
__typename?: "Error";
|
|
446
|
+
key: string;
|
|
447
|
+
name: string;
|
|
448
|
+
type: string;
|
|
449
|
+
}>;
|
|
450
|
+
} | null>;
|
|
451
|
+
export declare function deleteTask(c: UiduClient, v: DeleteTaskMutationVariables): Promise<{
|
|
452
|
+
__typename?: "DeleteTaskPayload";
|
|
453
|
+
task?: {
|
|
454
|
+
__typename?: "Task";
|
|
455
|
+
id: string;
|
|
456
|
+
} | null;
|
|
457
|
+
errors: Array<{
|
|
458
|
+
__typename?: "Error";
|
|
459
|
+
key: string;
|
|
460
|
+
name: string;
|
|
461
|
+
type: string;
|
|
462
|
+
}>;
|
|
463
|
+
} | null>;
|
|
464
|
+
export declare function updateNote(c: UiduClient, v: UpdateNoteMutationVariables): Promise<{
|
|
465
|
+
__typename?: "UpdateNotePayload";
|
|
466
|
+
note?: {
|
|
467
|
+
__typename?: "Note";
|
|
468
|
+
id: string;
|
|
469
|
+
} | null;
|
|
470
|
+
errors: Array<{
|
|
471
|
+
__typename?: "Error";
|
|
472
|
+
key: string;
|
|
473
|
+
name: string;
|
|
474
|
+
type: string;
|
|
475
|
+
}>;
|
|
476
|
+
} | null>;
|
|
477
|
+
export declare function deleteNote(c: UiduClient, v: DeleteNoteMutationVariables): Promise<{
|
|
478
|
+
__typename?: "DeleteNotePayload";
|
|
479
|
+
note?: {
|
|
480
|
+
__typename?: "Note";
|
|
481
|
+
id: string;
|
|
482
|
+
} | null;
|
|
483
|
+
errors: Array<{
|
|
484
|
+
__typename?: "Error";
|
|
485
|
+
key: string;
|
|
486
|
+
name: string;
|
|
487
|
+
type: string;
|
|
488
|
+
}>;
|
|
489
|
+
} | null>;
|
|
490
|
+
export declare function updateSpace(c: UiduClient, v: UpdateSpaceMutationVariables): Promise<{
|
|
491
|
+
__typename?: "UpdateSpacePayload";
|
|
492
|
+
space?: {
|
|
493
|
+
__typename?: "Space";
|
|
494
|
+
id: string;
|
|
495
|
+
} | null;
|
|
496
|
+
errors: Array<{
|
|
497
|
+
__typename?: "Error";
|
|
498
|
+
key: string;
|
|
499
|
+
name: string;
|
|
500
|
+
type: string;
|
|
501
|
+
}>;
|
|
502
|
+
} | null>;
|
|
503
|
+
export declare function deleteSpace(c: UiduClient, v: DeleteSpaceMutationVariables): Promise<{
|
|
504
|
+
__typename?: "DeleteSpacePayload";
|
|
505
|
+
space?: {
|
|
506
|
+
__typename?: "Space";
|
|
507
|
+
id: string;
|
|
508
|
+
} | null;
|
|
509
|
+
errors: Array<{
|
|
510
|
+
__typename?: "Error";
|
|
511
|
+
key: string;
|
|
512
|
+
name: string;
|
|
513
|
+
type: string;
|
|
514
|
+
}>;
|
|
515
|
+
} | null>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.js";
|
|
2
|
+
import { type CreateNoteMutationVariables } from "./generated/index.js";
|
|
3
|
+
export declare function createNote(client: UiduClient, variables: CreateNoteMutationVariables): Promise<{
|
|
4
|
+
__typename?: "CreateNotePayload";
|
|
5
|
+
note?: {
|
|
6
|
+
__typename?: "NoteEdge";
|
|
7
|
+
node?: {
|
|
8
|
+
__typename?: "Note";
|
|
9
|
+
id: string;
|
|
10
|
+
} | null;
|
|
11
|
+
} | null;
|
|
12
|
+
errors: Array<{
|
|
13
|
+
__typename?: "Error";
|
|
14
|
+
key: string;
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
}>;
|
|
18
|
+
} | null>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.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
|
+
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']>;
|
|
8
|
+
export declare function listEmployees(client: UiduClient, variables?: ListEmployeesQueryVariables): Promise<{
|
|
9
|
+
__typename?: "Employee";
|
|
10
|
+
id: string;
|
|
11
|
+
employeeCode?: string | null;
|
|
12
|
+
user?: {
|
|
13
|
+
__typename?: "User";
|
|
14
|
+
id: string;
|
|
15
|
+
name?: string | null;
|
|
16
|
+
firstName?: string | null;
|
|
17
|
+
lastName?: string | null;
|
|
18
|
+
email?: string | null;
|
|
19
|
+
} | null;
|
|
20
|
+
currentEmployment?: {
|
|
21
|
+
__typename?: "Employment";
|
|
22
|
+
id: string;
|
|
23
|
+
jobTitle?: string | null;
|
|
24
|
+
contractType?: string | null;
|
|
25
|
+
isActive: boolean;
|
|
26
|
+
startDate: any;
|
|
27
|
+
} | null;
|
|
28
|
+
}[]>;
|
|
29
|
+
export declare function getEmployee(client: UiduClient, variables: GetEmployeeQueryVariables): Promise<Employee | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Compute the Monday of the week containing `date` as an ISO8601 date string.
|
|
32
|
+
* Useful for the `weekStartingAt` argument required by `getEmployee` (and any
|
|
33
|
+
* other weekly-aggregated employee fields).
|
|
34
|
+
*/
|
|
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[]>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.js";
|
|
2
|
+
import { type SearchQuery, type SearchQueryVariables } from "./generated/index.js";
|
|
3
|
+
export type SearchResult = NonNullable<NonNullable<SearchQuery['currentWorkspace']>['search']>;
|
|
4
|
+
export declare function search(client: UiduClient, variables: SearchQueryVariables): Promise<SearchResult | null>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.js";
|
|
2
|
+
import { type CreateSpaceMutationVariables } from "./generated/index.js";
|
|
3
|
+
export declare function createSpace(client: UiduClient, variables: CreateSpaceMutationVariables): Promise<{
|
|
4
|
+
__typename?: "CreateSpacePayload";
|
|
5
|
+
space?: {
|
|
6
|
+
__typename?: "SpaceEdge";
|
|
7
|
+
node?: {
|
|
8
|
+
__typename?: "Space";
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
} | null;
|
|
12
|
+
} | null;
|
|
13
|
+
errors: Array<{
|
|
14
|
+
__typename?: "Error";
|
|
15
|
+
key: string;
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
}>;
|
|
19
|
+
} | null>;
|