@intlayer/design-system 6.0.2-canary.0 → 6.1.0
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/README.md +249 -56
- package/dist/.vite/manifest.json +42 -62
- package/dist/{better-auth.CMQ3rA-I-7umXOENE.js → better-auth.CiuwFiHM-7umXOENE.js} +1 -1
- package/dist/better-auth.CiuwFiHM-7umXOENE.js.map +1 -0
- package/dist/{better-auth.CMQ3rA-I-C2nBKRMa.cjs → better-auth.CiuwFiHM-C2nBKRMa.cjs} +1 -1
- package/dist/better-auth.CiuwFiHM-C2nBKRMa.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +12 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +13 -2
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +1 -1
- package/dist/components/Form/FormBase.cjs +1 -1
- package/dist/components/Form/FormBase.mjs +1 -1
- package/dist/components/Form/elements/FormElementWrapper.cjs +2 -2
- package/dist/components/Form/elements/FormElementWrapper.mjs +2 -2
- package/dist/components/IDE/CodeContext.cjs +1 -1
- package/dist/components/IDE/CodeContext.mjs +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +1 -1
- package/dist/components/MarkDownRender/index.cjs +1 -1
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.mjs +1 -1
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.mjs +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs +14 -16
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +14 -16
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +1 -1
- package/dist/components/Navbar/index.cjs +1 -1
- package/dist/components/Navbar/index.mjs +1 -1
- package/dist/components/SwitchSelector/index.cjs +1 -1
- package/dist/components/SwitchSelector/index.mjs +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +1 -1
- package/dist/hooks/auth.cjs +13 -7
- package/dist/hooks/auth.cjs.map +1 -1
- package/dist/hooks/auth.mjs +12 -6
- package/dist/hooks/auth.mjs.map +1 -1
- package/dist/hooks/reactQuery.cjs +1 -1
- package/dist/hooks/reactQuery.d.ts +111 -43
- package/dist/hooks/reactQuery.d.ts.map +1 -1
- package/dist/hooks/reactQuery.mjs +1 -1
- package/dist/hooks/useAuth/useAuth.cjs.map +1 -1
- package/dist/hooks/useAuth/useAuth.d.ts +1 -0
- package/dist/hooks/useAuth/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth/useAuth.mjs.map +1 -1
- package/dist/hooks/useAuth/useOAuth2.d.ts +1 -1
- package/dist/hooks/useAuth/useSession.d.ts +88 -1
- package/dist/hooks/useAuth/useSession.d.ts.map +1 -1
- package/dist/hooks/useUser/index.cjs +1 -1
- package/dist/hooks/useUser/index.d.ts +18 -2
- package/dist/hooks/useUser/index.d.ts.map +1 -1
- package/dist/hooks/useUser/index.mjs +1 -1
- package/dist/index-BCuMWKyy.js.map +1 -1
- package/dist/index-BYzBot7l.cjs.map +1 -1
- package/dist/{schemas-lh5OFOvX.cjs → schemas-0lUZlFWF.cjs} +703 -240
- package/dist/schemas-0lUZlFWF.cjs.map +1 -0
- package/dist/{schemas-DEXdAbCK.js → schemas-BG_GIt-j.js} +465 -2
- package/dist/schemas-BG_GIt-j.js.map +1 -0
- package/dist/zod-CCm3hUBS.js +210 -0
- package/dist/zod-CCm3hUBS.js.map +1 -0
- package/dist/zod-CvjrdkEg.cjs +209 -0
- package/dist/zod-CvjrdkEg.cjs.map +1 -0
- package/package.json +46 -44
- package/dist/better-auth.CMQ3rA-I-7umXOENE.js.map +0 -1
- package/dist/better-auth.CMQ3rA-I-C2nBKRMa.cjs.map +0 -1
- package/dist/parse-Ltyyb1op.cjs +0 -509
- package/dist/parse-Ltyyb1op.cjs.map +0 -1
- package/dist/parse-Vrm0h1r9.js +0 -510
- package/dist/parse-Vrm0h1r9.js.map +0 -1
- package/dist/schemas-DEXdAbCK.js.map +0 -1
- package/dist/schemas-lh5OFOvX.cjs.map +0 -1
- package/dist/zod-BvUVjPTw.cjs +0 -91
- package/dist/zod-BvUVjPTw.cjs.map +0 -1
- package/dist/zod-CJrbzxwg.js +0 -92
- package/dist/zod-CJrbzxwg.js.map +0 -1
|
@@ -818,79 +818,147 @@ export declare const useGetUserByAccount: () => import('@tanstack/react-query').
|
|
|
818
818
|
* User
|
|
819
819
|
*/
|
|
820
820
|
export declare const useGetUsers: (filters?: GetUsersParams, options?: UseQueryOptions) => UseQueryResult<unknown, Error>;
|
|
821
|
-
export declare const useCreateUser: () => import('@tanstack/react-query').UseMutationResult<UpdateUserResult, Error,
|
|
822
|
-
|
|
823
|
-
|
|
821
|
+
export declare const useCreateUser: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UpdateUserResult, Error, Partial<{
|
|
822
|
+
id: string;
|
|
823
|
+
lang?: string | undefined;
|
|
824
|
+
role?: string | undefined;
|
|
825
|
+
email: string;
|
|
826
|
+
name: string;
|
|
827
|
+
image?: string | null | undefined;
|
|
828
|
+
createdAt: Date;
|
|
829
|
+
updatedAt: Date;
|
|
830
|
+
emailVerified: boolean;
|
|
831
|
+
phone?: string | undefined;
|
|
832
|
+
dateOfBirth?: Date | undefined;
|
|
833
|
+
emailsList?: {
|
|
834
|
+
newsLetter: boolean;
|
|
835
|
+
} | undefined;
|
|
836
|
+
customerId?: string | undefined;
|
|
837
|
+
}>, unknown>;
|
|
838
|
+
export declare const useUpdateUser: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UpdateUserResult, Error, Partial<{
|
|
839
|
+
id: string;
|
|
840
|
+
lang?: string | undefined;
|
|
841
|
+
role?: string | undefined;
|
|
842
|
+
email: string;
|
|
843
|
+
name: string;
|
|
844
|
+
image?: string | null | undefined;
|
|
845
|
+
createdAt: Date;
|
|
846
|
+
updatedAt: Date;
|
|
847
|
+
emailVerified: boolean;
|
|
848
|
+
phone?: string | undefined;
|
|
849
|
+
dateOfBirth?: Date | undefined;
|
|
850
|
+
emailsList?: {
|
|
851
|
+
newsLetter: boolean;
|
|
852
|
+
} | undefined;
|
|
853
|
+
customerId?: string | undefined;
|
|
854
|
+
}>, unknown>;
|
|
855
|
+
export declare const useDeleteUser: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UpdateUserResult, Error, string, unknown>;
|
|
824
856
|
/**
|
|
825
857
|
* Organization
|
|
826
858
|
*/
|
|
827
|
-
export declare const useGetOrganizations: (filters?: GetOrganizationsParams) => UseQueryResult<GetOrganizationsResult, unknown>;
|
|
828
|
-
export declare const useAddOrganization: () => import('@tanstack/react-query').UseMutationResult<AddOrganizationResult, Error,
|
|
829
|
-
export declare const useUpdateOrganization: () => import('@tanstack/react-query').UseMutationResult<UpdateOrganizationResult, Error,
|
|
830
|
-
export declare const useUpdateOrganizationMembers: () => import('@tanstack/react-query').UseMutationResult<UpdateOrganizationMembersResult, Error,
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
export declare const
|
|
859
|
+
export declare const useGetOrganizations: (filters?: GetOrganizationsParams) => UseQueryResult<import('@intlayer/backend').GetOrganizationsResult, unknown>;
|
|
860
|
+
export declare const useAddOrganization: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AddOrganizationResult, Error, import('@intlayer/backend').OrganizationCreationData, unknown>;
|
|
861
|
+
export declare const useUpdateOrganization: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UpdateOrganizationResult, Error, Partial<import('@intlayer/backend').Organization>, unknown>;
|
|
862
|
+
export declare const useUpdateOrganizationMembers: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UpdateOrganizationMembersResult, Error, Partial<{
|
|
863
|
+
membersIds: (import('@intlayer/backend').User | import('@intlayer/backend').UserAPI)["id"][];
|
|
864
|
+
adminsIds: (import('@intlayer/backend').User | import('@intlayer/backend').UserAPI)["id"][];
|
|
865
|
+
}>, unknown>;
|
|
866
|
+
export declare const useAddOrganizationMember: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AddOrganizationMemberResult, Error, import('@intlayer/backend').AddOrganizationMemberBody, unknown>;
|
|
867
|
+
export declare const useDeleteOrganization: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').DeleteOrganizationResult, Error, import('@intlayer/api').FetcherOptions | undefined, unknown>;
|
|
868
|
+
export declare const useSelectOrganization: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').SelectOrganizationResult, Error, string | import("mongoose").Types.ObjectId, unknown>;
|
|
869
|
+
export declare const useUnselectOrganization: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UnselectOrganizationResult, Error, import('@intlayer/api').FetcherOptions | undefined, unknown>;
|
|
835
870
|
/**
|
|
836
871
|
* Project
|
|
837
872
|
*/
|
|
838
|
-
export declare const useGetProjects: (filters?: GetProjectsParams) => UseQueryResult<GetProjectsResult, unknown>;
|
|
839
|
-
export declare const useAddProject: () => import('@tanstack/react-query').UseMutationResult<AddProjectResult, Error,
|
|
840
|
-
export declare const useUpdateProject: () => import('@tanstack/react-query').UseMutationResult<UpdateProjectResult, Error,
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
873
|
+
export declare const useGetProjects: (filters?: GetProjectsParams) => UseQueryResult<import('@intlayer/backend').GetProjectsResult, unknown>;
|
|
874
|
+
export declare const useAddProject: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AddProjectResult, Error, import('@intlayer/backend').ProjectCreationData, unknown>;
|
|
875
|
+
export declare const useUpdateProject: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UpdateProjectResult, Error, Partial<{
|
|
876
|
+
organizationId: string;
|
|
877
|
+
name: string;
|
|
878
|
+
membersIds: string[];
|
|
879
|
+
adminsIds: string[];
|
|
880
|
+
creatorId: string;
|
|
881
|
+
configuration?: {
|
|
882
|
+
internationalization: {
|
|
883
|
+
locales: import('intlayer').Locales[];
|
|
884
|
+
defaultLocale: import('intlayer').Locales;
|
|
885
|
+
};
|
|
886
|
+
editor: {
|
|
887
|
+
applicationURL: string;
|
|
888
|
+
cmsURL: string;
|
|
889
|
+
};
|
|
890
|
+
} | undefined;
|
|
891
|
+
id: string;
|
|
892
|
+
createdAt: number;
|
|
893
|
+
updatedAt: number;
|
|
894
|
+
oAuth2Access: {
|
|
895
|
+
name: string;
|
|
896
|
+
grants: string[];
|
|
897
|
+
expiresAt?: Date | undefined;
|
|
898
|
+
clientId: string;
|
|
899
|
+
clientSecret: string;
|
|
900
|
+
accessToken: string[];
|
|
901
|
+
userId: string;
|
|
902
|
+
id: string;
|
|
903
|
+
createdAt: number;
|
|
904
|
+
updatedAt: number;
|
|
905
|
+
}[];
|
|
906
|
+
}>, unknown>;
|
|
907
|
+
export declare const useUpdateProjectMembers: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UpdateProjectMembersResult, Error, Partial<{
|
|
908
|
+
membersIds: import('@intlayer/backend').ProjectMemberByIdOption[];
|
|
909
|
+
}>, unknown>;
|
|
910
|
+
export declare const useDeleteProject: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').DeleteProjectResult, Error, import('@intlayer/api').FetcherOptions | undefined, unknown>;
|
|
911
|
+
export declare const useSelectProject: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').SelectProjectResult, Error, string | import("mongoose").Types.ObjectId, unknown>;
|
|
912
|
+
export declare const useUnselectProject: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UnselectProjectResult, Error, import('@intlayer/api').FetcherOptions | undefined, unknown>;
|
|
913
|
+
export declare const useAddNewAccessKey: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AddNewAccessKeyResponse, Error, import('@intlayer/backend').AccessKeyData, unknown>;
|
|
914
|
+
export declare const useDeleteAccessKey: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').DeleteAccessKeyResponse, Error, string, unknown>;
|
|
915
|
+
export declare const useRefreshAccessKey: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').RefreshAccessKeyResponse, Error, string, unknown>;
|
|
848
916
|
/**
|
|
849
917
|
* Dictionary
|
|
850
918
|
*/
|
|
851
|
-
export declare const useGetDictionaries: (filters?: GetDictionariesParams) => UseQueryResult<GetDictionariesResult, unknown>;
|
|
919
|
+
export declare const useGetDictionaries: (filters?: GetDictionariesParams) => UseQueryResult<import('@intlayer/backend').GetDictionariesResult, unknown>;
|
|
852
920
|
export declare const useGetDictionariesKeys: (options?: Partial<UseQueryOptions<GetDictionariesKeysResult>>) => UseQueryResult<GetDictionariesKeysResult, Error>;
|
|
853
|
-
export declare const useGetDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"]) => UseQueryResult<GetDictionaryResult, unknown>;
|
|
854
|
-
export declare const useAddDictionary: () => import('@tanstack/react-query').UseMutationResult<AddDictionaryResult, Error, AddDictionaryBody, unknown>;
|
|
855
|
-
export declare const usePushDictionaries: () => import('@tanstack/react-query').UseMutationResult<PushDictionariesResult, Error,
|
|
856
|
-
export declare const useUpdateDictionary: () => import('@tanstack/react-query').UseMutationResult<UpdateDictionaryResult, Error,
|
|
857
|
-
export declare const useDeleteDictionary: () => import('@tanstack/react-query').UseMutationResult<DeleteDictionaryResult, Error,
|
|
921
|
+
export declare const useGetDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"]) => UseQueryResult<import('@intlayer/backend').GetDictionaryResult, unknown>;
|
|
922
|
+
export declare const useAddDictionary: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AddDictionaryResult, Error, import('@intlayer/backend').AddDictionaryBody, unknown>;
|
|
923
|
+
export declare const usePushDictionaries: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').PushDictionariesResult, Error, import('@intlayer/core').Dictionary[], unknown>;
|
|
924
|
+
export declare const useUpdateDictionary: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UpdateDictionaryResult, Error, Partial<import('@intlayer/backend').Dictionary>, unknown>;
|
|
925
|
+
export declare const useDeleteDictionary: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').DeleteDictionaryResult, Error, string, unknown>;
|
|
858
926
|
/**
|
|
859
927
|
* Tag
|
|
860
928
|
*/
|
|
861
|
-
export declare const useGetTags: (filters?: GetTagsParams) => UseQueryResult<GetTagsResult, unknown>;
|
|
862
|
-
export declare const useAddTag: () => import('@tanstack/react-query').UseMutationResult<AddTagResult, Error,
|
|
863
|
-
export declare const useUpdateTag: () => import('@tanstack/react-query').UseMutationResult<UpdateTagResult, Error, {
|
|
929
|
+
export declare const useGetTags: (filters?: GetTagsParams) => UseQueryResult<import('@intlayer/backend').GetTagsResult, unknown>;
|
|
930
|
+
export declare const useAddTag: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AddTagResult, Error, import('@intlayer/backend').TagCreationData, unknown>;
|
|
931
|
+
export declare const useUpdateTag: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').UpdateTagResult, Error, {
|
|
864
932
|
tagId: string;
|
|
865
933
|
tag: any;
|
|
866
934
|
}, unknown>;
|
|
867
|
-
export declare const useDeleteTag: () => import('@tanstack/react-query').UseMutationResult<DeleteTagResult, Error,
|
|
935
|
+
export declare const useDeleteTag: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').DeleteTagResult, Error, string | import("mongoose").Types.ObjectId, unknown>;
|
|
868
936
|
/**
|
|
869
937
|
* Stripe
|
|
870
938
|
*/
|
|
871
939
|
export declare const useGetPricing: (body: GetPricingBody, options?: Partial<UseQueryOptions<GetPricingResult>>) => UseQueryResult<GetPricingResult, Error>;
|
|
872
|
-
export declare const useGetSubscription: (body: GetCheckoutSessionBody) => UseQueryResult<GetCheckoutSessionResult, unknown>;
|
|
873
|
-
export declare const useCancelSubscription: () => import('@tanstack/react-query').UseMutationResult<GetCheckoutSessionResult, Error, import('@intlayer/api').FetcherOptions | undefined, unknown>;
|
|
940
|
+
export declare const useGetSubscription: (body: GetCheckoutSessionBody) => UseQueryResult<import('@intlayer/backend').GetCheckoutSessionResult, unknown>;
|
|
941
|
+
export declare const useCancelSubscription: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').GetCheckoutSessionResult, Error, import('@intlayer/api').FetcherOptions | undefined, unknown>;
|
|
874
942
|
/**
|
|
875
943
|
* AI
|
|
876
944
|
*/
|
|
877
|
-
export declare const useTranslateJSONDeclaration: () => import('@tanstack/react-query').UseMutationResult<TranslateJSONResult, Error,
|
|
878
|
-
export declare const useAuditContentDeclaration: () => import('@tanstack/react-query').UseMutationResult<AuditContentDeclarationResult, Error,
|
|
879
|
-
export declare const useAuditContentDeclarationMetadata: () => import('@tanstack/react-query').UseMutationResult<AuditContentDeclarationMetadataResult, Error,
|
|
880
|
-
export declare const useAuditContentDeclarationField: () => import('@tanstack/react-query').UseMutationResult<AuditContentDeclarationFieldResult, Error,
|
|
881
|
-
export declare const useAuditTag: () => import('@tanstack/react-query').UseMutationResult<AuditTagResult, Error,
|
|
945
|
+
export declare const useTranslateJSONDeclaration: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').TranslateJSONResult, Error, import('@intlayer/backend').TranslateJSONBody | undefined, unknown>;
|
|
946
|
+
export declare const useAuditContentDeclaration: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AuditContentDeclarationResult, Error, import('@intlayer/backend').AuditContentDeclarationBody | undefined, unknown>;
|
|
947
|
+
export declare const useAuditContentDeclarationMetadata: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AuditContentDeclarationMetadataResult, Error, import('@intlayer/backend').AuditContentDeclarationMetadataBody | undefined, unknown>;
|
|
948
|
+
export declare const useAuditContentDeclarationField: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AuditContentDeclarationFieldResult, Error, import('@intlayer/backend').AuditContentDeclarationFieldBody | undefined, unknown>;
|
|
949
|
+
export declare const useAuditTag: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AuditTagResult, Error, import('@intlayer/backend').AuditTagBody | undefined, unknown>;
|
|
882
950
|
export declare const useAskDocQuestion: () => import('@tanstack/react-query').UseMutationResult<void, Error, import('@intlayer/api').AskDocQuestionBody | undefined, unknown>;
|
|
883
|
-
export declare const useAutocomplete: () => import('@tanstack/react-query').UseMutationResult<AutocompleteResponse, Error, import('@intlayer/api').AutocompleteBody | undefined, unknown>;
|
|
951
|
+
export declare const useAutocomplete: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').AutocompleteResponse, Error, import('@intlayer/api').AutocompleteBody | undefined, unknown>;
|
|
884
952
|
/**
|
|
885
953
|
* Search
|
|
886
954
|
*/
|
|
887
|
-
export declare const useSearchDoc: (params?: SearchDocUtilParams) => UseQueryResult<SearchDocUtilResult, Error>;
|
|
955
|
+
export declare const useSearchDoc: (params?: SearchDocUtilParams) => UseQueryResult<import('@intlayer/backend').SearchDocUtilResult, Error>;
|
|
888
956
|
/**
|
|
889
957
|
* Newsletter
|
|
890
958
|
*/
|
|
891
|
-
export declare const useSubscribeToNewsletter: () => import('@tanstack/react-query').UseMutationResult<NewsletterSubscriptionResult, Error, NewsletterSubscriptionBody, unknown>;
|
|
892
|
-
export declare const useUnsubscribeFromNewsletter: () => import('@tanstack/react-query').UseMutationResult<NewsletterSubscriptionResult, Error, NewsletterUnsubscriptionBody, unknown>;
|
|
893
|
-
export declare const useGetNewsletterStatus: () => import('@tanstack/react-query').UseMutationResult<NewsletterSubscriptionResult, Error, import('@intlayer/api').FetcherOptions | undefined, unknown>;
|
|
959
|
+
export declare const useSubscribeToNewsletter: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').NewsletterSubscriptionResult, Error, import('@intlayer/backend').NewsletterSubscriptionBody, unknown>;
|
|
960
|
+
export declare const useUnsubscribeFromNewsletter: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').NewsletterSubscriptionResult, Error, import('@intlayer/backend').NewsletterUnsubscriptionBody, unknown>;
|
|
961
|
+
export declare const useGetNewsletterStatus: () => import('@tanstack/react-query').UseMutationResult<import('@intlayer/backend').NewsletterSubscriptionResult, Error, import('@intlayer/api').FetcherOptions | undefined, unknown>;
|
|
894
962
|
/**
|
|
895
963
|
* Editor
|
|
896
964
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/reactQuery.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,QAAQ,EAGR,cAAc,EACd,eAAe,EACf,cAAc,EACf,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAE,cAAc,EAAE,CAAC;AA4C1B,eAAO,MAAM,WAAW,GACtB,YAAY,EACZ,MAAM,EACN,KAAK,GAAG,YAAY,EACpB,SAAS,SAAS,QAAQ,GAAG,QAAQ,EAErC,SAAS,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,GAAG;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,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O3B,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,YAAY,GAAI,SAAS,mBAAmB,2EAOxD,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,wBAAwB,2LAOpC,CAAC;AAEF,eAAO,MAAM,4BAA4B,6LAOxC,CAAC;AAEF,eAAO,MAAM,sBAAsB,uLAOlC,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,wBAAwB,0DAOpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,yLAO9B,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { useQueryClient } from "@tanstack/react-query";
|
|
|
5
5
|
import { useAuth } from "./useAuth/useAuth.mjs";
|
|
6
6
|
import "@intlayer/api";
|
|
7
7
|
import "@intlayer/config/built";
|
|
8
|
-
import "../better-auth.
|
|
8
|
+
import "../better-auth.CiuwFiHM-7umXOENE.js";
|
|
9
9
|
import { useIntlayerAuth, useIntlayerOAuth } from "./useIntlayerAPI.mjs";
|
|
10
10
|
const useAuthEnable = ({
|
|
11
11
|
requireUser,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.cjs","sources":["../../../src/hooks/useAuth/useAuth.ts"],"sourcesContent":["'use client';\n\nimport type { OAuth2Token, SessionAPI } from '@intlayer/backend';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\n\ntype SessionContextProps = {\n session: SessionAPI | null | undefined;\n setSession: (session: SessionAPI | null) => void;\n fetchSession: () => Promise<SessionAPI | null | undefined>;\n revalidateSession: () => Promise<SessionAPI | null | undefined>;\n isAuthenticated: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n};\n\nexport const useAuth = ({\n session: sessionProp,\n intlayerConfiguration,\n}: {\n session?: SessionAPI | null;\n intlayerConfiguration?: IntlayerConfig;\n} = {}): SessionContextProps => {\n const { session, fetchSession, revalidateSession, setSession } = useSession(\n sessionProp,\n intlayerConfiguration\n );\n const { oAuth2AccessToken } = useOAuth2(intlayerConfiguration);\n\n return {\n session,\n fetchSession,\n setSession,\n revalidateSession,\n oAuth2AccessToken,\n isAuthenticated: Boolean(session?.user || oAuth2AccessToken),\n };\n};\n"],"names":["useSession","useOAuth2"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"useAuth.cjs","sources":["../../../src/hooks/useAuth/useAuth.ts"],"sourcesContent":["'use client';\n\nimport type { OAuth2Token, SessionAPI } from '@intlayer/backend';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\n\ntype SessionContextProps = {\n session: SessionAPI | null | undefined;\n setSession: (session: SessionAPI | null) => void;\n fetchSession: () => Promise<SessionAPI | null | undefined>;\n revalidateSession: () => Promise<SessionAPI | null | undefined>;\n isAuthenticated: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n};\n\nexport type Session = SessionAPI;\n\nexport const useAuth = ({\n session: sessionProp,\n intlayerConfiguration,\n}: {\n session?: SessionAPI | null;\n intlayerConfiguration?: IntlayerConfig;\n} = {}): SessionContextProps => {\n const { session, fetchSession, revalidateSession, setSession } = useSession(\n sessionProp,\n intlayerConfiguration\n );\n const { oAuth2AccessToken } = useOAuth2(intlayerConfiguration);\n\n return {\n session,\n fetchSession,\n setSession,\n revalidateSession,\n oAuth2AccessToken,\n isAuthenticated: Boolean(session?.user || oAuth2AccessToken),\n };\n};\n"],"names":["useSession","useOAuth2"],"mappings":";;;;;AAkBO,MAAM,UAAU,CAAC;AAAA,EACtB,SAAS;AAAA,EACT;AACF,IAGI,OAA4B;AAC9B,QAAM,EAAE,SAAS,cAAc,mBAAmB,eAAeA,yBAAAA;AAAAA,IAC/D;AAAA,IACA;AAAA,EAAA;AAEF,QAAM,EAAE,kBAAA,IAAsBC,wBAAAA,UAAU,qBAAqB;AAE7D,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,QAAQ,SAAS,QAAQ,iBAAiB;AAAA,EAAA;AAE/D;;"}
|
|
@@ -8,6 +8,7 @@ type SessionContextProps = {
|
|
|
8
8
|
isAuthenticated: boolean;
|
|
9
9
|
oAuth2AccessToken: OAuth2Token | null | undefined;
|
|
10
10
|
};
|
|
11
|
+
export type Session = SessionAPI;
|
|
11
12
|
export declare const useAuth: ({ session: sessionProp, intlayerConfiguration, }?: {
|
|
12
13
|
session?: SessionAPI | null;
|
|
13
14
|
intlayerConfiguration?: IntlayerConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useAuth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,YAAY,EAAE,MAAM,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAC3D,iBAAiB,EAAE,MAAM,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAChE,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,mDAGrB;IACD,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC5B,qBAAqB,CAAC,EAAE,cAAc,CAAC;CACnC,KAAG,mBAeR,CAAC"}
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useAuth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,YAAY,EAAE,MAAM,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAC3D,iBAAiB,EAAE,MAAM,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAChE,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC;AAEjC,eAAO,MAAM,OAAO,GAAI,mDAGrB;IACD,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC5B,qBAAqB,CAAC,EAAE,cAAc,CAAC;CACnC,KAAG,mBAeR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.mjs","sources":["../../../src/hooks/useAuth/useAuth.ts"],"sourcesContent":["'use client';\n\nimport type { OAuth2Token, SessionAPI } from '@intlayer/backend';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\n\ntype SessionContextProps = {\n session: SessionAPI | null | undefined;\n setSession: (session: SessionAPI | null) => void;\n fetchSession: () => Promise<SessionAPI | null | undefined>;\n revalidateSession: () => Promise<SessionAPI | null | undefined>;\n isAuthenticated: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n};\n\nexport const useAuth = ({\n session: sessionProp,\n intlayerConfiguration,\n}: {\n session?: SessionAPI | null;\n intlayerConfiguration?: IntlayerConfig;\n} = {}): SessionContextProps => {\n const { session, fetchSession, revalidateSession, setSession } = useSession(\n sessionProp,\n intlayerConfiguration\n );\n const { oAuth2AccessToken } = useOAuth2(intlayerConfiguration);\n\n return {\n session,\n fetchSession,\n setSession,\n revalidateSession,\n oAuth2AccessToken,\n isAuthenticated: Boolean(session?.user || oAuth2AccessToken),\n };\n};\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"useAuth.mjs","sources":["../../../src/hooks/useAuth/useAuth.ts"],"sourcesContent":["'use client';\n\nimport type { OAuth2Token, SessionAPI } from '@intlayer/backend';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\n\ntype SessionContextProps = {\n session: SessionAPI | null | undefined;\n setSession: (session: SessionAPI | null) => void;\n fetchSession: () => Promise<SessionAPI | null | undefined>;\n revalidateSession: () => Promise<SessionAPI | null | undefined>;\n isAuthenticated: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n};\n\nexport type Session = SessionAPI;\n\nexport const useAuth = ({\n session: sessionProp,\n intlayerConfiguration,\n}: {\n session?: SessionAPI | null;\n intlayerConfiguration?: IntlayerConfig;\n} = {}): SessionContextProps => {\n const { session, fetchSession, revalidateSession, setSession } = useSession(\n sessionProp,\n intlayerConfiguration\n );\n const { oAuth2AccessToken } = useOAuth2(intlayerConfiguration);\n\n return {\n session,\n fetchSession,\n setSession,\n revalidateSession,\n oAuth2AccessToken,\n isAuthenticated: Boolean(session?.user || oAuth2AccessToken),\n };\n};\n"],"names":[],"mappings":";;;AAkBO,MAAM,UAAU,CAAC;AAAA,EACtB,SAAS;AAAA,EACT;AACF,IAGI,OAA4B;AAC9B,QAAM,EAAE,SAAS,cAAc,mBAAmB,eAAe;AAAA,IAC/D;AAAA,IACA;AAAA,EAAA;AAEF,QAAM,EAAE,kBAAA,IAAsB,UAAU,qBAAqB;AAE7D,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,QAAQ,SAAS,QAAQ,iBAAiB;AAAA,EAAA;AAE/D;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IntlayerConfig } from '@intlayer/config/client';
|
|
2
2
|
export declare const useOAuth2: (intlayerConfiguration?: IntlayerConfig) => {
|
|
3
|
-
oAuth2AccessToken:
|
|
3
|
+
oAuth2AccessToken: import('@intlayer/backend').OAuth2Token | null | undefined;
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=useOAuth2.d.ts.map
|
|
@@ -1,7 +1,94 @@
|
|
|
1
1
|
import { SessionAPI } from '@intlayer/backend';
|
|
2
2
|
import { IntlayerConfig } from '@intlayer/config/client';
|
|
3
3
|
export declare const useSession: (sessionProp?: SessionAPI | null, intlayerConfiguration?: IntlayerConfig) => {
|
|
4
|
-
session:
|
|
4
|
+
session: {
|
|
5
|
+
session: {
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
updatedAt: Date;
|
|
8
|
+
userId: string;
|
|
9
|
+
expiresAt: Date;
|
|
10
|
+
token: string;
|
|
11
|
+
ipAddress?: string | null | undefined;
|
|
12
|
+
userAgent?: string | null | undefined;
|
|
13
|
+
id: string;
|
|
14
|
+
activeOrganizationId?: string | undefined;
|
|
15
|
+
activeProjectId?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
user: {
|
|
18
|
+
email: string;
|
|
19
|
+
name: string;
|
|
20
|
+
image?: string | null | undefined;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
emailVerified: boolean;
|
|
24
|
+
phone?: string | undefined;
|
|
25
|
+
dateOfBirth?: Date | undefined;
|
|
26
|
+
id: string;
|
|
27
|
+
emailsList?: {
|
|
28
|
+
newsLetter: boolean;
|
|
29
|
+
} | undefined;
|
|
30
|
+
customerId?: string | undefined;
|
|
31
|
+
role?: string | undefined;
|
|
32
|
+
lang?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
organization?: {
|
|
35
|
+
name: string;
|
|
36
|
+
membersIds: string[];
|
|
37
|
+
adminsIds: string[];
|
|
38
|
+
id: string;
|
|
39
|
+
creatorId: string;
|
|
40
|
+
plan?: {
|
|
41
|
+
type: import('@intlayer/backend').PlanType;
|
|
42
|
+
creatorId?: string | undefined;
|
|
43
|
+
subscriptionId?: string | undefined;
|
|
44
|
+
customerId?: string | undefined;
|
|
45
|
+
priceId?: string | undefined;
|
|
46
|
+
status?: "active" | "canceled" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "paused" | "trialing" | undefined;
|
|
47
|
+
period?: "MONTHLY" | "YEARLY" | undefined;
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: number;
|
|
50
|
+
updatedAt: number;
|
|
51
|
+
} | undefined;
|
|
52
|
+
createdAt: number;
|
|
53
|
+
updatedAt: number;
|
|
54
|
+
} | null | undefined;
|
|
55
|
+
project?: {
|
|
56
|
+
organizationId: string;
|
|
57
|
+
name: string;
|
|
58
|
+
membersIds: string[];
|
|
59
|
+
adminsIds: string[];
|
|
60
|
+
creatorId: string;
|
|
61
|
+
configuration?: {
|
|
62
|
+
internationalization: {
|
|
63
|
+
locales: import('intlayer').Locales[];
|
|
64
|
+
defaultLocale: import('intlayer').Locales;
|
|
65
|
+
};
|
|
66
|
+
editor: {
|
|
67
|
+
applicationURL: string;
|
|
68
|
+
cmsURL: string;
|
|
69
|
+
};
|
|
70
|
+
} | undefined;
|
|
71
|
+
id: string;
|
|
72
|
+
createdAt: number;
|
|
73
|
+
updatedAt: number;
|
|
74
|
+
oAuth2Access: {
|
|
75
|
+
name: string;
|
|
76
|
+
grants: string[];
|
|
77
|
+
expiresAt?: Date | undefined;
|
|
78
|
+
clientId: string;
|
|
79
|
+
clientSecret: string;
|
|
80
|
+
accessToken: string[];
|
|
81
|
+
userId: string;
|
|
82
|
+
id: string;
|
|
83
|
+
createdAt: number;
|
|
84
|
+
updatedAt: number;
|
|
85
|
+
}[];
|
|
86
|
+
} | null | undefined;
|
|
87
|
+
id: string;
|
|
88
|
+
permissions: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Permission[];
|
|
89
|
+
roles: import('node_modules/@intlayer/backend/dist/types/utils/permissions').Roles[];
|
|
90
|
+
authType: "session" | "oauth2" | null;
|
|
91
|
+
} | null | undefined;
|
|
5
92
|
fetchSession: () => Promise<SessionAPI | null | undefined>;
|
|
6
93
|
revalidateSession: () => Promise<SessionAPI | null | undefined>;
|
|
7
94
|
setSession: (nextSession: SessionAPI | null) => unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useSession.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM9D,eAAO,MAAM,UAAU,GACrB,cAAc,UAAU,GAAG,IAAI,EAC/B,wBAAwB,cAAc
|
|
1
|
+
{"version":3,"file":"useSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useSession.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM9D,eAAO,MAAM,UAAU,GACrB,cAAc,UAAU,GAAG,IAAI,EAC/B,wBAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6BP,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;6BAAtC,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;8BAHpC,UAAU,GAAG,IAAI;CAgBnD,CAAC"}
|
|
@@ -7,7 +7,7 @@ require("@intlayer/api");
|
|
|
7
7
|
require("@intlayer/config/built");
|
|
8
8
|
require("@intlayer/editor-react");
|
|
9
9
|
require("@tanstack/react-query");
|
|
10
|
-
require("../../better-auth.
|
|
10
|
+
require("../../better-auth.CiuwFiHM-C2nBKRMa.cjs");
|
|
11
11
|
const useUser = () => {
|
|
12
12
|
const { session, revalidateSession, setSession } = hooks_useAuth_useAuth.useAuth();
|
|
13
13
|
const { mutate: logout } = hooks_reactQuery.useLogout();
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
export declare const useUser: () => {
|
|
2
2
|
isAuthenticated: boolean;
|
|
3
3
|
isUnauthenticated: boolean;
|
|
4
|
-
user:
|
|
5
|
-
|
|
4
|
+
user: {
|
|
5
|
+
email: string;
|
|
6
|
+
name: string;
|
|
7
|
+
image?: string | null | undefined;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt: Date;
|
|
10
|
+
emailVerified: boolean;
|
|
11
|
+
phone?: string | undefined;
|
|
12
|
+
dateOfBirth?: Date | undefined;
|
|
13
|
+
id: string;
|
|
14
|
+
emailsList?: {
|
|
15
|
+
newsLetter: boolean;
|
|
16
|
+
} | undefined;
|
|
17
|
+
customerId?: string | undefined;
|
|
18
|
+
role?: string | undefined;
|
|
19
|
+
lang?: string | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
revalidateSession: () => Promise<import('@intlayer/backend').SessionAPI | null | undefined>;
|
|
6
22
|
logout: () => Promise<void>;
|
|
7
23
|
};
|
|
8
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUser/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUser/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;CAuBnB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import "@intlayer/api";
|
|
|
5
5
|
import "@intlayer/config/built";
|
|
6
6
|
import "@intlayer/editor-react";
|
|
7
7
|
import "@tanstack/react-query";
|
|
8
|
-
import "../../better-auth.
|
|
8
|
+
import "../../better-auth.CiuwFiHM-7umXOENE.js";
|
|
9
9
|
const useUser = () => {
|
|
10
10
|
const { session, revalidateSession, setSession } = useAuth();
|
|
11
11
|
const { mutate: logout } = useLogout();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-BCuMWKyy.js","sources":["../../../../node_modules/.pnpm/zustand@4.5.7_@types+react@19.1.
|
|
1
|
+
{"version":3,"file":"index-BCuMWKyy.js","sources":["../../../../node_modules/.pnpm/zustand@4.5.7_@types+react@19.1.13_immer@9.0.21_react@19.1.1/node_modules/zustand/esm/react/shallow.mjs","../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":["import ReactExports from 'react';\n\nfunction shallow(objA, objB) {\n if (Object.is(objA, objB)) {\n return true;\n }\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n if (objA instanceof Map && objB instanceof Map) {\n if (objA.size !== objB.size) return false;\n for (const [key, value] of objA) {\n if (!Object.is(value, objB.get(key))) {\n return false;\n }\n }\n return true;\n }\n if (objA instanceof Set && objB instanceof Set) {\n if (objA.size !== objB.size) return false;\n for (const value of objA) {\n if (!objB.has(value)) {\n return false;\n }\n }\n return true;\n }\n const keysA = Object.keys(objA);\n if (keysA.length !== Object.keys(objB).length) {\n return false;\n }\n for (const keyA of keysA) {\n if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {\n return false;\n }\n }\n return true;\n}\n\nconst { useRef } = ReactExports;\nfunction useShallow(selector) {\n const prev = useRef();\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","'use client';\n\nimport { useEffect } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetElementOrWindow } from '../useGetElementOrWindow';\n\nimport { useScrollBlockageStore } from './useScrollBlockageStore';\n\ntype useScrollBlockagePropsReadOnly = {\n disableScroll: undefined;\n key: undefined;\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\ntype useScrollBlockageProps = {\n disableScroll: boolean;\n key: string; // The key to identify the blockage to avoid conflicts. Required if disableScroll is defined\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\nexport const useScrollBlockage = (\n props?: useScrollBlockageProps | useScrollBlockagePropsReadOnly\n) => {\n const {\n disableScroll = false,\n element,\n key = 'unnamed_blocker',\n } = props ?? {};\n\n const { isElementScrollBlocked, addBlockage, removeBlockage } =\n useScrollBlockageStore(\n useShallow((s) => ({\n isElementScrollBlocked: s.isElementScrollBlocked,\n addBlockage: s.addBlockage,\n removeBlockage: s.removeBlockage,\n }))\n );\n\n const containerElement = useGetElementOrWindow(element);\n\n useEffect(() => {\n const el = element ?? window.document.body;\n\n if (disableScroll) {\n addBlockage(key, el);\n } else {\n removeBlockage(key, el);\n }\n }, [addBlockage, disableScroll, element, key, removeBlockage]);\n\n const isScrollBlocked = containerElement\n ? isElementScrollBlocked(containerElement)\n : false;\n\n return { isScrollBlocked };\n};\n"],"names":[],"mappings":";;;;AAEA,SAAS,QAAQ,MAAM,MAAM;AAC3B,MAAI,OAAO,GAAG,MAAM,IAAI,GAAG;AACzB,WAAO;AAAA,EACT;AACA,MAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,OAAO,SAAS,YAAY,SAAS,MAAM;AAC1F,WAAO;AAAA,EACT;AACA,MAAI,gBAAgB,OAAO,gBAAgB,KAAK;AAC9C,QAAI,KAAK,SAAS,KAAK,KAAM,QAAO;AACpC,eAAW,CAAC,KAAK,KAAK,KAAK,MAAM;AAC/B,UAAI,CAAC,OAAO,GAAG,OAAO,KAAK,IAAI,GAAG,CAAC,GAAG;AACpC,eAAO;AAAA,MACT;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAC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EACF,GAAG,CAAC,aAAa,eAAe,SAAS,KAAK,cAAc,CAAC;AAE7D,QAAM,kBAAkB,mBACpB,uBAAuB,gBAAgB,IACvC;AAEJ,SAAO,EAAE,gBAAA;AACX;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-BYzBot7l.cjs","sources":["../../../../node_modules/.pnpm/zustand@4.5.7_@types+react@19.1.
|
|
1
|
+
{"version":3,"file":"index-BYzBot7l.cjs","sources":["../../../../node_modules/.pnpm/zustand@4.5.7_@types+react@19.1.13_immer@9.0.21_react@19.1.1/node_modules/zustand/esm/react/shallow.mjs","../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":["import ReactExports from 'react';\n\nfunction shallow(objA, objB) {\n if (Object.is(objA, objB)) {\n return true;\n }\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n if (objA instanceof Map && objB instanceof Map) {\n if (objA.size !== objB.size) return false;\n for (const [key, value] of objA) {\n if (!Object.is(value, objB.get(key))) {\n return false;\n }\n }\n return true;\n }\n if (objA instanceof Set && objB instanceof Set) {\n if (objA.size !== objB.size) return false;\n for (const value of objA) {\n if (!objB.has(value)) {\n return false;\n }\n }\n return true;\n }\n const keysA = Object.keys(objA);\n if (keysA.length !== Object.keys(objB).length) {\n return false;\n }\n for (const keyA of keysA) {\n if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {\n return false;\n }\n }\n return true;\n}\n\nconst { useRef } = ReactExports;\nfunction useShallow(selector) {\n const prev = useRef();\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","'use client';\n\nimport { useEffect } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { useGetElementOrWindow } from '../useGetElementOrWindow';\n\nimport { useScrollBlockageStore } from './useScrollBlockageStore';\n\ntype useScrollBlockagePropsReadOnly = {\n disableScroll: undefined;\n key: undefined;\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\ntype useScrollBlockageProps = {\n disableScroll: boolean;\n key: string; // The key to identify the blockage to avoid conflicts. Required if disableScroll is defined\n element?: HTMLElement; // The element to block the scroll. If not defined, the window will be used\n};\n\nexport const useScrollBlockage = (\n props?: useScrollBlockageProps | useScrollBlockagePropsReadOnly\n) => {\n const {\n disableScroll = false,\n element,\n key = 'unnamed_blocker',\n } = props ?? {};\n\n const { isElementScrollBlocked, addBlockage, removeBlockage } =\n useScrollBlockageStore(\n useShallow((s) => ({\n isElementScrollBlocked: s.isElementScrollBlocked,\n addBlockage: s.addBlockage,\n removeBlockage: s.removeBlockage,\n }))\n );\n\n const containerElement = useGetElementOrWindow(element);\n\n useEffect(() => {\n const el = element ?? window.document.body;\n\n if (disableScroll) {\n addBlockage(key, el);\n } else {\n removeBlockage(key, el);\n }\n }, [addBlockage, disableScroll, element, key, removeBlockage]);\n\n const isScrollBlocked = containerElement\n ? isElementScrollBlocked(containerElement)\n : false;\n\n return { isScrollBlocked };\n};\n"],"names":["useScrollBlockageStore","useGetElementOrWindow","useEffect"],"mappings":";;;;;AAEA,SAAS,QAAQ,MAAM,MAAM;AAC3B,MAAI,OAAO,GAAG,MAAM,IAAI,GAAG;AACzB,WAAO;AAAA,EACT;AACA,MAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,OAAO,SAAS,YAAY,SAAS,MAAM;AAC1F,WAAO;AAAA,EACT;AACA,MAAI,gBAAgB,OAAO,gBAAgB,KAAK;AAC9C,QAAI,KAAK,SAAS,KAAK,KAAM,QAAO;AACpC,eAAW,CAAC,KAAK,KAAK,KAAK,MAAM;AAC/B,UAAI,CAAC,OAAO,GAAG,OAAO,KAAK,IAAI,GAAG,CAAC,GAAG;AACpC,eAAO;AAAA,MACT;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACA,MAAI,gBAAgB,OAAO,gBAAgB,KAAK;AAC9C,QAAI,KAAK,SAAS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