@proveanything/smartlinks 2.0.6 → 2.0.10

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 (179) 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/agent-tools.md +26 -14
  95. package/dist/docs/ai.md +14 -520
  96. package/dist/docs/analytics.md +41 -2
  97. package/dist/docs/app-data-storage.md +0 -38
  98. package/dist/docs/app-manifest.md +106 -7
  99. package/dist/docs/app-objects.md +0 -148
  100. package/dist/docs/app-records-pattern.md +2 -2
  101. package/dist/docs/building-react-components.md +6 -14
  102. package/dist/docs/caching.md +20 -21
  103. package/dist/docs/container-tracking.md +2 -0
  104. package/dist/docs/containers.md +14 -66
  105. package/dist/docs/executor.md +4 -4
  106. package/dist/docs/host-dependency-contract.md +27 -0
  107. package/dist/docs/iframe-responder.md +308 -0
  108. package/dist/docs/item-context.md +0 -2
  109. package/dist/docs/manifests.md +3 -3
  110. package/dist/docs/mobile-admin-container.md +4 -4
  111. package/dist/docs/mpa.md +5 -5
  112. package/dist/docs/native-facade.md +1 -1
  113. package/dist/docs/overview.md +35 -16
  114. package/dist/docs/portal-back-button.md +2 -3
  115. package/dist/docs/widgets.md +11 -69
  116. package/dist/http.d.ts +24 -8
  117. package/dist/http.js +32 -14
  118. package/dist/iframe.d.ts +2 -2
  119. package/dist/iframe.js +1 -1
  120. package/dist/iframeResponder.d.ts +7 -1
  121. package/dist/iframeResponder.js +45 -4
  122. package/dist/index.d.ts +30 -27
  123. package/dist/index.js +10 -8
  124. package/dist/mobile-admin/errors.d.ts +1 -1
  125. package/dist/mobile-admin/types.d.ts +2 -2
  126. package/dist/openapi.yaml +12 -0
  127. package/dist/shared-dependencies.d.ts +37 -0
  128. package/dist/shared-dependencies.js +79 -0
  129. package/dist/testing/index.d.ts +1 -1
  130. package/dist/translationCache.d.ts +1 -1
  131. package/dist/types/appManifest.d.ts +23 -0
  132. package/dist/types/broadcasts.d.ts +1 -1
  133. package/dist/types/collection.d.ts +2 -2
  134. package/dist/types/comms.d.ts +5 -5
  135. package/dist/types/contact.d.ts +1 -1
  136. package/dist/types/facets.d.ts +1 -1
  137. package/dist/types/iframeResponder.d.ts +3 -3
  138. package/dist/types/index.d.ts +44 -44
  139. package/dist/types/index.js +44 -44
  140. package/dist/types/interaction.d.ts +1 -1
  141. package/dist/types/itemContext.d.ts +1 -1
  142. package/dist/types/journeysAnalytics.d.ts +1 -1
  143. package/dist/types/navigation.d.ts +1 -1
  144. package/dist/types/product.d.ts +1 -1
  145. package/dist/types/proof.d.ts +1 -1
  146. package/dist/types/segments.d.ts +1 -1
  147. package/dist/types/widgets.d.ts +2 -2
  148. package/dist/utils/conditions.d.ts +1 -1
  149. package/dist/utils/index.d.ts +3 -3
  150. package/dist/utils/index.js +3 -3
  151. package/dist/utils/paths.d.ts +4 -4
  152. package/docs/API_SUMMARY.md +7 -7
  153. package/docs/agent-tools.md +26 -14
  154. package/docs/ai.md +14 -520
  155. package/docs/analytics.md +41 -2
  156. package/docs/app-data-storage.md +0 -38
  157. package/docs/app-manifest.md +106 -7
  158. package/docs/app-objects.md +0 -148
  159. package/docs/app-records-pattern.md +2 -2
  160. package/docs/building-react-components.md +6 -14
  161. package/docs/caching.md +20 -21
  162. package/docs/container-tracking.md +2 -0
  163. package/docs/containers.md +14 -66
  164. package/docs/executor.md +4 -4
  165. package/docs/host-dependency-contract.md +27 -0
  166. package/docs/iframe-responder.md +308 -0
  167. package/docs/item-context.md +0 -2
  168. package/docs/mobile-admin-container.md +4 -4
  169. package/docs/mpa.md +5 -5
  170. package/docs/native-facade.md +1 -1
  171. package/docs/overview.md +35 -16
  172. package/docs/portal-back-button.md +2 -3
  173. package/docs/widgets.md +11 -69
  174. package/openapi.yaml +12 -0
  175. package/package.json +17 -6
  176. package/scripts/doctor.mjs +171 -0
  177. package/docs/analytics-metadata-conventions.md +0 -88
  178. package/docs/iframe-streaming-parent-changes.md +0 -308
  179. package/docs/manifests.md +0 -204
package/dist/api/index.js CHANGED
@@ -1,49 +1,49 @@
1
1
  // src/api/index.ts
2
2
  // Re-export all resource namespaces so the consumer can import them in one line.
3
- export { collection } from "./collection";
4
- export { facets } from "./facets";
5
- export { product } from "./product";
6
- export { products } from "./products";
7
- export { proof } from "./proof";
8
- export { appConfiguration, userAppData } from "./appConfiguration";
9
- export { asset } from "./asset";
10
- export { attestation } from "./attestation";
11
- export { auth } from "./auth";
12
- export { form } from "./form";
13
- export { authKit } from "./authKit";
14
- export { claimSet } from "./claimSet";
15
- export { sequence } from "./sequence";
16
- export { crate } from "./crate";
17
- export { batch } from "./batch";
18
- export { variant } from "./variant";
19
- export { ai } from "./ai";
20
- export { comms } from "./comms";
21
- export { nfc } from "./nfc";
22
- export { contact } from "./contact";
23
- export { broadcasts } from "./broadcasts";
24
- export { async } from "./async";
25
- export { jobs } from "./jobs";
26
- export { segments } from "./segments";
27
- export { journeys } from "./journeys";
28
- export { journeysAnalytics } from "./journeysAnalytics";
29
- export { qr } from "./qr";
30
- export { template } from "./template";
31
- export { interactions } from "./interactions";
32
- export { analytics } from "./analytics";
33
- export { location } from "./location";
34
- import * as realtime_1 from "./realtime";
3
+ export { collection } from "./collection.js";
4
+ export { facets } from "./facets.js";
5
+ export { product } from "./product.js";
6
+ export { products } from "./products.js";
7
+ export { proof } from "./proof.js";
8
+ export { appConfiguration, userAppData } from "./appConfiguration.js";
9
+ export { asset } from "./asset.js";
10
+ export { attestation } from "./attestation.js";
11
+ export { auth } from "./auth.js";
12
+ export { form } from "./form.js";
13
+ export { authKit } from "./authKit.js";
14
+ export { claimSet } from "./claimSet.js";
15
+ export { sequence } from "./sequence.js";
16
+ export { crate } from "./crate.js";
17
+ export { batch } from "./batch.js";
18
+ export { variant } from "./variant.js";
19
+ export { ai } from "./ai.js";
20
+ export { comms } from "./comms.js";
21
+ export { nfc } from "./nfc.js";
22
+ export { contact } from "./contact.js";
23
+ export { broadcasts } from "./broadcasts.js";
24
+ export { async } from "./async.js";
25
+ export { jobs } from "./jobs.js";
26
+ export { segments } from "./segments.js";
27
+ export { journeys } from "./journeys.js";
28
+ export { journeysAnalytics } from "./journeysAnalytics.js";
29
+ export { qr } from "./qr.js";
30
+ export { template } from "./template.js";
31
+ export { interactions } from "./interactions.js";
32
+ export { analytics } from "./analytics.js";
33
+ export { location } from "./location.js";
34
+ import * as realtime_1 from "./realtime.js";
35
35
  export { realtime_1 as realtime };
36
- export { tags } from "./tags";
37
- export { order } from "./order";
38
- export { app } from "./appObjects";
39
- export { attestations } from "./attestations";
40
- export { containers } from "./containers";
41
- export { lots } from "./lots";
42
- export { loyalty } from "./loyalty";
43
- export { translations } from "./translations";
44
- export { integrations } from "./integrations";
45
- export { secrets } from "./secrets";
46
- export { research } from "./research";
47
- export { config } from "./config";
48
- export { http } from "./http";
49
- export { navigation } from "./navigation";
36
+ export { tags } from "./tags.js";
37
+ export { order } from "./order.js";
38
+ export { app } from "./appObjects.js";
39
+ export { attestations } from "./attestations.js";
40
+ export { containers } from "./containers.js";
41
+ export { lots } from "./lots.js";
42
+ export { loyalty } from "./loyalty.js";
43
+ export { translations } from "./translations.js";
44
+ export { integrations } from "./integrations.js";
45
+ export { secrets } from "./secrets.js";
46
+ export { research } from "./research.js";
47
+ export { config } from "./config.js";
48
+ export { http } from "./http.js";
49
+ export { navigation } from "./navigation.js";
@@ -1,4 +1,4 @@
1
- import type { IntegrationFlow, CreateFlowInput, UpdateFlowInput, ListFlowsQuery, FlowList, RunFlowInput, RunFlowResult, RunFlowSummary, RunFlowEnqueued, RecordTypesResponse } from "../types/integrations";
1
+ import type { IntegrationFlow, CreateFlowInput, UpdateFlowInput, ListFlowsQuery, FlowList, RunFlowInput, RunFlowResult, RunFlowSummary, RunFlowEnqueued, RecordTypesResponse } from "../types/integrations.js";
2
2
  export declare namespace integrations {
3
3
  /** List flows in a collection. GET /integrations/flows */
4
4
  function listFlows(collectionId: string, query?: ListFlowsQuery): Promise<FlowList>;
@@ -17,7 +17,7 @@ var __rest = (this && this.__rest) || function (s, e) {
17
17
  }
18
18
  return t;
19
19
  };
20
- import { request, post, put, del } from "../http";
20
+ import { request, post, put, del } from "../http.js";
21
21
  function enc(v) { return encodeURIComponent(v); }
22
22
  function encodeQuery(params = {}) {
23
23
  const search = new URLSearchParams();
@@ -1,4 +1,4 @@
1
- import type { AdminInteractionsCountsByOutcomeRequest, AdminInteractionsQueryRequest, AdminInteractionsAggregateRequest, AdminInteractionsAggregateResponse, AppendInteractionBody, UpdateInteractionBody, OutcomeCount, InteractionEventRow, PublicInteractionsCountsByOutcomeRequest, PublicInteractionsByUserRequest, SubmitInteractionResponse, SubmitInteractionError, CreateInteractionTypeBody, UpdateInteractionTypeBody, ListInteractionTypesQuery, InteractionTypeRecord, InteractionTypeList } from "../types/interaction";
1
+ import type { AdminInteractionsCountsByOutcomeRequest, AdminInteractionsQueryRequest, AdminInteractionsAggregateRequest, AdminInteractionsAggregateResponse, AppendInteractionBody, UpdateInteractionBody, OutcomeCount, InteractionEventRow, PublicInteractionsCountsByOutcomeRequest, PublicInteractionsByUserRequest, SubmitInteractionResponse, SubmitInteractionError, CreateInteractionTypeBody, UpdateInteractionTypeBody, ListInteractionTypesQuery, InteractionTypeRecord, InteractionTypeList } from "../types/interaction.js";
2
2
  export declare namespace interactions {
3
3
  /**
4
4
  * POST /admin/collection/:collectionId/interactions/query
@@ -1,5 +1,5 @@
1
1
  // src/api/interactions.ts
2
- import { request, post, patch, del } from "../http";
2
+ import { request, post, patch, del } from "../http.js";
3
3
  function encodeQuery(params) {
4
4
  const search = new URLSearchParams();
5
5
  for (const [key, value] of Object.entries(params)) {
@@ -1,4 +1,4 @@
1
- import type { JobsPage, ListJobsQuery, Job } from "../types/jobs";
1
+ import type { JobsPage, ListJobsQuery, Job } from "../types/jobs.js";
2
2
  export declare namespace jobs {
3
3
  /**
4
4
  * List visible jobs for a collection
package/dist/api/jobs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/api/jobs.ts
2
- import { request } from "../http";
2
+ import { request } from "../http.js";
3
3
  function enc(v) { return encodeURIComponent(v); }
4
4
  function encodeQuery(params = {}) {
5
5
  const search = new URLSearchParams();
@@ -1,4 +1,4 @@
1
- import type { JourneyRecord, JourneyList, ListJourneysQuery, CreateJourneyBody, UpdateJourneyBody } from "../types/journeys";
1
+ import type { JourneyRecord, JourneyList, ListJourneysQuery, CreateJourneyBody, UpdateJourneyBody } from "../types/journeys.js";
2
2
  export declare namespace journeys {
3
3
  function create(collectionId: string, body: CreateJourneyBody): Promise<JourneyRecord>;
4
4
  function list(collectionId: string, query?: ListJourneysQuery): Promise<JourneyList>;
@@ -1,5 +1,5 @@
1
1
  // src/api/journeys.ts
2
- import { request, post, patch, del } from "../http";
2
+ import { request, post, patch, del } from "../http.js";
3
3
  function encodeQuery(params) {
4
4
  const search = new URLSearchParams();
5
5
  for (const [key, value] of Object.entries(params)) {
@@ -1,4 +1,4 @@
1
- import type { JourneyStatsRequest, JourneyStatsResponse, JourneyStepRecipientsRequest, JourneyStepRecipientsResponse, JourneyFunnelReportRequest, JourneyFunnelReportResponse } from "../types/journeysAnalytics";
1
+ import type { JourneyStatsRequest, JourneyStatsResponse, JourneyStepRecipientsRequest, JourneyStepRecipientsResponse, JourneyFunnelReportRequest, JourneyFunnelReportResponse } from "../types/journeysAnalytics.js";
2
2
  export declare namespace journeysAnalytics {
3
3
  /**
4
4
  * POST /admin/collection/:collectionId/journeys.analytics/:journeyId/stats
@@ -1,5 +1,5 @@
1
1
  // src/api/journeysAnalytics.ts
2
- import { post } from "../http";
2
+ import { post } from "../http.js";
3
3
  export var journeysAnalytics;
4
4
  (function (journeysAnalytics) {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import type { Location, LocationPayload, LocationSearchQuery, LocationSearchResponse } from "../types/location";
1
+ import type { Location, LocationPayload, LocationSearchQuery, LocationSearchResponse } from "../types/location.js";
2
2
  export declare namespace location {
3
3
  /**
4
4
  * Platform: Create a global location (super admin; requires features.adminApps)
@@ -1,5 +1,5 @@
1
1
  // src/api/location.ts
2
- import { request, post } from "../http";
2
+ import { request, post } from "../http.js";
3
3
  function buildQueryString(q = {}) {
4
4
  var _a, _b;
5
5
  const params = new URLSearchParams();
@@ -1,4 +1,4 @@
1
- import { Lot, LotCreateInput, LotUpdateInput, ListLotsParams, ResolveLotResponse, ListLotProductsResponse } from "../types/lots";
1
+ import { Lot, LotCreateInput, LotUpdateInput, ListLotsParams, ResolveLotResponse, ListLotProductsResponse } from "../types/lots.js";
2
2
  /**
3
3
  * Lots — collection-scoped production groupings that span one or more products.
4
4
  * Writes and admin reads hit `/admin/collection/:cid/lots`; the `public*` reads hit
package/dist/api/lots.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/api/lots.ts
2
- import { request, post, put, del } from "../http";
2
+ import { request, post, put, del } from "../http.js";
3
3
  /**
4
4
  * Lots — collection-scoped production groupings that span one or more products.
5
5
  * Writes and admin reads hit `/admin/collection/:cid/lots`; the `public*` reads hit
@@ -1,4 +1,4 @@
1
- import type { LoyaltyScheme, LoyaltyMember, LoyaltyTransaction, LoyaltyEarningRule, LoyaltySchemeWithMembership, LoyaltyTransactionResult, LoyaltyPaginationParams, LoyaltyPaginatedResult, CreateLoyaltySchemeBody, UpdateLoyaltySchemeBody, CreateLoyaltyEarningRuleBody, UpdateLoyaltyEarningRuleBody, RecordLoyaltyTransactionBody } from "../types/loyalty";
1
+ import type { LoyaltyScheme, LoyaltyMember, LoyaltyTransaction, LoyaltyEarningRule, LoyaltySchemeWithMembership, LoyaltyTransactionResult, LoyaltyPaginationParams, LoyaltyPaginatedResult, CreateLoyaltySchemeBody, UpdateLoyaltySchemeBody, CreateLoyaltyEarningRuleBody, UpdateLoyaltyEarningRuleBody, RecordLoyaltyTransactionBody } from "../types/loyalty.js";
2
2
  export declare namespace loyalty {
3
3
  function list(collectionId: string, params?: {
4
4
  includeDeleted?: boolean;
@@ -1,5 +1,5 @@
1
1
  // src/api/loyalty.ts
2
- import { request, post, patch, del } from "../http";
2
+ import { request, post, patch, del } from "../http.js";
3
3
  function encodeQuery(params) {
4
4
  const q = new URLSearchParams();
5
5
  for (const [k, v] of Object.entries(params)) {
@@ -1,4 +1,4 @@
1
- import type { LinkTarget, ResolveLinkContext, ResolvedLink } from '../types/navigation';
1
+ import type { LinkTarget, ResolveLinkContext, ResolvedLink } from '../types/navigation.js';
2
2
  export declare namespace navigation {
3
3
  /**
4
4
  * Resolve a stored `LinkTarget` into an executable navigation action.
@@ -1,5 +1,5 @@
1
1
  // src/api/navigation.ts
2
- import { analytics } from './analytics';
2
+ import { analytics } from './analytics.js';
3
3
  // ---------------------------------------------------------------------------
4
4
  // Internal helpers
5
5
  // ---------------------------------------------------------------------------
package/dist/api/nfc.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { NfcValidateRequest, NfcValidateResponse, NfcTagInfo, NfcClaimTagRequest } from "../types/nfc";
1
+ import type { NfcValidateRequest, NfcValidateResponse, NfcTagInfo, NfcClaimTagRequest } from "../types/nfc.js";
2
2
  export declare namespace nfc {
3
3
  /**
4
4
  * Claim an NFC tag (public).
package/dist/api/nfc.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/api/nfc.ts
2
- import { post, request } from "../http";
2
+ import { post, request } from "../http.js";
3
3
  export var nfc;
4
4
  (function (nfc) {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { CreateOrderRequest, CreateOrderResponse, GetOrderParams, GetOrderResponse, UpdateOrderRequest, UpdateOrderResponse, DeleteOrderResponse, ListOrdersRequest, ListOrdersResponse, GetOrderItemsParams, GetOrderItemsResponse, AddItemsRequest, AddItemsResponse, RemoveItemsRequest, RemoveItemsResponse, QueryOrdersRequest, QueryOrdersResponse, ReportsParams, ReportsResponse, LookupOrdersRequest, LookupOrdersResponse, LookupByProductParams, LookupByProductResponse, OrderAnalyticsResponse, TimelineRequest, TimelineResponse, LocationRequest, LocationResponse, BulkAnalyticsRequest, BulkAnalyticsResponse, SummaryRequest, CollectionSummaryResponse, FindOrdersByAttributeParams, FindOrdersByAttributeResponse, FindItemsByAttributeParams, FindItemsByAttributeResponse, GetOrderIdsParams, GetOrderIdsResponse } from "../types/order";
1
+ import { CreateOrderRequest, CreateOrderResponse, GetOrderParams, GetOrderResponse, UpdateOrderRequest, UpdateOrderResponse, DeleteOrderResponse, ListOrdersRequest, ListOrdersResponse, GetOrderItemsParams, GetOrderItemsResponse, AddItemsRequest, AddItemsResponse, RemoveItemsRequest, RemoveItemsResponse, QueryOrdersRequest, QueryOrdersResponse, ReportsParams, ReportsResponse, LookupOrdersRequest, LookupOrdersResponse, LookupByProductParams, LookupByProductResponse, OrderAnalyticsResponse, TimelineRequest, TimelineResponse, LocationRequest, LocationResponse, BulkAnalyticsRequest, BulkAnalyticsResponse, SummaryRequest, CollectionSummaryResponse, FindOrdersByAttributeParams, FindOrdersByAttributeResponse, FindItemsByAttributeParams, FindItemsByAttributeResponse, GetOrderIdsParams, GetOrderIdsResponse } from "../types/order.js";
2
2
  /**
3
3
  * Order Management API
4
4
  *
package/dist/api/order.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/api/order.ts
2
- import { request, post, put, del, requestWithOptions } from "../http";
2
+ import { request, post, put, del, requestWithOptions } from "../http.js";
3
3
  /**
4
4
  * Order Management API
5
5
  *
@@ -1,4 +1,4 @@
1
- import { JsonValue, ProductClaimCreateRequestBody, ProductCreateRequest, ProductQueryRequest, ProductQueryResponse, ProductResponse, ProductUpdateRequest } from "../types/product";
1
+ import { JsonValue, ProductClaimCreateRequestBody, ProductCreateRequest, ProductQueryRequest, ProductQueryResponse, ProductResponse, ProductUpdateRequest } from "../types/product.js";
2
2
  type ProductPublicFindParams = Record<string, string | number | boolean | null | undefined | Array<string | number | boolean>>;
3
3
  export declare namespace product {
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  // src/api/product.ts
2
- import { request, post, put, del } from "../http";
2
+ import { request, post, put, del } from "../http.js";
3
3
  export var product;
4
4
  (function (product) {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { JsonValue, ProductClaimCreateRequestBody, ProductCreateRequest, ProductQueryRequest, ProductQueryResponse, ProductResponse, ProductUpdateRequest } from "../types/product";
1
+ import { JsonValue, ProductClaimCreateRequestBody, ProductCreateRequest, ProductQueryRequest, ProductQueryResponse, ProductResponse, ProductUpdateRequest } from "../types/product.js";
2
2
  export declare namespace products {
3
3
  function get(collectionId: string, productId: string, admin?: boolean): Promise<ProductResponse>;
4
4
  function list(collectionId: string, admin?: boolean): Promise<ProductResponse[]>;
@@ -1,4 +1,4 @@
1
- import { del, post, put, request } from "../http";
1
+ import { del, post, put, request } from "../http.js";
2
2
  export var products;
3
3
  (function (products) {
4
4
  async function get(collectionId, productId, admin) {
@@ -1,4 +1,4 @@
1
- import { ProofResponse, ProofCreateRequest, ProofUpdateRequest, ProofValuesUpdateRequest, ProofClaimRequest, ProofGrant, CreateGrantOptions, RedeemGrantOptions, RedeemGrantResult, ProofTransfer, TransferProofOptions, TransferProofResult, AcceptTransferOptions, CancelTransferOptions } from "../types/proof";
1
+ import { ProofResponse, ProofCreateRequest, ProofUpdateRequest, ProofValuesUpdateRequest, ProofClaimRequest, ProofGrant, CreateGrantOptions, RedeemGrantOptions, RedeemGrantResult, ProofTransfer, TransferProofOptions, TransferProofResult, AcceptTransferOptions, CancelTransferOptions } from "../types/proof.js";
2
2
  export declare namespace proof {
3
3
  /**
4
4
  * Retrieves a single Proof by Collection ID, Product ID, and Proof ID.
package/dist/api/proof.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/api/proof.ts
2
- import { request, post, put, del } from "../http";
2
+ import { request, post, put, del } from "../http.js";
3
3
  export var proof;
4
4
  (function (proof) {
5
5
  /**
package/dist/api/qr.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { QrShortCodeLookupResponse } from "../types/qr";
1
+ import type { QrShortCodeLookupResponse } from "../types/qr.js";
2
2
  /**
3
3
  * QR namespace for public short code lookups.
4
4
  */
package/dist/api/qr.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/api/qr.ts
2
2
  // QR / Short code lookup API
3
- import { request } from "../http";
3
+ import { request } from "../http.js";
4
4
  /**
5
5
  * QR namespace for public short code lookups.
6
6
  */
@@ -1,4 +1,4 @@
1
- import type { AblyTokenRequest, RealtimeTokenRequest } from "../types/realtime";
1
+ import type { AblyTokenRequest, RealtimeTokenRequest } from "../types/realtime.js";
2
2
  /**
3
3
  * Real-Time Communications API
4
4
  *
@@ -1,5 +1,5 @@
1
1
  // src/api/realtime.ts
2
- import { request } from "../http";
2
+ import { request } from "../http.js";
3
3
  /**
4
4
  * Real-Time Communications API
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { ResearchFetchRequest, ResearchFetchResult } from "../types/research";
1
+ import type { ResearchFetchRequest, ResearchFetchResult } from "../types/research.js";
2
2
  export declare namespace research {
3
3
  /**
4
4
  * Fetch + extract a web page: clean markdown, page metadata, and any schema.org
@@ -5,7 +5,7 @@
5
5
  // agent loop (e.g. the Recipes app fetching a recipe's schema.org JSON-LD from a URL).
6
6
  //
7
7
  // Endpoints: /admin/collection/:collectionId/research
8
- import { post } from "../http";
8
+ import { post } from "../http.js";
9
9
  export var research;
10
10
  (function (research) {
11
11
  /**
@@ -1,4 +1,4 @@
1
- import type { SecretMeta, SecretList, SetSecretInput, SetSecretResult, ListSecretsQuery } from "../types/integrations";
1
+ import type { SecretMeta, SecretList, SetSecretInput, SetSecretResult, ListSecretsQuery } from "../types/integrations.js";
2
2
  export declare namespace secrets {
3
3
  /** List secrets as refs + masked hints + metadata (never values). GET /secrets */
4
4
  function list(collectionId: string, query?: ListSecretsQuery): Promise<SecretList>;
@@ -9,7 +9,7 @@
9
9
  // config.connection.auth.credentialRef.
10
10
  //
11
11
  // Endpoints: /admin/collection/:collectionId/secrets
12
- import { request, post, put, del } from "../http";
12
+ import { request, post, put, del } from "../http.js";
13
13
  function enc(v) { return encodeURIComponent(v); }
14
14
  function encodeQuery(params = {}) {
15
15
  const search = new URLSearchParams();
@@ -1,4 +1,4 @@
1
- import type { SegmentRecord, ListSegmentsQuery, SegmentList, SegmentCalculateResult, SegmentRecipientsResponse } from "../types/segments";
1
+ import type { SegmentRecord, ListSegmentsQuery, SegmentList, SegmentCalculateResult, SegmentRecipientsResponse } from "../types/segments.js";
2
2
  export declare namespace segments {
3
3
  function create(collectionId: string, body: Omit<SegmentRecord, 'id' | 'collectionId' | 'createdAt'>): Promise<SegmentRecord>;
4
4
  function list(collectionId: string, query?: ListSegmentsQuery): Promise<SegmentList>;
@@ -1,5 +1,5 @@
1
1
  // src/api/segments.ts
2
- import { request, post, patch, del } from "../http";
2
+ import { request, post, patch, del } from "../http.js";
3
3
  function encodeQuery(params) {
4
4
  const search = new URLSearchParams();
5
5
  for (const [key, value] of Object.entries(params)) {
@@ -5,7 +5,7 @@
5
5
  // field, scope) is configured server-side in app config (data.sequenceConfigs[sequenceId]);
6
6
  // this call supplies only the subject and is idempotent — a re-tap returns the same number.
7
7
  // See docs/sequences.md.
8
- import { post } from "../http";
8
+ import { post } from "../http.js";
9
9
  export var sequence;
10
10
  (function (sequence) {
11
11
  const base = (collectionId) => `/public/collection/${encodeURIComponent(collectionId)}/sequence`;
@@ -1,4 +1,4 @@
1
- import type { TagIndexEntry, CreateTagRequest, CreateTagResponse, BatchCreateTagRequest, BatchCreateResult, UpdateTagRequest, UpdateTagResponse, DeleteTagResponse, GetTagResponse, ListTagsRequest, ListTagsResponse, LookupTagsRequest, LookupTagsQueryRequest, TagLookupResponse, PublicGetTagResponse, ByRefRequest, ByRefResponse, ReverseTagLookupParams, ReverseTagLookupResponse } from "../types/tags";
1
+ import type { TagIndexEntry, CreateTagRequest, CreateTagResponse, BatchCreateTagRequest, BatchCreateResult, UpdateTagRequest, UpdateTagResponse, DeleteTagResponse, GetTagResponse, ListTagsRequest, ListTagsResponse, LookupTagsRequest, LookupTagsQueryRequest, TagLookupResponse, PublicGetTagResponse, ByRefRequest, ByRefResponse, ReverseTagLookupParams, ReverseTagLookupResponse } from "../types/tags.js";
2
2
  /**
3
3
  * Tag Management API
4
4
  *
package/dist/api/tags.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/api/tags.ts
2
- import { request, post, put, del } from "../http";
2
+ import { request, post, put, del } from "../http.js";
3
3
  /**
4
4
  * Tag Management API
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { Template, TemplateInput, TemplateUpdate, TemplatePublic, TemplateRenderRequest, TemplateRenderResponse, TemplateRenderSourceRequest, TemplateRenderSourceResponse } from "../types";
1
+ import type { Template, TemplateInput, TemplateUpdate, TemplatePublic, TemplateRenderRequest, TemplateRenderResponse, TemplateRenderSourceRequest, TemplateRenderSourceResponse } from "../types/index.js";
2
2
  export declare namespace template {
3
3
  function getAll(collectionId: string): Promise<Template[]>;
4
4
  function get(collectionId: string, templateId: string): Promise<Template>;
@@ -1,4 +1,4 @@
1
- import { request, post, put, del as httpDel } from "../http";
1
+ import { request, post, put, del as httpDel } from "../http.js";
2
2
  export var template;
3
3
  (function (template) {
4
4
  // Admin APIs
@@ -1,4 +1,4 @@
1
- import type { ResolvedTranslationResponse, TranslationHashOptions, TranslationListParams, TranslationListResponse, TranslationLookupRequest, TranslationLookupResponse, TranslationRecord, TranslationResolveOptions, TranslationUpdateRequest } from '../types/translations';
1
+ import type { ResolvedTranslationResponse, TranslationHashOptions, TranslationListParams, TranslationListResponse, TranslationLookupRequest, TranslationLookupResponse, TranslationRecord, TranslationResolveOptions, TranslationUpdateRequest } from '../types/translations.js';
2
2
  export declare namespace translations {
3
3
  function hashText(text: string, options?: TranslationHashOptions): Promise<string>;
4
4
  function hashTexts(texts: string[], options?: TranslationHashOptions): Promise<string[]>;
@@ -1,5 +1,5 @@
1
- import { patch, post, request } from '../http';
2
- import { clearCachedTranslations, deriveTranslationContextKey, getCachedTranslations, getDefaultTranslationCacheTtlMs, hashTranslationText, normalizeTranslationText, setCachedTranslations, } from '../translationCache';
1
+ import { patch, post, request } from '../http.js';
2
+ import { clearCachedTranslations, deriveTranslationContextKey, getCachedTranslations, getDefaultTranslationCacheTtlMs, hashTranslationText, normalizeTranslationText, setCachedTranslations, } from '../translationCache.js';
3
3
  function normalizeLookupRequest(body) {
4
4
  var _a, _b, _c;
5
5
  const texts = Array.isArray(body.texts)
@@ -1,4 +1,4 @@
1
- import { VariantResponse, VariantCreateRequest, VariantUpdateRequest } from "../types/variant";
1
+ import { VariantResponse, VariantCreateRequest, VariantUpdateRequest } from "../types/variant.js";
2
2
  export declare namespace variant {
3
3
  /**
4
4
  * Get a single variant by ID for a collection and product (admin only).
@@ -1,5 +1,5 @@
1
1
  // src/api/variant.ts
2
- import { request, post, put, del } from "../http";
2
+ import { request, post, put, del } from "../http.js";
3
3
  export var variant;
4
4
  (function (variant) {
5
5
  // Admin CRUD operations
@@ -1,4 +1,4 @@
1
- import type { SmartLinksWidgetProps } from '../types';
1
+ import type { SmartLinksWidgetProps } from '../types/index.js';
2
2
  /**
3
3
  * Props for a SmartLinks container component.
4
4
  *
@@ -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.10 | Generated: 2026-09-21T16:50:28.412Z
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;
@@ -81,12 +81,21 @@ Identical to server functions — nothing new to reason about:
81
81
  Untrusted third-party tools run in the platform's isolated runner — the same boundary as untrusted
82
82
  server functions.
83
83
 
84
- ## Replacing `app.admin.json` AI setup
84
+ ## Working with `app.admin.json` (complement, not replacement)
85
85
 
86
- This supersedes the `app.admin.json` "AI setup" schema-extraction model (the outer agent reading a
87
- schema and handing back JSON blobs). Instead the app owns its domain logic and exposes **real,
88
- capability-scoped actions** the agent invokes — with multi-turn and streaming. The AI-schema path is
89
- **deprecated as of V2** (still works through the V2 line; removed later).
86
+ `app.admin.json` stays the **canonical declarative config contract** — setup questions, config schema,
87
+ import fields, tunable settings, content hints. It's inspectable, validatable, deterministic, and
88
+ reused by many consumers at once (the admin form renderer, AI setup, a signup journey asking the same
89
+ questions, bulk import). Agent tools **do not replace it — they serve and adapt it**:
90
+
91
+ - Keep the declarative schema as the default and source of truth.
92
+ - When you want *dynamic, contextual* behaviour — "which questions for **this** collection?", "the
93
+ config schema as it stands right now", "apply these answers" — expose a small function/tool that
94
+ reads the declaration and returns a tailored result. **Static-first; dynamic only where it earns its
95
+ keep.**
96
+
97
+ There's no rip-and-replace and nothing to migrate off: an app happy with its `app.admin.json` keeps
98
+ it untouched.
90
99
 
91
100
  ## What ships now vs staged
92
101
 
@@ -96,16 +105,19 @@ capability-scoped actions** the agent invokes — with multi-turn and streaming.
96
105
  | SDK types for it; tool descriptors surfaced for discovery | `tools/call` streaming, cancellation, cross-app toolbelt arbitration |
97
106
  | Your handlers run today via http/event | Human-approval UX for `approval: "require"` |
98
107
 
99
- ## Adopting this in an existing app
108
+ ## Adopting this — opt-in, per app, no fleet migration
109
+
110
+ Agent tools are **purely additive**. There is **no migration pass**, and nothing breaks if you never
111
+ adopt them — an existing app on the V2 SDK simply *gains the ability* to add them whenever you want.
112
+ You do **not** touch every app; you turn it on for one app at a time.
100
113
 
101
- Do it in order — each step is a drop-in migration prompt (see the migration steps that ship with the
102
- SDK). Roughly:
114
+ To turn them on for a single app (say, an FAQ app), once it's on the V2 SDK:
103
115
 
104
- 1. **Server functions** — add the `functions` block + build target + test harness (if the app
105
- doesn't have them). See [server-functions.md](server-functions.md).
116
+ 1. **Server functions** — add the `functions` block + build target + test harness if the app doesn't
117
+ already have them. See [server-functions.md](server-functions.md).
106
118
  2. **Expose tools** — add the `agent` block to the functions you want the agent to call; give each a
107
- title/description/input schema and an approval mode.
108
- 3. **Retire `app.admin.json` AI setup** — move any AI-authoring behaviour to tools; drop the
109
- AI-schema block.
119
+ title / description / input schema and an approval mode.
110
120
 
111
- Steps 1–2 are safe to ship now; step 3 as you migrate each app off the old AI path.
121
+ That's it — declare and build. The live agent loop is staged (see the table above); until it ships,
122
+ your handlers still run via http/event, so declaring tools now is **forward-compatible, not
123
+ speculative breakage**. `app.admin.json` stays as-is throughout — nothing to retire.