@uidu/client 3.11.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 CHANGED
@@ -1,5 +1,29 @@
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
+
21
+ ## 3.12.0
22
+
23
+ ### Minor Changes
24
+
25
+ - 38800c8: Read the workspace's goals (OKRs). `@uidu/client` adds `listGoals`, `getGoal`, `listTimeframes` and `updateGoal`, plus `goalValue` / `toGoalRaw` / `goalProgress` / `goalTimeElapsed` / `isGoalBehind` for values uidu stores x100. The CLI gets `goals` and `timeframes`. Inside a custom app the session token can now read goals and timeframes (read-only), and the `uidu` skill gains a "Workspace data" section: read what the workspace already holds, create a Model only for data uidu has no place for, and the valid field kinds for `ensureModel`.
26
+
3
27
  ## 3.11.0
4
28
 
5
29
  ### 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`) are the public
13
- * "apply to this job" path.
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>;