@fluid-app/portal-sdk 0.1.112 → 0.1.113
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.
- package/dist/{AppDownloadScreen-Uc9N7K_K.cjs → AppDownloadScreen-BRM2422D.cjs} +2 -2
- package/dist/{AppDownloadScreen-DzFc_CDn.cjs → AppDownloadScreen-CwAEQCXb.cjs} +2 -2
- package/dist/{AppDownloadScreen-DzFc_CDn.cjs.map → AppDownloadScreen-CwAEQCXb.cjs.map} +1 -1
- package/dist/{AppDownloadScreen-BvcyEKCk.mjs → AppDownloadScreen-SmPf0S74.mjs} +2 -2
- package/dist/{AppDownloadScreen-BvcyEKCk.mjs.map → AppDownloadScreen-SmPf0S74.mjs.map} +1 -1
- package/dist/{ContactsScreen-BNqIi0XS.mjs → ContactsScreen-BTOnIpof.mjs} +2 -2
- package/dist/{ContactsScreen-BNqIi0XS.mjs.map → ContactsScreen-BTOnIpof.mjs.map} +1 -1
- package/dist/{ContactsScreen-C6cCTl51.cjs → ContactsScreen-BaDlTbEn.cjs} +2 -2
- package/dist/{ContactsScreen-C6cCTl51.cjs.map → ContactsScreen-BaDlTbEn.cjs.map} +1 -1
- package/dist/{ContactsScreen-D2DYk3A-.cjs → ContactsScreen-qvJ0gr2D.cjs} +2 -2
- package/dist/{FluidProvider-dTwaHRzI.mjs → FluidProvider-CMGu8wbx.mjs} +33 -79
- package/dist/FluidProvider-CMGu8wbx.mjs.map +1 -0
- package/dist/{FluidProvider-NnE6s3O0.cjs → FluidProvider-DEHDER6T.cjs} +38 -78
- package/dist/FluidProvider-DEHDER6T.cjs.map +1 -0
- package/dist/{MessagingScreen-C_tCav2Y.cjs → MessagingScreen-B2c7pNrj.cjs} +2 -2
- package/dist/{MessagingScreen-DH0YxaOG.cjs → MessagingScreen-CgWPOknA.cjs} +3 -3
- package/dist/{MessagingScreen-DH0YxaOG.cjs.map → MessagingScreen-CgWPOknA.cjs.map} +1 -1
- package/dist/{MessagingScreen-BA6fMOmD.mjs → MessagingScreen-DJB1wth6.mjs} +2 -3
- package/dist/{MessagingScreen-Dv8HVEt-.mjs → MessagingScreen-S0UYG7jh.mjs} +3 -3
- package/dist/{MessagingScreen-Dv8HVEt-.mjs.map → MessagingScreen-S0UYG7jh.mjs.map} +1 -1
- package/dist/{MySiteScreen-t89PLodk.mjs → MySiteScreen-Bmb7wlMo.mjs} +2 -2
- package/dist/{MySiteScreen-t89PLodk.mjs.map → MySiteScreen-Bmb7wlMo.mjs.map} +1 -1
- package/dist/{MySiteScreen-Bda8FzQ9.cjs → MySiteScreen-BqYWp5oM.cjs} +2 -2
- package/dist/{MySiteScreen-DydtAGvt.cjs → MySiteScreen-DRJtUSEv.cjs} +2 -2
- package/dist/{MySiteScreen-DydtAGvt.cjs.map → MySiteScreen-DRJtUSEv.cjs.map} +1 -1
- package/dist/{OrdersScreen-BhJkW3TG.cjs → OrdersScreen-DjWeLpzq.cjs} +3 -3
- package/dist/{OrdersScreen-BhJkW3TG.cjs.map → OrdersScreen-DjWeLpzq.cjs.map} +1 -1
- package/dist/{OrdersScreen-DP1WdqVT.mjs → OrdersScreen-LvY3Gpit.mjs} +3 -3
- package/dist/{OrdersScreen-DP1WdqVT.mjs.map → OrdersScreen-LvY3Gpit.mjs.map} +1 -1
- package/dist/{OrdersScreen-DvaV61fj.cjs → OrdersScreen-nPfPQg5l.cjs} +2 -2
- package/dist/{ProductsScreen-sEcByLGy.mjs → ProductsScreen-84YTdLr4.mjs} +3 -3
- package/dist/{ProductsScreen-sEcByLGy.mjs.map → ProductsScreen-84YTdLr4.mjs.map} +1 -1
- package/dist/{ProductsScreen-ssonMzdl.cjs → ProductsScreen-BF6qZxGW.cjs} +3 -3
- package/dist/{ProductsScreen-ssonMzdl.cjs.map → ProductsScreen-BF6qZxGW.cjs.map} +1 -1
- package/dist/{ProductsScreen-DYECF3gJ.mjs → ProductsScreen-Bxb-GTkK.mjs} +2 -5
- package/dist/{ProductsScreen-CI9G5UJh.cjs → ProductsScreen-DI5oszM3.cjs} +2 -2
- package/dist/{ProfileScreen-Bc4znBmb.cjs → ProfileScreen-BxfNuK3_.cjs} +2 -2
- package/dist/{ProfileScreen-BPvudlCM.cjs → ProfileScreen-C81VzV0g.cjs} +4 -4
- package/dist/{ProfileScreen-BPvudlCM.cjs.map → ProfileScreen-C81VzV0g.cjs.map} +1 -1
- package/dist/{ProfileScreen-BWiBC4y3.mjs → ProfileScreen-fBv7Z8WI.mjs} +4 -4
- package/dist/{ProfileScreen-BWiBC4y3.mjs.map → ProfileScreen-fBv7Z8WI.mjs.map} +1 -1
- package/dist/{ShareablesScreen-CIrWSh5q.mjs → ShareablesScreen-BA7_bvpL.mjs} +5 -5
- package/dist/{ShareablesScreen-CIrWSh5q.mjs.map → ShareablesScreen-BA7_bvpL.mjs.map} +1 -1
- package/dist/{ShareablesScreen-BvBfPJ69.cjs → ShareablesScreen-BZ56t5nh.cjs} +2 -2
- package/dist/{ShareablesScreen-TEWnxGs0.mjs → ShareablesScreen-DEq59fgF.mjs} +2 -6
- package/dist/{ShareablesScreen-D3JVKFVA.cjs → ShareablesScreen-yLxHmfcg.cjs} +5 -5
- package/dist/{ShareablesScreen-D3JVKFVA.cjs.map → ShareablesScreen-yLxHmfcg.cjs.map} +1 -1
- package/dist/{ShopScreen-BTTKNmtT.cjs → ShopScreen-B6xBjA_s.cjs} +4 -4
- package/dist/{ShopScreen-BTTKNmtT.cjs.map → ShopScreen-B6xBjA_s.cjs.map} +1 -1
- package/dist/{ShopScreen-CDscN4-a.mjs → ShopScreen-CBMoK7mb.mjs} +4 -4
- package/dist/{ShopScreen-CDscN4-a.mjs.map → ShopScreen-CBMoK7mb.mjs.map} +1 -1
- package/dist/{ShopScreen-TWpb8sxs.cjs → ShopScreen-CyzjPqHN.cjs} +2 -2
- package/dist/{SubscriptionsScreen-B0drtNfN.cjs → SubscriptionsScreen-BlVX2TKS.cjs} +3 -3
- package/dist/{SubscriptionsScreen-B0drtNfN.cjs.map → SubscriptionsScreen-BlVX2TKS.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-WtnN9Ka0.cjs → SubscriptionsScreen-CWyix7Xl.cjs} +2 -2
- package/dist/{SubscriptionsScreen-D-BXah4H.mjs → SubscriptionsScreen-CXk8PnZW.mjs} +3 -3
- package/dist/{SubscriptionsScreen-D-BXah4H.mjs.map → SubscriptionsScreen-CXk8PnZW.mjs.map} +1 -1
- package/dist/index.cjs +35 -34
- package/dist/index.d.cts +183 -241
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +183 -241
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +35 -35
- package/dist/{use-account-clients-vDDhNW8x.mjs → use-account-clients-BinrTgf5.mjs} +2 -2
- package/dist/use-account-clients-BinrTgf5.mjs.map +1 -0
- package/dist/{use-account-clients-CDTUFb6O.cjs → use-account-clients-DF4kfbkl.cjs} +2 -2
- package/dist/use-account-clients-DF4kfbkl.cjs.map +1 -0
- package/dist/{use-current-user-C7O5SJ_L.cjs → use-current-user-22OsVRVp.cjs} +3 -3
- package/dist/{use-current-user-C7O5SJ_L.cjs.map → use-current-user-22OsVRVp.cjs.map} +1 -1
- package/dist/{use-current-user-Czzb9Zc4.mjs → use-current-user-CpTGZnKd.mjs} +3 -3
- package/dist/{use-current-user-Czzb9Zc4.mjs.map → use-current-user-CpTGZnKd.mjs.map} +1 -1
- package/dist/{use-customer-account-DHZ8wLs9.mjs → use-customer-account-BF2aDDqh.mjs} +3 -3
- package/dist/{use-customer-account-DHZ8wLs9.mjs.map → use-customer-account-BF2aDDqh.mjs.map} +1 -1
- package/dist/{use-customer-account-zgiEdZ89.cjs → use-customer-account-CAIi3P-_.cjs} +3 -3
- package/dist/{use-customer-account-zgiEdZ89.cjs.map → use-customer-account-CAIi3P-_.cjs.map} +1 -1
- package/dist/{use-fluid-api-Wjw57-uD.cjs → use-fluid-api-B3ezbAHw.cjs} +7 -7
- package/dist/use-fluid-api-B3ezbAHw.cjs.map +1 -0
- package/dist/use-fluid-api-DxSS-pTC.mjs +27 -0
- package/dist/use-fluid-api-DxSS-pTC.mjs.map +1 -0
- package/dist/{use-fluid-auth-Dy5K7BQ9.mjs → use-fluid-auth--1vh0Jal.mjs} +2 -2
- package/dist/{use-fluid-auth-Dy5K7BQ9.mjs.map → use-fluid-auth--1vh0Jal.mjs.map} +1 -1
- package/dist/{use-fluid-auth-BPwsWZNu.cjs → use-fluid-auth-DGFYiYO4.cjs} +2 -2
- package/dist/{use-fluid-auth-BPwsWZNu.cjs.map → use-fluid-auth-DGFYiYO4.cjs.map} +1 -1
- package/package.json +17 -17
- package/dist/FluidProvider-NnE6s3O0.cjs.map +0 -1
- package/dist/FluidProvider-dTwaHRzI.mjs.map +0 -1
- package/dist/use-account-clients-CDTUFb6O.cjs.map +0 -1
- package/dist/use-account-clients-vDDhNW8x.mjs.map +0 -1
- package/dist/use-fluid-api-D0kldm0L.mjs +0 -27
- package/dist/use-fluid-api-D0kldm0L.mjs.map +0 -1
- package/dist/use-fluid-api-Wjw57-uD.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -298,6 +298,63 @@ interface UserMe {
|
|
|
298
298
|
readonly companies?: readonly Company[];
|
|
299
299
|
}
|
|
300
300
|
//#endregion
|
|
301
|
+
//#region src/types/permissions.d.ts
|
|
302
|
+
/**
|
|
303
|
+
* Standard permission action constants.
|
|
304
|
+
* Use these constants instead of string literals for type safety.
|
|
305
|
+
*
|
|
306
|
+
* @example
|
|
307
|
+
* ```ts
|
|
308
|
+
* if (permissions[PERMISSION_ACTIONS.view]) { ... }
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
declare const PERMISSION_ACTIONS: {
|
|
312
|
+
readonly view: "view";
|
|
313
|
+
readonly create: "create";
|
|
314
|
+
readonly update: "update";
|
|
315
|
+
readonly delete: "delete";
|
|
316
|
+
readonly settings: "settings";
|
|
317
|
+
readonly add: "add";
|
|
318
|
+
readonly manage: "manage";
|
|
319
|
+
readonly send: "send";
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* Union type of standard permission actions.
|
|
323
|
+
* Derived from PERMISSION_ACTIONS constant to avoid duplication.
|
|
324
|
+
*/
|
|
325
|
+
type PermissionAction = (typeof PERMISSION_ACTIONS)[keyof typeof PERMISSION_ACTIONS];
|
|
326
|
+
/**
|
|
327
|
+
* Permission flags for a single resource.
|
|
328
|
+
* Known actions have explicit properties; index signature allows custom actions.
|
|
329
|
+
*/
|
|
330
|
+
interface ResourcePermissions {
|
|
331
|
+
readonly view?: boolean;
|
|
332
|
+
readonly create?: boolean;
|
|
333
|
+
readonly update?: boolean;
|
|
334
|
+
readonly delete?: boolean;
|
|
335
|
+
readonly settings?: boolean;
|
|
336
|
+
readonly add?: boolean;
|
|
337
|
+
readonly manage?: boolean;
|
|
338
|
+
readonly send?: boolean;
|
|
339
|
+
/** Allow custom action keys beyond the standard set */
|
|
340
|
+
readonly [key: string]: boolean | undefined;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Map of resource names to their permissions
|
|
344
|
+
*/
|
|
345
|
+
type Permissions = Record<string, ResourcePermissions>;
|
|
346
|
+
/**
|
|
347
|
+
* User's complete permission profile
|
|
348
|
+
*/
|
|
349
|
+
interface UserPermissions {
|
|
350
|
+
/** Resource permission mappings */
|
|
351
|
+
permissions: Permissions;
|
|
352
|
+
/** User's assigned roles */
|
|
353
|
+
roles: readonly string[];
|
|
354
|
+
/** Super admin bypass flag */
|
|
355
|
+
is_super_admin: boolean;
|
|
356
|
+
}
|
|
357
|
+
//#endregion
|
|
301
358
|
//#region ../core/src/data-sources/types.d.ts
|
|
302
359
|
type StaticSourceType = "collections" | "categories" | "tags";
|
|
303
360
|
type ShareableType = "Medium" | "Page" | "EnrollmentPack" | "Library" | "Product";
|
|
@@ -865,173 +922,6 @@ declare const sectionLayoutConfig: typeof SECTION_LAYOUT_CONFIG;
|
|
|
865
922
|
//#region ../core/src/types/index.d.ts
|
|
866
923
|
type StrictOmit<T, K extends keyof T> = Omit<T, K>;
|
|
867
924
|
//#endregion
|
|
868
|
-
//#region src/types/page-template.d.ts
|
|
869
|
-
/**
|
|
870
|
-
* Category for organizing page templates in the registry
|
|
871
|
-
*/
|
|
872
|
-
interface PageCategory {
|
|
873
|
-
/** Unique identifier for the category */
|
|
874
|
-
readonly id: string;
|
|
875
|
-
/** Display label */
|
|
876
|
-
label: string;
|
|
877
|
-
/** Icon identifier (e.g., lucide icon name) */
|
|
878
|
-
icon?: string;
|
|
879
|
-
}
|
|
880
|
-
/**
|
|
881
|
-
* A reusable page template that can be shared across multiple navigations
|
|
882
|
-
*/
|
|
883
|
-
interface PageTemplate {
|
|
884
|
-
/** Unique identifier for the template */
|
|
885
|
-
readonly id: string;
|
|
886
|
-
/** URL-friendly slug */
|
|
887
|
-
slug: string;
|
|
888
|
-
/** Display name */
|
|
889
|
-
name: string;
|
|
890
|
-
/** Description of the template's purpose */
|
|
891
|
-
description?: string;
|
|
892
|
-
/** Category ID for organization */
|
|
893
|
-
category: string;
|
|
894
|
-
/** Tags for filtering and search */
|
|
895
|
-
tags?: readonly string[];
|
|
896
|
-
/** The widget tree that defines the page content */
|
|
897
|
-
component_tree: readonly WidgetSchema[];
|
|
898
|
-
/** Semantic version of the template */
|
|
899
|
-
version: string;
|
|
900
|
-
/** Whether this is a core feature that cannot be removed */
|
|
901
|
-
isCore?: boolean;
|
|
902
|
-
/** Default prop values that can be customized */
|
|
903
|
-
defaultProps?: Readonly<Record<string, unknown>>;
|
|
904
|
-
/** Thumbnail image URL for UI display */
|
|
905
|
-
thumbnail?: string;
|
|
906
|
-
}
|
|
907
|
-
/**
|
|
908
|
-
* Reference to a shared page template within a navigation
|
|
909
|
-
*/
|
|
910
|
-
interface PageReference {
|
|
911
|
-
/** ID of the page template being referenced */
|
|
912
|
-
page_template_id: string;
|
|
913
|
-
/** Screen ID to assign to this page in the navigation */
|
|
914
|
-
screen_id: number;
|
|
915
|
-
/** Optional prop overrides (only prop values, not widget structure) */
|
|
916
|
-
overrides?: readonly PageOverride[];
|
|
917
|
-
}
|
|
918
|
-
/**
|
|
919
|
-
* Override for a specific widget's props within a page template
|
|
920
|
-
*/
|
|
921
|
-
interface PageOverride {
|
|
922
|
-
/** ID of the widget to override (must match WidgetSchema.id in the template) */
|
|
923
|
-
readonly widget_id: string;
|
|
924
|
-
/** Props to override (merged with original props) */
|
|
925
|
-
props: Readonly<Record<string, unknown>>;
|
|
926
|
-
}
|
|
927
|
-
/**
|
|
928
|
-
* Built-in page category IDs
|
|
929
|
-
*/
|
|
930
|
-
declare const PAGE_CATEGORIES: {
|
|
931
|
-
readonly CORE: "core";
|
|
932
|
-
readonly COMMERCE: "commerce";
|
|
933
|
-
readonly COMMUNICATION: "communication";
|
|
934
|
-
readonly DATA: "data";
|
|
935
|
-
readonly CUSTOM: "custom";
|
|
936
|
-
};
|
|
937
|
-
type PageCategoryId = (typeof PAGE_CATEGORIES)[keyof typeof PAGE_CATEGORIES];
|
|
938
|
-
//#endregion
|
|
939
|
-
//#region src/types/navigation.d.ts
|
|
940
|
-
/**
|
|
941
|
-
* Screen definition with its component tree
|
|
942
|
-
*/
|
|
943
|
-
interface ScreenDefinition {
|
|
944
|
-
readonly id: number;
|
|
945
|
-
slug: string;
|
|
946
|
-
name: string;
|
|
947
|
-
component_tree: WidgetSchema[];
|
|
948
|
-
}
|
|
949
|
-
/**
|
|
950
|
-
* Navigation configuration for the portal
|
|
951
|
-
*/
|
|
952
|
-
interface Navigation {
|
|
953
|
-
readonly definition_id: number;
|
|
954
|
-
readonly id: number;
|
|
955
|
-
name: string;
|
|
956
|
-
navigation_items: NavigationItem[];
|
|
957
|
-
/** Local screen definitions (for backwards compatibility and custom screens) */
|
|
958
|
-
screens: ScreenDefinition[];
|
|
959
|
-
/** References to shared page templates from the registry */
|
|
960
|
-
page_refs?: PageReference[];
|
|
961
|
-
}
|
|
962
|
-
//#endregion
|
|
963
|
-
//#region src/types/profile.d.ts
|
|
964
|
-
/**
|
|
965
|
-
* Portal profile containing themes and navigation configuration
|
|
966
|
-
*/
|
|
967
|
-
interface Profile {
|
|
968
|
-
/** Profile name */
|
|
969
|
-
name: string;
|
|
970
|
-
/** Available themes for the portal */
|
|
971
|
-
themes: ThemeDefinition[];
|
|
972
|
-
/** Navigation structure and screens */
|
|
973
|
-
navigation: Navigation;
|
|
974
|
-
/** Portal definition ID */
|
|
975
|
-
readonly definition_id: number;
|
|
976
|
-
}
|
|
977
|
-
//#endregion
|
|
978
|
-
//#region src/types/permissions.d.ts
|
|
979
|
-
/**
|
|
980
|
-
* Standard permission action constants.
|
|
981
|
-
* Use these constants instead of string literals for type safety.
|
|
982
|
-
*
|
|
983
|
-
* @example
|
|
984
|
-
* ```ts
|
|
985
|
-
* if (permissions[PERMISSION_ACTIONS.view]) { ... }
|
|
986
|
-
* ```
|
|
987
|
-
*/
|
|
988
|
-
declare const PERMISSION_ACTIONS: {
|
|
989
|
-
readonly view: "view";
|
|
990
|
-
readonly create: "create";
|
|
991
|
-
readonly update: "update";
|
|
992
|
-
readonly delete: "delete";
|
|
993
|
-
readonly settings: "settings";
|
|
994
|
-
readonly add: "add";
|
|
995
|
-
readonly manage: "manage";
|
|
996
|
-
readonly send: "send";
|
|
997
|
-
};
|
|
998
|
-
/**
|
|
999
|
-
* Union type of standard permission actions.
|
|
1000
|
-
* Derived from PERMISSION_ACTIONS constant to avoid duplication.
|
|
1001
|
-
*/
|
|
1002
|
-
type PermissionAction = (typeof PERMISSION_ACTIONS)[keyof typeof PERMISSION_ACTIONS];
|
|
1003
|
-
/**
|
|
1004
|
-
* Permission flags for a single resource.
|
|
1005
|
-
* Known actions have explicit properties; index signature allows custom actions.
|
|
1006
|
-
*/
|
|
1007
|
-
interface ResourcePermissions {
|
|
1008
|
-
readonly view?: boolean;
|
|
1009
|
-
readonly create?: boolean;
|
|
1010
|
-
readonly update?: boolean;
|
|
1011
|
-
readonly delete?: boolean;
|
|
1012
|
-
readonly settings?: boolean;
|
|
1013
|
-
readonly add?: boolean;
|
|
1014
|
-
readonly manage?: boolean;
|
|
1015
|
-
readonly send?: boolean;
|
|
1016
|
-
/** Allow custom action keys beyond the standard set */
|
|
1017
|
-
readonly [key: string]: boolean | undefined;
|
|
1018
|
-
}
|
|
1019
|
-
/**
|
|
1020
|
-
* Map of resource names to their permissions
|
|
1021
|
-
*/
|
|
1022
|
-
type Permissions = Record<string, ResourcePermissions>;
|
|
1023
|
-
/**
|
|
1024
|
-
* User's complete permission profile
|
|
1025
|
-
*/
|
|
1026
|
-
interface UserPermissions {
|
|
1027
|
-
/** Resource permission mappings */
|
|
1028
|
-
permissions: Permissions;
|
|
1029
|
-
/** User's assigned roles */
|
|
1030
|
-
roles: readonly string[];
|
|
1031
|
-
/** Super admin bypass flag */
|
|
1032
|
-
is_super_admin: boolean;
|
|
1033
|
-
}
|
|
1034
|
-
//#endregion
|
|
1035
925
|
//#region src/client/types.d.ts
|
|
1036
926
|
/**
|
|
1037
927
|
* HTTP methods supported by the API client.
|
|
@@ -1407,71 +1297,19 @@ interface PaginatedResult<T> {
|
|
|
1407
1297
|
readonly data: T;
|
|
1408
1298
|
readonly pagination: CursorPagination | undefined;
|
|
1409
1299
|
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
readonly title: string;
|
|
1413
|
-
readonly sku?: string | null;
|
|
1414
|
-
readonly price: string | number;
|
|
1415
|
-
readonly description?: string | null;
|
|
1416
|
-
readonly image_url?: string;
|
|
1417
|
-
readonly status?: string;
|
|
1418
|
-
readonly active?: boolean;
|
|
1419
|
-
readonly slug?: string;
|
|
1420
|
-
readonly in_stock?: boolean;
|
|
1421
|
-
readonly display_price?: string;
|
|
1422
|
-
readonly currency_code?: string;
|
|
1423
|
-
readonly updated_at?: string;
|
|
1424
|
-
readonly bundle?: boolean;
|
|
1425
|
-
readonly canonical_url?: string | null;
|
|
1426
|
-
}
|
|
1427
|
-
interface ProductListParams extends BaseListParams {
|
|
1428
|
-
readonly search_query?: string;
|
|
1429
|
-
readonly status?: readonly ("active" | "draft" | "archived" | "all")[];
|
|
1430
|
-
readonly category_id?: string;
|
|
1431
|
-
readonly category_ids?: readonly number[];
|
|
1432
|
-
readonly collection_id?: string;
|
|
1433
|
-
readonly collection_ids?: readonly number[];
|
|
1434
|
-
readonly order_by?: readonly string[];
|
|
1435
|
-
readonly country_code?: readonly string[];
|
|
1436
|
-
readonly published_stores?: readonly ("retail" | "rep")[];
|
|
1437
|
-
}
|
|
1438
|
-
/**
|
|
1439
|
-
* Paginated product list response.
|
|
1440
|
-
* After envelope unwrapping, `data` is the product array and `pagination`
|
|
1441
|
-
* carries cursor-based page info from the envelope `meta`.
|
|
1442
|
-
*/
|
|
1443
|
-
type ProductsResponse = PaginatedResult<readonly Product[]>;
|
|
1444
|
-
interface Order {
|
|
1300
|
+
/** Minimal order shape returned by the analytics dashboard endpoint. */
|
|
1301
|
+
interface DashboardOrder {
|
|
1445
1302
|
readonly id: string;
|
|
1446
1303
|
readonly order_number: string;
|
|
1447
1304
|
readonly status: string;
|
|
1448
1305
|
readonly total: number;
|
|
1449
|
-
readonly customer_id: string;
|
|
1450
|
-
readonly rep_id?: string;
|
|
1451
1306
|
readonly created_at: string;
|
|
1452
|
-
readonly updated_at: string;
|
|
1453
|
-
}
|
|
1454
|
-
interface OrderListParams extends BaseListParams {
|
|
1455
|
-
readonly status?: string;
|
|
1456
|
-
readonly customer_id?: string;
|
|
1457
|
-
readonly date_from?: string;
|
|
1458
|
-
readonly date_to?: string;
|
|
1459
|
-
}
|
|
1460
|
-
interface CreateOrderData {
|
|
1461
|
-
readonly customer_id: string;
|
|
1462
|
-
readonly line_items: readonly OrderLineItem[];
|
|
1463
|
-
readonly notes?: string;
|
|
1464
|
-
}
|
|
1465
|
-
interface OrderLineItem {
|
|
1466
|
-
readonly product_id: string;
|
|
1467
|
-
readonly quantity: number;
|
|
1468
|
-
readonly price?: number;
|
|
1469
1307
|
}
|
|
1470
1308
|
interface DashboardData {
|
|
1471
1309
|
readonly total_sales: number;
|
|
1472
1310
|
readonly total_orders: number;
|
|
1473
1311
|
readonly total_customers: number;
|
|
1474
|
-
readonly recent_orders: readonly
|
|
1312
|
+
readonly recent_orders: readonly DashboardOrder[];
|
|
1475
1313
|
}
|
|
1476
1314
|
interface SalesParams {
|
|
1477
1315
|
readonly date_from?: string;
|
|
@@ -1502,16 +1340,6 @@ interface FluidClientReturn {
|
|
|
1502
1340
|
readonly put: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions, "method" | "body">) => Promise<TResponse>;
|
|
1503
1341
|
readonly patch: <TResponse = unknown>(endpoint: string, body?: unknown, options?: Omit<RequestOptions, "method" | "body">) => Promise<TResponse>;
|
|
1504
1342
|
readonly delete: <TResponse = unknown>(endpoint: string, options?: Omit<RequestOptions, "method">) => Promise<TResponse>;
|
|
1505
|
-
readonly products: {
|
|
1506
|
-
readonly list: (params?: ProductListParams) => Promise<ProductsResponse>;
|
|
1507
|
-
readonly get: (id: string | number) => Promise<Product>;
|
|
1508
|
-
readonly search: (query: string, params?: ProductListParams) => Promise<ProductsResponse>;
|
|
1509
|
-
};
|
|
1510
|
-
readonly orders: {
|
|
1511
|
-
readonly list: (params?: OrderListParams) => Promise<Order[]>;
|
|
1512
|
-
readonly get: (id: string) => Promise<Order>;
|
|
1513
|
-
readonly create: (data: CreateOrderData) => Promise<Order>;
|
|
1514
|
-
};
|
|
1515
1343
|
readonly users: {
|
|
1516
1344
|
readonly me: () => Promise<UserMe>;
|
|
1517
1345
|
readonly switchCompany: (companyId: number) => Promise<SwitchCompanyResponse>;
|
|
@@ -1520,9 +1348,6 @@ interface FluidClientReturn {
|
|
|
1520
1348
|
readonly current: () => Promise<Rep>;
|
|
1521
1349
|
readonly updateProfile: (data: UpdateRepData) => Promise<Rep>;
|
|
1522
1350
|
};
|
|
1523
|
-
readonly profile: {
|
|
1524
|
-
readonly get: () => Promise<Profile>;
|
|
1525
|
-
};
|
|
1526
1351
|
readonly app: {
|
|
1527
1352
|
readonly getRaw: () => Promise<RawManifestResponse>;
|
|
1528
1353
|
readonly get: () => Promise<RepAppData>;
|
|
@@ -1738,6 +1563,123 @@ declare function FluidAuthProvider({
|
|
|
1738
1563
|
*/
|
|
1739
1564
|
declare function useFluidAuthContext(): FluidAuthContextValue;
|
|
1740
1565
|
//#endregion
|
|
1566
|
+
//#region src/providers/PortalTenantClientProvider.d.ts
|
|
1567
|
+
/**
|
|
1568
|
+
* Returns the portal-tenant FetchClient from context.
|
|
1569
|
+
* Must be used within a FluidProvider.
|
|
1570
|
+
*/
|
|
1571
|
+
declare function usePortalTenantClient(): FetchClient;
|
|
1572
|
+
//#endregion
|
|
1573
|
+
//#region src/types/page-template.d.ts
|
|
1574
|
+
/**
|
|
1575
|
+
* Category for organizing page templates in the registry
|
|
1576
|
+
*/
|
|
1577
|
+
interface PageCategory {
|
|
1578
|
+
/** Unique identifier for the category */
|
|
1579
|
+
readonly id: string;
|
|
1580
|
+
/** Display label */
|
|
1581
|
+
label: string;
|
|
1582
|
+
/** Icon identifier (e.g., lucide icon name) */
|
|
1583
|
+
icon?: string;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* A reusable page template that can be shared across multiple navigations
|
|
1587
|
+
*/
|
|
1588
|
+
interface PageTemplate {
|
|
1589
|
+
/** Unique identifier for the template */
|
|
1590
|
+
readonly id: string;
|
|
1591
|
+
/** URL-friendly slug */
|
|
1592
|
+
slug: string;
|
|
1593
|
+
/** Display name */
|
|
1594
|
+
name: string;
|
|
1595
|
+
/** Description of the template's purpose */
|
|
1596
|
+
description?: string;
|
|
1597
|
+
/** Category ID for organization */
|
|
1598
|
+
category: string;
|
|
1599
|
+
/** Tags for filtering and search */
|
|
1600
|
+
tags?: readonly string[];
|
|
1601
|
+
/** The widget tree that defines the page content */
|
|
1602
|
+
component_tree: readonly WidgetSchema[];
|
|
1603
|
+
/** Semantic version of the template */
|
|
1604
|
+
version: string;
|
|
1605
|
+
/** Whether this is a core feature that cannot be removed */
|
|
1606
|
+
isCore?: boolean;
|
|
1607
|
+
/** Default prop values that can be customized */
|
|
1608
|
+
defaultProps?: Readonly<Record<string, unknown>>;
|
|
1609
|
+
/** Thumbnail image URL for UI display */
|
|
1610
|
+
thumbnail?: string;
|
|
1611
|
+
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Reference to a shared page template within a navigation
|
|
1614
|
+
*/
|
|
1615
|
+
interface PageReference {
|
|
1616
|
+
/** ID of the page template being referenced */
|
|
1617
|
+
page_template_id: string;
|
|
1618
|
+
/** Screen ID to assign to this page in the navigation */
|
|
1619
|
+
screen_id: number;
|
|
1620
|
+
/** Optional prop overrides (only prop values, not widget structure) */
|
|
1621
|
+
overrides?: readonly PageOverride[];
|
|
1622
|
+
}
|
|
1623
|
+
/**
|
|
1624
|
+
* Override for a specific widget's props within a page template
|
|
1625
|
+
*/
|
|
1626
|
+
interface PageOverride {
|
|
1627
|
+
/** ID of the widget to override (must match WidgetSchema.id in the template) */
|
|
1628
|
+
readonly widget_id: string;
|
|
1629
|
+
/** Props to override (merged with original props) */
|
|
1630
|
+
props: Readonly<Record<string, unknown>>;
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Built-in page category IDs
|
|
1634
|
+
*/
|
|
1635
|
+
declare const PAGE_CATEGORIES: {
|
|
1636
|
+
readonly CORE: "core";
|
|
1637
|
+
readonly COMMERCE: "commerce";
|
|
1638
|
+
readonly COMMUNICATION: "communication";
|
|
1639
|
+
readonly DATA: "data";
|
|
1640
|
+
readonly CUSTOM: "custom";
|
|
1641
|
+
};
|
|
1642
|
+
type PageCategoryId = (typeof PAGE_CATEGORIES)[keyof typeof PAGE_CATEGORIES];
|
|
1643
|
+
//#endregion
|
|
1644
|
+
//#region src/types/navigation.d.ts
|
|
1645
|
+
/**
|
|
1646
|
+
* Screen definition with its component tree
|
|
1647
|
+
*/
|
|
1648
|
+
interface ScreenDefinition {
|
|
1649
|
+
readonly id: number;
|
|
1650
|
+
slug: string;
|
|
1651
|
+
name: string;
|
|
1652
|
+
component_tree: WidgetSchema[];
|
|
1653
|
+
}
|
|
1654
|
+
/**
|
|
1655
|
+
* Navigation configuration for the portal
|
|
1656
|
+
*/
|
|
1657
|
+
interface Navigation {
|
|
1658
|
+
readonly definition_id: number;
|
|
1659
|
+
readonly id: number;
|
|
1660
|
+
name: string;
|
|
1661
|
+
navigation_items: NavigationItem[];
|
|
1662
|
+
/** Local screen definitions (for backwards compatibility and custom screens) */
|
|
1663
|
+
screens: ScreenDefinition[];
|
|
1664
|
+
/** References to shared page templates from the registry */
|
|
1665
|
+
page_refs?: PageReference[];
|
|
1666
|
+
}
|
|
1667
|
+
//#endregion
|
|
1668
|
+
//#region src/types/profile.d.ts
|
|
1669
|
+
/**
|
|
1670
|
+
* Portal profile containing themes and navigation configuration
|
|
1671
|
+
*/
|
|
1672
|
+
interface Profile {
|
|
1673
|
+
/** Profile name */
|
|
1674
|
+
name: string;
|
|
1675
|
+
/** Available themes for the portal */
|
|
1676
|
+
themes: ThemeDefinition[];
|
|
1677
|
+
/** Navigation structure and screens */
|
|
1678
|
+
navigation: Navigation;
|
|
1679
|
+
/** Portal definition ID */
|
|
1680
|
+
readonly definition_id: number;
|
|
1681
|
+
}
|
|
1682
|
+
//#endregion
|
|
1741
1683
|
//#region src/types/screen-types.d.ts
|
|
1742
1684
|
/**
|
|
1743
1685
|
* Screen Types - Type definitions for core feature screens
|
|
@@ -2108,15 +2050,15 @@ declare function createDefaultAuthConfig(overrides?: Partial<FluidAuthConfig>):
|
|
|
2108
2050
|
*
|
|
2109
2051
|
* @example
|
|
2110
2052
|
* ```tsx
|
|
2111
|
-
* function
|
|
2053
|
+
* function UserInfo() {
|
|
2112
2054
|
* const api = useFluidApi();
|
|
2113
2055
|
*
|
|
2114
|
-
* const { data:
|
|
2115
|
-
* queryKey: ["
|
|
2116
|
-
* queryFn: () => api.
|
|
2056
|
+
* const { data: user } = useQuery({
|
|
2057
|
+
* queryKey: ["me"],
|
|
2058
|
+
* queryFn: () => api.users.me(),
|
|
2117
2059
|
* });
|
|
2118
2060
|
*
|
|
2119
|
-
* return <
|
|
2061
|
+
* return <p>Hello, {user?.name}</p>;
|
|
2120
2062
|
* }
|
|
2121
2063
|
* ```
|
|
2122
2064
|
*/
|
|
@@ -5479,5 +5421,5 @@ declare function useThemeMode(): ThemeModeContextValue;
|
|
|
5479
5421
|
/** Maps a ThemeMode to the value for `data-theme-mode`. Returns undefined for "auto". */
|
|
5480
5422
|
declare function getThemeModeAttribute(mode: ThemeMode): string | undefined;
|
|
5481
5423
|
//#endregion
|
|
5482
|
-
export { ACTIVITY_SLUGS, APP_DATA_QUERY_KEY, AUTH_CONSTANTS, type Activity as ActivityItem, type ActivitySlug, AlertWidget, type AlignOptions, ApiError, AppLink, type AppLinkProps, type AppNavigationContextValue, AppNavigationProvider, type AppNavigationProviderProps, AppShell, type AppShellProps, AuthError, type AuthErrorProps, AuthLoading, type BackgroundType, type BackgroundValue, type BaseListParams, type BorderRadiusOptions, BuilderScreenView, type BuilderScreenViewProps, BulletListWidget, type ButtonSizeOptions, CORE_PAGE_IDS, CURRENT_REP_QUERY_KEY, CURRENT_USER_QUERY_KEY, type CalendarEvent, CalendarWidget, CardWidget, CarouselWidget, type CatchUp as CatchUpItem, CatchUpWidget, ChartWidget, type ColorOptions, type Contact, type ContactAddress, type ContactStatus, type ContactType, ContactsScreen, ContainerWidget, type Conversation, type ConversationStatus, type
|
|
5424
|
+
export { ACTIVITY_SLUGS, APP_DATA_QUERY_KEY, AUTH_CONSTANTS, type Activity as ActivityItem, type ActivitySlug, AlertWidget, type AlignOptions, ApiError, AppLink, type AppLinkProps, type AppNavigationContextValue, AppNavigationProvider, type AppNavigationProviderProps, AppShell, type AppShellProps, AuthError, type AuthErrorProps, AuthLoading, type BackgroundType, type BackgroundValue, type BaseListParams, type BorderRadiusOptions, BuilderScreenView, type BuilderScreenViewProps, BulletListWidget, type ButtonSizeOptions, CORE_PAGE_IDS, CURRENT_REP_QUERY_KEY, CURRENT_USER_QUERY_KEY, type CalendarEvent, CalendarWidget, CardWidget, CarouselWidget, type CatchUp as CatchUpItem, CatchUpWidget, ChartWidget, type ColorOptions, type Contact, type ContactAddress, type ContactStatus, type ContactType, ContactsScreen, ContainerWidget, type Conversation, type ConversationStatus, type CursorPagination, CustomersScreen, DEFAULT_AUTH_URL, DEFAULT_COLORS, DEFAULT_FONT_FAMILIES, DEFAULT_FONT_SIZES, DEFAULT_RADII, DEFAULT_SDK_WIDGET_REGISTRY, DEFAULT_SPACING, DEFAULT_THEME_ID, DEFAULT_THEME_NAME, type DashboardData, type DashboardOrder, EmbedWidget, type EnvelopeMeta, FONT_FAMILY_KEYS, FONT_SIZE_KEYS, type FileCategory, type FileUploader, type FluidAuthConfig, type FluidAuthContextValue, FluidAuthProvider, type FluidAuthProviderProps, type FluidClient, FluidProvider, type FluidProviderProps, type FluidSDKConfig, FluidThemeProvider, type FluidThemeProviderProps, type FontFamilyKey, type FontSizeKey, type FontSizeOptions, type GapOptions, type GenerateThemeCSSOptions, ImageWidget, type JWTPayload, LayoutWidget, LinkWidget, type ListQueryResult, ListWidget, type ManifestEntry, type Message, type MessageType, type MessagingAuthContext, type MessagingConfig, type MessagingCurrentUser, MessagingScreen, type MySiteData, MySiteScreen, MySiteWidget, type Navigation, type NavigationItem, NestedWidget, type OklchPlain, OrdersScreen, PAGE_CATEGORIES, PERMISSIONS_QUERY_KEY, PROFILE_QUERY_KEY, PROPERTY_FIELD_TYPES, type PaddingOptions, type PageCategory, type PageCategoryId, type PageOverride, type PageReference, PageRouter, type PageRouterProps, type PageTemplate, PageTemplateProvider, PageTemplateRegistry, type PaginatedResult, type PaginationParams, type Participant, type PermissionAction, type Permissions, PointsWidget, type PortalConfig, type FetchClient as PortalTenantFetchClient, ProductsScreen, type Profile, ProfileScreen, type PropertyFieldSchema, type PropertyFieldType, type QueryResult, type QueryResultNullable, QuickLinksDropdown, type QuickLinksDropdownProps, QuickShareWidget, RADIUS_KEYS, type RadiusKey, type RawApiNavigationItem, type RawApiScreen, type RawApiTheme, type RawManifestResponse, RecentActivityWidget, type Rep, type RepAppData, type RepAppManifest, type RepAppProfile, type RequestOptions, RequireAuth, type RequireAuthProps, type ResolvedColorSet, type ResolvedSemanticColor, type ResolvedTheme, type ResourcePermissions, SCAFFOLD_MANIFEST, SEMANTIC_COLOR_NAMES, SHADE_STEPS, type SalesData, type SalesDataPoint, type SalesParams, type ScaffoldFile, type ScreenDefinition, SdkCompanySwitcher, SdkHeader, type SdkHeaderProps, SdkNavigation, type SdkNavigationProps, type SectionLayoutType, type SemanticColorName, SeparatorWidget, type SessionUser, type ShadeStep, type ShareableItem, ShareablesScreen, ShopScreen, type SlugMatch, SpacerWidget, SubscriptionsScreen, type SwitchCompanyResponse, type TabConfig, TableWidget, TextWidget, type ThemeColorInput, type ThemeColorPlain, type ThemeDefinition, type ThemeMode, ThemeModeProvider, type ThemePayload, ToDoWidget, type Todo as TodoItem, type TypedWidgetSchema, USER_TYPES, type UpdateRepData, type UploadCallbacks, type UploadResult, type UseCompanySwitchOptions, type UseContactResult, type UseContactsParams, type UseContactsResult, type UseConversationMessagesResult, type UseConversationsResult, type UseFluidPermissionsResult, type UseFluidThemeResult, type UseListResourceHook, type UseLogoutOptions, type UseSingleResourceHook, type UseUserTypeResult, type UserMe, type UserMeCompany, type UserMeCountry, type UserPermissions, type UserType, type ValueListQueryResult, VideoWidget, WIDGET_TYPE_NAMES, type WidgetPath, type WidgetPropertySchema, type WidgetRegistry, type WidgetSchema, type WidgetType, type WidgetTypeName, type WithData, alertWidgetPropertySchema, applyTheme, assertDefined, assertNever, buildThemeDefinition, buildWidgetRegistry, bulletListWidgetPropertySchema, calendarWidgetPropertySchema, cardWidgetPropertySchema, carouselWidgetPropertySchema, catchUpWidgetPropertySchema, chartWidgetPropertySchema, cleanTokenFromUrl, clearTokens, collectNavSlugs, contactsScreenPropertySchema, containerWidgetPropertySchema, createCompanyQueryKey, createDefaultAuthConfig, createDefaultAuthRedirect, createDefaultFluidConfig, createFluidClient, createFluidFileUploader, createPortal, createScreen, createWidgetFromShareable, createWidgetRegistry, customersScreenPropertySchema, deriveDarkVariant, deserialiseTheme, embedWidgetPropertySchema, extractSlugFromPathname, filterRepOnlyNavItems, gapValues, generateShades, generateThemeCSS, getActiveThemeId, getAvailablePageTemplates, getCorePageTemplates, getDefaultThemeDefinition, getForegroundColor, getOptionalPageTemplates, getProperty, getThemeModeAttribute, groupChildrenByColumn, hasData, imageWidgetPropertySchema, isActivitySlug, isApiError, isContactStatus, isErrorResult, isIdle, isLoading, isPropertyFieldType, isSlugInSection, isUserType, isWidgetType, isWidgetTypeName, layoutWidgetPropertySchema, linkWidgetPropertySchema, listWidgetPropertySchema, matchSlugPrefix, mergeDarkOverrides, messagingScreenPropertySchema, mySiteScreenPropertySchema, mySiteWidgetPropertySchema, nestedWidgetPropertySchema, normalizeComponentTree, ordersScreenPropertySchema, parseColor, pointsWidgetPropertySchema, productsScreenPropertySchema, profileScreenPropertySchema, quickShareWidgetPropertySchema, recentActivityWidgetPropertySchema, removeAllThemes, removeTheme, resolveNavigationPages, resolveTheme, screenPropertySchemas, sectionLayoutConfig, selectProperty, separatorWidgetPropertySchema, serialiseTheme, shareablesScreenPropertySchema, shopScreenPropertySchema, spacerWidgetPropertySchema, subscriptionsScreenPropertySchema, tableWidgetPropertySchema, textWidgetPropertySchema, toDoWidgetPropertySchema, toNavigationItem, toRawManifest, toScreenDefinition, transformManifestToRepAppData, transformThemes, useActivities, useAppNavigation, useCalendarEvents, useCatchUps, useCompanyScopedQueryKey, useCompanySwitch, useContact, useContacts, useConversationMessages, useConversations, useCurrentRep, useCurrentUser, useFluidApi, useFluidApp, useFluidAuth, useFluidAuthContext, useFluidContext, useFluidPermissions, useFluidProfile, useFluidTheme, useLogout, useMessagingAuth, useMessagingConfig, useMySite, usePageTemplates, usePortalTenantClient, useResolvedPages, useThemeContext, useThemeMode, useTodos, useUserType, validateNavigationPages, videoWidgetPropertySchema, widgetPropertySchemas };
|
|
5483
5425
|
//# sourceMappingURL=index.d.cts.map
|