@uidu/client 3.12.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/declarations/src/applications.d.ts +56 -3
- package/dist/declarations/src/generated/index.d.ts +2883 -166
- package/dist/declarations/src/index.d.ts +3 -3
- package/dist/declarations/src/mutations.d.ts +20 -1
- package/dist/declarations/src/sites.d.ts +23 -1
- package/dist/uidu-client.cjs.dev.js +54 -3
- package/dist/uidu-client.cjs.prod.js +54 -3
- package/dist/uidu-client.esm.js +51 -4
- package/package.json +1 -1
- package/src/applications.test.ts +42 -0
- package/src/applications.ts +31 -2
- package/src/generated/index.ts +2526 -170
- package/src/index.ts +8 -1
- package/src/mutations.ts +7 -0
- package/src/queries/applications/UpdateApplication.graphql +17 -0
- package/src/queries/people/TimeClockMutations.graphql +17 -0
- package/src/queries/sites/CreateSite.graphql +15 -0
- package/src/sites.test.ts +26 -0
- package/src/sites.ts +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @uidu/client
|
|
2
2
|
|
|
3
|
+
## 3.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0c79f9b: Provision a Site (the new CMS) from the SDK. `@uidu/client` adds `createSite` (first-class, `CreateSite.graphql`); the CLI gets a write-only `sites` resource (`uidu sites create --attributes '{...}'`) — reads (`getSiteByDomain`, `listSitePages`, ...) take a domain/siteId shape the generic `list`/`get` verbs don't fit, so they stay out of `RESOURCES`. The demo gets an `/admin/sites` page proving the round-trip.
|
|
8
|
+
- 2ac9392: Add `createTimeClock` to `@uidu/client` (first-class, generated from `CreateTimeClock`) and a `time-clocks` entry (`create`) to `@uidu/cli`'s `RESOURCES`, so recording a punch is driveable from the SDK and the CLI, not only generically via `uidu tools call`.
|
|
9
|
+
- 57fad75: Add `updateApplication` and `completeApplication`.
|
|
10
|
+
|
|
11
|
+
`createApplication` leaves an application in `draft`, and a call's board in
|
|
12
|
+
uidu lists only completed ones, so an application sent from an external site
|
|
13
|
+
never showed up for whoever reviews it. `completeApplication(client, id)` fires
|
|
14
|
+
the `complete!` event — what uidu's own public site does after its last step —
|
|
15
|
+
which stamps `completedAt`, marks the form response completed and notifies the
|
|
16
|
+
call's members. `updateApplication` is the general mutation underneath.
|
|
17
|
+
|
|
18
|
+
The generated types are regenerated from uidu `main`: the `CustomAppDraft*`
|
|
19
|
+
types go away (renamed `BuilderDraft` in uidu, unused by the SDK).
|
|
20
|
+
|
|
3
21
|
## 3.12.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
|
-
import { type CreateApplicationMutationVariables, type ListApplicationsQuery, type ListApplicationsQueryVariables } from "./generated/index.js";
|
|
2
|
+
import { type CreateApplicationMutationVariables, type ListApplicationsQuery, type ListApplicationsQueryVariables, type UpdateApplicationMutationVariables } from "./generated/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* An application submitted to a job posting (a {@link Job}).
|
|
5
5
|
*
|
|
@@ -9,8 +9,9 @@ import { type CreateApplicationMutationVariables, type ListApplicationsQuery, ty
|
|
|
9
9
|
* `yarn workspace @uidu/client codegen` after editing those files.
|
|
10
10
|
*
|
|
11
11
|
* Reads (`listApplications`) require a Bearer token (`apiKey`): applications
|
|
12
|
-
* hold private candidate data. Writes (`createApplication
|
|
13
|
-
* "apply to this
|
|
12
|
+
* hold private candidate data. Writes (`createApplication`,
|
|
13
|
+
* `updateApplication`, `completeApplication`) are the public "apply to this
|
|
14
|
+
* job" path.
|
|
14
15
|
*/
|
|
15
16
|
export type Application = NonNullable<NonNullable<NonNullable<NonNullable<ListApplicationsQuery['currentWorkspace']>['applications']['edges']>[number]>['node']>;
|
|
16
17
|
/** List applications across the workspace (requires a Bearer token). */
|
|
@@ -55,3 +56,55 @@ export declare function createApplication(client: UiduClient, variables: CreateA
|
|
|
55
56
|
} | null;
|
|
56
57
|
} | null;
|
|
57
58
|
} | null>;
|
|
59
|
+
/**
|
|
60
|
+
* Update an application, optionally firing a state event (`event: 'complete!'`).
|
|
61
|
+
* Returns the mutation payload as-is (including any `errors`) rather than
|
|
62
|
+
* throwing.
|
|
63
|
+
*/
|
|
64
|
+
export declare function updateApplication(client: UiduClient, variables: UpdateApplicationMutationVariables): Promise<{
|
|
65
|
+
__typename?: "UpdateApplicationPayload";
|
|
66
|
+
errors: Array<{
|
|
67
|
+
__typename?: "Error";
|
|
68
|
+
key: string;
|
|
69
|
+
name: string;
|
|
70
|
+
type: string;
|
|
71
|
+
}>;
|
|
72
|
+
application?: {
|
|
73
|
+
__typename?: "Application";
|
|
74
|
+
id: string;
|
|
75
|
+
aasmState?: string | null;
|
|
76
|
+
completedAt?: any | null;
|
|
77
|
+
formResponse?: {
|
|
78
|
+
__typename?: "FormResponse";
|
|
79
|
+
id: string;
|
|
80
|
+
} | null;
|
|
81
|
+
} | null;
|
|
82
|
+
} | null>;
|
|
83
|
+
/**
|
|
84
|
+
* Submit a draft application, the last step of applying.
|
|
85
|
+
*
|
|
86
|
+
* `createApplication` leaves the application in `draft`, and a call's board
|
|
87
|
+
* lists only completed ones: until this runs, nobody sees the candidate. The
|
|
88
|
+
* `complete!` event stamps `completedAt`, marks the form response completed and
|
|
89
|
+
* notifies whoever follows the call — the same call uidu's own public site
|
|
90
|
+
* makes after its last step. A no-op on an application already completed.
|
|
91
|
+
*/
|
|
92
|
+
export declare function completeApplication(client: UiduClient, id: string): Promise<{
|
|
93
|
+
__typename?: "UpdateApplicationPayload";
|
|
94
|
+
errors: Array<{
|
|
95
|
+
__typename?: "Error";
|
|
96
|
+
key: string;
|
|
97
|
+
name: string;
|
|
98
|
+
type: string;
|
|
99
|
+
}>;
|
|
100
|
+
application?: {
|
|
101
|
+
__typename?: "Application";
|
|
102
|
+
id: string;
|
|
103
|
+
aasmState?: string | null;
|
|
104
|
+
completedAt?: any | null;
|
|
105
|
+
formResponse?: {
|
|
106
|
+
__typename?: "FormResponse";
|
|
107
|
+
id: string;
|
|
108
|
+
} | null;
|
|
109
|
+
} | null;
|
|
110
|
+
} | null>;
|