@uidu/client 3.12.0 → 3.13.1
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 +25 -0
- package/dist/declarations/src/actions.d.ts +10 -0
- package/dist/declarations/src/applications.d.ts +56 -3
- package/dist/declarations/src/benefit-enrollments.d.ts +5 -0
- package/dist/declarations/src/benefits.d.ts +5 -0
- package/dist/declarations/src/bookings.d.ts +22 -0
- package/dist/declarations/src/calls.d.ts +8 -0
- package/dist/declarations/src/campaigns.d.ts +12 -0
- package/dist/declarations/src/client.d.ts +13 -1
- package/dist/declarations/src/cms.d.ts +32 -0
- package/dist/declarations/src/contacts.d.ts +16 -0
- package/dist/declarations/src/courses.d.ts +23 -0
- package/dist/declarations/src/donations.d.ts +19 -0
- package/dist/declarations/src/events.d.ts +19 -0
- package/dist/declarations/src/forms.d.ts +19 -0
- package/dist/declarations/src/generated/index.d.ts +2893 -176
- package/dist/declarations/src/goals.d.ts +4 -0
- package/dist/declarations/src/help-center.d.ts +4 -0
- package/dist/declarations/src/index.d.ts +3 -3
- package/dist/declarations/src/kb.d.ts +15 -0
- package/dist/declarations/src/models.d.ts +54 -0
- package/dist/declarations/src/mutations.d.ts +175 -1
- package/dist/declarations/src/notes.d.ts +4 -0
- package/dist/declarations/src/people.d.ts +8 -0
- package/dist/declarations/src/search.d.ts +7 -0
- package/dist/declarations/src/sites.d.ts +23 -1
- package/dist/declarations/src/spaces.d.ts +4 -0
- package/dist/declarations/src/stories.d.ts +11 -0
- package/dist/declarations/src/system.d.ts +4 -0
- package/dist/declarations/src/tasks.d.ts +4 -0
- package/dist/declarations/src/types.d.ts +4 -0
- package/dist/uidu-client.cjs.dev.js +585 -10
- package/dist/uidu-client.cjs.prod.js +585 -10
- package/dist/uidu-client.esm.js +582 -11
- package/package.json +1 -1
- package/src/actions.ts +10 -6
- package/src/applications.test.ts +42 -0
- package/src/applications.ts +31 -2
- package/src/benefit-enrollments.ts +5 -0
- package/src/benefits.ts +5 -0
- package/src/bookings.ts +22 -0
- package/src/calls.ts +8 -0
- package/src/campaigns.ts +12 -0
- package/src/client.ts +13 -1
- package/src/cms.ts +32 -0
- package/src/contacts.ts +16 -0
- package/src/courses.ts +23 -0
- package/src/donations.ts +19 -0
- package/src/events.ts +19 -0
- package/src/forms.ts +19 -0
- package/src/generated/index.ts +2528 -172
- package/src/goals.ts +4 -0
- package/src/help-center.ts +4 -0
- package/src/index.ts +8 -1
- package/src/kb.ts +15 -0
- package/src/models.ts +54 -0
- package/src/mutations.ts +162 -0
- package/src/notes.ts +4 -0
- package/src/people.ts +8 -0
- package/src/queries/applications/UpdateApplication.graphql +17 -0
- package/src/queries/cms/GetPage.graphql +1 -0
- package/src/queries/people/TimeClockMutations.graphql +17 -0
- package/src/queries/sites/CreateSite.graphql +15 -0
- package/src/search.ts +7 -0
- package/src/sites.test.ts +26 -0
- package/src/sites.ts +17 -0
- package/src/spaces.ts +4 -0
- package/src/stories.ts +11 -0
- package/src/system.ts +4 -0
- package/src/tasks.ts +4 -0
- package/src/types.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @uidu/client
|
|
2
2
|
|
|
3
|
+
## 3.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8edb107: Documentation is now generated from the source. Every public export has a JSDoc summary; the `uidu --help` entity list is derived from the resource registry (and the HR examples now use the real `employments` noun instead of `employment`, which failed); the `uidu` agent skill carries a generated, complete API index and CLI verb matrix.
|
|
8
|
+
- 0a0a15b: `getPage` now selects `__typename` on a field value's `linkedRecord`, so `fv.linkedRecord?.__typename === 'Form'` narrows to the linked form at runtime, not only in the types.
|
|
9
|
+
|
|
10
|
+
## 3.13.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 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.
|
|
15
|
+
- 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`.
|
|
16
|
+
- 57fad75: Add `updateApplication` and `completeApplication`.
|
|
17
|
+
|
|
18
|
+
`createApplication` leaves an application in `draft`, and a call's board in
|
|
19
|
+
uidu lists only completed ones, so an application sent from an external site
|
|
20
|
+
never showed up for whoever reviews it. `completeApplication(client, id)` fires
|
|
21
|
+
the `complete!` event — what uidu's own public site does after its last step —
|
|
22
|
+
which stamps `completedAt`, marks the form response completed and notifies the
|
|
23
|
+
call's members. `updateApplication` is the general mutation underneath.
|
|
24
|
+
|
|
25
|
+
The generated types are regenerated from uidu `main`: the `CustomAppDraft*`
|
|
26
|
+
types go away (renamed `BuilderDraft` in uidu, unused by the SDK).
|
|
27
|
+
|
|
3
28
|
## 3.12.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type ExecuteActionMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Run any backend action by `key` (an `ActionKey` flagged `of_kind_tool_key`),
|
|
5
|
+
* with optional `id` and `attributes`; returns `{ result, errors }` or null.
|
|
6
|
+
*
|
|
7
|
+
* Authoring (Bearer / doorkeeper token). A generic dispatcher: it invokes the
|
|
8
|
+
* same Concept a dedicated mutation would, by key instead of a hand-written
|
|
9
|
+
* GraphQL field. `attributes` uses the entity's own camelCase vocabulary;
|
|
10
|
+
* associations must be GlobalIDs (the id a prior `list`/`get` returned) —
|
|
11
|
+
* there is no by-name lookup here. See uidu/app/graphql/mutations/execute_action.rb.
|
|
12
|
+
*/
|
|
3
13
|
export declare function executeAction(client: UiduClient, variables: ExecuteActionMutationVariables): Promise<{
|
|
4
14
|
__typename?: "ExecuteActionPayload";
|
|
5
15
|
result?: any | null;
|
|
@@ -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>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateBenefitEnrollmentMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Enroll an employment in a benefit (`benefitId`, `employmentId`,
|
|
5
|
+
* `enrolledAt`). Returns the payload (with `errors`) or null; it is at
|
|
6
|
+
* `benefitEnrollment.node`.
|
|
7
|
+
*/
|
|
3
8
|
export declare function createBenefitEnrollment(client: UiduClient, variables: CreateBenefitEnrollmentMutationVariables): Promise<{
|
|
4
9
|
__typename?: "CreateBenefitEnrollmentPayload";
|
|
5
10
|
benefitEnrollment?: {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateBenefitMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a benefit in the workspace's catalog (name, category, provider,
|
|
5
|
+
* employer/employee costs). Returns the payload (with `errors`) or null; it is
|
|
6
|
+
* at `benefit.node`.
|
|
7
|
+
*/
|
|
3
8
|
export declare function createBenefit(client: UiduClient, variables: CreateBenefitMutationVariables): Promise<{
|
|
4
9
|
__typename?: "CreateBenefitPayload";
|
|
5
10
|
benefit?: {
|
|
@@ -3,7 +3,15 @@ import { type GetBookingQuery, type GetBookingQueryVariables, type GetCalendarQu
|
|
|
3
3
|
export type Booking = NonNullable<NonNullable<GetBookingQuery['currentWorkspace']>['booking']>;
|
|
4
4
|
export type Calendar = NonNullable<NonNullable<GetCalendarQuery['currentWorkspace']>['calendar']>;
|
|
5
5
|
export type CalendarEvent = NonNullable<NonNullable<GetCalendarEventQuery['currentWorkspace']>['calendarEvent']>;
|
|
6
|
+
/**
|
|
7
|
+
* One booking with its contact, totals in cents and custom fields
|
|
8
|
+
* (`fieldValuesByShortname`), or null; a public token sees none.
|
|
9
|
+
*/
|
|
6
10
|
export declare function getBooking(client: UiduClient, variables: GetBookingQueryVariables): Promise<Booking | null>;
|
|
11
|
+
/**
|
|
12
|
+
* The workspace's bookings as a flat array; page with `first`/`after` (or
|
|
13
|
+
* `last`/`before`); a public token gets an empty list.
|
|
14
|
+
*/
|
|
7
15
|
export declare function listBookings(client: UiduClient, variables?: ListBookingsQueryVariables): Promise<{
|
|
8
16
|
__typename?: "Booking";
|
|
9
17
|
id: string;
|
|
@@ -24,7 +32,14 @@ export declare function listBookings(client: UiduClient, variables?: ListBooking
|
|
|
24
32
|
email?: string | null;
|
|
25
33
|
} | null;
|
|
26
34
|
}[]>;
|
|
35
|
+
/**
|
|
36
|
+
* One calendar (name, color, time zone), or null.
|
|
37
|
+
*/
|
|
27
38
|
export declare function getCalendar(client: UiduClient, variables: GetCalendarQueryVariables): Promise<Calendar | null>;
|
|
39
|
+
/**
|
|
40
|
+
* The workspace's calendars as a flat array; page with `first`/`after` (or
|
|
41
|
+
* `last`/`before`).
|
|
42
|
+
*/
|
|
28
43
|
export declare function listCalendars(client: UiduClient, variables?: ListCalendarsQueryVariables): Promise<{
|
|
29
44
|
__typename?: "Calendar";
|
|
30
45
|
id: string;
|
|
@@ -33,7 +48,14 @@ export declare function listCalendars(client: UiduClient, variables?: ListCalend
|
|
|
33
48
|
color?: string | null;
|
|
34
49
|
timeZone?: string | null;
|
|
35
50
|
}[]>;
|
|
51
|
+
/**
|
|
52
|
+
* One calendar event with its rich-text `body` and its calendar, or null.
|
|
53
|
+
*/
|
|
36
54
|
export declare function getCalendarEvent(client: UiduClient, variables: GetCalendarEventQueryVariables): Promise<CalendarEvent | null>;
|
|
55
|
+
/**
|
|
56
|
+
* Calendar events as a flat array, optionally narrowed by `calendarIds` and
|
|
57
|
+
* named `scopes` (e.g. `upcoming`); page with `first`/`after`.
|
|
58
|
+
*/
|
|
37
59
|
export declare function listCalendarEvents(client: UiduClient, variables?: ListCalendarEventsQueryVariables): Promise<{
|
|
38
60
|
__typename?: "CalendarEvent";
|
|
39
61
|
id: string;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type GetCallQuery, type GetCallQueryVariables, type ListCallsQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Call = NonNullable<NonNullable<GetCallQuery['currentWorkspace']>['call']>;
|
|
4
|
+
/**
|
|
5
|
+
* One call (a job opening or open call) with its application `form`, same
|
|
6
|
+
* shape as `getForm`, or null.
|
|
7
|
+
*/
|
|
4
8
|
export declare function getCall(client: UiduClient, variables: GetCallQueryVariables): Promise<Call | null>;
|
|
9
|
+
/**
|
|
10
|
+
* The workspace's calls as a flat array of summaries, without their forms;
|
|
11
|
+
* page with `first`/`after`.
|
|
12
|
+
*/
|
|
5
13
|
export declare function listCalls(client: UiduClient, variables?: ListCallsQueryVariables): Promise<{
|
|
6
14
|
__typename?: "Call";
|
|
7
15
|
id: string;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type GetCampaignQuery, type GetCampaignQueryVariables, type ListCampaignsQueryVariables, type ListEmailCampaignsQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Campaign = NonNullable<NonNullable<GetCampaignQuery['currentWorkspace']>['campaign']>;
|
|
4
|
+
/**
|
|
5
|
+
* One campaign with its `preferences` and target `list`, or null; a public
|
|
6
|
+
* token sees none.
|
|
7
|
+
*/
|
|
4
8
|
export declare function getCampaign(client: UiduClient, variables: GetCampaignQueryVariables): Promise<Campaign | null>;
|
|
9
|
+
/**
|
|
10
|
+
* The workspace's campaigns as a flat array, optionally filtered by `kind` and
|
|
11
|
+
* `status`; page with `first`/`after`.
|
|
12
|
+
*/
|
|
5
13
|
export declare function listCampaigns(client: UiduClient, variables?: ListCampaignsQueryVariables): Promise<{
|
|
6
14
|
__typename?: "Campaign";
|
|
7
15
|
id: string;
|
|
@@ -13,6 +21,10 @@ export declare function listCampaigns(client: UiduClient, variables?: ListCampai
|
|
|
13
21
|
createdAt: any;
|
|
14
22
|
updatedAt: any;
|
|
15
23
|
}[]>;
|
|
24
|
+
/**
|
|
25
|
+
* The email blasts of the workspace's campaigns with their delivery metrics
|
|
26
|
+
* (sent, opened, clicked), as a flat array; page with `first`/`after`.
|
|
27
|
+
*/
|
|
16
28
|
export declare function listEmailCampaigns(client: UiduClient, variables?: ListEmailCampaignsQueryVariables): Promise<{
|
|
17
29
|
__typename?: "EmailCampaign";
|
|
18
30
|
id: string;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
2
|
import { type UiduClientConfig } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Sends GraphQL documents to one uidu endpoint with the configured
|
|
5
|
+
* credentials, and throws a `UiduError` when a request fails.
|
|
6
|
+
*
|
|
7
|
+
* `mutate` also wraps a bare `fieldValuesAttributes[].content` into
|
|
8
|
+
* `{ value }`, which the API would otherwise silently discard.
|
|
9
|
+
*/
|
|
3
10
|
export declare class UiduClient {
|
|
4
11
|
readonly endpoint: string;
|
|
5
12
|
private readonly client;
|
|
@@ -9,9 +16,14 @@ export declare class UiduClient {
|
|
|
9
16
|
private tokenFor;
|
|
10
17
|
mutate<TResult, TVariables extends object = Record<string, never>>(document: TypedDocumentNode<TResult, TVariables>, variables?: TVariables): Promise<TResult>;
|
|
11
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Build a `UiduClient`; it needs a `workspace` or an `endpoint`, and
|
|
21
|
+
* authenticates with `publicToken`, `apiKey` or `getToken`.
|
|
22
|
+
*/
|
|
12
23
|
export declare function createClient(config: UiduClientConfig): UiduClient;
|
|
13
24
|
/**
|
|
14
|
-
* Client config for a custom app, from a connected `@uidu/app-bridge`:
|
|
25
|
+
* Client config for a custom app, from a connected `@uidu/app-bridge`: the
|
|
26
|
+
* bridge's GraphQL endpoint, with its session token asked for per request.
|
|
15
27
|
*
|
|
16
28
|
* ```ts
|
|
17
29
|
* const client = createClient(fromBridge(await connect()));
|
|
@@ -2,14 +2,32 @@ import type { UiduClient } from "./client.js";
|
|
|
2
2
|
import { type CreateFieldValueMutationVariables, type CreatePageBlockMutationVariables, type CreatePageMutationVariables, type CreateProjectMutationVariables, type GetPageQuery, type GetPageQueryVariables, type GetTemplateQuery, type GetTemplateQueryVariables, type ListProjectsQueryVariables, type ListPagesQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Page = NonNullable<NonNullable<NonNullable<GetPageQuery['currentWorkspace']>['project']>['page']>;
|
|
4
4
|
export type Template = NonNullable<NonNullable<NonNullable<GetTemplateQuery['currentWorkspace']>['project']>['template']>;
|
|
5
|
+
/**
|
|
6
|
+
* A legacy CMS page by project and `slug`, with its metadata and ordered
|
|
7
|
+
* `pageBlocks` (and any linked form's questions), or null.
|
|
8
|
+
*
|
|
9
|
+
* For sites on the new CMS use `getPageBySlug` in `sites.ts`.
|
|
10
|
+
*/
|
|
5
11
|
export declare function getPage(client: UiduClient, variables: GetPageQueryVariables): Promise<Page | null>;
|
|
12
|
+
/**
|
|
13
|
+
* The pages of a legacy CMS project (`id` and `slug`), one Relay page at a
|
|
14
|
+
* time; use `paginate` with `ListPagesDocument` for all of them.
|
|
15
|
+
*/
|
|
6
16
|
export declare function listPages(client: UiduClient, variables: ListPagesQueryVariables): Promise<{
|
|
7
17
|
__typename?: "Page";
|
|
8
18
|
id: string;
|
|
9
19
|
name?: string | null;
|
|
10
20
|
slug?: string | null;
|
|
11
21
|
}[]>;
|
|
22
|
+
/**
|
|
23
|
+
* A legacy CMS template by id, with every page it holds and their blocks, or
|
|
24
|
+
* null.
|
|
25
|
+
*/
|
|
12
26
|
export declare function getTemplate(client: UiduClient, variables: GetTemplateQueryVariables): Promise<Template | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Create a legacy CMS project (`name`, `slug`, `domain`). Returns the payload
|
|
29
|
+
* (with `errors`) or null; the new project is at `project.node`.
|
|
30
|
+
*/
|
|
13
31
|
export declare function createProject(client: UiduClient, variables: CreateProjectMutationVariables): Promise<{
|
|
14
32
|
__typename?: "CreateProjectPayload";
|
|
15
33
|
project?: {
|
|
@@ -27,6 +45,11 @@ export declare function createProject(client: UiduClient, variables: CreateProje
|
|
|
27
45
|
type: string;
|
|
28
46
|
}>;
|
|
29
47
|
} | null>;
|
|
48
|
+
/**
|
|
49
|
+
* Create a legacy CMS page from a `templateId`, with `slug` and optional
|
|
50
|
+
* `metadataAttributes` (there is no `projectId` attribute). Returns the payload
|
|
51
|
+
* (with `errors`) or null.
|
|
52
|
+
*/
|
|
30
53
|
export declare function createPage(client: UiduClient, variables: CreatePageMutationVariables): Promise<{
|
|
31
54
|
__typename?: "CreatePagePayload";
|
|
32
55
|
page?: {
|
|
@@ -42,6 +65,10 @@ export declare function createPage(client: UiduClient, variables: CreatePageMuta
|
|
|
42
65
|
type: string;
|
|
43
66
|
}>;
|
|
44
67
|
} | null>;
|
|
68
|
+
/**
|
|
69
|
+
* Place a template block on a page (`pageId`, `templateBlockId`, both
|
|
70
|
+
* numeric). Returns the payload (with `errors`) or null.
|
|
71
|
+
*/
|
|
45
72
|
export declare function createPageBlock(client: UiduClient, variables: CreatePageBlockMutationVariables): Promise<{
|
|
46
73
|
__typename?: "CreatePageBlockPayload";
|
|
47
74
|
pageBlock?: {
|
|
@@ -56,6 +83,11 @@ export declare function createPageBlock(client: UiduClient, variables: CreatePag
|
|
|
56
83
|
type: string;
|
|
57
84
|
}>;
|
|
58
85
|
} | null>;
|
|
86
|
+
/**
|
|
87
|
+
* Create a field value, e.g. set a page block's field (`fieldId`, `content`).
|
|
88
|
+
* Returns the payload (with `errors`) or null; the new value is at
|
|
89
|
+
* `fieldValue.node`.
|
|
90
|
+
*/
|
|
59
91
|
export declare function createFieldValue(client: UiduClient, variables: CreateFieldValueMutationVariables): Promise<{
|
|
60
92
|
__typename?: "CreateFieldValuePayload";
|
|
61
93
|
fieldValue?: {
|
|
@@ -2,7 +2,15 @@ import type { UiduClient } from "./client.js";
|
|
|
2
2
|
import { type GetContactQuery, type GetContactQueryVariables, type GetDealQuery, type GetDealQueryVariables, type ListDealsQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Contact = NonNullable<NonNullable<GetContactQuery['currentWorkspace']>['contact']>;
|
|
4
4
|
export type Deal = NonNullable<NonNullable<GetDealQuery['currentWorkspace']>['deal']>;
|
|
5
|
+
/**
|
|
6
|
+
* One contact with its address and custom fields (`fieldValuesByShortname`),
|
|
7
|
+
* or null; a public token sees none.
|
|
8
|
+
*/
|
|
5
9
|
export declare function getContact(client: UiduClient, variables: GetContactQueryVariables): Promise<Contact | null>;
|
|
10
|
+
/**
|
|
11
|
+
* Every contact the client may see, as an array: the field is not a
|
|
12
|
+
* connection, so there is no pagination.
|
|
13
|
+
*/
|
|
6
14
|
export declare function listContacts(client: UiduClient): Promise<{
|
|
7
15
|
__typename?: "Contact";
|
|
8
16
|
id: string;
|
|
@@ -12,7 +20,15 @@ export declare function listContacts(client: UiduClient): Promise<{
|
|
|
12
20
|
avatarData?: any | null;
|
|
13
21
|
createdAt: any;
|
|
14
22
|
}[]>;
|
|
23
|
+
/**
|
|
24
|
+
* One deal with its pipeline, status and owner (`user`), or null; `amount` is
|
|
25
|
+
* in cents.
|
|
26
|
+
*/
|
|
15
27
|
export declare function getDeal(client: UiduClient, variables: GetDealQueryVariables): Promise<Deal | null>;
|
|
28
|
+
/**
|
|
29
|
+
* The workspace's deals as a flat array, optionally filtered with search
|
|
30
|
+
* `params`; page with `first`/`after`.
|
|
31
|
+
*/
|
|
16
32
|
export declare function listDeals(client: UiduClient, variables?: ListDealsQueryVariables): Promise<{
|
|
17
33
|
__typename?: "Deal";
|
|
18
34
|
id: string;
|
|
@@ -3,7 +3,14 @@ import { type GetCourseQuery, type GetCourseQueryVariables, type GetEnrollmentQu
|
|
|
3
3
|
export type Course = NonNullable<NonNullable<GetCourseQuery['currentWorkspace']>['course']>;
|
|
4
4
|
export type Enrollment = NonNullable<NonNullable<GetEnrollmentQuery['currentWorkspace']>['enrollment']>;
|
|
5
5
|
export type Lecture = NonNullable<NonNullable<GetLectureQuery['currentWorkspace']>['lecture']>;
|
|
6
|
+
/**
|
|
7
|
+
* One course with its rich-text `body`, or null.
|
|
8
|
+
*/
|
|
6
9
|
export declare function getCourse(client: UiduClient, variables: GetCourseQueryVariables): Promise<Course | null>;
|
|
10
|
+
/**
|
|
11
|
+
* The workspace's courses as a flat array, optionally filtered with search
|
|
12
|
+
* `params`; page with `first`/`after`.
|
|
13
|
+
*/
|
|
7
14
|
export declare function listCourses(client: UiduClient, variables?: ListCoursesQueryVariables): Promise<{
|
|
8
15
|
__typename?: "Course";
|
|
9
16
|
id: string;
|
|
@@ -20,7 +27,15 @@ export declare function listCourses(client: UiduClient, variables?: ListCoursesQ
|
|
|
20
27
|
publicPath?: string | null;
|
|
21
28
|
publicUrl?: string | null;
|
|
22
29
|
}[]>;
|
|
30
|
+
/**
|
|
31
|
+
* One enrollment with its course, contact and custom fields
|
|
32
|
+
* (`fieldValuesByShortname`), or null.
|
|
33
|
+
*/
|
|
23
34
|
export declare function getEnrollment(client: UiduClient, variables: GetEnrollmentQueryVariables): Promise<Enrollment | null>;
|
|
35
|
+
/**
|
|
36
|
+
* Course enrollments as a flat array, optionally filtered with search
|
|
37
|
+
* `params`; page with `first`/`after`.
|
|
38
|
+
*/
|
|
24
39
|
export declare function listEnrollments(client: UiduClient, variables?: ListEnrollmentsQueryVariables): Promise<{
|
|
25
40
|
__typename?: "Enrollment";
|
|
26
41
|
id: string;
|
|
@@ -44,7 +59,15 @@ export declare function listEnrollments(client: UiduClient, variables?: ListEnro
|
|
|
44
59
|
name?: string | null;
|
|
45
60
|
} | null;
|
|
46
61
|
}[]>;
|
|
62
|
+
/**
|
|
63
|
+
* One lecture with its `body`, its course and its `nextLecture` /
|
|
64
|
+
* `previousLecture` for navigation, or null.
|
|
65
|
+
*/
|
|
47
66
|
export declare function getLecture(client: UiduClient, variables: GetLectureQueryVariables): Promise<Lecture | null>;
|
|
67
|
+
/**
|
|
68
|
+
* Lectures across every course as a flat array (filter by `course.id`
|
|
69
|
+
* yourself), with `scopes`, `orderBy`, `from`/`to`; page with `first`/`after`.
|
|
70
|
+
*/
|
|
48
71
|
export declare function listLectures(client: UiduClient, variables?: ListLecturesQueryVariables): Promise<{
|
|
49
72
|
__typename?: "Lecture";
|
|
50
73
|
id: string;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateDonationMutationVariables, type CreateDonationCampaignMutationVariables, type GetDonationCampaignQuery, type GetDonationCampaignQueryVariables, type ListDonationCampaignsQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type DonationCampaign = NonNullable<NonNullable<GetDonationCampaignQuery['currentWorkspace']>['donationCampaign']>;
|
|
4
|
+
/**
|
|
5
|
+
* One donation campaign with its body, its totals (`goal`, `donationsAmount`,
|
|
6
|
+
* in cents) and its donor `form`, or null.
|
|
7
|
+
*/
|
|
4
8
|
export declare function getDonationCampaign(client: UiduClient, variables: GetDonationCampaignQueryVariables): Promise<DonationCampaign | null>;
|
|
9
|
+
/**
|
|
10
|
+
* The workspace's donation campaigns as a flat array of summaries with their
|
|
11
|
+
* totals in cents; page with `first`/`after`.
|
|
12
|
+
*/
|
|
5
13
|
export declare function listDonationCampaigns(client: UiduClient, variables?: ListDonationCampaignsQueryVariables): Promise<{
|
|
6
14
|
__typename?: "DonationCampaign";
|
|
7
15
|
id: string;
|
|
@@ -15,6 +23,13 @@ export declare function listDonationCampaigns(client: UiduClient, variables?: Li
|
|
|
15
23
|
publishedAt?: any | null;
|
|
16
24
|
publicPath?: string | null;
|
|
17
25
|
}[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Record a donation (amount in cents) to a campaign, creating the donor's
|
|
28
|
+
* contact inline; returns `{ errors, donation }` as-is.
|
|
29
|
+
*
|
|
30
|
+
* It records the gift only: charging a card is a separate step with your
|
|
31
|
+
* payment processor.
|
|
32
|
+
*/
|
|
18
33
|
export declare function createDonation(client: UiduClient, variables: CreateDonationMutationVariables): Promise<{
|
|
19
34
|
__typename?: "CreateDonationPayload";
|
|
20
35
|
errors: Array<{
|
|
@@ -35,6 +50,10 @@ export declare function createDonation(client: UiduClient, variables: CreateDona
|
|
|
35
50
|
} | null;
|
|
36
51
|
} | null;
|
|
37
52
|
} | null>;
|
|
53
|
+
/**
|
|
54
|
+
* Create a donation campaign (`goal` in cents); returns the payload as-is,
|
|
55
|
+
* `{ errors, donationCampaign }`.
|
|
56
|
+
*/
|
|
38
57
|
export declare function createDonationCampaign(client: UiduClient, variables: CreateDonationCampaignMutationVariables): Promise<{
|
|
39
58
|
__typename?: "CreateDonationCampaignPayload";
|
|
40
59
|
donationCampaign?: {
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateAttendanceMutationVariables, type CreateEventMutationVariables, type GetEventQuery, type GetEventQueryVariables, type ListEventsQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Event = NonNullable<NonNullable<GetEventQuery['currentWorkspace']>['event']>;
|
|
4
|
+
/**
|
|
5
|
+
* One event with its primary address, its next or current `instance` and all
|
|
6
|
+
* its `instances`, or null.
|
|
7
|
+
*/
|
|
4
8
|
export declare function getEvent(client: UiduClient, variables: GetEventQueryVariables): Promise<Event | null>;
|
|
9
|
+
/**
|
|
10
|
+
* The workspace's events as a flat array of summaries, each with its next or
|
|
11
|
+
* current `instance`; page with `first`/`after`.
|
|
12
|
+
*/
|
|
5
13
|
export declare function listEvents(client: UiduClient, variables?: ListEventsQueryVariables): Promise<{
|
|
6
14
|
__typename?: "Event";
|
|
7
15
|
id: string;
|
|
@@ -25,6 +33,13 @@ export declare function listEvents(client: UiduClient, variables?: ListEventsQue
|
|
|
25
33
|
finishesAt?: any | null;
|
|
26
34
|
} | null;
|
|
27
35
|
}[]>;
|
|
36
|
+
/**
|
|
37
|
+
* RSVP a contact to an event: `attendableId` is an event *instance* id, never
|
|
38
|
+
* the event id.
|
|
39
|
+
*
|
|
40
|
+
* Returns the payload as-is, `{ errors, attendance }`; validation failures
|
|
41
|
+
* come back in `errors`, not as a throw.
|
|
42
|
+
*/
|
|
28
43
|
export declare function createAttendance(client: UiduClient, variables: CreateAttendanceMutationVariables): Promise<{
|
|
29
44
|
__typename?: "CreateAttendancePayload";
|
|
30
45
|
errors: Array<{
|
|
@@ -43,6 +58,10 @@ export declare function createAttendance(client: UiduClient, variables: CreateAt
|
|
|
43
58
|
} | null;
|
|
44
59
|
} | null;
|
|
45
60
|
} | null>;
|
|
61
|
+
/**
|
|
62
|
+
* Create an event; returns the payload as-is, `{ errors, event }`, validation
|
|
63
|
+
* failures included.
|
|
64
|
+
*/
|
|
46
65
|
export declare function createEvent(client: UiduClient, variables: CreateEventMutationVariables): Promise<{
|
|
47
66
|
__typename?: "CreateEventPayload";
|
|
48
67
|
event?: {
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateFormResponseMutationVariables, type GetFormQuery, type GetFormQueryVariables, type ListFormsQueryVariables, type UpdateFormResponseMutationVariables } from "./generated/index.js";
|
|
3
3
|
export type Form = NonNullable<NonNullable<GetFormQuery['currentWorkspace']>['form']>;
|
|
4
|
+
/**
|
|
5
|
+
* One form with its questions (`inputs`, a connection of `FormQuestion` nodes
|
|
6
|
+
* with field metadata) ready to render, or null.
|
|
7
|
+
*/
|
|
4
8
|
export declare function getForm(client: UiduClient, variables: GetFormQueryVariables): Promise<Form | null>;
|
|
9
|
+
/**
|
|
10
|
+
* The workspace's forms as a flat array of summaries, without their questions
|
|
11
|
+
* (use `getForm` for those); page with `first`/`after`.
|
|
12
|
+
*/
|
|
5
13
|
export declare function listForms(client: UiduClient, variables?: ListFormsQueryVariables): Promise<{
|
|
6
14
|
__typename?: "Form";
|
|
7
15
|
id: string;
|
|
@@ -11,6 +19,13 @@ export declare function listForms(client: UiduClient, variables?: ListFormsQuery
|
|
|
11
19
|
published?: boolean | null;
|
|
12
20
|
publishedAt?: any | null;
|
|
13
21
|
}[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Submit a new response to a form; returns the payload as-is,
|
|
24
|
+
* `{ errors, formResponse }`, validation failures included.
|
|
25
|
+
*
|
|
26
|
+
* Each `fieldValuesAttributes[].content` must be `{ value }`; `client.mutate`
|
|
27
|
+
* wraps a bare value for you.
|
|
28
|
+
*/
|
|
14
29
|
export declare function createFormResponse(client: UiduClient, variables: CreateFormResponseMutationVariables): Promise<{
|
|
15
30
|
__typename?: "CreateFormResponsePayload";
|
|
16
31
|
errors: Array<{
|
|
@@ -39,6 +54,10 @@ export declare function createFormResponse(client: UiduClient, variables: Create
|
|
|
39
54
|
} | null;
|
|
40
55
|
} | null;
|
|
41
56
|
} | null>;
|
|
57
|
+
/**
|
|
58
|
+
* Update a form response (answers by field value `id`, or a state `event` like
|
|
59
|
+
* `'complete!'`); returns `{ errors, formResponse }` as-is.
|
|
60
|
+
*/
|
|
42
61
|
export declare function updateFormResponse(client: UiduClient, variables: UpdateFormResponseMutationVariables): Promise<{
|
|
43
62
|
__typename?: "UpdateFormResponsePayload";
|
|
44
63
|
errors: Array<{
|