@proveanything/smartlinks 1.4.4 → 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.
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.4.4 | Generated: 2026-02-20T22:46:39.365Z
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
 
@@ -832,9 +832,20 @@ interface AppBundle {
832
832
  }
833
833
  ```
834
834
 
835
- **AppWidgetDefinition** (interface)
835
+ **AppManifestFiles** (interface)
836
836
  ```typescript
837
- interface AppWidgetDefinition {
837
+ interface AppManifestFiles {
838
+ js: {
839
+ umd: string;
840
+ esm?: string;
841
+ };
842
+ css?: string;
843
+ }
844
+ ```
845
+
846
+ **AppWidgetComponent** (interface)
847
+ ```typescript
848
+ interface AppWidgetComponent {
838
849
  name: string;
839
850
  description?: string;
840
851
  sizes?: Array<'compact' | 'standard' | 'large' | string>;
@@ -842,12 +853,13 @@ interface AppWidgetDefinition {
842
853
  required?: string[];
843
854
  optional?: string[];
844
855
  };
856
+ settings?: Record<string, any>;
845
857
  }
846
858
  ```
847
859
 
848
- **AppContainerDefinition** (interface)
860
+ **AppContainerComponent** (interface)
849
861
  ```typescript
850
- interface AppContainerDefinition {
862
+ interface AppContainerComponent {
851
863
  name: string;
852
864
  description?: string;
853
865
  props?: {
@@ -857,19 +869,14 @@ interface AppContainerDefinition {
857
869
  }
858
870
  ```
859
871
 
860
- **AppManifest** (interface)
872
+ **AppAdminConfig** (interface)
861
873
  ```typescript
862
- interface AppManifest {
874
+ interface AppAdminConfig {
863
875
  $schema?: string;
864
- meta?: {
865
- name: string;
866
- description?: string;
867
- version: string;
868
- platformRevision?: string;
869
- appId: string;
870
- };
871
- widgets?: AppWidgetDefinition[];
872
- containers?: AppContainerDefinition[];
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;
873
880
  setup?: {
874
881
  description?: string;
875
882
  questions?: Array<{
@@ -923,6 +930,33 @@ interface AppManifest {
923
930
  interactions?: Array<{ id: string; description?: string }>;
924
931
  kpis?: Array<{ name: string; compute?: string }>;
925
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
+ };
926
960
  [key: string]: any;
927
961
  }
928
962
  ```
@@ -934,6 +968,7 @@ interface CollectionAppWidget {
934
968
  manifest: AppManifest;
935
969
  widget: AppBundle;
936
970
  container: AppBundle | null;
971
+ admin: string | null;
937
972
  }
938
973
  ```
939
974
 
@@ -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 create a Blob URL or inject directly
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 load if `source` is absent */
15
+ /** URL to the JavaScript file -- load if `source` is absent */
16
16
  js: string | null;
17
- /** URL to the CSS file load if `styles` is absent */
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;
@@ -22,10 +22,20 @@ export interface AppBundle {
22
22
  styles?: string;
23
23
  }
24
24
  /**
25
- * A single widget defined in the manifest.
26
- * Presence of the `widgets` array means a widget bundle exists for this app.
25
+ * The files section inside a widgets or containers block.
27
26
  */
28
- export interface AppWidgetDefinition {
27
+ export interface AppManifestFiles {
28
+ js: {
29
+ /** UMD bundle -- used for script-tag / dynamic loading */
30
+ umd: string;
31
+ /** ESM bundle -- used for native ES module loading */
32
+ esm?: string;
33
+ };
34
+ /** CSS file -- absent if the bundle ships no styles */
35
+ css?: string;
36
+ }
37
+ /** A single widget component defined in the manifest */
38
+ export interface AppWidgetComponent {
29
39
  name: string;
30
40
  description?: string;
31
41
  sizes?: Array<'compact' | 'standard' | 'large' | string>;
@@ -33,13 +43,11 @@ export interface AppWidgetDefinition {
33
43
  required?: string[];
34
44
  optional?: string[];
35
45
  };
46
+ /** JSON-Schema-style settings the widget accepts */
47
+ settings?: Record<string, any>;
36
48
  }
37
- /**
38
- * A single container defined in the manifest.
39
- * Presence of the `containers` array means a container bundle exists for this app.
40
- * Containers are full-page / embedded components (larger than widgets, no iframe needed).
41
- */
42
- export interface AppContainerDefinition {
49
+ /** A single container component defined in the manifest */
50
+ export interface AppContainerComponent {
43
51
  name: string;
44
52
  description?: string;
45
53
  props?: {
@@ -48,21 +56,22 @@ export interface AppContainerDefinition {
48
56
  };
49
57
  }
50
58
  /**
51
- * SmartLinks App Manifest — the app.manifest.json structure.
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());
52
66
  */
53
- export interface AppManifest {
67
+ export interface AppAdminConfig {
54
68
  $schema?: string;
55
- meta?: {
56
- name: string;
57
- description?: string;
58
- version: string;
59
- platformRevision?: string;
60
- appId: string;
61
- };
62
- /** Presence means a widget bundle (widgets.umd.js / widgets.css) exists */
63
- widgets?: AppWidgetDefinition[];
64
- /** Presence means a container bundle (containers.umd.js / containers.css) exists */
65
- containers?: AppContainerDefinition[];
69
+ /**
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
+ */
74
+ aiGuide?: string;
66
75
  setup?: {
67
76
  description?: string;
68
77
  questions?: Array<{
@@ -125,6 +134,39 @@ export interface AppManifest {
125
134
  compute?: string;
126
135
  }>;
127
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
+ };
128
170
  [key: string]: any;
129
171
  }
130
172
  /**
@@ -133,10 +175,12 @@ export interface AppManifest {
133
175
  export interface CollectionAppWidget {
134
176
  appId: string;
135
177
  manifest: AppManifest;
136
- /** Widget bundle always present (apps without widgets are excluded from the response) */
178
+ /** Widget bundle -- always present (apps without widgets are excluded from the response) */
137
179
  widget: AppBundle;
138
- /** Container bundle null when the app has no containers */
180
+ /** Container bundle -- null when the app has no containers */
139
181
  container: AppBundle | null;
182
+ /** URL to the admin configuration JSON -- null when the app has no admin config */
183
+ admin: string | null;
140
184
  }
141
185
  /**
142
186
  * Response from GET /api/v1/public/collection/:collectionId/widgets
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.4.4 | Generated: 2026-02-20T22:46:39.365Z
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
 
@@ -832,9 +832,20 @@ interface AppBundle {
832
832
  }
833
833
  ```
834
834
 
835
- **AppWidgetDefinition** (interface)
835
+ **AppManifestFiles** (interface)
836
836
  ```typescript
837
- interface AppWidgetDefinition {
837
+ interface AppManifestFiles {
838
+ js: {
839
+ umd: string;
840
+ esm?: string;
841
+ };
842
+ css?: string;
843
+ }
844
+ ```
845
+
846
+ **AppWidgetComponent** (interface)
847
+ ```typescript
848
+ interface AppWidgetComponent {
838
849
  name: string;
839
850
  description?: string;
840
851
  sizes?: Array<'compact' | 'standard' | 'large' | string>;
@@ -842,12 +853,13 @@ interface AppWidgetDefinition {
842
853
  required?: string[];
843
854
  optional?: string[];
844
855
  };
856
+ settings?: Record<string, any>;
845
857
  }
846
858
  ```
847
859
 
848
- **AppContainerDefinition** (interface)
860
+ **AppContainerComponent** (interface)
849
861
  ```typescript
850
- interface AppContainerDefinition {
862
+ interface AppContainerComponent {
851
863
  name: string;
852
864
  description?: string;
853
865
  props?: {
@@ -857,19 +869,14 @@ interface AppContainerDefinition {
857
869
  }
858
870
  ```
859
871
 
860
- **AppManifest** (interface)
872
+ **AppAdminConfig** (interface)
861
873
  ```typescript
862
- interface AppManifest {
874
+ interface AppAdminConfig {
863
875
  $schema?: string;
864
- meta?: {
865
- name: string;
866
- description?: string;
867
- version: string;
868
- platformRevision?: string;
869
- appId: string;
870
- };
871
- widgets?: AppWidgetDefinition[];
872
- containers?: AppContainerDefinition[];
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;
873
880
  setup?: {
874
881
  description?: string;
875
882
  questions?: Array<{
@@ -923,6 +930,33 @@ interface AppManifest {
923
930
  interactions?: Array<{ id: string; description?: string }>;
924
931
  kpis?: Array<{ name: string; compute?: string }>;
925
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
+ };
926
960
  [key: string]: any;
927
961
  }
928
962
  ```
@@ -934,6 +968,7 @@ interface CollectionAppWidget {
934
968
  manifest: AppManifest;
935
969
  widget: AppBundle;
936
970
  container: AppBundle | null;
971
+ admin: string | null;
937
972
  }
938
973
  ```
939
974
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",