@edifice.io/wiki 3.4.0-develop-pedago.1
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/lib/BAGVG3AX.js +33 -0
- package/lib/DeleteListModal.js +36 -0
- package/lib/KZB72KQG.js +42 -0
- package/lib/NITRNJ62.js +9215 -0
- package/lib/PrintModal.js +74 -0
- package/lib/components/AIButton/AIButton.d.ts +6 -0
- package/lib/components/ButtonGroup/index.d.ts +6 -0
- package/lib/components/CancelModal/index.d.ts +6 -0
- package/lib/components/ResourceModal/index.d.ts +2 -0
- package/lib/components/ShareModal/index.d.ts +2 -0
- package/lib/components/SimpleRadioCard/SimpleRadioCard.d.ts +37 -0
- package/lib/components/Toggle/index.d.ts +2 -0
- package/lib/components/WikiApp/components/WikiApp.d.ts +15 -0
- package/lib/components/WikiApp/providers/WikiAppProvider.context.d.ts +7 -0
- package/lib/components/WikiApp/providers/WikiAppProvider.d.ts +9 -0
- package/lib/components/WikiApp/providers/WikiAppProvider.hook.d.ts +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/config/constants.d.ts +7 -0
- package/lib/config/explorer.d.ts +2 -0
- package/lib/config/index.d.ts +3 -0
- package/lib/config/workflows.d.ts +19 -0
- package/lib/features/app/AppActions/AppActions.d.ts +8 -0
- package/lib/features/app/AppActions/AppActions.test.d.ts +1 -0
- package/lib/features/app/AppHeader/AppHeader.d.ts +1 -0
- package/lib/features/app/AppHeader/AppHeader.test.d.ts +1 -0
- package/lib/features/index.d.ts +13 -0
- package/lib/features/page/ConfirmVisibilityModal/ConfirmVisibilityModal.d.ts +4 -0
- package/lib/features/page/DeleteListModal/DeleteListModal.d.ts +4 -0
- package/lib/features/page/DeleteListModal/DeleteListModal.test.d.ts +1 -0
- package/lib/features/page/DeletePageModal/DeletePageModal.d.ts +1 -0
- package/lib/features/page/DuplicateModal/DuplicateModal.d.ts +16 -0
- package/lib/features/page/DuplicateModal/DuplicateModal.test.d.ts +1 -0
- package/lib/features/page/FormPage/FormPage.d.ts +4 -0
- package/lib/features/page/MoveModal/MoveModal.d.ts +6 -0
- package/lib/features/page/MoveModal/MoveModal.test.d.ts +1 -0
- package/lib/features/page/PageHeader/PageHeader.d.ts +6 -0
- package/lib/features/page/PageHeader/PageHeader.test.d.ts +1 -0
- package/lib/features/page/PrintModal/PrintModal.d.ts +1 -0
- package/lib/features/page/PrintModal/PrintModal.test.d.ts +1 -0
- package/lib/features/page/RevisionHeader/RevisionHeader.d.ts +4 -0
- package/lib/features/page/RevisionHeader/RevisionHeader.test.d.ts +1 -0
- package/lib/features/page/RevisionModal/RevisionModal.d.ts +4 -0
- package/lib/features/page/RevisionModal/RevisionModal.test.d.ts +1 -0
- package/lib/features/page/RevisionModal/useRevisionModal.d.ts +16 -0
- package/lib/features/wiki/DropdownTreeview/DropdownTreeview.d.ts +6 -0
- package/lib/features/wiki/NewPage/NewPage.d.ts +1 -0
- package/lib/features/wiki/NewPage/NewPage.test.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/PagesAssistantAIStep1Form.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/PagesAssistantAIStep2Form.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/PagesAssistantAIStep3StructureLoading.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/PagesAssistantAIStep4StructureResult.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/useLevels.d.ts +23 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/useSubjects.d.ts +12 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantCards/PagesAssistantAICard.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantCards/PagesAssistantImportPollCard.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantCards/PagesAssistantLibraryCard.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantCards/PagesAssistantManualCreationCard.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantLeftPane.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantRoot.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/animations/loading.json.d.ts +2290 -0
- package/lib/features/wiki/WikiEmptyScreen/WikiEmptyScreen.d.ts +2 -0
- package/lib/features/wiki/WikiEmptyScreen/WikiEmptyScreen.test.d.ts +1 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/useCancelPage.d.ts +7 -0
- package/lib/hooks/useCheckablePrint.d.ts +11 -0
- package/lib/hooks/useCheckableTable.d.ts +9 -0
- package/lib/hooks/useFeedData.d.ts +19 -0
- package/lib/hooks/useFilterCurrentPageFromTree.d.ts +8 -0
- package/lib/hooks/useFilterVisiblePage.d.ts +2 -0
- package/lib/hooks/useFilteredWikis.d.ts +10 -0
- package/lib/hooks/useFindTreeItemById.d.ts +11 -0
- package/lib/hooks/useFormPage/useFormPage.d.ts +23 -0
- package/lib/hooks/useFormPage/useFormPage.test.d.ts +1 -0
- package/lib/hooks/useIsAuthorOrManager.d.ts +8 -0
- package/lib/hooks/useIsOnlyRead.d.ts +1 -0
- package/lib/hooks/useListPage/useListPage.d.ts +5 -0
- package/lib/hooks/useListPage/useListPage.test.d.ts +1 -0
- package/lib/hooks/useMenu.d.ts +11 -0
- package/lib/hooks/useRedirectDefaultPage.d.ts +1 -0
- package/lib/hooks/useReorganizeTree.d.ts +16 -0
- package/lib/hooks/useRevision/useRevision.d.ts +54 -0
- package/lib/hooks/useRevision/useRevision.test.d.ts +1 -0
- package/lib/hooks/useUpdatePages.d.ts +4 -0
- package/lib/i18n.d.ts +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +4 -0
- package/lib/index2.js +12448 -0
- package/lib/index3.js +5 -0
- package/lib/index4.js +5 -0
- package/lib/main.d.ts +0 -0
- package/lib/mocks/handlers.d.ts +4 -0
- package/lib/mocks/index.d.ts +413 -0
- package/lib/mocks/polyfills.d.ts +5 -0
- package/lib/mocks/renderWithRouter.d.ts +2 -0
- package/lib/mocks/server.d.ts +1 -0
- package/lib/mocks/setup.d.ts +11 -0
- package/lib/models/comment.d.ts +20 -0
- package/lib/models/date.d.ts +12 -0
- package/lib/models/index.d.ts +5 -0
- package/lib/models/page.d.ts +91 -0
- package/lib/models/payload.d.ts +28 -0
- package/lib/models/revision.d.ts +12 -0
- package/lib/models/wiki.d.ts +68 -0
- package/lib/providers/index.d.ts +9 -0
- package/lib/routes/errors/index.d.ts +3 -0
- package/lib/routes/errors/not-found.d.ts +1 -0
- package/lib/routes/index.d.ts +6 -0
- package/lib/routes/old-format/index.d.ts +36 -0
- package/lib/routes/page/create.d.ts +4 -0
- package/lib/routes/page/edit.d.ts +11 -0
- package/lib/routes/page/index.d.ts +37 -0
- package/lib/routes/page/list/list.d.ts +46 -0
- package/lib/routes/page/list/list.test.d.ts +1 -0
- package/lib/routes/page/pageEditAction.d.ts +4 -0
- package/lib/routes/print/index.d.ts +36 -0
- package/lib/routes/root/index.d.ts +4 -0
- package/lib/routes/wiki/index.d.ts +45 -0
- package/lib/routes/wiki/index.test.d.ts +1 -0
- package/lib/services/api/assistant/assistant.service.d.ts +9 -0
- package/lib/services/api/assistant/assistant.types.d.ts +19 -0
- package/lib/services/api/index.d.ts +261 -0
- package/lib/services/api/index.test.d.ts +1 -0
- package/lib/services/api/poll/poll.service.d.ts +17 -0
- package/lib/services/api/poll/poll.types.d.ts +27 -0
- package/lib/services/index.d.ts +12 -0
- package/lib/services/queries/actions.d.ts +11 -0
- package/lib/services/queries/comment.d.ts +20 -0
- package/lib/services/queries/index.d.ts +4 -0
- package/lib/services/queries/page/page.d.ts +264 -0
- package/lib/services/queries/page/page.test.d.ts +1 -0
- package/lib/services/queries/poll/poll.query.d.ts +9 -0
- package/lib/services/queries/poll/poll.test.d.ts +1 -0
- package/lib/services/queries/wiki/wiki.d.ts +235 -0
- package/lib/services/queries/wiki/wiki.test.d.ts +1 -0
- package/lib/services/resource/index.d.ts +47 -0
- package/lib/store/assistant/index.d.ts +7 -0
- package/lib/store/index.d.ts +3 -0
- package/lib/store/rights/index.d.ts +11 -0
- package/lib/store/toast/index.d.ts +13 -0
- package/lib/store/treeview/index.d.ts +12 -0
- package/lib/store/wiki/index.d.ts +55 -0
- package/lib/style.css +1 -0
- package/lib/utils/dtoToPage.d.ts +33 -0
- package/lib/utils/dtoToWiki.d.ts +43 -0
- package/lib/utils/dtoToWikiPages.d.ts +33 -0
- package/lib/utils/findDefaultPage.d.ts +5 -0
- package/lib/utils/findDefaultPage.test.d.ts +1 -0
- package/lib/utils/findLastPage.d.ts +4 -0
- package/lib/utils/findPage.d.ts +2 -0
- package/lib/utils/findPage.test.d.ts +1 -0
- package/lib/utils/getChildrenRecursively.d.ts +19 -0
- package/lib/utils/getFormValue.d.ts +1 -0
- package/lib/utils/sortPagesByDate.d.ts +2 -0
- package/lib/utils/sortPagesByPosition.d.ts +2 -0
- package/package.json +90 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NotFound: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { RouteObject, createBrowserRouter } from 'react-router-dom';
|
|
3
|
+
export declare const wikiRoutes: (queryClient: QueryClient) => RouteObject[];
|
|
4
|
+
export declare const routes: (queryClient: QueryClient) => RouteObject[];
|
|
5
|
+
export declare const basename: string;
|
|
6
|
+
export declare const router: (queryClient: QueryClient) => ReturnType<typeof createBrowserRouter>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { LoaderFunctionArgs } from 'react-router-dom';
|
|
3
|
+
/** Load a wiki page OLD-FORMAT content */
|
|
4
|
+
export declare const loader: (queryClient: QueryClient) => ({ params }: LoaderFunctionArgs) => Promise<{
|
|
5
|
+
comments: {
|
|
6
|
+
id: string;
|
|
7
|
+
comment: string;
|
|
8
|
+
authorId: string;
|
|
9
|
+
authorName: string;
|
|
10
|
+
createdAt: number;
|
|
11
|
+
updatedAt: number;
|
|
12
|
+
replyTo: string | undefined;
|
|
13
|
+
deleted: boolean | undefined;
|
|
14
|
+
}[] | undefined;
|
|
15
|
+
isVisible: boolean;
|
|
16
|
+
_id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
content: string;
|
|
19
|
+
contentPlain: string;
|
|
20
|
+
contentVersion: number;
|
|
21
|
+
author: string;
|
|
22
|
+
authorName: string;
|
|
23
|
+
created?: import('../../models').Created;
|
|
24
|
+
modified: import('../../models').Modified;
|
|
25
|
+
lastContributer?: string;
|
|
26
|
+
lastContributerName?: string;
|
|
27
|
+
children?: [{
|
|
28
|
+
_id: string;
|
|
29
|
+
title: string;
|
|
30
|
+
isVisible: boolean;
|
|
31
|
+
position?: number;
|
|
32
|
+
}];
|
|
33
|
+
parentId?: string;
|
|
34
|
+
position?: number;
|
|
35
|
+
} | null>;
|
|
36
|
+
export declare const Component: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { ActionFunctionArgs } from 'react-router-dom';
|
|
3
|
+
export declare const action: (queryClient: QueryClient) => ({ params, request }: ActionFunctionArgs) => Promise<Response | null>;
|
|
4
|
+
export declare const CreatePage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action called when submitting the Edition Page form.
|
|
3
|
+
* @param queryClient
|
|
4
|
+
* @returns
|
|
5
|
+
* if page has children and visibility has changed then
|
|
6
|
+
* we return page form data to be used in visibility confirm modal
|
|
7
|
+
* else
|
|
8
|
+
* we redirect to current page
|
|
9
|
+
*/
|
|
10
|
+
export declare const editAction: (queryClient: import('@tanstack/react-query').QueryClient, redirectPath?: string) => ({ params, request }: import('react-router-dom').ActionFunctionArgs) => Promise<import('../../hooks').FormPageDataProps | Response | null>;
|
|
11
|
+
export declare const EditPage: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router-dom';
|
|
3
|
+
export declare const loader: (queryClient: QueryClient) => ({ params }: LoaderFunctionArgs) => Promise<{
|
|
4
|
+
comments: {
|
|
5
|
+
id: string;
|
|
6
|
+
comment: string;
|
|
7
|
+
authorId: string;
|
|
8
|
+
authorName: string;
|
|
9
|
+
createdAt: number;
|
|
10
|
+
updatedAt: number;
|
|
11
|
+
replyTo: string | undefined;
|
|
12
|
+
deleted: boolean | undefined;
|
|
13
|
+
}[] | undefined;
|
|
14
|
+
isVisible: boolean;
|
|
15
|
+
_id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
content: string;
|
|
18
|
+
contentPlain: string;
|
|
19
|
+
contentVersion: number;
|
|
20
|
+
author: string;
|
|
21
|
+
authorName: string;
|
|
22
|
+
created?: import('../../models').Created;
|
|
23
|
+
modified: import('../../models').Modified;
|
|
24
|
+
lastContributer?: string;
|
|
25
|
+
lastContributerName?: string;
|
|
26
|
+
children?: [{
|
|
27
|
+
_id: string;
|
|
28
|
+
title: string;
|
|
29
|
+
isVisible: boolean;
|
|
30
|
+
position?: number;
|
|
31
|
+
}];
|
|
32
|
+
parentId?: string;
|
|
33
|
+
position?: number;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const action: (queryClient: QueryClient) => ({ params }: ActionFunctionArgs) => Promise<Response | null>;
|
|
36
|
+
export declare const visibleAction: (queryClient: QueryClient, redirectPath?: string) => ({ params, request }: ActionFunctionArgs) => Promise<import('../../hooks').FormPageDataProps | Response | null>;
|
|
37
|
+
export declare const Page: () => string | import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router-dom';
|
|
3
|
+
export declare const loader: (queryClient: QueryClient) => ({ params }: LoaderFunctionArgs) => Promise<{
|
|
4
|
+
pages: {
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
_id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
content: string;
|
|
9
|
+
contentPlain: string;
|
|
10
|
+
contentVersion: number;
|
|
11
|
+
author: string;
|
|
12
|
+
authorName: string;
|
|
13
|
+
modified: import('../../../models').Modified;
|
|
14
|
+
created?: import('../../../models').Created;
|
|
15
|
+
lastContributer?: string;
|
|
16
|
+
lastContributerName?: string;
|
|
17
|
+
comments?: import('../../../models').Comment[];
|
|
18
|
+
children?: [{
|
|
19
|
+
_id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
isVisible: boolean;
|
|
22
|
+
position?: number;
|
|
23
|
+
}];
|
|
24
|
+
position?: number;
|
|
25
|
+
parentId?: string;
|
|
26
|
+
error?: any;
|
|
27
|
+
views?: number;
|
|
28
|
+
aiMetadata?: {
|
|
29
|
+
contentGenerated?: boolean;
|
|
30
|
+
contentGeneratedDate?: import('../../../models').Created;
|
|
31
|
+
};
|
|
32
|
+
}[];
|
|
33
|
+
_id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
thumbnail: string;
|
|
36
|
+
created: import('../../../models').Created;
|
|
37
|
+
modified: import('../../../models').Modified;
|
|
38
|
+
owner: import('../../../models').Owner;
|
|
39
|
+
rights: string[];
|
|
40
|
+
index?: string;
|
|
41
|
+
shared?: string[];
|
|
42
|
+
aiGenerated?: boolean;
|
|
43
|
+
aiMetadata?: import('../../../models').AIMetadata;
|
|
44
|
+
}>;
|
|
45
|
+
export declare const action: (queryClient: QueryClient) => ({ params, request }: ActionFunctionArgs) => Promise<void>;
|
|
46
|
+
export declare const PageList: () => string | import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { ActionFunctionArgs } from 'react-router-dom';
|
|
3
|
+
import { FormPageDataProps } from '../../hooks';
|
|
4
|
+
export declare const pageEditAction: (queryClient: QueryClient, redirectPath?: string) => ({ params, request }: ActionFunctionArgs) => Promise<FormPageDataProps | Response | null>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { LoaderFunctionArgs } from 'react-router-dom';
|
|
3
|
+
import { Page } from '../../models';
|
|
4
|
+
export declare const printLoader: (queryClient: QueryClient) => ({ params, request }: LoaderFunctionArgs) => Promise<Page[] | {
|
|
5
|
+
comments: {
|
|
6
|
+
id: string;
|
|
7
|
+
comment: string;
|
|
8
|
+
authorId: string;
|
|
9
|
+
authorName: string;
|
|
10
|
+
createdAt: number;
|
|
11
|
+
updatedAt: number;
|
|
12
|
+
replyTo: string | undefined;
|
|
13
|
+
deleted: boolean | undefined;
|
|
14
|
+
}[] | undefined;
|
|
15
|
+
isVisible: boolean;
|
|
16
|
+
_id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
content: string;
|
|
19
|
+
contentPlain: string;
|
|
20
|
+
contentVersion: number;
|
|
21
|
+
author: string;
|
|
22
|
+
authorName: string;
|
|
23
|
+
created?: import('../../models').Created;
|
|
24
|
+
modified: import('../../models').Modified;
|
|
25
|
+
lastContributer?: string;
|
|
26
|
+
lastContributerName?: string;
|
|
27
|
+
children?: [{
|
|
28
|
+
_id: string;
|
|
29
|
+
title: string;
|
|
30
|
+
isVisible: boolean;
|
|
31
|
+
position?: number;
|
|
32
|
+
}];
|
|
33
|
+
parentId?: string;
|
|
34
|
+
position?: number;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const Component: () => import("react/jsx-runtime").JSX.Element | import("react/jsx-runtime").JSX.Element[] | null;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { LoaderFunctionArgs } from 'react-router-dom';
|
|
3
|
+
export declare const loader: (queryClient: QueryClient) => ({ params }: LoaderFunctionArgs) => Promise<{
|
|
4
|
+
pages: {
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
_id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
content: string;
|
|
9
|
+
contentPlain: string;
|
|
10
|
+
contentVersion: number;
|
|
11
|
+
author: string;
|
|
12
|
+
authorName: string;
|
|
13
|
+
modified: import('../../models').Modified;
|
|
14
|
+
created?: import('../../models').Created;
|
|
15
|
+
lastContributer?: string;
|
|
16
|
+
lastContributerName?: string;
|
|
17
|
+
comments?: import('../../models').Comment[];
|
|
18
|
+
children?: [{
|
|
19
|
+
_id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
isVisible: boolean;
|
|
22
|
+
position?: number;
|
|
23
|
+
}];
|
|
24
|
+
position?: number;
|
|
25
|
+
parentId?: string;
|
|
26
|
+
error?: any;
|
|
27
|
+
views?: number;
|
|
28
|
+
aiMetadata?: {
|
|
29
|
+
contentGenerated?: boolean;
|
|
30
|
+
contentGeneratedDate?: import('../../models').Created;
|
|
31
|
+
};
|
|
32
|
+
}[];
|
|
33
|
+
_id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
thumbnail: string;
|
|
36
|
+
created: import('../../models').Created;
|
|
37
|
+
modified: import('../../models').Modified;
|
|
38
|
+
owner: import('../../models').Owner;
|
|
39
|
+
rights: string[];
|
|
40
|
+
index?: string;
|
|
41
|
+
shared?: string[];
|
|
42
|
+
aiGenerated?: boolean;
|
|
43
|
+
aiMetadata?: import('../../models').AIMetadata;
|
|
44
|
+
}>;
|
|
45
|
+
export declare const Index: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AssistantGenerateRequest, AssistantGenerateResponse } from './assistant.types';
|
|
2
|
+
export declare const baseURL = "/wiki";
|
|
3
|
+
export declare const assistantService: {
|
|
4
|
+
/**
|
|
5
|
+
* Generate the wiki pages and then the pages content.
|
|
6
|
+
* @returns a Promise of PagesStructureResponse
|
|
7
|
+
*/
|
|
8
|
+
generate(requestPayload: AssistantGenerateRequest): Promise<AssistantGenerateResponse>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface PagesAssistantAIStep1FormValues {
|
|
2
|
+
level: string;
|
|
3
|
+
subject: string;
|
|
4
|
+
}
|
|
5
|
+
export interface PagesAssistantAIStep2FormValues {
|
|
6
|
+
sequence: string;
|
|
7
|
+
keywords?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PagesAssistantAIFormValues extends PagesAssistantAIStep1FormValues, PagesAssistantAIStep2FormValues {
|
|
10
|
+
}
|
|
11
|
+
export interface AssistantGenerateRequest extends PagesAssistantAIFormValues {
|
|
12
|
+
wikiId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AssistantGenerateResponse {
|
|
15
|
+
wikiId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface PageStructure {
|
|
18
|
+
title: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { ViewsCounters, ViewsDetails } from '@edifice.io/client';
|
|
2
|
+
import { DuplicatePageResultOrError, Page, PagePostPayload, PagePutPayload, PagesPutPayload, PickedWiki, Wiki } from '../../models';
|
|
3
|
+
import { Revision } from '../../models/revision';
|
|
4
|
+
export declare const baseURL = "/wiki";
|
|
5
|
+
export declare const wikiService: {
|
|
6
|
+
getWikisFromExplorer({ pageSize, startIdx, }: {
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
startIdx?: number;
|
|
9
|
+
}): Promise<import('@edifice.io/client').IResource[]>;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @returns all wikis without pages
|
|
13
|
+
*/
|
|
14
|
+
getWikis(): Promise<PickedWiki[]>;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param wikiId string
|
|
18
|
+
* @returns get a wiki by id
|
|
19
|
+
*/
|
|
20
|
+
getWiki(wikiId: string): Promise<{
|
|
21
|
+
pages: {
|
|
22
|
+
isVisible: boolean;
|
|
23
|
+
_id: string;
|
|
24
|
+
title: string;
|
|
25
|
+
content: string;
|
|
26
|
+
contentPlain: string;
|
|
27
|
+
contentVersion: number;
|
|
28
|
+
author: string;
|
|
29
|
+
authorName: string;
|
|
30
|
+
modified: import('../../models').Modified;
|
|
31
|
+
created?: import('../../models').Created;
|
|
32
|
+
lastContributer?: string;
|
|
33
|
+
lastContributerName?: string;
|
|
34
|
+
comments?: import('../../models').Comment[];
|
|
35
|
+
children?: [{
|
|
36
|
+
_id: string;
|
|
37
|
+
title: string;
|
|
38
|
+
isVisible: boolean;
|
|
39
|
+
position?: number;
|
|
40
|
+
}];
|
|
41
|
+
position?: number;
|
|
42
|
+
parentId?: string;
|
|
43
|
+
error?: any;
|
|
44
|
+
views?: number;
|
|
45
|
+
aiMetadata?: {
|
|
46
|
+
contentGenerated?: boolean;
|
|
47
|
+
contentGeneratedDate?: import('../../models').Created;
|
|
48
|
+
};
|
|
49
|
+
}[];
|
|
50
|
+
_id: string;
|
|
51
|
+
title: string;
|
|
52
|
+
thumbnail: string;
|
|
53
|
+
created: import('../../models').Created;
|
|
54
|
+
modified: import('../../models').Modified;
|
|
55
|
+
owner: import('../../models').Owner;
|
|
56
|
+
rights: string[];
|
|
57
|
+
index?: string;
|
|
58
|
+
shared?: string[];
|
|
59
|
+
aiGenerated?: boolean;
|
|
60
|
+
aiMetadata?: import('../../models').AIMetadata;
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @param wikiId string
|
|
65
|
+
* @returns get wiki pages by wiki id
|
|
66
|
+
*/
|
|
67
|
+
getWikiPages(wikiId: string, content: boolean): Promise<Page[]>;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @returns all wikis with pages
|
|
71
|
+
*/
|
|
72
|
+
getAllWikisWithPages(): Promise<Wiki[]>;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @param wikiId string
|
|
76
|
+
* @param pageId string
|
|
77
|
+
* @returns get a page of a wiki by id
|
|
78
|
+
*/
|
|
79
|
+
getPage({ wikiId, pageId, originalformat, }: {
|
|
80
|
+
wikiId: string;
|
|
81
|
+
pageId: string;
|
|
82
|
+
originalformat?: boolean;
|
|
83
|
+
}): Promise<{
|
|
84
|
+
comments: {
|
|
85
|
+
id: string;
|
|
86
|
+
comment: string;
|
|
87
|
+
authorId: string;
|
|
88
|
+
authorName: string;
|
|
89
|
+
createdAt: number;
|
|
90
|
+
updatedAt: number;
|
|
91
|
+
replyTo: string | undefined;
|
|
92
|
+
deleted: boolean | undefined;
|
|
93
|
+
}[] | undefined;
|
|
94
|
+
isVisible: boolean;
|
|
95
|
+
_id: string;
|
|
96
|
+
title: string;
|
|
97
|
+
content: string;
|
|
98
|
+
contentPlain: string;
|
|
99
|
+
contentVersion: number;
|
|
100
|
+
author: string;
|
|
101
|
+
authorName: string;
|
|
102
|
+
created?: import('../../models').Created;
|
|
103
|
+
modified: import('../../models').Modified;
|
|
104
|
+
lastContributer?: string;
|
|
105
|
+
lastContributerName?: string;
|
|
106
|
+
children?: [{
|
|
107
|
+
_id: string;
|
|
108
|
+
title: string;
|
|
109
|
+
isVisible: boolean;
|
|
110
|
+
position?: number;
|
|
111
|
+
}];
|
|
112
|
+
parentId?: string;
|
|
113
|
+
position?: number;
|
|
114
|
+
}>;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @param wikiId
|
|
118
|
+
* @param pageId
|
|
119
|
+
* @returns all revisions of a page
|
|
120
|
+
*/
|
|
121
|
+
getRevisionsPage({ wikiId, pageId, }: {
|
|
122
|
+
wikiId: string;
|
|
123
|
+
pageId: string;
|
|
124
|
+
}): Promise<Revision[]>;
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @param wikiId
|
|
128
|
+
* @param pageId
|
|
129
|
+
* @param revisionId
|
|
130
|
+
* @returns on revision of a page by id
|
|
131
|
+
*/
|
|
132
|
+
getRevisionPage({ wikiId, pageId, revisionId, }: {
|
|
133
|
+
wikiId: string;
|
|
134
|
+
pageId: string;
|
|
135
|
+
revisionId: string;
|
|
136
|
+
}): Promise<Revision>;
|
|
137
|
+
/**
|
|
138
|
+
*
|
|
139
|
+
* @param wikiId
|
|
140
|
+
* @creates a new page
|
|
141
|
+
*/
|
|
142
|
+
createPage({ wikiId, data, }: {
|
|
143
|
+
wikiId: string;
|
|
144
|
+
data: PagePostPayload;
|
|
145
|
+
}): Promise<Page>;
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* @param wikiId
|
|
149
|
+
* @updates a page
|
|
150
|
+
*/
|
|
151
|
+
updatePage({ wikiId, pageId, data, }: {
|
|
152
|
+
wikiId: string;
|
|
153
|
+
pageId: string;
|
|
154
|
+
data: PagePutPayload;
|
|
155
|
+
}): Promise<Page>;
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
* @param wikiId
|
|
159
|
+
* @updates pages
|
|
160
|
+
*/
|
|
161
|
+
updatePages({ wikiId, data, }: {
|
|
162
|
+
wikiId: string;
|
|
163
|
+
data: PagesPutPayload;
|
|
164
|
+
}): Promise<Page[]>;
|
|
165
|
+
/**
|
|
166
|
+
* Delete a page of the current wiki.
|
|
167
|
+
*
|
|
168
|
+
* @param {Object} params - expected params to delete a page.
|
|
169
|
+
* @param {string} params.wikiId - current wiki id.
|
|
170
|
+
* @param {string} params.pageId - id of a page from the current wiki.
|
|
171
|
+
* @returns {Promise<void>} a promise after deleting the page
|
|
172
|
+
*/
|
|
173
|
+
deletePage({ wikiId, pageId }: {
|
|
174
|
+
wikiId: string;
|
|
175
|
+
pageId: string;
|
|
176
|
+
}): Promise<Page>;
|
|
177
|
+
deletePages({ wikiId, ids }: {
|
|
178
|
+
wikiId: string;
|
|
179
|
+
ids: string[];
|
|
180
|
+
}): Promise<Page[]>;
|
|
181
|
+
/**
|
|
182
|
+
* Create a new comment
|
|
183
|
+
*
|
|
184
|
+
* @param {Object} params - expected params to create a new comment.
|
|
185
|
+
* @param {string} params.wikiId - current wiki id.
|
|
186
|
+
* @param {string} params.pageId - id of a page from the current wiki.
|
|
187
|
+
* @param {string} params.comment - comment text.
|
|
188
|
+
* @returns {Promise<void>} a promise after creating the new comment.
|
|
189
|
+
*/
|
|
190
|
+
createComment({ wikiId, pageId, comment, replyTo, }: {
|
|
191
|
+
wikiId: string;
|
|
192
|
+
pageId: string;
|
|
193
|
+
comment: string;
|
|
194
|
+
replyTo?: string;
|
|
195
|
+
}): Promise<Comment>;
|
|
196
|
+
/**
|
|
197
|
+
* Update a comment
|
|
198
|
+
*
|
|
199
|
+
* @param {Object} params - expected params to update a comment.
|
|
200
|
+
* @param {string} params.wikiId - current wiki id.
|
|
201
|
+
* @param {string} params.pageId - id of a page from the current wiki.
|
|
202
|
+
* @param {string} params.comment - new comment text.
|
|
203
|
+
* @returns {Promise<void>} a promise after updating the comment.
|
|
204
|
+
*/
|
|
205
|
+
updateComment({ wikiId, pageId, commentId, comment, }: {
|
|
206
|
+
wikiId: string;
|
|
207
|
+
pageId: string;
|
|
208
|
+
commentId: string;
|
|
209
|
+
comment: string;
|
|
210
|
+
}): Promise<Comment>;
|
|
211
|
+
/**
|
|
212
|
+
* Delete a comment
|
|
213
|
+
*
|
|
214
|
+
* @param {Object} params - expected params to delete a comment.
|
|
215
|
+
* @param {string} params.wikiId - current wiki id.
|
|
216
|
+
* @param {string} params.pageId - id of a page from the current wiki.
|
|
217
|
+
* @param {string} params.commentId - id of the comment to be deleted.
|
|
218
|
+
* @returns {Promise<void>} a promise after deleting the comment.
|
|
219
|
+
*/
|
|
220
|
+
deleteComment({ wikiId, pageId, commentId, }: {
|
|
221
|
+
wikiId: string;
|
|
222
|
+
pageId: string;
|
|
223
|
+
commentId: string;
|
|
224
|
+
}): Promise<Comment>;
|
|
225
|
+
/**
|
|
226
|
+
* Duplicate a page
|
|
227
|
+
*
|
|
228
|
+
* @param {string} params.sourceWikiId - source wiki id.
|
|
229
|
+
* @param {string} params.sourcePageId - source page id.
|
|
230
|
+
* @param {string[]} params.targetWikiIds - target wiki ids.
|
|
231
|
+
* @returns {Promise<PickedPageId[]>} a promise that resolves to the newly created page.
|
|
232
|
+
*/
|
|
233
|
+
duplicatePage({ sourceWikiId, sourcePageId, targetWikiIds, shouldIncludeSubPages, }: {
|
|
234
|
+
sourceWikiId: string;
|
|
235
|
+
sourcePageId: string;
|
|
236
|
+
targetWikiIds: string[];
|
|
237
|
+
shouldIncludeSubPages: boolean;
|
|
238
|
+
}): Promise<DuplicatePageResultOrError>;
|
|
239
|
+
/**
|
|
240
|
+
* Gets pages views counter (audience).
|
|
241
|
+
* @param {string[]} params.pageIds - pages ids to get views counter.
|
|
242
|
+
* @returns {Promise<ViewsCounters>} a promise that resolves to the views counters.
|
|
243
|
+
*/
|
|
244
|
+
getPagesViewsCounter({ pageIds, }: {
|
|
245
|
+
pageIds: string[];
|
|
246
|
+
}): Promise<ViewsCounters>;
|
|
247
|
+
/**
|
|
248
|
+
* Gets one page view details (audience).
|
|
249
|
+
* @param {string[]} params.pageIds - page id to get views details.
|
|
250
|
+
* @returns {Promise<ViewsDetails>} a promise that resolves to the views details.
|
|
251
|
+
*/
|
|
252
|
+
getPageViewsDetails({ pageId, }: {
|
|
253
|
+
pageId: string;
|
|
254
|
+
}): Promise<ViewsDetails | undefined>;
|
|
255
|
+
/**
|
|
256
|
+
* Trigger a page view (audience).
|
|
257
|
+
* @param {string} params.pageId - page id to trigger view.
|
|
258
|
+
* @returns {Promise<void>} a promise that resolves to void.
|
|
259
|
+
*/
|
|
260
|
+
triggerPageView(pageId: string): Promise<void>;
|
|
261
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Poll, PollRequestPayload } from './poll.types';
|
|
2
|
+
export declare const IMPORT_PDF_POLL_ID = "import-pdf";
|
|
3
|
+
export declare const baseURL = "/wiki";
|
|
4
|
+
export declare const pollService: {
|
|
5
|
+
/**
|
|
6
|
+
* Get Poll by Poll Name
|
|
7
|
+
* @param pollName Poll name to retrieve
|
|
8
|
+
* @returns a Poll object representing the Poll
|
|
9
|
+
*/
|
|
10
|
+
getPoll(pollName: string): Promise<Poll>;
|
|
11
|
+
/**
|
|
12
|
+
* Submit a vote to a poll. The poll is identified by the pollId in the request payload.
|
|
13
|
+
* @param pollName Name of the poll (used for local storage key)
|
|
14
|
+
* @param requestPayload JSON object with the vote.
|
|
15
|
+
*/
|
|
16
|
+
submitPollVote(pollName: string, requestPayload: PollRequestPayload): Promise<void>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Created, Modified } from '../../../models';
|
|
2
|
+
export declare enum PollVoteResult {
|
|
3
|
+
YES = "YES",
|
|
4
|
+
NO = "NO"
|
|
5
|
+
}
|
|
6
|
+
export interface PollRequestPayload {
|
|
7
|
+
vote: PollVoteResult;
|
|
8
|
+
}
|
|
9
|
+
export interface PollVote {
|
|
10
|
+
vote: PollVoteResult;
|
|
11
|
+
userId: string;
|
|
12
|
+
userName: string;
|
|
13
|
+
userEmail: string;
|
|
14
|
+
created: Created;
|
|
15
|
+
modified: Modified;
|
|
16
|
+
}
|
|
17
|
+
export interface Poll {
|
|
18
|
+
_id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
votes: Array<PollVote>;
|
|
22
|
+
created: Created;
|
|
23
|
+
modified: Modified;
|
|
24
|
+
authorId: string;
|
|
25
|
+
authorName: string;
|
|
26
|
+
authorEmail: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IAction } from '@edifice.io/client';
|
|
2
|
+
/**
|
|
3
|
+
* actionsQueryOptions: check action availability depending on workflow right
|
|
4
|
+
* @param actions (expects an array of actions)
|
|
5
|
+
* @returns queryOptions with key, fn, and selected data
|
|
6
|
+
*/
|
|
7
|
+
export declare const actionsQueryOptions: (actions: IAction[]) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<Record<string, boolean>, Error, IAction[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
|
|
8
|
+
queryFn?: import('@tanstack/react-query').QueryFunction<Record<string, boolean>, import('@tanstack/react-query').QueryKey, never> | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, Record<string, boolean>>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All queries and mutations
|
|
3
|
+
*/
|
|
4
|
+
export declare const useCreateComment: () => import('@tanstack/react-query').UseMutationResult<Comment, Error, {
|
|
5
|
+
wikiId: string;
|
|
6
|
+
pageId: string;
|
|
7
|
+
comment: string;
|
|
8
|
+
replyTo?: string;
|
|
9
|
+
}, unknown>;
|
|
10
|
+
export declare const useUpdateComment: () => import('@tanstack/react-query').UseMutationResult<Comment, Error, {
|
|
11
|
+
wikiId: string;
|
|
12
|
+
pageId: string;
|
|
13
|
+
commentId: string;
|
|
14
|
+
comment: string;
|
|
15
|
+
}, unknown>;
|
|
16
|
+
export declare const useDeleteComment: () => import('@tanstack/react-query').UseMutationResult<Comment, Error, {
|
|
17
|
+
wikiId: string;
|
|
18
|
+
pageId: string;
|
|
19
|
+
commentId: string;
|
|
20
|
+
}, unknown>;
|