@uidu/client 3.18.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 +20 -0
- package/dist/declarations/src/calls.d.ts +9 -1
- package/dist/declarations/src/candidates.d.ts +102 -0
- package/dist/declarations/src/contracts.d.ts +8 -0
- package/dist/declarations/src/field-values.d.ts +34 -0
- package/dist/declarations/src/generated/index.d.ts +11792 -5143
- package/dist/declarations/src/index.d.ts +17 -3
- package/dist/declarations/src/meetings.d.ts +41 -0
- package/dist/declarations/src/mutations.d.ts +80 -131
- 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 +402 -31
- package/dist/uidu-client.cjs.prod.js +402 -31
- package/dist/uidu-client.esm.js +373 -32
- package/package.json +1 -1
- package/src/calls.ts +37 -0
- package/src/candidates.ts +105 -0
- package/src/contracts.ts +44 -0
- package/src/field-values.ts +95 -0
- package/src/generated/index.ts +404 -332
- package/src/index.ts +53 -2
- package/src/meetings.ts +37 -0
- package/src/mutations.test.ts +40 -1
- package/src/mutations.ts +122 -60
- 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/contracts/ContractQueries.graphql +67 -0
- package/src/queries/courses/CourseMutations.graphql +0 -13
- package/src/queries/discardable/DiscardableMutations.graphql +32 -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/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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @uidu/client
|
|
2
2
|
|
|
3
|
+
## 3.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8d0a68e: Move the delete functions of discardable records onto uidu's polymorphic trash.
|
|
8
|
+
|
|
9
|
+
uidu removed the per-entity `deleteX` mutations of discardable records, so
|
|
10
|
+
`deleteContact`, `deleteCourse`, `deleteForm`, `deleteChannel`,
|
|
11
|
+
`deleteKbCollection`, `deleteKbArticle`, `deleteNote`, `deleteEmployment`,
|
|
12
|
+
`deleteSpace` and `deleteTask` failed against the API. They now call
|
|
13
|
+
`discardableDiscard` and move the record to the trash (restorable from uidu for
|
|
14
|
+
30 days); pass `permanent: true` to call `discardableDelete` and delete it for
|
|
15
|
+
good. Names, the `{ input: { id } }` argument and the
|
|
16
|
+
`{ <entity>: { id } | null, errors }` payload are unchanged.
|
|
17
|
+
|
|
18
|
+
The CLI's `<entity> delete <id>` trashes the same way and takes `--permanent`
|
|
19
|
+
to delete for good.
|
|
20
|
+
|
|
21
|
+
- 6665508: Add the reads and writes a recruiting app needs: `findCandidates`, `getCandidate`, `updateCandidate`, `listPools`, `createPoolContact`; `listReviews`, `getReview`, `createReview` (with or without a cycle: `reviewTemplateId`, `dueOn`), `createReviews`, `updateReview`, `listReviewTemplates`; `listMeetings`, `createMeeting`; `listSkills`, `createSkill`; `listWorkSites`; `listCallStatuses` (a call's application pipeline); `listContracts`, `getContract` with their field values; `getRecordFieldValues`, `listFieldValueHistory` and `fieldValueAsOf` for field values over time (`validFrom`). The uidu skill documents them.
|
|
22
|
+
|
|
3
23
|
## 3.18.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
|
-
import { type GetCallQuery, type GetCallQueryVariables, type ListCallsQueryVariables } from "./generated/index.js";
|
|
2
|
+
import { type GetCallQuery, type GetCallQueryVariables, type ListCallStatusesQuery, type ListCallStatusesQueryVariables, type ListCallsQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Call = NonNullable<NonNullable<GetCallQuery['currentWorkspace']>['call']>;
|
|
4
|
+
/** One stage of a call's pipeline — what `Application.status` points at. */
|
|
5
|
+
export type CallStatus = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListCallStatusesQuery['currentWorkspace']>['call']>['statuses']>['edges']>[number]>['node']>;
|
|
4
6
|
/**
|
|
5
7
|
* One call (a job opening or open call) with its application `form`, same
|
|
6
8
|
* shape as `getForm`, or null.
|
|
@@ -33,3 +35,9 @@ export declare function listCalls(client: UiduClient, variables?: ListCallsQuery
|
|
|
33
35
|
city?: string | null;
|
|
34
36
|
} | null;
|
|
35
37
|
}[]>;
|
|
38
|
+
/**
|
|
39
|
+
* The pipeline of a call: the statuses its applications move through, sorted
|
|
40
|
+
* by `position`, walking all pages. Move an application along it with
|
|
41
|
+
* `updateApplication` (`attributes.statusId`). Requires a Bearer token.
|
|
42
|
+
*/
|
|
43
|
+
export declare function listCallStatuses(client: UiduClient, variables: Omit<ListCallStatusesQueryVariables, 'after'>): Promise<CallStatus[]>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.js";
|
|
2
|
+
import { type CreatePoolContactMutationVariables, type FindCandidatesQuery, type FindCandidatesQueryVariables, type GetCandidateQuery, type GetCandidateQueryVariables, type ListPoolsQuery, type ListPoolsQueryVariables, type UpdateCandidateMutationVariables } from "./generated/index.js";
|
|
3
|
+
export type CandidateSearch = NonNullable<NonNullable<FindCandidatesQuery['currentWorkspace']>['findCandidates']>;
|
|
4
|
+
export type Candidate = CandidateSearch['candidates'][number];
|
|
5
|
+
export type CandidateDetail = Extract<NonNullable<GetCandidateQuery['node']>, {
|
|
6
|
+
__typename: 'Candidate';
|
|
7
|
+
}>;
|
|
8
|
+
export type Pool = NonNullable<NonNullable<NonNullable<NonNullable<ListPoolsQuery['currentWorkspace']>['pools']['edges']>[number]>['node']>;
|
|
9
|
+
/**
|
|
10
|
+
* Rank the talent pool against a description (`term`) — and, with `callId`,
|
|
11
|
+
* that call's applications too — and return the `candidates`, `applications`
|
|
12
|
+
* and per-record `evidence`, or null when the viewer may not search.
|
|
13
|
+
*
|
|
14
|
+
* This is the only way to list candidates: the workspace has no plain
|
|
15
|
+
* `candidates` connection. A blank `term` with a `callId` uses the call's own
|
|
16
|
+
* words; `near` + `withinKm` keep only those living close enough, and
|
|
17
|
+
* `eligibleFor` only those of an age the contract allows.
|
|
18
|
+
*/
|
|
19
|
+
export declare function findCandidates(client: UiduClient, variables?: FindCandidatesQueryVariables): Promise<CandidateSearch | null>;
|
|
20
|
+
/**
|
|
21
|
+
* One candidate by GlobalID, with their applications and the pools they are
|
|
22
|
+
* in, or null.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getCandidate(client: UiduClient, variables: GetCandidateQueryVariables): Promise<CandidateDetail | null>;
|
|
25
|
+
/**
|
|
26
|
+
* Update a candidate: pool consent (`poolConsentAt`), `source`, or
|
|
27
|
+
* `extendRetention: true` to push `retainUntil` out by another retention
|
|
28
|
+
* period. Returns the mutation payload as-is (including any `errors`).
|
|
29
|
+
*/
|
|
30
|
+
export declare function updateCandidate(client: UiduClient, variables: UpdateCandidateMutationVariables): Promise<{
|
|
31
|
+
__typename?: "UpdateCandidatePayload";
|
|
32
|
+
candidate?: {
|
|
33
|
+
__typename?: "Candidate";
|
|
34
|
+
id: string;
|
|
35
|
+
name?: string | null;
|
|
36
|
+
cvHeadline?: string | null;
|
|
37
|
+
cvSummary?: string | null;
|
|
38
|
+
source: import("./generated/index.js").CandidateSourceEnum;
|
|
39
|
+
poolConsent: boolean;
|
|
40
|
+
poolConsentAt?: any | null;
|
|
41
|
+
retainUntil?: any | null;
|
|
42
|
+
retentionMonths: number;
|
|
43
|
+
lastInteractionAt?: any | null;
|
|
44
|
+
createdAt: any;
|
|
45
|
+
updatedAt: any;
|
|
46
|
+
contact?: {
|
|
47
|
+
__typename?: "Contact";
|
|
48
|
+
id: string;
|
|
49
|
+
name?: string | null;
|
|
50
|
+
email?: string | null;
|
|
51
|
+
} | null;
|
|
52
|
+
user: {
|
|
53
|
+
__typename?: "User";
|
|
54
|
+
id: string;
|
|
55
|
+
name?: string | null;
|
|
56
|
+
email?: string | null;
|
|
57
|
+
};
|
|
58
|
+
pools: Array<{
|
|
59
|
+
__typename?: "Pool";
|
|
60
|
+
id: string;
|
|
61
|
+
name?: string | null;
|
|
62
|
+
}>;
|
|
63
|
+
} | null;
|
|
64
|
+
errors: Array<{
|
|
65
|
+
__typename?: "Error";
|
|
66
|
+
key: string;
|
|
67
|
+
name: string;
|
|
68
|
+
type: string;
|
|
69
|
+
}>;
|
|
70
|
+
} | null>;
|
|
71
|
+
/** The workspace's talent pools with how many contacts each holds; page with `first`/`after`. */
|
|
72
|
+
export declare function listPools(client: UiduClient, variables?: ListPoolsQueryVariables): Promise<Pool[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Add a contact to a pool (`attributes: { poolId, contactId }`). Returns the
|
|
75
|
+
* mutation payload as-is (including any `errors`).
|
|
76
|
+
*/
|
|
77
|
+
export declare function createPoolContact(client: UiduClient, variables: CreatePoolContactMutationVariables): Promise<{
|
|
78
|
+
__typename?: "CreatePoolContactPayload";
|
|
79
|
+
poolContact?: {
|
|
80
|
+
__typename?: "PoolContactEdge";
|
|
81
|
+
node?: {
|
|
82
|
+
__typename?: "PoolContact";
|
|
83
|
+
id: string;
|
|
84
|
+
pool: {
|
|
85
|
+
__typename?: "Pool";
|
|
86
|
+
id: string;
|
|
87
|
+
name?: string | null;
|
|
88
|
+
};
|
|
89
|
+
contact: {
|
|
90
|
+
__typename?: "Contact";
|
|
91
|
+
id: string;
|
|
92
|
+
name?: string | null;
|
|
93
|
+
};
|
|
94
|
+
} | null;
|
|
95
|
+
} | null;
|
|
96
|
+
errors: Array<{
|
|
97
|
+
__typename?: "Error";
|
|
98
|
+
key: string;
|
|
99
|
+
name: string;
|
|
100
|
+
type: string;
|
|
101
|
+
}>;
|
|
102
|
+
} | null>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.js";
|
|
2
|
+
import { type GetContractQuery, type GetContractQueryVariables, type ListContractsQuery, type ListContractsQueryVariables } from "./generated/index.js";
|
|
3
|
+
export type Contract = NonNullable<NonNullable<NonNullable<NonNullable<ListContractsQuery['currentWorkspace']>['contracts']['edges']>[number]>['node']>;
|
|
4
|
+
export type ContractDetail = NonNullable<NonNullable<GetContractQuery['currentWorkspace']>['contract']>;
|
|
5
|
+
/** The workspace's contracts with their custom fields, filtered with `params`; page with `first`/`after`. */
|
|
6
|
+
export declare function listContracts(client: UiduClient, variables?: ListContractsQueryVariables): Promise<Contract[]>;
|
|
7
|
+
/** One contract with its field values and the fields that apply to it, or null. */
|
|
8
|
+
export declare function getContract(client: UiduClient, variables: GetContractQueryVariables): Promise<ContractDetail | null>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { UiduClient } from "./client.js";
|
|
2
|
+
import { type GetRecordFieldValuesQueryVariables, type ListFieldValueHistoryQueryVariables, type RecordFieldValueFragment } from "./generated/index.js";
|
|
3
|
+
export type RecordFieldValue = RecordFieldValueFragment;
|
|
4
|
+
export type RecordFieldValues = {
|
|
5
|
+
/** The record's GraphQL type, e.g. `Contact`, `Contract`, `Employee`. */
|
|
6
|
+
typename: string;
|
|
7
|
+
id: string;
|
|
8
|
+
/** Current values keyed by field shortname. */
|
|
9
|
+
byShortname: Record<string, unknown>;
|
|
10
|
+
/** Current values with their field and dates. */
|
|
11
|
+
fieldValues: RecordFieldValue[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The current field values of any record that carries custom fields (contact,
|
|
15
|
+
* employee, contract, work site, application…), by GlobalID; null when the id
|
|
16
|
+
* resolves to nothing or to a type without fields.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getRecordFieldValues(client: UiduClient, variables: GetRecordFieldValuesQueryVariables): Promise<RecordFieldValues | null>;
|
|
19
|
+
/**
|
|
20
|
+
* Every value `fieldId` has held on the record `modelId`, oldest first, walking
|
|
21
|
+
* all pages. Pair it with {@link fieldValueAsOf} to answer "what did it say on
|
|
22
|
+
* a given day?".
|
|
23
|
+
*/
|
|
24
|
+
export declare function listFieldValueHistory(client: UiduClient, variables: Omit<ListFieldValueHistoryQueryVariables, 'after'>): Promise<RecordFieldValue[]>;
|
|
25
|
+
/**
|
|
26
|
+
* The value that held on `date` (an ISO8601 date, default today) among a
|
|
27
|
+
* field's history: the latest `validFrom` not after the date, ties going to
|
|
28
|
+
* the row written last. Null when nothing held yet.
|
|
29
|
+
*
|
|
30
|
+
* The same rule uidu applies server-side for a record's current value; the
|
|
31
|
+
* GraphQL API takes no as-of argument, so reports read the history with
|
|
32
|
+
* {@link listFieldValueHistory} and pick here.
|
|
33
|
+
*/
|
|
34
|
+
export declare function fieldValueAsOf(history: readonly RecordFieldValue[], date?: string): RecordFieldValue | null;
|