@proveanything/smartlinks 1.4.5 → 1.4.6
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/docs/API_SUMMARY.md +34 -21
- package/dist/types/appManifest.d.ts +54 -31
- package/docs/API_SUMMARY.md +34 -21
- package/package.json +1 -1
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.6 | Generated: 2026-02-21T09:47:56.138Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -869,28 +869,14 @@ interface AppContainerComponent {
|
|
|
869
869
|
}
|
|
870
870
|
```
|
|
871
871
|
|
|
872
|
-
**
|
|
872
|
+
**AppAdminConfig** (interface)
|
|
873
873
|
```typescript
|
|
874
|
-
interface
|
|
874
|
+
interface AppAdminConfig {
|
|
875
875
|
$schema?: string;
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
platformRevision?: string;
|
|
881
|
-
appId: string;
|
|
882
|
-
};
|
|
883
|
-
* Filename of the admin configuration JSON (e.g. "app.admin.json").
|
|
884
|
-
* Present when the app ships an admin UI config.
|
|
885
|
-
admin?: string;
|
|
886
|
-
widgets?: {
|
|
887
|
-
files: AppManifestFiles;
|
|
888
|
-
components: AppWidgetComponent[];
|
|
889
|
-
};
|
|
890
|
-
containers?: {
|
|
891
|
-
files: AppManifestFiles;
|
|
892
|
-
components: AppContainerComponent[];
|
|
893
|
-
};
|
|
876
|
+
* Path (relative to the app's public root) to an AI guide markdown file.
|
|
877
|
+
* Provides natural-language context for AI-assisted configuration.
|
|
878
|
+
* @example "ai-guide.md"
|
|
879
|
+
aiGuide?: string;
|
|
894
880
|
setup?: {
|
|
895
881
|
description?: string;
|
|
896
882
|
questions?: Array<{
|
|
@@ -944,6 +930,33 @@ interface AppManifest {
|
|
|
944
930
|
interactions?: Array<{ id: string; description?: string }>;
|
|
945
931
|
kpis?: Array<{ name: string; compute?: string }>;
|
|
946
932
|
};
|
|
933
|
+
}
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
**AppManifest** (interface)
|
|
937
|
+
```typescript
|
|
938
|
+
interface AppManifest {
|
|
939
|
+
$schema?: string;
|
|
940
|
+
meta?: {
|
|
941
|
+
name: string;
|
|
942
|
+
description?: string;
|
|
943
|
+
version: string;
|
|
944
|
+
platformRevision?: string;
|
|
945
|
+
appId: string;
|
|
946
|
+
};
|
|
947
|
+
* Relative path to the admin configuration file (e.g. `"app.admin.json"`).
|
|
948
|
+
* When present, fetch this file to get the full {@link AppAdminConfig}
|
|
949
|
+
* (setup questions, import schema, tunable fields, metrics definitions).
|
|
950
|
+
* Absent when the app has no admin UI.
|
|
951
|
+
admin?: string;
|
|
952
|
+
widgets?: {
|
|
953
|
+
files: AppManifestFiles;
|
|
954
|
+
components: AppWidgetComponent[];
|
|
955
|
+
};
|
|
956
|
+
containers?: {
|
|
957
|
+
files: AppManifestFiles;
|
|
958
|
+
components: AppContainerComponent[];
|
|
959
|
+
};
|
|
947
960
|
[key: string]: any;
|
|
948
961
|
}
|
|
949
962
|
```
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
* for inline content first and fall back to loading the URL.
|
|
7
7
|
*
|
|
8
8
|
* if (bundle.source) {
|
|
9
|
-
* // inline JS
|
|
9
|
+
* // inline JS -- create a Blob URL or inject directly
|
|
10
10
|
* } else if (bundle.js) {
|
|
11
11
|
* // load from URL
|
|
12
12
|
* }
|
|
13
13
|
*/
|
|
14
14
|
export interface AppBundle {
|
|
15
|
-
/** URL to the JavaScript file
|
|
15
|
+
/** URL to the JavaScript file -- load if `source` is absent */
|
|
16
16
|
js: string | null;
|
|
17
|
-
/** URL to the CSS file
|
|
17
|
+
/** URL to the CSS file -- load if `styles` is absent */
|
|
18
18
|
css: string | null;
|
|
19
19
|
/** Inlined JavaScript source (present when server bundles it inline) */
|
|
20
20
|
source?: string;
|
|
@@ -26,12 +26,12 @@ export interface AppBundle {
|
|
|
26
26
|
*/
|
|
27
27
|
export interface AppManifestFiles {
|
|
28
28
|
js: {
|
|
29
|
-
/** UMD bundle
|
|
29
|
+
/** UMD bundle -- used for script-tag / dynamic loading */
|
|
30
30
|
umd: string;
|
|
31
|
-
/** ESM bundle
|
|
31
|
+
/** ESM bundle -- used for native ES module loading */
|
|
32
32
|
esm?: string;
|
|
33
33
|
};
|
|
34
|
-
/** CSS file
|
|
34
|
+
/** CSS file -- absent if the bundle ships no styles */
|
|
35
35
|
css?: string;
|
|
36
36
|
}
|
|
37
37
|
/** A single widget component defined in the manifest */
|
|
@@ -56,32 +56,22 @@ export interface AppContainerComponent {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Shape of `app.admin.json` -- the separate admin configuration file pointed to
|
|
60
|
+
* by `AppManifest.admin`. Fetch this file yourself when you need setup / import /
|
|
61
|
+
* tunable / metrics details; it is not inlined in the manifest.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* const adminUrl = new URL(manifest.admin!, appBaseUrl);
|
|
65
|
+
* const adminConfig: AppAdminConfig = await fetch(adminUrl).then(r => r.json());
|
|
60
66
|
*/
|
|
61
|
-
export interface
|
|
67
|
+
export interface AppAdminConfig {
|
|
62
68
|
$schema?: string;
|
|
63
|
-
meta?: {
|
|
64
|
-
name: string;
|
|
65
|
-
description?: string;
|
|
66
|
-
version: string;
|
|
67
|
-
platformRevision?: string;
|
|
68
|
-
appId: string;
|
|
69
|
-
};
|
|
70
69
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
70
|
+
* Path (relative to the app's public root) to an AI guide markdown file.
|
|
71
|
+
* Provides natural-language context for AI-assisted configuration.
|
|
72
|
+
* @example "ai-guide.md"
|
|
73
73
|
*/
|
|
74
|
-
|
|
75
|
-
/** Widget bundle definition. Presence means a widget bundle exists for this app. */
|
|
76
|
-
widgets?: {
|
|
77
|
-
files: AppManifestFiles;
|
|
78
|
-
components: AppWidgetComponent[];
|
|
79
|
-
};
|
|
80
|
-
/** Container bundle definition. Presence means a container bundle exists. */
|
|
81
|
-
containers?: {
|
|
82
|
-
files: AppManifestFiles;
|
|
83
|
-
components: AppContainerComponent[];
|
|
84
|
-
};
|
|
74
|
+
aiGuide?: string;
|
|
85
75
|
setup?: {
|
|
86
76
|
description?: string;
|
|
87
77
|
questions?: Array<{
|
|
@@ -144,6 +134,39 @@ export interface AppManifest {
|
|
|
144
134
|
compute?: string;
|
|
145
135
|
}>;
|
|
146
136
|
};
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* SmartLinks App Manifest -- the app.manifest.json structure.
|
|
140
|
+
*
|
|
141
|
+
* Setup, import, tunable, and metrics configuration lives in a separate
|
|
142
|
+
* `app.admin.json` file. Use the `admin` field to locate and fetch it.
|
|
143
|
+
*/
|
|
144
|
+
export interface AppManifest {
|
|
145
|
+
$schema?: string;
|
|
146
|
+
meta?: {
|
|
147
|
+
name: string;
|
|
148
|
+
description?: string;
|
|
149
|
+
version: string;
|
|
150
|
+
platformRevision?: string;
|
|
151
|
+
appId: string;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Relative path to the admin configuration file (e.g. `"app.admin.json"`).
|
|
155
|
+
* When present, fetch this file to get the full {@link AppAdminConfig}
|
|
156
|
+
* (setup questions, import schema, tunable fields, metrics definitions).
|
|
157
|
+
* Absent when the app has no admin UI.
|
|
158
|
+
*/
|
|
159
|
+
admin?: string;
|
|
160
|
+
/** Widget bundle definition. Presence means a widget bundle exists for this app. */
|
|
161
|
+
widgets?: {
|
|
162
|
+
files: AppManifestFiles;
|
|
163
|
+
components: AppWidgetComponent[];
|
|
164
|
+
};
|
|
165
|
+
/** Container bundle definition. Presence means a container bundle exists. */
|
|
166
|
+
containers?: {
|
|
167
|
+
files: AppManifestFiles;
|
|
168
|
+
components: AppContainerComponent[];
|
|
169
|
+
};
|
|
147
170
|
[key: string]: any;
|
|
148
171
|
}
|
|
149
172
|
/**
|
|
@@ -152,11 +175,11 @@ export interface AppManifest {
|
|
|
152
175
|
export interface CollectionAppWidget {
|
|
153
176
|
appId: string;
|
|
154
177
|
manifest: AppManifest;
|
|
155
|
-
/** Widget bundle
|
|
178
|
+
/** Widget bundle -- always present (apps without widgets are excluded from the response) */
|
|
156
179
|
widget: AppBundle;
|
|
157
|
-
/** Container bundle
|
|
180
|
+
/** Container bundle -- null when the app has no containers */
|
|
158
181
|
container: AppBundle | null;
|
|
159
|
-
/** URL to the admin configuration JSON
|
|
182
|
+
/** URL to the admin configuration JSON -- null when the app has no admin config */
|
|
160
183
|
admin: string | null;
|
|
161
184
|
}
|
|
162
185
|
/**
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.6 | Generated: 2026-02-21T09:47:56.138Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -869,28 +869,14 @@ interface AppContainerComponent {
|
|
|
869
869
|
}
|
|
870
870
|
```
|
|
871
871
|
|
|
872
|
-
**
|
|
872
|
+
**AppAdminConfig** (interface)
|
|
873
873
|
```typescript
|
|
874
|
-
interface
|
|
874
|
+
interface AppAdminConfig {
|
|
875
875
|
$schema?: string;
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
platformRevision?: string;
|
|
881
|
-
appId: string;
|
|
882
|
-
};
|
|
883
|
-
* Filename of the admin configuration JSON (e.g. "app.admin.json").
|
|
884
|
-
* Present when the app ships an admin UI config.
|
|
885
|
-
admin?: string;
|
|
886
|
-
widgets?: {
|
|
887
|
-
files: AppManifestFiles;
|
|
888
|
-
components: AppWidgetComponent[];
|
|
889
|
-
};
|
|
890
|
-
containers?: {
|
|
891
|
-
files: AppManifestFiles;
|
|
892
|
-
components: AppContainerComponent[];
|
|
893
|
-
};
|
|
876
|
+
* Path (relative to the app's public root) to an AI guide markdown file.
|
|
877
|
+
* Provides natural-language context for AI-assisted configuration.
|
|
878
|
+
* @example "ai-guide.md"
|
|
879
|
+
aiGuide?: string;
|
|
894
880
|
setup?: {
|
|
895
881
|
description?: string;
|
|
896
882
|
questions?: Array<{
|
|
@@ -944,6 +930,33 @@ interface AppManifest {
|
|
|
944
930
|
interactions?: Array<{ id: string; description?: string }>;
|
|
945
931
|
kpis?: Array<{ name: string; compute?: string }>;
|
|
946
932
|
};
|
|
933
|
+
}
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
**AppManifest** (interface)
|
|
937
|
+
```typescript
|
|
938
|
+
interface AppManifest {
|
|
939
|
+
$schema?: string;
|
|
940
|
+
meta?: {
|
|
941
|
+
name: string;
|
|
942
|
+
description?: string;
|
|
943
|
+
version: string;
|
|
944
|
+
platformRevision?: string;
|
|
945
|
+
appId: string;
|
|
946
|
+
};
|
|
947
|
+
* Relative path to the admin configuration file (e.g. `"app.admin.json"`).
|
|
948
|
+
* When present, fetch this file to get the full {@link AppAdminConfig}
|
|
949
|
+
* (setup questions, import schema, tunable fields, metrics definitions).
|
|
950
|
+
* Absent when the app has no admin UI.
|
|
951
|
+
admin?: string;
|
|
952
|
+
widgets?: {
|
|
953
|
+
files: AppManifestFiles;
|
|
954
|
+
components: AppWidgetComponent[];
|
|
955
|
+
};
|
|
956
|
+
containers?: {
|
|
957
|
+
files: AppManifestFiles;
|
|
958
|
+
components: AppContainerComponent[];
|
|
959
|
+
};
|
|
947
960
|
[key: string]: any;
|
|
948
961
|
}
|
|
949
962
|
```
|