@uidu/client 3.13.0 → 3.14.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 +13 -0
- package/dist/declarations/src/actions.d.ts +10 -0
- package/dist/declarations/src/applications.d.ts +3 -2
- 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 +34 -1
- 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 +2612 -234
- 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 +159 -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/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 +552 -11
- package/dist/uidu-client.cjs.prod.js +552 -11
- package/dist/uidu-client.esm.js +551 -12
- package/package.json +2 -2
- package/src/actions.ts +10 -6
- package/src/applications.ts +3 -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.test.ts +57 -0
- package/src/donations.ts +47 -0
- package/src/events.ts +19 -0
- package/src/forms.ts +19 -0
- package/src/generated/index.ts +2289 -282
- package/src/goals.ts +4 -0
- package/src/help-center.ts +4 -0
- package/src/index.ts +3 -1
- package/src/kb.ts +15 -0
- package/src/models.ts +54 -0
- package/src/mutations.ts +159 -1
- package/src/notes.ts +4 -0
- package/src/people.ts +8 -0
- package/src/queries/cms/GetPage.graphql +1 -0
- package/src/queries/donations/GetDonationCampaign.graphql +19 -0
- package/src/queries/donations/ListDonationCampaigns.graphql +5 -0
- package/src/queries/donations/ListDonations.graphql +29 -0
- package/src/search.ts +7 -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
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type SearchQuery, type SearchQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type SearchResult = NonNullable<NonNullable<SearchQuery['currentWorkspace']>['search']>;
|
|
4
|
+
/**
|
|
5
|
+
* Search the workspace index, optionally limited to `models`, with filters and
|
|
6
|
+
* sorting in `params`; page with `first`/`after`.
|
|
7
|
+
*
|
|
8
|
+
* Returns the connection itself, not a flat array: `edges`, `pageInfo`,
|
|
9
|
+
* `totalCount`, `term`, `took`. Each node only carries `__typename` and `id`.
|
|
10
|
+
*/
|
|
4
11
|
export declare function search(client: UiduClient, variables: SearchQueryVariables): Promise<SearchResult | null>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateSpaceMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a space, the container tasks live in. Returns the payload (with
|
|
5
|
+
* `errors`) or null; the new space is at `space.node`.
|
|
6
|
+
*/
|
|
3
7
|
export declare function createSpace(client: UiduClient, variables: CreateSpaceMutationVariables): Promise<{
|
|
4
8
|
__typename?: "CreateSpacePayload";
|
|
5
9
|
space?: {
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateStoryMutationVariables, type GetStoryQuery, type GetStoryQueryVariables, type ListStoriesQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Story = NonNullable<NonNullable<GetStoryQuery['currentWorkspace']>['story']>;
|
|
4
|
+
/**
|
|
5
|
+
* One story with its rich-text `body`, or null.
|
|
6
|
+
*/
|
|
4
7
|
export declare function getStory(client: UiduClient, variables: GetStoryQueryVariables): Promise<Story | null>;
|
|
8
|
+
/**
|
|
9
|
+
* The workspace's stories as a flat array of summaries (no `body`); page with
|
|
10
|
+
* `first`/`after`.
|
|
11
|
+
*/
|
|
5
12
|
export declare function listStories(client: UiduClient, variables?: ListStoriesQueryVariables): Promise<{
|
|
6
13
|
__typename?: "Story";
|
|
7
14
|
id: string;
|
|
@@ -12,6 +19,10 @@ export declare function listStories(client: UiduClient, variables?: ListStoriesQ
|
|
|
12
19
|
publishedAt?: any | null;
|
|
13
20
|
publicPath?: string | null;
|
|
14
21
|
}[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Create a story; returns the payload as-is, `{ errors, story }`, validation
|
|
24
|
+
* failures included.
|
|
25
|
+
*/
|
|
15
26
|
export declare function createStory(client: UiduClient, variables: CreateStoryMutationVariables): Promise<{
|
|
16
27
|
__typename?: "CreateStoryPayload";
|
|
17
28
|
story?: {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateWorkspaceMutationVariables, type GenerateWorkspaceApiCredentialsMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a workspace owned by the authenticated account (`attributes.name`,
|
|
5
|
+
* `subdomain`…). Returns the payload (with `errors`) or null.
|
|
6
|
+
*/
|
|
3
7
|
export declare function createWorkspace(client: UiduClient, variables: CreateWorkspaceMutationVariables): Promise<{
|
|
4
8
|
__typename?: "CreateWorkspacePayload";
|
|
5
9
|
workspace?: {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateTaskMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a task, usually in a space (`attributes.spaceId`). Returns the
|
|
5
|
+
* payload (with `errors`) or null.
|
|
6
|
+
*/
|
|
3
7
|
export declare function createTask(client: UiduClient, variables: CreateTaskMutationVariables): Promise<{
|
|
4
8
|
__typename?: "CreateTaskPayload";
|
|
5
9
|
task?: {
|
|
@@ -18,6 +18,10 @@ export interface UiduErrorOptions {
|
|
|
18
18
|
graphQLErrors?: ReadonlyArray<unknown>;
|
|
19
19
|
cause?: unknown;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* What `UiduClient` throws: `code` is `GRAPHQL_ERROR` (with `graphQLErrors`),
|
|
23
|
+
* `NETWORK_ERROR`, `TOKEN_ERROR` or `CONFIG_ERROR`.
|
|
24
|
+
*/
|
|
21
25
|
export declare class UiduError extends Error {
|
|
22
26
|
readonly code: string;
|
|
23
27
|
readonly graphQLErrors: ReadonlyArray<unknown>;
|