@fluid-app/rep-sdk 0.1.11 → 0.1.12

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 (31) hide show
  1. package/dist/{ContactsScreen-UfrdOORn.cjs → ContactsScreen-88vZgftb.cjs} +3 -3
  2. package/dist/{ContactsScreen-UfrdOORn.cjs.map → ContactsScreen-88vZgftb.cjs.map} +1 -1
  3. package/dist/ContactsScreen-CB6l0Lf1.mjs.map +1 -1
  4. package/dist/CoreScreenPlaceholder-D93ZYKt2.mjs.map +1 -1
  5. package/dist/{CoreScreenPlaceholder-DBZqxDsK.cjs → CoreScreenPlaceholder-DTbuffrQ.cjs} +2 -2
  6. package/dist/CoreScreenPlaceholder-DTbuffrQ.cjs.map +1 -0
  7. package/dist/CustomersScreen-BEar6Leg.mjs.map +1 -1
  8. package/dist/{CustomersScreen-DXXPpWZW.cjs → CustomersScreen-BF-JQEo7.cjs} +3 -3
  9. package/dist/{CustomersScreen-DXXPpWZW.cjs.map → CustomersScreen-BF-JQEo7.cjs.map} +1 -1
  10. package/dist/{MessagingScreen-xO9YudMx.mjs → MessagingScreen-CicALq4A.mjs} +1 -5
  11. package/dist/MessagingScreen-CicALq4A.mjs.map +1 -0
  12. package/dist/{MessagingScreen-CsDvKkLC.cjs → MessagingScreen-DUoBj27w.cjs} +1 -5
  13. package/dist/MessagingScreen-DUoBj27w.cjs.map +1 -0
  14. package/dist/{OrdersScreen-fcxcnpNU.cjs → OrdersScreen-CqNaiFap.cjs} +3 -3
  15. package/dist/{OrdersScreen-fcxcnpNU.cjs.map → OrdersScreen-CqNaiFap.cjs.map} +1 -1
  16. package/dist/OrdersScreen-DB1v051q.mjs.map +1 -1
  17. package/dist/{ProductsScreen-BaEng3LB.cjs → ProductsScreen-ZOn-MB2k.cjs} +3 -3
  18. package/dist/{ProductsScreen-BaEng3LB.cjs.map → ProductsScreen-ZOn-MB2k.cjs.map} +1 -1
  19. package/dist/ProductsScreen-nVDsY6kf.mjs.map +1 -1
  20. package/dist/index.cjs +11 -11
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +1278 -987
  23. package/dist/index.d.cts.map +1 -1
  24. package/dist/index.d.mts +1278 -987
  25. package/dist/index.d.mts.map +1 -1
  26. package/dist/index.mjs +2 -2
  27. package/dist/index.mjs.map +1 -1
  28. package/package.json +5 -5
  29. package/dist/CoreScreenPlaceholder-DBZqxDsK.cjs.map +0 -1
  30. package/dist/MessagingScreen-CsDvKkLC.cjs.map +0 -1
  31. package/dist/MessagingScreen-xO9YudMx.mjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,15 +1,12 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
- import * as react from "react";
3
1
  import React$1, { AnchorHTMLAttributes, ComponentProps, ComponentType, ReactNode } from "react";
4
2
  import { QueryClient, UseQueryResult } from "@tanstack/react-query";
5
3
  import * as _fluid_app_rep_core_types0 from "@fluid-app/rep-core/types";
6
- import { AlignOptions, BackgroundType, BackgroundValue, BorderRadiusOptions, ButtonSizeOptions, ColorOptions, FontSizeOptions, GapOptions, NavigationItem, NavigationItem as NavigationItem$1, PaddingOptions, RepAppData, RepAppData as RepAppData$1, RepAppManifest, RepAppProfile, ResolvedTheme, ScreenDefinition as ScreenDefinition$1, SectionLayoutType, ShareableItem, ThemeColorInput, ThemeDefinition, ThemePayload, TypedWidgetSchema, WIDGET_TYPE_NAMES, WidgetPath, WidgetRegistry, WidgetSchema, WidgetSchema as WidgetSchema$1, WidgetType, WidgetTypeName, assertDefined, assertNever, isWidgetType, isWidgetTypeName, sectionLayoutConfig } from "@fluid-app/rep-core/types";
4
+ import { AlignOptions, BackgroundType, BackgroundValue, BorderRadiusOptions, ButtonSizeOptions, ColorOptions, FontSizeOptions, GapOptions, NavigationItem, NavigationItem as NavigationItem$1, PaddingOptions, RepAppData, RepAppData as RepAppData$1, RepAppManifest, RepAppProfile, ResolvedTheme, ScreenDefinition as ScreenDefinition$1, SectionLayoutType, ShareableItem, ThemeColorInput, ThemeDefinition, ThemePayload, TypedWidgetSchema, WIDGET_TYPE_NAMES, WidgetPath, WidgetRegistry, WidgetRegistry as WidgetRegistry$1, WidgetSchema, WidgetSchema as WidgetSchema$1, WidgetType, WidgetTypeName, assertDefined, assertNever, isWidgetType, isWidgetTypeName, sectionLayoutConfig } from "@fluid-app/rep-core/types";
7
5
  import { RawApiTheme, RawApiTheme as RawApiTheme$1, buildThemeDefinition, getActiveThemeId, transformThemes } from "@fluid-app/rep-core/theme";
8
6
  import { AUTH_CONSTANTS, DEFAULT_AUTH_URL, FluidAuthConfig, FluidAuthContextValue, JWTPayload, STORAGE_KEYS, TokenValidationResult, URL_PARAMS, USER_TYPES, UserType, cleanTokenFromUrl, clearTokens, createDefaultAuthRedirect, decodeToken, extractAllTokensFromUrl, extractCompanyTokenFromUrl, extractTokenFromUrl, getStoredToken, getTokenExpiration, getTokenTimeRemaining, hasStoredToken, hasTokenInUrl, isTokenExpired, isUserType, isValidToken, storeToken, validateToken } from "@fluid-app/auth";
9
7
  import { FileUploader, FileUploader as FileUploader$1, MessagingAuthContext, MessagingAuthContext as MessagingAuthContext$1, MessagingCurrentUser, UploadCallbacks, UploadResult } from "@fluid-app/messaging-core";
10
8
  import { MessagingApiConfig } from "@fluid-app/messaging-api-client";
11
- import { AlertWidget, AlertWidget as AlertWidget$1, CalendarWidget, CalendarWidget as CalendarWidget$1, CarouselWidget, CarouselWidget as CarouselWidget$1, CatchUpWidget, CatchUpWidget as CatchUpWidget$1, ChartWidget, ChartWidget as ChartWidget$1, ContainerWidget, ContainerWidget as ContainerWidget$1, EmbedWidget, EmbedWidget as EmbedWidget$1, ImageWidget, ImageWidget as ImageWidget$1, LayoutWidget, ListWidget, ListWidget as ListWidget$1, MySiteWidget, MySiteWidget as MySiteWidget$1, NestedWidget, NestedWidget as NestedWidget$1, QuickShareWidget, QuickShareWidget as QuickShareWidget$1, RecentActivityWidget, RecentActivityWidget as RecentActivityWidget$1, SpacerWidget, SpacerWidget as SpacerWidget$1, TableWidget, TableWidget as TableWidget$1, TextWidget, TextWidget as TextWidget$1, ToDoWidget, ToDoWidget as ToDoWidget$1, VideoWidget, VideoWidget as VideoWidget$1, alertWidgetPropertySchema, calendarWidgetPropertySchema, carouselWidgetPropertySchema, catchUpWidgetPropertySchema, chartWidgetPropertySchema, containerWidgetPropertySchema, embedWidgetPropertySchema, imageWidgetPropertySchema, layoutWidgetPropertySchema, listWidgetPropertySchema, mySiteWidgetPropertySchema, nestedWidgetPropertySchema, quickShareWidgetPropertySchema, recentActivityWidgetPropertySchema, spacerWidgetPropertySchema, tableWidgetPropertySchema, textWidgetPropertySchema, toDoWidgetPropertySchema, videoWidgetPropertySchema, widgetPropertySchemas } from "@fluid-app/rep-widgets/widgets";
12
- import * as _fluid_app_rep_core_registries0 from "@fluid-app/rep-core/registries";
9
+ import { AlertWidget, CalendarWidget, CarouselWidget, CatchUpWidget, ChartWidget, ContainerWidget, EmbedWidget, ImageWidget, LayoutWidget, ListWidget, MySiteWidget, NestedWidget, QuickShareWidget, RecentActivityWidget, SpacerWidget, TableWidget, TextWidget, ToDoWidget, VideoWidget, alertWidgetPropertySchema, calendarWidgetPropertySchema, carouselWidgetPropertySchema, catchUpWidgetPropertySchema, chartWidgetPropertySchema, containerWidgetPropertySchema, embedWidgetPropertySchema, imageWidgetPropertySchema, layoutWidgetPropertySchema, listWidgetPropertySchema, mySiteWidgetPropertySchema, nestedWidgetPropertySchema, quickShareWidgetPropertySchema, recentActivityWidgetPropertySchema, spacerWidgetPropertySchema, tableWidgetPropertySchema, textWidgetPropertySchema, toDoWidgetPropertySchema, videoWidgetPropertySchema, widgetPropertySchemas } from "@fluid-app/rep-widgets/widgets";
13
10
  import { PROPERTY_FIELD_TYPES, PropertyFieldSchema, PropertyFieldType, TabConfig, WidgetPropertySchema, gapValues, isPropertyFieldType } from "@fluid-app/rep-core/registries";
14
11
  import { createScreen, createWidgetFromShareable, createWidgetRegistry, groupChildrenByColumn } from "@fluid-app/rep-core/widget-utils";
15
12
  import { ThemeMode, ThemeModeProvider, getThemeModeAttribute, useThemeMode } from "@fluid-app/rep-core/shell/ThemeModeContext";
@@ -18,8 +15,8 @@ import { ThemeMode, ThemeModeProvider, getThemeModeAttribute, useThemeMode } fro
18
15
  //#endregion
19
16
  //#region src/types/rep.d.ts
20
17
  /**
21
- * Rep (sales representative) user profile
22
- */
18
+ * Rep (sales representative) user profile
19
+ */
23
20
  interface Rep {
24
21
  readonly id: string;
25
22
  email: string;
@@ -32,8 +29,8 @@ interface Rep {
32
29
  readonly updated_at: string;
33
30
  }
34
31
  /**
35
- * Data for updating a rep's profile
36
- */
32
+ * Data for updating a rep's profile
33
+ */
37
34
  interface UpdateRepData {
38
35
  first_name?: string;
39
36
  last_name?: string;
@@ -41,10 +38,10 @@ interface UpdateRepData {
41
38
  phone?: string;
42
39
  }
43
40
  /**
44
- * Current user profile from GET /api/me endpoint.
45
- * Contains recipient_id needed for the messaging system.
46
- * Field names match the Rails API response (snake_case).
47
- */
41
+ * Current user profile from GET /api/me endpoint.
42
+ * Contains recipient_id needed for the messaging system.
43
+ * Field names match the Rails API response (snake_case).
44
+ */
48
45
  interface UserMe {
49
46
  readonly id: number;
50
47
  readonly first_name: string | null;
@@ -59,8 +56,8 @@ interface UserMe {
59
56
  //#endregion
60
57
  //#region src/types/page-template.d.ts
61
58
  /**
62
- * Category for organizing page templates in the registry
63
- */
59
+ * Category for organizing page templates in the registry
60
+ */
64
61
  interface PageCategory {
65
62
  /** Unique identifier for the category */
66
63
  readonly id: string;
@@ -70,8 +67,8 @@ interface PageCategory {
70
67
  icon?: string;
71
68
  }
72
69
  /**
73
- * A reusable page template that can be shared across multiple navigations
74
- */
70
+ * A reusable page template that can be shared across multiple navigations
71
+ */
75
72
  interface PageTemplate {
76
73
  /** Unique identifier for the template */
77
74
  readonly id: string;
@@ -97,8 +94,8 @@ interface PageTemplate {
97
94
  thumbnail?: string;
98
95
  }
99
96
  /**
100
- * Reference to a shared page template within a navigation
101
- */
97
+ * Reference to a shared page template within a navigation
98
+ */
102
99
  interface PageReference {
103
100
  /** ID of the page template being referenced */
104
101
  page_template_id: string;
@@ -108,8 +105,8 @@ interface PageReference {
108
105
  overrides?: readonly PageOverride[];
109
106
  }
110
107
  /**
111
- * Override for a specific widget's props within a page template
112
- */
108
+ * Override for a specific widget's props within a page template
109
+ */
113
110
  interface PageOverride {
114
111
  /** ID of the widget to override (must match WidgetSchema.id in the template) */
115
112
  readonly widget_id: string;
@@ -117,8 +114,8 @@ interface PageOverride {
117
114
  props: Readonly<Record<string, unknown>>;
118
115
  }
119
116
  /**
120
- * Built-in page category IDs
121
- */
117
+ * Built-in page category IDs
118
+ */
122
119
  declare const PAGE_CATEGORIES: {
123
120
  readonly CORE: "core";
124
121
  readonly COMMERCE: "commerce";
@@ -130,8 +127,8 @@ type PageCategoryId = (typeof PAGE_CATEGORIES)[keyof typeof PAGE_CATEGORIES];
130
127
  //#endregion
131
128
  //#region src/types/navigation.d.ts
132
129
  /**
133
- * Screen definition with its component tree
134
- */
130
+ * Screen definition with its component tree
131
+ */
135
132
  interface ScreenDefinition {
136
133
  readonly id: number;
137
134
  slug: string;
@@ -139,8 +136,8 @@ interface ScreenDefinition {
139
136
  component_tree: WidgetSchema[];
140
137
  }
141
138
  /**
142
- * Navigation configuration for the rep portal
143
- */
139
+ * Navigation configuration for the rep portal
140
+ */
144
141
  interface Navigation {
145
142
  readonly definition_id: number;
146
143
  readonly id: number;
@@ -154,8 +151,8 @@ interface Navigation {
154
151
  //#endregion
155
152
  //#region src/types/profile.d.ts
156
153
  /**
157
- * Rep portal profile containing themes and navigation configuration
158
- */
154
+ * Rep portal profile containing themes and navigation configuration
155
+ */
159
156
  interface Profile {
160
157
  /** Profile name */
161
158
  name: string;
@@ -169,14 +166,14 @@ interface Profile {
169
166
  //#endregion
170
167
  //#region src/types/permissions.d.ts
171
168
  /**
172
- * Standard permission action constants.
173
- * Use these constants instead of string literals for type safety.
174
- *
175
- * @example
176
- * ```ts
177
- * if (permissions[PERMISSION_ACTIONS.view]) { ... }
178
- * ```
179
- */
169
+ * Standard permission action constants.
170
+ * Use these constants instead of string literals for type safety.
171
+ *
172
+ * @example
173
+ * ```ts
174
+ * if (permissions[PERMISSION_ACTIONS.view]) { ... }
175
+ * ```
176
+ */
180
177
  declare const PERMISSION_ACTIONS: {
181
178
  readonly view: "view";
182
179
  readonly create: "create";
@@ -188,14 +185,14 @@ declare const PERMISSION_ACTIONS: {
188
185
  readonly send: "send";
189
186
  };
190
187
  /**
191
- * Union type of standard permission actions.
192
- * Derived from PERMISSION_ACTIONS constant to avoid duplication.
193
- */
188
+ * Union type of standard permission actions.
189
+ * Derived from PERMISSION_ACTIONS constant to avoid duplication.
190
+ */
194
191
  type PermissionAction = (typeof PERMISSION_ACTIONS)[keyof typeof PERMISSION_ACTIONS];
195
192
  /**
196
- * Permission flags for a single resource.
197
- * Known actions have explicit properties; index signature allows custom actions.
198
- */
193
+ * Permission flags for a single resource.
194
+ * Known actions have explicit properties; index signature allows custom actions.
195
+ */
199
196
  interface ResourcePermissions {
200
197
  readonly view?: boolean;
201
198
  readonly create?: boolean;
@@ -209,12 +206,12 @@ interface ResourcePermissions {
209
206
  readonly [key: string]: boolean | undefined;
210
207
  }
211
208
  /**
212
- * Map of resource names to their permissions
213
- */
209
+ * Map of resource names to their permissions
210
+ */
214
211
  type Permissions = Record<string, ResourcePermissions>;
215
212
  /**
216
- * User's complete permission profile
217
- */
213
+ * User's complete permission profile
214
+ */
218
215
  interface UserPermissions {
219
216
  /** Resource permission mappings */
220
217
  permissions: Permissions;
@@ -224,11 +221,364 @@ interface UserPermissions {
224
221
  is_super_admin: boolean;
225
222
  }
226
223
  //#endregion
224
+ //#region ../../platform/api-client-core/src/fetch-client.d.ts
225
+ interface RequestOptions$1 {
226
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
227
+ headers?: Record<string, string>;
228
+ params?: Record<string, unknown>;
229
+ body?: unknown;
230
+ signal?: AbortSignal;
231
+ }
232
+ interface FetchClientInstance {
233
+ request: <TResponse = unknown>(endpoint: string, options?: RequestOptions$1) => Promise<TResponse>;
234
+ requestWithFormData: <TResponse = unknown>(endpoint: string, formData: FormData, options?: Omit<RequestOptions$1, "body" | "params"> & {
235
+ method?: "POST" | "PUT" | "PATCH";
236
+ }) => Promise<TResponse>;
237
+ get: <TResponse = unknown>(endpoint: string, params?: Record<string, unknown>, options?: Omit<RequestOptions$1, "method" | "params">) => Promise<TResponse>;
238
+ post: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions$1, "method" | "body">) => Promise<TResponse>;
239
+ put: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions$1, "method" | "body">) => Promise<TResponse>;
240
+ patch: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions$1, "method" | "body">) => Promise<TResponse>;
241
+ delete: <TResponse = unknown>(endpoint: string, options?: Omit<RequestOptions$1, "method">) => Promise<TResponse>;
242
+ }
243
+ type FetchClient = FetchClientInstance;
244
+ //#endregion
245
+ //#region ../../fluidos/api-client/src/generated/fluid_os.d.ts
246
+ interface components {
247
+ schemas: {
248
+ ResponseMeta: {
249
+ /** @example 123e4567-e89b-12d3-a456-426614174000 */request_id?: string; /** @example 2021-01-01T00:00:00Z */
250
+ timestamp?: string;
251
+ }; /** @description Pagination metadata for list responses */
252
+ PaginationMeta: {
253
+ /**
254
+ * @description Total number of items across all pages
255
+ * @example 42
256
+ */
257
+ total_count?: number;
258
+ /**
259
+ * @description Total number of pages
260
+ * @example 5
261
+ */
262
+ total_pages?: number;
263
+ /**
264
+ * @description Current page number
265
+ * @example 1
266
+ */
267
+ current_page?: number;
268
+ /**
269
+ * @description Unique identifier for the request
270
+ * @example 123e4567-e89b-12d3-a456-426614174000
271
+ */
272
+ request_id?: string;
273
+ /**
274
+ * @description Timestamp of the response
275
+ * @example 2021-01-01T00:00:00Z
276
+ */
277
+ timestamp?: string;
278
+ } & {
279
+ [key: string]: unknown;
280
+ }; /** FluidOS::NavigationItem */
281
+ FluidOSNavigationItem: {
282
+ id: number;
283
+ icon?: string | null;
284
+ label?: string | null;
285
+ parent_id?: number | null;
286
+ position?: number | null;
287
+ screen_id?: number | null;
288
+ slug?: string | null; /** @enum {string} */
289
+ source: "user" | "system" | "code";
290
+ children: components["schemas"]["FluidOSNavigationItem"][];
291
+ }; /** @description Permission configuration object defining access rights. Empty arrays mean 'allow all' for that dimension. */
292
+ FluidOSPermissions: {
293
+ /** @description Array of rank IDs that can access this profile. Empty array allows all ranks. */ranks?: number[]; /** @description Array of roles that can access this profile. Empty array allows all roles. */
294
+ roles?: ("admin" | "rep")[]; /** @description Array of platforms that can access this profile. Empty array allows all platforms. */
295
+ platform?: ("mobile" | "browser")[]; /** @description Array of country IDs that can access this profile. Empty array allows all countries. */
296
+ countries?: number[];
297
+ }; /** @description Standard error response */
298
+ Error: {
299
+ /**
300
+ * @description Simple error message (used for 404 and other simple errors)
301
+ * @example Resource not found
302
+ * @example Unauthorized
303
+ */
304
+ error?: string;
305
+ /**
306
+ * @description Error message for validation errors
307
+ * @example Invalid parameters
308
+ */
309
+ error_message?: string;
310
+ /**
311
+ * @description Detailed validation errors by field
312
+ * @example {
313
+ * "definition": {
314
+ * "name": [
315
+ * "must be filled"
316
+ * ]
317
+ * }
318
+ * }
319
+ */
320
+ errors?: {
321
+ [key: string]: unknown;
322
+ };
323
+ meta?: components["schemas"]["ResponseMeta"];
324
+ } & {
325
+ [key: string]: unknown;
326
+ }; /** @description A profile optimized for rendering, with permissions stripped. Contains only the data needed to render the app. */
327
+ FluidOSRendererProfile: {
328
+ /** @description Unique identifier for the profile */id?: number; /** @description Display name of the profile */
329
+ name?: string; /** @description Whether this is the default profile for its platform */
330
+ default?: boolean; /** @description Navigation configuration for this profile */
331
+ navigation?: {
332
+ /** @description Tree structure of navigation items */navigation_tree?: components["schemas"]["FluidOSNavigationItem"][];
333
+ }; /** @description Array of theme IDs associated with this profile */
334
+ themes?: number[];
335
+ }; /** @description The Fluid OS manifest optimized for rendering. Contains a single matched profile based on platform, country, rank, and role parameters, along with filtered screens and themes. */
336
+ FluidOSRendererManifest: {
337
+ /** @description Name of the Fluid OS app */name?: string; /** @description ID of the Fluid OS definition */
338
+ definition_id?: number; /** @description Version number of the published manifest */
339
+ published_version?: number;
340
+ /**
341
+ * Format: date-time
342
+ * @description When this version was published
343
+ */
344
+ published_at?: string; /** @description Navigation configurations for the app */
345
+ navigations?: components["schemas"]["FluidOSNavigationBasic"][]; /** @description The best matching profile for the given parameters */
346
+ profile?: components["schemas"]["FluidOSRendererProfile"]; /** @description Screens associated with the matched profile's navigation */
347
+ screens?: components["schemas"]["FluidOSScreen"][]; /** @description Themes associated with the matched profile */
348
+ themes?: components["schemas"]["FluidOSTheme"][];
349
+ }; /** FluidOS::Navigation */
350
+ FluidOSNavigationBasic: {
351
+ id: number;
352
+ name?: string | null;
353
+ definition_id: number; /** @enum {string} */
354
+ platform: "web" | "mobile";
355
+ }; /** FluidOS::Screen */
356
+ FluidOSScreen: {
357
+ id: number;
358
+ name?: string | null;
359
+ slug?: string | null;
360
+ definition_id: number;
361
+ component_tree?: Record<string, unknown> | null;
362
+ }; /** FluidOS::Theme */
363
+ FluidOSTheme: {
364
+ id: number;
365
+ config?: Record<string, unknown> | null;
366
+ active?: boolean | null;
367
+ name?: string | null;
368
+ definition_id: number;
369
+ }; /** FluidOS::Definition */
370
+ FluidOSDefinition: {
371
+ id: number;
372
+ name?: string | null;
373
+ active?: boolean | null;
374
+ profiles: components["schemas"]["FluidOSProfile"][];
375
+ screens: components["schemas"]["FluidOSScreenBasic"][];
376
+ navigations: components["schemas"]["FluidOSNavigationBasic"][];
377
+ themes: components["schemas"]["FluidOSTheme"][];
378
+ }; /** FluidOS::Definition */
379
+ FluidOSDefinitionBasic: {
380
+ id: number;
381
+ name?: string | null;
382
+ active?: boolean | null;
383
+ };
384
+ FluidOSDefinitionCreate: {
385
+ definition: {
386
+ name: string;
387
+ active?: boolean;
388
+ };
389
+ };
390
+ FluidOSDefinitionUpdate: {
391
+ definition: {
392
+ name?: string;
393
+ active?: boolean;
394
+ };
395
+ }; /** FluidOS::Screen */
396
+ FluidOSScreenBasic: {
397
+ id: number;
398
+ name?: string | null;
399
+ slug?: string | null;
400
+ definition_id: number;
401
+ };
402
+ FluidOSScreenCreate: {
403
+ screen: {
404
+ name: string;
405
+ slug: string;
406
+ component_tree?: null | Record<string, unknown>;
407
+ };
408
+ };
409
+ FluidOSScreenUpdate: {
410
+ screen?: unknown;
411
+ }; /** FluidOS::Profile */
412
+ FluidOSProfile: {
413
+ id: number;
414
+ name?: string | null;
415
+ default?: boolean | null;
416
+ permissions?: components["schemas"]["FluidOSPermissions"] | null;
417
+ definition_id: number;
418
+ navigation: components["schemas"]["FluidOSNavigationWithItems"];
419
+ mobile_navigation: components["schemas"]["FluidOSNavigationWithItems"];
420
+ themes: components["schemas"]["FluidOSTheme"][];
421
+ }; /** FluidOS::Profile */
422
+ FluidOSProfileWithScreens: {
423
+ id: number;
424
+ name?: string | null;
425
+ default?: boolean | null;
426
+ permissions?: components["schemas"]["FluidOSPermissions"] | null;
427
+ definition_id: number;
428
+ navigation: components["schemas"]["FluidOSNavigationWithItems"];
429
+ mobile_navigation: components["schemas"]["FluidOSNavigationWithItems"];
430
+ themes: components["schemas"]["FluidOSTheme"][];
431
+ screens: {
432
+ [key: string]: unknown;
433
+ }[];
434
+ };
435
+ FluidOSProfileCreate: {
436
+ profile: {
437
+ name: string;
438
+ default?: boolean; /** @description Mutually exclusive with navigation_attributes */
439
+ navigation_id?: number; /** @description Mutually exclusive with mobile_navigation_attributes */
440
+ mobile_navigation_id?: number; /** @description Mutually exclusive with navigation_id */
441
+ navigation_attributes?: {
442
+ name: string;
443
+ navigation_items_attributes?: {
444
+ screen_id?: number;
445
+ icon?: string;
446
+ label?: string;
447
+ position?: number;
448
+ parent_id?: number;
449
+ slug?: string; /** @enum {null|string} */
450
+ source?: "user" | "system" | "code" | null;
451
+ }[];
452
+ }; /** @description Mutually exclusive with mobile_navigation_id */
453
+ mobile_navigation_attributes?: {
454
+ name: string;
455
+ navigation_items_attributes?: {
456
+ screen_id?: number;
457
+ icon?: string;
458
+ label?: string;
459
+ position?: number;
460
+ parent_id?: number;
461
+ slug?: string; /** @enum {null|string} */
462
+ source?: "user" | "system" | "code" | null;
463
+ }[];
464
+ };
465
+ theme_ids?: number[];
466
+ permissions?: {
467
+ countries?: number[];
468
+ ranks?: number[];
469
+ roles?: string[];
470
+ platform?: string[];
471
+ };
472
+ };
473
+ };
474
+ FluidOSProfileUpdate: {
475
+ profile: {
476
+ name?: string;
477
+ default?: boolean;
478
+ navigation_id?: number;
479
+ mobile_navigation_id?: number;
480
+ theme_ids?: number[];
481
+ permissions?: {
482
+ countries?: number[];
483
+ ranks?: number[];
484
+ roles?: string[];
485
+ platform?: string[];
486
+ };
487
+ };
488
+ };
489
+ FluidOSThemeCreate: {
490
+ theme: {
491
+ name: string;
492
+ config: Record<string, unknown>;
493
+ active?: boolean;
494
+ };
495
+ };
496
+ FluidOSThemeUpdate: {
497
+ theme: {
498
+ name?: string;
499
+ active?: boolean;
500
+ config?: Record<string, unknown>;
501
+ };
502
+ }; /** FluidOS::Navigation */
503
+ FluidOSNavigation: {
504
+ id: number;
505
+ name?: string | null;
506
+ definition_id: number; /** @enum {string} */
507
+ platform: "web" | "mobile";
508
+ screens: {
509
+ id: number;
510
+ name?: string | null;
511
+ slug?: string | null;
512
+ definition_id: number;
513
+ component_tree?: Record<string, unknown> | null;
514
+ }[];
515
+ }; /** FluidOS::Navigation */
516
+ FluidOSNavigationWithItems: {
517
+ id: number;
518
+ name?: string | null;
519
+ definition_id: number; /** @enum {string} */
520
+ platform: "web" | "mobile";
521
+ navigation_items: components["schemas"]["FluidOSNavigationItem"][];
522
+ };
523
+ FluidOSNavigationCreate: {
524
+ navigation: {
525
+ name: string; /** @enum {string} */
526
+ platform: "web" | "mobile";
527
+ };
528
+ };
529
+ FluidOSNavigationUpdate: {
530
+ navigation: {
531
+ name?: string; /** @enum {string} */
532
+ platform?: "web" | "mobile";
533
+ };
534
+ };
535
+ FluidOSNavigationItemCreate: {
536
+ navigation_item: {
537
+ icon?: string;
538
+ label: string;
539
+ position: number;
540
+ parent_id?: null | number;
541
+ screen_id?: null | number;
542
+ slug?: null | string; /** @enum {null|string} */
543
+ source?: "user" | "system" | "code" | null;
544
+ };
545
+ };
546
+ FluidOSNavigationItemUpdate: {
547
+ navigation_item: {
548
+ icon?: string;
549
+ label?: string;
550
+ position?: number;
551
+ parent_id?: null | number;
552
+ screen_id?: null | number;
553
+ slug?: null | string; /** @enum {null|string} */
554
+ source?: "user" | "system" | "code" | null;
555
+ };
556
+ }; /** FluidOS::Version */
557
+ FluidOSVersion: {
558
+ id: number;
559
+ active?: boolean | null;
560
+ manifest?: Record<string, unknown> | null; /** Format: date-time */
561
+ published_at?: string | null;
562
+ definition_id: number;
563
+ };
564
+ FluidOSVersionUpdate: {
565
+ version: {
566
+ active?: boolean;
567
+ };
568
+ };
569
+ };
570
+ responses: never;
571
+ parameters: never;
572
+ requestBodies: never;
573
+ headers: never;
574
+ pathItems: never;
575
+ }
576
+ //#endregion
227
577
  //#region src/client/types.d.ts
228
578
  /**
229
- * HTTP methods supported by the API client.
230
- * Use `as const` for literal type inference and type safety.
231
- */
579
+ * HTTP methods supported by the API client.
580
+ * Use `as const` for literal type inference and type safety.
581
+ */
232
582
  declare const HTTP_METHODS: {
233
583
  readonly GET: "GET";
234
584
  readonly POST: "POST";
@@ -237,52 +587,52 @@ declare const HTTP_METHODS: {
237
587
  readonly DELETE: "DELETE";
238
588
  };
239
589
  /**
240
- * Union type of all supported HTTP methods.
241
- * Derived from HTTP_METHODS constant to avoid duplication.
242
- */
590
+ * Union type of all supported HTTP methods.
591
+ * Derived from HTTP_METHODS constant to avoid duplication.
592
+ */
243
593
  type HttpMethod = (typeof HTTP_METHODS)[keyof typeof HTTP_METHODS];
244
594
  /**
245
- * Configuration for the Fluid SDK client.
246
- * Use Readonly<FluidSDKConfig> when the config should not be modified after creation.
247
- */
595
+ * Configuration for the Fluid SDK client.
596
+ * Use Readonly<FluidSDKConfig> when the config should not be modified after creation.
597
+ */
248
598
  interface FluidSDKConfig {
249
599
  /**
250
- * Base URL for API requests.
251
- * Accepts either the domain root (e.g., "https://api.fluid.app") or
252
- * with the /api path (e.g., "https://api.fluid.app/api").
253
- * The SDK normalizes internally for each consumer.
254
- */
600
+ * Base URL for API requests.
601
+ * Accepts either the domain root (e.g., "https://api.fluid.app") or
602
+ * with the /api path (e.g., "https://api.fluid.app/api").
603
+ * The SDK normalizes internally for each consumer.
604
+ */
255
605
  readonly baseUrl: string;
256
606
  /**
257
- * Function to retrieve the authentication token
258
- * Return null/undefined if no token is available
259
- */
607
+ * Function to retrieve the authentication token
608
+ * Return null/undefined if no token is available
609
+ */
260
610
  readonly getAuthToken?: () => string | null | Promise<string | null>;
261
611
  /**
262
- * Callback invoked when a 401 authentication error occurs
263
- * Use this to trigger re-authentication flows
264
- */
612
+ * Callback invoked when a 401 authentication error occurs
613
+ * Use this to trigger re-authentication flows
614
+ */
265
615
  readonly onAuthError?: () => void;
266
616
  /**
267
- * Default headers to include in all requests
268
- * Example: { "x-fluid-client": "rep-portal" }
269
- */
617
+ * Default headers to include in all requests
618
+ * Example: { "x-fluid-client": "rep-portal" }
619
+ */
270
620
  readonly defaultHeaders?: Readonly<Record<string, string>>;
271
621
  /**
272
- * Filestack API key for messaging file uploads.
273
- * If not provided, file attachments will be disabled in the messaging composer.
274
- */
622
+ * Filestack API key for messaging file uploads.
623
+ * If not provided, file attachments will be disabled in the messaging composer.
624
+ */
275
625
  readonly filestackApiKey?: string;
276
626
  /**
277
- * Override WebSocket URL for real-time messaging.
278
- * Default: derived from baseUrl by replacing trailing /api with /cable
279
- */
627
+ * Override WebSocket URL for real-time messaging.
628
+ * Default: derived from baseUrl by replacing trailing /api with /cable
629
+ */
280
630
  readonly websocketUrl?: string;
281
631
  }
282
632
  /**
283
- * Options for individual API requests.
284
- * Uses HttpMethod type for method to ensure type safety.
285
- */
633
+ * Options for individual API requests.
634
+ * Uses HttpMethod type for method to ensure type safety.
635
+ */
286
636
  interface RequestOptions {
287
637
  readonly method?: HttpMethod;
288
638
  readonly body?: unknown;
@@ -291,28 +641,28 @@ interface RequestOptions {
291
641
  readonly signal?: AbortSignal;
292
642
  }
293
643
  /**
294
- * Pagination parameters for list endpoints
295
- */
644
+ * Pagination parameters for list endpoints
645
+ */
296
646
  interface PaginationParams {
297
647
  readonly page?: number;
298
648
  readonly per_page?: number;
299
649
  }
300
650
  /**
301
- * Sort order constant - single source of truth for sort direction values.
302
- * Use SORT_ORDERS.asc instead of "asc" for type-safe comparisons.
303
- */
651
+ * Sort order constant - single source of truth for sort direction values.
652
+ * Use SORT_ORDERS.asc instead of "asc" for type-safe comparisons.
653
+ */
304
654
  declare const SORT_ORDERS: {
305
655
  readonly asc: "asc";
306
656
  readonly desc: "desc";
307
657
  };
308
658
  /**
309
- * Union type of sort order values, derived from SORT_ORDERS constant.
310
- * @see deriving-typeof-for-object-keys pattern
311
- */
659
+ * Union type of sort order values, derived from SORT_ORDERS constant.
660
+ * @see deriving-typeof-for-object-keys pattern
661
+ */
312
662
  type SortOrder = (typeof SORT_ORDERS)[keyof typeof SORT_ORDERS];
313
663
  /**
314
- * Common filter parameters for list endpoints
315
- */
664
+ * Common filter parameters for list endpoints
665
+ */
316
666
  interface BaseListParams extends PaginationParams {
317
667
  readonly sort_by?: string;
318
668
  readonly sort_order?: SortOrder;
@@ -329,23 +679,23 @@ interface RawApiScreen {
329
679
  component_tree?: unknown;
330
680
  }
331
681
  /**
332
- * Normalize component_tree to always be an array.
333
- * The API stores component_tree as a hash (object), but the frontend expects an array.
334
- */
682
+ * Normalize component_tree to always be an array.
683
+ * The API stores component_tree as a hash (object), but the frontend expects an array.
684
+ */
335
685
  declare function normalizeComponentTree(componentTree: unknown): WidgetSchema$1[];
336
686
  /**
337
- * Convert a raw FluidOS screen to ScreenDefinition.
338
- * Normalizes component_tree and converts string IDs to numbers.
339
- */
687
+ * Convert a raw FluidOS screen to ScreenDefinition.
688
+ * Normalizes component_tree and converts string IDs to numbers.
689
+ */
340
690
  declare function toScreenDefinition(screen: RawApiScreen): ScreenDefinition$1;
341
691
  //#endregion
342
692
  //#region src/transforms/navigation-transforms.d.ts
343
693
  /** Raw navigation item from the FluidOS API (derived from generated types) */
344
694
  type RawApiNavigationItem = components["schemas"]["FluidOSNavigationItem"];
345
695
  /**
346
- * Convert a raw FluidOS navigation item to NavigationItem.
347
- * Recursively transforms children and sorts by position.
348
- */
696
+ * Convert a raw FluidOS navigation item to NavigationItem.
697
+ * Recursively transforms children and sorts by position.
698
+ */
349
699
  declare function toNavigationItem(item: RawApiNavigationItem): NavigationItem$1;
350
700
  //#endregion
351
701
  //#region src/transforms/index.d.ts
@@ -375,20 +725,20 @@ interface RawManifestResponse {
375
725
  };
376
726
  }
377
727
  /**
378
- * Transform a raw FluidOS manifest API response into RepAppData.
379
- *
380
- * This is the top-level transform used by `FluidClient.app.get()`.
381
- * It handles:
382
- * - Theme transformation (legacy and new formats)
383
- * - Screen normalization (component_tree array wrapping)
384
- * - Navigation item transformation (recursive with position sorting)
385
- */
728
+ * Transform a raw FluidOS manifest API response into RepAppData.
729
+ *
730
+ * This is the top-level transform used by `FluidClient.app.get()`.
731
+ * It handles:
732
+ * - Theme transformation (legacy and new formats)
733
+ * - Screen normalization (component_tree array wrapping)
734
+ * - Navigation item transformation (recursive with position sorting)
735
+ */
386
736
  declare function transformManifestToRepAppData(response: RawManifestResponse): RepAppData$1;
387
737
  //#endregion
388
738
  //#region src/client/fluid-client.d.ts
389
739
  /**
390
- * API Error class for structured error handling
391
- */
740
+ * API Error class for structured error handling
741
+ */
392
742
  declare class ApiError extends Error {
393
743
  readonly status: number;
394
744
  readonly data: unknown;
@@ -401,13 +751,13 @@ declare class ApiError extends Error {
401
751
  };
402
752
  }
403
753
  /**
404
- * Type guard for ApiError
405
- */
754
+ * Type guard for ApiError
755
+ */
406
756
  declare function isApiError(error: unknown): error is ApiError;
407
757
  /**
408
- * Discriminated union representing the result of an API call.
409
- * Use `isApiSuccess` and `isApiFailure` type guards to narrow.
410
- */
758
+ * Discriminated union representing the result of an API call.
759
+ * Use `isApiSuccess` and `isApiFailure` type guards to narrow.
760
+ */
411
761
  type ApiResult<T> = {
412
762
  readonly success: true;
413
763
  readonly data: T;
@@ -501,69 +851,65 @@ interface SalesDataPoint {
501
851
  readonly orders: number;
502
852
  }
503
853
  /**
504
- * Creates a configured Fluid API client instance
505
- */
506
- declare function createFluidClient(config: FluidSDKConfig): {
507
- fetchClient: {
508
- request: <TResponse = unknown>(endpoint: string, options?: undefined) => Promise<TResponse>;
509
- requestWithFormData: <TResponse = unknown>(endpoint: string, formData: FormData, options?: Omit<undefined, "body" | "params"> & {
510
- method?: "POST" | "PUT" | "PATCH";
511
- }) => Promise<TResponse>;
512
- get: <TResponse = unknown>(endpoint: string, params?: Record<string, unknown>, options?: Omit<undefined, "method" | "params">) => Promise<TResponse>;
513
- post: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<undefined, "method" | "body">) => Promise<TResponse>;
514
- put: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<undefined, "method" | "body">) => Promise<TResponse>;
515
- patch: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<undefined, "method" | "body">) => Promise<TResponse>;
516
- delete: <TResponse = unknown>(endpoint: string, options?: Omit<undefined, "method">) => Promise<TResponse>;
517
- };
518
- request: <TResponse = unknown>(endpoint: string, options?: RequestOptions) => Promise<TResponse>;
519
- requestNullable: <TResponse>(endpoint: string, options?: RequestOptions) => Promise<TResponse | null>;
520
- safeRequest: <TResponse>(endpoint: string, options?: RequestOptions) => Promise<ApiResult<TResponse>>;
521
- get: <TResponse = unknown, TParams extends object = Record<string, unknown>>(endpoint: string, params?: TParams, options?: Omit<RequestOptions, "method" | "params">) => Promise<TResponse>;
522
- post: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions, "method" | "body">) => Promise<TResponse>;
523
- put: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions, "method" | "body">) => Promise<TResponse>;
524
- patch: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions, "method" | "body">) => Promise<TResponse>;
525
- delete: <TResponse = unknown>(endpoint: string, options?: Omit<RequestOptions, "method">) => Promise<TResponse>;
526
- products: {
527
- list: (params?: ProductListParams) => Promise<ProductsResponse>;
528
- get: (id: string | number) => Promise<{
854
+ * The shape returned by `createFluidClient`.
855
+ * Generic helper methods preserve their type parameters so callers
856
+ * can specify response types at each call site.
857
+ */
858
+ interface FluidClientReturn {
859
+ readonly fetchClient: FetchClient;
860
+ readonly request: <TResponse = unknown>(endpoint: string, options?: RequestOptions) => Promise<TResponse>;
861
+ readonly requestNullable: <TResponse>(endpoint: string, options?: RequestOptions) => Promise<TResponse | null>;
862
+ readonly safeRequest: <TResponse>(endpoint: string, options?: RequestOptions) => Promise<ApiResult<TResponse>>;
863
+ readonly get: <TResponse = unknown, TParams extends object = Record<string, unknown>>(endpoint: string, params?: TParams, options?: Omit<RequestOptions, "method" | "params">) => Promise<TResponse>;
864
+ readonly post: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions, "method" | "body">) => Promise<TResponse>;
865
+ readonly put: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions, "method" | "body">) => Promise<TResponse>;
866
+ readonly patch: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions, "method" | "body">) => Promise<TResponse>;
867
+ readonly delete: <TResponse = unknown>(endpoint: string, options?: Omit<RequestOptions, "method">) => Promise<TResponse>;
868
+ readonly products: {
869
+ readonly list: (params?: ProductListParams) => Promise<ProductsResponse>;
870
+ readonly get: (id: string | number) => Promise<{
529
871
  product: Product;
530
872
  }>;
531
- search: (query: string, params?: ProductListParams) => Promise<ProductsResponse>;
873
+ readonly search: (query: string, params?: ProductListParams) => Promise<ProductsResponse>;
532
874
  };
533
- orders: {
534
- list: (params?: OrderListParams) => Promise<Order[]>;
535
- get: (id: string) => Promise<Order>;
536
- create: (data: CreateOrderData) => Promise<Order>;
875
+ readonly orders: {
876
+ readonly list: (params?: OrderListParams) => Promise<Order[]>;
877
+ readonly get: (id: string) => Promise<Order>;
878
+ readonly create: (data: CreateOrderData) => Promise<Order>;
537
879
  };
538
- users: {
539
- me: () => Promise<UserMe>;
880
+ readonly users: {
881
+ readonly me: () => Promise<UserMe>;
540
882
  };
541
- reps: {
542
- current: () => Promise<Rep>;
543
- updateProfile: (data: UpdateRepData) => Promise<Rep>;
883
+ readonly reps: {
884
+ readonly current: () => Promise<Rep>;
885
+ readonly updateProfile: (data: UpdateRepData) => Promise<Rep>;
544
886
  };
545
- profile: {
546
- get: () => Promise<Profile>;
887
+ readonly profile: {
888
+ readonly get: () => Promise<Profile>;
547
889
  };
548
- app: {
549
- /** Fetch the raw manifest (plain JSON, no Color objects). Cache-safe. */getRaw: () => Promise<RawManifestResponse>; /** Fetch the active app definition with full theme/screen/navigation transforms */
550
- get: () => Promise<RepAppData$1>;
890
+ readonly app: {
891
+ readonly getRaw: () => Promise<RawManifestResponse>;
892
+ readonly get: () => Promise<RepAppData$1>;
551
893
  };
552
- permissions: {
553
- get: () => Promise<UserPermissions>;
894
+ readonly permissions: {
895
+ readonly get: () => Promise<UserPermissions>;
554
896
  };
555
- analytics: {
556
- dashboard: () => Promise<DashboardData>;
557
- sales: (params?: SalesParams) => Promise<SalesData>;
897
+ readonly analytics: {
898
+ readonly dashboard: () => Promise<DashboardData>;
899
+ readonly sales: (params?: SalesParams) => Promise<SalesData>;
558
900
  };
559
- };
901
+ }
902
+ /**
903
+ * Creates a configured Fluid API client instance
904
+ */
905
+ declare function createFluidClient(config: FluidSDKConfig): FluidClientReturn;
560
906
  type FluidClient = ReturnType<typeof createFluidClient>;
561
907
  //#endregion
562
908
  //#region src/providers/FluidProvider.d.ts
563
909
  /**
564
- * Context value for FluidProvider.
565
- * All properties are readonly since context values should not be mutated by consumers.
566
- */
910
+ * Context value for FluidProvider.
911
+ * All properties are readonly since context values should not be mutated by consumers.
912
+ */
567
913
  interface FluidContextValue {
568
914
  /** Configured API client instance */
569
915
  readonly client: FluidClient;
@@ -587,26 +933,26 @@ interface FluidProviderProps {
587
933
  variables?: Record<string, string>;
588
934
  }
589
935
  /**
590
- * Main provider for the Fluid Rep SDK
591
- *
592
- * @example
593
- * ```tsx
594
- * import { FluidProvider } from "@fluid-app/rep-sdk";
595
- *
596
- * function App() {
597
- * return (
598
- * <FluidProvider
599
- * config={{
600
- * baseUrl: "https://api.fluid.app/api",
601
- * getAuthToken: () => localStorage.getItem("token"),
602
- * }}
603
- * >
604
- * <YourApp />
605
- * </FluidProvider>
606
- * );
607
- * }
608
- * ```
609
- */
936
+ * Main provider for the Fluid Rep SDK
937
+ *
938
+ * @example
939
+ * ```tsx
940
+ * import { FluidProvider } from "@fluid-app/rep-sdk";
941
+ *
942
+ * function App() {
943
+ * return (
944
+ * <FluidProvider
945
+ * config={{
946
+ * baseUrl: "https://api.fluid.app/api",
947
+ * getAuthToken: () => localStorage.getItem("token"),
948
+ * }}
949
+ * >
950
+ * <YourApp />
951
+ * </FluidProvider>
952
+ * );
953
+ * }
954
+ * ```
955
+ */
610
956
  declare function FluidProvider({
611
957
  config,
612
958
  children,
@@ -615,19 +961,19 @@ declare function FluidProvider({
615
961
  themeContainer,
616
962
  widgetRegistry,
617
963
  variables
618
- }: FluidProviderProps): react_jsx_runtime0.JSX.Element;
964
+ }: FluidProviderProps): React.JSX.Element;
619
965
  /**
620
- * Hook to access the Fluid context
621
- * Must be used within a FluidProvider
622
- */
966
+ * Hook to access the Fluid context
967
+ * Must be used within a FluidProvider
968
+ */
623
969
  declare function useFluidContext(): FluidContextValue;
624
970
  //#endregion
625
971
  //#region src/providers/FluidThemeProvider.d.ts
626
972
  type ThemeMode$1 = "light" | "dark";
627
973
  /**
628
- * Context value for theme management.
629
- * All properties are readonly since context values should not be mutated by consumers.
630
- */
974
+ * Context value for theme management.
975
+ * All properties are readonly since context values should not be mutated by consumers.
976
+ */
631
977
  interface ThemeContextValue {
632
978
  /** Currently active theme definition */
633
979
  readonly currentTheme: ThemeDefinition | null;
@@ -649,11 +995,11 @@ declare function FluidThemeProvider({
649
995
  children,
650
996
  initialTheme,
651
997
  container
652
- }: FluidThemeProviderProps): react_jsx_runtime0.JSX.Element;
998
+ }: FluidThemeProviderProps): React.JSX.Element;
653
999
  /**
654
- * Hook to access theme context
655
- * Must be used within a FluidThemeProvider
656
- */
1000
+ * Hook to access theme context
1001
+ * Must be used within a FluidThemeProvider
1002
+ */
657
1003
  declare function useThemeContext(): ThemeContextValue;
658
1004
  //#endregion
659
1005
  //#region src/providers/FluidAuthProvider.d.ts
@@ -664,69 +1010,69 @@ interface FluidAuthProviderProps {
664
1010
  config?: FluidAuthConfig;
665
1011
  }
666
1012
  /**
667
- * Authentication provider for Fluid rep portal applications.
668
- *
669
- * On mount, this provider:
670
- * 1. Checks for a token in the URL (passed from parent app)
671
- * 2. Cleans token from URL immediately (security)
672
- * 3. Falls back to stored token (cookie/localStorage)
673
- * 4. Validates the token (checks expiration)
674
- * 5. Stores valid tokens for future use
675
- * 6. Calls onAuthFailure if no valid token found
676
- *
677
- * @example
678
- * ```tsx
679
- * import { FluidAuthProvider } from "@fluid-app/rep-sdk";
680
- *
681
- * function App() {
682
- * return (
683
- * <FluidAuthProvider
684
- * config={{
685
- * onAuthFailure: () => {
686
- * window.location.href = "/login";
687
- * },
688
- * }}
689
- * >
690
- * <YourApp />
691
- * </FluidAuthProvider>
692
- * );
693
- * }
694
- * ```
695
- */
1013
+ * Authentication provider for Fluid rep portal applications.
1014
+ *
1015
+ * On mount, this provider:
1016
+ * 1. Checks for a token in the URL (passed from parent app)
1017
+ * 2. Cleans token from URL immediately (security)
1018
+ * 3. Falls back to stored token (cookie/localStorage)
1019
+ * 4. Validates the token (checks expiration)
1020
+ * 5. Stores valid tokens for future use
1021
+ * 6. Calls onAuthFailure if no valid token found
1022
+ *
1023
+ * @example
1024
+ * ```tsx
1025
+ * import { FluidAuthProvider } from "@fluid-app/rep-sdk";
1026
+ *
1027
+ * function App() {
1028
+ * return (
1029
+ * <FluidAuthProvider
1030
+ * config={{
1031
+ * onAuthFailure: () => {
1032
+ * window.location.href = "/login";
1033
+ * },
1034
+ * }}
1035
+ * >
1036
+ * <YourApp />
1037
+ * </FluidAuthProvider>
1038
+ * );
1039
+ * }
1040
+ * ```
1041
+ */
696
1042
  declare function FluidAuthProvider({
697
1043
  children,
698
1044
  config
699
- }: FluidAuthProviderProps): react_jsx_runtime0.JSX.Element;
1045
+ }: FluidAuthProviderProps): React.JSX.Element;
700
1046
  /**
701
- * Hook to access the auth context directly.
702
- * Prefer using `useFluidAuth` for most use cases.
703
- *
704
- * @throws Error if used outside FluidAuthProvider
705
- */
1047
+ * Hook to access the auth context directly.
1048
+ * Prefer using `useFluidAuth` for most use cases.
1049
+ *
1050
+ * @throws Error if used outside FluidAuthProvider
1051
+ */
706
1052
  declare function useFluidAuthContext(): FluidAuthContextValue;
707
1053
  //#endregion
708
1054
  //#region src/types/screen-types.d.ts
709
1055
  /**
710
- * Screen Types - Type definitions for core feature screens
711
- *
712
- * All status and type unions are derived from constants for single source of truth.
713
- * Use the constants (e.g., CONVERSATION_STATUSES.active) for type-safe comparisons.
714
- */
1056
+ * Screen Types - Type definitions for core feature screens
1057
+ *
1058
+ * All status and type unions are derived from constants for single source of truth.
1059
+ * Use the constants (e.g., CONVERSATION_STATUSES.active) for type-safe comparisons.
1060
+ */
715
1061
  /**
716
- * Conversation status constant - single source of truth.
717
- */
1062
+ * Conversation status constant - single source of truth.
1063
+ */
718
1064
  declare const CONVERSATION_STATUSES: {
719
1065
  readonly active: "active";
720
1066
  readonly archived: "archived";
721
1067
  readonly muted: "muted";
722
1068
  };
723
1069
  /**
724
- * Union type derived from CONVERSATION_STATUSES constant.
725
- */
1070
+ * Union type derived from CONVERSATION_STATUSES constant.
1071
+ */
726
1072
  type ConversationStatus = (typeof CONVERSATION_STATUSES)[keyof typeof CONVERSATION_STATUSES];
727
1073
  /**
728
- * Message type constant - single source of truth.
729
- */
1074
+ * Message type constant - single source of truth.
1075
+ */
730
1076
  declare const MESSAGE_TYPES: {
731
1077
  readonly text: "text";
732
1078
  readonly image: "image";
@@ -734,8 +1080,8 @@ declare const MESSAGE_TYPES: {
734
1080
  readonly system: "system";
735
1081
  };
736
1082
  /**
737
- * Union type derived from MESSAGE_TYPES constant.
738
- */
1083
+ * Union type derived from MESSAGE_TYPES constant.
1084
+ */
739
1085
  type MessageType = (typeof MESSAGE_TYPES)[keyof typeof MESSAGE_TYPES];
740
1086
  interface Participant {
741
1087
  readonly id: string;
@@ -745,8 +1091,8 @@ interface Participant {
745
1091
  readonly isOnline?: boolean;
746
1092
  }
747
1093
  /**
748
- * Message attachment type - extracted for reusability and clarity.
749
- */
1094
+ * Message attachment type - extracted for reusability and clarity.
1095
+ */
750
1096
  interface MessageAttachment {
751
1097
  readonly id: string;
752
1098
  readonly name: string;
@@ -777,8 +1123,8 @@ interface Conversation {
777
1123
  readonly updatedAt: string;
778
1124
  }
779
1125
  /**
780
- * Contact status constant - single source of truth.
781
- */
1126
+ * Contact status constant - single source of truth.
1127
+ */
782
1128
  declare const CONTACT_STATUSES: {
783
1129
  readonly active: "active";
784
1130
  readonly inactive: "inactive";
@@ -786,19 +1132,19 @@ declare const CONTACT_STATUSES: {
786
1132
  readonly prospect: "prospect";
787
1133
  };
788
1134
  /**
789
- * Union type derived from CONTACT_STATUSES constant.
790
- */
1135
+ * Union type derived from CONTACT_STATUSES constant.
1136
+ */
791
1137
  type ContactStatus = (typeof CONTACT_STATUSES)[keyof typeof CONTACT_STATUSES];
792
1138
  /**
793
- * Contact type constant - single source of truth.
794
- */
1139
+ * Contact type constant - single source of truth.
1140
+ */
795
1141
  declare const CONTACT_TYPES: {
796
1142
  readonly individual: "individual";
797
1143
  readonly company: "company";
798
1144
  };
799
1145
  /**
800
- * Union type derived from CONTACT_TYPES constant.
801
- */
1146
+ * Union type derived from CONTACT_TYPES constant.
1147
+ */
802
1148
  type ContactType = (typeof CONTACT_TYPES)[keyof typeof CONTACT_TYPES];
803
1149
  interface ContactAddress {
804
1150
  readonly street?: string;
@@ -827,199 +1173,199 @@ interface Contact {
827
1173
  //#endregion
828
1174
  //#region src/providers/PageTemplateProvider.d.ts
829
1175
  /**
830
- * Context value for page template resolution.
831
- * All properties are readonly since context values should not be mutated by consumers.
832
- */
1176
+ * Context value for page template resolution.
1177
+ * All properties are readonly since context values should not be mutated by consumers.
1178
+ */
833
1179
  interface PageTemplateContextValue {
834
1180
  /**
835
- * Resolve a navigation's page_refs and screens into a unified screen list
836
- */
1181
+ * Resolve a navigation's page_refs and screens into a unified screen list
1182
+ */
837
1183
  readonly resolvePages: (navigation: Navigation) => ScreenDefinition[];
838
1184
  /**
839
- * Get all available page templates
840
- */
1185
+ * Get all available page templates
1186
+ */
841
1187
  readonly listTemplates: () => PageTemplate[];
842
1188
  /**
843
- * Get a specific template by ID
844
- */
1189
+ * Get a specific template by ID
1190
+ */
845
1191
  readonly getTemplate: (id: string) => PageTemplate | undefined;
846
1192
  /**
847
- * Check if a template exists
848
- */
1193
+ * Check if a template exists
1194
+ */
849
1195
  readonly hasTemplate: (id: string) => boolean;
850
1196
  }
851
1197
  /**
852
- * Props for PageTemplateProvider
853
- */
1198
+ * Props for PageTemplateProvider
1199
+ */
854
1200
  interface PageTemplateProviderProps {
855
1201
  children: React$1.ReactNode;
856
1202
  /**
857
- * Additional custom page templates to register.
858
- * These are registered when the provider mounts and unregistered when it unmounts.
859
- */
1203
+ * Additional custom page templates to register.
1204
+ * These are registered when the provider mounts and unregistered when it unmounts.
1205
+ */
860
1206
  templates?: readonly PageTemplate[];
861
1207
  }
862
1208
  /**
863
- * Provider for page template resolution.
864
- *
865
- * This provider:
866
- * 1. Registers any custom templates passed via props
867
- * 2. Provides methods for resolving navigation pages
868
- * 3. Cleans up custom templates on unmount
869
- *
870
- * @example
871
- * ```tsx
872
- * // With custom templates
873
- * const customTemplates: PageTemplate[] = [
874
- * {
875
- * id: 'custom-dashboard',
876
- * slug: 'dashboard',
877
- * name: 'Dashboard',
878
- * category: 'custom',
879
- * version: '1.0.0',
880
- * component_tree: [{ type: 'TextWidget', props: { text: 'Custom Dashboard' } }],
881
- * },
882
- * ];
883
- *
884
- * <PageTemplateProvider templates={customTemplates}>
885
- * <App />
886
- * </PageTemplateProvider>
887
- *
888
- * // Without custom templates (uses only core templates)
889
- * <PageTemplateProvider>
890
- * <App />
891
- * </PageTemplateProvider>
892
- * ```
893
- */
1209
+ * Provider for page template resolution.
1210
+ *
1211
+ * This provider:
1212
+ * 1. Registers any custom templates passed via props
1213
+ * 2. Provides methods for resolving navigation pages
1214
+ * 3. Cleans up custom templates on unmount
1215
+ *
1216
+ * @example
1217
+ * ```tsx
1218
+ * // With custom templates
1219
+ * const customTemplates: PageTemplate[] = [
1220
+ * {
1221
+ * id: 'custom-dashboard',
1222
+ * slug: 'dashboard',
1223
+ * name: 'Dashboard',
1224
+ * category: 'custom',
1225
+ * version: '1.0.0',
1226
+ * component_tree: [{ type: 'TextWidget', props: { text: 'Custom Dashboard' } }],
1227
+ * },
1228
+ * ];
1229
+ *
1230
+ * <PageTemplateProvider templates={customTemplates}>
1231
+ * <App />
1232
+ * </PageTemplateProvider>
1233
+ *
1234
+ * // Without custom templates (uses only core templates)
1235
+ * <PageTemplateProvider>
1236
+ * <App />
1237
+ * </PageTemplateProvider>
1238
+ * ```
1239
+ */
894
1240
  declare function PageTemplateProvider({
895
1241
  children,
896
1242
  templates
897
- }: PageTemplateProviderProps): react_jsx_runtime0.JSX.Element;
898
- /**
899
- * Hook to access page template functionality.
900
- *
901
- * @throws Error if used outside of PageTemplateProvider
902
- *
903
- * @example
904
- * ```tsx
905
- * function NavigationRenderer({ navigation }: { navigation: Navigation }) {
906
- * const { resolvePages } = usePageTemplates();
907
- * const screens = resolvePages(navigation);
908
- *
909
- * return (
910
- * <div>
911
- * {screens.map((screen) => (
912
- * <Screen key={screen.id} definition={screen} />
913
- * ))}
914
- * </div>
915
- * );
916
- * }
917
- * ```
918
- */
1243
+ }: PageTemplateProviderProps): React$1.JSX.Element;
1244
+ /**
1245
+ * Hook to access page template functionality.
1246
+ *
1247
+ * @throws Error if used outside of PageTemplateProvider
1248
+ *
1249
+ * @example
1250
+ * ```tsx
1251
+ * function NavigationRenderer({ navigation }: { navigation: Navigation }) {
1252
+ * const { resolvePages } = usePageTemplates();
1253
+ * const screens = resolvePages(navigation);
1254
+ *
1255
+ * return (
1256
+ * <div>
1257
+ * {screens.map((screen) => (
1258
+ * <Screen key={screen.id} definition={screen} />
1259
+ * ))}
1260
+ * </div>
1261
+ * );
1262
+ * }
1263
+ * ```
1264
+ */
919
1265
  declare function usePageTemplates(): PageTemplateContextValue;
920
1266
  /**
921
- * Hook to resolve navigation pages directly.
922
- * Convenience wrapper around usePageTemplates().resolvePages.
923
- *
924
- * @param navigation - The navigation to resolve
925
- * @returns Array of resolved screen definitions
926
- */
1267
+ * Hook to resolve navigation pages directly.
1268
+ * Convenience wrapper around usePageTemplates().resolvePages.
1269
+ *
1270
+ * @param navigation - The navigation to resolve
1271
+ * @returns Array of resolved screen definitions
1272
+ */
927
1273
  declare function useResolvedPages(navigation: Navigation): ScreenDefinition[];
928
1274
  //#endregion
929
1275
  //#region src/hooks/use-fluid-api.d.ts
930
1276
  /**
931
- * Hook to access the Fluid API client
932
- *
933
- * @example
934
- * ```tsx
935
- * function ProductList() {
936
- * const api = useFluidApi();
937
- *
938
- * const { data: products } = useQuery({
939
- * queryKey: ["products"],
940
- * queryFn: () => api.products.list(),
941
- * });
942
- *
943
- * return <ul>{products?.map(p => <li key={p.id}>{p.name}</li>)}</ul>;
944
- * }
945
- * ```
946
- */
1277
+ * Hook to access the Fluid API client
1278
+ *
1279
+ * @example
1280
+ * ```tsx
1281
+ * function ProductList() {
1282
+ * const api = useFluidApi();
1283
+ *
1284
+ * const { data: products } = useQuery({
1285
+ * queryKey: ["products"],
1286
+ * queryFn: () => api.products.list(),
1287
+ * });
1288
+ *
1289
+ * return <ul>{products?.map(p => <li key={p.id}>{p.name}</li>)}</ul>;
1290
+ * }
1291
+ * ```
1292
+ */
947
1293
  declare function useFluidApi(): FluidClient;
948
1294
  //#endregion
949
1295
  //#region src/hooks/use-fluid-profile.d.ts
950
1296
  /**
951
- * Query key for profile data
952
- */
1297
+ * Query key for profile data
1298
+ */
953
1299
  declare const PROFILE_QUERY_KEY: readonly ["fluid", "profile"];
954
1300
  /**
955
- * Hook to fetch the rep portal profile (themes, navigation, screens)
956
- *
957
- * @example
958
- * ```tsx
959
- * function Navigation() {
960
- * const { data: profile, isLoading } = useFluidProfile();
961
- *
962
- * if (isLoading) return <Spinner />;
963
- *
964
- * return (
965
- * <nav>
966
- * {profile?.navigation.navigation_items.map(item => (
967
- * <NavItem key={item.id} item={item} />
968
- * ))}
969
- * </nav>
970
- * );
971
- * }
972
- * ```
973
- */
1301
+ * Hook to fetch the rep portal profile (themes, navigation, screens)
1302
+ *
1303
+ * @example
1304
+ * ```tsx
1305
+ * function Navigation() {
1306
+ * const { data: profile, isLoading } = useFluidProfile();
1307
+ *
1308
+ * if (isLoading) return <Spinner />;
1309
+ *
1310
+ * return (
1311
+ * <nav>
1312
+ * {profile?.navigation.navigation_items.map(item => (
1313
+ * <NavItem key={item.id} item={item} />
1314
+ * ))}
1315
+ * </nav>
1316
+ * );
1317
+ * }
1318
+ * ```
1319
+ */
974
1320
  declare function useFluidProfile(): UseQueryResult<Profile>;
975
1321
  //#endregion
976
1322
  //#region src/hooks/use-fluid-app.d.ts
977
1323
  /**
978
- * Query key for full app data (fluidos endpoint)
979
- */
1324
+ * Query key for full app data (fluidos endpoint)
1325
+ */
980
1326
  declare const APP_DATA_QUERY_KEY: readonly ["fluid", "app"];
981
1327
  /**
982
- * Hook to fetch the full rep app data from the fluidos API.
983
- *
984
- * Returns a `RepAppData` object containing:
985
- * - `screens` — all screen definitions with normalized component trees
986
- * - `profile.themes` — fully-transformed ThemeDefinition[] (handles legacy + new formats)
987
- * - `profile.activeThemeId` — the currently active theme ID
988
- * - `profile.navigation.navigation_items` — sorted, recursive navigation tree
989
- *
990
- * Uses IndexedDB persistence so subsequent page loads hydrate instantly
991
- * from cache while revalidating in the background. The raw API response
992
- * (plain JSON) is cached; Color objects are recreated from cache via
993
- * `select` on every restore — this is fast (CPU only, no network).
994
- *
995
- * @example
996
- * ```tsx
997
- * function App() {
998
- * const { data: appData, isLoading } = useFluidApp();
999
- *
1000
- * if (isLoading) return <Spinner />;
1001
- *
1002
- * return (
1003
- * <AppShell
1004
- * appData={appData}
1005
- * navigation={appData.profile.navigation.navigation_items}
1006
- * />
1007
- * );
1008
- * }
1009
- * ```
1010
- */
1328
+ * Hook to fetch the full rep app data from the fluidos API.
1329
+ *
1330
+ * Returns a `RepAppData` object containing:
1331
+ * - `screens` — all screen definitions with normalized component trees
1332
+ * - `profile.themes` — fully-transformed ThemeDefinition[] (handles legacy + new formats)
1333
+ * - `profile.activeThemeId` — the currently active theme ID
1334
+ * - `profile.navigation.navigation_items` — sorted, recursive navigation tree
1335
+ *
1336
+ * Uses IndexedDB persistence so subsequent page loads hydrate instantly
1337
+ * from cache while revalidating in the background. The raw API response
1338
+ * (plain JSON) is cached; Color objects are recreated from cache via
1339
+ * `select` on every restore — this is fast (CPU only, no network).
1340
+ *
1341
+ * @example
1342
+ * ```tsx
1343
+ * function App() {
1344
+ * const { data: appData, isLoading } = useFluidApp();
1345
+ *
1346
+ * if (isLoading) return <Spinner />;
1347
+ *
1348
+ * return (
1349
+ * <AppShell
1350
+ * appData={appData}
1351
+ * navigation={appData.profile.navigation.navigation_items}
1352
+ * />
1353
+ * );
1354
+ * }
1355
+ * ```
1356
+ */
1011
1357
  declare function useFluidApp(options?: {
1012
1358
  enabled?: boolean;
1013
1359
  }): UseQueryResult<RepAppData$1>;
1014
1360
  //#endregion
1015
1361
  //#region src/hooks/use-fluid-permissions.d.ts
1016
1362
  /**
1017
- * Query key for permissions data
1018
- */
1363
+ * Query key for permissions data
1364
+ */
1019
1365
  declare const PERMISSIONS_QUERY_KEY: readonly ["fluid", "permissions"];
1020
1366
  /**
1021
- * Result of useFluidPermissions hook
1022
- */
1367
+ * Result of useFluidPermissions hook
1368
+ */
1023
1369
  interface UseFluidPermissionsResult {
1024
1370
  /** Raw permissions query result */
1025
1371
  query: UseQueryResult<UserPermissions>;
@@ -1031,27 +1377,27 @@ interface UseFluidPermissionsResult {
1031
1377
  isSuperAdmin: boolean;
1032
1378
  }
1033
1379
  /**
1034
- * Hook to fetch and check user permissions
1035
- *
1036
- * @example
1037
- * ```tsx
1038
- * function TeamSettings() {
1039
- * const { can, isSuperAdmin } = useFluidPermissions();
1040
- *
1041
- * if (!can("team", "manage")) {
1042
- * return <AccessDenied />;
1043
- * }
1044
- *
1045
- * return <TeamSettingsForm canDelete={can("team", "delete")} />;
1046
- * }
1047
- * ```
1048
- */
1380
+ * Hook to fetch and check user permissions
1381
+ *
1382
+ * @example
1383
+ * ```tsx
1384
+ * function TeamSettings() {
1385
+ * const { can, isSuperAdmin } = useFluidPermissions();
1386
+ *
1387
+ * if (!can("team", "manage")) {
1388
+ * return <AccessDenied />;
1389
+ * }
1390
+ *
1391
+ * return <TeamSettingsForm canDelete={can("team", "delete")} />;
1392
+ * }
1393
+ * ```
1394
+ */
1049
1395
  declare function useFluidPermissions(): UseFluidPermissionsResult;
1050
1396
  //#endregion
1051
1397
  //#region src/hooks/use-fluid-theme.d.ts
1052
1398
  /**
1053
- * Result of useFluidTheme hook
1054
- */
1399
+ * Result of useFluidTheme hook
1400
+ */
1055
1401
  interface UseFluidThemeResult {
1056
1402
  /** Currently active theme */
1057
1403
  currentTheme: ThemeDefinition | null;
@@ -1063,126 +1409,126 @@ interface UseFluidThemeResult {
1063
1409
  mode: "light" | "dark" | undefined;
1064
1410
  }
1065
1411
  /**
1066
- * Hook to access and control theme settings
1067
- *
1068
- * @example
1069
- * ```tsx
1070
- * function ThemeSwitcher({ themes }: { themes: ThemeDefinition[] }) {
1071
- * const { currentTheme, setTheme, setThemeMode, mode } = useFluidTheme();
1072
- *
1073
- * return (
1074
- * <div>
1075
- * <select
1076
- * value={currentTheme?.name}
1077
- * onChange={(e) => {
1078
- * const theme = themes.find(t => t.name === e.target.value);
1079
- * if (theme) setTheme(theme);
1080
- * }}
1081
- * >
1082
- * {themes.map(theme => (
1083
- * <option key={theme.name} value={theme.name}>
1084
- * {theme.name}
1085
- * </option>
1086
- * ))}
1087
- * </select>
1088
- *
1089
- * <button onClick={() => setThemeMode(mode === "dark" ? "light" : "dark")}>
1090
- * Toggle {mode === "dark" ? "Light" : "Dark"} Mode
1091
- * </button>
1092
- * </div>
1093
- * );
1094
- * }
1095
- * ```
1096
- */
1412
+ * Hook to access and control theme settings
1413
+ *
1414
+ * @example
1415
+ * ```tsx
1416
+ * function ThemeSwitcher({ themes }: { themes: ThemeDefinition[] }) {
1417
+ * const { currentTheme, setTheme, setThemeMode, mode } = useFluidTheme();
1418
+ *
1419
+ * return (
1420
+ * <div>
1421
+ * <select
1422
+ * value={currentTheme?.name}
1423
+ * onChange={(e) => {
1424
+ * const theme = themes.find(t => t.name === e.target.value);
1425
+ * if (theme) setTheme(theme);
1426
+ * }}
1427
+ * >
1428
+ * {themes.map(theme => (
1429
+ * <option key={theme.name} value={theme.name}>
1430
+ * {theme.name}
1431
+ * </option>
1432
+ * ))}
1433
+ * </select>
1434
+ *
1435
+ * <button onClick={() => setThemeMode(mode === "dark" ? "light" : "dark")}>
1436
+ * Toggle {mode === "dark" ? "Light" : "Dark"} Mode
1437
+ * </button>
1438
+ * </div>
1439
+ * );
1440
+ * }
1441
+ * ```
1442
+ */
1097
1443
  declare function useFluidTheme(): UseFluidThemeResult;
1098
1444
  //#endregion
1099
1445
  //#region src/hooks/use-current-rep.d.ts
1100
1446
  /**
1101
- * Query key for current rep data
1102
- */
1447
+ * Query key for current rep data
1448
+ */
1103
1449
  declare const CURRENT_REP_QUERY_KEY: readonly ["fluid", "currentRep"];
1104
1450
  /**
1105
- * Hook to fetch the currently authenticated rep's profile
1106
- *
1107
- * @example
1108
- * ```tsx
1109
- * function RepHeader() {
1110
- * const { data: rep, isLoading } = useCurrentRep();
1111
- *
1112
- * if (isLoading) return <Skeleton />;
1113
- *
1114
- * return (
1115
- * <div>
1116
- * <Avatar src={rep?.avatar_url} />
1117
- * <span>{rep?.first_name} {rep?.last_name}</span>
1118
- * </div>
1119
- * );
1120
- * }
1121
- * ```
1122
- */
1451
+ * Hook to fetch the currently authenticated rep's profile
1452
+ *
1453
+ * @example
1454
+ * ```tsx
1455
+ * function RepHeader() {
1456
+ * const { data: rep, isLoading } = useCurrentRep();
1457
+ *
1458
+ * if (isLoading) return <Skeleton />;
1459
+ *
1460
+ * return (
1461
+ * <div>
1462
+ * <Avatar src={rep?.avatar_url} />
1463
+ * <span>{rep?.first_name} {rep?.last_name}</span>
1464
+ * </div>
1465
+ * );
1466
+ * }
1467
+ * ```
1468
+ */
1123
1469
  declare function useCurrentRep(): UseQueryResult<Rep>;
1124
1470
  //#endregion
1125
1471
  //#region src/hooks/use-fluid-auth.d.ts
1126
1472
  /**
1127
- * Hook to access authentication state and utilities.
1128
- *
1129
- * Must be used within a `FluidAuthProvider`.
1130
- *
1131
- * @returns Authentication context with user info, loading state, and utilities
1132
- * @throws Error if used outside FluidAuthProvider
1133
- *
1134
- * @example
1135
- * ```tsx
1136
- * function UserProfile() {
1137
- * const { isAuthenticated, isLoading, user, clearAuth } = useFluidAuth();
1138
- *
1139
- * if (isLoading) {
1140
- * return <Spinner />;
1141
- * }
1142
- *
1143
- * if (!isAuthenticated) {
1144
- * return <p>Please log in</p>;
1145
- * }
1146
- *
1147
- * return (
1148
- * <div>
1149
- * <p>Welcome, {user.full_name}!</p>
1150
- * <button onClick={clearAuth}>Log out</button>
1151
- * </div>
1152
- * );
1153
- * }
1154
- * ```
1155
- */
1473
+ * Hook to access authentication state and utilities.
1474
+ *
1475
+ * Must be used within a `FluidAuthProvider`.
1476
+ *
1477
+ * @returns Authentication context with user info, loading state, and utilities
1478
+ * @throws Error if used outside FluidAuthProvider
1479
+ *
1480
+ * @example
1481
+ * ```tsx
1482
+ * function UserProfile() {
1483
+ * const { isAuthenticated, isLoading, user, clearAuth } = useFluidAuth();
1484
+ *
1485
+ * if (isLoading) {
1486
+ * return <Spinner />;
1487
+ * }
1488
+ *
1489
+ * if (!isAuthenticated) {
1490
+ * return <p>Please log in</p>;
1491
+ * }
1492
+ *
1493
+ * return (
1494
+ * <div>
1495
+ * <p>Welcome, {user.full_name}!</p>
1496
+ * <button onClick={clearAuth}>Log out</button>
1497
+ * </div>
1498
+ * );
1499
+ * }
1500
+ * ```
1501
+ */
1156
1502
  declare function useFluidAuth(): FluidAuthContextValue;
1157
1503
  //#endregion
1158
1504
  //#region src/hooks/hook-types.d.ts
1159
1505
  /**
1160
- * Hook type utilities and type predicates.
1161
- *
1162
- * This module provides:
1163
- * - Generic hook result types with default type parameters
1164
- * - Type predicates for query state narrowing
1165
- * - Reusable patterns for type-safe property access in hooks
1166
- *
1167
- * Following generics best practices:
1168
- * - generics-default-type-parameters: Default E to Error for common case
1169
- * - generics-type-predicates: Type predicates for result state narrowing
1170
- * - generics-constrain-type-parameters: K extends keyof T for property access
1171
- */
1172
- /**
1173
- * Base result type for query hooks with default error type.
1174
- * Uses default type parameter for E (generics-default-type-parameters rule).
1175
- *
1176
- * @typeParam T - The data type
1177
- * @typeParam E - The error type (defaults to Error)
1178
- *
1179
- * @example
1180
- * // Error type defaults to Error
1181
- * type UsersResult = QueryResult<User[]>;
1182
- *
1183
- * // Can override when needed
1184
- * type CustomResult = QueryResult<User[], ApiError>;
1185
- */
1506
+ * Hook type utilities and type predicates.
1507
+ *
1508
+ * This module provides:
1509
+ * - Generic hook result types with default type parameters
1510
+ * - Type predicates for query state narrowing
1511
+ * - Reusable patterns for type-safe property access in hooks
1512
+ *
1513
+ * Following generics best practices:
1514
+ * - generics-default-type-parameters: Default E to Error for common case
1515
+ * - generics-type-predicates: Type predicates for result state narrowing
1516
+ * - generics-constrain-type-parameters: K extends keyof T for property access
1517
+ */
1518
+ /**
1519
+ * Base result type for query hooks with default error type.
1520
+ * Uses default type parameter for E (generics-default-type-parameters rule).
1521
+ *
1522
+ * @typeParam T - The data type
1523
+ * @typeParam E - The error type (defaults to Error)
1524
+ *
1525
+ * @example
1526
+ * // Error type defaults to Error
1527
+ * type UsersResult = QueryResult<User[]>;
1528
+ *
1529
+ * // Can override when needed
1530
+ * type CustomResult = QueryResult<User[], ApiError>;
1531
+ */
1186
1532
  interface QueryResult<T, E = Error> {
1187
1533
  readonly data: T;
1188
1534
  readonly isLoading: boolean;
@@ -1190,12 +1536,12 @@ interface QueryResult<T, E = Error> {
1190
1536
  readonly error?: E | undefined;
1191
1537
  }
1192
1538
  /**
1193
- * Result type for hooks that may not have data yet.
1194
- * Extends QueryResult with nullable data.
1195
- *
1196
- * @typeParam T - The data type
1197
- * @typeParam E - The error type (defaults to Error)
1198
- */
1539
+ * Result type for hooks that may not have data yet.
1540
+ * Extends QueryResult with nullable data.
1541
+ *
1542
+ * @typeParam T - The data type
1543
+ * @typeParam E - The error type (defaults to Error)
1544
+ */
1199
1545
  interface QueryResultNullable<T, E = Error> {
1200
1546
  readonly data: T | null | undefined;
1201
1547
  readonly isLoading: boolean;
@@ -1203,119 +1549,119 @@ interface QueryResultNullable<T, E = Error> {
1203
1549
  readonly error?: E | undefined;
1204
1550
  }
1205
1551
  /**
1206
- * Result type for list/collection hooks with aggregates.
1207
- *
1208
- * @typeParam T - The item type in the array
1209
- * @typeParam E - The error type (defaults to Error)
1210
- */
1552
+ * Result type for list/collection hooks with aggregates.
1553
+ *
1554
+ * @typeParam T - The item type in the array
1555
+ * @typeParam E - The error type (defaults to Error)
1556
+ */
1211
1557
  interface ListQueryResult<T, E = Error> extends QueryResult<T[], E> {
1212
1558
  readonly totalCount: number;
1213
1559
  }
1214
1560
  /**
1215
- * Result type for list hooks with value aggregation (e.g., deals with total value).
1216
- *
1217
- * @typeParam T - The item type in the array
1218
- * @typeParam E - The error type (defaults to Error)
1219
- */
1561
+ * Result type for list hooks with value aggregation (e.g., deals with total value).
1562
+ *
1563
+ * @typeParam T - The item type in the array
1564
+ * @typeParam E - The error type (defaults to Error)
1565
+ */
1220
1566
  interface ValueListQueryResult<T, E = Error> extends ListQueryResult<T, E> {
1221
1567
  readonly totalValue: number;
1222
1568
  }
1223
1569
  /**
1224
- * Type predicate to check if a query result has successfully loaded data.
1225
- * Narrows the data type from T | null | undefined to T.
1226
- *
1227
- * @example
1228
- * const result = useContact(id);
1229
- * if (hasData(result)) {
1230
- * // TypeScript knows result.data is Contact, not Contact | null
1231
- * console.log(result.data.name);
1232
- * }
1233
- */
1570
+ * Type predicate to check if a query result has successfully loaded data.
1571
+ * Narrows the data type from T | null | undefined to T.
1572
+ *
1573
+ * @example
1574
+ * const result = useContact(id);
1575
+ * if (hasData(result)) {
1576
+ * // TypeScript knows result.data is Contact, not Contact | null
1577
+ * console.log(result.data.name);
1578
+ * }
1579
+ */
1234
1580
  declare function hasData<T, E = Error>(result: QueryResultNullable<T, E>): result is QueryResultNullable<T, E> & {
1235
1581
  readonly data: T;
1236
1582
  };
1237
1583
  /**
1238
- * Type predicate to check if a query result is in loading state.
1239
- * Useful for conditional rendering.
1240
- *
1241
- * @example
1242
- * if (isLoading(result)) {
1243
- * return <Spinner />;
1244
- * }
1245
- */
1584
+ * Type predicate to check if a query result is in loading state.
1585
+ * Useful for conditional rendering.
1586
+ *
1587
+ * @example
1588
+ * if (isLoading(result)) {
1589
+ * return <Spinner />;
1590
+ * }
1591
+ */
1246
1592
  declare function isLoading<T, E = Error>(result: QueryResult<T, E> | QueryResultNullable<T, E>): boolean;
1247
1593
  /**
1248
- * Type predicate to check if a query result has an error.
1249
- * Narrows to include the error property.
1250
- *
1251
- * @example
1252
- * if (isErrorResult(result)) {
1253
- * console.error(result.error); // error is E, not undefined
1254
- * }
1255
- */
1594
+ * Type predicate to check if a query result has an error.
1595
+ * Narrows to include the error property.
1596
+ *
1597
+ * @example
1598
+ * if (isErrorResult(result)) {
1599
+ * console.error(result.error); // error is E, not undefined
1600
+ * }
1601
+ */
1256
1602
  declare function isErrorResult<T, E = Error>(result: QueryResult<T, E> | QueryResultNullable<T, E>): result is (QueryResult<T, E> | QueryResultNullable<T, E>) & {
1257
1603
  readonly isError: true;
1258
1604
  readonly error: E;
1259
1605
  };
1260
1606
  /**
1261
- * Type predicate to check if a query result is in idle state (not loading, no error, has data).
1262
- *
1263
- * @example
1264
- * if (isIdle(result)) {
1265
- * // Safe to access and render data
1266
- * }
1267
- */
1607
+ * Type predicate to check if a query result is in idle state (not loading, no error, has data).
1608
+ *
1609
+ * @example
1610
+ * if (isIdle(result)) {
1611
+ * // Safe to access and render data
1612
+ * }
1613
+ */
1268
1614
  declare function isIdle<T, E = Error>(result: QueryResult<T, E> | QueryResultNullable<T, E>): boolean;
1269
1615
  /**
1270
- * Type-safe property selector for hook results.
1271
- * Uses K extends keyof T constraint (generics-function-constraints rule).
1272
- *
1273
- * @typeParam T - The data object type
1274
- * @typeParam K - Key of T (constrained to actual keys)
1275
- *
1276
- * @example
1277
- * const users = [{ name: "Alice", age: 30 }];
1278
- * const names = selectProperty(users, "name"); // string[]
1279
- * const ages = selectProperty(users, "age"); // number[]
1280
- * selectProperty(users, "invalid"); // Error: "invalid" not in "name" | "age"
1281
- */
1616
+ * Type-safe property selector for hook results.
1617
+ * Uses K extends keyof T constraint (generics-function-constraints rule).
1618
+ *
1619
+ * @typeParam T - The data object type
1620
+ * @typeParam K - Key of T (constrained to actual keys)
1621
+ *
1622
+ * @example
1623
+ * const users = [{ name: "Alice", age: 30 }];
1624
+ * const names = selectProperty(users, "name"); // string[]
1625
+ * const ages = selectProperty(users, "age"); // number[]
1626
+ * selectProperty(users, "invalid"); // Error: "invalid" not in "name" | "age"
1627
+ */
1282
1628
  declare function selectProperty<T, K extends keyof T>(items: readonly T[], key: K): T[K][];
1283
1629
  /**
1284
- * Type-safe property getter for a single item.
1285
- * Returns undefined if item is null/undefined.
1286
- *
1287
- * @typeParam T - The data object type
1288
- * @typeParam K - Key of T (constrained to actual keys)
1289
- */
1630
+ * Type-safe property getter for a single item.
1631
+ * Returns undefined if item is null/undefined.
1632
+ *
1633
+ * @typeParam T - The data object type
1634
+ * @typeParam K - Key of T (constrained to actual keys)
1635
+ */
1290
1636
  declare function getProperty<T, K extends keyof T>(item: T | null | undefined, key: K): T[K] | undefined;
1291
1637
  /**
1292
- * Generic type for hooks that fetch a single resource by ID.
1293
- * Useful for creating consistent API across different resource types.
1294
- *
1295
- * @typeParam T - The resource type
1296
- * @typeParam E - The error type (defaults to Error)
1297
- */
1638
+ * Generic type for hooks that fetch a single resource by ID.
1639
+ * Useful for creating consistent API across different resource types.
1640
+ *
1641
+ * @typeParam T - The resource type
1642
+ * @typeParam E - The error type (defaults to Error)
1643
+ */
1298
1644
  type UseSingleResourceHook<T, E = Error> = (id: string) => QueryResultNullable<T, E>;
1299
1645
  /**
1300
- * Generic type for hooks that fetch a list of resources with optional params.
1301
- * Uses generics-default-type-parameters for the params type.
1302
- *
1303
- * @typeParam T - The item type
1304
- * @typeParam P - The params type (defaults to empty object)
1305
- * @typeParam E - The error type (defaults to Error)
1306
- */
1646
+ * Generic type for hooks that fetch a list of resources with optional params.
1647
+ * Uses generics-default-type-parameters for the params type.
1648
+ *
1649
+ * @typeParam T - The item type
1650
+ * @typeParam P - The params type (defaults to empty object)
1651
+ * @typeParam E - The error type (defaults to Error)
1652
+ */
1307
1653
  type UseListResourceHook<T, P extends Record<string, unknown> = Record<string, never>, E = Error> = (params?: P) => ListQueryResult<T, E>;
1308
1654
  /**
1309
- * Transforms a nullable result to a non-nullable one if data exists.
1310
- * Useful when you've already checked hasData().
1311
- */
1655
+ * Transforms a nullable result to a non-nullable one if data exists.
1656
+ * Useful when you've already checked hasData().
1657
+ */
1312
1658
  type WithData<R extends QueryResultNullable<unknown>> = R extends QueryResultNullable<infer T, infer E> ? QueryResultNullable<T, E> & {
1313
1659
  readonly data: T;
1314
1660
  } : never;
1315
1661
  /**
1316
- * Activity slug constants as a const object.
1317
- * Derive the ActivitySlug type from this single source of truth.
1318
- */
1662
+ * Activity slug constants as a const object.
1663
+ * Derive the ActivitySlug type from this single source of truth.
1664
+ */
1319
1665
  declare const ACTIVITY_SLUGS: {
1320
1666
  readonly abandonedCart: "abandoned_cart";
1321
1667
  readonly announcements: "announcements";
@@ -1408,121 +1754,121 @@ interface Todo {
1408
1754
  //#endregion
1409
1755
  //#region src/hooks/use-calendar-events.d.ts
1410
1756
  /**
1411
- * Result type for useCalendarEvents hook.
1412
- * Uses QueryResult<CalendarEvent[]> with default Error type.
1413
- */
1757
+ * Result type for useCalendarEvents hook.
1758
+ * Uses QueryResult<CalendarEvent[]> with default Error type.
1759
+ */
1414
1760
  type UseCalendarEventsResult = QueryResult<CalendarEvent[]>;
1415
1761
  /**
1416
- * Hook to fetch calendar events.
1417
- * This is a stub implementation - override with your own data fetching logic.
1418
- */
1762
+ * Hook to fetch calendar events.
1763
+ * This is a stub implementation - override with your own data fetching logic.
1764
+ */
1419
1765
  declare function useCalendarEvents(): UseCalendarEventsResult;
1420
1766
  //#endregion
1421
1767
  //#region src/hooks/use-todos.d.ts
1422
1768
  /**
1423
- * Result type for useTodos hook.
1424
- * Uses QueryResult<Todo[]> with default Error type.
1425
- */
1769
+ * Result type for useTodos hook.
1770
+ * Uses QueryResult<Todo[]> with default Error type.
1771
+ */
1426
1772
  type UseTodosResult = QueryResult<Todo[]>;
1427
1773
  /**
1428
- * Hook to fetch todo items.
1429
- * This is a stub implementation - override with your own data fetching logic.
1430
- */
1774
+ * Hook to fetch todo items.
1775
+ * This is a stub implementation - override with your own data fetching logic.
1776
+ */
1431
1777
  declare function useTodos(): UseTodosResult;
1432
1778
  //#endregion
1433
1779
  //#region src/hooks/use-activities.d.ts
1434
1780
  /**
1435
- * Result type for useActivities hook.
1436
- * Uses QueryResult generic with Activity[] and default Error type.
1437
- */
1781
+ * Result type for useActivities hook.
1782
+ * Uses QueryResult generic with Activity[] and default Error type.
1783
+ */
1438
1784
  type UseActivitiesResult = QueryResult<Activity[]>;
1439
1785
  /**
1440
- * Hook to fetch recent activities.
1441
- * This is a stub implementation - override with your own data fetching logic.
1442
- */
1786
+ * Hook to fetch recent activities.
1787
+ * This is a stub implementation - override with your own data fetching logic.
1788
+ */
1443
1789
  declare function useActivities(): UseActivitiesResult;
1444
1790
  //#endregion
1445
1791
  //#region src/hooks/use-catchups.d.ts
1446
1792
  /**
1447
- * Result type for useCatchUps hook.
1448
- * Uses QueryResult<CatchUp[]> with default Error type.
1449
- */
1793
+ * Result type for useCatchUps hook.
1794
+ * Uses QueryResult<CatchUp[]> with default Error type.
1795
+ */
1450
1796
  type UseCatchUpsResult = QueryResult<CatchUp[]>;
1451
1797
  /**
1452
- * Hook to fetch catch up items.
1453
- * This is a stub implementation - override with your own data fetching logic.
1454
- */
1798
+ * Hook to fetch catch up items.
1799
+ * This is a stub implementation - override with your own data fetching logic.
1800
+ */
1455
1801
  declare function useCatchUps(): UseCatchUpsResult;
1456
1802
  //#endregion
1457
1803
  //#region src/hooks/use-mysite.d.ts
1458
1804
  /**
1459
- * Result type for useMySite hook.
1460
- * Uses QueryResultNullable since MySite data may not be available.
1461
- */
1805
+ * Result type for useMySite hook.
1806
+ * Uses QueryResultNullable since MySite data may not be available.
1807
+ */
1462
1808
  type UseMySiteResult = QueryResultNullable<MySiteData>;
1463
1809
  /**
1464
- * Hook to fetch MySite data.
1465
- * This is a stub implementation - override with your own data fetching logic.
1466
- */
1810
+ * Hook to fetch MySite data.
1811
+ * This is a stub implementation - override with your own data fetching logic.
1812
+ */
1467
1813
  declare function useMySite(): UseMySiteResult;
1468
1814
  //#endregion
1469
1815
  //#region src/hooks/use-conversations.d.ts
1470
1816
  /**
1471
- * Result type for useConversations hook.
1472
- * Uses QueryResult<Conversation[]> with default Error type.
1473
- */
1817
+ * Result type for useConversations hook.
1818
+ * Uses QueryResult<Conversation[]> with default Error type.
1819
+ */
1474
1820
  type UseConversationsResult = QueryResult<Conversation[]>;
1475
1821
  /**
1476
- * Hook to fetch all conversations.
1477
- * This is a stub implementation - override with your own data fetching logic.
1478
- *
1479
- * @returns UseConversationsResult with empty data array
1480
- *
1481
- * @example
1482
- * ```tsx
1483
- * const { data: conversations, isLoading, isError } = useConversations();
1484
- *
1485
- * if (isLoading) return <Loading />;
1486
- * if (isError) return <Error />;
1487
- *
1488
- * return conversations.map(conv => <ConversationItem key={conv.id} {...conv} />);
1489
- * ```
1490
- */
1822
+ * Hook to fetch all conversations.
1823
+ * This is a stub implementation - override with your own data fetching logic.
1824
+ *
1825
+ * @returns UseConversationsResult with empty data array
1826
+ *
1827
+ * @example
1828
+ * ```tsx
1829
+ * const { data: conversations, isLoading, isError } = useConversations();
1830
+ *
1831
+ * if (isLoading) return <Loading />;
1832
+ * if (isError) return <Error />;
1833
+ *
1834
+ * return conversations.map(conv => <ConversationItem key={conv.id} {...conv} />);
1835
+ * ```
1836
+ */
1491
1837
  declare function useConversations(): UseConversationsResult;
1492
1838
  /**
1493
- * Result type for useConversationMessages hook.
1494
- * Uses QueryResult<Message[]> with default Error type.
1495
- */
1839
+ * Result type for useConversationMessages hook.
1840
+ * Uses QueryResult<Message[]> with default Error type.
1841
+ */
1496
1842
  type UseConversationMessagesResult = QueryResult<Message[]>;
1497
1843
  /**
1498
- * Hook to fetch messages for a specific conversation.
1499
- * This is a stub implementation - override with your own data fetching logic.
1500
- *
1501
- * @param conversationId - The ID of the conversation to fetch messages for
1502
- * @returns UseConversationMessagesResult with empty data array
1503
- *
1504
- * @example
1505
- * ```tsx
1506
- * const { data: messages, isLoading, isError } = useConversationMessages(conversationId);
1507
- *
1508
- * if (isLoading) return <Loading />;
1509
- * if (isError) return <Error />;
1510
- *
1511
- * return messages.map(msg => <MessageBubble key={msg.id} {...msg} />);
1512
- * ```
1513
- */
1844
+ * Hook to fetch messages for a specific conversation.
1845
+ * This is a stub implementation - override with your own data fetching logic.
1846
+ *
1847
+ * @param conversationId - The ID of the conversation to fetch messages for
1848
+ * @returns UseConversationMessagesResult with empty data array
1849
+ *
1850
+ * @example
1851
+ * ```tsx
1852
+ * const { data: messages, isLoading, isError } = useConversationMessages(conversationId);
1853
+ *
1854
+ * if (isLoading) return <Loading />;
1855
+ * if (isError) return <Error />;
1856
+ *
1857
+ * return messages.map(msg => <MessageBubble key={msg.id} {...msg} />);
1858
+ * ```
1859
+ */
1514
1860
  declare function useConversationMessages(_conversationId: string): UseConversationMessagesResult;
1515
1861
  //#endregion
1516
1862
  //#region src/hooks/use-contacts.d.ts
1517
1863
  /**
1518
- * Type predicate to check if a status string is a valid ContactStatus.
1519
- * Enables runtime validation with type narrowing.
1520
- */
1864
+ * Type predicate to check if a status string is a valid ContactStatus.
1865
+ * Enables runtime validation with type narrowing.
1866
+ */
1521
1867
  declare function isContactStatus(value: string): value is ContactStatus;
1522
1868
  /**
1523
- * Parameters for filtering and paginating contacts.
1524
- * Uses readonly properties and proper ContactStatus type for status.
1525
- */
1869
+ * Parameters for filtering and paginating contacts.
1870
+ * Uses readonly properties and proper ContactStatus type for status.
1871
+ */
1526
1872
  interface UseContactsParams {
1527
1873
  /** Search query to filter contacts by name, email, or company */
1528
1874
  readonly search?: string;
@@ -1532,44 +1878,44 @@ interface UseContactsParams {
1532
1878
  readonly limit?: number;
1533
1879
  }
1534
1880
  /**
1535
- * Result type for the useContacts hook.
1536
- * Uses ListQueryResult<Contact> with totalCount and default Error type.
1537
- */
1881
+ * Result type for the useContacts hook.
1882
+ * Uses ListQueryResult<Contact> with totalCount and default Error type.
1883
+ */
1538
1884
  type UseContactsResult = ListQueryResult<Contact>;
1539
1885
  /**
1540
- * Result type for the useContact hook.
1541
- * Uses QueryResultNullable since a specific contact may not exist.
1542
- */
1886
+ * Result type for the useContact hook.
1887
+ * Uses QueryResultNullable since a specific contact may not exist.
1888
+ */
1543
1889
  type UseContactResult = QueryResultNullable<Contact>;
1544
1890
  /**
1545
- * Hook to fetch a list of contacts with optional filtering and pagination.
1546
- * This is a stub implementation - override with your own data fetching logic.
1547
- *
1548
- * @param params - Optional parameters for filtering and pagination
1549
- * @returns Object containing contacts data, loading state, error state, and total count
1550
- *
1551
- * @example
1552
- * ```tsx
1553
- * const { data: contacts, isLoading, totalCount } = useContacts({
1554
- * search: 'john',
1555
- * status: 'active',
1556
- * limit: 20
1557
- * });
1558
- * ```
1559
- */
1891
+ * Hook to fetch a list of contacts with optional filtering and pagination.
1892
+ * This is a stub implementation - override with your own data fetching logic.
1893
+ *
1894
+ * @param params - Optional parameters for filtering and pagination
1895
+ * @returns Object containing contacts data, loading state, error state, and total count
1896
+ *
1897
+ * @example
1898
+ * ```tsx
1899
+ * const { data: contacts, isLoading, totalCount } = useContacts({
1900
+ * search: 'john',
1901
+ * status: 'active',
1902
+ * limit: 20
1903
+ * });
1904
+ * ```
1905
+ */
1560
1906
  declare function useContacts(_params?: UseContactsParams): UseContactsResult;
1561
1907
  /**
1562
- * Hook to fetch a single contact by ID.
1563
- * This is a stub implementation - override with your own data fetching logic.
1564
- *
1565
- * @param contactId - The unique identifier of the contact to fetch
1566
- * @returns Object containing contact data, loading state, and error state
1567
- *
1568
- * @example
1569
- * ```tsx
1570
- * const { data: contact, isLoading, isError } = useContact('contact-123');
1571
- * ```
1572
- */
1908
+ * Hook to fetch a single contact by ID.
1909
+ * This is a stub implementation - override with your own data fetching logic.
1910
+ *
1911
+ * @param contactId - The unique identifier of the contact to fetch
1912
+ * @returns Object containing contact data, loading state, and error state
1913
+ *
1914
+ * @example
1915
+ * ```tsx
1916
+ * const { data: contact, isLoading, isError } = useContact('contact-123');
1917
+ * ```
1918
+ */
1573
1919
  declare function useContact(_contactId: string): UseContactResult;
1574
1920
  //#endregion
1575
1921
  //#region src/components/RequireAuth.d.ts
@@ -1582,52 +1928,52 @@ interface RequireAuthProps {
1582
1928
  errorComponent?: ReactNode;
1583
1929
  }
1584
1930
  /**
1585
- * Component that protects content requiring authentication.
1586
- *
1587
- * **Important:** This provides UX-level protection only. It prevents
1588
- * unauthenticated users from seeing the UI, but the real security
1589
- * boundary is the server-side API. Client-side auth can always be
1590
- * bypassed by modifying browser state.
1591
- *
1592
- * For defense-in-depth, configure `jwksUrl` in `FluidAuthConfig`
1593
- * to enable client-side JWT signature verification.
1594
- *
1595
- * Shows different states based on auth status:
1596
- * - Loading: Shows fallback (spinner by default)
1597
- * - Not authenticated: Shows errorComponent (AuthError by default)
1598
- * - Authenticated: Shows children
1599
- *
1600
- * @example
1601
- * ```tsx
1602
- * // Basic usage - shows default loading/error states
1603
- * <RequireAuth>
1604
- * <ProtectedContent />
1605
- * </RequireAuth>
1606
- *
1607
- * // Custom loading state
1608
- * <RequireAuth fallback={<CustomSpinner />}>
1609
- * <ProtectedContent />
1610
- * </RequireAuth>
1611
- *
1612
- * // Custom error component
1613
- * <RequireAuth errorComponent={<LoginPrompt />}>
1614
- * <ProtectedContent />
1615
- * </RequireAuth>
1616
- *
1617
- * // Both custom
1618
- * <RequireAuth
1619
- * fallback={<SkeletonLoader />}
1620
- * errorComponent={<RedirectToLogin />}
1621
- * >
1622
- * <Dashboard />
1623
- * </RequireAuth>
1624
- * ```
1625
- */
1931
+ * Component that protects content requiring authentication.
1932
+ *
1933
+ * **Important:** This provides UX-level protection only. It prevents
1934
+ * unauthenticated users from seeing the UI, but the real security
1935
+ * boundary is the server-side API. Client-side auth can always be
1936
+ * bypassed by modifying browser state.
1937
+ *
1938
+ * For defense-in-depth, configure `jwksUrl` in `FluidAuthConfig`
1939
+ * to enable client-side JWT signature verification.
1940
+ *
1941
+ * Shows different states based on auth status:
1942
+ * - Loading: Shows fallback (spinner by default)
1943
+ * - Not authenticated: Shows errorComponent (AuthError by default)
1944
+ * - Authenticated: Shows children
1945
+ *
1946
+ * @example
1947
+ * ```tsx
1948
+ * // Basic usage - shows default loading/error states
1949
+ * <RequireAuth>
1950
+ * <ProtectedContent />
1951
+ * </RequireAuth>
1952
+ *
1953
+ * // Custom loading state
1954
+ * <RequireAuth fallback={<CustomSpinner />}>
1955
+ * <ProtectedContent />
1956
+ * </RequireAuth>
1957
+ *
1958
+ * // Custom error component
1959
+ * <RequireAuth errorComponent={<LoginPrompt />}>
1960
+ * <ProtectedContent />
1961
+ * </RequireAuth>
1962
+ *
1963
+ * // Both custom
1964
+ * <RequireAuth
1965
+ * fallback={<SkeletonLoader />}
1966
+ * errorComponent={<RedirectToLogin />}
1967
+ * >
1968
+ * <Dashboard />
1969
+ * </RequireAuth>
1970
+ * ```
1971
+ */
1626
1972
  declare function RequireAuth({
1627
1973
  children,
1628
1974
  fallback,
1629
1975
  errorComponent
1630
- }: RequireAuthProps): react_jsx_runtime0.JSX.Element;
1976
+ }: RequireAuthProps): React.JSX.Element;
1631
1977
  //#endregion
1632
1978
  //#region src/components/AuthError.d.ts
1633
1979
  interface AuthErrorProps {
@@ -1639,34 +1985,34 @@ interface AuthErrorProps {
1639
1985
  children?: ReactNode;
1640
1986
  }
1641
1987
  /**
1642
- * Default authentication error component.
1643
- *
1644
- * Displays a simple error message when authentication fails.
1645
- * Can be customized via props or replaced entirely in RequireAuth.
1646
- *
1647
- * @example
1648
- * ```tsx
1649
- * // Use with default message
1650
- * <AuthError />
1651
- *
1652
- * // Use with custom message
1653
- * <AuthError message="Session expired. Please log in again." />
1654
- *
1655
- * // Use with custom content
1656
- * <AuthError>
1657
- * <CustomLoginButton />
1658
- * </AuthError>
1659
- * ```
1660
- */
1988
+ * Default authentication error component.
1989
+ *
1990
+ * Displays a simple error message when authentication fails.
1991
+ * Can be customized via props or replaced entirely in RequireAuth.
1992
+ *
1993
+ * @example
1994
+ * ```tsx
1995
+ * // Use with default message
1996
+ * <AuthError />
1997
+ *
1998
+ * // Use with custom message
1999
+ * <AuthError message="Session expired. Please log in again." />
2000
+ *
2001
+ * // Use with custom content
2002
+ * <AuthError>
2003
+ * <CustomLoginButton />
2004
+ * </AuthError>
2005
+ * ```
2006
+ */
1661
2007
  declare function AuthError({
1662
2008
  message,
1663
2009
  title,
1664
2010
  children
1665
- }: AuthErrorProps): react_jsx_runtime0.JSX.Element;
2011
+ }: AuthErrorProps): React.JSX.Element;
1666
2012
  /**
1667
- * Simple loading spinner component for auth loading state.
1668
- */
1669
- declare function AuthLoading(): react_jsx_runtime0.JSX.Element;
2013
+ * Simple loading spinner component for auth loading state.
2014
+ */
2015
+ declare function AuthLoading(): React.JSX.Element;
1670
2016
  //#endregion
1671
2017
  //#region src/messaging/use-messaging-auth.d.ts
1672
2018
  declare function useMessagingAuth(): MessagingAuthContext$1;
@@ -1681,11 +2027,11 @@ declare function useMessagingConfig(): MessagingConfig;
1681
2027
  //#endregion
1682
2028
  //#region src/messaging/fluid-file-uploader.d.ts
1683
2029
  /**
1684
- * Creates a FileUploader that uploads to Filestack using the REST API.
1685
- *
1686
- * @param apiKey - Filestack API key. If falsy, returns a noop uploader
1687
- * that rejects uploads with a helpful error message.
1688
- */
2030
+ * Creates a FileUploader that uploads to Filestack using the REST API.
2031
+ *
2032
+ * @param apiKey - Filestack API key. If falsy, returns a noop uploader
2033
+ * that rejects uploads with a helpful error message.
2034
+ */
1689
2035
  declare function createFluidFileUploader(apiKey: string | undefined): FileUploader$1;
1690
2036
  import * as import__fluid_app_rep_core_theme from "@fluid-app/rep-core/theme";
1691
2037
  //#endregion
@@ -1710,7 +2056,7 @@ declare function MessagingScreen({
1710
2056
  padding,
1711
2057
  borderRadius,
1712
2058
  ...divProps
1713
- }: MessagingScreenProps): react_jsx_runtime0.JSX.Element;
2059
+ }: MessagingScreenProps): React.JSX.Element;
1714
2060
  declare const messagingScreenPropertySchema: WidgetPropertySchema;
1715
2061
  //#endregion
1716
2062
  //#region src/screens/ContactsScreen.d.ts
@@ -1724,7 +2070,7 @@ type ContactsScreenProps = ComponentProps<"div"> & {
1724
2070
  onContactSelect?: (contactId: string) => void;
1725
2071
  onCreateContact?: () => void;
1726
2072
  };
1727
- declare function ContactsScreen(_props: ContactsScreenProps): react_jsx_runtime0.JSX.Element;
2073
+ declare function ContactsScreen(_props: ContactsScreenProps): React.JSX.Element;
1728
2074
  declare const contactsScreenPropertySchema: WidgetPropertySchema;
1729
2075
  //#endregion
1730
2076
  //#region src/screens/OrdersScreen.d.ts
@@ -1735,7 +2081,7 @@ type OrdersScreenProps = ComponentProps<"div"> & {
1735
2081
  padding?: PaddingOptions;
1736
2082
  borderRadius?: BorderRadiusOptions;
1737
2083
  };
1738
- declare function OrdersScreen(_props: OrdersScreenProps): react_jsx_runtime0.JSX.Element;
2084
+ declare function OrdersScreen(_props: OrdersScreenProps): React.JSX.Element;
1739
2085
  declare const ordersScreenPropertySchema: WidgetPropertySchema;
1740
2086
  //#endregion
1741
2087
  //#region src/screens/CustomersScreen.d.ts
@@ -1746,7 +2092,7 @@ type CustomersScreenProps = ComponentProps<"div"> & {
1746
2092
  padding?: PaddingOptions;
1747
2093
  borderRadius?: BorderRadiusOptions;
1748
2094
  };
1749
- declare function CustomersScreen(_props: CustomersScreenProps): react_jsx_runtime0.JSX.Element;
2095
+ declare function CustomersScreen(_props: CustomersScreenProps): React.JSX.Element;
1750
2096
  declare const customersScreenPropertySchema: WidgetPropertySchema;
1751
2097
  //#endregion
1752
2098
  //#region src/screens/ProductsScreen.d.ts
@@ -1757,20 +2103,14 @@ type ProductsScreenProps = ComponentProps<"div"> & {
1757
2103
  padding?: PaddingOptions;
1758
2104
  borderRadius?: BorderRadiusOptions;
1759
2105
  };
1760
- declare function ProductsScreen(_props: ProductsScreenProps): react_jsx_runtime0.JSX.Element;
2106
+ declare function ProductsScreen(_props: ProductsScreenProps): React.JSX.Element;
1761
2107
  declare const productsScreenPropertySchema: WidgetPropertySchema;
1762
2108
  //#endregion
1763
2109
  //#region src/screens/index.d.ts
1764
- declare const screenPropertySchemas: {
1765
- MessagingScreen: () => Promise<_fluid_app_rep_core_registries0.WidgetPropertySchema>;
1766
- ContactsScreen: () => Promise<_fluid_app_rep_core_registries0.WidgetPropertySchema>;
1767
- OrdersScreen: () => Promise<_fluid_app_rep_core_registries0.WidgetPropertySchema>;
1768
- CustomersScreen: () => Promise<_fluid_app_rep_core_registries0.WidgetPropertySchema>;
1769
- ProductsScreen: () => Promise<_fluid_app_rep_core_registries0.WidgetPropertySchema>;
1770
- };
2110
+ declare const screenPropertySchemas: Record<string, () => Promise<WidgetPropertySchema>>;
1771
2111
  /**
1772
- * Core page template IDs
1773
- */
2112
+ * Core page template IDs
2113
+ */
1774
2114
  declare const CORE_PAGE_IDS: {
1775
2115
  readonly MESSAGING: "core-messaging";
1776
2116
  readonly CONTACTS: "core-contacts";
@@ -1780,117 +2120,68 @@ declare const CORE_PAGE_IDS: {
1780
2120
  };
1781
2121
  //#endregion
1782
2122
  //#region src/core/default-widget-registry.d.ts
1783
- declare const DEFAULT_SDK_WIDGET_REGISTRY: {
1784
- AlertWidget: typeof AlertWidget$1;
1785
- CalendarWidget: typeof CalendarWidget$1;
1786
- CarouselWidget: typeof CarouselWidget$1;
1787
- CatchUpWidget: typeof CatchUpWidget$1;
1788
- ChartWidget: typeof ChartWidget$1;
1789
- ContainerWidget: typeof ContainerWidget$1;
1790
- EmbedWidget: typeof EmbedWidget$1;
1791
- ImageWidget: typeof ImageWidget$1;
1792
- LayoutWidget: <T extends Record<string, react.ComponentType<any>>>({
1793
- sectionLayout,
1794
- gap,
1795
- gapSize,
1796
- background,
1797
- padding,
1798
- borderRadius,
1799
- children,
1800
- registry,
1801
- className,
1802
- minHeight
1803
- }: {
1804
- sectionLayout?: _fluid_app_rep_core_types0.SectionLayoutType;
1805
- type?: "flex" | "grid";
1806
- columns?: number;
1807
- rows?: number;
1808
- direction?: string;
1809
- justify?: string;
1810
- align?: string;
1811
- wrap?: boolean;
1812
- gap?: number;
1813
- gapSize?: _fluid_app_rep_core_types0.GapOptions;
1814
- background?: _fluid_app_rep_core_types0.BackgroundValue;
1815
- padding?: _fluid_app_rep_core_types0.PaddingOptions;
1816
- borderRadius?: _fluid_app_rep_core_types0.BorderRadiusOptions;
1817
- children: (_fluid_app_rep_core_types0.WidgetSchema | null)[] | (_fluid_app_rep_core_types0.TypedWidgetSchema<T> | null)[];
1818
- registry?: T | undefined;
1819
- className?: string;
1820
- minHeight?: number;
1821
- }) => react_jsx_runtime0.JSX.Element;
1822
- ListWidget: typeof ListWidget$1;
1823
- MySiteWidget: typeof MySiteWidget$1;
1824
- NestedWidget: typeof NestedWidget$1;
1825
- QuickShareWidget: typeof QuickShareWidget$1;
1826
- RecentActivityWidget: typeof RecentActivityWidget$1;
1827
- SpacerWidget: typeof SpacerWidget$1;
1828
- TableWidget: typeof TableWidget$1;
1829
- TextWidget: typeof TextWidget$1;
1830
- ToDoWidget: typeof ToDoWidget$1;
1831
- VideoWidget: typeof VideoWidget$1;
1832
- };
2123
+ declare const DEFAULT_SDK_WIDGET_REGISTRY: WidgetRegistry$1;
1833
2124
  //#endregion
1834
2125
  //#region src/core/resolve-pages.d.ts
1835
2126
  /**
1836
- * Resolve all page references and local screens into a unified screen list.
1837
- *
1838
- * This function merges:
1839
- * 1. Screen definitions from page_refs (shared templates)
1840
- * 2. Local screen definitions (for backwards compatibility and custom screens)
1841
- *
1842
- * When a screen_id appears in both page_refs and screens, the local screen
1843
- * takes precedence (allows local overrides of template pages).
1844
- *
1845
- * @param navigation - The navigation configuration
1846
- * @returns A unified array of ScreenDefinition objects
1847
- *
1848
- * @example
1849
- * ```ts
1850
- * const navigation: Navigation = {
1851
- * definition_id: 1,
1852
- * id: 1,
1853
- * name: "Main Nav",
1854
- * navigation_items: [...],
1855
- * screens: [
1856
- * // Local custom screen
1857
- * { id: 1, slug: "home", name: "Home", component_tree: [...] }
1858
- * ],
1859
- * page_refs: [
1860
- * // Reference to shared messaging template
1861
- * { page_template_id: "core-messaging", screen_id: 2 }
1862
- * ],
1863
- * };
1864
- *
1865
- * const allScreens = resolveNavigationPages(navigation);
1866
- * // Returns: [home screen, messaging screen from template]
1867
- * ```
1868
- */
2127
+ * Resolve all page references and local screens into a unified screen list.
2128
+ *
2129
+ * This function merges:
2130
+ * 1. Screen definitions from page_refs (shared templates)
2131
+ * 2. Local screen definitions (for backwards compatibility and custom screens)
2132
+ *
2133
+ * When a screen_id appears in both page_refs and screens, the local screen
2134
+ * takes precedence (allows local overrides of template pages).
2135
+ *
2136
+ * @param navigation - The navigation configuration
2137
+ * @returns A unified array of ScreenDefinition objects
2138
+ *
2139
+ * @example
2140
+ * ```ts
2141
+ * const navigation: Navigation = {
2142
+ * definition_id: 1,
2143
+ * id: 1,
2144
+ * name: "Main Nav",
2145
+ * navigation_items: [...],
2146
+ * screens: [
2147
+ * // Local custom screen
2148
+ * { id: 1, slug: "home", name: "Home", component_tree: [...] }
2149
+ * ],
2150
+ * page_refs: [
2151
+ * // Reference to shared messaging template
2152
+ * { page_template_id: "core-messaging", screen_id: 2 }
2153
+ * ],
2154
+ * };
2155
+ *
2156
+ * const allScreens = resolveNavigationPages(navigation);
2157
+ * // Returns: [home screen, messaging screen from template]
2158
+ * ```
2159
+ */
1869
2160
  declare function resolveNavigationPages(navigation: Readonly<Navigation>): ScreenDefinition[];
1870
2161
  /**
1871
- * Get all available page templates for use in navigation.
1872
- *
1873
- * @returns Array of page templates from the registry
1874
- */
2162
+ * Get all available page templates for use in navigation.
2163
+ *
2164
+ * @returns Array of page templates from the registry
2165
+ */
1875
2166
  declare function getAvailablePageTemplates(): PageTemplate[];
1876
2167
  /**
1877
- * Get core page templates that are required for basic functionality.
1878
- *
1879
- * @returns Array of core page templates
1880
- */
2168
+ * Get core page templates that are required for basic functionality.
2169
+ *
2170
+ * @returns Array of core page templates
2171
+ */
1881
2172
  declare function getCorePageTemplates(): PageTemplate[];
1882
2173
  /**
1883
- * Get optional page templates that can be added to navigation.
1884
- *
1885
- * @returns Array of optional (non-core) page templates
1886
- */
2174
+ * Get optional page templates that can be added to navigation.
2175
+ *
2176
+ * @returns Array of optional (non-core) page templates
2177
+ */
1887
2178
  declare function getOptionalPageTemplates(): PageTemplate[];
1888
2179
  /**
1889
- * Check if a navigation has all required core pages.
1890
- *
1891
- * @param navigation - The navigation to check
1892
- * @returns Object with validation result and missing page IDs
1893
- */
2180
+ * Check if a navigation has all required core pages.
2181
+ *
2182
+ * @param navigation - The navigation to check
2183
+ * @returns Object with validation result and missing page IDs
2184
+ */
1894
2185
  declare function validateNavigationPages(navigation: Readonly<Navigation>): {
1895
2186
  readonly valid: boolean;
1896
2187
  readonly missingCorePages: readonly string[];
@@ -1898,94 +2189,94 @@ declare function validateNavigationPages(navigation: Readonly<Navigation>): {
1898
2189
  //#endregion
1899
2190
  //#region src/registries/page-template-registry.d.ts
1900
2191
  /**
1901
- * Registry for managing reusable page templates.
1902
- *
1903
- * The registry provides a central store for page templates that can be
1904
- * shared across multiple navigations. Core pages (like Messaging, Contacts)
1905
- * are pre-registered and cannot be removed.
1906
- *
1907
- * @example
1908
- * ```ts
1909
- * // Register a custom page template
1910
- * PageTemplateRegistry.register({
1911
- * id: 'custom-dashboard',
1912
- * slug: 'dashboard',
1913
- * name: 'Custom Dashboard',
1914
- * category: 'custom',
1915
- * version: '1.0.0',
1916
- * component_tree: [{ type: 'TextWidget', props: { text: 'Hello' } }],
1917
- * });
1918
- *
1919
- * // Get a template by ID
1920
- * const template = PageTemplateRegistry.get('custom-dashboard');
1921
- *
1922
- * // List all templates in a category
1923
- * const corePages = PageTemplateRegistry.getByCategory('core');
1924
- * ```
1925
- */
2192
+ * Registry for managing reusable page templates.
2193
+ *
2194
+ * The registry provides a central store for page templates that can be
2195
+ * shared across multiple navigations. Core pages (like Messaging, Contacts)
2196
+ * are pre-registered and cannot be removed.
2197
+ *
2198
+ * @example
2199
+ * ```ts
2200
+ * // Register a custom page template
2201
+ * PageTemplateRegistry.register({
2202
+ * id: 'custom-dashboard',
2203
+ * slug: 'dashboard',
2204
+ * name: 'Custom Dashboard',
2205
+ * category: 'custom',
2206
+ * version: '1.0.0',
2207
+ * component_tree: [{ type: 'TextWidget', props: { text: 'Hello' } }],
2208
+ * });
2209
+ *
2210
+ * // Get a template by ID
2211
+ * const template = PageTemplateRegistry.get('custom-dashboard');
2212
+ *
2213
+ * // List all templates in a category
2214
+ * const corePages = PageTemplateRegistry.getByCategory('core');
2215
+ * ```
2216
+ */
1926
2217
  declare class PageTemplateRegistryImpl {
1927
2218
  private templates;
1928
2219
  private categories;
1929
2220
  constructor();
1930
2221
  /**
1931
- * Register a new page template.
1932
- * @throws Error if a template with the same ID already exists
1933
- */
2222
+ * Register a new page template.
2223
+ * @throws Error if a template with the same ID already exists
2224
+ */
1934
2225
  register(template: PageTemplate): void;
1935
2226
  /**
1936
- * Unregister a page template by ID.
1937
- * Core templates cannot be unregistered.
1938
- * @returns true if the template was removed, false if it didn't exist or is a core template
1939
- */
2227
+ * Unregister a page template by ID.
2228
+ * Core templates cannot be unregistered.
2229
+ * @returns true if the template was removed, false if it didn't exist or is a core template
2230
+ */
1940
2231
  unregister(id: string): boolean;
1941
2232
  /**
1942
- * Get a page template by ID.
1943
- */
2233
+ * Get a page template by ID.
2234
+ */
1944
2235
  get(id: string): PageTemplate | undefined;
1945
2236
  /**
1946
- * Get all page templates in a specific category.
1947
- */
2237
+ * Get all page templates in a specific category.
2238
+ */
1948
2239
  getByCategory(category: PageCategoryId | string): PageTemplate[];
1949
2240
  /**
1950
- * List all registered page templates.
1951
- */
2241
+ * List all registered page templates.
2242
+ */
1952
2243
  listAll(): PageTemplate[];
1953
2244
  /**
1954
- * List all core page templates (isCore: true).
1955
- */
2245
+ * List all core page templates (isCore: true).
2246
+ */
1956
2247
  listCore(): PageTemplate[];
1957
2248
  /**
1958
- * List all non-core page templates.
1959
- */
2249
+ * List all non-core page templates.
2250
+ */
1960
2251
  listOptional(): PageTemplate[];
1961
2252
  /**
1962
- * List all registered categories.
1963
- */
2253
+ * List all registered categories.
2254
+ */
1964
2255
  listCategories(): PageCategory[];
1965
2256
  /**
1966
- * Add a custom category.
1967
- */
2257
+ * Add a custom category.
2258
+ */
1968
2259
  addCategory(category: PageCategory): void;
1969
2260
  /**
1970
- * Check if a template exists by ID.
1971
- */
2261
+ * Check if a template exists by ID.
2262
+ */
1972
2263
  has(id: string): boolean;
1973
2264
  /**
1974
- * Get the count of registered templates.
1975
- */
2265
+ * Get the count of registered templates.
2266
+ */
1976
2267
  get size(): number;
1977
2268
  /**
1978
- * Clear all non-core templates.
1979
- * Useful for testing or resetting the registry.
1980
- */
2269
+ * Clear all non-core templates.
2270
+ * Useful for testing or resetting the registry.
2271
+ */
1981
2272
  clearNonCore(): void;
1982
2273
  }
1983
2274
  /**
1984
- * Global page template registry singleton.
1985
- *
1986
- * This registry is automatically populated with core page templates
1987
- * (Messaging, Contacts) when the SDK is imported.
1988
- */
2275
+ * Global page template registry singleton.
2276
+ *
2277
+ * This registry is automatically populated with core page templates
2278
+ * (Messaging, Contacts) when the SDK is imported.
2279
+ */
1989
2280
  declare const PageTemplateRegistry: PageTemplateRegistryImpl;
1990
2281
  //#endregion
1991
2282
  //#region src/shell/AppShell.d.ts
@@ -2025,7 +2316,7 @@ declare function AppShell({
2025
2316
  sidebarHeader,
2026
2317
  sidebarFooter,
2027
2318
  children
2028
- }: AppShellProps): react_jsx_runtime0.JSX.Element;
2319
+ }: AppShellProps): React.JSX.Element;
2029
2320
  //#endregion
2030
2321
  //#region src/shell/BuilderScreenView.d.ts
2031
2322
  interface BuilderScreenViewProps {
@@ -2035,15 +2326,15 @@ interface BuilderScreenViewProps {
2035
2326
  className?: string;
2036
2327
  }
2037
2328
  /**
2038
- * Renders a builder screen's component_tree with full data source support.
2039
- * Widgets with `dataSource` config are automatically wrapped with `DataAwareWidget`
2040
- * which fetches data and merges it with static props before rendering.
2041
- */
2329
+ * Renders a builder screen's component_tree with full data source support.
2330
+ * Widgets with `dataSource` config are automatically wrapped with `DataAwareWidget`
2331
+ * which fetches data and merges it with static props before rendering.
2332
+ */
2042
2333
  declare function BuilderScreenViewImpl({
2043
2334
  screen,
2044
2335
  className
2045
- }: BuilderScreenViewProps): react_jsx_runtime0.JSX.Element;
2046
- declare const BuilderScreenView: react.MemoExoticComponent<typeof BuilderScreenViewImpl>;
2336
+ }: BuilderScreenViewProps): React$1.JSX.Element | null;
2337
+ declare const BuilderScreenView: React$1.MemoExoticComponent<typeof BuilderScreenViewImpl>;
2047
2338
  //#endregion
2048
2339
  //#region src/shell/SdkNavigation.d.ts
2049
2340
  interface SdkNavigationProps {
@@ -2057,7 +2348,7 @@ declare function SdkNavigation({
2057
2348
  currentSlug,
2058
2349
  onNavigate,
2059
2350
  navSlugs
2060
- }: SdkNavigationProps): react_jsx_runtime0.JSX.Element;
2351
+ }: SdkNavigationProps): React.JSX.Element;
2061
2352
  //#endregion
2062
2353
  //#region src/shell/SdkHeader.d.ts
2063
2354
  interface SdkHeaderProps {
@@ -2073,7 +2364,7 @@ declare function SdkHeader({
2073
2364
  currentSlug,
2074
2365
  onNavigate,
2075
2366
  navSlugs
2076
- }: SdkHeaderProps): react_jsx_runtime0.JSX.Element;
2367
+ }: SdkHeaderProps): React.JSX.Element;
2077
2368
  //#endregion
2078
2369
  //#region src/shell/PageRouter.d.ts
2079
2370
  interface PageRouterProps {
@@ -2095,7 +2386,7 @@ declare function PageRouter({
2095
2386
  screens,
2096
2387
  baseSlug,
2097
2388
  restParams
2098
- }: PageRouterProps): react_jsx_runtime0.JSX.Element;
2389
+ }: PageRouterProps): React.JSX.Element;
2099
2390
  //#endregion
2100
2391
  //#region src/shell/QuickLinksDropdown.d.ts
2101
2392
  interface QuickLinksDropdownProps {
@@ -2103,7 +2394,7 @@ interface QuickLinksDropdownProps {
2103
2394
  }
2104
2395
  declare function QuickLinksDropdown({
2105
2396
  onNavigate
2106
- }: QuickLinksDropdownProps): react_jsx_runtime0.JSX.Element;
2397
+ }: QuickLinksDropdownProps): React.JSX.Element;
2107
2398
  //#endregion
2108
2399
  //#region src/shell/AppNavigationContext.d.ts
2109
2400
  interface AppNavigationContextValue {
@@ -2127,7 +2418,7 @@ declare function AppNavigationProvider({
2127
2418
  basePath,
2128
2419
  navigate,
2129
2420
  children
2130
- }: AppNavigationProviderProps): react_jsx_runtime0.JSX.Element;
2421
+ }: AppNavigationProviderProps): React.JSX.Element;
2131
2422
  declare function useAppNavigation(): AppNavigationContextValue;
2132
2423
  //#endregion
2133
2424
  //#region src/shell/AppLink.d.ts
@@ -2136,11 +2427,11 @@ interface AppLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "hr
2136
2427
  to: string;
2137
2428
  }
2138
2429
  /**
2139
- * SPA-aware link that renders a real `<a href>` for accessibility
2140
- * (right-click, ctrl+click, screen readers) but intercepts normal
2141
- * clicks for client-side navigation.
2142
- */
2143
- declare const AppLink: react.ForwardRefExoticComponent<AppLinkProps & react.RefAttributes<HTMLAnchorElement>>;
2430
+ * SPA-aware link that renders a real `<a href>` for accessibility
2431
+ * (right-click, ctrl+click, screen readers) but intercepts normal
2432
+ * clicks for client-side navigation.
2433
+ */
2434
+ declare const AppLink: React$1.ForwardRefExoticComponent<AppLinkProps & React$1.RefAttributes<HTMLAnchorElement>>;
2144
2435
  //#endregion
2145
2436
  //#region src/shell/slug-utils.d.ts
2146
2437
  interface SlugMatch {
@@ -2148,26 +2439,26 @@ interface SlugMatch {
2148
2439
  rest: string;
2149
2440
  }
2150
2441
  /**
2151
- * Extract all slugs from a navigation tree, sorted by segment count descending.
2152
- * Longest slugs first enables greedy prefix matching (e.g. "share/playlists"
2153
- * is checked before "share").
2154
- */
2442
+ * Extract all slugs from a navigation tree, sorted by segment count descending.
2443
+ * Longest slugs first enables greedy prefix matching (e.g. "share/playlists"
2444
+ * is checked before "share").
2445
+ */
2155
2446
  declare function collectNavSlugs(items: NavigationItem[]): string[];
2156
2447
  /**
2157
- * Find the longest registered nav slug that is a prefix of `fullSlug`.
2158
- * Uses segment-boundary checking to prevent "shop" from matching "shopping".
2159
- */
2448
+ * Find the longest registered nav slug that is a prefix of `fullSlug`.
2449
+ * Uses segment-boundary checking to prevent "shop" from matching "shopping".
2450
+ */
2160
2451
  declare function matchSlugPrefix(fullSlug: string, navSlugs: string[]): SlugMatch | undefined;
2161
2452
  /**
2162
- * Extract the slug portion from a full pathname by stripping the basePath prefix.
2163
- * Returns an empty string when the pathname equals the basePath exactly.
2164
- *
2165
- * Examples:
2166
- * extractSlugFromPathname("/contacts/123", "/") → "contacts/123"
2167
- * extractSlugFromPathname("/portal/contacts", "/portal") → "contacts"
2168
- * extractSlugFromPathname("/portal", "/portal") → ""
2169
- * extractSlugFromPathname("/", "/") → ""
2170
- */
2453
+ * Extract the slug portion from a full pathname by stripping the basePath prefix.
2454
+ * Returns an empty string when the pathname equals the basePath exactly.
2455
+ *
2456
+ * Examples:
2457
+ * extractSlugFromPathname("/contacts/123", "/") → "contacts/123"
2458
+ * extractSlugFromPathname("/portal/contacts", "/portal") → "contacts"
2459
+ * extractSlugFromPathname("/portal", "/portal") → ""
2460
+ * extractSlugFromPathname("/", "/") → ""
2461
+ */
2171
2462
  declare function extractSlugFromPathname(pathname: string, basePath: string): string;
2172
2463
  declare function isSlugInSection(item: NavigationItem, currentSlug: string, navSlugs: string[]): boolean;
2173
2464
  type DEFAULT_COLORS = import__fluid_app_rep_core_theme.DEFAULT_COLORS;