@proveanything/smartlinks 2.0.6 → 2.0.9

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.
Files changed (177) hide show
  1. package/dist/api/ai.d.ts +1 -1
  2. package/dist/api/ai.js +1 -1
  3. package/dist/api/analytics.d.ts +1 -1
  4. package/dist/api/analytics.js +1 -1
  5. package/dist/api/appConfiguration.d.ts +3 -3
  6. package/dist/api/appConfiguration.js +3 -3
  7. package/dist/api/appObjects.d.ts +1 -1
  8. package/dist/api/appObjects.js +1 -1
  9. package/dist/api/asset.d.ts +1 -1
  10. package/dist/api/asset.js +2 -2
  11. package/dist/api/async.d.ts +1 -1
  12. package/dist/api/async.js +1 -1
  13. package/dist/api/attestation.d.ts +1 -1
  14. package/dist/api/attestation.js +1 -1
  15. package/dist/api/attestations.d.ts +1 -1
  16. package/dist/api/attestations.js +1 -1
  17. package/dist/api/auth.d.ts +2 -2
  18. package/dist/api/auth.js +2 -2
  19. package/dist/api/authKit.d.ts +1 -1
  20. package/dist/api/authKit.js +1 -1
  21. package/dist/api/batch.d.ts +1 -1
  22. package/dist/api/batch.js +1 -1
  23. package/dist/api/broadcasts.d.ts +2 -2
  24. package/dist/api/broadcasts.js +1 -1
  25. package/dist/api/claimSet.d.ts +1 -1
  26. package/dist/api/claimSet.js +1 -1
  27. package/dist/api/collection.d.ts +1 -1
  28. package/dist/api/collection.js +1 -1
  29. package/dist/api/comms.d.ts +15 -15
  30. package/dist/api/comms.js +1 -1
  31. package/dist/api/config.d.ts +1 -1
  32. package/dist/api/config.js +1 -1
  33. package/dist/api/contact.d.ts +1 -1
  34. package/dist/api/contact.js +1 -1
  35. package/dist/api/containers.d.ts +1 -1
  36. package/dist/api/containers.js +1 -1
  37. package/dist/api/crate.d.ts +1 -1
  38. package/dist/api/crate.js +1 -1
  39. package/dist/api/facets.d.ts +1 -1
  40. package/dist/api/facets.js +1 -1
  41. package/dist/api/form.js +1 -1
  42. package/dist/api/http.js +1 -1
  43. package/dist/api/index.d.ts +46 -46
  44. package/dist/api/index.js +46 -46
  45. package/dist/api/integrations.d.ts +1 -1
  46. package/dist/api/integrations.js +1 -1
  47. package/dist/api/interactions.d.ts +1 -1
  48. package/dist/api/interactions.js +1 -1
  49. package/dist/api/jobs.d.ts +1 -1
  50. package/dist/api/jobs.js +1 -1
  51. package/dist/api/journeys.d.ts +1 -1
  52. package/dist/api/journeys.js +1 -1
  53. package/dist/api/journeysAnalytics.d.ts +1 -1
  54. package/dist/api/journeysAnalytics.js +1 -1
  55. package/dist/api/location.d.ts +1 -1
  56. package/dist/api/location.js +1 -1
  57. package/dist/api/lots.d.ts +1 -1
  58. package/dist/api/lots.js +1 -1
  59. package/dist/api/loyalty.d.ts +1 -1
  60. package/dist/api/loyalty.js +1 -1
  61. package/dist/api/navigation.d.ts +1 -1
  62. package/dist/api/navigation.js +1 -1
  63. package/dist/api/nfc.d.ts +1 -1
  64. package/dist/api/nfc.js +1 -1
  65. package/dist/api/order.d.ts +1 -1
  66. package/dist/api/order.js +1 -1
  67. package/dist/api/product.d.ts +1 -1
  68. package/dist/api/product.js +1 -1
  69. package/dist/api/products.d.ts +1 -1
  70. package/dist/api/products.js +1 -1
  71. package/dist/api/proof.d.ts +1 -1
  72. package/dist/api/proof.js +1 -1
  73. package/dist/api/qr.d.ts +1 -1
  74. package/dist/api/qr.js +1 -1
  75. package/dist/api/realtime.d.ts +1 -1
  76. package/dist/api/realtime.js +1 -1
  77. package/dist/api/research.d.ts +1 -1
  78. package/dist/api/research.js +1 -1
  79. package/dist/api/secrets.d.ts +1 -1
  80. package/dist/api/secrets.js +1 -1
  81. package/dist/api/segments.d.ts +1 -1
  82. package/dist/api/segments.js +1 -1
  83. package/dist/api/sequence.js +1 -1
  84. package/dist/api/tags.d.ts +1 -1
  85. package/dist/api/tags.js +1 -1
  86. package/dist/api/template.d.ts +1 -1
  87. package/dist/api/template.js +1 -1
  88. package/dist/api/translations.d.ts +1 -1
  89. package/dist/api/translations.js +2 -2
  90. package/dist/api/variant.d.ts +1 -1
  91. package/dist/api/variant.js +1 -1
  92. package/dist/containers/types.d.ts +1 -1
  93. package/dist/docs/API_SUMMARY.md +7 -7
  94. package/dist/docs/ai.md +14 -520
  95. package/dist/docs/analytics.md +41 -2
  96. package/dist/docs/app-data-storage.md +0 -38
  97. package/dist/docs/app-manifest.md +104 -7
  98. package/dist/docs/app-objects.md +0 -148
  99. package/dist/docs/app-records-pattern.md +2 -2
  100. package/dist/docs/building-react-components.md +6 -14
  101. package/dist/docs/caching.md +20 -21
  102. package/dist/docs/container-tracking.md +2 -0
  103. package/dist/docs/containers.md +14 -66
  104. package/dist/docs/executor.md +4 -4
  105. package/dist/docs/host-dependency-contract.md +27 -0
  106. package/dist/docs/iframe-responder.md +308 -0
  107. package/dist/docs/item-context.md +0 -2
  108. package/dist/docs/manifests.md +3 -3
  109. package/dist/docs/mobile-admin-container.md +4 -4
  110. package/dist/docs/mpa.md +5 -5
  111. package/dist/docs/native-facade.md +1 -1
  112. package/dist/docs/overview.md +34 -15
  113. package/dist/docs/portal-back-button.md +2 -3
  114. package/dist/docs/widgets.md +11 -69
  115. package/dist/http.d.ts +24 -8
  116. package/dist/http.js +32 -14
  117. package/dist/iframe.d.ts +2 -2
  118. package/dist/iframe.js +1 -1
  119. package/dist/iframeResponder.d.ts +7 -1
  120. package/dist/iframeResponder.js +45 -4
  121. package/dist/index.d.ts +30 -27
  122. package/dist/index.js +10 -8
  123. package/dist/mobile-admin/errors.d.ts +1 -1
  124. package/dist/mobile-admin/types.d.ts +2 -2
  125. package/dist/openapi.yaml +12 -0
  126. package/dist/shared-dependencies.d.ts +37 -0
  127. package/dist/shared-dependencies.js +79 -0
  128. package/dist/testing/index.d.ts +1 -1
  129. package/dist/translationCache.d.ts +1 -1
  130. package/dist/types/appManifest.d.ts +23 -0
  131. package/dist/types/broadcasts.d.ts +1 -1
  132. package/dist/types/collection.d.ts +2 -2
  133. package/dist/types/comms.d.ts +5 -5
  134. package/dist/types/contact.d.ts +1 -1
  135. package/dist/types/facets.d.ts +1 -1
  136. package/dist/types/iframeResponder.d.ts +3 -3
  137. package/dist/types/index.d.ts +44 -44
  138. package/dist/types/index.js +44 -44
  139. package/dist/types/interaction.d.ts +1 -1
  140. package/dist/types/itemContext.d.ts +1 -1
  141. package/dist/types/journeysAnalytics.d.ts +1 -1
  142. package/dist/types/navigation.d.ts +1 -1
  143. package/dist/types/product.d.ts +1 -1
  144. package/dist/types/proof.d.ts +1 -1
  145. package/dist/types/segments.d.ts +1 -1
  146. package/dist/types/widgets.d.ts +2 -2
  147. package/dist/utils/conditions.d.ts +1 -1
  148. package/dist/utils/index.d.ts +3 -3
  149. package/dist/utils/index.js +3 -3
  150. package/dist/utils/paths.d.ts +4 -4
  151. package/docs/API_SUMMARY.md +7 -7
  152. package/docs/ai.md +14 -520
  153. package/docs/analytics.md +41 -2
  154. package/docs/app-data-storage.md +0 -38
  155. package/docs/app-manifest.md +104 -7
  156. package/docs/app-objects.md +0 -148
  157. package/docs/app-records-pattern.md +2 -2
  158. package/docs/building-react-components.md +6 -14
  159. package/docs/caching.md +20 -21
  160. package/docs/container-tracking.md +2 -0
  161. package/docs/containers.md +14 -66
  162. package/docs/executor.md +4 -4
  163. package/docs/host-dependency-contract.md +27 -0
  164. package/docs/iframe-responder.md +308 -0
  165. package/docs/item-context.md +0 -2
  166. package/docs/mobile-admin-container.md +4 -4
  167. package/docs/mpa.md +5 -5
  168. package/docs/native-facade.md +1 -1
  169. package/docs/overview.md +34 -15
  170. package/docs/portal-back-button.md +2 -3
  171. package/docs/widgets.md +11 -69
  172. package/openapi.yaml +12 -0
  173. package/package.json +17 -6
  174. package/scripts/doctor.mjs +171 -0
  175. package/docs/analytics-metadata-conventions.md +0 -88
  176. package/docs/iframe-streaming-parent-changes.md +0 -308
  177. package/docs/manifests.md +0 -204
@@ -103,7 +103,7 @@ export interface PublicUpdateMyContactResponse {
103
103
  ok: boolean;
104
104
  contact: ContactPublic;
105
105
  }
106
- export type ChannelName = import('./broadcasts').BroadcastChannel;
106
+ export type ChannelName = import('./broadcasts.js').BroadcastChannel;
107
107
  export type SubjectType = 'product' | 'proof' | 'batch';
108
108
  /** Registered delivery method for a contact */
109
109
  export interface CommMethodMeta {
@@ -1,4 +1,4 @@
1
- import type { JsonValue, ProductQueryRequest } from "./product";
1
+ import type { JsonValue, ProductQueryRequest } from "./product.js";
2
2
  export interface FacetDefinition {
3
3
  id?: string;
4
4
  orgId?: string;
@@ -1,6 +1,6 @@
1
- export type { AuthKitUser } from './authKit';
2
- export type { AppConfig as CollectionApp } from './collection';
3
- import type { AppConfig } from './collection';
1
+ export type { AuthKitUser } from './authKit.js';
2
+ export type { AppConfig as CollectionApp } from './collection.js';
3
+ import type { AppConfig } from './collection.js';
4
4
  export interface CachedData {
5
5
  collection?: Record<string, any>;
6
6
  product?: Record<string, any>;
@@ -1,44 +1,44 @@
1
- export * from "./collection";
2
- export * from "./facets";
3
- export * from "./product";
4
- export * from "./proof";
5
- export * from "./appConfiguration";
6
- export * from "./error";
7
- export * from "./asset";
8
- export * from "./batch";
9
- export * from "./variant";
10
- export * from "./claimSet";
11
- export * from "./auth";
12
- export * from "./comms";
13
- export * from "./nfc";
14
- export * from "./itemContext";
15
- export * from "./contact";
16
- export * from "./broadcasts";
17
- export * from "./segments";
18
- export * from "./common";
19
- export * from "./journeys";
20
- export * from "./journeysAnalytics";
21
- export * from "./qr";
22
- export * from "./template";
23
- export * from "./interaction";
24
- export * from "./analytics";
25
- export * from "./location";
26
- export * from "./jobs";
27
- export * from "./realtime";
28
- export * from "./tags";
29
- export * from "./navigation";
30
- export * from "./order";
31
- export * from "./crate";
32
- export * from "./attestations";
33
- export * from "./containers";
34
- export * from "./authKit";
35
- export * from "./iframeResponder";
36
- export * from "./ai";
37
- export * from "./appManifest";
38
- export * from "./appObjects";
39
- export * from "./loyalty";
40
- export * from "./translations";
41
- export * from "./integrations";
42
- export * from "./research";
43
- export * from "./config";
44
- export * from "./widgets";
1
+ export * from "./collection.js";
2
+ export * from "./facets.js";
3
+ export * from "./product.js";
4
+ export * from "./proof.js";
5
+ export * from "./appConfiguration.js";
6
+ export * from "./error.js";
7
+ export * from "./asset.js";
8
+ export * from "./batch.js";
9
+ export * from "./variant.js";
10
+ export * from "./claimSet.js";
11
+ export * from "./auth.js";
12
+ export * from "./comms.js";
13
+ export * from "./nfc.js";
14
+ export * from "./itemContext.js";
15
+ export * from "./contact.js";
16
+ export * from "./broadcasts.js";
17
+ export * from "./segments.js";
18
+ export * from "./common.js";
19
+ export * from "./journeys.js";
20
+ export * from "./journeysAnalytics.js";
21
+ export * from "./qr.js";
22
+ export * from "./template.js";
23
+ export * from "./interaction.js";
24
+ export * from "./analytics.js";
25
+ export * from "./location.js";
26
+ export * from "./jobs.js";
27
+ export * from "./realtime.js";
28
+ export * from "./tags.js";
29
+ export * from "./navigation.js";
30
+ export * from "./order.js";
31
+ export * from "./crate.js";
32
+ export * from "./attestations.js";
33
+ export * from "./containers.js";
34
+ export * from "./authKit.js";
35
+ export * from "./iframeResponder.js";
36
+ export * from "./ai.js";
37
+ export * from "./appManifest.js";
38
+ export * from "./appObjects.js";
39
+ export * from "./loyalty.js";
40
+ export * from "./translations.js";
41
+ export * from "./integrations.js";
42
+ export * from "./research.js";
43
+ export * from "./config.js";
44
+ export * from "./widgets.js";
@@ -1,46 +1,46 @@
1
1
  // src/types/index.ts
2
2
  // Re-export all type modules so consumers can import types directly
3
- export * from "./collection";
4
- export * from "./facets";
5
- export * from "./product";
6
- export * from "./proof";
7
- export * from "./appConfiguration";
8
- export * from "./error";
9
- export * from "./asset";
10
- export * from "./batch";
11
- export * from "./variant";
12
- export * from "./claimSet";
13
- export * from "./auth";
14
- export * from "./comms";
15
- export * from "./nfc";
16
- export * from "./itemContext";
17
- export * from "./contact";
18
- export * from "./broadcasts";
19
- export * from "./segments";
20
- export * from "./common";
21
- export * from "./journeys";
22
- export * from "./journeysAnalytics";
23
- export * from "./qr";
24
- export * from "./template";
25
- export * from "./interaction";
26
- export * from "./analytics";
27
- export * from "./location";
28
- export * from "./jobs";
29
- export * from "./realtime";
30
- export * from "./tags";
31
- export * from "./navigation";
32
- export * from "./order";
33
- export * from "./crate";
34
- export * from "./attestations";
35
- export * from "./containers";
36
- export * from "./authKit";
37
- export * from "./iframeResponder";
38
- export * from "./ai";
39
- export * from "./appManifest";
40
- export * from "./appObjects";
41
- export * from "./loyalty";
42
- export * from "./translations";
43
- export * from "./integrations";
44
- export * from "./research";
45
- export * from "./config";
46
- export * from "./widgets";
3
+ export * from "./collection.js";
4
+ export * from "./facets.js";
5
+ export * from "./product.js";
6
+ export * from "./proof.js";
7
+ export * from "./appConfiguration.js";
8
+ export * from "./error.js";
9
+ export * from "./asset.js";
10
+ export * from "./batch.js";
11
+ export * from "./variant.js";
12
+ export * from "./claimSet.js";
13
+ export * from "./auth.js";
14
+ export * from "./comms.js";
15
+ export * from "./nfc.js";
16
+ export * from "./itemContext.js";
17
+ export * from "./contact.js";
18
+ export * from "./broadcasts.js";
19
+ export * from "./segments.js";
20
+ export * from "./common.js";
21
+ export * from "./journeys.js";
22
+ export * from "./journeysAnalytics.js";
23
+ export * from "./qr.js";
24
+ export * from "./template.js";
25
+ export * from "./interaction.js";
26
+ export * from "./analytics.js";
27
+ export * from "./location.js";
28
+ export * from "./jobs.js";
29
+ export * from "./realtime.js";
30
+ export * from "./tags.js";
31
+ export * from "./navigation.js";
32
+ export * from "./order.js";
33
+ export * from "./crate.js";
34
+ export * from "./attestations.js";
35
+ export * from "./containers.js";
36
+ export * from "./authKit.js";
37
+ export * from "./iframeResponder.js";
38
+ export * from "./ai.js";
39
+ export * from "./appManifest.js";
40
+ export * from "./appObjects.js";
41
+ export * from "./loyalty.js";
42
+ export * from "./translations.js";
43
+ export * from "./integrations.js";
44
+ export * from "./research.js";
45
+ export * from "./config.js";
46
+ export * from "./widgets.js";
@@ -1,4 +1,4 @@
1
- import type { IdField } from './common';
1
+ import type { IdField } from './common.js';
2
2
  export interface AdminInteractionsQueryRequest {
3
3
  userId?: string;
4
4
  contactId?: string;
@@ -1,4 +1,4 @@
1
- import type { TagContext } from './nfc';
1
+ import type { TagContext } from './nfc.js';
2
2
  /**
3
3
  * Authenticity status for a specific item — a proof, resolved via an NFC
4
4
  * tap or a serial proof URL. Collection- and product-only URLs have no
@@ -1,4 +1,4 @@
1
- import type { IdField } from './common';
1
+ import type { IdField } from './common.js';
2
2
  export interface JourneyStatsRequest {
3
3
  idField?: IdField;
4
4
  from?: string;
@@ -1,4 +1,4 @@
1
- import type { CollectionAnalyticsEvent } from './analytics';
1
+ import type { CollectionAnalyticsEvent } from './analytics.js';
2
2
  /** Where the link opens once resolved. */
3
3
  export type LinkOpenTarget = '_self' | '_blank';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { AssetRef } from "./asset";
1
+ import { AssetRef } from "./asset.js";
2
2
  export type JsonPrimitive = string | number | boolean | null;
3
3
  export type JsonValue = JsonPrimitive | JsonValue[] | {
4
4
  [key: string]: JsonValue;
@@ -1,4 +1,4 @@
1
- import { JsonValue, ScopedFieldDef } from './product';
1
+ import { JsonValue, ScopedFieldDef } from './product.js';
2
2
  /**
3
3
  * `proof.values` — the owner + business-writable bag.
4
4
  * Public keys sit at the root (business + current owner can write, everyone
@@ -95,7 +95,7 @@ export interface SegmentCalculateResult {
95
95
  note?: string;
96
96
  }
97
97
  export interface SegmentRecipientsResponse {
98
- items: import('./comms').Recipient[];
98
+ items: import('./comms.js').Recipient[];
99
99
  limit: number;
100
100
  offset: number;
101
101
  total: number;
@@ -1,5 +1,5 @@
1
- import type { TagContext } from './nfc';
2
- import type { ItemContext } from './itemContext';
1
+ import type { TagContext } from './nfc.js';
2
+ import type { ItemContext } from './itemContext.js';
3
3
  /**
4
4
  * Structured navigation request emitted via the `onNavigate` prop when a
5
5
  * widget or container needs to navigate the parent platform shell to another
@@ -1,4 +1,4 @@
1
- import type { ItemContext } from '../types/itemContext';
1
+ import type { ItemContext } from '../types/itemContext.js';
2
2
  /**
3
3
  * Geographic region definitions for country-based conditions
4
4
  */
@@ -2,6 +2,6 @@
2
2
  * Utility functions and helpers for working with smartlinks data.
3
3
  * @module utils
4
4
  */
5
- export * from './paths';
6
- export * from './conditions';
7
- export * from './anonId';
5
+ export * from './paths.js';
6
+ export * from './conditions.js';
7
+ export * from './anonId.js';
@@ -3,6 +3,6 @@
3
3
  * Utility functions and helpers for working with smartlinks data.
4
4
  * @module utils
5
5
  */
6
- export * from './paths';
7
- export * from './conditions';
8
- export * from './anonId';
6
+ export * from './paths.js';
7
+ export * from './conditions.js';
8
+ export * from './anonId.js';
@@ -1,7 +1,7 @@
1
- import type { Product } from '../types/product';
2
- import type { Collection } from '../types/collection';
3
- import type { BatchResponse } from '../types/batch';
4
- import type { Proof } from '../types/proof';
1
+ import type { Product } from '../types/product.js';
2
+ import type { Collection } from '../types/collection.js';
3
+ import type { BatchResponse } from '../types/batch.js';
4
+ import type { Proof } from '../types/proof.js';
5
5
  /**
6
6
  * Parameters for building a portal path.
7
7
  * Pass in objects where available - the function will extract the needed properties.
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 2.0.6 | Generated: 2026-09-21T12:54:07.123Z
3
+ Version: 2.0.9 | Generated: 2026-09-21T16:23:55.650Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -17,15 +17,13 @@ For detailed guides on specific features:
17
17
  - **[Containers](containers.md)** - Building full-app embeddable containers (lazy-loaded)
18
18
  - **[Mobile Admin Container](mobile-admin-container.md)** - Building mobile-optimised operator/admin containers as a separate bundle
19
19
  - **[Container Tracking](container-tracking.md)** - Hierarchical physical/logical container groupings with item membership
20
- - **[Scanner Containers](scanner-container.md)** - Building scanner microapps for the SmartLinks Scanner Android host (RFID, NFC, QR, key events)
21
20
  - **[Multi-Page App Architecture](mpa.md)** - Vite MPA build pipeline: public/admin entry points, widget/container/executor bundles, content-hashed CDN assets
22
21
  - **[App Configuration Files](app-manifest.md)** - `app.manifest.json` and `app.admin.json` reference — bundles, components, setup questions, import schemas, tunable fields, and metrics
23
22
  - **[Executor Model](executor.md)** - Programmatic JS bundles for AI-driven setup, server-side SEO metadata generation, and LLM content for AI crawlers
24
23
  - **[Server Functions](server-functions.md)** - App-authored server-side "edge functions" (`async (ctx, event) => result`): http/event/cron triggers, the visibility/authority/capabilities security model, and the pre-scoped `ctx` (authority-scoped SDK, capability-gated secrets + fetch)
25
24
  - **[Deploying & Registering an App](deploying-apps.md)** - Publish → build → register: the app CDN layout (smartlinks.app), dev/beta/prod channels, channel-scoped deploy keys, the `POST /apps/:appId/releases` registration endpoint + validation, and how to wire it into your build so a bad manifest fails the deploy
26
25
  - **[Realtime](realtime.md)** - Real-time data updates and WebSocket connections
27
- - **[iframe Responder](iframe-responder.md)** - iframe integration and cross-origin communication
28
- - **[iframe Streaming Parent Changes](iframe-streaming-parent-changes.md)** - Parent-side changes required to support AI streaming in iframe proxy mode
26
+ - **[iframe Responder](iframe-responder.md)** - iframe integration and cross-origin communication (incl. hand-rolled streaming protocol)
29
27
  - **[Utilities](utils.md)** - Helper functions for building portal paths, URLs, and common tasks
30
28
  - **[UI Utils](ui-utils.md)** - Reusable, themeable admin UI React component library for microapps
31
29
  - **[Caching](caching.md)** - Multi-tier caching strategy (in-memory, SessionStorage, IndexedDB) used by the SDK
@@ -63,7 +61,6 @@ For detailed guides on specific features:
63
61
  - **[Integrations](integrations.md)** - Inbound/outbound integration flows + the sealed-secret store; triggers (manual/event/schedule), field mappings, and the Syndigo/Event Hub outbound path
64
62
  - **[AI Tools & Skills](ai-tools-and-skills.md)** - The AI capability catalog: skills apps invoke by name (e.g. research.brand), the tools the AI reaches for (web fetch/screenshot/brand assets/image gen), the agent loop, and how apps discover them
65
63
  - **[Deep Link Discovery](deep-link-discovery.md)** - Registering and discovering navigable app states for portal menus and AI orchestration
66
- - **[AI-Native App Manifests](manifests.md)** - How AI workflows discover, configure, and import apps via structured manifests and prose guides
67
64
  - **[AI Guide Template](ai-guide-template.md)** - A sample for an app on how to build an AI setup guide
68
65
 
69
66
  ## Choosing App Storage
@@ -220,8 +217,8 @@ Returns true if the SDK currently has any auth credential set (bearer token or A
220
217
  }) → `void`
221
218
  Configure the SDK's built-in in-memory GET cache. The cache is transparent — it sits inside the HTTP layer and requires no changes to your existing API calls. All GET requests benefit automatically. Per-resource rules (collections/products → 1 h, proofs → 30 s, etc.) override this value. in-memory only (`'none'`, default). Ignored in Node.js. fallback, from the original fetch time (default: 7 days). `SmartlinksOfflineError` with stale data instead of propagating the network error. caches on page load/refresh. IndexedDB persists for offline. ```ts // Enable IndexedDB persistence for offline support configureSdkCache({ persistence: 'indexeddb' }) // Disable cache entirely in test environments configureSdkCache({ enabled: false }) // Keep caches across page refreshes (not recommended for production) configureSdkCache({ clearOnPageLoad: false }) ```
222
219
 
223
- **invalidateCache**(urlPattern?: string) → `void`
224
- Manually invalidate entries in the SDK's GET cache. *contains* this string is removed. Omit (or pass `undefined`) to wipe the entire cache. ```ts invalidateCache() // clear everything invalidateCache('/collection/abc123') // one specific collection invalidateCache('/product/') // all legacy singular product responses invalidateCache('/products/') // all canonical plural product responses ```
220
+ **invalidateCache**(urlPattern?: string, options?: InvalidateCacheOptions) → `void`
221
+ Manually invalidate entries in the SDK's GET cache. Note: the GET cache is **in-memory, per page load** (with an optional L2 IndexedDB layer when persistence is enabled) — it does not persist across reloads unless you opt into persistence, so it rarely needs disabling "for correctness". *contains* this string is removed). With `{ exact: true }`, matches the path precisely. Omit to wipe the entire cache. ```ts invalidateCache() // clear everything invalidateCache('/collection/abc123') // that collection AND everything under it invalidateCache('/collection/abc123', { exact: true }) // ONLY that collection entry invalidateCache('/products/') // all canonical plural product responses ```
225
222
 
226
223
  **proxyUploadFormData**(path: string,
227
224
  formData: FormData,
@@ -1841,6 +1838,9 @@ interface AppManifest {
1841
1838
  version: string;
1842
1839
  platformRevision?: string;
1843
1840
  appId: string;
1841
+ moduleFormat?: 'umd' | 'esm' | 'dual';
1842
+ sharedDependencies?: string;
1843
+ globals?: Record<string, string>;
1844
1844
  seo?: {
1845
1845
  strategy?: 'executor' | string;
1846
1846
  priority?: number;