lemma-sdk 0.2.33 → 0.2.35
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/README.md +71 -98
- package/dist/browser/lemma-client.js +70 -15
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/namespaces/pod-surfaces.js +1 -1
- package/dist/namespaces/workflows.d.ts +1 -1
- package/dist/openapi_client/index.d.ts +50 -12
- package/dist/openapi_client/index.js +10 -2
- package/dist/openapi_client/models/AdminConsentInfoResponse.d.ts +6 -0
- package/dist/openapi_client/models/AssistantSurfaceResponse.d.ts +16 -1
- package/dist/openapi_client/models/AssistantSurfaceStatus.d.ts +5 -0
- package/dist/openapi_client/models/AssistantSurfaceStatus.js +10 -0
- package/dist/openapi_client/models/ConversationMessageResponse.d.ts +4 -0
- package/dist/openapi_client/models/ConversationResponse.d.ts +3 -0
- package/dist/openapi_client/models/ConversationType.d.ts +8 -0
- package/dist/openapi_client/models/ConversationType.js +13 -0
- package/dist/openapi_client/models/CreateSurfaceRequest.d.ts +16 -5
- package/dist/openapi_client/models/{DataStoreFlowStart.d.ts → DataStoreFlowStartInput.d.ts} +1 -1
- package/dist/openapi_client/models/DataStoreFlowStartOutput.d.ts +11 -0
- package/dist/openapi_client/models/DataStoreWorkflowStartInput.d.ts +11 -0
- package/dist/openapi_client/models/DataStoreWorkflowStartOutput.d.ts +11 -0
- package/dist/openapi_client/models/DatastoreDataType.d.ts +2 -0
- package/dist/openapi_client/models/DatastoreDataType.js +2 -0
- package/dist/openapi_client/models/{EventFlowStart.d.ts → EventFlowStartInput.d.ts} +1 -1
- package/dist/openapi_client/models/EventFlowStartOutput.d.ts +19 -0
- package/dist/openapi_client/models/EventWorkflowStartInput.d.ts +11 -0
- package/dist/openapi_client/models/EventWorkflowStartOutput.d.ts +11 -0
- package/dist/openapi_client/models/FlowInstallResponse.d.ts +15 -0
- package/dist/openapi_client/models/FlowResponse.d.ts +5 -2
- package/dist/openapi_client/models/GmailSurfaceConfig.d.ts +7 -0
- package/dist/openapi_client/models/GmailSurfaceConfig.js +1 -0
- package/dist/openapi_client/models/GmailSurfaceConfigInput.d.ts +4 -0
- package/dist/openapi_client/models/GmailSurfaceConfigInput.js +1 -0
- package/dist/openapi_client/models/GrantPermissionRequest.d.ts +6 -0
- package/dist/openapi_client/models/GrantPermissionRequest.js +1 -0
- package/dist/openapi_client/models/ManualWorkflowStartInput.d.ts +10 -0
- package/dist/openapi_client/models/ManualWorkflowStartInput.js +1 -0
- package/dist/openapi_client/models/ManualWorkflowStartOutput.d.ts +10 -0
- package/dist/openapi_client/models/ManualWorkflowStartOutput.js +1 -0
- package/dist/openapi_client/models/OrganizationInvitationRequest.d.ts +2 -0
- package/dist/openapi_client/models/OrganizationInvitationResponse.d.ts +2 -0
- package/dist/openapi_client/models/OutlookSurfaceConfig.d.ts +7 -0
- package/dist/openapi_client/models/OutlookSurfaceConfig.js +1 -0
- package/dist/openapi_client/models/OutlookSurfaceConfigInput.d.ts +4 -0
- package/dist/openapi_client/models/OutlookSurfaceConfigInput.js +1 -0
- package/dist/openapi_client/models/ResourcePermissionListResponse.d.ts +4 -0
- package/dist/openapi_client/models/ResourcePermissionListResponse.js +1 -0
- package/dist/openapi_client/models/ResourcePermissionResponse.d.ts +12 -0
- package/dist/openapi_client/models/ResourcePermissionResponse.js +1 -0
- package/dist/openapi_client/models/{ScheduledFlowStart.d.ts → ScheduledFlowStartInput.d.ts} +1 -1
- package/dist/openapi_client/models/ScheduledFlowStartInput.js +1 -0
- package/dist/openapi_client/models/ScheduledFlowStartOutput.d.ts +7 -0
- package/dist/openapi_client/models/ScheduledFlowStartOutput.js +1 -0
- package/dist/openapi_client/models/ScheduledWorkflowStartInput.d.ts +11 -0
- package/dist/openapi_client/models/ScheduledWorkflowStartInput.js +1 -0
- package/dist/openapi_client/models/ScheduledWorkflowStartOutput.d.ts +11 -0
- package/dist/openapi_client/models/ScheduledWorkflowStartOutput.js +1 -0
- package/dist/openapi_client/models/SetVisibilityRequest.d.ts +3 -0
- package/dist/openapi_client/models/SetVisibilityRequest.js +1 -0
- package/dist/openapi_client/models/SlackCredentialsInput.d.ts +5 -0
- package/dist/openapi_client/models/SlackCredentialsInput.js +1 -0
- package/dist/openapi_client/models/SlackSurfaceConfig.d.ts +10 -0
- package/dist/openapi_client/models/SlackSurfaceConfig.js +1 -0
- package/dist/openapi_client/models/{SlackSurfaceConfigCreate.d.ts → SlackSurfaceConfigInput.d.ts} +1 -1
- package/dist/openapi_client/models/SlackSurfaceConfigInput.js +1 -0
- package/dist/openapi_client/models/SurfaceCredentialMode.d.ts +4 -0
- package/dist/openapi_client/models/SurfaceCredentialMode.js +9 -0
- package/dist/openapi_client/models/SurfaceIntegrationSetupGuide.d.ts +13 -0
- package/dist/openapi_client/models/SurfaceIntegrationSetupGuide.js +1 -0
- package/dist/openapi_client/models/SurfacePlatform.d.ts +8 -0
- package/dist/openapi_client/models/SurfacePlatform.js +13 -0
- package/dist/openapi_client/models/SurfacePlatformSetupGuideResponse.d.ts +9 -0
- package/dist/openapi_client/models/SurfacePlatformSetupGuideResponse.js +1 -0
- package/dist/openapi_client/models/SurfaceRoutingScope.d.ts +4 -0
- package/dist/openapi_client/models/SurfaceRoutingScope.js +9 -0
- package/dist/openapi_client/models/SurfaceSetupField.d.ts +10 -0
- package/dist/openapi_client/models/SurfaceSetupField.js +1 -0
- package/dist/openapi_client/models/SurfaceSetupFieldSource.d.ts +4 -0
- package/dist/openapi_client/models/SurfaceSetupFieldSource.js +9 -0
- package/dist/openapi_client/models/SurfaceSetupMode.d.ts +5 -0
- package/dist/openapi_client/models/SurfaceSetupMode.js +10 -0
- package/dist/openapi_client/models/SurfaceSetupPhase.d.ts +6 -0
- package/dist/openapi_client/models/SurfaceSetupPhase.js +11 -0
- package/dist/openapi_client/models/SurfaceSetupStep.d.ts +6 -0
- package/dist/openapi_client/models/SurfaceSetupStep.js +1 -0
- package/dist/openapi_client/models/SurfaceWebhookMode.d.ts +4 -0
- package/dist/openapi_client/models/SurfaceWebhookMode.js +9 -0
- package/dist/openapi_client/models/TeamsCredentialsInput.d.ts +6 -0
- package/dist/openapi_client/models/TeamsCredentialsInput.js +1 -0
- package/dist/openapi_client/models/TeamsSurfaceConfig.d.ts +9 -0
- package/dist/openapi_client/models/TeamsSurfaceConfig.js +1 -0
- package/dist/openapi_client/models/{TeamsSurfaceConfigCreate.d.ts → TeamsSurfaceConfigInput.d.ts} +1 -1
- package/dist/openapi_client/models/TeamsSurfaceConfigInput.js +1 -0
- package/dist/openapi_client/models/TelegramCredentialsInput.d.ts +5 -0
- package/dist/openapi_client/models/TelegramCredentialsInput.js +1 -0
- package/dist/openapi_client/models/TelegramSurfaceConfig.d.ts +6 -0
- package/dist/openapi_client/models/TelegramSurfaceConfig.js +1 -0
- package/dist/openapi_client/models/TelegramSurfaceConfigInput.d.ts +6 -0
- package/dist/openapi_client/models/TelegramSurfaceConfigInput.js +1 -0
- package/dist/openapi_client/models/UpdateSurfaceRequest.d.ts +17 -5
- package/dist/openapi_client/models/WhatsAppCredentialsInput.d.ts +8 -0
- package/dist/openapi_client/models/WhatsAppCredentialsInput.js +1 -0
- package/dist/openapi_client/models/WhatsAppSurfaceConfig.d.ts +6 -0
- package/dist/openapi_client/models/WhatsAppSurfaceConfig.js +1 -0
- package/dist/openapi_client/models/WhatsAppSurfaceConfigInput.d.ts +6 -0
- package/dist/openapi_client/models/WhatsAppSurfaceConfigInput.js +1 -0
- package/dist/openapi_client/models/WorkflowCreateRequest.d.ts +5 -2
- package/dist/openapi_client/models/WorkflowGraphUpdateRequest.d.ts +5 -2
- package/dist/openapi_client/models/WorkflowUpdateRequest.d.ts +5 -2
- package/dist/openapi_client/services/AssistantSurfacesIngressService.d.ts +51 -0
- package/dist/openapi_client/services/AssistantSurfacesIngressService.js +111 -0
- package/dist/openapi_client/services/AssistantSurfacesService.d.ts +27 -6
- package/dist/openapi_client/services/AssistantSurfacesService.js +62 -7
- package/dist/openapi_client/services/AuthorizationService.d.ts +47 -0
- package/dist/openapi_client/services/AuthorizationService.js +100 -0
- package/dist/openapi_client/services/DesksService.d.ts +4 -4
- package/dist/openapi_client/services/DesksService.js +6 -6
- package/dist/openapi_client/services/WorkflowsService.d.ts +3 -3
- package/dist/openapi_client/services/WorkflowsService.js +1 -1
- package/dist/react/index.d.ts +20 -0
- package/dist/react/index.js +10 -0
- package/dist/react/sql-utils.d.ts +8 -0
- package/dist/react/sql-utils.js +62 -0
- package/dist/react/useAddPodMember.d.ts +22 -0
- package/dist/react/useAddPodMember.js +51 -0
- package/dist/react/useCreateFolder.d.ts +22 -0
- package/dist/react/useCreateFolder.js +47 -0
- package/dist/react/useDatastoreQuery.d.ts +22 -0
- package/dist/react/useDatastoreQuery.js +67 -0
- package/dist/react/useDeleteFile.d.ts +19 -0
- package/dist/react/useDeleteFile.js +51 -0
- package/dist/react/useGlobalSearch.d.ts +62 -0
- package/dist/react/useGlobalSearch.js +170 -0
- package/dist/react/useRecordAggregates.d.ts +35 -0
- package/dist/react/useRecordAggregates.js +126 -0
- package/dist/react/useRemovePodMember.d.ts +19 -0
- package/dist/react/useRemovePodMember.js +50 -0
- package/dist/react/useTaskSession.js +3 -2
- package/dist/react/useUpdateFile.d.ts +29 -0
- package/dist/react/useUpdateFile.js +51 -0
- package/dist/react/useUpdatePodMemberRole.d.ts +20 -0
- package/dist/react/useUpdatePodMemberRole.js +50 -0
- package/dist/react/useUploadFile.d.ts +24 -0
- package/dist/react/useUploadFile.js +46 -0
- package/dist/react/useWorkflowStart.d.ts +2 -2
- package/dist/record-display.d.ts +20 -0
- package/dist/record-display.js +78 -0
- package/dist/record-form.d.ts +4 -0
- package/dist/record-form.js +16 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/dist/openapi_client/models/EmailSurfaceConfigCreate.d.ts +0 -5
- package/dist/openapi_client/models/FlowInstallEntity.d.ts +0 -16
- package/dist/openapi_client/models/FlowStartType.d.ts +0 -6
- package/dist/openapi_client/models/FlowStartType.js +0 -11
- package/dist/openapi_client/models/FlowStart_Input.d.ts +0 -14
- package/dist/openapi_client/models/FlowStart_Output.d.ts +0 -14
- package/dist/openapi_client/models/WhatsAppSurfaceConfigCreate.d.ts +0 -5
- package/dist/openapi_client/services/PublicDesksService.d.ts +0 -10
- package/dist/openapi_client/services/PublicDesksService.js +0 -22
- /package/dist/openapi_client/models/{DataStoreFlowStart.js → AdminConsentInfoResponse.js} +0 -0
- /package/dist/openapi_client/models/{EmailSurfaceConfigCreate.js → DataStoreFlowStartInput.js} +0 -0
- /package/dist/openapi_client/models/{EventFlowStart.js → DataStoreFlowStartOutput.js} +0 -0
- /package/dist/openapi_client/models/{FlowInstallEntity.js → DataStoreWorkflowStartInput.js} +0 -0
- /package/dist/openapi_client/models/{FlowStart_Input.js → DataStoreWorkflowStartOutput.js} +0 -0
- /package/dist/openapi_client/models/{FlowStart_Output.js → EventFlowStartInput.js} +0 -0
- /package/dist/openapi_client/models/{ScheduledFlowStart.js → EventFlowStartOutput.js} +0 -0
- /package/dist/openapi_client/models/{SlackSurfaceConfigCreate.js → EventWorkflowStartInput.js} +0 -0
- /package/dist/openapi_client/models/{TeamsSurfaceConfigCreate.js → EventWorkflowStartOutput.js} +0 -0
- /package/dist/openapi_client/models/{WhatsAppSurfaceConfigCreate.js → FlowInstallResponse.js} +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Lemma TypeScript SDK
|
|
2
2
|
|
|
3
|
-
`lemma-sdk` is the headless TypeScript SDK for Lemma. Use `lemma-sdk` for the core client, `lemma-sdk/react`
|
|
3
|
+
`lemma-sdk` is the headless TypeScript SDK for Lemma. Use `lemma-sdk` for the core client and shared helpers, and use `lemma-sdk/react` as the main app-building surface for hooks and auth primitives.
|
|
4
4
|
|
|
5
|
-
`AuthGuard` intentionally stays in `lemma-sdk/react`.
|
|
5
|
+
`AuthGuard` intentionally stays in `lemma-sdk/react`. The product direction is hooks-first and shell-agnostic. The registry remains available, but it is intentionally small and no longer the center of the recommended development model. See [docs/headless-first-direction.md](docs/headless-first-direction.md).
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
npm install lemma-sdk
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
If your app
|
|
13
|
+
If your app wants stock Lemma UI installs, configure the registry with:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
npx lemma-sdk init-shadcn
|
|
@@ -63,9 +63,9 @@ import {
|
|
|
63
63
|
useAgentRun,
|
|
64
64
|
useConversationMessages,
|
|
65
65
|
useConversations,
|
|
66
|
+
useRecordForm,
|
|
66
67
|
useRecords,
|
|
67
|
-
|
|
68
|
-
useWorkflowStart,
|
|
68
|
+
useWorkflowRun,
|
|
69
69
|
} from "lemma-sdk/react";
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -74,16 +74,23 @@ import {
|
|
|
74
74
|
| Area | Hooks | Stability | Use when |
|
|
75
75
|
| --- | --- | --- | --- |
|
|
76
76
|
| Auth | `AuthGuard`, `useAuth`, `useCurrentUser`, `usePodAccess` | Stable | Gate an app, read signed-in user state, or request pod access. |
|
|
77
|
-
| Tables | `useTables`, `useTable`, `useRecords`, `useRecord`, `useJoinedRecords`, `useRelatedRecords`, `useReverseRelatedRecords`, `useReferencingRecords` | Stable | Build custom table browsers, details views, related-record views, and
|
|
77
|
+
| Tables | `useTables`, `useTable`, `useRecords`, `useRecord`, `useJoinedRecords`, `useRelatedRecords`, `useReverseRelatedRecords`, `useReferencingRecords`, `useDatastoreQuery`, `useRecordAggregates` | Stable | Build custom table browsers, details views, related-record views, raw SQL-backed reads, and chart/KPI queries. |
|
|
78
78
|
| Record mutations | `useCreateRecord`, `useUpdateRecord`, `useDeleteRecord`, `useBulkRecords` | Stable | Create, update, delete, or bulk-delete rows from headless UI. Function-backed mutations via `createVia`/`updateVia` options. |
|
|
79
|
-
| Record forms | `useRecordSchema`, `useRecordForm`, `useForeignKeyOptions`, `useSchemaForm` | Stable | Render schema-driven forms, enum fields, and foreign-key selectors. `useRecordForm`
|
|
80
|
-
| Files | `useFiles`, `useFile`, `useFileSearch`, `useFileTree`, `useFilePreview` | Stable | Browse datastore folders,
|
|
79
|
+
| Record forms | `useRecordSchema`, `useRecordForm`, `useForeignKeyOptions`, `useSchemaForm` | Stable | Render schema-driven record forms, enum fields, and foreign-key selectors. `useRecordForm` is the canonical table-bound form hook; `useSchemaForm` remains available for raw JSON-schema flows. |
|
|
80
|
+
| Files | `useFiles`, `useFile`, `useUploadFile`, `useUpdateFile`, `useDeleteFile`, `useCreateFolder`, `useFileSearch`, `useFileTree`, `useFilePreview`, `useGlobalSearch` | Stable | Browse datastore folders, mutate file state, search indexed files, load directory trees, preview content, and compose multi-source desk search. |
|
|
81
81
|
| Assistant | `useConversations`, `useConversation`, `useConversationMessages`, `useAssistantRun`, `useAssistantSession`, `useAssistantRuntime`, `useAssistantController` | Stable except controller/runtime | Build custom chat, conversation lists, streaming output, and final-output views. |
|
|
82
82
|
| Agents | `useAgentRun`, `useAgentRuns`, `useAgentInputSchema`, `useTaskSession` | Stable except raw session | Start agent tasks, submit follow-up input, read task history, and inspect input/output schemas. |
|
|
83
83
|
| Workflows | `useWorkflowStart`, `useWorkflowRun`, `useWorkflowRuns`, `useWorkflowResume` | Stable | Start, poll, resume, cancel, retry, and inspect workflow runs. |
|
|
84
84
|
| Workflow compatibility | `useFlowSession`, `useFlowRunHistory` | Deprecated naming | Kept for existing callers; prefer workflow-named hooks for new code. |
|
|
85
85
|
| Functions | `useFunctionRun`, `useFunctionRuns`, `useFunctionSession` | Stable except raw session | Run functions, poll function runs, and list function history. |
|
|
86
|
-
| Members and org | `useMembers`, `useOrganizationMembers` | Stable | Read pod and organization
|
|
86
|
+
| Members and org | `useMembers`, `useAddPodMember`, `useUpdatePodMemberRole`, `useRemovePodMember`, `useOrganizationMembers` | Stable | Read pod and organization members, add existing org members into a pod, update pod roles, and remove pod access. The current checked-in client does not yet expose direct email-to-pod invites. |
|
|
87
|
+
|
|
88
|
+
### Headless Helpers
|
|
89
|
+
|
|
90
|
+
Alongside hooks, `lemma-sdk` exports shared headless helpers for common desk logic:
|
|
91
|
+
|
|
92
|
+
- record display helpers: `formatRecordDisplayValue`, `humanizeRecordFieldName`, `detectRecordStatusColumn`
|
|
93
|
+
- form/schema helpers: `buildRecordSchemaFields`, `buildSchemaFormFields`
|
|
87
94
|
|
|
88
95
|
### Common Hook Shapes
|
|
89
96
|
|
|
@@ -209,40 +216,33 @@ function WorkflowButton({ client }: { client: LemmaClient }) {
|
|
|
209
216
|
}
|
|
210
217
|
```
|
|
211
218
|
|
|
212
|
-
##
|
|
219
|
+
## Registry
|
|
213
220
|
|
|
214
|
-
|
|
221
|
+
The registry is optional UI scaffolding, not the default product story. Most desks should be built from hooks and app-local UI.
|
|
222
|
+
|
|
223
|
+
If you still want registry installs, they remain available:
|
|
215
224
|
|
|
216
225
|
After running `npx lemma-sdk init-shadcn`, install blocks like:
|
|
217
226
|
|
|
218
227
|
```bash
|
|
219
|
-
npx shadcn@latest add @lemma/lemma-
|
|
220
|
-
npx shadcn@latest add @lemma/lemma-
|
|
228
|
+
npx shadcn@latest add @lemma/lemma-assistant-experience
|
|
229
|
+
npx shadcn@latest add @lemma/lemma-document-workspace
|
|
221
230
|
npx shadcn@latest add @lemma/lemma-global-search
|
|
222
|
-
npx shadcn@latest add @lemma/lemma-file-browser
|
|
223
231
|
npx shadcn@latest add @lemma/lemma-members
|
|
224
|
-
npx shadcn@latest add @lemma/lemma-
|
|
225
|
-
npx shadcn@latest add @lemma/lemma-email-workbench
|
|
226
|
-
npx shadcn@latest add @lemma/lemma-insights
|
|
227
|
-
npx shadcn@latest add @lemma/lemma-assistant-embedded
|
|
232
|
+
npx shadcn@latest add @lemma/lemma-action-surface
|
|
228
233
|
```
|
|
229
234
|
|
|
235
|
+
The registry is intentionally small now. It currently ships 5 published blocks.
|
|
236
|
+
|
|
230
237
|
Current registry items:
|
|
231
238
|
|
|
232
239
|
| Area | Items |
|
|
233
240
|
| --- | --- |
|
|
234
|
-
| Assistant | `lemma-assistant-experience
|
|
235
|
-
|
|
|
236
|
-
|
|
|
237
|
-
| Records | `lemma-records-view`, `lemma-record-form` |
|
|
238
|
-
| Files | `lemma-file-browser`, `lemma-file-viewer` |
|
|
241
|
+
| Assistant | `lemma-assistant-experience` |
|
|
242
|
+
| Documents | `lemma-document-workspace` |
|
|
243
|
+
| Search | `lemma-global-search` |
|
|
239
244
|
| People | `lemma-members` |
|
|
240
|
-
|
|
|
241
|
-
| Business workflows | `lemma-approval-queue`, `lemma-email-workbench` |
|
|
242
|
-
| Analytics | `lemma-insights` |
|
|
243
|
-
| Planning | `lemma-calendar`, `lemma-timeline` |
|
|
244
|
-
| Collaboration | `lemma-activity-feed`, `lemma-comments`, `lemma-notification-bell` |
|
|
245
|
-
| Automation | `lemma-workflow-runner` |
|
|
245
|
+
| Automation | `lemma-action-surface` |
|
|
246
246
|
|
|
247
247
|
The registry is currently served from jsDelivr against this public repo:
|
|
248
248
|
|
|
@@ -251,43 +251,13 @@ The registry is currently served from jsDelivr against this public repo:
|
|
|
251
251
|
|
|
252
252
|
For more stable installs, pin the registry URL to a tag or commit SHA instead of `@main`.
|
|
253
253
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
```css
|
|
257
|
-
@import "@/styles/lemma-records-view.css";
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### Records Workspace Customization
|
|
261
|
-
|
|
262
|
-
The records blocks are meant to be configured with props before you reach for a fork.
|
|
263
|
-
|
|
264
|
-
`lemma-records-view` supports:
|
|
254
|
+
Published blocks:
|
|
265
255
|
|
|
266
|
-
- `
|
|
267
|
-
- `
|
|
268
|
-
- `
|
|
269
|
-
- `
|
|
270
|
-
- `
|
|
271
|
-
- `createMode="sheet" | "modal" | "page"` and `detailMode="sheet" | "page"` for app-specific interaction patterns
|
|
272
|
-
- `headerActions`, `emptyState`, `onRecordClick`, and `renderFilesTab` for app-specific extensions
|
|
273
|
-
- `appearance="default" | "minimal" | "borderless" | "contained"` and `density="compact" | "comfortable" | "spacious"` for host-level block chrome; `minimal` is the cardless mode
|
|
274
|
-
|
|
275
|
-
`lemma-record-form` supports:
|
|
276
|
-
|
|
277
|
-
- `mode="inline" | "modal" | "sheet"`
|
|
278
|
-
- `submitVia="direct" | "function"` and `submitFunctionName`
|
|
279
|
-
- `hiddenFields`, `visibleFields`, `fieldOrder`, and `fieldGroups`
|
|
280
|
-
- `foreignKeyLabels` for FK select labels
|
|
281
|
-
- `initialValues`, `onSuccess`, and `onClose`
|
|
282
|
-
- `appearance` and `density` using the same values as `lemma-records-view`
|
|
283
|
-
|
|
284
|
-
`lemma-insights` supports:
|
|
285
|
-
|
|
286
|
-
- table-backed count, sum, average, and grouped chart cards
|
|
287
|
-
- bar, line, area, and pie charts with count/sum/avg aggregation
|
|
288
|
-
- chart descriptions, value/category formatters, limits, sorting, empty states, and optional footers
|
|
289
|
-
- function-backed stats and charts
|
|
290
|
-
- shared `appearance` and `density` block chrome controls
|
|
256
|
+
- `lemma-assistant-experience` for the hardest assistant/chat runtime surface
|
|
257
|
+
- `lemma-document-workspace` for rich document/file create-read-edit-preview flows
|
|
258
|
+
- `lemma-global-search` for a stock command-bar style omnibox
|
|
259
|
+
- `lemma-members` for stock pod membership management
|
|
260
|
+
- `lemma-action-surface` for long-running function/workflow/agent launches
|
|
291
261
|
|
|
292
262
|
`lemma-global-search` supports:
|
|
293
263
|
|
|
@@ -297,58 +267,38 @@ The records blocks are meant to be configured with props before you reach for a
|
|
|
297
267
|
- `minQueryLength`, `debounceMs`, `appearance`, `density`, trigger label, and placeholder customization
|
|
298
268
|
- assistant handoff by `assistantName`, with optional query/results message shaping and conversation routing
|
|
299
269
|
|
|
300
|
-
|
|
270
|
+
Document blocks support:
|
|
301
271
|
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
- image, PDF, text, markdown, converted HTML, and download fallback
|
|
272
|
+
- Notion/Coda-style block documents through `lemma-document-workspace`, with ProseKit JSON content, page/modal modes, title and summary chrome, file/reference/assistant blocks, save state, metadata, backlinks, and assistant-context rails
|
|
273
|
+
- pod-file-native creation, reading, editing, and preview through one workspace, with folder targeting, title/summary setup, pod-file metadata, and `mode="page" | "modal"`
|
|
274
|
+
- non-document file previews through the same workspace, including image, PDF, text, markdown, converted HTML, and download fallback behavior
|
|
275
|
+
- records and attachments should pass pod file paths into `lemma-document-workspace`; records should not own document bodies directly
|
|
305
276
|
|
|
306
277
|
People blocks support:
|
|
307
278
|
|
|
308
279
|
- `LemmaMemberChip`, `LemmaAvatarGroup`, `LemmaMemberSelect`, and `LemmaUserField`
|
|
280
|
+
- a stock `LemmaMembers` admin workspace for pod membership, role changes, removal, and add-from-organization flows via `organizationId`, `allowAdd`, `allowRoleEdit`, and `allowRemove`
|
|
309
281
|
- pod member labels for owner, creator, assignee, participant, and author fields
|
|
310
282
|
- searchable member picking backed by `useMembers`
|
|
311
283
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
- approval queues for AI or workflow recommendations through `lemma-approval-queue`
|
|
315
|
-
- direct record updates or function-backed approve, reject, and request-changes actions
|
|
316
|
-
- email draft review through `lemma-email-workbench`, including thread context, editable composer, approve, send, and approve-and-send actions
|
|
317
|
-
- table-backed defaults with escape hatches for custom action payloads and render slots
|
|
284
|
+
Workflow primitives support:
|
|
318
285
|
|
|
319
|
-
`lemma-
|
|
320
|
-
|
|
321
|
-
-
|
|
322
|
-
- controlled and uncontrolled values
|
|
323
|
-
- GitHub-flavored markdown preview via `react-markdown` and `remark-gfm`
|
|
286
|
+
- direct, function-backed, workflow-backed, and agent-backed launches through `lemma-action-surface`
|
|
287
|
+
- inline, row, and panel presentation modes for long-running actions with inspectable progress
|
|
288
|
+
- native workflow/file surfaces plus app-local record UIs where tables are the actual product data model
|
|
324
289
|
|
|
325
290
|
Assistant blocks support:
|
|
326
291
|
|
|
327
292
|
- assistant-name-first configuration through `assistantName`
|
|
328
293
|
- shared `appearance` and `density` controls on the assistant experience surface
|
|
329
294
|
- `chromeStyle`, `statusPlacement`, `radius`, model picker, conversation list, and render overrides for deeper customization
|
|
295
|
+
- bounded default heights for `page` and `side-panel` modes so the message viewport scrolls instead of stretching with content; pass `className="h-full min-h-0"` inside an explicit-height parent when you want a fill-layout assistant like inbox CRM
|
|
330
296
|
|
|
331
297
|
```tsx
|
|
332
|
-
import {
|
|
298
|
+
import { LemmaAssistantExperience } from "@/components/lemma/assistant/assistant-experience";
|
|
299
|
+
import { LemmaActionSurface } from "@/components/lemma/lemma-action-surface";
|
|
333
300
|
import { LemmaGlobalSearch } from "@/components/lemma/lemma-global-search";
|
|
334
301
|
|
|
335
|
-
<LemmaRecordsView
|
|
336
|
-
client={client}
|
|
337
|
-
podId={podId}
|
|
338
|
-
tableName="deals"
|
|
339
|
-
defaultView="kanban"
|
|
340
|
-
groupBy="status"
|
|
341
|
-
hiddenFields={["id", "created_at", "updated_at"]}
|
|
342
|
-
foreignKeyLabels={{ company_id: "name" }}
|
|
343
|
-
appearance="minimal"
|
|
344
|
-
density="compact"
|
|
345
|
-
createMode="sheet"
|
|
346
|
-
onCreateOptions={{
|
|
347
|
-
submitVia: "function",
|
|
348
|
-
submitFunctionName: "create-deal",
|
|
349
|
-
}}
|
|
350
|
-
/>;
|
|
351
|
-
|
|
352
302
|
<LemmaGlobalSearch
|
|
353
303
|
client={client}
|
|
354
304
|
podId={podId}
|
|
@@ -373,6 +323,20 @@ import { LemmaGlobalSearch } from "@/components/lemma/lemma-global-search";
|
|
|
373
323
|
appearance="minimal"
|
|
374
324
|
density="compact"
|
|
375
325
|
/>;
|
|
326
|
+
|
|
327
|
+
<LemmaActionSurface
|
|
328
|
+
client={client}
|
|
329
|
+
podId={podId}
|
|
330
|
+
label="Run triage"
|
|
331
|
+
kind="workflow"
|
|
332
|
+
workflowName="triage-lead"
|
|
333
|
+
/>;
|
|
334
|
+
|
|
335
|
+
<LemmaAssistantExperience
|
|
336
|
+
client={client}
|
|
337
|
+
assistantName="sales-copilot"
|
|
338
|
+
density="compact"
|
|
339
|
+
/>;
|
|
376
340
|
```
|
|
377
341
|
|
|
378
342
|
## Auth
|
|
@@ -412,6 +376,15 @@ npm run build
|
|
|
412
376
|
npm run registry:build
|
|
413
377
|
```
|
|
414
378
|
|
|
379
|
+
To build the single local sandbox app:
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
cd examples/inbox-crm
|
|
383
|
+
npm run build
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
`examples/inbox-crm` is the only kept example app in this repo. It is a local sandbox for visualizing the current direction, not a promise that every copied component inside it is a published registry block.
|
|
387
|
+
|
|
415
388
|
This repo includes:
|
|
416
389
|
|
|
417
390
|
- `registry.json` for registry source definitions
|
|
@@ -1913,16 +1913,16 @@ class DesksService {
|
|
|
1913
1913
|
});
|
|
1914
1914
|
}
|
|
1915
1915
|
/**
|
|
1916
|
-
* Download Desk
|
|
1916
|
+
* Download Desk Dist Archive
|
|
1917
1917
|
* @param podId
|
|
1918
1918
|
* @param deskName
|
|
1919
1919
|
* @returns any Successful Response
|
|
1920
1920
|
* @throws ApiError
|
|
1921
1921
|
*/
|
|
1922
|
-
static
|
|
1922
|
+
static deskDistArchiveGet(podId, deskName) {
|
|
1923
1923
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1924
1924
|
method: 'GET',
|
|
1925
|
-
url: '/pods/{pod_id}/desks/{desk_name}/
|
|
1925
|
+
url: '/pods/{pod_id}/desks/{desk_name}/dist/archive',
|
|
1926
1926
|
path: {
|
|
1927
1927
|
'pod_id': podId,
|
|
1928
1928
|
'desk_name': deskName,
|
|
@@ -1933,16 +1933,16 @@ class DesksService {
|
|
|
1933
1933
|
});
|
|
1934
1934
|
}
|
|
1935
1935
|
/**
|
|
1936
|
-
* Download Desk
|
|
1936
|
+
* Download Desk Source Archive
|
|
1937
1937
|
* @param podId
|
|
1938
1938
|
* @param deskName
|
|
1939
1939
|
* @returns any Successful Response
|
|
1940
1940
|
* @throws ApiError
|
|
1941
1941
|
*/
|
|
1942
|
-
static
|
|
1942
|
+
static deskSourceArchiveGet(podId, deskName) {
|
|
1943
1943
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1944
1944
|
method: 'GET',
|
|
1945
|
-
url: '/pods/{pod_id}/desks/{desk_name}/
|
|
1945
|
+
url: '/pods/{pod_id}/desks/{desk_name}/source/archive',
|
|
1946
1946
|
path: {
|
|
1947
1947
|
'pod_id': podId,
|
|
1948
1948
|
'desk_name': deskName,
|
|
@@ -3888,7 +3888,7 @@ class PodSurfacesNamespace {
|
|
|
3888
3888
|
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceGet(podId, surfaceId));
|
|
3889
3889
|
}
|
|
3890
3890
|
updateConfig(podId, surfaceId, payload) {
|
|
3891
|
-
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.
|
|
3891
|
+
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceUpdate(podId, surfaceId, payload));
|
|
3892
3892
|
}
|
|
3893
3893
|
toggle(podId, surfaceId, isActive) {
|
|
3894
3894
|
return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceToggle(podId, surfaceId, { is_active: isActive }));
|
|
@@ -3906,7 +3906,6 @@ const request_js_1 = require("./openapi_client/core/request.js");
|
|
|
3906
3906
|
class AssistantSurfacesService {
|
|
3907
3907
|
/**
|
|
3908
3908
|
* List Surfaces
|
|
3909
|
-
* List configured surfaces in a pod.
|
|
3910
3909
|
* @param podId
|
|
3911
3910
|
* @param limit
|
|
3912
3911
|
* @param pageToken
|
|
@@ -3931,7 +3930,6 @@ class AssistantSurfacesService {
|
|
|
3931
3930
|
}
|
|
3932
3931
|
/**
|
|
3933
3932
|
* Create Surface
|
|
3934
|
-
* Create a new surface for an assistant.
|
|
3935
3933
|
* @param podId
|
|
3936
3934
|
* @param requestBody
|
|
3937
3935
|
* @returns any Successful Response
|
|
@@ -3951,9 +3949,28 @@ class AssistantSurfacesService {
|
|
|
3951
3949
|
},
|
|
3952
3950
|
});
|
|
3953
3951
|
}
|
|
3952
|
+
/**
|
|
3953
|
+
* Get Surface Platform Checklist
|
|
3954
|
+
* @param podId
|
|
3955
|
+
* @param platform
|
|
3956
|
+
* @returns SurfacePlatformSetupGuideResponse Successful Response
|
|
3957
|
+
* @throws ApiError
|
|
3958
|
+
*/
|
|
3959
|
+
static assistantSurfacePlatformChecklist(podId, platform) {
|
|
3960
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3961
|
+
method: 'GET',
|
|
3962
|
+
url: '/pods/{pod_id}/surfaces/platforms/{platform}/checklist',
|
|
3963
|
+
path: {
|
|
3964
|
+
'pod_id': podId,
|
|
3965
|
+
'platform': platform,
|
|
3966
|
+
},
|
|
3967
|
+
errors: {
|
|
3968
|
+
422: `Validation Error`,
|
|
3969
|
+
},
|
|
3970
|
+
});
|
|
3971
|
+
}
|
|
3954
3972
|
/**
|
|
3955
3973
|
* Get Surface
|
|
3956
|
-
* Get a specific surface configuration.
|
|
3957
3974
|
* @param podId
|
|
3958
3975
|
* @param surfaceId
|
|
3959
3976
|
* @returns any Successful Response
|
|
@@ -3974,17 +3991,16 @@ class AssistantSurfacesService {
|
|
|
3974
3991
|
}
|
|
3975
3992
|
/**
|
|
3976
3993
|
* Update Surface
|
|
3977
|
-
* Update a surface configuration.
|
|
3978
3994
|
* @param podId
|
|
3979
3995
|
* @param surfaceId
|
|
3980
3996
|
* @param requestBody
|
|
3981
3997
|
* @returns any Successful Response
|
|
3982
3998
|
* @throws ApiError
|
|
3983
3999
|
*/
|
|
3984
|
-
static
|
|
4000
|
+
static assistantSurfaceUpdate(podId, surfaceId, requestBody) {
|
|
3985
4001
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3986
4002
|
method: 'PATCH',
|
|
3987
|
-
url: '/pods/{pod_id}/surfaces/{surface_id}
|
|
4003
|
+
url: '/pods/{pod_id}/surfaces/{surface_id}',
|
|
3988
4004
|
path: {
|
|
3989
4005
|
'pod_id': podId,
|
|
3990
4006
|
'surface_id': surfaceId,
|
|
@@ -3996,9 +4012,28 @@ class AssistantSurfacesService {
|
|
|
3996
4012
|
},
|
|
3997
4013
|
});
|
|
3998
4014
|
}
|
|
4015
|
+
/**
|
|
4016
|
+
* Get Admin Consent Info
|
|
4017
|
+
* @param podId
|
|
4018
|
+
* @param surfaceId
|
|
4019
|
+
* @returns AdminConsentInfoResponse Successful Response
|
|
4020
|
+
* @throws ApiError
|
|
4021
|
+
*/
|
|
4022
|
+
static assistantSurfaceAdminConsentInfo(podId, surfaceId) {
|
|
4023
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4024
|
+
method: 'GET',
|
|
4025
|
+
url: '/pods/{pod_id}/surfaces/{surface_id}/admin-consent',
|
|
4026
|
+
path: {
|
|
4027
|
+
'pod_id': podId,
|
|
4028
|
+
'surface_id': surfaceId,
|
|
4029
|
+
},
|
|
4030
|
+
errors: {
|
|
4031
|
+
422: `Validation Error`,
|
|
4032
|
+
},
|
|
4033
|
+
});
|
|
4034
|
+
}
|
|
3999
4035
|
/**
|
|
4000
4036
|
* Toggle Surface
|
|
4001
|
-
* Toggle a surface active state.
|
|
4002
4037
|
* @param podId
|
|
4003
4038
|
* @param surfaceId
|
|
4004
4039
|
* @param requestBody
|
|
@@ -4020,6 +4055,26 @@ class AssistantSurfacesService {
|
|
|
4020
4055
|
},
|
|
4021
4056
|
});
|
|
4022
4057
|
}
|
|
4058
|
+
/**
|
|
4059
|
+
* Get Webhook Url
|
|
4060
|
+
* @param podId
|
|
4061
|
+
* @param surfaceId
|
|
4062
|
+
* @returns any Successful Response
|
|
4063
|
+
* @throws ApiError
|
|
4064
|
+
*/
|
|
4065
|
+
static assistantSurfaceWebhookUrl(podId, surfaceId) {
|
|
4066
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4067
|
+
method: 'GET',
|
|
4068
|
+
url: '/pods/{pod_id}/surfaces/{surface_id}/webhook-url',
|
|
4069
|
+
path: {
|
|
4070
|
+
'pod_id': podId,
|
|
4071
|
+
'surface_id': surfaceId,
|
|
4072
|
+
},
|
|
4073
|
+
errors: {
|
|
4074
|
+
422: `Validation Error`,
|
|
4075
|
+
},
|
|
4076
|
+
});
|
|
4077
|
+
}
|
|
4023
4078
|
}
|
|
4024
4079
|
exports.AssistantSurfacesService = AssistantSurfacesService;
|
|
4025
4080
|
|
|
@@ -5018,7 +5073,7 @@ class WorkflowsService {
|
|
|
5018
5073
|
* @param podId
|
|
5019
5074
|
* @param workflowName
|
|
5020
5075
|
* @param requestBody
|
|
5021
|
-
* @returns
|
|
5076
|
+
* @returns FlowInstallResponse Successful Response
|
|
5022
5077
|
* @throws ApiError
|
|
5023
5078
|
*/
|
|
5024
5079
|
static workflowInstallCreate(podId, workflowName, requestBody) {
|
package/dist/index.d.ts
CHANGED
|
@@ -12,8 +12,10 @@ export { parseTaskStreamEvent, upsertTaskMessage } from "./task-events.js";
|
|
|
12
12
|
export type { ParsedTaskStreamEvent } from "./task-events.js";
|
|
13
13
|
export { parseAssistantStreamEvent, upsertConversationMessage } from "./assistant-events.js";
|
|
14
14
|
export type { ParsedAssistantStreamEvent } from "./assistant-events.js";
|
|
15
|
-
export { buildRecordFormValues, buildRecordPayload, buildRecordSchemaFields, formatRecordValueForForm, getEditableRecordFields, getRecordFieldKind, } from "./record-form.js";
|
|
15
|
+
export { DEFAULT_RECORD_FORM_HIDDEN_FIELDS, buildRecordFormValues, buildRecordPayload, buildRecordSchemaFields, formatRecordValueForForm, getEditableRecordFields, getRecordFieldKind, orderRecordSchemaFields, } from "./record-form.js";
|
|
16
16
|
export type { BuildRecordPayloadOptions, BuildRecordPayloadResult, RecordSchemaField, RecordSchemaFieldKind, } from "./record-form.js";
|
|
17
|
+
export { buildDefaultRecordDetailFieldGroups, detectRecordDescriptionColumn, detectRecordStatusColumn, detectRecordTitleColumn, formatRecordDateDisplayValue, formatRecordDisplayValue, formatRecordPlainValue, humanizeRecordFieldName, isDefaultRecordDetailHiddenField, } from "./record-display.js";
|
|
18
|
+
export type { RecordDetailFieldGroupDefinition } from "./record-display.js";
|
|
17
19
|
export { buildSchemaFormFields, buildSchemaFormPayload, buildSchemaFormValues, formatSchemaFieldValueForForm, } from "./schema-form.js";
|
|
18
20
|
export type { BuildSchemaFormPayloadResult, JsonSchemaLike, JsonSchemaPrimitiveType, SchemaFormField, SchemaFormFieldKind, } from "./schema-form.js";
|
|
19
21
|
export { buildJoinedRecordsQuery, parseForeignKeyReference, } from "./datastore-query.js";
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { readSSE, parseSSEJson } from "./streams.js";
|
|
|
6
6
|
export { normalizeRunStatus, isTerminalTaskStatus, isTerminalFunctionStatus, isTerminalFlowStatus, sleep, nextBackoffDelay, } from "./run-utils.js";
|
|
7
7
|
export { parseTaskStreamEvent, upsertTaskMessage } from "./task-events.js";
|
|
8
8
|
export { parseAssistantStreamEvent, upsertConversationMessage } from "./assistant-events.js";
|
|
9
|
-
export { buildRecordFormValues, buildRecordPayload, buildRecordSchemaFields, formatRecordValueForForm, getEditableRecordFields, getRecordFieldKind, } from "./record-form.js";
|
|
9
|
+
export { DEFAULT_RECORD_FORM_HIDDEN_FIELDS, buildRecordFormValues, buildRecordPayload, buildRecordSchemaFields, formatRecordValueForForm, getEditableRecordFields, getRecordFieldKind, orderRecordSchemaFields, } from "./record-form.js";
|
|
10
|
+
export { buildDefaultRecordDetailFieldGroups, detectRecordDescriptionColumn, detectRecordStatusColumn, detectRecordTitleColumn, formatRecordDateDisplayValue, formatRecordDisplayValue, formatRecordPlainValue, humanizeRecordFieldName, isDefaultRecordDetailHiddenField, } from "./record-display.js";
|
|
10
11
|
export { buildSchemaFormFields, buildSchemaFormPayload, buildSchemaFormValues, formatSchemaFieldValueForForm, } from "./schema-form.js";
|
|
11
12
|
export { buildJoinedRecordsQuery, parseForeignKeyReference, } from "./datastore-query.js";
|
|
@@ -14,7 +14,7 @@ export class PodSurfacesNamespace {
|
|
|
14
14
|
return this.client.request(() => AssistantSurfacesService.assistantSurfaceGet(podId, surfaceId));
|
|
15
15
|
}
|
|
16
16
|
updateConfig(podId, surfaceId, payload) {
|
|
17
|
-
return this.client.request(() => AssistantSurfacesService.
|
|
17
|
+
return this.client.request(() => AssistantSurfacesService.assistantSurfaceUpdate(podId, surfaceId, payload));
|
|
18
18
|
}
|
|
19
19
|
toggle(podId, surfaceId, isActive) {
|
|
20
20
|
return this.client.request(() => AssistantSurfacesService.assistantSurfaceToggle(podId, surfaceId, { is_active: isActive }));
|
|
@@ -23,7 +23,7 @@ export declare class WorkflowsNamespace {
|
|
|
23
23
|
update: (workflowName: string, graph: WorkflowGraphUpdateRequest) => Promise<import("../types.js").FlowResponse>;
|
|
24
24
|
};
|
|
25
25
|
readonly installs: {
|
|
26
|
-
create: (workflowName: string, payload?: WorkflowInstallRequest) => Promise<import("../types.js").
|
|
26
|
+
create: (workflowName: string, payload?: WorkflowInstallRequest) => Promise<import("../types.js").FlowInstallResponse>;
|
|
27
27
|
delete: (workflowName: string, installId: string) => Promise<void>;
|
|
28
28
|
};
|
|
29
29
|
private postRunAction;
|