@fluid-app/portal-sdk 0.1.474 → 0.1.476

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 (80) hide show
  1. package/authoring/widget-api/sdk/src/widgets/worker.md +3313 -194
  2. package/dist/{FluidProvider-Enp1OrWr.cjs → FluidProvider-23ch3eP8.cjs} +2 -2
  3. package/dist/{FluidProvider-Enp1OrWr.cjs.map → FluidProvider-23ch3eP8.cjs.map} +1 -1
  4. package/dist/{FluidProvider-BNHU_neW.mjs → FluidProvider-DMeeVh2c.mjs} +2 -2
  5. package/dist/{FluidProvider-BNHU_neW.mjs.map → FluidProvider-DMeeVh2c.mjs.map} +1 -1
  6. package/dist/{MessagingScreen-AVfoyaxf.cjs → MessagingScreen-Ci-LJaR2.cjs} +3 -3
  7. package/dist/{MessagingScreen-BQmYbMd-.mjs → MessagingScreen-D3AD01zt.mjs} +3 -3
  8. package/dist/{MessagingScreen-4WZGUGsB.mjs → MessagingScreen-Dp4SiUQS.mjs} +2 -2
  9. package/dist/{MessagingScreen-4WZGUGsB.mjs.map → MessagingScreen-Dp4SiUQS.mjs.map} +1 -1
  10. package/dist/{MessagingScreen-DOjbhTOB.cjs → MessagingScreen-NuVpv-nc.cjs} +2 -2
  11. package/dist/{MessagingScreen-DOjbhTOB.cjs.map → MessagingScreen-NuVpv-nc.cjs.map} +1 -1
  12. package/dist/{OrdersScreen-5VmHwt9p.cjs → OrdersScreen-BHwi-PHP.cjs} +2 -2
  13. package/dist/{OrdersScreen-5VmHwt9p.cjs.map → OrdersScreen-BHwi-PHP.cjs.map} +1 -1
  14. package/dist/{OrdersScreen-CgJs_YwT.mjs → OrdersScreen-C2B9Eqgv.mjs} +3 -3
  15. package/dist/{OrdersScreen-DKH7gRMR.mjs → OrdersScreen-DrevIASH.mjs} +2 -2
  16. package/dist/{OrdersScreen-DKH7gRMR.mjs.map → OrdersScreen-DrevIASH.mjs.map} +1 -1
  17. package/dist/{OrdersScreen-Bu1Xu3rN.cjs → OrdersScreen-ppjcbl-E.cjs} +3 -3
  18. package/dist/{ProfileScreen-DLuirgGc.cjs → ProfileScreen-Ah2vLws3.cjs} +3 -3
  19. package/dist/{ProfileScreen-DLuirgGc.cjs.map → ProfileScreen-Ah2vLws3.cjs.map} +1 -1
  20. package/dist/{ProfileScreen-DBwYxpTt.cjs → ProfileScreen-CjYx113f.cjs} +4 -4
  21. package/dist/{ProfileScreen-cWvrOUKa.mjs → ProfileScreen-D3lE-N-0.mjs} +4 -4
  22. package/dist/{ProfileScreen-BpgrJkH0.mjs → ProfileScreen-DKddD3kl.mjs} +3 -3
  23. package/dist/{ProfileScreen-BpgrJkH0.mjs.map → ProfileScreen-DKddD3kl.mjs.map} +1 -1
  24. package/dist/{SubscriptionsScreen-_CMNc90t.mjs → SubscriptionsScreen-Bh0zZWrr.mjs} +4 -4
  25. package/dist/{SubscriptionsScreen-_CMNc90t.mjs.map → SubscriptionsScreen-Bh0zZWrr.mjs.map} +1 -1
  26. package/dist/{SubscriptionsScreen-DExbk_Rt.cjs → SubscriptionsScreen-BmRkFwfy.cjs} +4 -4
  27. package/dist/{SubscriptionsScreen-D4lpU-bC.cjs → SubscriptionsScreen-D5tKJWci.cjs} +4 -4
  28. package/dist/{SubscriptionsScreen-D4lpU-bC.cjs.map → SubscriptionsScreen-D5tKJWci.cjs.map} +1 -1
  29. package/dist/{SubscriptionsScreen-0S2YmOKZ.mjs → SubscriptionsScreen-DkXohPSw.mjs} +4 -4
  30. package/dist/{build-remote-widget-plugin-manifests-BS2FjZRV.d.cts → build-remote-widget-plugin-manifests-DUfcmkSD.d.cts} +3 -3
  31. package/dist/{build-remote-widget-plugin-manifests-BS2FjZRV.d.cts.map → build-remote-widget-plugin-manifests-DUfcmkSD.d.cts.map} +1 -1
  32. package/dist/{build-remote-widget-plugin-manifests-DxlaOngq.d.mts → build-remote-widget-plugin-manifests-ejOCHU1U.d.mts} +3 -3
  33. package/dist/{build-remote-widget-plugin-manifests-DxlaOngq.d.mts.map → build-remote-widget-plugin-manifests-ejOCHU1U.d.mts.map} +1 -1
  34. package/dist/{build-widget-registry-BvaGCB_P.mjs → build-widget-registry---S4DdG-.mjs} +2 -2
  35. package/dist/{build-widget-registry-BvaGCB_P.mjs.map → build-widget-registry---S4DdG-.mjs.map} +1 -1
  36. package/dist/{build-widget-registry-BuzSME2l.d.mts → build-widget-registry-B4uXvJe_.d.mts} +2 -2
  37. package/dist/{build-widget-registry-BuzSME2l.d.mts.map → build-widget-registry-B4uXvJe_.d.mts.map} +1 -1
  38. package/dist/{build-widget-registry-Dsp9P8gq.d.cts → build-widget-registry-C_uBIhbU.d.cts} +2 -2
  39. package/dist/{build-widget-registry-Dsp9P8gq.d.cts.map → build-widget-registry-C_uBIhbU.d.cts.map} +1 -1
  40. package/dist/{build-widget-registry-B2K6eJ2o.cjs → build-widget-registry-D28CSx4b.cjs} +2 -2
  41. package/dist/{build-widget-registry-B2K6eJ2o.cjs.map → build-widget-registry-D28CSx4b.cjs.map} +1 -1
  42. package/dist/fluid-spacer-widget-Cgsgu8lP.mjs +1265 -0
  43. package/dist/fluid-spacer-widget-Cgsgu8lP.mjs.map +1 -0
  44. package/dist/fluid-spacer-widget-ajsnkeUW.cjs +1805 -0
  45. package/dist/fluid-spacer-widget-ajsnkeUW.cjs.map +1 -0
  46. package/dist/index.cjs +16 -16
  47. package/dist/index.d.cts +3 -3
  48. package/dist/index.d.mts +3 -3
  49. package/dist/index.mjs +16 -16
  50. package/dist/{portal-function-DYWFgeRx.d.cts → portal-function-DUOB0Ykd.d.cts} +52 -1
  51. package/dist/{portal-function-DYWFgeRx.d.cts.map → portal-function-DUOB0Ykd.d.cts.map} +1 -1
  52. package/dist/{portal-function-MTknwZfL.d.mts → portal-function-hOpcnB0R.d.mts} +52 -1
  53. package/dist/{portal-function-MTknwZfL.d.mts.map → portal-function-hOpcnB0R.d.mts.map} +1 -1
  54. package/dist/{use-portal-card-add-3ds-flow-BlrgGoIL.cjs → use-portal-card-add-3ds-flow-DDvnJaAd.cjs} +24 -9
  55. package/dist/use-portal-card-add-3ds-flow-DDvnJaAd.cjs.map +1 -0
  56. package/dist/{use-portal-card-add-3ds-flow-BBIXp3G5.mjs → use-portal-card-add-3ds-flow-paHQE9yW.mjs} +24 -9
  57. package/dist/use-portal-card-add-3ds-flow-paHQE9yW.mjs.map +1 -0
  58. package/dist/utils/build-remote-widget-plugin-manifests.cjs +1 -1
  59. package/dist/utils/build-remote-widget-plugin-manifests.d.cts +1 -1
  60. package/dist/utils/build-remote-widget-plugin-manifests.d.mts +1 -1
  61. package/dist/utils/build-remote-widget-plugin-manifests.mjs +1 -1
  62. package/dist/utils/build-widget-registry.cjs +1 -1
  63. package/dist/utils/build-widget-registry.d.cts +1 -1
  64. package/dist/utils/build-widget-registry.d.mts +1 -1
  65. package/dist/utils/build-widget-registry.mjs +1 -1
  66. package/dist/widgets/worker.cjs +72 -1
  67. package/dist/widgets/worker.cjs.map +1 -1
  68. package/dist/widgets/worker.d.cts +1193 -329
  69. package/dist/widgets/worker.d.cts.map +1 -1
  70. package/dist/widgets/worker.d.mts +1193 -329
  71. package/dist/widgets/worker.d.mts.map +1 -1
  72. package/dist/widgets/worker.mjs +72 -1
  73. package/dist/widgets/worker.mjs.map +1 -1
  74. package/package.json +11 -11
  75. package/dist/fluid-spacer-widget-C33ayl7j.mjs +0 -547
  76. package/dist/fluid-spacer-widget-C33ayl7j.mjs.map +0 -1
  77. package/dist/fluid-spacer-widget-DoUSdfS_.cjs +0 -1087
  78. package/dist/fluid-spacer-widget-DoUSdfS_.cjs.map +0 -1
  79. package/dist/use-portal-card-add-3ds-flow-BBIXp3G5.mjs.map +0 -1
  80. package/dist/use-portal-card-add-3ds-flow-BlrgGoIL.cjs.map +0 -1
@@ -1,14 +1,33 @@
1
- import { a as PortalFunctionErrorCode, at as JsonValue, c as PortalFunctionJsonValue, ct as WidgetSourcePropertyField, i as PortalFunctionError, l as definePortalFunction, lt as WidgetSourcePropertySchema, n as PortalFunction, o as PortalFunctionHandler, r as PortalFunctionDefinition, s as PortalFunctionImplementation, t as AnyPortalFunction, u as implementPortalFunction } from "../portal-function-DYWFgeRx.cjs";
1
+ import { a as PortalFunctionErrorCode, at as JsonValue, c as PortalFunctionJsonValue, ct as WidgetSourcePropertyField, i as PortalFunctionError, l as definePortalFunction, lt as WidgetSourcePropertySchema, n as PortalFunction, o as PortalFunctionHandler, r as PortalFunctionDefinition, s as PortalFunctionImplementation, t as AnyPortalFunction, u as implementPortalFunction } from "../portal-function-DUOB0Ykd.cjs";
2
2
  import { ComponentType, ReactElement } from "react";
3
3
  import { RemoteDomWidgetWorkerController, prepareRemoteDomWidgetWorker } from "@fluid-app/widget-runtime/worker";
4
4
 
5
5
  //#region src/widgets/remote/worker/capability-use.d.ts
6
6
  declare const DECLARATIVE_CAPABILITY_USE: unique symbol;
7
+ /** A capability declaration that does not expose individual Portal functions. */
7
8
  interface DeclarativeCapabilityUse {
9
+ /** Internal marker used to validate `uses` entries. */
8
10
  readonly [DECLARATIVE_CAPABILITY_USE]: true;
11
+ /** Stable capability name. */
9
12
  readonly name: string;
13
+ /** Required capability contract version. */
10
14
  readonly version: string;
11
15
  }
16
+ /**
17
+ * Declares that a widget can make direct network requests.
18
+ * Add this marker to the widget's `uses` list. The portal host can require user
19
+ * consent before mounting a package that declares network access. This marker
20
+ * does not bypass browser CORS, Content Security Policy, or host network policy.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const widget = defineWidget({
25
+ * name: "remote-data",
26
+ * component: RemoteData,
27
+ * uses: [networkAccess],
28
+ * });
29
+ * ```
30
+ */
12
31
  declare const networkAccess: DeclarativeCapabilityUse;
13
32
  //#endregion
14
33
  //#region src/widgets/remote/worker/widget-package.d.ts
@@ -18,11 +37,12 @@ declare const SOURCE_WIDGET_PACKAGE_MARKER = "__fluidSourceWidgetPackage";
18
37
  type WidgetSourceDefaultProps = Readonly<Record<string, JsonValue>>;
19
38
  /** Builder resize behavior declared by a source widget. */
20
39
  type WidgetSourceResizable = boolean | "horizontal" | "vertical" | "both" | {
21
- readonly horizontal?: boolean;
22
- readonly vertical?: boolean;
23
- readonly minWidth?: number;
40
+ /** Allow horizontal resizing. */readonly horizontal?: boolean; /** Allow vertical resizing. */
41
+ readonly vertical?: boolean; /** Minimum width in builder layout units. */
42
+ readonly minWidth?: number; /** Minimum height in builder layout units. */
24
43
  readonly minHeight?: number;
25
44
  };
45
+ /** Versioned host capability required by a widget. */
26
46
  interface WidgetSourceCapabilityDeclaration {
27
47
  /** Stable capability name enforced by the worker and host. */
28
48
  readonly name: string;
@@ -81,10 +101,10 @@ interface DefineWidgetPackageBase<Scope extends string = string> {
81
101
  }
82
102
  /** Authoring options accepted by {@link defineWidgetPackage}. */
83
103
  type DefineWidgetPackageOptions<Scope extends string = string, StableId extends string = string> = DefineWidgetPackageBase<Scope> & ({
84
- readonly packageType?: "company";
104
+ /** Company-owned package. This is the default package type. */readonly packageType?: "company"; /** Stable company owner identifier. */
85
105
  readonly packageStableId: StableId;
86
106
  } | {
87
- readonly packageType: "droplet";
107
+ /** Standalone package owned by a Droplet. */readonly packageType: "droplet"; /** Stable Droplet identifier; the CLI can inject it during publication. */
88
108
  readonly packageStableId?: StableId;
89
109
  });
90
110
  /** Canonical source package returned by {@link defineWidgetPackage}. */
@@ -130,6 +150,18 @@ interface StartWidgetPackageOptions {
130
150
  * @param options - Component, builder metadata, defaults, property schema, and typed capability uses.
131
151
  * @returns The normalized widget used by {@link defineWidgetPackage}.
132
152
  * @throws If `uses` contains an invalid entry or conflicting capability versions.
153
+ * @remarks Call during worker module initialization. Default props and property values must cross the worker boundary as JSON values. Every Portal function the component calls must appear in `uses`.
154
+ *
155
+ * @example
156
+ * ```tsx
157
+ * const greeting = defineWidget({
158
+ * name: "greeting",
159
+ * displayName: "Greeting",
160
+ * component: Greeting,
161
+ * defaultProps: { message: "Hello" },
162
+ * uses: [getUserAccount],
163
+ * });
164
+ * ```
133
165
  */
134
166
  declare function defineWidget<const Name extends string, Props = WidgetSourceDefaultProps>(options: DefineWidgetOptions<Name, Props>): SourceWidget<Name, Props>;
135
167
  /**
@@ -138,6 +170,17 @@ declare function defineWidget<const Name extends string, Props = WidgetSourceDef
138
170
  * @param options - Package identity, SemVer version, widgets, and optional runtime stylesheets.
139
171
  * @returns A canonical source package descriptor. Build and dev replace runtime artifact URLs.
140
172
  * @throws If a company package omits `packageStableId`.
173
+ * @remarks Define one package during worker module initialization. Company packages require a stable company identifier; Droplet publication can inject its stable identifier through the CLI.
174
+ *
175
+ * @example
176
+ * ```ts
177
+ * const widgetPackage = defineWidgetPackage({
178
+ * scope: "acme",
179
+ * packageStableId: "company-public-id",
180
+ * version: "1.0.0",
181
+ * widgets: [greeting],
182
+ * });
183
+ * ```
141
184
  */
142
185
  declare function defineWidgetPackage<const Scope extends string, const StableId extends string>(options: DefineWidgetPackageOptions<Scope, StableId>): SourceWidgetPackage<Scope, StableId>;
143
186
  /**
@@ -145,439 +188,902 @@ declare function defineWidgetPackage<const Scope extends string, const StableId
145
188
  *
146
189
  * @param widgetPackage - A source package or generated runtime widget list.
147
190
  * @returns A controller that owns the worker connection and registered widget definitions.
191
+ * @throws If generated widgets cannot be matched to an unambiguous source `uses` declaration.
192
+ * @remarks Call once from the worker entry after all widgets and the package are defined. The returned controller owns the active Remote DOM connection.
193
+ *
194
+ * @example
195
+ * ```ts
196
+ * startWidgetPackage(widgetPackage);
197
+ * ```
148
198
  */
149
199
  declare function startWidgetPackage(widgetPackage: SourceWidgetPackage | StartWidgetPackageOptions): RemoteDomWidgetWorkerController;
150
200
  //#endregion
151
201
  //#region src/widgets/remote/contract/capabilities/built-in.d.ts
202
+ /** Identifier used by portal resources. IDs can be numeric or string-backed. */
152
203
  type PortalEntityId = string | number;
204
+ /** Signed-in portal account details available to a widget. */
153
205
  type UserAccount = {
154
- readonly id: number;
155
- readonly publicId: string;
156
- readonly memberType: "customer" | "rep";
157
- readonly firstName: string;
158
- readonly lastName: string;
159
- readonly displayName: string;
160
- readonly email: string;
161
- readonly bio: string | null;
162
- readonly avatarUrl: string | null;
163
- readonly slug: string;
164
- readonly socialLinks: Readonly<Record<string, string>> | null;
165
- readonly defaultCountryIso: string | null;
206
+ /** Numeric account identifier. */readonly id: number; /** Public account identifier. */
207
+ readonly publicId: string; /** Customer or representative account role. */
208
+ readonly memberType: "customer" | "rep"; /** Given name. */
209
+ readonly firstName: string; /** Family name. */
210
+ readonly lastName: string; /** Name intended for display. */
211
+ readonly displayName: string; /** Account email address. */
212
+ readonly email: string; /** Profile biography, if set. */
213
+ readonly bio: string | null; /** Profile avatar URL, if set. */
214
+ readonly avatarUrl: string | null; /** Public account slug. */
215
+ readonly slug: string; /** Social network names mapped to profile URLs. */
216
+ readonly socialLinks: Readonly<Record<string, string>> | null; /** Default ISO country code, if set. */
217
+ readonly defaultCountryIso: string | null; /** Active market ISO country code, if set. */
166
218
  readonly marketCountryIso: string | null;
167
219
  };
220
+ /** Store identity, branding, app links, and reward-point labels. */
168
221
  type PortalStore = {
169
- readonly id: number;
170
- readonly name: string;
171
- readonly subdomain: string;
172
- readonly logoUrl: string | null;
173
- readonly iconUrl: string | null;
174
- readonly appStoreUrl: string | null;
175
- readonly playStoreUrl: string | null;
176
- readonly bundleSubscriptionsEnabled: boolean;
177
- readonly rewardPointsLabelSingular: string;
222
+ /** Numeric store identifier. */readonly id: number; /** Store name. */
223
+ readonly name: string; /** Store subdomain. */
224
+ readonly subdomain: string; /** Store logo URL, if configured. */
225
+ readonly logoUrl: string | null; /** Store icon URL, if configured. */
226
+ readonly iconUrl: string | null; /** Apple App Store URL, if configured. */
227
+ readonly appStoreUrl: string | null; /** Google Play Store URL, if configured. */
228
+ readonly playStoreUrl: string | null; /** Whether bundle subscriptions are enabled. */
229
+ readonly bundleSubscriptionsEnabled: boolean; /** Singular reward-points label. */
230
+ readonly rewardPointsLabelSingular: string; /** Plural reward-points label. */
178
231
  readonly rewardPointsLabelPlural: string;
179
232
  };
233
+ /** Common identity fields for resources in a portal definition summary. */
180
234
  type PortalNamedEntitySummary = {
181
- readonly id: PortalEntityId | null;
182
- readonly definitionId: PortalEntityId | null;
183
- readonly name: string | null;
235
+ /** Persisted entity identifier, if available. */readonly id: PortalEntityId | null; /** Definition resource identifier, if available. */
236
+ readonly definitionId: PortalEntityId | null; /** Entity name, if available. */
237
+ readonly name: string | null; /** Entity route slug, if available. */
184
238
  readonly slug: string | null;
185
239
  };
240
+ /** Screen identity and component count returned with a portal summary. */
186
241
  type PortalScreenSummary = PortalNamedEntitySummary & {
187
- readonly componentCount: number;
242
+ /** Number of component nodes on the screen. */readonly componentCount: number;
188
243
  };
244
+ /** Navigation identity and aggregate counts returned with a portal summary. */
189
245
  type PortalNavigationSummary = {
190
- readonly id: PortalEntityId | null;
191
- readonly definitionId: PortalEntityId | null;
192
- readonly name: string | null;
193
- readonly navigationItemCount: number;
246
+ /** Persisted navigation identifier, if available. */readonly id: PortalEntityId | null; /** Definition resource identifier, if available. */
247
+ readonly definitionId: PortalEntityId | null; /** Navigation name, if available. */
248
+ readonly name: string | null; /** Number of navigation items. */
249
+ readonly navigationItemCount: number; /** Number of linked screens. */
194
250
  readonly screenCount: number;
195
251
  };
252
+ /** Counted, immutable collection used by portal summary responses. */
196
253
  type PortalSummaryCollection<Item> = {
197
- readonly count: number;
254
+ /** Total item count. */readonly count: number; /** Summary items. */
198
255
  readonly items: readonly Item[];
199
256
  };
257
+ /** Active profile, theme, and navigation summary for the current portal. */
200
258
  type PortalProfileSummary = {
201
- readonly name: string | null;
202
- readonly definitionId: PortalEntityId | null;
203
- readonly activeThemeId: string | null;
204
- readonly themes: PortalSummaryCollection<PortalNamedEntitySummary>;
205
- readonly navigation: PortalNavigationSummary | null;
259
+ /** Profile name, if available. */readonly name: string | null; /** Definition resource identifier, if available. */
260
+ readonly definitionId: PortalEntityId | null; /** Active theme identifier, if available. */
261
+ readonly activeThemeId: string | null; /** Themes available to the profile. */
262
+ readonly themes: PortalSummaryCollection<PortalNamedEntitySummary>; /** Primary navigation summary, if configured. */
263
+ readonly navigation: PortalNavigationSummary | null; /** Mobile navigation summary, if configured. */
206
264
  readonly mobileNavigation: PortalNavigationSummary | null;
207
265
  };
266
+ /** Published portal definition, profile, and screen summary. */
208
267
  type PortalAppSummary = {
209
- readonly definitionId: PortalEntityId | null;
210
- readonly publishedVersion: number | null;
211
- readonly profile: PortalProfileSummary | null;
268
+ /** Current definition identifier, if available. */readonly definitionId: PortalEntityId | null; /** Active immutable version number, if published. */
269
+ readonly publishedVersion: number | null; /** Active profile summary, if configured. */
270
+ readonly profile: PortalProfileSummary | null; /** Screen summaries. */
212
271
  readonly screens: PortalSummaryCollection<PortalScreenSummary>;
213
272
  };
273
+ /** One resolved navigation item, including its nested children. */
214
274
  type PortalNavigationItem = {
215
- readonly id: number | null;
216
- readonly slug: string | null;
217
- readonly label: string;
218
- readonly icon: string | null;
219
- readonly section: string | null;
220
- readonly screenId: number | null;
221
- readonly position: number | null;
222
- readonly parentId: number | null;
223
- readonly source: "user" | "system" | "code" | null;
275
+ /** Persisted navigation-item identifier, if available. */readonly id: number | null; /** Destination slug, if the item targets a screen. */
276
+ readonly slug: string | null; /** Visible navigation label. */
277
+ readonly label: string; /** Icon identifier, if configured. */
278
+ readonly icon: string | null; /** Navigation section, if configured. */
279
+ readonly section: string | null; /** Target screen identifier, if configured. */
280
+ readonly screenId: number | null; /** Sort position, if available. */
281
+ readonly position: number | null; /** Parent item identifier, if nested. */
282
+ readonly parentId: number | null; /** Origin of the navigation item. */
283
+ readonly source: "user" | "system" | "code" | null; /** Nested child items. */
224
284
  readonly children: readonly PortalNavigationItem[];
225
285
  };
286
+ /** Current route and resolved navigation tree for the mounted portal. */
226
287
  type PortalNavigationState = {
227
- readonly currentSlug: string;
228
- readonly previousSlug: string | null;
229
- readonly basePath: string;
288
+ /** Slug of the current route. */readonly currentSlug: string; /** Slug of the previous route, if known. */
289
+ readonly previousSlug: string | null; /** Portal base path used to build hrefs. */
290
+ readonly basePath: string; /** Resolved navigation tree. */
230
291
  readonly navItems: readonly PortalNavigationItem[];
231
292
  };
293
+ /** Route target accepted by {@link buildPortalHref} and {@link navigateTo}. */
232
294
  type PortalNavigationTarget = string | {
233
- readonly slug: string;
295
+ /** Portal screen slug. */readonly slug: string;
234
296
  } | {
235
- readonly href: string;
297
+ /** Portal-relative or allowed absolute href. */readonly href: string;
236
298
  };
299
+ /** Whether fullscreen is supported and active for the current widget mount. */
237
300
  type FullscreenState = {
238
- readonly fullscreen: boolean;
301
+ /** Whether the widget is currently fullscreen. */readonly fullscreen: boolean; /** Whether the current host can enter fullscreen. */
239
302
  readonly available: boolean;
240
303
  };
304
+ /**
305
+ * Gets the signed-in account from the mounted Portal host.
306
+ *
307
+ * @returns The current {@link UserAccount}.
308
+ * @throws {@link PortalFunctionError} when the function is undeclared, unavailable, or fails in the host.
309
+ * @remarks Declare `getUserAccount` in the widget's `uses` list. Call it only after the widget mounts.
310
+ * @example const account = await getUserAccount();
311
+ */
241
312
  declare const getUserAccount: PortalFunction<UserAccount>;
313
+ /**
314
+ * Gets the store that owns the mounted Portal.
315
+ * @returns The current {@link PortalStore}.
316
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
317
+ * @remarks Declare `getStore` in `uses` and call it only after mount.
318
+ * @example const store = await getStore();
319
+ */
242
320
  declare const getStore: PortalFunction<PortalStore>;
321
+ /**
322
+ * Gets the current Portal Definition summary.
323
+ * @returns The current {@link PortalAppSummary}.
324
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
325
+ * @remarks Declare `getPortalApp` in `uses` and call it only after mount.
326
+ * @example const app = await getPortalApp();
327
+ */
243
328
  declare const getPortalApp: PortalFunction<PortalAppSummary>;
329
+ /**
330
+ * Gets the active Portal profile summary.
331
+ * @returns The active {@link PortalProfileSummary}.
332
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
333
+ * @remarks Declare `getPortalProfile` in `uses` and call it only after mount.
334
+ * @example const profile = await getPortalProfile();
335
+ */
244
336
  declare const getPortalProfile: PortalFunction<PortalProfileSummary>;
337
+ /**
338
+ * Gets the current route and resolved navigation tree.
339
+ * @returns The current {@link PortalNavigationState}.
340
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
341
+ * @remarks Declare `getNavigationState` in `uses` and call it only after mount.
342
+ * @example const navigation = await getNavigationState();
343
+ */
245
344
  declare const getNavigationState: PortalFunction<PortalNavigationState>;
345
+ /**
346
+ * Converts a Portal navigation target to an href for the current mount.
347
+ * @param target - Screen slug, href, or shorthand string target.
348
+ * @returns A host-approved href.
349
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
350
+ * @remarks Declare `buildPortalHref` in `uses` and call it only after mount.
351
+ * @example const href = await buildPortalHref({ slug: "shop" });
352
+ */
246
353
  declare const buildPortalHref: PortalFunction<string, PortalNavigationTarget>;
354
+ /**
355
+ * Navigates the mounted Portal to a target.
356
+ * @param target - Screen slug, href, or shorthand string target.
357
+ * @returns A promise that resolves after the host accepts the navigation.
358
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
359
+ * @remarks Declare `navigateTo` in `uses`. It changes host navigation and requires a mounted widget.
360
+ * @example await navigateTo({ slug: "shop" });
361
+ */
247
362
  declare const navigateTo: PortalFunction<void, PortalNavigationTarget>;
363
+ /**
364
+ * Gets fullscreen availability and state for the current widget mount.
365
+ * @returns The current {@link FullscreenState}.
366
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
367
+ * @remarks Declare `getFullscreenState` in `uses` and call it only after mount.
368
+ * @example const state = await getFullscreenState();
369
+ */
248
370
  declare const getFullscreenState: PortalFunction<FullscreenState>;
371
+ /**
372
+ * Requests fullscreen for the current widget mount.
373
+ * @returns A promise that resolves when the host completes the request.
374
+ * @throws {@link PortalFunctionError} when undeclared, unsupported, unavailable, or rejected by the host.
375
+ * @remarks Declare `requestFullscreen` in `uses`. Browser policy can require a user gesture.
376
+ * @example await requestFullscreen();
377
+ */
249
378
  declare const requestFullscreen: PortalFunction<void>;
379
+ /**
380
+ * Exits fullscreen for the current widget mount.
381
+ * @returns A promise that resolves when the host completes the request.
382
+ * @throws {@link PortalFunctionError} when undeclared, unsupported, unavailable, or rejected by the host.
383
+ * @remarks Declare `exitFullscreen` in `uses` and call it only after mount.
384
+ * @example await exitFullscreen();
385
+ */
250
386
  declare const exitFullscreen: PortalFunction<void>;
251
- /** Registers one exact absolute HTTP(S) URL for use by an anchor in this mount. */
387
+ /**
388
+ * Allows one exact absolute HTTP(S) URL for an anchor in the current mount.
389
+ * Declare this function in `uses` and call it before rendering or changing the link.
390
+ *
391
+ * @param url - Exact absolute URL to allow.
392
+ * @returns The allowed URL for assignment to the anchor.
393
+ * @throws {@link PortalFunctionError} for invalid or disallowed URLs and host failures.
394
+ * @remarks Declare `allowAnchorUrl` in `uses`. Approval is scoped to the current mount and exact URL.
395
+ *
396
+ * @example
397
+ * ```ts
398
+ * const href = await allowAnchorUrl("https://example.com/help");
399
+ * ```
400
+ */
252
401
  declare const allowAnchorUrl: PortalFunction<string, string>;
253
402
  //#endregion
254
403
  //#region src/widgets/remote/contract/capabilities/read.d.ts
404
+ /** Cursor pagination accepted by Portal list functions. */
255
405
  type PortalPageInput = {
256
- readonly cursor?: string;
406
+ /** Opaque cursor returned as {@link PortalPage.nextCursor} by the previous call. */readonly cursor?: string; /** Maximum number of items to request. The host can enforce a smaller limit. */
257
407
  readonly limit?: number;
258
408
  };
409
+ /** One page of Portal resources. */
259
410
  type PortalPage<Item> = {
260
- readonly items: readonly Item[];
411
+ /** Resources in this page. */readonly items: readonly Item[]; /** Opaque cursor for the next page, or `null` when this is the last page. */
261
412
  readonly nextCursor: string | null;
262
413
  };
414
+ /** Country and state data available in the current Portal. */
263
415
  type PortalCountry = {
264
- readonly code: string;
265
- readonly name: string;
266
- readonly currencyCode: string;
416
+ /** ISO country code. */readonly code: string; /** Localized country name. */
417
+ readonly name: string; /** ISO currency code used by the country. */
418
+ readonly currencyCode: string; /** States or other first-level administrative areas in the country. */
267
419
  readonly states: readonly {
268
- readonly code: string;
420
+ /** State or administrative-area code. */readonly code: string; /** Localized state or administrative-area name. */
269
421
  readonly name: string;
270
422
  }[];
271
423
  };
424
+ /** Filters and pagination for {@link listCountries}. */
272
425
  type ListCountriesInput = PortalPageInput & {
273
- readonly languageIso?: string;
426
+ /** ISO language code used to localize returned names. */readonly languageIso?: string;
274
427
  };
428
+ /** Language available in the current Portal. */
275
429
  type PortalLanguage = {
276
- readonly code: string;
430
+ /** ISO language code. */readonly code: string; /** Display name of the language. */
277
431
  readonly name: string;
278
432
  };
433
+ /** Country and language used by {@link getAddressFields}. */
279
434
  type GetAddressFieldsInput = {
280
- readonly countryCode: string;
435
+ /** ISO code of the country whose address form is requested. */readonly countryCode: string; /** ISO language code used to localize field labels. */
281
436
  readonly languageIso?: string;
282
437
  };
438
+ /** Localized address-field configuration for a country. */
283
439
  type PortalAddressFields = {
284
- readonly countryCode: string;
285
- readonly countryName: string;
440
+ /** ISO code of the requested country. */readonly countryCode: string; /** Localized country name. */
441
+ readonly countryName: string; /** Address fields in display order. */
286
442
  readonly fields: readonly {
287
- readonly field: string;
288
- readonly label: string;
443
+ /** Stable address-field key. */readonly field: string; /** Localized label for the field. */
444
+ readonly label: string; /** Whether the address requires the field. */
289
445
  readonly required: boolean;
290
446
  }[];
291
447
  };
448
+ /** Image metadata returned with a product or enrollment pack. */
292
449
  type PortalImage = {
293
- readonly url: string | null;
450
+ /** Absolute image URL, or `null` when no image URL is available. */readonly url: string | null; /** Alternative text, or `null` when none is available. */
294
451
  readonly alt: string | null;
295
452
  };
453
+ /** Purchasable variant of a Portal product. */
296
454
  type PortalProductVariant = {
297
- readonly id: number | null;
298
- readonly available: boolean | null;
299
- readonly currency: string | null;
300
- readonly images: readonly PortalImage[];
301
- readonly isMaster: boolean | null;
302
- readonly position: number | null;
303
- readonly price: string | null;
304
- readonly sku: string | null;
305
- readonly title: string | null;
306
- readonly wholesalePrice: string | null;
307
- readonly cv: string | null;
455
+ /** Variant identifier, or `null` when the source has no identifier. */readonly id: number | null; /** Whether the variant can currently be purchased. */
456
+ readonly available: boolean | null; /** ISO currency code for monetary fields. */
457
+ readonly currency: string | null; /** Variant images. */
458
+ readonly images: readonly PortalImage[]; /** Whether this is the product's master variant. */
459
+ readonly isMaster: boolean | null; /** Variant display position. */
460
+ readonly position: number | null; /** Retail price serialized as a decimal string. */
461
+ readonly price: string | null; /** Stock-keeping unit. */
462
+ readonly sku: string | null; /** Variant display title. */
463
+ readonly title: string | null; /** Wholesale price serialized as a decimal string. */
464
+ readonly wholesalePrice: string | null; /** Commission volume serialized as a decimal string. */
465
+ readonly cv: string | null; /** Qualifying volume serialized as a decimal string. */
308
466
  readonly qv: string | null;
309
467
  };
468
+ /** Product data available to a widget. */
310
469
  type PortalProduct = {
311
- readonly id: number | null;
312
- readonly name: string | null;
313
- readonly slug: string | null;
314
- readonly description: string | null;
315
- readonly price: string | null;
316
- readonly wholesalePrice: string | null;
317
- readonly currency: string | null;
318
- readonly status: string | null;
319
- readonly images: readonly PortalImage[];
320
- readonly variants: readonly PortalProductVariant[];
321
- readonly mediaCount: number | null;
322
- readonly createdAt: string | null;
323
- readonly isBundle: boolean;
470
+ /** Product identifier, or `null` when the source has no identifier. */readonly id: number | null; /** Product display name. */
471
+ readonly name: string | null; /** URL-safe product slug. */
472
+ readonly slug: string | null; /** Product description. */
473
+ readonly description: string | null; /** Retail price serialized as a decimal string. */
474
+ readonly price: string | null; /** Wholesale price serialized as a decimal string. */
475
+ readonly wholesalePrice: string | null; /** ISO currency code for monetary fields. */
476
+ readonly currency: string | null; /** Product publication or availability status. */
477
+ readonly status: string | null; /** Product images. */
478
+ readonly images: readonly PortalImage[]; /** Purchasable product variants. */
479
+ readonly variants: readonly PortalProductVariant[]; /** Number of associated media items. */
480
+ readonly mediaCount: number | null; /** ISO 8601 creation timestamp. */
481
+ readonly createdAt: string | null; /** Whether the product represents a bundle. */
482
+ readonly isBundle: boolean; /** Minimum and maximum one-time prices as decimal strings. */
324
483
  readonly priceRange: {
325
- readonly min: string;
484
+ /** Minimum one-time price. */readonly min: string; /** Maximum one-time price. */
326
485
  readonly max: string;
327
- } | null;
486
+ } | null; /** Minimum and maximum subscription prices as decimal strings. */
328
487
  readonly subscriptionPriceRange: {
329
- readonly min: string;
488
+ /** Minimum subscription price. */readonly min: string; /** Maximum subscription price. */
330
489
  readonly max: string;
331
- } | null;
332
- readonly shopLink: string | null;
333
- readonly hasCustomizations: boolean | null;
334
- readonly cv: string | null;
490
+ } | null; /** Absolute URL of the product in the shop. */
491
+ readonly shopLink: string | null; /** Whether purchasing the product requires customization choices. */
492
+ readonly hasCustomizations: boolean | null; /** Commission volume serialized as a decimal string. */
493
+ readonly cv: string | null; /** Qualifying volume serialized as a decimal string. */
335
494
  readonly qv: string | null;
336
495
  };
496
+ /** Pagination and ordering for {@link listProducts}. */
337
497
  type ListProductsInput = PortalPageInput & {
338
- readonly sort?: "title_asc" | "title_desc" | "price_asc" | "price_desc" | "created_at_asc" | "created_at_desc";
498
+ /** Product ordering. */readonly sort?: "title_asc" | "title_desc" | "price_asc" | "price_desc" | "created_at_asc" | "created_at_desc";
339
499
  };
500
+ /** Product identifier accepted by {@link getProduct}. */
340
501
  type GetProductInput = {
341
- readonly id: string | number;
502
+ /** Product identifier. */readonly id: string | number;
342
503
  };
504
+ /** Query and pagination for {@link searchProducts}. */
343
505
  type SearchProductsInput = PortalPageInput & {
344
- readonly query: string;
506
+ /** Text to match against searchable product data. */readonly query: string;
345
507
  };
508
+ /** Media associated with a product. */
346
509
  type PortalProductMedia = {
347
- readonly id: number | null;
348
- readonly title: string | null;
349
- readonly mediaType: string | null;
510
+ /** Media identifier. */readonly id: number | null; /** Media display title. */
511
+ readonly title: string | null; /** Media format or type. */
512
+ readonly mediaType: string | null; /** Absolute media URL. */
350
513
  readonly url: string | null;
351
514
  };
515
+ /** Product identifier accepted by {@link listProductMedia}. */
352
516
  type ListProductMediaInput = {
353
- readonly productId: string | number;
517
+ /** Product whose media is requested. */readonly productId: string | number;
354
518
  };
519
+ /** Supported aggregation windows for product and content metrics. */
355
520
  type PortalMetricsPeriod = "7d" | "30d" | "90d" | "1y" | "all";
521
+ /** Metric selection for {@link listProductMetrics}. */
356
522
  type ListProductMetricsInput = {
357
- readonly kind: "visits" | "shareVisits";
358
- readonly period?: PortalMetricsPeriod;
523
+ /** Whether to return direct visits or visits attributed to shares. */readonly kind: "visits" | "shareVisits"; /** Aggregation window. */
524
+ readonly period?: PortalMetricsPeriod; /** Maximum number of metric rows to return. */
359
525
  readonly limit?: number;
360
526
  };
527
+ /** Aggregated metric value for a Portal resource. */
361
528
  type PortalMetric = {
362
- readonly id: number | null;
529
+ /** Resource identifier, or `null` for an aggregate without one resource. */readonly id: number | null; /** Metric total for the requested period. */
363
530
  readonly total: number;
364
531
  };
532
+ /** Calendar event visible to the signed-in Portal user. */
365
533
  type PortalCalendarEvent = {
366
- readonly id: number;
367
- readonly title: string;
368
- readonly description: string | null;
369
- readonly color: string | null;
370
- readonly url: string | null;
371
- readonly start: string;
372
- readonly end: string;
373
- readonly timeZone: string | null;
374
- readonly status: string | null;
375
- readonly imageUrl: string | null;
376
- readonly venue: string | null;
377
- readonly countries: readonly string[];
534
+ /** Event identifier. */readonly id: number; /** Event title. */
535
+ readonly title: string; /** Event description. */
536
+ readonly description: string | null; /** Event color value supplied by the host. */
537
+ readonly color: string | null; /** Absolute event URL. */
538
+ readonly url: string | null; /** ISO 8601 event start. */
539
+ readonly start: string; /** ISO 8601 event end. */
540
+ readonly end: string; /** IANA time-zone name. */
541
+ readonly timeZone: string | null; /** Event status. */
542
+ readonly status: string | null; /** Absolute event image URL. */
543
+ readonly imageUrl: string | null; /** Event venue. */
544
+ readonly venue: string | null; /** ISO country codes where the event is available. */
545
+ readonly countries: readonly string[]; /** Whether the event spans a whole day rather than explicit times. */
378
546
  readonly isAllDay: boolean;
379
547
  };
548
+ /** Call-to-action configuration attached to content media. */
380
549
  type PortalMediaCta = {
381
- readonly enabled: boolean;
382
- readonly type: "link" | "cart" | "email" | "phone" | null;
383
- readonly buttonText: string | null;
384
- readonly buttonColor: string | null;
385
- readonly buttonDescription: string | null;
550
+ /** Whether the call to action is enabled. */readonly enabled: boolean; /** Action behavior, or `null` when no behavior is configured. */
551
+ readonly type: "link" | "cart" | "email" | "phone" | null; /** Text shown on the action button. */
552
+ readonly buttonText: string | null; /** Button color value supplied by the host. */
553
+ readonly buttonColor: string | null; /** Accessible or supporting description of the action. */
554
+ readonly buttonDescription: string | null; /** URL or URI used by the action. */
386
555
  readonly actionUrl: string | null;
387
556
  };
557
+ /** Content-library media item available to a widget. */
388
558
  type PortalMedia = {
389
- readonly id: number;
390
- readonly title: string;
391
- readonly description: string | null;
392
- readonly contentFormat: string | null;
393
- readonly status: string | null;
394
- readonly url: string | null;
395
- readonly thumbnailUrl: string | null;
396
- readonly cta: PortalMediaCta | null;
559
+ /** Media identifier. */readonly id: number; /** Media title. */
560
+ readonly title: string; /** Media description. */
561
+ readonly description: string | null; /** Media format supplied by the content library. */
562
+ readonly contentFormat: string | null; /** Publication or processing status. */
563
+ readonly status: string | null; /** Absolute content URL. */
564
+ readonly url: string | null; /** Absolute thumbnail URL. */
565
+ readonly thumbnailUrl: string | null; /** Configured call to action. */
566
+ readonly cta: PortalMediaCta | null; /** Search-engine metadata for the media item. */
397
567
  readonly seo: {
398
- readonly title: string | null;
399
- readonly description: string | null;
400
- readonly imageUrl: string | null;
568
+ /** Search result title. */readonly title: string | null; /** Search result description. */
569
+ readonly description: string | null; /** Absolute social or search preview image URL. */
570
+ readonly imageUrl: string | null; /** Whether crawlers should be asked not to index the item. */
401
571
  readonly blockCrawler: boolean;
402
- } | null;
403
- readonly createdAt: string;
572
+ } | null; /** ISO 8601 creation timestamp. */
573
+ readonly createdAt: string; /** ISO 8601 last-update timestamp. */
404
574
  readonly updatedAt: string;
405
575
  };
576
+ /** Filters, localization, ordering, and pagination for {@link listContentMedia}. */
406
577
  type ListContentMediaInput = PortalPageInput & {
407
- readonly title?: string;
408
- readonly ownership?: "all" | "mine" | "company";
409
- readonly contentFormat?: "video" | "image" | "pdf" | "ppt";
410
- readonly sort?: "title_asc" | "title_desc";
578
+ /** Text to match against media titles. */readonly title?: string; /** Ownership scope for the returned media. */
579
+ readonly ownership?: "all" | "mine" | "company"; /** Media format to return. */
580
+ readonly contentFormat?: "video" | "image" | "pdf" | "ppt"; /** Media ordering. */
581
+ readonly sort?: "title_asc" | "title_desc"; /** ISO language code for localized content. */
411
582
  readonly languageIso?: string;
412
583
  };
584
+ /** Media identifier and localization for {@link getContentMedia}. */
413
585
  type GetContentMediaInput = {
414
- readonly id: number;
586
+ /** Content-media identifier. */readonly id: number; /** ISO language code for localized content. */
415
587
  readonly languageIso?: string;
416
588
  };
589
+ /** Content playlist available to a widget. */
417
590
  type PortalPlaylist = {
418
- readonly id: number;
419
- readonly title: string;
420
- readonly description: string | null;
421
- readonly itemsCount: number;
422
- readonly isFavorited: boolean;
423
- readonly imageUrl: string | null;
424
- readonly createdAt: string;
591
+ /** Playlist identifier. */readonly id: number; /** Playlist title. */
592
+ readonly title: string; /** Playlist description. */
593
+ readonly description: string | null; /** Number of items in the playlist. */
594
+ readonly itemsCount: number; /** Whether the signed-in user has favorited the playlist. */
595
+ readonly isFavorited: boolean; /** Absolute playlist image URL. */
596
+ readonly imageUrl: string | null; /** ISO 8601 creation timestamp. */
597
+ readonly createdAt: string; /** ISO 8601 last-update timestamp. */
425
598
  readonly updatedAt: string;
426
599
  };
600
+ /** Filters, ordering, and pagination for {@link listPlaylists}. */
427
601
  type ListPlaylistsInput = PortalPageInput & {
428
- readonly title?: string;
429
- readonly ownership?: "all" | "mine" | "company";
602
+ /** Text to match against playlist titles. */readonly title?: string; /** Ownership scope for the returned playlists. */
603
+ readonly ownership?: "all" | "mine" | "company"; /** Playlist ordering. */
430
604
  readonly sort?: "title_asc" | "title_desc" | "created_at_asc" | "created_at_desc";
431
605
  };
606
+ /** Playlist identifier accepted by {@link getPlaylist}. */
432
607
  type GetPlaylistInput = {
433
- readonly id: number;
608
+ /** Playlist identifier. */readonly id: number;
434
609
  };
610
+ /** Product summary embedded in a playlist item. */
435
611
  type PortalPlaylistProduct = {
436
- readonly id: number;
437
- readonly name: string;
438
- readonly slug: string | null;
439
- readonly description: string | null;
440
- readonly price: string | null;
441
- readonly wholesalePrice: string | null;
442
- readonly currency: string | null;
443
- readonly status: string | null;
444
- readonly images: readonly PortalImage[];
445
- readonly mediaCount: number | null;
612
+ /** Product identifier. */readonly id: number; /** Product display name. */
613
+ readonly name: string; /** URL-safe product slug. */
614
+ readonly slug: string | null; /** Product description. */
615
+ readonly description: string | null; /** Retail price serialized as a decimal string. */
616
+ readonly price: string | null; /** Wholesale price serialized as a decimal string. */
617
+ readonly wholesalePrice: string | null; /** ISO currency code for monetary fields. */
618
+ readonly currency: string | null; /** Product publication or availability status. */
619
+ readonly status: string | null; /** Product images. */
620
+ readonly images: readonly PortalImage[]; /** Number of associated media items. */
621
+ readonly mediaCount: number | null; /** ISO 8601 creation timestamp. */
446
622
  readonly createdAt: string | null;
447
623
  };
624
+ /**
625
+ * Content embedded in a playlist item.
626
+ *
627
+ * Narrow on `type` before accessing fields specific to media, pages, products,
628
+ * or enrollment packs.
629
+ */
448
630
  type PortalPlaylistItemContent = {
449
- readonly type: "media";
450
- readonly id: number;
451
- readonly title: string;
452
- readonly description: string | null;
453
- readonly url: string | null;
631
+ /** Identifies content-library media. */readonly type: "media"; /** Media identifier. */
632
+ readonly id: number; /** Media title. */
633
+ readonly title: string; /** Media description. */
634
+ readonly description: string | null; /** Absolute media URL. */
635
+ readonly url: string | null; /** Absolute thumbnail URL. */
454
636
  readonly thumbnailUrl: string | null;
455
637
  } | {
456
- readonly type: "page";
457
- readonly id: number;
458
- readonly title: string | null;
459
- readonly slug: string | null;
460
- readonly status: "published" | "unpublished";
461
- readonly description: string | null;
638
+ /** Identifies a content page. */readonly type: "page"; /** Page identifier. */
639
+ readonly id: number; /** Page title. */
640
+ readonly title: string | null; /** URL-safe page slug. */
641
+ readonly slug: string | null; /** Page publication status. */
642
+ readonly status: "published" | "unpublished"; /** Page description. */
643
+ readonly description: string | null; /** Absolute page image URL. */
462
644
  readonly imageUrl: string | null;
463
645
  } | {
464
- readonly type: "product";
646
+ /** Identifies a product. */readonly type: "product"; /** Embedded product summary. */
465
647
  readonly product: PortalPlaylistProduct;
466
648
  } | {
467
- readonly type: "enrollmentPack";
468
- readonly id: number;
469
- readonly title: string;
470
- readonly slug: string | null;
471
- readonly description: string | null;
472
- readonly url: string | null;
649
+ /** Identifies an enrollment pack. */readonly type: "enrollmentPack"; /** Enrollment-pack identifier. */
650
+ readonly id: number; /** Enrollment-pack title. */
651
+ readonly title: string; /** URL-safe enrollment-pack slug. */
652
+ readonly slug: string | null; /** Enrollment-pack description. */
653
+ readonly description: string | null; /** Absolute enrollment-pack URL. */
654
+ readonly url: string | null; /** Enrollment-pack images. */
473
655
  readonly images: readonly PortalImage[];
474
656
  };
657
+ /** One positioned resource in a content playlist. */
475
658
  type PortalPlaylistItem = {
476
- readonly id: number;
477
- readonly contentType: "media" | "page" | "product" | "enrollmentPack";
478
- readonly contentId: number;
479
- readonly position: number | null;
480
- readonly createdAt: string;
659
+ /** Playlist-item identifier. */readonly id: number; /** Kind of resource referenced by the item. */
660
+ readonly contentType: "media" | "page" | "product" | "enrollmentPack"; /** Identifier of the referenced resource. */
661
+ readonly contentId: number; /** Display position within the playlist. */
662
+ readonly position: number | null; /** ISO 8601 creation timestamp. */
663
+ readonly createdAt: string; /** Embedded resource data. Narrow the {@link PortalPlaylistItemContent} value on its `type` field. */
481
664
  readonly content: PortalPlaylistItemContent;
482
665
  };
666
+ /** Playlist, localization, and pagination for {@link listPlaylistItems}. */
483
667
  type ListPlaylistItemsInput = PortalPageInput & {
484
- readonly playlistId: number;
668
+ /** Playlist whose items are requested. */readonly playlistId: number; /** ISO language code for localized item content. */
485
669
  readonly languageIso?: string;
486
670
  };
671
+ /** Content-page summary available to a widget. */
487
672
  type PortalPageContent = {
488
- readonly id: number;
489
- readonly title: string | null;
490
- readonly slug: string | null;
491
- readonly source: "code" | "builder" | null;
492
- readonly status: "published" | "unpublished";
493
- readonly description: string | null;
494
- readonly imageUrl: string | null;
673
+ /** Page identifier. */readonly id: number; /** Page title. */
674
+ readonly title: string | null; /** URL-safe page slug. */
675
+ readonly slug: string | null; /** Whether code or the visual builder owns the page. */
676
+ readonly source: "code" | "builder" | null; /** Page publication status. */
677
+ readonly status: "published" | "unpublished"; /** Page description. */
678
+ readonly description: string | null; /** Absolute page image URL. */
679
+ readonly imageUrl: string | null; /** Countries where the page is available. */
495
680
  readonly countries: readonly PortalCountry[];
496
681
  };
682
+ /** Filters, localization, ordering, and pagination for {@link listPages}. */
497
683
  type ListPagesInput = PortalPageInput & {
498
- readonly title?: string;
499
- readonly sort?: "title_asc" | "title_desc";
684
+ /** Text to match against page titles. */readonly title?: string; /** Page ordering. */
685
+ readonly sort?: "title_asc" | "title_desc"; /** ISO language code for localized page content. */
500
686
  readonly languageIso?: string;
501
687
  };
688
+ /** Page identifier and localization for {@link getPage}. */
502
689
  type GetPageInput = {
503
- readonly id: number;
690
+ /** Page identifier. */readonly id: number; /** ISO language code for localized page content. */
504
691
  readonly languageIso?: string;
505
692
  };
693
+ /** Content page together with its share URL. */
506
694
  type PortalPageDetail = {
507
- readonly page: PortalPageContent;
695
+ /** Page data. */readonly page: PortalPageContent; /** Absolute URL for sharing the page. */
508
696
  readonly shareLink: string | null;
509
697
  };
698
+ /** Enrollment pack available to a widget. */
510
699
  type PortalEnrollmentPack = {
511
- readonly id: number;
512
- readonly title: string;
513
- readonly slug: string | null;
514
- readonly description: string | null;
515
- readonly url: string | null;
516
- readonly canonicalUrl: string | null;
700
+ /** Enrollment-pack identifier. */readonly id: number; /** Enrollment-pack title. */
701
+ readonly title: string; /** URL-safe enrollment-pack slug. */
702
+ readonly slug: string | null; /** Enrollment-pack description. */
703
+ readonly description: string | null; /** Absolute enrollment-pack URL. */
704
+ readonly url: string | null; /** Canonical absolute URL. */
705
+ readonly canonicalUrl: string | null; /** Enrollment-pack images. */
517
706
  readonly images: readonly PortalImage[];
518
707
  };
708
+ /** Enrollment-pack identifier accepted by {@link getEnrollmentPack}. */
519
709
  type GetEnrollmentPackInput = {
520
- readonly id: number;
710
+ /** Enrollment-pack identifier. */readonly id: number;
521
711
  };
522
712
  type ListContentMetricsBaseInput = {
523
- readonly kind: "visits" | "shareVisits";
524
- readonly period?: PortalMetricsPeriod;
713
+ /** Whether to return direct visits or visits attributed to shares. */readonly kind: "visits" | "shareVisits"; /** Aggregation window. */
714
+ readonly period?: PortalMetricsPeriod; /** Maximum number of metric rows to return. */
525
715
  readonly limit?: number;
526
716
  };
717
+ /** Resource and metric selection for {@link listContentMetrics}. */
527
718
  type ListContentMetricsInput = (ListContentMetricsBaseInput & {
528
- readonly resource: "media" | "pages";
719
+ /** Content resource to aggregate. */readonly resource: "media" | "pages"; /** ISO language code for localized media or pages. */
529
720
  readonly languageIso?: string;
530
721
  }) | (ListContentMetricsBaseInput & {
531
- readonly resource: "playlists";
722
+ /** Aggregate playlist metrics. Playlists do not accept `languageIso`. */readonly resource: "playlists";
532
723
  });
724
+ /** Share record created for a Portal resource. */
533
725
  type PortalShare = {
534
- readonly id: number;
535
- readonly url: string;
536
- readonly shareableType: "media" | "product" | "library" | "page";
537
- readonly shareableId: number;
726
+ /** Share identifier. */readonly id: number; /** Absolute share URL. */
727
+ readonly url: string; /** Kind of shared resource. */
728
+ readonly shareableType: "media" | "product" | "library" | "page"; /** Identifier of the shared resource. */
729
+ readonly shareableId: number; /** ISO 8601 creation timestamp. */
538
730
  readonly createdAt: string;
539
731
  };
732
+ /** Digital asset available from the Portal content library. */
540
733
  type PortalDamAsset = {
541
- readonly id: number;
542
- readonly code: string;
543
- readonly name: string;
544
- readonly description: string | null;
545
- readonly category: string | null;
546
- readonly defaultVariantUrl: string | null;
547
- readonly canonicalPath: string | null;
548
- readonly createdAt: string;
734
+ /** Asset identifier. */readonly id: number; /** Stable asset code used to query its paths. */
735
+ readonly code: string; /** Asset display name. */
736
+ readonly name: string; /** Asset description. */
737
+ readonly description: string | null; /** Asset category. */
738
+ readonly category: string | null; /** Absolute URL of the default asset variant. */
739
+ readonly defaultVariantUrl: string | null; /** Canonical path for the asset. */
740
+ readonly canonicalPath: string | null; /** ISO 8601 creation timestamp. */
741
+ readonly createdAt: string; /** ISO 8601 last-update timestamp. */
549
742
  readonly updatedAt: string | null;
550
743
  };
744
+ /** Asset and pagination selection for {@link listDamAssetPaths}. */
551
745
  type ListDamAssetPathsInput = PortalPageInput & {
552
- readonly assetCode: string;
746
+ /** Stable asset code from {@link PortalDamAsset.code}. */readonly assetCode: string;
553
747
  };
748
+ /** One accessible path for a digital asset. */
554
749
  type PortalDamAssetPath = {
555
- readonly id: number;
556
- readonly assetCode: string;
557
- readonly path: string;
750
+ /** Asset-path identifier. */readonly id: number; /** Stable code of the parent asset. */
751
+ readonly assetCode: string; /** Asset path supplied by the content library. */
752
+ readonly path: string; /** ISO 8601 creation timestamp. */
558
753
  readonly createdAt: string;
559
754
  };
755
+ /**
756
+ * Lists countries and their states in the requested language.
757
+ *
758
+ * Declare `listCountries` in the widget's `uses` list before calling it.
759
+ *
760
+ * @param input - Optional localization and cursor pagination.
761
+ * @returns A page of countries and a cursor for the next page.
762
+ * @throws {@link PortalFunctionError} when `listCountries` is not declared, the input is invalid, the localization capability is unavailable, or the host call or response fails.
763
+ *
764
+ * @example
765
+ * ```ts
766
+ * const page = await listCountries({ languageIso: "en", limit: 50 });
767
+ * ```
768
+ */
560
769
  declare const listCountries: PortalFunction<PortalPage<PortalCountry>, ListCountriesInput>;
770
+ /**
771
+ * Lists languages available in the current Portal.
772
+ *
773
+ * Declare `listLanguages` in the widget's `uses` list before calling it.
774
+ *
775
+ * @param input - Optional cursor pagination.
776
+ * @returns A page of available languages and a cursor for the next page.
777
+ * @throws {@link PortalFunctionError} when `listLanguages` is not declared, the input is invalid, the localization capability is unavailable, or the host call or response fails.
778
+ *
779
+ * @example
780
+ * ```ts
781
+ * const languages = await listLanguages({ limit: 20 });
782
+ * ```
783
+ */
561
784
  declare const listLanguages: PortalFunction<PortalPage<PortalLanguage>, PortalPageInput>;
785
+ /**
786
+ * Gets the localized address-field configuration for a country.
787
+ *
788
+ * Declare `getAddressFields` in the widget's `uses` list before calling it.
789
+ *
790
+ * @param input - Country code and optional label language.
791
+ * @returns The country and its ordered address fields.
792
+ * @throws {@link PortalFunctionError} when `getAddressFields` is not declared, the input is invalid, the localization capability is unavailable, or the host call or response fails.
793
+ *
794
+ * @example
795
+ * ```ts
796
+ * const address = await getAddressFields({ countryCode: "US", languageIso: "en" });
797
+ * ```
798
+ */
562
799
  declare const getAddressFields: PortalFunction<PortalAddressFields, GetAddressFieldsInput>;
800
+ /**
801
+ * Lists products available in the current Portal.
802
+ *
803
+ * Declare `listProducts` in the widget's `uses` list before calling it.
804
+ *
805
+ * @param input - Optional ordering and cursor pagination.
806
+ * @returns A page of products and a cursor for the next page.
807
+ * @throws {@link PortalFunctionError} when `listProducts` is not declared, the input is invalid, the products capability is unavailable, or the host call or response fails.
808
+ *
809
+ * @example
810
+ * ```ts
811
+ * const products = await listProducts({ sort: "title_asc", limit: 20 });
812
+ * ```
813
+ */
563
814
  declare const listProducts: PortalFunction<PortalPage<PortalProduct>, ListProductsInput>;
815
+ /**
816
+ * Gets one product by identifier.
817
+ *
818
+ * Declare `getProduct` in the widget's `uses` list before calling it.
819
+ *
820
+ * @param input - Product identifier.
821
+ * @returns The requested product.
822
+ * @throws {@link PortalFunctionError} when `getProduct` is not declared, the identifier is invalid or unavailable, the products capability is unavailable, or the host call or response fails.
823
+ *
824
+ * @example
825
+ * ```ts
826
+ * const product = await getProduct({ id: 42 });
827
+ * ```
828
+ */
564
829
  declare const getProduct: PortalFunction<PortalProduct, GetProductInput>;
830
+ /**
831
+ * Searches products using Portal product search.
832
+ *
833
+ * Declare `searchProducts` in the widget's `uses` list before calling it.
834
+ *
835
+ * @param input - Search text and optional cursor pagination.
836
+ * @returns A page of matching products and a cursor for the next page.
837
+ * @throws {@link PortalFunctionError} when `searchProducts` is not declared, the input is invalid, product search is unavailable, or the host call or response fails.
838
+ *
839
+ * @example
840
+ * ```ts
841
+ * const matches = await searchProducts({ query: "starter kit", limit: 10 });
842
+ * ```
843
+ */
565
844
  declare const searchProducts: PortalFunction<PortalPage<PortalProduct>, SearchProductsInput>;
845
+ /**
846
+ * Lists media associated with a product.
847
+ *
848
+ * Declare `listProductMedia` in the widget's `uses` list before calling it.
849
+ *
850
+ * @param input - Product identifier.
851
+ * @returns The product's media items.
852
+ * @throws {@link PortalFunctionError} when `listProductMedia` is not declared, the product identifier is invalid or unavailable, the products capability is unavailable, or the host call or response fails.
853
+ *
854
+ * @example
855
+ * ```ts
856
+ * const media = await listProductMedia({ productId: 42 });
857
+ * ```
858
+ */
566
859
  declare const listProductMedia: PortalFunction<readonly PortalProductMedia[], ListProductMediaInput>;
860
+ /**
861
+ * Lists visit metrics for products.
862
+ *
863
+ * Declare `listProductMetrics` in the widget's `uses` list before calling it.
864
+ *
865
+ * @param input - Metric kind, optional period, and optional result limit.
866
+ * @returns Metric totals grouped by product.
867
+ * @throws {@link PortalFunctionError} when `listProductMetrics` is not declared, the input is invalid, product metrics are unavailable, or the host call or response fails.
868
+ *
869
+ * @example
870
+ * ```ts
871
+ * const metrics = await listProductMetrics({ kind: "visits", period: "30d" });
872
+ * ```
873
+ */
567
874
  declare const listProductMetrics: PortalFunction<readonly PortalMetric[], ListProductMetricsInput>;
875
+ /**
876
+ * Lists calendar events visible to the signed-in Portal user.
877
+ *
878
+ * Declare `listCalendarEvents` in the widget's `uses` list before calling it.
879
+ *
880
+ * @returns All events supplied by the Portal calendar capability.
881
+ * @throws {@link PortalFunctionError} when `listCalendarEvents` is not declared, the calendar capability is unavailable, or the host call or response fails.
882
+ *
883
+ * @example
884
+ * ```ts
885
+ * const events = await listCalendarEvents();
886
+ * ```
887
+ */
568
888
  declare const listCalendarEvents: PortalFunction<readonly PortalCalendarEvent[]>;
889
+ /**
890
+ * Lists media from the Portal content library.
891
+ *
892
+ * Declare `listContentMedia` in the widget's `uses` list before calling it.
893
+ *
894
+ * @param input - Optional filters, localization, ordering, and cursor pagination.
895
+ * @returns A page of content media and a cursor for the next page.
896
+ * @throws {@link PortalFunctionError} when `listContentMedia` is not declared, the input is invalid, content access is unavailable, or the host call or response fails.
897
+ *
898
+ * @example
899
+ * ```ts
900
+ * const media = await listContentMedia({ contentFormat: "video", limit: 20 });
901
+ * ```
902
+ */
569
903
  declare const listContentMedia: PortalFunction<PortalPage<PortalMedia>, ListContentMediaInput>;
904
+ /**
905
+ * Gets one content-library media item by identifier.
906
+ *
907
+ * Declare `getContentMedia` in the widget's `uses` list before calling it.
908
+ *
909
+ * @param input - Media identifier and optional content language.
910
+ * @returns The requested media item.
911
+ * @throws {@link PortalFunctionError} when `getContentMedia` is not declared, the input is invalid or unavailable, content access is unavailable, or the host call or response fails.
912
+ *
913
+ * @example
914
+ * ```ts
915
+ * const media = await getContentMedia({ id: 42, languageIso: "en" });
916
+ * ```
917
+ */
570
918
  declare const getContentMedia: PortalFunction<PortalMedia, GetContentMediaInput>;
919
+ /**
920
+ * Lists playlists from the Portal content library.
921
+ *
922
+ * Declare `listPlaylists` in the widget's `uses` list before calling it.
923
+ *
924
+ * @param input - Optional filters, ordering, and cursor pagination.
925
+ * @returns A page of playlists and a cursor for the next page.
926
+ * @throws {@link PortalFunctionError} when `listPlaylists` is not declared, the input is invalid, content access is unavailable, or the host call or response fails.
927
+ *
928
+ * @example
929
+ * ```ts
930
+ * const playlists = await listPlaylists({ ownership: "company", limit: 20 });
931
+ * ```
932
+ */
571
933
  declare const listPlaylists: PortalFunction<PortalPage<PortalPlaylist>, ListPlaylistsInput>;
934
+ /**
935
+ * Gets one content playlist by identifier.
936
+ *
937
+ * Declare `getPlaylist` in the widget's `uses` list before calling it.
938
+ *
939
+ * @param input - Playlist identifier.
940
+ * @returns The requested playlist.
941
+ * @throws {@link PortalFunctionError} when `getPlaylist` is not declared, the identifier is invalid or unavailable, content access is unavailable, or the host call or response fails.
942
+ *
943
+ * @example
944
+ * ```ts
945
+ * const playlist = await getPlaylist({ id: 42 });
946
+ * ```
947
+ */
572
948
  declare const getPlaylist: PortalFunction<PortalPlaylist, GetPlaylistInput>;
949
+ /**
950
+ * Lists the ordered items in a content playlist.
951
+ *
952
+ * Declare `listPlaylistItems` in the widget's `uses` list before calling it.
953
+ *
954
+ * @param input - Playlist identifier, optional language, and cursor pagination.
955
+ * @returns A page of playlist items and a cursor for the next page.
956
+ * @throws {@link PortalFunctionError} when `listPlaylistItems` is not declared, the input is invalid, the playlist is unavailable, content access is unavailable, or the host call or response fails.
957
+ *
958
+ * @example
959
+ * ```ts
960
+ * const items = await listPlaylistItems({ playlistId: 42, limit: 20 });
961
+ * ```
962
+ */
573
963
  declare const listPlaylistItems: PortalFunction<PortalPage<PortalPlaylistItem>, ListPlaylistItemsInput>;
964
+ /**
965
+ * Lists content pages available to the signed-in Portal user.
966
+ *
967
+ * Declare `listPages` in the widget's `uses` list before calling it.
968
+ *
969
+ * @param input - Optional filters, localization, ordering, and cursor pagination.
970
+ * @returns A page of content-page summaries and a cursor for the next page.
971
+ * @throws {@link PortalFunctionError} when `listPages` is not declared, the input is invalid, content access is unavailable, or the host call or response fails.
972
+ *
973
+ * @example
974
+ * ```ts
975
+ * const pages = await listPages({ sort: "title_asc", limit: 20 });
976
+ * ```
977
+ */
574
978
  declare const listPages: PortalFunction<PortalPage<PortalPageContent>, ListPagesInput>;
979
+ /**
980
+ * Gets one content page and its share URL.
981
+ *
982
+ * Declare `getPage` in the widget's `uses` list before calling it.
983
+ *
984
+ * @param input - Page identifier and optional content language.
985
+ * @returns The requested page and its share URL.
986
+ * @throws {@link PortalFunctionError} when `getPage` is not declared, the input is invalid or unavailable, content access is unavailable, or the host call or response fails.
987
+ *
988
+ * @example
989
+ * ```ts
990
+ * const detail = await getPage({ id: 42, languageIso: "en" });
991
+ * ```
992
+ */
575
993
  declare const getPage: PortalFunction<PortalPageDetail, GetPageInput>;
994
+ /**
995
+ * Lists enrollment packs available in the Portal content library.
996
+ *
997
+ * Declare `listEnrollmentPacks` in the widget's `uses` list before calling it.
998
+ *
999
+ * @param input - Optional cursor pagination.
1000
+ * @returns A page of enrollment packs and a cursor for the next page.
1001
+ * @throws {@link PortalFunctionError} when `listEnrollmentPacks` is not declared, the input is invalid, content access is unavailable, or the host call or response fails.
1002
+ *
1003
+ * @example
1004
+ * ```ts
1005
+ * const packs = await listEnrollmentPacks({ limit: 20 });
1006
+ * ```
1007
+ */
576
1008
  declare const listEnrollmentPacks: PortalFunction<PortalPage<PortalEnrollmentPack>, PortalPageInput>;
1009
+ /**
1010
+ * Gets one enrollment pack by identifier.
1011
+ *
1012
+ * Declare `getEnrollmentPack` in the widget's `uses` list before calling it.
1013
+ *
1014
+ * @param input - Enrollment-pack identifier.
1015
+ * @returns The requested enrollment pack.
1016
+ * @throws {@link PortalFunctionError} when `getEnrollmentPack` is not declared, the identifier is invalid or unavailable, content access is unavailable, or the host call or response fails.
1017
+ *
1018
+ * @example
1019
+ * ```ts
1020
+ * const pack = await getEnrollmentPack({ id: 42 });
1021
+ * ```
1022
+ */
577
1023
  declare const getEnrollmentPack: PortalFunction<PortalEnrollmentPack, GetEnrollmentPackInput>;
1024
+ /**
1025
+ * Lists visit metrics for Portal content resources.
1026
+ *
1027
+ * Declare `listContentMetrics` in the widget's `uses` list before calling it.
1028
+ *
1029
+ * @param input - Resource, metric kind, and optional aggregation settings.
1030
+ * @returns Metric totals grouped by content resource.
1031
+ * @throws {@link PortalFunctionError} when `listContentMetrics` is not declared, the input is invalid, content metrics are unavailable, or the host call or response fails.
1032
+ *
1033
+ * @example
1034
+ * ```ts
1035
+ * const metrics = await listContentMetrics({
1036
+ * resource: "media",
1037
+ * kind: "shareVisits",
1038
+ * period: "30d",
1039
+ * });
1040
+ * ```
1041
+ */
578
1042
  declare const listContentMetrics: PortalFunction<readonly PortalMetric[], ListContentMetricsInput>;
1043
+ /**
1044
+ * Lists share records created by the signed-in Portal user.
1045
+ *
1046
+ * Declare `listShares` in the widget's `uses` list before calling it.
1047
+ *
1048
+ * @param input - Optional cursor pagination.
1049
+ * @returns A page of share records and a cursor for the next page.
1050
+ * @throws {@link PortalFunctionError} when `listShares` is not declared, the input is invalid, content access is unavailable, or the host call or response fails.
1051
+ *
1052
+ * @example
1053
+ * ```ts
1054
+ * const shares = await listShares({ limit: 20 });
1055
+ * ```
1056
+ */
579
1057
  declare const listShares: PortalFunction<PortalPage<PortalShare>, PortalPageInput>;
1058
+ /**
1059
+ * Lists digital assets available from the Portal content library.
1060
+ *
1061
+ * Declare `listDamAssets` in the widget's `uses` list before calling it.
1062
+ *
1063
+ * @param input - Optional cursor pagination.
1064
+ * @returns A page of digital assets and a cursor for the next page.
1065
+ * @throws {@link PortalFunctionError} when `listDamAssets` is not declared, the input is invalid, digital-asset access is unavailable, or the host call or response fails.
1066
+ *
1067
+ * @example
1068
+ * ```ts
1069
+ * const assets = await listDamAssets({ limit: 20 });
1070
+ * ```
1071
+ */
580
1072
  declare const listDamAssets: PortalFunction<PortalPage<PortalDamAsset>, PortalPageInput>;
1073
+ /**
1074
+ * Lists accessible paths for one digital asset.
1075
+ *
1076
+ * Declare `listDamAssetPaths` in the widget's `uses` list before calling it.
1077
+ *
1078
+ * @param input - Asset code and optional cursor pagination.
1079
+ * @returns A page of asset paths and a cursor for the next page.
1080
+ * @throws {@link PortalFunctionError} when `listDamAssetPaths` is not declared, the input or asset code is invalid, digital-asset access is unavailable, or the host call or response fails.
1081
+ *
1082
+ * @example
1083
+ * ```ts
1084
+ * const paths = await listDamAssetPaths({ assetCode: "hero-image", limit: 20 });
1085
+ * ```
1086
+ */
581
1087
  declare const listDamAssetPaths: PortalFunction<PortalPage<PortalDamAssetPath>, ListDamAssetPathsInput>;
582
1088
  //#endregion
583
1089
  //#region ../../shareables/core/src/favorites-api.d.ts
@@ -591,254 +1097,576 @@ declare const CONTENT_FAVORITE_TYPES: readonly ["Product", "Medium", "Promotion"
591
1097
  type ContentFavoriteType = (typeof CONTENT_FAVORITE_TYPES)[number];
592
1098
  //#endregion
593
1099
  //#region src/widgets/remote/contract/capabilities/content-mutation.d.ts
1100
+ /** Fields used to create a content-media record. */
594
1101
  type CreateContentMediaInput = {
595
- readonly title: string;
596
- readonly description?: string | null;
597
- readonly mediaType: string;
598
- readonly url?: string | null;
1102
+ /** Media title. */readonly title: string; /** Optional description. */
1103
+ readonly description?: string | null; /** Host media category. */
1104
+ readonly mediaType: string; /** Media URL, if already available. */
1105
+ readonly url?: string | null; /** Content file format. */
599
1106
  readonly contentFormat?: "image" | "video" | "pdf" | "ppt";
600
1107
  };
1108
+ /** Editable fields for a content-media record. */
601
1109
  type UpdateContentMediaInput = {
602
- readonly id: number;
603
- readonly title?: string;
604
- readonly description?: string | null;
605
- readonly status?: "active" | "draft";
606
- readonly url?: string | null;
607
- readonly contentFormat?: "image" | "video" | "pdf" | "ppt";
608
- readonly thumbnailUrl?: string | null;
609
- readonly languageIso?: string;
1110
+ /** Media identifier. */readonly id: number; /** Replacement title. */
1111
+ readonly title?: string; /** Replacement description. */
1112
+ readonly description?: string | null; /** Publication state. */
1113
+ readonly status?: "active" | "draft"; /** Replacement media URL. */
1114
+ readonly url?: string | null; /** Replacement file format. */
1115
+ readonly contentFormat?: "image" | "video" | "pdf" | "ppt"; /** Replacement thumbnail URL. */
1116
+ readonly thumbnailUrl?: string | null; /** ISO language code for localized content. */
1117
+ readonly languageIso?: string; /** Call-to-action settings. */
610
1118
  readonly cta?: {
611
- readonly enabled?: boolean;
612
- readonly type?: "link" | "cart";
613
- readonly buttonText?: string | null;
614
- readonly buttonColor?: string | null;
615
- readonly buttonDescription?: string | null;
1119
+ /** Whether the call to action is enabled. */readonly enabled?: boolean; /** Link or cart action. */
1120
+ readonly type?: "link" | "cart"; /** Button label. */
1121
+ readonly buttonText?: string | null; /** Button color value. */
1122
+ readonly buttonColor?: string | null; /** Accessible button description. */
1123
+ readonly buttonDescription?: string | null; /** Action destination URL. */
616
1124
  readonly actionUrl?: string | null;
617
- };
1125
+ }; /** Search-engine metadata. */
618
1126
  readonly seo?: {
619
- readonly title?: string | null;
620
- readonly description?: string | null;
621
- readonly imageUrl?: string | null;
1127
+ /** Search result title. */readonly title?: string | null; /** Search result description. */
1128
+ readonly description?: string | null; /** Search result image URL. */
1129
+ readonly imageUrl?: string | null; /** Whether crawlers should be blocked. */
622
1130
  readonly blockCrawler?: boolean;
623
1131
  };
624
1132
  };
1133
+ /** Identifies content media to delete. */
625
1134
  type DeleteContentMediaInput = {
626
- readonly id: number;
1135
+ /** Media identifier. */readonly id: number;
627
1136
  };
1137
+ /** Product associated with a content-media record. */
628
1138
  type PortalMediaProduct = {
629
- readonly id: number;
630
- readonly name: string | null;
631
- readonly slug: string | null;
632
- readonly imageUrl: string | null;
633
- readonly price: string | null;
634
- readonly currency: string | null;
1139
+ /** Product identifier. */readonly id: number; /** Product name, if available. */
1140
+ readonly name: string | null; /** Product slug, if available. */
1141
+ readonly slug: string | null; /** Product image URL, if available. */
1142
+ readonly imageUrl: string | null; /** Retail price, if available. */
1143
+ readonly price: string | null; /** Currency code, if available. */
1144
+ readonly currency: string | null; /** ISO association timestamp, if available. */
635
1145
  readonly addedAt: string | null;
636
1146
  };
1147
+ /** Pagination and localization for content-media products. */
637
1148
  type ListContentMediaProductsInput = PortalPageInput & {
638
- readonly mediaId: number;
1149
+ /** Media identifier. */readonly mediaId: number; /** ISO language code. */
639
1150
  readonly languageIso?: string;
640
1151
  };
1152
+ /** Identifies media and product records to associate. */
641
1153
  type AddContentMediaProductInput = {
642
- readonly mediaId: number;
1154
+ /** Media identifier. */readonly mediaId: number; /** Product identifier. */
643
1155
  readonly productId: number;
644
1156
  };
1157
+ /** Identifies a media-product association to remove. */
645
1158
  type RemoveContentMediaProductInput = AddContentMediaProductInput;
1159
+ /** Fields used to create a content playlist. */
646
1160
  type CreateContentPlaylistInput = {
647
- readonly title: string;
1161
+ /** Playlist title. */readonly title: string; /** Optional playlist description. */
648
1162
  readonly description?: string | null;
649
1163
  };
1164
+ /** Editable fields for a content playlist. */
650
1165
  type UpdateContentPlaylistInput = {
651
- readonly id: number;
652
- readonly title?: string;
1166
+ /** Playlist identifier. */readonly id: number; /** Replacement title. */
1167
+ readonly title?: string; /** Replacement description. */
653
1168
  readonly description?: string | null;
654
1169
  };
1170
+ /** Identifies a content playlist to delete. */
655
1171
  type DeleteContentPlaylistInput = {
656
- readonly id: number;
1172
+ /** Playlist identifier. */readonly id: number;
657
1173
  };
1174
+ /** Identifies content to insert into a playlist. */
658
1175
  type AddContentPlaylistItemInput = {
659
- readonly playlistId: number;
660
- readonly contentType: "media" | "page" | "product" | "enrollmentPack";
661
- readonly contentId: number;
1176
+ /** Playlist identifier. */readonly playlistId: number; /** Kind of content to add. */
1177
+ readonly contentType: "media" | "page" | "product" | "enrollmentPack"; /** Content resource identifier. */
1178
+ readonly contentId: number; /** Requested insertion position. */
662
1179
  readonly position?: number | null;
663
1180
  };
1181
+ /** Identifies a playlist item to remove. */
664
1182
  type RemoveContentPlaylistItemInput = {
665
- readonly playlistId: number;
1183
+ /** Playlist identifier. */readonly playlistId: number; /** Playlist-item identifier. */
666
1184
  readonly itemId: number;
667
1185
  };
1186
+ /** Defines playlist-item positions. */
668
1187
  type ReorderContentPlaylistItemsInput = {
669
- readonly playlistId: number;
1188
+ /** Playlist identifier. */readonly playlistId: number; /** Item identifiers paired with their desired order. */
670
1189
  readonly items: readonly {
671
- readonly id: number;
1190
+ /** Playlist-item identifier. */readonly id: number; /** Desired zero-based order. */
672
1191
  readonly order: number;
673
1192
  }[];
674
1193
  };
1194
+ /** Identifies content for which to create a share link. */
675
1195
  type CreateContentShareInput = {
676
- readonly shareableType: "media" | "product" | "library" | "page";
1196
+ /** Kind of resource to share. */readonly shareableType: "media" | "product" | "library" | "page"; /** Shared resource identifier. */
677
1197
  readonly shareableId: number;
678
1198
  };
1199
+ /** Identifies content whose favorite state should be toggled. */
679
1200
  type ToggleContentFavoriteInput = {
680
- readonly favoriteableType: ContentFavoriteType;
1201
+ /** Favorite resource category. */readonly favoriteableType: ContentFavoriteType; /** Favorite resource identifier. */
681
1202
  readonly favoriteableId: number;
682
1203
  };
1204
+ /** Current favorite state returned after a toggle. */
683
1205
  type PortalContentFavoriteState = {
684
- readonly favoriteableType: ContentFavoriteType;
685
- readonly favoriteableId: number;
1206
+ /** Favorite resource category. */readonly favoriteableType: ContentFavoriteType; /** Favorite resource identifier. */
1207
+ readonly favoriteableId: number; /** Resulting favorite state. */
686
1208
  readonly isFavorited: boolean;
687
1209
  };
1210
+ /** Fields used to create a digital-asset record. */
688
1211
  type CreateDamAssetInput = {
689
- readonly name: string;
1212
+ /** Asset name. */readonly name: string; /** Optional asset description. */
690
1213
  readonly description?: string | null;
691
1214
  };
1215
+ /** Fields used to add a path to a digital asset. */
692
1216
  type CreateDamAssetPathInput = {
693
- readonly assetCode: string;
1217
+ /** Stable asset code. */readonly assetCode: string; /** New asset path. */
694
1218
  readonly path: string;
695
1219
  };
1220
+ /** Identifies a digital asset for mutation. */
696
1221
  type MutateDamAssetInput = {
697
- readonly assetCode: string;
1222
+ /** Stable asset code. */readonly assetCode: string;
698
1223
  };
1224
+ /**
1225
+ * Creates content media in the Portal host.
1226
+ * @param input - Media metadata and optional source URL.
1227
+ * @returns The created {@link PortalMedia}.
1228
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1229
+ * @remarks Declare `createContentMedia` in `uses`. This mutates host content after mount.
1230
+ * @example const media = await createContentMedia({ title: "Guide", mediaType: "document" });
1231
+ */
699
1232
  declare const createContentMedia: PortalFunction<PortalMedia, CreateContentMediaInput>;
1233
+ /**
1234
+ * Updates an existing content-media record.
1235
+ * @param input - Media identifier and fields to replace.
1236
+ * @returns The updated {@link PortalMedia}.
1237
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1238
+ * @remarks Declare `updateContentMedia` in `uses`. This mutates host content after mount.
1239
+ * @example const media = await updateContentMedia({ id: 12, title: "Updated guide" });
1240
+ */
700
1241
  declare const updateContentMedia: PortalFunction<PortalMedia, UpdateContentMediaInput>;
1242
+ /**
1243
+ * Deletes a content-media record.
1244
+ * @param input - Media identifier to delete.
1245
+ * @returns `null` after deletion.
1246
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1247
+ * @remarks Declare `deleteContentMedia` in `uses`. This permanently mutates host content after mount.
1248
+ * @example await deleteContentMedia({ id: 12 });
1249
+ */
701
1250
  declare const deleteContentMedia: PortalFunction<null, DeleteContentMediaInput>;
1251
+ /**
1252
+ * Lists products associated with one content-media record.
1253
+ * @param input - Media identifier, pagination, and optional locale.
1254
+ * @returns A page of associated products.
1255
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1256
+ * @remarks Declare `listContentMediaProducts` in `uses` and call it only after mount.
1257
+ * @example const products = await listContentMediaProducts({ mediaId: 12, limit: 20 });
1258
+ */
702
1259
  declare const listContentMediaProducts: PortalFunction<PortalPage<PortalMediaProduct>, ListContentMediaProductsInput>;
1260
+ /**
1261
+ * Associates a product with content media.
1262
+ * @param input - Media and product identifiers.
1263
+ * @returns The created {@link PortalMediaProduct} association.
1264
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1265
+ * @remarks Declare `addContentMediaProduct` in `uses`. This mutates host content after mount.
1266
+ * @example const product = await addContentMediaProduct({ mediaId: 12, productId: 42 });
1267
+ */
703
1268
  declare const addContentMediaProduct: PortalFunction<PortalMediaProduct, AddContentMediaProductInput>;
1269
+ /**
1270
+ * Removes a product association from content media.
1271
+ * @param input - Media and product identifiers.
1272
+ * @returns `null` after removal.
1273
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1274
+ * @remarks Declare `removeContentMediaProduct` in `uses`. This mutates host content after mount.
1275
+ * @example await removeContentMediaProduct({ mediaId: 12, productId: 42 });
1276
+ */
704
1277
  declare const removeContentMediaProduct: PortalFunction<null, RemoveContentMediaProductInput>;
1278
+ /**
1279
+ * Creates a content playlist.
1280
+ * @param input - Playlist title and optional description.
1281
+ * @returns The created {@link PortalPlaylist}.
1282
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1283
+ * @remarks Declare `createContentPlaylist` in `uses`. This mutates host content after mount.
1284
+ * @example const playlist = await createContentPlaylist({ title: "Launch" });
1285
+ */
705
1286
  declare const createContentPlaylist: PortalFunction<PortalPlaylist, CreateContentPlaylistInput>;
1287
+ /**
1288
+ * Updates a content playlist.
1289
+ * @param input - Playlist identifier and fields to replace.
1290
+ * @returns The updated {@link PortalPlaylist}.
1291
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1292
+ * @remarks Declare `updateContentPlaylist` in `uses`. This mutates host content after mount.
1293
+ * @example const playlist = await updateContentPlaylist({ id: 5, title: "New launch" });
1294
+ */
706
1295
  declare const updateContentPlaylist: PortalFunction<PortalPlaylist, UpdateContentPlaylistInput>;
1296
+ /**
1297
+ * Deletes a content playlist.
1298
+ * @param input - Playlist identifier to delete.
1299
+ * @returns `null` after deletion.
1300
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1301
+ * @remarks Declare `deleteContentPlaylist` in `uses`. This permanently mutates host content after mount.
1302
+ * @example await deleteContentPlaylist({ id: 5 });
1303
+ */
707
1304
  declare const deleteContentPlaylist: PortalFunction<null, DeleteContentPlaylistInput>;
1305
+ /**
1306
+ * Adds a content resource to a playlist.
1307
+ * @param input - Playlist, resource kind, resource identifier, and optional position.
1308
+ * @returns The created {@link PortalPlaylistItem}.
1309
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1310
+ * @remarks Declare `addContentPlaylistItem` in `uses`. This mutates host content after mount.
1311
+ * @example const item = await addContentPlaylistItem({ playlistId: 5, contentType: "media", contentId: 12 });
1312
+ */
708
1313
  declare const addContentPlaylistItem: PortalFunction<PortalPlaylistItem, AddContentPlaylistItemInput>;
1314
+ /**
1315
+ * Removes an item from a content playlist.
1316
+ * @param input - Playlist and playlist-item identifiers.
1317
+ * @returns `null` after removal.
1318
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1319
+ * @remarks Declare `removeContentPlaylistItem` in `uses`. This mutates host content after mount.
1320
+ * @example await removeContentPlaylistItem({ playlistId: 5, itemId: 8 });
1321
+ */
709
1322
  declare const removeContentPlaylistItem: PortalFunction<null, RemoveContentPlaylistItemInput>;
1323
+ /**
1324
+ * Replaces the item order of a content playlist.
1325
+ * @param input - Playlist identifier and item-order pairs.
1326
+ * @returns `null` after reordering.
1327
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1328
+ * @remarks Declare `reorderContentPlaylistItems` in `uses`. Send the complete desired order after mount.
1329
+ * @example await reorderContentPlaylistItems({ playlistId: 5, items: [{ id: 8, order: 0 }] });
1330
+ */
710
1331
  declare const reorderContentPlaylistItems: PortalFunction<null, ReorderContentPlaylistItemsInput>;
1332
+ /**
1333
+ * Creates a share link for a content resource.
1334
+ * @param input - Resource kind and identifier to share.
1335
+ * @returns The created {@link PortalShare}.
1336
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1337
+ * @remarks Declare `createContentShare` in `uses`. This creates host data after mount.
1338
+ * @example const share = await createContentShare({ shareableType: "media", shareableId: 12 });
1339
+ */
711
1340
  declare const createContentShare: PortalFunction<PortalShare, CreateContentShareInput>;
1341
+ /**
1342
+ * Toggles the signed-in member's favorite state for content.
1343
+ * @param input - Favorite resource kind and identifier.
1344
+ * @returns The resulting {@link PortalContentFavoriteState}.
1345
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1346
+ * @remarks Declare `toggleContentFavorite` in `uses`. This mutates host data after mount.
1347
+ * @example const state = await toggleContentFavorite({ favoriteableType: "Medium", favoriteableId: 12 });
1348
+ */
712
1349
  declare const toggleContentFavorite: PortalFunction<PortalContentFavoriteState, ToggleContentFavoriteInput>;
1350
+ /**
1351
+ * Creates a digital-asset record.
1352
+ * @param input - Asset name and optional description.
1353
+ * @returns The created {@link PortalDamAsset}.
1354
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1355
+ * @remarks Declare `createDamAsset` in `uses`. This mutates host content after mount.
1356
+ * @example const asset = await createDamAsset({ name: "Hero image" });
1357
+ */
713
1358
  declare const createDamAsset: PortalFunction<PortalDamAsset, CreateDamAssetInput>;
1359
+ /**
1360
+ * Adds a path to a digital asset.
1361
+ * @param input - Stable asset code and path.
1362
+ * @returns The created {@link PortalDamAssetPath}.
1363
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1364
+ * @remarks Declare `createDamAssetPath` in `uses`. This mutates host content after mount.
1365
+ * @example const path = await createDamAssetPath({ assetCode: "hero", path: "/images/hero.png" });
1366
+ */
714
1367
  declare const createDamAssetPath: PortalFunction<PortalDamAssetPath, CreateDamAssetPathInput>;
1368
+ /**
1369
+ * Marks a digital asset as discarded.
1370
+ * @param input - Stable asset code.
1371
+ * @returns The updated {@link PortalDamAsset}.
1372
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1373
+ * @remarks Declare `discardDamAsset` in `uses`. This mutates host content after mount.
1374
+ * @example const asset = await discardDamAsset({ assetCode: "hero" });
1375
+ */
715
1376
  declare const discardDamAsset: PortalFunction<PortalDamAsset, MutateDamAssetInput>;
1377
+ /**
1378
+ * Permanently deletes a digital asset.
1379
+ * @param input - Stable asset code.
1380
+ * @returns `null` after deletion.
1381
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1382
+ * @remarks Declare `deleteDamAsset` in `uses`. This permanently mutates host content after mount.
1383
+ * @example await deleteDamAsset({ assetCode: "hero" });
1384
+ */
716
1385
  declare const deleteDamAsset: PortalFunction<null, MutateDamAssetInput>;
717
1386
  //#endregion
718
1387
  //#region src/widgets/remote/contract/capabilities/self.d.ts
1388
+ /** Membership identity, representative access, and granted permissions. */
719
1389
  type PortalMemberAccess = {
720
- readonly memberType: "customer" | "rep";
721
- readonly slug: string;
722
- readonly name: string | null;
723
- readonly canAccessRepSurfaces: boolean;
1390
+ /** Customer or representative role. */readonly memberType: "customer" | "rep"; /** Public member slug. */
1391
+ readonly slug: string; /** Display name, if available. */
1392
+ readonly name: string | null; /** Whether representative-only surfaces are available. */
1393
+ readonly canAccessRepSurfaces: boolean; /** Permission names mapped to their granted state. */
724
1394
  readonly permissions: Readonly<Record<string, boolean>>;
725
1395
  };
1396
+ /** Editable fields for the signed-in account. */
726
1397
  type UpdateUserAccountInput = {
727
- readonly firstName?: string;
728
- readonly lastName?: string;
729
- readonly bio?: string;
730
- readonly avatarUrl?: string;
731
- readonly socialLinks?: Readonly<Record<string, string>>;
1398
+ /** New given name. */readonly firstName?: string; /** New family name. */
1399
+ readonly lastName?: string; /** New biography. */
1400
+ readonly bio?: string; /** New avatar URL. */
1401
+ readonly avatarUrl?: string; /** Replacement social-link map. */
1402
+ readonly socialLinks?: Readonly<Record<string, string>>; /** Preferred ISO language code. */
732
1403
  readonly languageIso?: string;
733
1404
  };
1405
+ /** Todo identity and lifecycle timestamps. */
734
1406
  type PortalTodoSummary = {
735
- readonly id: number;
736
- readonly dueAt: string | null;
737
- readonly completedAt: string | null;
1407
+ /** Todo identifier. */readonly id: number; /** ISO due timestamp, if set. */
1408
+ readonly dueAt: string | null; /** ISO completion timestamp, if complete. */
1409
+ readonly completedAt: string | null; /** ISO creation timestamp. */
738
1410
  readonly createdAt: string;
739
1411
  };
1412
+ /** Full todo record. */
740
1413
  type PortalTodo = PortalTodoSummary & {
741
- readonly body: string;
1414
+ /** Todo text. */readonly body: string;
742
1415
  };
1416
+ /** Filters accepted by {@link listTodos}. */
743
1417
  type ListTodosInput = {
744
- readonly state?: "incomplete" | "completed" | "all";
1418
+ /** Completion state to include. */readonly state?: "incomplete" | "completed" | "all";
745
1419
  };
1420
+ /** Fields used to create a todo. */
746
1421
  type CreateTodoInput = {
747
- readonly body: string;
1422
+ /** Todo text. */readonly body: string; /** Optional ISO due timestamp; `null` clears the due date. */
748
1423
  readonly dueAt?: string | null;
749
1424
  };
1425
+ /** One reward-points ledger transaction. */
750
1426
  type PortalPointsLedgerEntry = {
751
- readonly id: number;
752
- readonly amount: number;
753
- readonly createdAt: string;
754
- readonly transactionType: string | null;
1427
+ /** Ledger entry identifier. */readonly id: number; /** Signed point amount. */
1428
+ readonly amount: number; /** ISO creation timestamp. */
1429
+ readonly createdAt: string; /** Host-defined transaction category, if available. */
1430
+ readonly transactionType: string | null; /** Whether the entry links to a source record. */
755
1431
  readonly hasSource: boolean;
756
1432
  };
1433
+ /** Current reward-points balance and ledger entries. */
757
1434
  type PortalPointsLedger = {
758
- readonly balance: number;
1435
+ /** Current points balance. */readonly balance: number; /** Ledger entries in host-defined order. */
759
1436
  readonly entries: readonly PortalPointsLedgerEntry[];
760
1437
  };
1438
+ /** Public MySite profile and aggregate performance values. */
761
1439
  type PortalMySiteProfile = {
762
- readonly id: number;
763
- readonly url: string | null;
764
- readonly views: number;
765
- readonly leads: number;
766
- readonly themeId: number | null;
767
- readonly bio: string | null;
768
- readonly avatarUrl: string | null;
769
- readonly displayName: string | null;
1440
+ /** MySite profile identifier. */readonly id: number; /** Public MySite URL, if published. */
1441
+ readonly url: string | null; /** Recorded view count. */
1442
+ readonly views: number; /** Recorded lead count. */
1443
+ readonly leads: number; /** Active theme identifier, if set. */
1444
+ readonly themeId: number | null; /** Profile biography, if set. */
1445
+ readonly bio: string | null; /** Profile avatar URL, if set. */
1446
+ readonly avatarUrl: string | null; /** Public display name, if set. */
1447
+ readonly displayName: string | null; /** Public route slug, if set. */
770
1448
  readonly slug: string | null;
771
1449
  };
1450
+ /** Editable MySite profile fields. */
772
1451
  type UpdateMySiteProfileInput = {
773
- readonly bio?: string;
774
- readonly avatarUrl?: string;
1452
+ /** New biography. */readonly bio?: string; /** New avatar URL. */
1453
+ readonly avatarUrl?: string; /** New display name. */
775
1454
  readonly displayName?: string;
776
1455
  };
1456
+ /** Editable MySite publication settings. */
777
1457
  type UpdateMySiteSettingsInput = {
778
- readonly themeId?: number;
1458
+ /** Theme identifier to activate. */readonly themeId?: number; /** Public route slug. */
779
1459
  readonly slug?: string;
780
1460
  };
1461
+ /** Link displayed on a MySite profile. */
781
1462
  type PortalMySiteLink = {
782
- readonly id: number;
783
- readonly url: string;
784
- readonly title: string;
1463
+ /** Link identifier. */readonly id: number; /** Destination URL. */
1464
+ readonly url: string; /** Visible link title. */
1465
+ readonly title: string; /** Display position. */
785
1466
  readonly position: number;
786
1467
  };
1468
+ /** Fields used to create a MySite link. */
787
1469
  type CreateMySiteLinkInput = {
788
- readonly url: string;
1470
+ /** Destination URL. */readonly url: string; /** Visible link title. */
789
1471
  readonly title: string;
790
1472
  };
1473
+ /** Fields used to update a MySite link. */
791
1474
  type UpdateMySiteLinkInput = {
792
- readonly id: number;
793
- readonly url?: string;
1475
+ /** Link identifier. */readonly id: number; /** Replacement destination URL. */
1476
+ readonly url?: string; /** Replacement title. */
794
1477
  readonly title?: string;
795
1478
  };
1479
+ /** Identifies a MySite link to delete. */
796
1480
  type DeleteMySiteLinkInput = {
797
- readonly id: number;
1481
+ /** Link identifier. */readonly id: number;
798
1482
  };
1483
+ /** Defines the complete display order for MySite links. */
799
1484
  type ReorderMySiteLinksInput = {
800
- readonly orderedIds: readonly number[];
1485
+ /** Link identifiers in desired display order. */readonly orderedIds: readonly number[];
801
1486
  };
1487
+ /** Product favorite displayed on a MySite profile. */
802
1488
  type PortalMySiteFavorite = {
803
- readonly id: number;
804
- readonly favoriteableId: number;
805
- readonly favoriteableType: string;
806
- readonly name: string | null;
807
- readonly imageUrl: string | null;
808
- readonly position: number;
1489
+ /** Favorite record identifier. */readonly id: number; /** Favorited resource identifier. */
1490
+ readonly favoriteableId: number; /** Host resource type. */
1491
+ readonly favoriteableType: string; /** Resource name, if available. */
1492
+ readonly name: string | null; /** Resource image URL, if available. */
1493
+ readonly imageUrl: string | null; /** Display position. */
1494
+ readonly position: number; /** ISO creation timestamp, if available. */
809
1495
  readonly createdAt: string | null;
810
1496
  };
1497
+ /** Identifies a product to add to MySite favorites. */
811
1498
  type AddMySiteFavoriteInput = {
812
- readonly productId: number;
1499
+ /** Product identifier. */readonly productId: number;
813
1500
  };
1501
+ /** Identifies a MySite favorite to delete. */
814
1502
  type DeleteMySiteFavoriteInput = {
815
- readonly id: number;
1503
+ /** Favorite record identifier. */readonly id: number;
816
1504
  };
1505
+ /** Defines the complete display order for MySite favorites. */
817
1506
  type ReorderMySiteFavoritesInput = {
818
- readonly orderedIds: readonly number[];
1507
+ /** Favorite identifiers in desired display order. */readonly orderedIds: readonly number[];
819
1508
  };
1509
+ /** MySite theme available to the signed-in member. */
820
1510
  type PortalMySiteTheme = {
821
- readonly id: number;
822
- readonly name: string;
1511
+ /** Theme identifier. */readonly id: number; /** Theme name. */
1512
+ readonly name: string; /** Theme preview URL, if available. */
823
1513
  readonly previewUrl: string | null;
824
1514
  };
1515
+ /**
1516
+ * Gets access and permissions for the signed-in member.
1517
+ * @returns The current {@link PortalMemberAccess}.
1518
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
1519
+ * @remarks Declare `getMemberAccess` in `uses` and call it only after mount.
1520
+ * @example const access = await getMemberAccess();
1521
+ */
825
1522
  declare const getMemberAccess: PortalFunction<PortalMemberAccess>;
1523
+ /**
1524
+ * Updates editable fields on the signed-in account.
1525
+ * @param input - Account fields to update.
1526
+ * @returns The updated {@link UserAccount}.
1527
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1528
+ * @remarks Declare `updateUserAccount` in `uses`. This mutates host account data after mount.
1529
+ * @example const account = await updateUserAccount({ bio: "Hello" });
1530
+ */
826
1531
  declare const updateUserAccount: PortalFunction<UserAccount, UpdateUserAccountInput>;
1532
+ /**
1533
+ * Lists todos for the signed-in member.
1534
+ * @param input - Optional completion-state filter.
1535
+ * @returns Todo summaries matching the filter.
1536
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1537
+ * @remarks Declare `listTodos` in `uses` and call it only after mount.
1538
+ * @example const todos = await listTodos({ state: "incomplete" });
1539
+ */
827
1540
  declare const listTodos: PortalFunction<readonly PortalTodoSummary[], ListTodosInput>;
1541
+ /**
1542
+ * Creates a todo for the signed-in member.
1543
+ * @param input - Todo text and optional due timestamp.
1544
+ * @returns The created {@link PortalTodo}.
1545
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1546
+ * @remarks Declare `createTodo` in `uses`. This mutates host data after mount.
1547
+ * @example const todo = await createTodo({ body: "Follow up" });
1548
+ */
828
1549
  declare const createTodo: PortalFunction<PortalTodo, CreateTodoInput>;
1550
+ /**
1551
+ * Gets the reward-points ledger for the signed-in member.
1552
+ * @returns The current {@link PortalPointsLedger}.
1553
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
1554
+ * @remarks Declare `getPointsLedger` in `uses` and call it only after mount.
1555
+ * @example const ledger = await getPointsLedger();
1556
+ */
829
1557
  declare const getPointsLedger: PortalFunction<PortalPointsLedger>;
1558
+ /**
1559
+ * Gets the MySite profile for the signed-in member.
1560
+ * @returns The current {@link PortalMySiteProfile}.
1561
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
1562
+ * @remarks Declare `getMySiteProfile` in `uses` and call it only after mount.
1563
+ * @example const profile = await getMySiteProfile();
1564
+ */
830
1565
  declare const getMySiteProfile: PortalFunction<PortalMySiteProfile>;
1566
+ /**
1567
+ * Updates editable MySite profile fields.
1568
+ * @param input - Profile fields to update.
1569
+ * @returns The updated {@link PortalMySiteProfile}.
1570
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1571
+ * @remarks Declare `updateMySiteProfile` in `uses`. This mutates host data after mount.
1572
+ * @example const profile = await updateMySiteProfile({ displayName: "Ari" });
1573
+ */
831
1574
  declare const updateMySiteProfile: PortalFunction<PortalMySiteProfile, UpdateMySiteProfileInput>;
1575
+ /**
1576
+ * Updates MySite publication settings.
1577
+ * @param input - Theme or public slug settings to update.
1578
+ * @returns `null` after the host applies the settings.
1579
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1580
+ * @remarks Declare `updateMySiteSettings` in `uses`. This mutates host data after mount.
1581
+ * @example await updateMySiteSettings({ themeId: 42 });
1582
+ */
832
1583
  declare const updateMySiteSettings: PortalFunction<null, UpdateMySiteSettingsInput>;
1584
+ /**
1585
+ * Lists links on the signed-in member's MySite.
1586
+ * @returns MySite links in display order.
1587
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
1588
+ * @remarks Declare `listMySiteLinks` in `uses` and call it only after mount.
1589
+ * @example const links = await listMySiteLinks();
1590
+ */
833
1591
  declare const listMySiteLinks: PortalFunction<readonly PortalMySiteLink[]>;
1592
+ /**
1593
+ * Creates a link on the signed-in member's MySite.
1594
+ * @param input - Destination URL and visible title.
1595
+ * @returns The created {@link PortalMySiteLink}.
1596
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1597
+ * @remarks Declare `createMySiteLink` in `uses`. This mutates host data after mount.
1598
+ * @example const link = await createMySiteLink({ title: "Shop", url: "https://example.com" });
1599
+ */
834
1600
  declare const createMySiteLink: PortalFunction<PortalMySiteLink, CreateMySiteLinkInput>;
1601
+ /**
1602
+ * Updates a link on the signed-in member's MySite.
1603
+ * @param input - Link identifier and fields to replace.
1604
+ * @returns The updated {@link PortalMySiteLink}.
1605
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1606
+ * @remarks Declare `updateMySiteLink` in `uses`. This mutates host data after mount.
1607
+ * @example const link = await updateMySiteLink({ id: 7, title: "New title" });
1608
+ */
835
1609
  declare const updateMySiteLink: PortalFunction<PortalMySiteLink, UpdateMySiteLinkInput>;
1610
+ /**
1611
+ * Deletes a link from the signed-in member's MySite.
1612
+ * @param input - Link identifier to delete.
1613
+ * @returns `null` after deletion.
1614
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1615
+ * @remarks Declare `deleteMySiteLink` in `uses`. This permanently mutates host data after mount.
1616
+ * @example await deleteMySiteLink({ id: 7 });
1617
+ */
836
1618
  declare const deleteMySiteLink: PortalFunction<null, DeleteMySiteLinkInput>;
1619
+ /**
1620
+ * Replaces the display order of all MySite links.
1621
+ * @param input - Link identifiers in the desired order.
1622
+ * @returns Updated links in display order.
1623
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1624
+ * @remarks Declare `reorderMySiteLinks` in `uses`. Supply the complete order after mount.
1625
+ * @example const links = await reorderMySiteLinks({ orderedIds: [7, 3] });
1626
+ */
837
1627
  declare const reorderMySiteLinks: PortalFunction<readonly PortalMySiteLink[], ReorderMySiteLinksInput>;
1628
+ /**
1629
+ * Lists product favorites on the signed-in member's MySite.
1630
+ * @returns Favorites in display order.
1631
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
1632
+ * @remarks Declare `listMySiteFavorites` in `uses` and call it only after mount.
1633
+ * @example const favorites = await listMySiteFavorites();
1634
+ */
838
1635
  declare const listMySiteFavorites: PortalFunction<readonly PortalMySiteFavorite[]>;
1636
+ /**
1637
+ * Adds a product to MySite favorites.
1638
+ * @param input - Product identifier to add.
1639
+ * @returns The created {@link PortalMySiteFavorite}.
1640
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1641
+ * @remarks Declare `addMySiteFavorite` in `uses`. This mutates host data after mount.
1642
+ * @example const favorite = await addMySiteFavorite({ productId: 42 });
1643
+ */
839
1644
  declare const addMySiteFavorite: PortalFunction<PortalMySiteFavorite, AddMySiteFavoriteInput>;
1645
+ /**
1646
+ * Deletes a MySite favorite.
1647
+ * @param input - Favorite record identifier to delete.
1648
+ * @returns `null` after deletion.
1649
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1650
+ * @remarks Declare `deleteMySiteFavorite` in `uses`. This permanently mutates host data after mount.
1651
+ * @example await deleteMySiteFavorite({ id: 9 });
1652
+ */
840
1653
  declare const deleteMySiteFavorite: PortalFunction<null, DeleteMySiteFavoriteInput>;
1654
+ /**
1655
+ * Replaces the display order of all MySite favorites.
1656
+ * @param input - Favorite identifiers in the desired order.
1657
+ * @returns Updated favorites in display order.
1658
+ * @throws {@link PortalFunctionError} when undeclared, invalid, unavailable, or rejected by the host.
1659
+ * @remarks Declare `reorderMySiteFavorites` in `uses`. Supply the complete order after mount.
1660
+ * @example const favorites = await reorderMySiteFavorites({ orderedIds: [9, 4] });
1661
+ */
841
1662
  declare const reorderMySiteFavorites: PortalFunction<readonly PortalMySiteFavorite[], ReorderMySiteFavoritesInput>;
1663
+ /**
1664
+ * Lists themes available to the signed-in member's MySite.
1665
+ * @returns Available {@link PortalMySiteTheme} records.
1666
+ * @throws {@link PortalFunctionError} when undeclared, unavailable, or rejected by the host.
1667
+ * @remarks Declare `listMySiteThemes` in `uses` and call it only after mount.
1668
+ * @example const themes = await listMySiteThemes();
1669
+ */
842
1670
  declare const listMySiteThemes: PortalFunction<readonly PortalMySiteTheme[]>;
843
1671
  //#endregion
844
1672
  //#region src/widgets/remote/contract/elements/search-sort.d.ts
@@ -847,17 +1675,39 @@ interface FluidSearchSortOption {
847
1675
  readonly value: string;
848
1676
  }
849
1677
  interface FluidSearchSortElementProperties {
1678
+ /** Current search text displayed by the control. */
850
1679
  readonly searchValue: string;
1680
+ /** Search-input placeholder. */
851
1681
  readonly placeholder?: string;
1682
+ /** Sort choices displayed by the control. */
852
1683
  readonly sortOptions?: readonly FluidSearchSortOption[];
1684
+ /** Value of the selected sort choice. */
853
1685
  readonly sortValue?: string;
854
1686
  }
855
1687
  //#endregion
856
1688
  //#region src/widgets/remote/worker/elements/SearchSort.d.ts
1689
+ /** Props for the worker-safe Portal search and sort control. */
857
1690
  interface SearchSortProps extends FluidSearchSortElementProperties {
1691
+ /** Called when the search value changes. */
858
1692
  readonly onSearchChange: (value: string) => void;
1693
+ /** Called when the selected sort value changes. */
859
1694
  readonly onSortChange?: (value: string) => void;
860
1695
  }
1696
+ /**
1697
+ * Renders the Portal-provided search and sort control in a Remote DOM widget.
1698
+ *
1699
+ * @param props - Search, sort, option, and change-handler configuration.
1700
+ * @returns A worker-safe React element backed by the Portal custom element.
1701
+ * @remarks Render this component only inside a started Remote DOM widget worker. The Portal host owns its visual implementation.
1702
+ * @example
1703
+ * ```tsx
1704
+ * <SearchSort
1705
+ * searchValue={query}
1706
+ * placeholder="Search products"
1707
+ * onSearchChange={setQuery}
1708
+ * />
1709
+ * ```
1710
+ */
861
1711
  declare function SearchSort({
862
1712
  onSearchChange,
863
1713
  onSortChange,
@@ -871,10 +1721,24 @@ interface FluidSpacerWidgetElementProperties {
871
1721
  }
872
1722
  //#endregion
873
1723
  //#region src/widgets/remote/worker/elements/FluidSpacerWidget.d.ts
1724
+ /** Props for the worker-safe Portal spacer element. */
874
1725
  interface FluidSpacerWidgetProps {
1726
+ /** Explicit spacer height accepted by the Portal element. */
875
1727
  readonly customHeight?: FluidSpacerWidgetElementProperties["customHeight"];
1728
+ /** Whether the spacer is rendered in builder preview mode. */
876
1729
  readonly previewMode?: FluidSpacerWidgetElementProperties["previewMode"];
877
1730
  }
1731
+ /**
1732
+ * Renders a Portal spacer inside a Remote DOM widget.
1733
+ *
1734
+ * @param props - Spacer height and preview state.
1735
+ * @returns A worker-safe React element backed by the Portal custom element.
1736
+ * @remarks Render this component only inside a started Remote DOM widget worker. The Portal host determines the final layout behavior.
1737
+ * @example
1738
+ * ```tsx
1739
+ * <FluidSpacerWidget customHeight={24} />
1740
+ * ```
1741
+ */
878
1742
  declare function FluidSpacerWidget(props: FluidSpacerWidgetProps): ReactElement;
879
1743
  //#endregion
880
1744
  export { type AddContentMediaProductInput, type AddContentPlaylistItemInput, type AddMySiteFavoriteInput, type AnySourceWidget, type CreateContentMediaInput, type CreateContentPlaylistInput, type CreateContentShareInput, type CreateDamAssetInput, type CreateDamAssetPathInput, type CreateMySiteLinkInput, type CreateTodoInput, type DeclarativeCapabilityUse, type DefineWidgetOptions, type DefineWidgetPackageOptions, type DeleteContentMediaInput, type DeleteContentPlaylistInput, type DeleteMySiteFavoriteInput, type DeleteMySiteLinkInput, FluidSpacerWidget, type FluidSpacerWidgetProps, type FullscreenState, type GetAddressFieldsInput, type GetContentMediaInput, type GetEnrollmentPackInput, type GetPageInput, type GetPlaylistInput, type GetProductInput, type ListContentMediaInput, type ListContentMediaProductsInput, type ListContentMetricsInput, type ListCountriesInput, type ListDamAssetPathsInput, type ListPagesInput, type ListPlaylistItemsInput, type ListPlaylistsInput, type ListProductMediaInput, type ListProductMetricsInput, type ListProductsInput, type ListTodosInput, type MutateDamAssetInput, type PortalAddressFields, type PortalAppSummary, type PortalCalendarEvent, type PortalContentFavoriteState, type PortalCountry, type PortalDamAsset, type PortalDamAssetPath, type PortalEnrollmentPack, type PortalEntityId, type PortalFunction, type PortalFunctionDefinition, PortalFunctionError, type PortalFunctionErrorCode, type PortalFunctionHandler, type PortalFunctionImplementation, type PortalFunctionJsonValue, type PortalImage, type PortalLanguage, type PortalMedia, type PortalMediaCta, type PortalMediaProduct, type PortalMemberAccess, type PortalMetric, type PortalMetricsPeriod, type PortalMySiteFavorite, type PortalMySiteLink, type PortalMySiteProfile, type PortalMySiteTheme, type PortalNamedEntitySummary, type PortalNavigationItem, type PortalNavigationState, type PortalNavigationSummary, type PortalNavigationTarget, type PortalPage, type PortalPageContent, type PortalPageDetail, type PortalPageInput, type PortalPlaylist, type PortalPlaylistItem, type PortalPlaylistItemContent, type PortalPlaylistProduct, type PortalPointsLedger, type PortalPointsLedgerEntry, type PortalProduct, type PortalProductMedia, type PortalProductVariant, type PortalProfileSummary, type PortalScreenSummary, type PortalShare, type PortalStore, type PortalSummaryCollection, type PortalTodo, type PortalTodoSummary, type RemoteDomWidgetWorkerController, type RemoveContentMediaProductInput, type RemoveContentPlaylistItemInput, type ReorderContentPlaylistItemsInput, type ReorderMySiteFavoritesInput, type ReorderMySiteLinksInput, type RuntimeSourceWidget, type SearchProductsInput, SearchSort, type SearchSortProps, type SourceWidget, type SourceWidgetPackage, type StartWidgetPackageOptions, type ToggleContentFavoriteInput, type UpdateContentMediaInput, type UpdateContentPlaylistInput, type UpdateMySiteLinkInput, type UpdateMySiteProfileInput, type UpdateMySiteSettingsInput, type UpdateUserAccountInput, type UserAccount, type WidgetSourceCapabilityDeclaration, type WidgetSourceDefaultProps, type WidgetSourcePropertyField, type WidgetSourcePropertySchema, type WidgetSourceResizable, addContentMediaProduct, addContentPlaylistItem, addMySiteFavorite, allowAnchorUrl, buildPortalHref, createContentMedia, createContentPlaylist, createContentShare, createDamAsset, createDamAssetPath, createMySiteLink, createTodo, definePortalFunction, defineWidget, defineWidgetPackage, deleteContentMedia, deleteContentPlaylist, deleteDamAsset, deleteMySiteFavorite, deleteMySiteLink, discardDamAsset, exitFullscreen, getAddressFields, getContentMedia, getEnrollmentPack, getFullscreenState, getMemberAccess, getMySiteProfile, getNavigationState, getPage, getPlaylist, getPointsLedger, getPortalApp, getPortalProfile, getProduct, getStore, getUserAccount, implementPortalFunction, listCalendarEvents, listContentMedia, listContentMediaProducts, listContentMetrics, listCountries, listDamAssetPaths, listDamAssets, listEnrollmentPacks, listLanguages, listMySiteFavorites, listMySiteLinks, listMySiteThemes, listPages, listPlaylistItems, listPlaylists, listProductMedia, listProductMetrics, listProducts, listShares, listTodos, navigateTo, networkAccess, prepareRemoteDomWidgetWorker, removeContentMediaProduct, removeContentPlaylistItem, reorderContentPlaylistItems, reorderMySiteFavorites, reorderMySiteLinks, requestFullscreen, searchProducts, startWidgetPackage, toggleContentFavorite, updateContentMedia, updateContentPlaylist, updateMySiteLink, updateMySiteProfile, updateMySiteSettings, updateUserAccount };