@makemind/sdk 0.1.0 → 0.2.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 +74 -0
- package/README.md +11 -7
- package/dist/index.d.mts +143 -98
- package/dist/index.d.ts +143 -98
- package/dist/index.js +116 -77
- package/dist/index.mjs +116 -77
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,80 @@ All notable changes to `@makemind/sdk` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 0.2.1 — 2026-10-12
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `ai.analyzeDocument()` sends the document. It used to send the words
|
|
13
|
+
"Document URL: …" to a chat model, which never saw the document and answered
|
|
14
|
+
anyway. The document goes as a `document` part (an https address or a data
|
|
15
|
+
URI), and only a model that reads PDFs is chosen for it.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `ai.ocr(document, { pages?, mediaType?, model? })` — the document's text as
|
|
20
|
+
written, page by page and line by line with confidence and position; at most
|
|
21
|
+
30 pages per call, `more` while a next window may hold pages.
|
|
22
|
+
|
|
23
|
+
## 0.2.0 — 2026-10-09
|
|
24
|
+
|
|
25
|
+
### Changed — breaking
|
|
26
|
+
|
|
27
|
+
- Pages carry `dsl` (an MCP UI DSL page) in place of `components`, `layout`,
|
|
28
|
+
`variables`, `dataSources` and `events`; apps carry `definition` (theme,
|
|
29
|
+
navigation, languages) and `rollout`. `ComponentNode` is replaced by
|
|
30
|
+
`DslNode` / `DslPage`.
|
|
31
|
+
- `apps.generateUI` returns `{ content }` — a DSL widget subtree.
|
|
32
|
+
`apps.suggestActions(appId, widgetType?)` returns DSL actions.
|
|
33
|
+
- `apps.publish(appId, changelog?, { rolloutPercent })` publishes to a share of
|
|
34
|
+
visitors.
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- `recordSaleWithShares({ delivered })` — what went out with the sale (name,
|
|
39
|
+
quantity, unit, item id), recorded beside the money.
|
|
40
|
+
- `reverseSaleWithShares({ returnedQuantity })` — units that came back. Without
|
|
41
|
+
it a partial refund is a price adjustment and the refund that completes the
|
|
42
|
+
sale returns every unit still out.
|
|
43
|
+
|
|
44
|
+
### Removed (breaking)
|
|
45
|
+
|
|
46
|
+
- `signUp`, `sendPasswordResetEmail`, `confirmPasswordReset` and `verifyEmail`.
|
|
47
|
+
The routes behind them were removed from the platform on 2026-09-17 and
|
|
48
|
+
answer `404`, so every call could only fail. A published client that offers
|
|
49
|
+
an operation the server does not have is a promise its caller discovers is
|
|
50
|
+
false at runtime.
|
|
51
|
+
|
|
52
|
+
What replaces them: a platform account exists once its person signs in at the
|
|
53
|
+
tenant portal; a tenant's own end users register in that tenant's pool
|
|
54
|
+
(`endusers-selfRegisterEndUser`). Sign-in (`signInWithEmail`,
|
|
55
|
+
`signInWithOAuthToken`) and `updatePassword` for a signed-in person are
|
|
56
|
+
unchanged.
|
|
57
|
+
|
|
58
|
+
## 0.1.1 — 2026-09-12
|
|
59
|
+
|
|
60
|
+
### Fixed
|
|
61
|
+
|
|
62
|
+
- The `data` service spanned two stores. `create`, `get`, `update` and `delete` went through the
|
|
63
|
+
REST data door — a separate tree that admits only a fixed set of collection names — while
|
|
64
|
+
`query`, the batch methods, `aggregate` and `search` address the document platform. A document
|
|
65
|
+
created with `create` was invisible to `query` and refused by `batchDelete`, and a collection
|
|
66
|
+
of your own naming was refused by `create` outright. All four now address the document
|
|
67
|
+
platform: ids are `DOC_…`, `get` answers `{ id, data }`, and a collection is taken as named.
|
|
68
|
+
- `refreshAuthToken()` signed the user out — and revoked their refresh tokens server-side — when
|
|
69
|
+
the gateway answered that no refresh token was sent. That is the answer every client without the
|
|
70
|
+
refresh cookie gets (a server-side process, for one), and its id token is still valid. It now
|
|
71
|
+
keeps the session and raises `MAKEMINDError('AUTH_REFRESH_UNAVAILABLE')`; a refresh token the
|
|
72
|
+
server refused still signs out. `createTenant` and `switchTenant` refresh internally, so a
|
|
73
|
+
server-side consumer signs in again after them to pick up the new claims.
|
|
74
|
+
|
|
75
|
+
- `batchCreate`, `batchUpdate` and `batchDelete` reported a batch the backend partly refused as
|
|
76
|
+
written. `dataBatchWrite` answers per item, and an item it will not perform comes back
|
|
77
|
+
`status: 'denied'` with a reason (`DATA_ALREADY_EXISTS`, `DATA_WRITE_ONCE_VIOLATION`,
|
|
78
|
+
`AUTH_ACCESS_DENIED`) while the rest commit. A denied item now raises
|
|
79
|
+
`MAKEMINDError('BATCH_PARTIALLY_DENIED')`, whose `details.results` lists every item and
|
|
80
|
+
`details.denied` the refused ones.
|
|
81
|
+
|
|
8
82
|
## 0.1.0
|
|
9
83
|
|
|
10
84
|
First release. The public surface is not frozen: while this package is 0.x, a minor bump may change it.
|
package/README.md
CHANGED
|
@@ -61,14 +61,11 @@ initializeMAKEMIND({
|
|
|
61
61
|
```typescript
|
|
62
62
|
const makemind = getMAKEMIND();
|
|
63
63
|
|
|
64
|
-
// Sign in with email + password
|
|
64
|
+
// Sign in with email + password. There is no sign-up here: a platform account
|
|
65
|
+
// exists once its person signs in at the tenant portal, and a tenant's own end
|
|
66
|
+
// users register in that tenant's pool (`endusers-selfRegisterEndUser`).
|
|
65
67
|
const user = await makemind.auth.signInWithEmail(email, password);
|
|
66
68
|
|
|
67
|
-
// Sign up a new user
|
|
68
|
-
const newUser = await makemind.auth.signUp(email, password, {
|
|
69
|
-
displayName: 'Jane Doe',
|
|
70
|
-
});
|
|
71
|
-
|
|
72
69
|
// Listen to auth state changes
|
|
73
70
|
const unsubscribe = makemind.auth.onAuthStateChanged((user) => {
|
|
74
71
|
if (user) {
|
|
@@ -88,6 +85,12 @@ const memberships = await makemind.auth.getUserMemberships();
|
|
|
88
85
|
await makemind.auth.switchTenant('new-tenant-id');
|
|
89
86
|
```
|
|
90
87
|
|
|
88
|
+
The refresh token is an HttpOnly cookie, so only a browser can refresh a session. A
|
|
89
|
+
server-side process keeps its id token until it expires; `refreshAuthToken()` there raises
|
|
90
|
+
`AUTH_REFRESH_UNAVAILABLE` and leaves the session intact. `createTenant` and `switchTenant`
|
|
91
|
+
refresh internally, so on a server sign in again after them to pick up the new claims — or use
|
|
92
|
+
an API key, which is the credential made for machine callers.
|
|
93
|
+
|
|
91
94
|
## Data Operations
|
|
92
95
|
|
|
93
96
|
```typescript
|
|
@@ -110,7 +113,8 @@ const product = await makemind.data.get({
|
|
|
110
113
|
documentId: 'product-id',
|
|
111
114
|
});
|
|
112
115
|
|
|
113
|
-
// Create document
|
|
116
|
+
// Create document — every data method addresses the same document store,
|
|
117
|
+
// under whatever collection name you give it; ids are DOC_-prefixed
|
|
114
118
|
const result = await makemind.data.create({
|
|
115
119
|
collection: 'plm_products',
|
|
116
120
|
data: {
|
package/dist/index.d.mts
CHANGED
|
@@ -224,6 +224,19 @@ declare class MAKEMINDSettlement {
|
|
|
224
224
|
description?: string;
|
|
225
225
|
metadata?: Record<string, unknown>;
|
|
226
226
|
}>;
|
|
227
|
+
/**
|
|
228
|
+
* What went out with the sale, recorded beside the money — at a price of
|
|
229
|
+
* nought too. One line per sale, at the gross.
|
|
230
|
+
*/
|
|
231
|
+
delivered?: {
|
|
232
|
+
name: string;
|
|
233
|
+
/** Defaults to 1. */
|
|
234
|
+
quantity?: number;
|
|
235
|
+
unit?: string;
|
|
236
|
+
productId?: string;
|
|
237
|
+
itemRef?: string;
|
|
238
|
+
subscriptionId?: string;
|
|
239
|
+
};
|
|
227
240
|
}): Promise<{
|
|
228
241
|
transactionId: string;
|
|
229
242
|
shareTransactionIds: (string | null)[];
|
|
@@ -243,6 +256,13 @@ declare class MAKEMINDSettlement {
|
|
|
243
256
|
reverseSaleWithShares(options: {
|
|
244
257
|
transactionId: string;
|
|
245
258
|
amount?: number;
|
|
259
|
+
/**
|
|
260
|
+
* Units that came back, when you know. Without it the ledger never guesses
|
|
261
|
+
* units from money: a refund short of the whole is a price adjustment (the
|
|
262
|
+
* thing stays delivered), and the refund that completes it returns every
|
|
263
|
+
* unit still out.
|
|
264
|
+
*/
|
|
265
|
+
returnedQuantity?: number;
|
|
246
266
|
reason?: string;
|
|
247
267
|
idempotencyKey: string;
|
|
248
268
|
}): Promise<{
|
|
@@ -583,12 +603,7 @@ declare class MAKEMINDAuth {
|
|
|
583
603
|
loadMemberships(): Promise<TenantMembership[]>;
|
|
584
604
|
signInWithEmail(email: string, password: string): Promise<AuthUser>;
|
|
585
605
|
signInWithEmailAndPassword(email: string, password: string): Promise<AuthUser>;
|
|
586
|
-
signUp(email: string, password: string, options?: {
|
|
587
|
-
displayName?: string;
|
|
588
|
-
phoneNumber?: string;
|
|
589
|
-
}): Promise<AuthUser>;
|
|
590
606
|
signOut(): Promise<void>;
|
|
591
|
-
sendPasswordResetEmail(email: string): Promise<void>;
|
|
592
607
|
onAuthStateChanged(callback: AuthStateCallback): () => void;
|
|
593
608
|
private notifyAuthStateCallbacks;
|
|
594
609
|
refreshAuthToken(): Promise<void>;
|
|
@@ -617,14 +632,6 @@ declare class MAKEMINDAuth {
|
|
|
617
632
|
* Backend dispatch 'resendVerificationEmail' — uid resolved from auth context, no payload needed.
|
|
618
633
|
*/
|
|
619
634
|
sendEmailVerification(): Promise<void>;
|
|
620
|
-
/**
|
|
621
|
-
* Verify email with code
|
|
622
|
-
*/
|
|
623
|
-
verifyEmail(code: string): Promise<void>;
|
|
624
|
-
/**
|
|
625
|
-
* Confirm password reset with code
|
|
626
|
-
*/
|
|
627
|
-
confirmPasswordReset(code: string, newPassword: string): Promise<void>;
|
|
628
635
|
/**
|
|
629
636
|
* OAuth redirect-based sign-in is NOT supported by this backend.
|
|
630
637
|
* The backend has no /oauth/initiate or /oauth/callback routes.
|
|
@@ -707,6 +714,17 @@ declare class MAKEMINDData {
|
|
|
707
714
|
data: Record<string, unknown>;
|
|
708
715
|
documentId?: string;
|
|
709
716
|
}>): Promise<Array<DocumentResult<T>>>;
|
|
717
|
+
/**
|
|
718
|
+
* Send a batch and refuse to report a partial one as whole.
|
|
719
|
+
*
|
|
720
|
+
* The backend answers per item: an item it would not perform comes back
|
|
721
|
+
* `status: 'denied'` with the reason (`DATA_ALREADY_EXISTS` for a create over
|
|
722
|
+
* an id that exists, `DATA_WRITE_ONCE_VIOLATION`, `AUTH_ACCESS_DENIED`) while
|
|
723
|
+
* the others commit. Reading only the ids told the caller every item was
|
|
724
|
+
* written. A denied item now raises `BATCH_PARTIALLY_DENIED`, and the error
|
|
725
|
+
* carries every item's result so the caller can see which ones did commit.
|
|
726
|
+
*/
|
|
727
|
+
private batchWrite;
|
|
710
728
|
batchUpdate(collection: string, updates: Array<{
|
|
711
729
|
documentId: string;
|
|
712
730
|
data: Record<string, unknown>;
|
|
@@ -1889,6 +1907,30 @@ interface ToolDefinition {
|
|
|
1889
1907
|
description: string;
|
|
1890
1908
|
parameters: Record<string, unknown>;
|
|
1891
1909
|
}
|
|
1910
|
+
/** One line an OCR engine read: its text, confidence and box (0–1: left, top, right, bottom). */
|
|
1911
|
+
interface OcrLine {
|
|
1912
|
+
text: string;
|
|
1913
|
+
confidence: number;
|
|
1914
|
+
box: [number, number, number, number];
|
|
1915
|
+
}
|
|
1916
|
+
/** One page an OCR engine read. */
|
|
1917
|
+
interface OcrPage {
|
|
1918
|
+
number: number;
|
|
1919
|
+
width: number;
|
|
1920
|
+
height: number;
|
|
1921
|
+
text: string;
|
|
1922
|
+
confidence: number;
|
|
1923
|
+
lines: OcrLine[];
|
|
1924
|
+
}
|
|
1925
|
+
/** What `ocr()` answers: the pages read, and whether a next window may hold more. */
|
|
1926
|
+
interface OcrResult {
|
|
1927
|
+
requestId: string;
|
|
1928
|
+
model: string;
|
|
1929
|
+
pages: OcrPage[];
|
|
1930
|
+
more: boolean;
|
|
1931
|
+
cost: number;
|
|
1932
|
+
currency?: string;
|
|
1933
|
+
}
|
|
1892
1934
|
declare class MAKEMINDAI {
|
|
1893
1935
|
private apiClient;
|
|
1894
1936
|
private getTenantId;
|
|
@@ -1973,20 +2015,35 @@ declare class MAKEMINDAI {
|
|
|
1973
2015
|
}>;
|
|
1974
2016
|
/**
|
|
1975
2017
|
* Document analysis (summary, field extraction, or QA).
|
|
1976
|
-
*
|
|
1977
|
-
*
|
|
1978
|
-
*
|
|
1979
|
-
*
|
|
2018
|
+
* The document itself is sent — a PDF as a `document` part, which the
|
|
2019
|
+
* platform hands only to a model that reads PDFs (core-ai 18 §5.2). `document`
|
|
2020
|
+
* is an https address the platform reads, or a `data:application/pdf;base64,…`
|
|
2021
|
+
* URI.
|
|
1980
2022
|
*/
|
|
1981
|
-
analyzeDocument(
|
|
2023
|
+
analyzeDocument(document: string, analysisType: 'summary' | 'extract' | 'qa', options?: {
|
|
1982
2024
|
question?: string;
|
|
1983
2025
|
extractFields?: string[];
|
|
2026
|
+
model?: string;
|
|
1984
2027
|
}): Promise<{
|
|
1985
2028
|
result: string | Record<string, unknown>;
|
|
1986
2029
|
usage: {
|
|
1987
2030
|
totalTokens: number;
|
|
1988
2031
|
};
|
|
1989
2032
|
}>;
|
|
2033
|
+
/**
|
|
2034
|
+
* A document's text as written, page by page and line by line, from an OCR
|
|
2035
|
+
* engine — each line with its confidence and its box on the page (core-ai 18
|
|
2036
|
+
* §5.3). One call reads at most 30 pages; read the next window while `more`.
|
|
2037
|
+
* `document` is an https address or a data URI (PDF, PNG, JPEG, TIFF).
|
|
2038
|
+
*/
|
|
2039
|
+
ocr(document: string, options?: {
|
|
2040
|
+
pages?: {
|
|
2041
|
+
from?: number;
|
|
2042
|
+
to?: number;
|
|
2043
|
+
};
|
|
2044
|
+
mediaType?: string;
|
|
2045
|
+
model?: string;
|
|
2046
|
+
}): Promise<OcrResult>;
|
|
1990
2047
|
generate(prompt: string, options?: ChatOptions): Promise<{
|
|
1991
2048
|
text: string;
|
|
1992
2049
|
usage: {
|
|
@@ -2099,7 +2156,6 @@ declare class MAKEMINDSearch {
|
|
|
2099
2156
|
*/
|
|
2100
2157
|
|
|
2101
2158
|
type AppStatus = 'draft' | 'published' | 'archived';
|
|
2102
|
-
type LayoutType = 'blank' | 'sidebar' | 'topnav' | 'dashboard' | 'centered';
|
|
2103
2159
|
type SSLStatus = 'pending' | 'provisioning' | 'active' | 'expired' | 'failed';
|
|
2104
2160
|
type CustomDomainStatus = 'pending' | 'verifying' | 'active' | 'failed';
|
|
2105
2161
|
/** Where a hostname's traffic is routed once it reaches the domain-serving edge. */
|
|
@@ -2208,18 +2264,17 @@ interface App {
|
|
|
2208
2264
|
publishedVersion: number | null;
|
|
2209
2265
|
domain: DomainConfig;
|
|
2210
2266
|
settings: AppSettings;
|
|
2267
|
+
definition?: AppDefinition;
|
|
2268
|
+
/** A version served to a share of visitors beside the published one. */
|
|
2269
|
+
rollout?: {
|
|
2270
|
+
version: number;
|
|
2271
|
+
percent: number;
|
|
2272
|
+
};
|
|
2211
2273
|
createdAt: string;
|
|
2212
2274
|
createdBy: string;
|
|
2213
2275
|
updatedAt: string;
|
|
2214
2276
|
updatedBy: string;
|
|
2215
2277
|
}
|
|
2216
|
-
interface LayoutConfig {
|
|
2217
|
-
sidebarWidth?: number;
|
|
2218
|
-
sidebarCollapsible?: boolean;
|
|
2219
|
-
headerHeight?: number;
|
|
2220
|
-
footerHeight?: number;
|
|
2221
|
-
contentMaxWidth?: number;
|
|
2222
|
-
}
|
|
2223
2278
|
interface PageSEO {
|
|
2224
2279
|
title: string;
|
|
2225
2280
|
description: string;
|
|
@@ -2227,61 +2282,42 @@ interface PageSEO {
|
|
|
2227
2282
|
noIndex?: boolean;
|
|
2228
2283
|
}
|
|
2229
2284
|
/**
|
|
2230
|
-
* A
|
|
2231
|
-
*
|
|
2232
|
-
* This described nine of the tree's fields while the editor writes fifteen:
|
|
2233
|
-
* `dataBinding`, `validation`, `a11y` and `conditions.className` were absent
|
|
2234
|
-
* entirely. TypeScript does not delete what it cannot see, so a round trip
|
|
2235
|
-
* through `getPage`/`updatePage` kept them — but a consumer BUILDING a node
|
|
2236
|
-
* from this type had no way to express a binding or a validation rule, and
|
|
2237
|
-
* one rebuilding a node field-by-field dropped them silently.
|
|
2285
|
+
* A widget of a page document — MCP UI DSL 1.4 (app builder DDD 08 §2).
|
|
2238
2286
|
*
|
|
2239
|
-
* `type`
|
|
2240
|
-
*
|
|
2241
|
-
*
|
|
2242
|
-
*
|
|
2243
|
-
* Kept in step with `@makemind/app-builder-ui`'s `ComponentNode` by
|
|
2244
|
-
* `src/__tests__/component-node-parity.test.ts`.
|
|
2287
|
+
* `type` is a widget type the spec defines; every node the builder holds
|
|
2288
|
+
* carries `x-id`. The other properties are the widget's own, as the spec
|
|
2289
|
+
* declares them, so they are not enumerated here.
|
|
2245
2290
|
*/
|
|
2246
|
-
interface
|
|
2247
|
-
id: string;
|
|
2291
|
+
interface DslNode {
|
|
2248
2292
|
type: string;
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2293
|
+
'x-id'?: string;
|
|
2294
|
+
[prop: string]: unknown;
|
|
2295
|
+
}
|
|
2296
|
+
/** A page document (page.schema). */
|
|
2297
|
+
interface DslPage {
|
|
2298
|
+
type: 'page';
|
|
2299
|
+
title?: string;
|
|
2300
|
+
content: DslNode;
|
|
2301
|
+
state?: {
|
|
2302
|
+
initial?: Record<string, unknown>;
|
|
2257
2303
|
};
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2304
|
+
lifecycle?: Record<string, unknown>;
|
|
2305
|
+
[prop: string]: unknown;
|
|
2306
|
+
}
|
|
2307
|
+
/** Theme, navigation, languages and app state — the DSL around the pages. */
|
|
2308
|
+
interface AppDefinition {
|
|
2309
|
+
title?: string;
|
|
2310
|
+
theme?: Record<string, unknown>;
|
|
2311
|
+
navigation?: {
|
|
2312
|
+
type: 'drawer' | 'bottomBar' | 'rail' | 'tabs';
|
|
2313
|
+
items?: unknown[];
|
|
2314
|
+
[key: string]: unknown;
|
|
2263
2315
|
};
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
message: string;
|
|
2268
|
-
}>;
|
|
2269
|
-
a11y?: {
|
|
2270
|
-
label?: string;
|
|
2271
|
-
description?: string;
|
|
2272
|
-
role?: string;
|
|
2316
|
+
i18n?: Record<string, unknown>;
|
|
2317
|
+
state?: {
|
|
2318
|
+
initial?: Record<string, unknown>;
|
|
2273
2319
|
};
|
|
2274
|
-
|
|
2275
|
-
interface DataSource {
|
|
2276
|
-
id: string;
|
|
2277
|
-
name: string;
|
|
2278
|
-
type: 'query' | 'document' | 'api' | 'flow' | 'variable' | 'realtime';
|
|
2279
|
-
config: Record<string, unknown>;
|
|
2280
|
-
}
|
|
2281
|
-
interface PageVariable {
|
|
2282
|
-
name: string;
|
|
2283
|
-
type: 'string' | 'number' | 'boolean' | 'object' | 'array';
|
|
2284
|
-
defaultValue: unknown;
|
|
2320
|
+
[key: string]: unknown;
|
|
2285
2321
|
}
|
|
2286
2322
|
interface Page {
|
|
2287
2323
|
id: string;
|
|
@@ -2293,13 +2329,8 @@ interface Page {
|
|
|
2293
2329
|
isHomePage: boolean;
|
|
2294
2330
|
isPublic: boolean;
|
|
2295
2331
|
accessRoles: string[];
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
config: LayoutConfig;
|
|
2299
|
-
};
|
|
2300
|
-
components: ComponentNode[];
|
|
2301
|
-
dataSources: DataSource[];
|
|
2302
|
-
variables: PageVariable[];
|
|
2332
|
+
/** The page document the runner draws. */
|
|
2333
|
+
dsl: DslPage;
|
|
2303
2334
|
seo: PageSEO;
|
|
2304
2335
|
order: number;
|
|
2305
2336
|
createdAt: string;
|
|
@@ -2373,6 +2404,13 @@ interface UpdateAppParams {
|
|
|
2373
2404
|
icon?: string;
|
|
2374
2405
|
status?: AppStatus;
|
|
2375
2406
|
settings?: AppSettings;
|
|
2407
|
+
/** Replaces the app definition as a whole. */
|
|
2408
|
+
definition?: AppDefinition;
|
|
2409
|
+
/** Adjust a rollout; `percent: 100` promotes it, `null` ends it. */
|
|
2410
|
+
rollout?: {
|
|
2411
|
+
version: number;
|
|
2412
|
+
percent: number;
|
|
2413
|
+
} | null;
|
|
2376
2414
|
}
|
|
2377
2415
|
interface ListAppsParams {
|
|
2378
2416
|
status?: AppStatus;
|
|
@@ -2386,10 +2424,9 @@ interface CreatePageParams {
|
|
|
2386
2424
|
description?: string;
|
|
2387
2425
|
isHomePage?: boolean;
|
|
2388
2426
|
isPublic?: boolean;
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
};
|
|
2427
|
+
/** The page document; an empty column when absent. */
|
|
2428
|
+
dsl?: DslPage;
|
|
2429
|
+
seo?: Partial<PageSEO>;
|
|
2393
2430
|
}
|
|
2394
2431
|
interface UpdatePageParams {
|
|
2395
2432
|
name?: string;
|
|
@@ -2399,13 +2436,8 @@ interface UpdatePageParams {
|
|
|
2399
2436
|
isHomePage?: boolean;
|
|
2400
2437
|
isPublic?: boolean;
|
|
2401
2438
|
accessRoles?: string[];
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
config?: LayoutConfig;
|
|
2405
|
-
};
|
|
2406
|
-
components?: ComponentNode[];
|
|
2407
|
-
dataSources?: DataSource[];
|
|
2408
|
-
variables?: PageVariable[];
|
|
2439
|
+
/** Replaces the page document as a whole. */
|
|
2440
|
+
dsl?: DslPage;
|
|
2409
2441
|
seo?: PageSEO;
|
|
2410
2442
|
}
|
|
2411
2443
|
interface MAKEMINDAppsConfig extends MAKEMINDConfig {
|
|
@@ -2443,7 +2475,13 @@ declare class MAKEMINDApps {
|
|
|
2443
2475
|
duplicatePage(appId: string, pageId: string, newName?: string, newPath?: string): Promise<{
|
|
2444
2476
|
pageId: string;
|
|
2445
2477
|
}>;
|
|
2446
|
-
|
|
2478
|
+
/**
|
|
2479
|
+
* Cut a version and publish it — to everyone, or with `rolloutPercent`
|
|
2480
|
+
* (1–99) to that share of visitors beside the published version.
|
|
2481
|
+
*/
|
|
2482
|
+
publish(appId: string, changelog?: string, options?: {
|
|
2483
|
+
rolloutPercent?: number;
|
|
2484
|
+
}): Promise<{
|
|
2447
2485
|
success: boolean;
|
|
2448
2486
|
version: number;
|
|
2449
2487
|
publishedAt: string;
|
|
@@ -2661,11 +2699,16 @@ declare class MAKEMINDApps {
|
|
|
2661
2699
|
startDate?: string;
|
|
2662
2700
|
endDate?: string;
|
|
2663
2701
|
}): Promise<AppAnalytics>;
|
|
2702
|
+
/** A widget subtree in DSL from a description (app builder DDD 08 §9). */
|
|
2664
2703
|
generateUI(prompt: string, context?: Record<string, unknown>, appId?: string): Promise<{
|
|
2665
|
-
|
|
2704
|
+
content: DslNode;
|
|
2666
2705
|
}>;
|
|
2667
|
-
|
|
2668
|
-
|
|
2706
|
+
/** DSL actions a widget could run, from the tools the app's origin offers. */
|
|
2707
|
+
suggestActions(appId: string, widgetType?: string): Promise<{
|
|
2708
|
+
suggestions: Array<{
|
|
2709
|
+
label: string;
|
|
2710
|
+
action: Record<string, unknown>;
|
|
2711
|
+
}>;
|
|
2669
2712
|
}>;
|
|
2670
2713
|
startSession(appId: string, pageId: string): Promise<{
|
|
2671
2714
|
sessionToken: string;
|
|
@@ -3067,6 +3110,8 @@ declare const ErrorCodes: {
|
|
|
3067
3110
|
readonly NOT_FOUND: "NOT_FOUND";
|
|
3068
3111
|
readonly ALREADY_EXISTS: "ALREADY_EXISTS";
|
|
3069
3112
|
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
3113
|
+
/** No refresh credential on this client; the session is intact but cannot be refreshed here. */
|
|
3114
|
+
readonly AUTH_REFRESH_UNAVAILABLE: "AUTH_REFRESH_UNAVAILABLE";
|
|
3070
3115
|
readonly TENANT_NOT_FOUND: "TENANT_NOT_FOUND";
|
|
3071
3116
|
readonly TENANT_SUSPENDED: "TENANT_SUSPENDED";
|
|
3072
3117
|
readonly NOT_A_MEMBER: "NOT_A_MEMBER";
|
|
@@ -3077,4 +3122,4 @@ declare const ErrorCodes: {
|
|
|
3077
3122
|
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
3078
3123
|
};
|
|
3079
3124
|
|
|
3080
|
-
export { ApiClient, type ApiClientConfig, type ApiRequestOptions, type AuthStateCallback, type AuthUser, type BillingSummary, type CollectionSnapshotCallback, type ConsultResult, type ConsultationConclusion, type CreateOptions, type DeleteOptions, type DocumentResult, ErrorCodes, type ExpertAccess, ExpertChat, type ExpertChatWidget, type ExpertChatWidgetOptions, type ExpertConsultation, ExpertDoorError, type ExpertSession, type ExpertTurn, type FileMetadata, type FlowListItem, type GetOptions, type Invoice, type ListFilesOptions, type ListFilesResult, type ListFlowsParams, type ListFlowsResult, type LogicCallResult, MAKEMINDAI, type MAKEMINDAIConfig, MAKEMINDApps, type MAKEMINDAppsConfig, MAKEMINDAuth, type MAKEMINDAuthConfig, MAKEMINDClient, type MAKEMINDClientConfig, type MAKEMINDConfig, MAKEMINDData, type MAKEMINDDataConfig, MAKEMINDError, MAKEMINDExperts, type MAKEMINDExpertsConfig, MAKEMINDLogic, type MAKEMINDLogicConfig, MAKEMINDMarketplace, type MAKEMINDMarketplaceConfig, MAKEMINDMessaging, type MAKEMINDMessagingConfig, MAKEMINDSearch, type MAKEMINDSearchConfig, MAKEMINDSettlement, type MAKEMINDSettlementConfig, MAKEMINDStorage, type MAKEMINDStorageConfig, MAKEMINDTenant, type MAKEMINDTenantConfig, type Notification, type OrderBy, type PlatformErrorDetails, type QueryCondition, type QueryOptions, type QueryResult, type SendMessageOptions, type SnapshotCallback, type Tenant, type TenantClaims, type TenantMember, type Unsubscribe, type UpdateOptions, type UploadOptions, type UploadResult, type UsageEventOptions, type UsageStats, type WorkflowTransitionOptions, type Workspace, getMAKEMIND, initializeMAKEMIND, mountExpertChat };
|
|
3125
|
+
export { ApiClient, type ApiClientConfig, type ApiRequestOptions, type AuthStateCallback, type AuthUser, type BillingSummary, type CollectionSnapshotCallback, type ConsultResult, type ConsultationConclusion, type CreateOptions, type DeleteOptions, type DocumentResult, ErrorCodes, type ExpertAccess, ExpertChat, type ExpertChatWidget, type ExpertChatWidgetOptions, type ExpertConsultation, ExpertDoorError, type ExpertSession, type ExpertTurn, type FileMetadata, type FlowListItem, type GetOptions, type Invoice, type ListFilesOptions, type ListFilesResult, type ListFlowsParams, type ListFlowsResult, type LogicCallResult, MAKEMINDAI, type MAKEMINDAIConfig, MAKEMINDApps, type MAKEMINDAppsConfig, MAKEMINDAuth, type MAKEMINDAuthConfig, MAKEMINDClient, type MAKEMINDClientConfig, type MAKEMINDConfig, MAKEMINDData, type MAKEMINDDataConfig, MAKEMINDError, MAKEMINDExperts, type MAKEMINDExpertsConfig, MAKEMINDLogic, type MAKEMINDLogicConfig, MAKEMINDMarketplace, type MAKEMINDMarketplaceConfig, MAKEMINDMessaging, type MAKEMINDMessagingConfig, MAKEMINDSearch, type MAKEMINDSearchConfig, MAKEMINDSettlement, type MAKEMINDSettlementConfig, MAKEMINDStorage, type MAKEMINDStorageConfig, MAKEMINDTenant, type MAKEMINDTenantConfig, type Notification, type OcrLine, type OcrPage, type OcrResult, type OrderBy, type PlatformErrorDetails, type QueryCondition, type QueryOptions, type QueryResult, type SendMessageOptions, type SnapshotCallback, type Tenant, type TenantClaims, type TenantMember, type Unsubscribe, type UpdateOptions, type UploadOptions, type UploadResult, type UsageEventOptions, type UsageStats, type WorkflowTransitionOptions, type Workspace, getMAKEMIND, initializeMAKEMIND, mountExpertChat };
|