@proveanything/smartlinks 2.1.18 → 2.1.19
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/dist/adminViews.d.ts +19 -0
- package/dist/adminViews.js +16 -0
- package/dist/api/ai.d.ts +15 -5
- package/dist/api/ai.js +15 -9
- package/dist/api/aiGuide.d.ts +108 -0
- package/dist/api/aiGuide.js +161 -0
- package/dist/api/appObjects.d.ts +21 -0
- package/dist/api/appObjects.js +33 -1
- package/dist/api/authKit.d.ts +37 -1
- package/dist/api/authKit.js +51 -0
- package/dist/docs/API_SUMMARY.md +509 -40
- package/dist/docs/admin-lists-and-pickers.md +140 -0
- package/dist/docs/admin-views.md +22 -0
- package/dist/docs/app-data-storage.md +277 -276
- package/dist/docs/auth-kit.md +872 -741
- package/dist/docs/comms.md +686 -644
- package/dist/docs/customer-guide.md +70 -0
- package/dist/docs/headless-providers.md +112 -112
- package/dist/docs/server-functions.md +69 -1
- package/dist/docs/ui-utils.md +123 -121
- package/dist/docs/user-groups.md +175 -168
- package/dist/headless.js +38 -2
- package/dist/http.js +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/live.d.ts +80 -0
- package/dist/live.js +315 -0
- package/dist/openapi.yaml +888 -34
- package/dist/testing/index.d.ts +22 -0
- package/dist/testing/index.js +31 -0
- package/dist/types/appManifest.d.ts +214 -1
- package/dist/types/appOptions.d.ts +32 -0
- package/dist/types/appOptions.js +3 -0
- package/dist/types/authKit.d.ts +193 -4
- package/dist/types/comms.d.ts +41 -2
- package/dist/types/headless.d.ts +49 -1
- package/dist/types/iframeResponder.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/docs/API_SUMMARY.md +509 -40
- package/docs/admin-lists-and-pickers.md +140 -0
- package/docs/admin-views.md +22 -0
- package/docs/app-data-storage.md +277 -276
- package/docs/auth-kit.md +872 -741
- package/docs/comms.md +686 -644
- package/docs/customer-guide.md +70 -0
- package/docs/headless-providers.md +112 -112
- package/docs/server-functions.md +69 -1
- package/docs/ui-utils.md +123 -121
- package/docs/user-groups.md +175 -168
- package/openapi.yaml +888 -34
- package/package.json +1 -1
- package/scripts/doctor.mjs +454 -428
- package/scripts/lib/keyed-app-data.mjs +21 -0
package/dist/types/headless.d.ts
CHANGED
|
@@ -16,8 +16,38 @@ export interface AppDataField {
|
|
|
16
16
|
public?: boolean;
|
|
17
17
|
/** For `ref` / `ref[]`: the declared type id, or 'product' | 'contact' | 'proof'. */
|
|
18
18
|
to?: string;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* For `enum`: the allowed values, fixed by the app (changed by a release). Use this when the app's
|
|
21
|
+
* code branches on the values (job stages, statuses).
|
|
22
|
+
*/
|
|
20
23
|
options?: string[];
|
|
24
|
+
/**
|
|
25
|
+
* For `enum`: the id of a value list in `data.lists` whose values the admin edits (hold reasons,
|
|
26
|
+
* teams). Instead of `options`. The record stores the value's code. docs/admin-lists-and-pickers.md
|
|
27
|
+
*/
|
|
28
|
+
list?: string;
|
|
29
|
+
}
|
|
30
|
+
/** One value of a value list. The code never changes and is never removed (only switched off). */
|
|
31
|
+
export interface AppValueListValue {
|
|
32
|
+
/** Stored on records. Letters, digits, dots, dashes; unique in the list. */
|
|
33
|
+
code: string;
|
|
34
|
+
/** What people see; free to change. Defaults to the code. */
|
|
35
|
+
label?: string;
|
|
36
|
+
/** Switched off: hidden from new choices, still shown on records that carry it. Default true. */
|
|
37
|
+
active?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A value list the app declares: values only (a code, a label, on or off), edited by the admin in
|
|
41
|
+
* Studio. The manifest's `values` are the starting values, used until the admin first saves the list.
|
|
42
|
+
*/
|
|
43
|
+
export interface AppValueList {
|
|
44
|
+
label: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
values: AppValueListValue[];
|
|
47
|
+
/** The admin may add, rename, reorder and switch off values. Default true. */
|
|
48
|
+
editable?: boolean;
|
|
49
|
+
/** Anyone may read it (`SL.app.options` on the public API). Default false: admins and server code. */
|
|
50
|
+
public?: boolean;
|
|
21
51
|
}
|
|
22
52
|
/** How a type's items are stored. */
|
|
23
53
|
export type AppDataStorage =
|
|
@@ -65,11 +95,29 @@ export interface AppDataType {
|
|
|
65
95
|
};
|
|
66
96
|
/** The app version that introduced this type. */
|
|
67
97
|
since?: string;
|
|
98
|
+
/** The list's name in Studio's Set-up lists (plural, short): "Machines". Default: the description. */
|
|
99
|
+
title?: string;
|
|
100
|
+
/** The field a picker shows. Default: `label` (then `name`, then `title`). */
|
|
101
|
+
label?: string;
|
|
102
|
+
/** A field shown as a picker entry's second line (e.g. a machine's stage). */
|
|
103
|
+
sublabel?: string;
|
|
104
|
+
/** A boolean field that switches an entry off (false = off). Default: the record's status. */
|
|
105
|
+
activeField?: string;
|
|
106
|
+
/** A number field pickers sort by. Default: `sortOrder` (then `order`), then the label. */
|
|
107
|
+
orderField?: string;
|
|
108
|
+
/** A short list (dozens to hundreds): `ctx.sl.appRecords.all` reads it from cache. */
|
|
109
|
+
small?: boolean;
|
|
110
|
+
/** A set-up list the admin keeps: Studio shows a generated list and form for it. Implies `checked`. */
|
|
111
|
+
setup?: boolean;
|
|
112
|
+
/** Records of this type are checked against these fields when saved (400 INVALID_RECORD). */
|
|
113
|
+
checked?: boolean;
|
|
68
114
|
}
|
|
69
115
|
export interface AppDataDeclaration {
|
|
70
116
|
/** Semver of the data contract itself (not the app's version). Major = breaking. */
|
|
71
117
|
schemaVersion: string;
|
|
72
118
|
types: Record<string, AppDataType>;
|
|
119
|
+
/** Value lists the admin edits, by id (lowercase, dashes): picked by `enum` fields with `list`. */
|
|
120
|
+
lists?: Record<string, AppValueList>;
|
|
73
121
|
}
|
|
74
122
|
/** What kind of content a provider supplies — how site builders find it. */
|
|
75
123
|
export type HeadlessCategory = 'faq' | 'media' | 'pages' | 'articles' | 'catalog' | 'events' | 'locations' | 'people' | 'reviews' | 'documents' | 'forms' | 'other';
|
|
@@ -81,7 +81,7 @@ export interface RouteChangeMessage {
|
|
|
81
81
|
}
|
|
82
82
|
export interface SmartlinksIframeMessage {
|
|
83
83
|
_smartlinksIframeMessage: true;
|
|
84
|
-
type: 'smartlinks:resize' | 'smartlinks:redirect' | 'smartlinks:authkit:login' | 'smartlinks:authkit:logout' | 'smartlinks:authkit:redirect' | 'smartlinks:navigable' | 'smartlinks:navigate-result';
|
|
84
|
+
type: 'smartlinks:resize' | 'smartlinks:redirect' | 'smartlinks:authkit:login' | 'smartlinks:authkit:logout' | 'smartlinks:authkit:redirect' | 'smartlinks:navigable' | 'smartlinks:navigate-result' | 'smartlinks:open-app';
|
|
85
85
|
payload: Record<string, any>;
|
|
86
86
|
messageId?: string;
|
|
87
87
|
}
|
package/dist/types/index.d.ts
CHANGED