@uidu/client 3.20.0 → 3.21.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 +7 -0
- package/dist/declarations/src/candidates.d.ts +118 -5
- package/dist/declarations/src/generated/index.d.ts +629 -19
- package/dist/declarations/src/index.d.ts +5 -5
- package/dist/declarations/src/meetings.d.ts +42 -1
- package/dist/declarations/src/reviews.d.ts +14 -7
- package/dist/uidu-client.cjs.dev.js +90 -9
- package/dist/uidu-client.cjs.prod.js +90 -9
- package/dist/uidu-client.esm.js +85 -10
- package/package.json +1 -1
- package/src/candidates.ts +84 -3
- package/src/generated/index.ts +271 -35
- package/src/index.ts +15 -3
- package/src/meetings.ts +35 -0
- package/src/queries/candidates/CandidateFields.graphql +19 -1
- package/src/queries/candidates/CandidateMutations.graphql +27 -0
- package/src/queries/candidates/CandidateQueries.graphql +52 -3
- package/src/queries/meetings/MeetingQueries.graphql +46 -0
- package/src/queries/reviews/ReviewQueries.graphql +22 -3
- package/src/recruiting.test.ts +102 -1
- package/src/reviews.ts +27 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @uidu/client
|
|
2
2
|
|
|
3
|
+
## 3.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 70fd345: Recruiting: `listCandidates` lists the workspace's candidates with their custom fields, filtered by pool, source and last interaction. `listReviews` without `ownerId` now lists every review in the workspace, with or without a cycle, filtered by person, template, `dueOn` and `completedAt`. `getReview` returns `pdfUrl`, the review printed to PDF.
|
|
8
|
+
- bf1e6c8: Recruiting: `createCandidate`, `getPool`, `deletePoolContact`, `getMeeting` and `updateMeeting`. A candidate's `source` is now the record they came through (an Application, Pool, Organization or User, as uidu returns it since the polymorphic source landed), with `sourceChannel` saying how — the previous string `source` no longer matches the API.
|
|
9
|
+
|
|
3
10
|
## 3.20.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -1,18 +1,27 @@
|
|
|
1
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";
|
|
2
|
+
import { type CreateCandidateMutationVariables, type CreatePoolContactMutationVariables, type DeletePoolContactMutationVariables, type FindCandidatesQuery, type FindCandidatesQueryVariables, type GetCandidateQuery, type GetCandidateQueryVariables, type GetPoolQuery, type GetPoolQueryVariables, type ListCandidatesQuery, type ListCandidatesQueryVariables, type ListPoolsQuery, type ListPoolsQueryVariables, type UpdateCandidateMutationVariables } from "./generated/index.js";
|
|
3
3
|
export type CandidateSearch = NonNullable<NonNullable<FindCandidatesQuery['currentWorkspace']>['findCandidates']>;
|
|
4
4
|
export type Candidate = CandidateSearch['candidates'][number];
|
|
5
5
|
export type CandidateDetail = Extract<NonNullable<GetCandidateQuery['node']>, {
|
|
6
6
|
__typename: 'Candidate';
|
|
7
7
|
}>;
|
|
8
8
|
export type Pool = NonNullable<NonNullable<NonNullable<NonNullable<ListPoolsQuery['currentWorkspace']>['pools']['edges']>[number]>['node']>;
|
|
9
|
+
export type CandidateListItem = NonNullable<NonNullable<NonNullable<NonNullable<ListCandidatesQuery['currentWorkspace']>['candidates']['edges']>[number]>['node']>;
|
|
10
|
+
export type PoolDetail = NonNullable<NonNullable<GetPoolQuery['currentWorkspace']>['pool']>;
|
|
11
|
+
export type PoolContact = NonNullable<NonNullable<NonNullable<PoolDetail['poolContacts']['edges']>[number]>['node']>;
|
|
12
|
+
/**
|
|
13
|
+
* The workspace's candidates with their custom fields, filtered with
|
|
14
|
+
* `params.filters` — `poolIds` (in), `source` (in, the GlobalIDs of the
|
|
15
|
+
* Application, Pool, Organization or User they came through) and
|
|
16
|
+
* `lastInteractionAt` (`>=`, `<=`, `between`); page with `first`/`after`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function listCandidates(client: UiduClient, variables?: ListCandidatesQueryVariables): Promise<CandidateListItem[]>;
|
|
9
19
|
/**
|
|
10
20
|
* Rank the talent pool against a description (`term`) — and, with `callId`,
|
|
11
21
|
* that call's applications too — and return the `candidates`, `applications`
|
|
12
22
|
* and per-record `evidence`, or null when the viewer may not search.
|
|
13
23
|
*
|
|
14
|
-
*
|
|
15
|
-
* `candidates` connection. A blank `term` with a `callId` uses the call's own
|
|
24
|
+
* For a plain filtered list use {@link listCandidates}. A blank `term` with a `callId` uses the call's own
|
|
16
25
|
* words; `near` + `withinKm` keep only those living close enough, and
|
|
17
26
|
* `eligibleFor` only those of an age the contract allows.
|
|
18
27
|
*/
|
|
@@ -23,7 +32,77 @@ export declare function findCandidates(client: UiduClient, variables?: FindCandi
|
|
|
23
32
|
*/
|
|
24
33
|
export declare function getCandidate(client: UiduClient, variables: GetCandidateQueryVariables): Promise<CandidateDetail | null>;
|
|
25
34
|
/**
|
|
26
|
-
*
|
|
35
|
+
* Add someone to the talent pool as a candidate: `attributes: { userId,
|
|
36
|
+
* sourceChannel?, sourceId?, poolConsentAt?, fieldValues? }`, where `sourceId`
|
|
37
|
+
* is the GlobalID of the Application, Pool, Organization or User they came
|
|
38
|
+
* through. Returns the mutation payload as-is (including any `errors`).
|
|
39
|
+
*/
|
|
40
|
+
export declare function createCandidate(client: UiduClient, variables: CreateCandidateMutationVariables): Promise<{
|
|
41
|
+
__typename?: "CreateCandidatePayload";
|
|
42
|
+
candidates?: {
|
|
43
|
+
__typename?: "CandidateConnection";
|
|
44
|
+
edges?: Array<{
|
|
45
|
+
__typename?: "CandidateEdge";
|
|
46
|
+
node?: {
|
|
47
|
+
__typename?: "Candidate";
|
|
48
|
+
id: string;
|
|
49
|
+
name?: string | null;
|
|
50
|
+
cvHeadline?: string | null;
|
|
51
|
+
cvSummary?: string | null;
|
|
52
|
+
sourceChannel: import("./generated/index.js").CandidateSourceEnum;
|
|
53
|
+
poolConsent: boolean;
|
|
54
|
+
poolConsentAt?: any | null;
|
|
55
|
+
retainUntil?: any | null;
|
|
56
|
+
retentionMonths: number;
|
|
57
|
+
lastInteractionAt?: any | null;
|
|
58
|
+
createdAt: any;
|
|
59
|
+
updatedAt: any;
|
|
60
|
+
source?: {
|
|
61
|
+
__typename: "Application";
|
|
62
|
+
id: string;
|
|
63
|
+
} | {
|
|
64
|
+
__typename: "Organization";
|
|
65
|
+
id: string;
|
|
66
|
+
name?: string | null;
|
|
67
|
+
} | {
|
|
68
|
+
__typename: "Pool";
|
|
69
|
+
id: string;
|
|
70
|
+
name?: string | null;
|
|
71
|
+
} | {
|
|
72
|
+
__typename: "User";
|
|
73
|
+
id: string;
|
|
74
|
+
name?: string | null;
|
|
75
|
+
} | null;
|
|
76
|
+
contact?: {
|
|
77
|
+
__typename?: "Contact";
|
|
78
|
+
id: string;
|
|
79
|
+
name?: string | null;
|
|
80
|
+
email?: string | null;
|
|
81
|
+
} | null;
|
|
82
|
+
user: {
|
|
83
|
+
__typename?: "User";
|
|
84
|
+
id: string;
|
|
85
|
+
name?: string | null;
|
|
86
|
+
email?: string | null;
|
|
87
|
+
};
|
|
88
|
+
pools: Array<{
|
|
89
|
+
__typename?: "Pool";
|
|
90
|
+
id: string;
|
|
91
|
+
name?: string | null;
|
|
92
|
+
}>;
|
|
93
|
+
} | null;
|
|
94
|
+
} | null> | null;
|
|
95
|
+
} | null;
|
|
96
|
+
errors: Array<{
|
|
97
|
+
__typename?: "Error";
|
|
98
|
+
key: string;
|
|
99
|
+
name: string;
|
|
100
|
+
type: string;
|
|
101
|
+
}>;
|
|
102
|
+
} | null>;
|
|
103
|
+
/**
|
|
104
|
+
* Update a candidate: pool consent (`poolConsentAt`), where they came from
|
|
105
|
+
* (`sourceChannel` + `sourceId`), custom `fieldValues`, or
|
|
27
106
|
* `extendRetention: true` to push `retainUntil` out by another retention
|
|
28
107
|
* period. Returns the mutation payload as-is (including any `errors`).
|
|
29
108
|
*/
|
|
@@ -35,7 +114,7 @@ export declare function updateCandidate(client: UiduClient, variables: UpdateCan
|
|
|
35
114
|
name?: string | null;
|
|
36
115
|
cvHeadline?: string | null;
|
|
37
116
|
cvSummary?: string | null;
|
|
38
|
-
|
|
117
|
+
sourceChannel: import("./generated/index.js").CandidateSourceEnum;
|
|
39
118
|
poolConsent: boolean;
|
|
40
119
|
poolConsentAt?: any | null;
|
|
41
120
|
retainUntil?: any | null;
|
|
@@ -43,6 +122,22 @@ export declare function updateCandidate(client: UiduClient, variables: UpdateCan
|
|
|
43
122
|
lastInteractionAt?: any | null;
|
|
44
123
|
createdAt: any;
|
|
45
124
|
updatedAt: any;
|
|
125
|
+
source?: {
|
|
126
|
+
__typename: "Application";
|
|
127
|
+
id: string;
|
|
128
|
+
} | {
|
|
129
|
+
__typename: "Organization";
|
|
130
|
+
id: string;
|
|
131
|
+
name?: string | null;
|
|
132
|
+
} | {
|
|
133
|
+
__typename: "Pool";
|
|
134
|
+
id: string;
|
|
135
|
+
name?: string | null;
|
|
136
|
+
} | {
|
|
137
|
+
__typename: "User";
|
|
138
|
+
id: string;
|
|
139
|
+
name?: string | null;
|
|
140
|
+
} | null;
|
|
46
141
|
contact?: {
|
|
47
142
|
__typename?: "Contact";
|
|
48
143
|
id: string;
|
|
@@ -70,6 +165,11 @@ export declare function updateCandidate(client: UiduClient, variables: UpdateCan
|
|
|
70
165
|
} | null>;
|
|
71
166
|
/** The workspace's talent pools with how many contacts each holds; page with `first`/`after`. */
|
|
72
167
|
export declare function listPools(client: UiduClient, variables?: ListPoolsQueryVariables): Promise<Pool[]>;
|
|
168
|
+
/**
|
|
169
|
+
* One talent pool by GlobalID with a page of the contacts in it (`first` /
|
|
170
|
+
* `after`), or null.
|
|
171
|
+
*/
|
|
172
|
+
export declare function getPool(client: UiduClient, variables: GetPoolQueryVariables): Promise<PoolDetail | null>;
|
|
73
173
|
/**
|
|
74
174
|
* Add a contact to a pool (`attributes: { poolId, contactId }`). Returns the
|
|
75
175
|
* mutation payload as-is (including any `errors`).
|
|
@@ -100,3 +200,16 @@ export declare function createPoolContact(client: UiduClient, variables: CreateP
|
|
|
100
200
|
type: string;
|
|
101
201
|
}>;
|
|
102
202
|
} | null>;
|
|
203
|
+
/**
|
|
204
|
+
* Take a contact out of a pool, by the PoolContact's GlobalID. Returns the
|
|
205
|
+
* mutation payload as-is (including any `errors`).
|
|
206
|
+
*/
|
|
207
|
+
export declare function deletePoolContact(client: UiduClient, variables: DeletePoolContactMutationVariables): Promise<{
|
|
208
|
+
__typename?: "DeletePoolContactPayload";
|
|
209
|
+
errors: Array<{
|
|
210
|
+
__typename?: "Error";
|
|
211
|
+
key: string;
|
|
212
|
+
name: string;
|
|
213
|
+
type: string;
|
|
214
|
+
}>;
|
|
215
|
+
} | null>;
|