@uidu/skills 0.6.0 → 0.6.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/package.json +1 -1
- package/skills/uidu/SKILL.md +99 -16
package/package.json
CHANGED
package/skills/uidu/SKILL.md
CHANGED
|
@@ -72,11 +72,51 @@ uidu workspace credentials --json # api key + secret
|
|
|
72
72
|
uidu create my-app -t events # delegates to create-uidu-app
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
Entities
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
Entities and the verbs each supports (generated from the CLI's registry — a verb marked `—`
|
|
76
|
+
fails with `does not support <verb>`):
|
|
77
|
+
|
|
78
|
+
<!-- BEGIN sdk:cli-resources — generated by scripts/sdk-manifest.mjs, do not edit -->
|
|
79
|
+
|
|
80
|
+
| Entity | list | get | create | update | delete |
|
|
81
|
+
| --------------------- | :--: | :-: | :----: | :----: | :----: |
|
|
82
|
+
| `events` | ✓ | ✓ | ✓ | ✓ | — |
|
|
83
|
+
| `attendances` | — | — | ✓ | — | — |
|
|
84
|
+
| `stories` | ✓ | ✓ | ✓ | ✓ | — |
|
|
85
|
+
| `donations` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
86
|
+
| `courses` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
87
|
+
| `forms` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
88
|
+
| `contacts` | ✓ | ✓ | ✓ | — | ✓ |
|
|
89
|
+
| `deals` | ✓ | ✓ | ✓ | ✓ | — |
|
|
90
|
+
| `goals` | ✓ | ✓ | — | ✓ | — |
|
|
91
|
+
| `timeframes` | ✓ | — | — | — | — |
|
|
92
|
+
| `employees` | ✓ | — | ✓ | ✓ | — |
|
|
93
|
+
| `employments` | — | — | ✓ | ✓ | ✓ |
|
|
94
|
+
| `offices` | ✓ | — | — | — | — |
|
|
95
|
+
| `roles` | ✓ | — | — | — | — |
|
|
96
|
+
| `ccnls` | ✓ | — | ✓ | — | — |
|
|
97
|
+
| `bookings` | ✓ | ✓ | — | — | — |
|
|
98
|
+
| `calls` | ✓ | ✓ | — | — | — |
|
|
99
|
+
| `jobs` | ✓ | ✓ | — | — | — |
|
|
100
|
+
| `applications` | ✓ | — | ✓ | — | — |
|
|
101
|
+
| `campaigns` | ✓ | ✓ | — | — | — |
|
|
102
|
+
| `kb-collections` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
103
|
+
| `kb-articles` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
104
|
+
| `channel` | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
105
|
+
| `time-clocks` | — | — | ✓ | — | — |
|
|
106
|
+
| `compensations` | — | — | ✓ | ✓ | ✓ |
|
|
107
|
+
| `tasks` | — | — | ✓ | ✓ | ✓ |
|
|
108
|
+
| `benefits` | — | — | ✓ | — | — |
|
|
109
|
+
| `benefit-enrollments` | — | — | ✓ | — | — |
|
|
110
|
+
| `notes` | — | — | ✓ | ✓ | ✓ |
|
|
111
|
+
| `projects` | ✓ | — | — | — | — |
|
|
112
|
+
| `sites` | — | — | ✓ | — | — |
|
|
113
|
+
| `spaces` | — | — | ✓ | ✓ | ✓ |
|
|
114
|
+
|
|
115
|
+
<!-- END sdk:cli-resources -->
|
|
116
|
+
|
|
117
|
+
Anything the backend exposes as a tool-flagged action but the CLI has no noun for yet:
|
|
118
|
+
`uidu tools call <ActionKey> --attributes '<json>'` (associations as GlobalIDs). Config resolves
|
|
119
|
+
**flags → env (`UIDU_*`) → `~/.uidu/config.json`** (written by `uidu login`).
|
|
80
120
|
|
|
81
121
|
## Who the app acts for — one rule
|
|
82
122
|
|
|
@@ -210,16 +250,16 @@ open deals" is asking about data uidu has — read it. **Create a Model only for
|
|
|
210
250
|
place for** (the app's own bookings, a checklist, a log). Copying existing records into a Model
|
|
211
251
|
gives the person a second copy that drifts from the real one.
|
|
212
252
|
|
|
213
|
-
| The workspace's…
|
|
214
|
-
|
|
|
215
|
-
| Goals / OKRs (key results = subgoals)
|
|
216
|
-
| Contacts, organisations
|
|
217
|
-
| Deals (CRM)
|
|
218
|
-
| People (employees)
|
|
219
|
-
| Tasks, notes
|
|
220
|
-
| Events, courses, bookings, calendars
|
|
221
|
-
| Forms, donations, stories, help center | see [Patterns by Scope](#patterns-by-scope)
|
|
222
|
-
| The app's own Models
|
|
253
|
+
| The workspace's… | Functions (`@uidu/client`) | Inside a custom app |
|
|
254
|
+
| -------------------------------------- | ------------------------------------------------------------------------- | -------------------------- |
|
|
255
|
+
| Goals / OKRs (key results = subgoals) | `listGoals`, `getGoal`, `listTimeframes`; `updateGoal` | **read** (no `updateGoal`) |
|
|
256
|
+
| Contacts, organisations | `listContacts`, `getContact`; `createContact` | not yet |
|
|
257
|
+
| Deals (CRM) | `listDeals`, `getDeal`; `createDeal`, `updateDeal` | not yet |
|
|
258
|
+
| People (employees) | `listEmployees`, `getEmployee`, `listOffices`, `listCircles`, `listRoles` | not yet |
|
|
259
|
+
| Tasks, notes | `updateTask`, `createTask`, `updateNote`, `createNote` (no list) | not yet |
|
|
260
|
+
| Events, courses, bookings, calendars | `listEvents`, `listCourses`, `listBookings`, `listCalendars`, … | not yet |
|
|
261
|
+
| Forms, donations, stories, help center | see [Patterns by Scope](#patterns-by-scope) | not yet |
|
|
262
|
+
| The app's own Models | `ensureModel`, `listModelItems`, `createModelItem`, … | read and write |
|
|
223
263
|
|
|
224
264
|
On a server with an account token (`apiKey`) every row works; "not yet" means a custom app's
|
|
225
265
|
session token is refused for it. **When the data exists in uidu but is not reachable from a custom
|
|
@@ -244,7 +284,7 @@ const objectives = goals.filter((g) => !g.parentId);
|
|
|
244
284
|
const behind = objectives.filter((g) => isGoalBehind(g, { tolerance: 0.1 }));
|
|
245
285
|
|
|
246
286
|
goalValue(goal, goal.targetValue); // 45 for a 45% target, 1200 for €1,200
|
|
247
|
-
goalProgress(goal);
|
|
287
|
+
goalProgress(goal); // 0.45 — done fraction
|
|
248
288
|
```
|
|
249
289
|
|
|
250
290
|
`isGoalBehind` compares progress with the share of the timeframe already gone (`goalTimeElapsed`);
|
|
@@ -656,6 +696,48 @@ offers to fill it in for you). The site templates add a configured `src/lib/uidu
|
|
|
656
696
|
server-rendered listing + dynamic detail page; `custom-app` has no token to configure and
|
|
657
697
|
reads everything in client components.
|
|
658
698
|
|
|
699
|
+
## Full API Index
|
|
700
|
+
|
|
701
|
+
Every `@uidu/client` function, by domain — generated from the source, so if a function isn't
|
|
702
|
+
here it doesn't exist (yet). Domains marked "reads need Bearer" hold private data: a public token
|
|
703
|
+
sees nothing. Per-function auth, signatures and descriptions: https://docs.uidu.org/docs/reference/client.
|
|
704
|
+
|
|
705
|
+
<!-- BEGIN sdk:domain-index — generated by scripts/sdk-manifest.mjs, do not edit -->
|
|
706
|
+
|
|
707
|
+
- **Client & utilities** — `createClient`, `fromBridge`, `normalizeFieldValueContent`, `normalizeFieldValuesAttributes`, `paginate`
|
|
708
|
+
- **CMS — Sites** · CLI: `sites` — `createSite`, `getPageBySlug`, `getSingletonBlock`, `getSite`, `getSiteByDomain`, `listSitePages`
|
|
709
|
+
- **CMS — Projects (legacy)** · CLI: `projects` — `createFieldValue`, `createPage`, `createPageBlock`, `createProject`, `getPage`, `getTemplate`, `listPages`, `listProjects`
|
|
710
|
+
- **Models (custom data)** — `createField`, `createFieldOption`, `createModel`, `createModelItem`, `deleteField`, `deleteFieldOption`, `deleteFieldValue`, `deleteModelItem`, `ensureModel`, `getModel`, `getModelItem`, `listModelItems`, `listModels`, `toFieldValuesAttributes`, `updateField`, `updateFieldOption`, `updateFieldValue`, `updateModel`, `updateModelItem`
|
|
711
|
+
- **Forms** · CLI: `forms` — `createForm`, `createFormResponse`, `deleteForm`, `getForm`, `listForms`, `updateForm`, `updateFormResponse`
|
|
712
|
+
- **Events** · CLI: `events`, `attendances` — `createAttendance`, `createEvent`, `getEvent`, `listEvents`, `updateEvent`
|
|
713
|
+
- **Calls** · CLI: `calls` — `getCall`, `listCalls`
|
|
714
|
+
- **Jobs & applications** · CLI: `jobs`, `applications` — `completeApplication`, `createApplication`, `getJob`, `listApplications`, `listJobs`, `updateApplication`
|
|
715
|
+
- **Donations** · CLI: `donations` — `createDonation`, `createDonationCampaign`, `deleteDonationCampaign`, `getDonationCampaign`, `listDonationCampaigns`, `updateDonationCampaign`
|
|
716
|
+
- **Stories** · CLI: `stories` — `createStory`, `getStory`, `listStories`, `updateStory`
|
|
717
|
+
- **Help center** · CLI: `channel` — `createChannel`, `deleteChannel`, `getChannel`, `listChannels`, `updateChannel`
|
|
718
|
+
- **Knowledge base** · CLI: `kb-collections`, `kb-articles` — `createKbArticle`, `createKbCollection`, `deleteKbArticle`, `deleteKbCollection`, `getKbArticle`, `getKbCollection`, `listKbArticles`, `listKbCollections`, `updateKbArticle`, `updateKbCollection`
|
|
719
|
+
- **Search** — `search`
|
|
720
|
+
- **Courses** · CLI: `courses` — `createCourse`, `deleteCourse`, `getCourse`, `getEnrollment`, `getLecture`, `listCourses`, `listEnrollments`, `listLectures`, `updateCourse`
|
|
721
|
+
- **Bookings & calendars** · reads need Bearer · CLI: `bookings` — `getBooking`, `getCalendar`, `getCalendarEvent`, `listBookings`, `listCalendarEvents`, `listCalendars`
|
|
722
|
+
- **Campaigns** · reads need Bearer · CLI: `campaigns` — `getCampaign`, `listCampaigns`, `listEmailCampaigns`
|
|
723
|
+
- **Contacts & deals** · reads need Bearer · CLI: `contacts`, `deals` — `createContact`, `createDeal`, `deleteContact`, `getContact`, `getDeal`, `listContacts`, `listDeals`, `updateDeal`
|
|
724
|
+
- **Goals (OKRs)** · reads need Bearer · CLI: `goals`, `timeframes` — `getGoal`, `goalProgress`, `goalTimeElapsed`, `goalValue`, `isGoalBehind`, `listGoals`, `listTimeframes`, `toGoalRaw`, `updateGoal`
|
|
725
|
+
- **People (HR)** · reads need Bearer · CLI: `employees`, `employments`, `offices`, `roles`, `ccnls`, `time-clocks`, `compensations`, `benefits`, `benefit-enrollments` — `contractEvents`, `createBenefit`, `createBenefitEnrollment`, `createCcnl`, `createCompensation`, `createEmployee`, `createEmployment`, `createTimeClock`, `deleteCompensation`, `deleteEmployment`, `getEmployee`, `listCcnls`, `listCircles`, `listEmployees`, `listEmploymentHistory`, `listKinds`, `listOffices`, `listRoles`, `terminateEmployment`, `updateCompensation`, `updateEmployee`, `updateEmployment`, `weekStartFor`
|
|
726
|
+
- **Spaces, tasks & notes** · CLI: `tasks`, `notes`, `spaces` — `createNote`, `createSpace`, `createTask`, `deleteNote`, `deleteSpace`, `deleteTask`, `updateNote`, `updateSpace`, `updateTask`
|
|
727
|
+
- **Provisioning & actions** — `createWorkspace`, `executeAction`, `generateWorkspaceApiCredentials`
|
|
728
|
+
|
|
729
|
+
<!-- END sdk:domain-index -->
|
|
730
|
+
|
|
731
|
+
`@uidu/react`:
|
|
732
|
+
|
|
733
|
+
<!-- BEGIN sdk:react-surface — generated by scripts/sdk-manifest.mjs, do not edit -->
|
|
734
|
+
|
|
735
|
+
- **Components:** `BlockRenderer` — Render exactly one block from a page's `pageBlocks` array, by shortname.; `DynamicForm` — Render a uidu form (from `getForm`, `call.form`, …) as HTML inputs and hand the parsed values to your `action`, typically a `createFormResponse` Server Action.; `PageBlocks` — Render a page's blocks in order, each with the component keyed by its shortname in `components`; blocks with no match render `fallback`, or nothing.; `RichText` — Render a Tiptap (ProseMirror) JSON document as React elements.; `UiduAppProvider` — Connects a custom app to the uidu page framing it (`@uidu/app-bridge`) and hands the tree its state through `useUiduApp`. Once connected, the children also sit inside a `<UiduProvider>` with a session-backed client, so `useUiduClient()` works as anywhere else.; `UiduProvider` — Provide a `UiduClient` to the tree, either a `client` you built or one made from `workspace`/`publicToken`/`endpoint`, plus an SWR fetcher backed by it.
|
|
736
|
+
- **Hooks:** `useFields` — Normalize a `fieldValues` array into a `{ shortname: value }` map so blocks can access their fields by name without walking the GraphQL shape.; `useQuery` — Generic client-side data-fetching hook: runs `document` against the `UiduClient` from the nearest `<UiduProvider>` via SWR, so calls are cached and deduplicated by operation name + variables.; `useUidu` — The nearest `UiduProvider`'s `{ client, endpoint }`; throws outside a provider.; `useUiduApp` — The custom app's bridge state: `connecting`, `ready` or `error`.; `useUiduClient` — The `UiduClient` from the nearest `UiduProvider`; throws outside a provider.
|
|
737
|
+
- **Utilities:** `formatSalaryRange` — Format a job's salary range (`salaryMin`/`salaryMax`) into a display string. Returns `null` when the job advertises no salary, so callers can hide the field. Handles open-ended ranges ("From …", "Up to …") and a single figure.; `getBlockShortname` — The shortname a page block is rendered by (its template block's, else its own), or null.; `toText` — Flatten any uidu field-content value into a plain string. Handles raw strings, numbers, Slate-style rich text nodes (`{ type, children }`, `{ text }`), arrays of nodes, and wrapper objects with a `value` field.
|
|
738
|
+
|
|
739
|
+
<!-- END sdk:react-surface -->
|
|
740
|
+
|
|
659
741
|
## See Also
|
|
660
742
|
|
|
661
743
|
- uidu docs: https://docs.uidu.org
|
|
@@ -663,3 +745,4 @@ reads everything in client components.
|
|
|
663
745
|
- `@uidu/client`: https://github.com/uidu-org/api.js/tree/main/packages/client
|
|
664
746
|
- `@uidu/react`: https://github.com/uidu-org/api.js/tree/main/packages/react
|
|
665
747
|
- `create-uidu-app`: https://github.com/uidu-org/api.js/tree/main/packages/create-uidu-app
|
|
748
|
+
- Machine-readable manifest of the whole SDK (exports, domains, auth, CLI verbs): https://github.com/uidu-org/api.js/blob/main/docs/sdk-manifest.json
|