@uidu/client 3.17.0 → 3.19.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 +46 -0
- package/dist/declarations/src/calls.d.ts +9 -1
- package/dist/declarations/src/candidates.d.ts +102 -0
- package/dist/declarations/src/contacts.d.ts +22 -1
- package/dist/declarations/src/contracts.d.ts +8 -0
- package/dist/declarations/src/expenses.d.ts +169 -0
- package/dist/declarations/src/field-values.d.ts +34 -0
- package/dist/declarations/src/generated/index.d.ts +13283 -4414
- package/dist/declarations/src/index.d.ts +24 -8
- package/dist/declarations/src/meetings.d.ts +41 -0
- package/dist/declarations/src/mutations.d.ts +168 -131
- package/dist/declarations/src/people.d.ts +13 -1
- package/dist/declarations/src/reviews.d.ts +195 -0
- package/dist/declarations/src/skills.d.ts +34 -0
- package/dist/declarations/src/work-sites.d.ts +9 -0
- package/dist/uidu-client.cjs.dev.js +570 -31
- package/dist/uidu-client.cjs.prod.js +570 -31
- package/dist/uidu-client.esm.js +523 -32
- package/package.json +1 -1
- package/src/calls.ts +37 -0
- package/src/candidates.ts +105 -0
- package/src/contacts.ts +33 -0
- package/src/contracts.ts +44 -0
- package/src/expenses.test.ts +155 -0
- package/src/expenses.ts +155 -0
- package/src/field-values.ts +95 -0
- package/src/generated/index.ts +3461 -2268
- package/src/index.ts +83 -4
- package/src/meetings.ts +37 -0
- package/src/mutations.test.ts +40 -1
- package/src/mutations.ts +170 -60
- package/src/people.ts +33 -0
- package/src/queries/calls/ListCallStatuses.graphql +26 -0
- package/src/queries/candidates/CandidateFields.graphql +28 -0
- package/src/queries/candidates/CandidateMutations.graphql +35 -0
- package/src/queries/candidates/CandidateQueries.graphql +94 -0
- package/src/queries/contacts/ContactMutations.graphql +0 -13
- package/src/queries/contacts/GetOrganization.graphql +17 -0
- package/src/queries/contacts/ListOrganizations.graphql +21 -0
- package/src/queries/contacts/OrganizationMutations.graphql +17 -0
- package/src/queries/contracts/ContractQueries.graphql +67 -0
- package/src/queries/courses/CourseMutations.graphql +0 -13
- package/src/queries/discardable/DiscardableMutations.graphql +32 -0
- package/src/queries/expenses/ExpenseFields.graphql +29 -0
- package/src/queries/expenses/ExpenseMutations.graphql +81 -0
- package/src/queries/expenses/GetExpenseReport.graphql +14 -0
- package/src/queries/expenses/ListAnalyticAccounts.graphql +20 -0
- package/src/queries/expenses/ListExpenseReports.graphql +22 -0
- package/src/queries/field-values/FieldValueFields.graphql +18 -0
- package/src/queries/field-values/FieldValueQueries.graphql +43 -0
- package/src/queries/forms/FormMutations.graphql +0 -13
- package/src/queries/help-center/ChannelMutations.graphql +0 -13
- package/src/queries/kb/KbMutations.graphql +0 -26
- package/src/queries/meetings/MeetingQueries.graphql +48 -0
- package/src/queries/notes/NoteMutations.graphql +0 -13
- package/src/queries/people/EmploymentVariationKindMutations.graphql +51 -0
- package/src/queries/people/ListEmploymentVariationKinds.graphql +23 -0
- package/src/queries/people/PeopleMutations.graphql +0 -13
- package/src/queries/reviews/ReviewFields.graphql +35 -0
- package/src/queries/reviews/ReviewMutations.graphql +32 -0
- package/src/queries/reviews/ReviewQueries.graphql +86 -0
- package/src/queries/skills/SkillQueries.graphql +53 -0
- package/src/queries/spaces/SpaceMutations.graphql +0 -13
- package/src/queries/tasks/TaskMutations.graphql +0 -13
- package/src/queries/work-sites/ListWorkSites.graphql +32 -0
- package/src/recruiting.test.ts +196 -0
- package/src/reviews.ts +114 -0
- package/src/skills.ts +47 -0
- package/src/work-sites.ts +28 -0
|
@@ -4,7 +4,7 @@ export type { UiduClientConfig, UiduErrorOptions } from "./types.js";
|
|
|
4
4
|
export { paginate } from "./utils/paginate.js";
|
|
5
5
|
export type { PaginateOptions } from "./utils/paginate.js";
|
|
6
6
|
export { normalizeFieldValueContent, normalizeFieldValuesAttributes, } from "./utils/fieldValues.js";
|
|
7
|
-
export { ListApplicationsDocument, ListBookingsDocument, ListCalendarsDocument, ListCalendarEventsDocument, ListCallsDocument, ListCampaignsDocument, ListEmailCampaignsDocument, ListCoursesDocument, ListDealsDocument, ListDonationCampaignsDocument, ListDonationsDocument, ListEmployeesDocument, ListEnrollmentsDocument, ListEventsDocument, ListFormsDocument, ListGoalsDocument, ListKbArticlesDocument, ListKbCollectionsDocument, ListLecturesDocument, ListPagesDocument, ListStoriesDocument, ListTimeframesDocument, } from "./generated/index.js";
|
|
7
|
+
export { ListAnalyticAccountsDocument, ListApplicationsDocument, ListBookingsDocument, ListCalendarsDocument, ListCalendarEventsDocument, ListCallsDocument, ListCallStatusesDocument, ListContractsDocument, ListFieldValueHistoryDocument, ListMeetingsDocument, ListPoolsDocument, ListReviewTemplatesDocument, ListSkillsDocument, ListWorkSitesDocument, ListCampaignsDocument, ListEmailCampaignsDocument, ListCoursesDocument, ListDealsDocument, ListDonationCampaignsDocument, ListDonationsDocument, ListEmployeesDocument, ListEmploymentVariationKindsDocument, ListEnrollmentsDocument, ListEventsDocument, ListExpenseReportsDocument, ListFormsDocument, ListGoalsDocument, ListKbArticlesDocument, ListKbCollectionsDocument, ListLecturesDocument, ListOrganizationsDocument, ListPagesDocument, ListStoriesDocument, ListTimeframesDocument, } from "./generated/index.js";
|
|
8
8
|
export { getPage, listPages, getTemplate, createProject, createPage, createPageBlock, createFieldValue, listProjects, } from "./cms.js";
|
|
9
9
|
export type { Page, Template } from "./cms.js";
|
|
10
10
|
export { getSiteByDomain, getSite, getPageBySlug, listSitePages, getSingletonBlock, createSite, } from "./sites.js";
|
|
@@ -16,7 +16,7 @@ export { createNote } from "./notes.js";
|
|
|
16
16
|
export { executeAction } from "./actions.js";
|
|
17
17
|
export { createBenefit } from "./benefits.js";
|
|
18
18
|
export { createBenefitEnrollment } from "./benefit-enrollments.js";
|
|
19
|
-
export { createCourse, updateCourse, deleteCourse, createForm, updateForm, deleteForm, createContact, deleteContact, createDeal, updateDeal, createKbCollection, updateKbCollection, deleteKbCollection, createKbArticle, updateKbArticle, deleteKbArticle, createChannel, updateChannel, deleteChannel, createChannelKbCollection, updateChannelKbCollection, updateEvent, updateStory, updateDonationCampaign, deleteDonationCampaign, updateTask, deleteTask, updateNote, deleteNote, updateSpace, deleteSpace, createEmployee, updateEmployee, createEmployeeCertification, createEmployment, updateEmployment, deleteEmployment, terminateEmployment, createEmploymentTerm, updateEmploymentTerm, createCompensation, updateCompensation, deleteCompensation, createTimeClock, } from "./mutations.js";
|
|
19
|
+
export { createCourse, updateCourse, deleteCourse, createForm, updateForm, deleteForm, createContact, deleteContact, createDeal, updateDeal, createOrganization, createKbCollection, updateKbCollection, deleteKbCollection, createKbArticle, updateKbArticle, deleteKbArticle, createChannel, updateChannel, deleteChannel, createChannelKbCollection, updateChannelKbCollection, updateEvent, updateStory, updateDonationCampaign, deleteDonationCampaign, updateTask, deleteTask, updateNote, deleteNote, updateSpace, deleteSpace, createEmployee, updateEmployee, createEmployeeCertification, createEmployment, updateEmployment, deleteEmployment, terminateEmployment, createEmploymentTerm, updateEmploymentTerm, createEmploymentVariationKind, updateEmploymentVariationKind, createCompensation, updateCompensation, deleteCompensation, createTimeClock, } from "./mutations.js";
|
|
20
20
|
export { getForm, listForms, createFormResponse, updateFormResponse, } from "./forms.js";
|
|
21
21
|
export type { Form } from "./forms.js";
|
|
22
22
|
export { getChannel, listChannels } from "./help-center.js";
|
|
@@ -25,28 +25,44 @@ export { search } from "./search.js";
|
|
|
25
25
|
export type { SearchResult } from "./search.js";
|
|
26
26
|
export { getEvent, listEvents, createAttendance, updateAttendance, createEvent, createEventInstance, updateEventInstance, } from "./events.js";
|
|
27
27
|
export type { Event } from "./events.js";
|
|
28
|
-
export { getCall, listCalls } from "./calls.js";
|
|
29
|
-
export type { Call } from "./calls.js";
|
|
28
|
+
export { getCall, listCalls, listCallStatuses } from "./calls.js";
|
|
29
|
+
export type { Call, CallStatus } from "./calls.js";
|
|
30
30
|
export { getJob, listJobs } from "./jobs.js";
|
|
31
31
|
export type { Job } from "./jobs.js";
|
|
32
32
|
export { listApplications, createApplication, updateApplication, completeApplication, } from "./applications.js";
|
|
33
33
|
export type { Application } from "./applications.js";
|
|
34
|
+
export { findCandidates, getCandidate, updateCandidate, listPools, createPoolContact, } from "./candidates.js";
|
|
35
|
+
export type { Candidate, CandidateDetail, CandidateSearch, Pool, } from "./candidates.js";
|
|
36
|
+
export { listReviews, getReview, createReview, createReviews, updateReview, listReviewTemplates, } from "./reviews.js";
|
|
37
|
+
export type { Review, ReviewTemplate } from "./reviews.js";
|
|
38
|
+
export { listMeetings, createMeeting } from "./meetings.js";
|
|
39
|
+
export type { Meeting } from "./meetings.js";
|
|
40
|
+
export { listSkills, createSkill } from "./skills.js";
|
|
41
|
+
export type { WorkspaceSkill } from "./skills.js";
|
|
42
|
+
export { listWorkSites } from "./work-sites.js";
|
|
43
|
+
export type { WorkSite } from "./work-sites.js";
|
|
44
|
+
export { listContracts, getContract } from "./contracts.js";
|
|
45
|
+
export type { Contract, ContractDetail } from "./contracts.js";
|
|
46
|
+
export { getRecordFieldValues, listFieldValueHistory, fieldValueAsOf, } from "./field-values.js";
|
|
47
|
+
export type { RecordFieldValue, RecordFieldValues } from "./field-values.js";
|
|
34
48
|
export { getDonationCampaign, listDonationCampaigns, listDonations, createDonation, createDonationCampaign, } from "./donations.js";
|
|
35
49
|
export type { Donation, DonationCampaign } from "./donations.js";
|
|
36
50
|
export { getStory, listStories, createStory } from "./stories.js";
|
|
37
51
|
export type { Story } from "./stories.js";
|
|
38
|
-
export { listEmployees, getEmployee, weekStartFor, listOffices, listCircles, listRoles, listKinds, listCcnls, createCcnl, listEmploymentHistory, contractEvents, } from "./people.js";
|
|
39
|
-
export type { Employee, Office, Circle, Kind, EmploymentRecord, CompensationRecord, EmployeeContracts, ContractEvent, ContractEventType, } from "./people.js";
|
|
52
|
+
export { listEmployees, getEmployee, weekStartFor, listOffices, listCircles, listRoles, listKinds, listCcnls, createCcnl, listEmploymentHistory, contractEvents, listEmploymentVariationKinds, } from "./people.js";
|
|
53
|
+
export type { Employee, Office, Circle, Kind, EmploymentRecord, CompensationRecord, EmployeeContracts, ContractEvent, ContractEventType, EmploymentVariationKind, } from "./people.js";
|
|
40
54
|
export { getBooking, listBookings, getCalendar, listCalendars, getCalendarEvent, listCalendarEvents, } from "./bookings.js";
|
|
41
55
|
export type { Booking, Calendar, CalendarEvent } from "./bookings.js";
|
|
42
56
|
export { getCourse, listCourses, getEnrollment, listEnrollments, createEnrollment, updateEnrollment, getLecture, listLectures, } from "./courses.js";
|
|
43
57
|
export type { Course, Enrollment, Lecture } from "./courses.js";
|
|
44
58
|
export { getCampaign, listCampaigns, listEmailCampaigns } from "./campaigns.js";
|
|
45
59
|
export type { Campaign } from "./campaigns.js";
|
|
46
|
-
export { getContact, listContacts, getDeal, listDeals } from "./contacts.js";
|
|
47
|
-
export type { Contact, Deal } from "./contacts.js";
|
|
60
|
+
export { getContact, listContacts, getDeal, listDeals, getOrganization, listOrganizations, } from "./contacts.js";
|
|
61
|
+
export type { Contact, Deal, Organization } from "./contacts.js";
|
|
48
62
|
export { listGoals, getGoal, listTimeframes, updateGoal, goalValue, toGoalRaw, goalProgress, goalTimeElapsed, isGoalBehind, } from "./goals.js";
|
|
49
63
|
export type { Goal, Timeframe } from "./goals.js";
|
|
64
|
+
export { listExpenseReports, getExpenseReport, createExpenseReport, updateExpenseReport, createExpense, updateExpense, listAnalyticAccounts, allocateExpense, } from "./expenses.js";
|
|
65
|
+
export type { ExpenseReport, Expense, AnalyticAccount } from "./expenses.js";
|
|
50
66
|
export { getKbArticle, listKbArticles, getKbCollection, listKbCollections, } from "./kb.js";
|
|
51
67
|
export type { KbArticle, KbCollection } from "./kb.js";
|
|
52
68
|
export { listModels, getModel, listModelItems, getModelItem, createModel, updateModel, createField, updateField, deleteField, createFieldOption, updateFieldOption, deleteFieldOption, createModelItem, updateModelItem, deleteModelItem, updateFieldValue, deleteFieldValue, toFieldValuesAttributes, ensureModel, } from "./models.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.js";
|
|
2
|
+
import { type CreateMeetingMutationVariables, type ListMeetingsQueryVariables, type MeetingSummaryFragment } from "./generated/index.js";
|
|
3
|
+
export type Meeting = MeetingSummaryFragment;
|
|
4
|
+
/** The workspace's meetings, filtered and sorted with `params`; page with `first`/`after`. */
|
|
5
|
+
export declare function listMeetings(client: UiduClient, variables?: ListMeetingsQueryVariables): Promise<Meeting[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Create a meeting (`name`, `startsAt`, `endsAt`, `timeZone`, and
|
|
8
|
+
* `relatedAttributes` to link it to an application or a contact). Returns the
|
|
9
|
+
* mutation payload as-is (including any `errors`).
|
|
10
|
+
*/
|
|
11
|
+
export declare function createMeeting(client: UiduClient, variables: CreateMeetingMutationVariables): Promise<{
|
|
12
|
+
__typename?: "CreateMeetingPayload";
|
|
13
|
+
meeting?: {
|
|
14
|
+
__typename?: "MeetingEdge";
|
|
15
|
+
node?: {
|
|
16
|
+
__typename?: "Meeting";
|
|
17
|
+
id: string;
|
|
18
|
+
name?: string | null;
|
|
19
|
+
status: import("./generated/index.js").MeetingStatusEnum;
|
|
20
|
+
source: import("./generated/index.js").MeetingSourceEnum;
|
|
21
|
+
startsAt?: any | null;
|
|
22
|
+
endsAt?: any | null;
|
|
23
|
+
timeZone?: string | null;
|
|
24
|
+
durationInSeconds?: number | null;
|
|
25
|
+
recordingUrl?: string | null;
|
|
26
|
+
transcriptUrl?: string | null;
|
|
27
|
+
createdAt: any;
|
|
28
|
+
createdByUser?: {
|
|
29
|
+
__typename?: "User";
|
|
30
|
+
id: string;
|
|
31
|
+
name?: string | null;
|
|
32
|
+
} | null;
|
|
33
|
+
} | null;
|
|
34
|
+
} | null;
|
|
35
|
+
errors: Array<{
|
|
36
|
+
__typename?: "Error";
|
|
37
|
+
key: string;
|
|
38
|
+
name: string;
|
|
39
|
+
type: string;
|
|
40
|
+
}>;
|
|
41
|
+
} | null>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
|
-
import { type CreateChannelMutationVariables, type CreateChannelKbCollectionMutationVariables, type CreateContactMutationVariables, type CreateCourseMutationVariables, type CreateCompensationMutationVariables, type CreateDealMutationVariables, type CreateEmployeeMutationVariables, type CreateEmployeeCertificationMutationVariables, type CreateEmploymentMutationVariables, type CreateEmploymentTermMutationVariables, type
|
|
2
|
+
import { type CreateChannelMutationVariables, type CreateChannelKbCollectionMutationVariables, type CreateContactMutationVariables, type CreateCourseMutationVariables, type CreateCompensationMutationVariables, type CreateDealMutationVariables, type CreateEmployeeMutationVariables, type CreateEmployeeCertificationMutationVariables, type CreateEmploymentMutationVariables, type CreateEmploymentTermMutationVariables, type CreateEmploymentVariationKindMutationVariables, type CreateFormMutationVariables, type CreateKbArticleMutationVariables, type CreateKbCollectionMutationVariables, type CreateOrganizationMutationVariables, type CreateTimeClockMutationVariables, type DeleteCompensationMutationVariables, type DeleteDonationCampaignMutationVariables, type DeleteRecordMutation, type DiscardRecordMutation, type DiscardRecordMutationVariables, type UpdateChannelMutationVariables, type UpdateChannelKbCollectionMutationVariables, type UpdateCompensationMutationVariables, type UpdateCourseMutationVariables, type UpdateDealMutationVariables, type UpdateDonationCampaignMutationVariables, type UpdateEmployeeMutationVariables, type UpdateEmploymentMutationVariables, type UpdateEmploymentTermMutationVariables, type UpdateEmploymentVariationKindMutationVariables, type UpdateEventMutationVariables, type UpdateFormMutationVariables, type UpdateKbArticleMutationVariables, type UpdateKbCollectionMutationVariables, type UpdateNoteMutationVariables, type UpdateSpaceMutationVariables, type UpdateStoryMutationVariables, type UpdateTaskMutationVariables } from "./generated/index.js";
|
|
3
|
+
/** `{ input: { id } }`, plus `permanent: true` to skip the trash. */
|
|
4
|
+
type DeleteRecordVariables = DiscardRecordMutationVariables & {
|
|
5
|
+
permanent?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type RemovePayload = DiscardRecordMutation['discardableDiscard'] | DeleteRecordMutation['discardableDelete'];
|
|
3
8
|
/**
|
|
4
9
|
* Create a course from `{ input: { attributes } }`. Returns the payload (with
|
|
5
10
|
* `errors`) or null.
|
|
@@ -35,22 +40,16 @@ export declare function updateCourse(c: UiduClient, v: UpdateCourseMutationVaria
|
|
|
35
40
|
}>;
|
|
36
41
|
} | null>;
|
|
37
42
|
/**
|
|
38
|
-
*
|
|
39
|
-
* or null.
|
|
43
|
+
* Move a course to the trash by `{ input: { id } }`, or delete it for good with
|
|
44
|
+
* `permanent: true`. Returns the payload (with `errors`) or null.
|
|
40
45
|
*/
|
|
41
|
-
export declare function deleteCourse(c: UiduClient, v:
|
|
42
|
-
|
|
43
|
-
course?: {
|
|
44
|
-
__typename?: "Course";
|
|
46
|
+
export declare function deleteCourse(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
47
|
+
course: {
|
|
45
48
|
id: string;
|
|
46
49
|
} | null;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
name: string;
|
|
51
|
-
type: string;
|
|
52
|
-
}>;
|
|
53
|
-
} | null>;
|
|
50
|
+
} & {
|
|
51
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
52
|
+
}) | null>;
|
|
54
53
|
/**
|
|
55
54
|
* Create a form, questions included via `attributes.formQuestionsAttributes`.
|
|
56
55
|
* Returns the payload (with `errors`) or null. The new form is at `form.node`.
|
|
@@ -89,22 +88,16 @@ export declare function updateForm(c: UiduClient, v: UpdateFormMutationVariables
|
|
|
89
88
|
}>;
|
|
90
89
|
} | null>;
|
|
91
90
|
/**
|
|
92
|
-
*
|
|
93
|
-
* null.
|
|
91
|
+
* Move a form to the trash by `{ input: { id } }`, or delete it for good with
|
|
92
|
+
* `permanent: true`. Returns the payload (with `errors`) or null.
|
|
94
93
|
*/
|
|
95
|
-
export declare function deleteForm(c: UiduClient, v:
|
|
96
|
-
|
|
97
|
-
form?: {
|
|
98
|
-
__typename?: "Form";
|
|
94
|
+
export declare function deleteForm(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
95
|
+
form: {
|
|
99
96
|
id: string;
|
|
100
97
|
} | null;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
name: string;
|
|
105
|
-
type: string;
|
|
106
|
-
}>;
|
|
107
|
-
} | null>;
|
|
98
|
+
} & {
|
|
99
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
100
|
+
}) | null>;
|
|
108
101
|
/**
|
|
109
102
|
* Create a CRM contact from `{ input: { attributes } }`. Returns the payload
|
|
110
103
|
* (with `errors`) or null.
|
|
@@ -123,22 +116,16 @@ export declare function createContact(c: UiduClient, v: CreateContactMutationVar
|
|
|
123
116
|
}>;
|
|
124
117
|
} | null>;
|
|
125
118
|
/**
|
|
126
|
-
*
|
|
127
|
-
* or null.
|
|
119
|
+
* Move a contact to the trash by `{ input: { id } }`, or delete it for good
|
|
120
|
+
* with `permanent: true`. Returns the payload (with `errors`) or null.
|
|
128
121
|
*/
|
|
129
|
-
export declare function deleteContact(c: UiduClient, v:
|
|
130
|
-
|
|
131
|
-
contact?: {
|
|
132
|
-
__typename?: "Contact";
|
|
122
|
+
export declare function deleteContact(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
123
|
+
contact: {
|
|
133
124
|
id: string;
|
|
134
125
|
} | null;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
name: string;
|
|
139
|
-
type: string;
|
|
140
|
-
}>;
|
|
141
|
-
} | null>;
|
|
126
|
+
} & {
|
|
127
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
128
|
+
}) | null>;
|
|
142
129
|
/**
|
|
143
130
|
* Create a deal in a pipeline (`attributes.pipelineId`, `statusId`). Returns
|
|
144
131
|
* the payload (with `errors`) or null. The new deal is at `deal.node`.
|
|
@@ -176,6 +163,31 @@ export declare function updateDeal(c: UiduClient, v: UpdateDealMutationVariables
|
|
|
176
163
|
type: string;
|
|
177
164
|
}>;
|
|
178
165
|
} | null>;
|
|
166
|
+
/**
|
|
167
|
+
* Create an organization (company): `{ input: { attributes: { email,
|
|
168
|
+
* organizationAttributes: { name, … } } } }` — the CRM nests an organization's
|
|
169
|
+
* own fields under `attributes.organizationAttributes`, same as a person
|
|
170
|
+
* contact nests theirs under `attributes.userAttributes`. Returns the payload
|
|
171
|
+
* (with `errors`) or null.
|
|
172
|
+
*/
|
|
173
|
+
export declare function createOrganization(c: UiduClient, v: CreateOrganizationMutationVariables): Promise<{
|
|
174
|
+
__typename?: "CreateOrganizationPayload";
|
|
175
|
+
organization?: {
|
|
176
|
+
__typename?: "Organization";
|
|
177
|
+
id: string;
|
|
178
|
+
name?: string | null;
|
|
179
|
+
email?: string | null;
|
|
180
|
+
fiscalCode?: string | null;
|
|
181
|
+
vatCode?: string | null;
|
|
182
|
+
createdAt: any;
|
|
183
|
+
} | null;
|
|
184
|
+
errors: Array<{
|
|
185
|
+
__typename?: "Error";
|
|
186
|
+
key: string;
|
|
187
|
+
name: string;
|
|
188
|
+
type: string;
|
|
189
|
+
}>;
|
|
190
|
+
} | null>;
|
|
179
191
|
/**
|
|
180
192
|
* Create the HR record for a workspace user (`attributes.userId`). Returns the
|
|
181
193
|
* payload (with `errors`) or null. The new employee is at `employee.node`.
|
|
@@ -316,22 +328,17 @@ export declare function updateEmployment(c: UiduClient, v: UpdateEmploymentMutat
|
|
|
316
328
|
}>;
|
|
317
329
|
} | null>;
|
|
318
330
|
/**
|
|
319
|
-
*
|
|
320
|
-
* `terminateEmployment` instead)
|
|
331
|
+
* Move an employment to the trash by `{ input: { id } }` (to end a contract,
|
|
332
|
+
* use `terminateEmployment` instead), or delete it for good with
|
|
333
|
+
* `permanent: true`. Returns the payload (with `errors`) or null.
|
|
321
334
|
*/
|
|
322
|
-
export declare function deleteEmployment(c: UiduClient, v:
|
|
323
|
-
|
|
324
|
-
employment?: {
|
|
325
|
-
__typename?: "Employment";
|
|
335
|
+
export declare function deleteEmployment(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
336
|
+
employment: {
|
|
326
337
|
id: string;
|
|
327
338
|
} | null;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
name: string;
|
|
332
|
-
type: string;
|
|
333
|
-
}>;
|
|
334
|
-
} | null>;
|
|
339
|
+
} & {
|
|
340
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
341
|
+
}) | null>;
|
|
335
342
|
/**
|
|
336
343
|
* Terminate (cessazione) an employment by closing it with an end date and
|
|
337
344
|
* reason. Thin semantic wrapper over {@link updateEmployment}.
|
|
@@ -453,6 +460,69 @@ export declare function updateEmploymentTerm(c: UiduClient, v: UpdateEmploymentT
|
|
|
453
460
|
type: string;
|
|
454
461
|
}>;
|
|
455
462
|
} | null>;
|
|
463
|
+
/**
|
|
464
|
+
* Create an employment variation kind — a reusable reason for a contract
|
|
465
|
+
* change (`changesHours`, `changesPay`, `changesLevel`, …), picked by a
|
|
466
|
+
* contract variation's `employmentVariationKindId`. Returns the payload (with
|
|
467
|
+
* `errors`) or null. The new kind is at `employmentVariationKind.node`.
|
|
468
|
+
*/
|
|
469
|
+
export declare function createEmploymentVariationKind(c: UiduClient, v: CreateEmploymentVariationKindMutationVariables): Promise<{
|
|
470
|
+
__typename?: "CreateEmploymentVariationKindPayload";
|
|
471
|
+
employmentVariationKind?: {
|
|
472
|
+
__typename?: "EmploymentVariationKindEdge";
|
|
473
|
+
node?: {
|
|
474
|
+
__typename?: "EmploymentVariationKind";
|
|
475
|
+
id: string;
|
|
476
|
+
name?: string | null;
|
|
477
|
+
description?: string | null;
|
|
478
|
+
shortname?: string | null;
|
|
479
|
+
color?: string | null;
|
|
480
|
+
position?: number | null;
|
|
481
|
+
changesContract: boolean;
|
|
482
|
+
changesHours: boolean;
|
|
483
|
+
changesLevel: boolean;
|
|
484
|
+
changesPlace: boolean;
|
|
485
|
+
changesPay: boolean;
|
|
486
|
+
changesBenefits: boolean;
|
|
487
|
+
requiresUnilav: boolean;
|
|
488
|
+
} | null;
|
|
489
|
+
} | null;
|
|
490
|
+
errors: Array<{
|
|
491
|
+
__typename?: "Error";
|
|
492
|
+
key: string;
|
|
493
|
+
name: string;
|
|
494
|
+
type: string;
|
|
495
|
+
}>;
|
|
496
|
+
} | null>;
|
|
497
|
+
/**
|
|
498
|
+
* Update an employment variation kind: `{ input: { id, attributes } }`.
|
|
499
|
+
* Returns the payload (with `errors`) or null.
|
|
500
|
+
*/
|
|
501
|
+
export declare function updateEmploymentVariationKind(c: UiduClient, v: UpdateEmploymentVariationKindMutationVariables): Promise<{
|
|
502
|
+
__typename?: "UpdateEmploymentVariationKindPayload";
|
|
503
|
+
employmentVariationKind?: {
|
|
504
|
+
__typename?: "EmploymentVariationKind";
|
|
505
|
+
id: string;
|
|
506
|
+
name?: string | null;
|
|
507
|
+
description?: string | null;
|
|
508
|
+
shortname?: string | null;
|
|
509
|
+
color?: string | null;
|
|
510
|
+
position?: number | null;
|
|
511
|
+
changesContract: boolean;
|
|
512
|
+
changesHours: boolean;
|
|
513
|
+
changesLevel: boolean;
|
|
514
|
+
changesPlace: boolean;
|
|
515
|
+
changesPay: boolean;
|
|
516
|
+
changesBenefits: boolean;
|
|
517
|
+
requiresUnilav: boolean;
|
|
518
|
+
} | null;
|
|
519
|
+
errors: Array<{
|
|
520
|
+
__typename?: "Error";
|
|
521
|
+
key: string;
|
|
522
|
+
name: string;
|
|
523
|
+
type: string;
|
|
524
|
+
}>;
|
|
525
|
+
} | null>;
|
|
456
526
|
/**
|
|
457
527
|
* Record a time-clock punch (`beginsAt`, optional `finishesAt`, `resourceId`).
|
|
458
528
|
* Returns the payload (with `errors`) or null. The new punch is at
|
|
@@ -580,22 +650,17 @@ export declare function updateKbCollection(c: UiduClient, v: UpdateKbCollectionM
|
|
|
580
650
|
}>;
|
|
581
651
|
} | null>;
|
|
582
652
|
/**
|
|
583
|
-
*
|
|
584
|
-
*
|
|
653
|
+
* Move a knowledge-base collection to the trash by `{ input: { id } }`, or
|
|
654
|
+
* delete it for good with `permanent: true`. Returns the payload (with
|
|
655
|
+
* `errors`) or null.
|
|
585
656
|
*/
|
|
586
|
-
export declare function deleteKbCollection(c: UiduClient, v:
|
|
587
|
-
|
|
588
|
-
kbCollection?: {
|
|
589
|
-
__typename?: "KbCollection";
|
|
657
|
+
export declare function deleteKbCollection(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
658
|
+
kbCollection: {
|
|
590
659
|
id: string;
|
|
591
660
|
} | null;
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
name: string;
|
|
596
|
-
type: string;
|
|
597
|
-
}>;
|
|
598
|
-
} | null>;
|
|
661
|
+
} & {
|
|
662
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
663
|
+
}) | null>;
|
|
599
664
|
/**
|
|
600
665
|
* Create a knowledge-base article in `attributes.kbCollectionId`. Returns the
|
|
601
666
|
* payload (with `errors`) or null. The new article is at `kbArticle.node`.
|
|
@@ -634,22 +699,17 @@ export declare function updateKbArticle(c: UiduClient, v: UpdateKbArticleMutatio
|
|
|
634
699
|
}>;
|
|
635
700
|
} | null>;
|
|
636
701
|
/**
|
|
637
|
-
*
|
|
638
|
-
* (with `errors`) or
|
|
702
|
+
* Move a knowledge-base article to the trash by `{ input: { id } }`, or delete
|
|
703
|
+
* it for good with `permanent: true`. Returns the payload (with `errors`) or
|
|
704
|
+
* null.
|
|
639
705
|
*/
|
|
640
|
-
export declare function deleteKbArticle(c: UiduClient, v:
|
|
641
|
-
|
|
642
|
-
kbArticle?: {
|
|
643
|
-
__typename?: "KbArticle";
|
|
706
|
+
export declare function deleteKbArticle(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
707
|
+
kbArticle: {
|
|
644
708
|
id: string;
|
|
645
709
|
} | null;
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
name: string;
|
|
650
|
-
type: string;
|
|
651
|
-
}>;
|
|
652
|
-
} | null>;
|
|
710
|
+
} & {
|
|
711
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
712
|
+
}) | null>;
|
|
653
713
|
/**
|
|
654
714
|
* Create a help-center channel. Returns the payload (with `errors`) or null.
|
|
655
715
|
* The new channel is at `channel.node`.
|
|
@@ -688,22 +748,16 @@ export declare function updateChannel(c: UiduClient, v: UpdateChannelMutationVar
|
|
|
688
748
|
}>;
|
|
689
749
|
} | null>;
|
|
690
750
|
/**
|
|
691
|
-
*
|
|
692
|
-
* (with `errors`) or null.
|
|
751
|
+
* Move a help-center channel to the trash by `{ input: { id } }`, or delete it
|
|
752
|
+
* for good with `permanent: true`. Returns the payload (with `errors`) or null.
|
|
693
753
|
*/
|
|
694
|
-
export declare function deleteChannel(c: UiduClient, v:
|
|
695
|
-
|
|
696
|
-
channel?: {
|
|
697
|
-
__typename?: "Channel";
|
|
754
|
+
export declare function deleteChannel(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
755
|
+
channel: {
|
|
698
756
|
id: string;
|
|
699
757
|
} | null;
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
name: string;
|
|
704
|
-
type: string;
|
|
705
|
-
}>;
|
|
706
|
-
} | null>;
|
|
758
|
+
} & {
|
|
759
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
760
|
+
}) | null>;
|
|
707
761
|
/**
|
|
708
762
|
* Publish a knowledge-base collection on a help-center channel. Returns the
|
|
709
763
|
* payload (with `errors`) or null. The new link is at `channelKbCollection`.
|
|
@@ -844,22 +898,16 @@ export declare function updateTask(c: UiduClient, v: UpdateTaskMutationVariables
|
|
|
844
898
|
}>;
|
|
845
899
|
} | null>;
|
|
846
900
|
/**
|
|
847
|
-
*
|
|
848
|
-
* null.
|
|
901
|
+
* Move a task to the trash by `{ input: { id } }`, or delete it for good with
|
|
902
|
+
* `permanent: true`. Returns the payload (with `errors`) or null.
|
|
849
903
|
*/
|
|
850
|
-
export declare function deleteTask(c: UiduClient, v:
|
|
851
|
-
|
|
852
|
-
task?: {
|
|
853
|
-
__typename?: "Task";
|
|
904
|
+
export declare function deleteTask(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
905
|
+
task: {
|
|
854
906
|
id: string;
|
|
855
907
|
} | null;
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
name: string;
|
|
860
|
-
type: string;
|
|
861
|
-
}>;
|
|
862
|
-
} | null>;
|
|
908
|
+
} & {
|
|
909
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
910
|
+
}) | null>;
|
|
863
911
|
/**
|
|
864
912
|
* Update a note: `{ input: { id, attributes } }`. Returns the payload (with
|
|
865
913
|
* `errors`) or null.
|
|
@@ -878,22 +926,16 @@ export declare function updateNote(c: UiduClient, v: UpdateNoteMutationVariables
|
|
|
878
926
|
}>;
|
|
879
927
|
} | null>;
|
|
880
928
|
/**
|
|
881
|
-
*
|
|
882
|
-
* null.
|
|
929
|
+
* Move a note to the trash by `{ input: { id } }`, or delete it for good with
|
|
930
|
+
* `permanent: true`. Returns the payload (with `errors`) or null.
|
|
883
931
|
*/
|
|
884
|
-
export declare function deleteNote(c: UiduClient, v:
|
|
885
|
-
|
|
886
|
-
note?: {
|
|
887
|
-
__typename?: "Note";
|
|
932
|
+
export declare function deleteNote(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
933
|
+
note: {
|
|
888
934
|
id: string;
|
|
889
935
|
} | null;
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
name: string;
|
|
894
|
-
type: string;
|
|
895
|
-
}>;
|
|
896
|
-
} | null>;
|
|
936
|
+
} & {
|
|
937
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
938
|
+
}) | null>;
|
|
897
939
|
/**
|
|
898
940
|
* Update a space: `{ input: { id, attributes } }`. Returns the payload (with
|
|
899
941
|
* `errors`) or null.
|
|
@@ -912,19 +954,14 @@ export declare function updateSpace(c: UiduClient, v: UpdateSpaceMutationVariabl
|
|
|
912
954
|
}>;
|
|
913
955
|
} | null>;
|
|
914
956
|
/**
|
|
915
|
-
*
|
|
916
|
-
* or null.
|
|
957
|
+
* Move a space to the trash by `{ input: { id } }`, or delete it for good with
|
|
958
|
+
* `permanent: true`. Returns the payload (with `errors`) or null.
|
|
917
959
|
*/
|
|
918
|
-
export declare function deleteSpace(c: UiduClient, v:
|
|
919
|
-
|
|
920
|
-
space?: {
|
|
921
|
-
__typename?: "Space";
|
|
960
|
+
export declare function deleteSpace(c: UiduClient, v: DeleteRecordVariables): Promise<({
|
|
961
|
+
space: {
|
|
922
962
|
id: string;
|
|
923
963
|
} | null;
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
type: string;
|
|
929
|
-
}>;
|
|
930
|
-
} | null>;
|
|
964
|
+
} & {
|
|
965
|
+
errors: NonNullable<RemovePayload>["errors"];
|
|
966
|
+
}) | null>;
|
|
967
|
+
export {};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
|
-
import { type CreateCcnlMutationVariables, type GetEmployeeQuery, type GetEmployeeQueryVariables, type ListCirclesQuery, type ListCirclesQueryVariables, type ListEmployeesQueryVariables, type ListEmploymentHistoryQueryVariables, type ListKindsQuery, type ListKindsQueryVariables, type ListOfficesQuery, type ListOfficesQueryVariables } from "./generated/index.js";
|
|
2
|
+
import { type CreateCcnlMutationVariables, type GetEmployeeQuery, type GetEmployeeQueryVariables, type ListCirclesQuery, type ListCirclesQueryVariables, type ListEmployeesQueryVariables, type ListEmploymentHistoryQueryVariables, type ListEmploymentVariationKindsQuery, type ListEmploymentVariationKindsQueryVariables, type ListKindsQuery, type ListKindsQueryVariables, type ListOfficesQuery, type ListOfficesQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Employee = NonNullable<NonNullable<GetEmployeeQuery['currentWorkspace']>['employee']>;
|
|
4
4
|
export type Circle = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListCirclesQuery['currentWorkspace']>['circles']>['edges']>[number]>['node']>;
|
|
5
5
|
export type Office = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListOfficesQuery['currentWorkspace']>['offices']>['edges']>[number]>['node']>;
|
|
6
|
+
/**
|
|
7
|
+
* A contract-variation reason (hours change, conversion to open-ended, a pay
|
|
8
|
+
* rise…) configured for the workspace — an employment's `varyAttributes` picks
|
|
9
|
+
* one by `employmentVariationKindId`.
|
|
10
|
+
*/
|
|
11
|
+
export type EmploymentVariationKind = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListEmploymentVariationKindsQuery['currentWorkspace']>['employmentVariationKinds']>['edges']>[number]>['node']>;
|
|
6
12
|
/** A `Kind` record — CCNLs (national collective labor contracts) are Kinds. */
|
|
7
13
|
export type Kind = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListKindsQuery['currentWorkspace']>['kinds']>['edges']>[number]>['node']>;
|
|
8
14
|
/**
|
|
@@ -56,6 +62,12 @@ export declare function listOffices(client: UiduClient, variables?: ListOfficesQ
|
|
|
56
62
|
export declare function listCircles(client: UiduClient, variables?: ListCirclesQueryVariables): Promise<Circle[]>;
|
|
57
63
|
/** List only the role-Circles (structured job titles) — an employment's `roleId`. */
|
|
58
64
|
export declare function listRoles(client: UiduClient, variables?: ListCirclesQueryVariables): Promise<Circle[]>;
|
|
65
|
+
/**
|
|
66
|
+
* List the workspace's employment variation kinds — the reasons a contract
|
|
67
|
+
* can change (hours, pay, level, place, benefits…), each flagging which
|
|
68
|
+
* aspects it touches. Used for a contract variation's `employmentVariationKindId`.
|
|
69
|
+
*/
|
|
70
|
+
export declare function listEmploymentVariationKinds(client: UiduClient, variables?: ListEmploymentVariationKindsQueryVariables): Promise<EmploymentVariationKind[]>;
|
|
59
71
|
/** List `Kind` records for the given polymorphic models. */
|
|
60
72
|
export declare function listKinds(client: UiduClient, variables: ListKindsQueryVariables): Promise<Kind[]>;
|
|
61
73
|
/**
|