@uidu/client 3.0.0 → 3.2.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.
Files changed (75) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +56 -0
  3. package/dist/declarations/src/bookings.d.ts +58 -0
  4. package/dist/declarations/src/calls.d.ts +26 -0
  5. package/dist/declarations/src/campaigns.d.ts +39 -0
  6. package/dist/declarations/src/client.d.ts +10 -0
  7. package/dist/declarations/src/cms.d.ts +75 -0
  8. package/dist/declarations/src/contacts.d.ts +36 -0
  9. package/dist/declarations/src/courses.d.ts +68 -0
  10. package/dist/declarations/src/donations.d.ts +51 -0
  11. package/dist/declarations/src/events.d.ts +59 -0
  12. package/dist/declarations/src/forms.d.ts +69 -0
  13. package/dist/declarations/src/generated/index.d.ts +45354 -0
  14. package/dist/declarations/src/help-center.d.ts +4 -0
  15. package/dist/declarations/src/index.d.ts +39 -0
  16. package/dist/declarations/src/kb.d.ts +30 -0
  17. package/dist/declarations/src/mutations.d.ts +515 -0
  18. package/dist/declarations/src/notes.d.ts +18 -0
  19. package/dist/declarations/src/people.d.ts +53 -0
  20. package/dist/declarations/src/search.d.ts +4 -0
  21. package/dist/declarations/src/spaces.d.ts +19 -0
  22. package/dist/declarations/src/stories.d.ts +28 -0
  23. package/dist/declarations/src/system.d.ts +36 -0
  24. package/dist/declarations/src/tasks.d.ts +16 -0
  25. package/dist/declarations/src/types.d.ts +19 -0
  26. package/dist/declarations/src/utils/paginate.d.ts +34 -0
  27. package/dist/uidu-client.cjs.d.ts +2 -2
  28. package/dist/uidu-client.cjs.dev.js +682 -0
  29. package/dist/uidu-client.cjs.js +6 -15
  30. package/dist/uidu-client.cjs.prod.js +682 -0
  31. package/dist/uidu-client.esm.js +560 -0
  32. package/package.json +8 -3
  33. package/src/cms.ts +43 -0
  34. package/src/donations.ts +10 -0
  35. package/src/events.ts +10 -0
  36. package/src/generated/index.ts +2967 -84
  37. package/src/index.ts +70 -5
  38. package/src/mutations.test.ts +43 -0
  39. package/src/mutations.ts +216 -0
  40. package/src/notes.ts +15 -0
  41. package/src/people.test.ts +63 -0
  42. package/src/people.ts +93 -0
  43. package/src/queries/cms/CreateFieldValue.graphql +16 -0
  44. package/src/queries/cms/CreatePage.graphql +15 -0
  45. package/src/queries/cms/CreatePageBlock.graphql +14 -0
  46. package/src/queries/cms/CreateProject.graphql +16 -0
  47. package/src/queries/contacts/ContactMutations.graphql +53 -0
  48. package/src/queries/courses/CourseMutations.graphql +38 -0
  49. package/src/queries/donations/CreateDonationCampaign.graphql +13 -0
  50. package/src/queries/donations/DonationCampaignMutations.graphql +25 -0
  51. package/src/queries/events/CreateEvent.graphql +13 -0
  52. package/src/queries/events/UpdateEvent.graphql +12 -0
  53. package/src/queries/forms/FormMutations.graphql +40 -0
  54. package/src/queries/help-center/ChannelMutations.graphql +40 -0
  55. package/src/queries/kb/KbMutations.graphql +81 -0
  56. package/src/queries/notes/CreateNote.graphql +14 -0
  57. package/src/queries/notes/NoteMutations.graphql +25 -0
  58. package/src/queries/people/ListCircles.graphql +17 -0
  59. package/src/queries/people/ListKinds.graphql +18 -0
  60. package/src/queries/people/ListOffices.graphql +16 -0
  61. package/src/queries/people/PeopleMutations.graphql +88 -0
  62. package/src/queries/spaces/CreateSpace.graphql +15 -0
  63. package/src/queries/spaces/SpaceMutations.graphql +25 -0
  64. package/src/queries/stories/CreateStory.graphql +13 -0
  65. package/src/queries/stories/UpdateStory.graphql +12 -0
  66. package/src/queries/system/CreateWorkspace.graphql +15 -0
  67. package/src/queries/system/GenerateWorkspaceApiCredentials.graphql +18 -0
  68. package/src/queries/tasks/CreateTask.graphql +13 -0
  69. package/src/queries/tasks/TaskMutations.graphql +25 -0
  70. package/src/spaces.ts +15 -0
  71. package/src/stories.ts +10 -0
  72. package/src/system.ts +33 -0
  73. package/src/tasks.ts +15 -0
  74. package/src/utils/paginate.test.ts +116 -0
  75. package/src/utils/relay.test.ts +35 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @uidu/client
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5d1f0a9: Add the People/HR authoring domain.
8
+
9
+ `@uidu/client` now exposes employee & employment writes — `createEmployee`,
10
+ `updateEmployee`, `createEmployment`, `updateEmployment`, `deleteEmployment`
11
+ and the semantic helper `terminateEmployment({ id, endDate, endReason })` — plus
12
+ reference-data reads for populating employment forms: `listOffices`,
13
+ `listCircles`, `listRoles` (role-Circles only), `listKinds` and `listCcnls`,
14
+ with exported `Office`, `Circle` and `Kind` types.
15
+
16
+ This makes hires, terminations and contract variations first-class SDK
17
+ operations instead of hand-written GraphQL. The `uidu` CLI gains matching nouns:
18
+ `employees create|update`, `employment create|update|delete`, and
19
+ `offices|roles|ccnls list`.
20
+
21
+ ## 3.1.1
22
+
23
+ ### Patch Changes
24
+
25
+ - 22d268a: Fix the package `exports` maps so native ESM `import` resolves the ESM build instead of the CommonJS file (previously threw `exports is not defined in ES module scope` under Node's native ESM resolver / non-bundler consumers).
26
+
27
+ ## 3.1.0
28
+
29
+ ### Minor Changes
30
+
31
+ - 8c8d021: Introduce `@uidu/cli` and a full authoring surface — the uidu SDK is now driveable as an AI connector.
32
+ - **`@uidu/cli`** (`uidu`): read a workspace, scaffold an app, and provision content from the terminal or an AI coding agent. `uidu login` (OAuth Authorization Code + PKCE browser flow, with a password-grant fallback for CI/agents); uniform entity verbs `list | get | create | update | delete`; CMS + workspace provisioning; `uidu create` scaffolding; `--json` output throughout.
33
+ - **`@uidu/client`**: add authoring mutations (`create` / `update` / `delete`) across events, stories, donations, courses, forms, contacts, deals, kb-collections, kb-articles, channel, tasks, notes, spaces, plus CMS (page/block/field) and workspace/project provisioning + `generateWorkspaceApiCredentials`. Reads use the public token (browser-safe); writes require the account Bearer (server-side / CLI only).
34
+ - **`@uidu/skills`**: the `uidu` skill now covers the CLI and the read-vs-write authoring model, not just SDK reads.
35
+ - **`@uidu/react`**: order the `types` condition before `default` in package `exports` (removes a dead-condition warning).
36
+ - **`create-uidu-app`**: bump templates off the `3.0.0-alpha.0` pin to `^3.0.0`.
37
+
3
38
  ## 3.0.0
4
39
 
5
40
  ### Major Changes
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # `@uidu/client`
2
+
3
+ Typed, server-first, framework-agnostic GraphQL client for the uidu platform. Runs anywhere — Node, Bun, Deno, or the browser. No React dependency.
4
+
5
+ > **Alpha:** this is the v3 rewrite of the uidu SDK. It replaces `@uidu/api` (v2). APIs may change before the stable release.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @uidu/client
11
+ ```
12
+
13
+ The package is fully tree-shakable (`"sideEffects": false`) — only the functions you import end up in your bundle.
14
+
15
+ ## Usage
16
+
17
+ ```ts
18
+ import { createClient, getPage, listEvents } from '@uidu/client';
19
+
20
+ const client = createClient({
21
+ workspace: 'your-workspace', // → https://your-workspace.uidu.org/graphql
22
+ publicToken: process.env.UIDU_PUBLIC_TOKEN!,
23
+ });
24
+
25
+ const page = await getPage(client, { projectId: 'proj_xyz', slug: 'home' });
26
+
27
+ const events = await listEvents(client, { first: 20 });
28
+ ```
29
+
30
+ Every domain function follows the same shape: **pass the client first, arguments second, get a typed response back**.
31
+
32
+ Use `paginate()` to walk a connection across pages: `paginate((cursor) => listPages(client, { first: 50, after: cursor }))`.
33
+
34
+ ### `createClient` options
35
+
36
+ | Option | Required | Description |
37
+ |---|---|---|
38
+ | `workspace` | yes | Your workspace subdomain. Resolves to `https://{workspace}.uidu.org/graphql`. |
39
+ | `publicToken` | recommended | Public read token from your workspace settings. Safe to expose. |
40
+ | `apiKey` | optional | Server-only API key for mutations and private data. Never ship to the browser. |
41
+ | `endpoint` | optional | Override the GraphQL endpoint entirely. |
42
+ | `headers` | optional | Extra request headers to attach to every call. |
43
+
44
+ ## What's available
45
+
46
+ CMS (`getPage`, `listPages`, `getTemplate`), Forms (`getForm`, `listForms`, `createFormResponse`, `updateFormResponse`), Help Center (`getChannel`), Search (`search`), Events (`getEvent`, `listEvents`, `createAttendance`), Calls (`getCall`, `listCalls`), Donations (`getDonationCampaign`, `listDonationCampaigns`, `createDonation`), Stories (`getStory`, `listStories`), People (`listEmployees`, `getEmployee`, `weekStartFor`), Bookings (`getBooking`, `listBookings`, `getCalendar`, `listCalendars`, `getCalendarEvent`, `listCalendarEvents`), Courses (`getCourse`, `listCourses`, `getEnrollment`, `listEnrollments`, `getLecture`, `listLectures`), Campaigns (`getCampaign`, `listCampaigns`, `listEmailCampaigns`), Contacts (`getContact`, `listContacts`, `getDeal`, `listDeals`), and KB (`getKbArticle`, `listKbArticles`, `getKbCollection`, `listKbCollections`).
47
+
48
+ ## Docs
49
+
50
+ Full per-app reference and cookbook recipes: [`apps/website/content/docs`](../../apps/website/content/docs) in this repo.
51
+
52
+ For React apps, see [`@uidu/react`](../react/README.md).
53
+
54
+ ## License
55
+
56
+ MIT © uidu
@@ -0,0 +1,58 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type GetBookingQuery, type GetBookingQueryVariables, type GetCalendarQuery, type GetCalendarQueryVariables, type GetCalendarEventQuery, type GetCalendarEventQueryVariables, type ListBookingsQueryVariables, type ListCalendarsQueryVariables, type ListCalendarEventsQueryVariables } from "./generated/index.js";
3
+ export type Booking = NonNullable<NonNullable<GetBookingQuery['currentWorkspace']>['booking']>;
4
+ export type Calendar = NonNullable<NonNullable<GetCalendarQuery['currentWorkspace']>['calendar']>;
5
+ export type CalendarEvent = NonNullable<NonNullable<GetCalendarEventQuery['currentWorkspace']>['calendarEvent']>;
6
+ export declare function getBooking(client: UiduClient, variables: GetBookingQueryVariables): Promise<Booking | null>;
7
+ export declare function listBookings(client: UiduClient, variables?: ListBookingsQueryVariables): Promise<{
8
+ __typename?: "Booking";
9
+ id: string;
10
+ kind?: string | null;
11
+ status?: number | null;
12
+ number?: string | null;
13
+ currency?: string | null;
14
+ itemsCount?: number | null;
15
+ itemsTotal?: number | null;
16
+ createdAt: any;
17
+ paidAt?: any | null;
18
+ expiredAt?: any | null;
19
+ willExpireAt?: any | null;
20
+ contact?: {
21
+ __typename?: "Contact";
22
+ id: string;
23
+ name?: string | null;
24
+ email?: string | null;
25
+ } | null;
26
+ }[]>;
27
+ export declare function getCalendar(client: UiduClient, variables: GetCalendarQueryVariables): Promise<Calendar | null>;
28
+ export declare function listCalendars(client: UiduClient, variables?: ListCalendarsQueryVariables): Promise<{
29
+ __typename?: "Calendar";
30
+ id: string;
31
+ name?: string | null;
32
+ description?: string | null;
33
+ color?: string | null;
34
+ timeZone?: string | null;
35
+ }[]>;
36
+ export declare function getCalendarEvent(client: UiduClient, variables: GetCalendarEventQueryVariables): Promise<CalendarEvent | null>;
37
+ export declare function listCalendarEvents(client: UiduClient, variables?: ListCalendarEventsQueryVariables): Promise<{
38
+ __typename?: "CalendarEvent";
39
+ id: string;
40
+ name?: string | null;
41
+ startTime?: any | null;
42
+ endTime?: any | null;
43
+ allDay?: boolean | null;
44
+ timeZone?: string | null;
45
+ url?: string | null;
46
+ calendar: {
47
+ __typename?: "Calendar";
48
+ id: string;
49
+ name?: string | null;
50
+ color?: string | null;
51
+ };
52
+ primaryAddress?: {
53
+ __typename?: "Address";
54
+ id: string;
55
+ formattedAddress?: string | null;
56
+ city?: string | null;
57
+ } | null;
58
+ }[]>;
@@ -0,0 +1,26 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type GetCallQuery, type GetCallQueryVariables, type ListCallsQueryVariables } from "./generated/index.js";
3
+ export type Call = NonNullable<NonNullable<GetCallQuery['currentWorkspace']>['call']>;
4
+ export declare function getCall(client: UiduClient, variables: GetCallQueryVariables): Promise<Call | null>;
5
+ export declare function listCalls(client: UiduClient, variables?: ListCallsQueryVariables): Promise<{
6
+ __typename?: "Call";
7
+ id: string;
8
+ name?: string | null;
9
+ cover?: string | null;
10
+ coverData?: any | null;
11
+ kind: import("./generated/index.js").CallKind;
12
+ status?: string | null;
13
+ quantity?: number | null;
14
+ salaryMin?: number | null;
15
+ salaryMax?: number | null;
16
+ publishedAt?: any | null;
17
+ expiresAt?: any | null;
18
+ publicPath?: string | null;
19
+ published?: boolean | null;
20
+ primaryAddress?: {
21
+ __typename?: "Address";
22
+ id: string;
23
+ formattedAddress?: string | null;
24
+ city?: string | null;
25
+ } | null;
26
+ }[]>;
@@ -0,0 +1,39 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type GetCampaignQuery, type GetCampaignQueryVariables, type ListCampaignsQueryVariables, type ListEmailCampaignsQueryVariables } from "./generated/index.js";
3
+ export type Campaign = NonNullable<NonNullable<GetCampaignQuery['currentWorkspace']>['campaign']>;
4
+ export declare function getCampaign(client: UiduClient, variables: GetCampaignQueryVariables): Promise<Campaign | null>;
5
+ export declare function listCampaigns(client: UiduClient, variables?: ListCampaignsQueryVariables): Promise<{
6
+ __typename?: "Campaign";
7
+ id: string;
8
+ name?: string | null;
9
+ innerName?: string | null;
10
+ status?: string | null;
11
+ scheduledAt?: any | null;
12
+ sentAt?: any | null;
13
+ createdAt: any;
14
+ updatedAt: any;
15
+ }[]>;
16
+ export declare function listEmailCampaigns(client: UiduClient, variables?: ListEmailCampaignsQueryVariables): Promise<{
17
+ __typename?: "EmailCampaign";
18
+ id: string;
19
+ subject?: string | null;
20
+ replyTo?: string | null;
21
+ sentCount?: number | null;
22
+ deliveredCount?: number | null;
23
+ openedCount?: number | null;
24
+ clickedCount?: number | null;
25
+ openRate?: number | null;
26
+ clickRate?: number | null;
27
+ uniqueOpens?: number | null;
28
+ uniqueClicks?: number | null;
29
+ lastOpenedAt?: any | null;
30
+ lastClickedAt?: any | null;
31
+ createdAt: any;
32
+ updatedAt: any;
33
+ campaign?: {
34
+ __typename?: "Campaign";
35
+ id: string;
36
+ name?: string | null;
37
+ status?: string | null;
38
+ } | null;
39
+ }[]>;
@@ -0,0 +1,10 @@
1
+ import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
2
+ import { type UiduClientConfig } from "./types.js";
3
+ export declare class UiduClient {
4
+ readonly endpoint: string;
5
+ private readonly client;
6
+ constructor(config: UiduClientConfig);
7
+ query<TResult, TVariables extends object = Record<string, never>>(document: TypedDocumentNode<TResult, TVariables>, variables?: TVariables): Promise<TResult>;
8
+ mutate<TResult, TVariables extends object = Record<string, never>>(document: TypedDocumentNode<TResult, TVariables>, variables?: TVariables): Promise<TResult>;
9
+ }
10
+ export declare function createClient(config: UiduClientConfig): UiduClient;
@@ -0,0 +1,75 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type CreateFieldValueMutationVariables, type CreatePageBlockMutationVariables, type CreatePageMutationVariables, type CreateProjectMutationVariables, type GetPageQuery, type GetPageQueryVariables, type GetTemplateQuery, type GetTemplateQueryVariables, type ListPagesQueryVariables } from "./generated/index.js";
3
+ export type Page = NonNullable<NonNullable<NonNullable<GetPageQuery['currentWorkspace']>['project']>['page']>;
4
+ export type Template = NonNullable<NonNullable<NonNullable<GetTemplateQuery['currentWorkspace']>['project']>['template']>;
5
+ export declare function getPage(client: UiduClient, variables: GetPageQueryVariables): Promise<Page | null>;
6
+ export declare function listPages(client: UiduClient, variables: ListPagesQueryVariables): Promise<{
7
+ __typename?: "Page";
8
+ id: string;
9
+ name?: string | null;
10
+ slug?: string | null;
11
+ }[]>;
12
+ export declare function getTemplate(client: UiduClient, variables: GetTemplateQueryVariables): Promise<Template | null>;
13
+ export declare function createProject(client: UiduClient, variables: CreateProjectMutationVariables): Promise<{
14
+ __typename?: "CreateProjectPayload";
15
+ project?: {
16
+ __typename?: "ProjectEdge";
17
+ node?: {
18
+ __typename?: "Project";
19
+ id: string;
20
+ name?: string | null;
21
+ } | null;
22
+ } | null;
23
+ errors: Array<{
24
+ __typename?: "Error";
25
+ key: string;
26
+ name: string;
27
+ type: string;
28
+ }>;
29
+ } | null>;
30
+ export declare function createPage(client: UiduClient, variables: CreatePageMutationVariables): Promise<{
31
+ __typename?: "CreatePagePayload";
32
+ page?: {
33
+ __typename?: "Page";
34
+ id: string;
35
+ name?: string | null;
36
+ slug?: string | null;
37
+ } | null;
38
+ errors: Array<{
39
+ __typename?: "Error";
40
+ key: string;
41
+ name: string;
42
+ type: string;
43
+ }>;
44
+ } | null>;
45
+ export declare function createPageBlock(client: UiduClient, variables: CreatePageBlockMutationVariables): Promise<{
46
+ __typename?: "CreatePageBlockPayload";
47
+ pageBlock?: {
48
+ __typename?: "PageBlock";
49
+ id: string;
50
+ shortname?: string | null;
51
+ } | null;
52
+ errors: Array<{
53
+ __typename?: "Error";
54
+ key: string;
55
+ name: string;
56
+ type: string;
57
+ }>;
58
+ } | null>;
59
+ export declare function createFieldValue(client: UiduClient, variables: CreateFieldValueMutationVariables): Promise<{
60
+ __typename?: "CreateFieldValuePayload";
61
+ fieldValue?: {
62
+ __typename?: "FieldValueEdge";
63
+ node?: {
64
+ __typename?: "FieldValue";
65
+ id: string;
66
+ content?: any | null;
67
+ } | null;
68
+ } | null;
69
+ errors: Array<{
70
+ __typename?: "Error";
71
+ key: string;
72
+ name: string;
73
+ type: string;
74
+ }>;
75
+ } | null>;
@@ -0,0 +1,36 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type GetContactQuery, type GetContactQueryVariables, type GetDealQuery, type GetDealQueryVariables, type ListDealsQueryVariables } from "./generated/index.js";
3
+ export type Contact = NonNullable<NonNullable<GetContactQuery['currentWorkspace']>['contact']>;
4
+ export type Deal = NonNullable<NonNullable<GetDealQuery['currentWorkspace']>['deal']>;
5
+ export declare function getContact(client: UiduClient, variables: GetContactQueryVariables): Promise<Contact | null>;
6
+ export declare function listContacts(client: UiduClient): Promise<{
7
+ __typename?: "Contact";
8
+ id: string;
9
+ name?: string | null;
10
+ email?: string | null;
11
+ avatar?: string | null;
12
+ avatarData?: any | null;
13
+ createdAt: any;
14
+ }[]>;
15
+ export declare function getDeal(client: UiduClient, variables: GetDealQueryVariables): Promise<Deal | null>;
16
+ export declare function listDeals(client: UiduClient, variables?: ListDealsQueryVariables): Promise<{
17
+ __typename?: "Deal";
18
+ id: string;
19
+ name?: string | null;
20
+ amount?: any | null;
21
+ currency?: string | null;
22
+ deadline?: any | null;
23
+ winProbability?: number | null;
24
+ createdAt: any;
25
+ updatedAt: any;
26
+ status?: {
27
+ __typename?: "Status";
28
+ id: string;
29
+ name?: string | null;
30
+ } | null;
31
+ pipeline?: {
32
+ __typename?: "Pipeline";
33
+ id: string;
34
+ name?: string | null;
35
+ } | null;
36
+ }[]>;
@@ -0,0 +1,68 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type GetCourseQuery, type GetCourseQueryVariables, type GetEnrollmentQuery, type GetEnrollmentQueryVariables, type GetLectureQuery, type GetLectureQueryVariables, type ListCoursesQueryVariables, type ListEnrollmentsQueryVariables, type ListLecturesQueryVariables } from "./generated/index.js";
3
+ export type Course = NonNullable<NonNullable<GetCourseQuery['currentWorkspace']>['course']>;
4
+ export type Enrollment = NonNullable<NonNullable<GetEnrollmentQuery['currentWorkspace']>['enrollment']>;
5
+ export type Lecture = NonNullable<NonNullable<GetLectureQuery['currentWorkspace']>['lecture']>;
6
+ export declare function getCourse(client: UiduClient, variables: GetCourseQueryVariables): Promise<Course | null>;
7
+ export declare function listCourses(client: UiduClient, variables?: ListCoursesQueryVariables): Promise<{
8
+ __typename?: "Course";
9
+ id: string;
10
+ name?: string | null;
11
+ abstract?: string | null;
12
+ cover?: string | null;
13
+ coverData?: any | null;
14
+ kind?: string | null;
15
+ mode: string;
16
+ tags: Array<string>;
17
+ publishedAt?: any | null;
18
+ published?: boolean | null;
19
+ draft?: boolean | null;
20
+ publicPath?: string | null;
21
+ publicUrl?: string | null;
22
+ }[]>;
23
+ export declare function getEnrollment(client: UiduClient, variables: GetEnrollmentQueryVariables): Promise<Enrollment | null>;
24
+ export declare function listEnrollments(client: UiduClient, variables?: ListEnrollmentsQueryVariables): Promise<{
25
+ __typename?: "Enrollment";
26
+ id: string;
27
+ aasmState?: string | null;
28
+ createdAt: any;
29
+ updatedAt: any;
30
+ course: {
31
+ __typename?: "Course";
32
+ id: string;
33
+ name?: string | null;
34
+ };
35
+ contact: {
36
+ __typename?: "Contact";
37
+ id: string;
38
+ name?: string | null;
39
+ email?: string | null;
40
+ };
41
+ currentLecture?: {
42
+ __typename?: "Lecture";
43
+ id: string;
44
+ name?: string | null;
45
+ } | null;
46
+ }[]>;
47
+ export declare function getLecture(client: UiduClient, variables: GetLectureQueryVariables): Promise<Lecture | null>;
48
+ export declare function listLectures(client: UiduClient, variables?: ListLecturesQueryVariables): Promise<{
49
+ __typename?: "Lecture";
50
+ id: string;
51
+ name?: string | null;
52
+ position: number;
53
+ duration?: number | null;
54
+ kind?: string | null;
55
+ link?: string | null;
56
+ publishedAt?: any | null;
57
+ published?: boolean | null;
58
+ draft?: boolean | null;
59
+ cover?: string | null;
60
+ coverData?: any | null;
61
+ startDate?: any | null;
62
+ startTime?: string | null;
63
+ course: {
64
+ __typename?: "Course";
65
+ id: string;
66
+ name?: string | null;
67
+ };
68
+ }[]>;
@@ -0,0 +1,51 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type CreateDonationMutationVariables, type CreateDonationCampaignMutationVariables, type GetDonationCampaignQuery, type GetDonationCampaignQueryVariables, type ListDonationCampaignsQueryVariables } from "./generated/index.js";
3
+ export type DonationCampaign = NonNullable<NonNullable<GetDonationCampaignQuery['currentWorkspace']>['donationCampaign']>;
4
+ export declare function getDonationCampaign(client: UiduClient, variables: GetDonationCampaignQueryVariables): Promise<DonationCampaign | null>;
5
+ export declare function listDonationCampaigns(client: UiduClient, variables?: ListDonationCampaignsQueryVariables): Promise<{
6
+ __typename?: "DonationCampaign";
7
+ id: string;
8
+ name?: string | null;
9
+ cover?: string | null;
10
+ coverData?: any | null;
11
+ goal?: number | null;
12
+ donationsAmount?: number | null;
13
+ donationsCount?: number | null;
14
+ startsAt?: any | null;
15
+ publishedAt?: any | null;
16
+ publicPath?: string | null;
17
+ }[]>;
18
+ export declare function createDonation(client: UiduClient, variables: CreateDonationMutationVariables): Promise<{
19
+ __typename?: "CreateDonationPayload";
20
+ errors: Array<{
21
+ __typename?: "Error";
22
+ key: string;
23
+ name: string;
24
+ type: string;
25
+ }>;
26
+ donation?: {
27
+ __typename?: "Donation";
28
+ id: string;
29
+ amount?: any | null;
30
+ currency?: string | null;
31
+ createdAt: any;
32
+ contact?: {
33
+ __typename?: "Contact";
34
+ id: string;
35
+ } | null;
36
+ } | null;
37
+ } | null>;
38
+ export declare function createDonationCampaign(client: UiduClient, variables: CreateDonationCampaignMutationVariables): Promise<{
39
+ __typename?: "CreateDonationCampaignPayload";
40
+ donationCampaign?: {
41
+ __typename?: "DonationCampaign";
42
+ id: string;
43
+ name?: string | null;
44
+ } | null;
45
+ errors: Array<{
46
+ __typename?: "Error";
47
+ key: string;
48
+ name: string;
49
+ type: string;
50
+ }>;
51
+ } | null>;
@@ -0,0 +1,59 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type CreateAttendanceMutationVariables, type CreateEventMutationVariables, type GetEventQuery, type GetEventQueryVariables, type ListEventsQueryVariables } from "./generated/index.js";
3
+ export type Event = NonNullable<NonNullable<GetEventQuery['currentWorkspace']>['event']>;
4
+ export declare function getEvent(client: UiduClient, variables: GetEventQueryVariables): Promise<Event | null>;
5
+ export declare function listEvents(client: UiduClient, variables?: ListEventsQueryVariables): Promise<{
6
+ __typename?: "Event";
7
+ id: string;
8
+ name?: string | null;
9
+ description?: string | null;
10
+ cover?: string | null;
11
+ coverData?: any | null;
12
+ published?: boolean | null;
13
+ publicPath?: string | null;
14
+ isPaidEvent: boolean;
15
+ primaryAddress?: {
16
+ __typename?: "Address";
17
+ id: string;
18
+ formattedAddress?: string | null;
19
+ city?: string | null;
20
+ } | null;
21
+ instance?: {
22
+ __typename?: "EventInstance";
23
+ id: string;
24
+ beginsAt?: any | null;
25
+ finishesAt?: any | null;
26
+ } | null;
27
+ }[]>;
28
+ export declare function createAttendance(client: UiduClient, variables: CreateAttendanceMutationVariables): Promise<{
29
+ __typename?: "CreateAttendancePayload";
30
+ errors: Array<{
31
+ __typename?: "Error";
32
+ key: string;
33
+ name: string;
34
+ type: string;
35
+ }>;
36
+ attendance?: {
37
+ __typename?: "Attendance";
38
+ id: string;
39
+ checkedIn?: boolean | null;
40
+ contact?: {
41
+ __typename?: "Contact";
42
+ id: string;
43
+ } | null;
44
+ } | null;
45
+ } | null>;
46
+ export declare function createEvent(client: UiduClient, variables: CreateEventMutationVariables): Promise<{
47
+ __typename?: "CreateEventPayload";
48
+ event?: {
49
+ __typename?: "Event";
50
+ id: string;
51
+ name?: string | null;
52
+ } | null;
53
+ errors: Array<{
54
+ __typename?: "Error";
55
+ key: string;
56
+ name: string;
57
+ type: string;
58
+ }>;
59
+ } | null>;
@@ -0,0 +1,69 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type CreateFormResponseMutationVariables, type GetFormQuery, type GetFormQueryVariables, type ListFormsQueryVariables, type UpdateFormResponseMutationVariables } from "./generated/index.js";
3
+ export type Form = NonNullable<NonNullable<GetFormQuery['currentWorkspace']>['form']>;
4
+ export declare function getForm(client: UiduClient, variables: GetFormQueryVariables): Promise<Form | null>;
5
+ export declare function listForms(client: UiduClient, variables?: ListFormsQueryVariables): Promise<{
6
+ __typename?: "Form";
7
+ id: string;
8
+ name?: string | null;
9
+ cover?: string | null;
10
+ coverData?: any | null;
11
+ published?: boolean | null;
12
+ publishedAt?: any | null;
13
+ }[]>;
14
+ export declare function createFormResponse(client: UiduClient, variables: CreateFormResponseMutationVariables): Promise<{
15
+ __typename?: "CreateFormResponsePayload";
16
+ errors: Array<{
17
+ __typename?: "Error";
18
+ key: string;
19
+ name: string;
20
+ type: string;
21
+ }>;
22
+ formResponse?: {
23
+ __typename?: "FormResponse";
24
+ id: string;
25
+ status?: string | null;
26
+ fieldValues?: Array<{
27
+ __typename?: "FieldValue";
28
+ id: string;
29
+ content?: any | null;
30
+ linkedRecordId?: string | null;
31
+ field: {
32
+ __typename?: "Field";
33
+ id: string;
34
+ };
35
+ }> | null;
36
+ contact?: {
37
+ __typename?: "Contact";
38
+ id: string;
39
+ } | null;
40
+ } | null;
41
+ } | null>;
42
+ export declare function updateFormResponse(client: UiduClient, variables: UpdateFormResponseMutationVariables): Promise<{
43
+ __typename?: "UpdateFormResponsePayload";
44
+ errors: Array<{
45
+ __typename?: "Error";
46
+ key: string;
47
+ name: string;
48
+ type: string;
49
+ }>;
50
+ formResponse?: {
51
+ __typename?: "FormResponse";
52
+ id: string;
53
+ status?: string | null;
54
+ fieldValues?: Array<{
55
+ __typename?: "FieldValue";
56
+ id: string;
57
+ content?: any | null;
58
+ linkedRecordId?: string | null;
59
+ field: {
60
+ __typename?: "Field";
61
+ id: string;
62
+ };
63
+ }> | null;
64
+ contact?: {
65
+ __typename?: "Contact";
66
+ id: string;
67
+ } | null;
68
+ } | null;
69
+ } | null>;