@sinequa/atomic-angular 0.0.140
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/assets/tailwind.css +248 -0
- package/esm2022/lib/assistant/index.mjs +2 -0
- package/esm2022/lib/assistant/signalR.web.service.mjs +81 -0
- package/esm2022/lib/components/dropdown.mjs +127 -0
- package/esm2022/lib/components/index.mjs +5 -0
- package/esm2022/lib/components/menu/index.mjs +3 -0
- package/esm2022/lib/components/menu/menu-item.mjs +22 -0
- package/esm2022/lib/components/menu/menu.mjs +99 -0
- package/esm2022/lib/components/metadata/index.mjs +2 -0
- package/esm2022/lib/components/metadata/metadata.component.mjs +65 -0
- package/esm2022/lib/components/theme/index.mjs +3 -0
- package/esm2022/lib/components/theme/theme-selector.component.mjs +67 -0
- package/esm2022/lib/components/theme/theme-toggle.component.mjs +67 -0
- package/esm2022/lib/directives/index.mjs +5 -0
- package/esm2022/lib/directives/infinite-scroll.directive.mjs +47 -0
- package/esm2022/lib/directives/select-article-on-click.directive.mjs +39 -0
- package/esm2022/lib/directives/show-bookmark.directive.mjs +55 -0
- package/esm2022/lib/directives/theme-provider.directive.mjs +31 -0
- package/esm2022/lib/guards/auth.guard.mjs +27 -0
- package/esm2022/lib/guards/index.mjs +3 -0
- package/esm2022/lib/guards/initialization.guard.mjs +41 -0
- package/esm2022/lib/interceptors/audit.interceptor.mjs +23 -0
- package/esm2022/lib/interceptors/auth.interceptor.mjs +49 -0
- package/esm2022/lib/interceptors/body.interceptor.mjs +24 -0
- package/esm2022/lib/interceptors/error.interceptor.mjs +35 -0
- package/esm2022/lib/interceptors/index.mjs +7 -0
- package/esm2022/lib/interceptors/toast.interceptor.mjs +27 -0
- package/esm2022/lib/models/aggregation.mjs +2 -0
- package/esm2022/lib/models/article-metadata.mjs +2 -0
- package/esm2022/lib/models/autocomplete.mjs +2 -0
- package/esm2022/lib/models/custom-json.mjs +2 -0
- package/esm2022/lib/models/filter-dropdown.mjs +2 -0
- package/esm2022/lib/models/index.mjs +7 -0
- package/esm2022/lib/models/user-settings.mjs +2 -0
- package/esm2022/lib/pipes/highlight-word.pipe.mjs +33 -0
- package/esm2022/lib/pipes/index.mjs +3 -0
- package/esm2022/lib/pipes/source-icon.pipe.mjs +43 -0
- package/esm2022/lib/providers/eager-provider.mjs +24 -0
- package/esm2022/lib/providers/index.mjs +2 -0
- package/esm2022/lib/public-api.mjs +19 -0
- package/esm2022/lib/resolvers/index.mjs +2 -0
- package/esm2022/lib/resolvers/query-name-resolver.mjs +14 -0
- package/esm2022/lib/resources/index.mjs +2 -0
- package/esm2022/lib/resources/themes.mjs +53 -0
- package/esm2022/lib/services/application.service.mjs +245 -0
- package/esm2022/lib/services/autocomplete.service.mjs +85 -0
- package/esm2022/lib/services/drawer/backdrop.service.mjs +23 -0
- package/esm2022/lib/services/drawer/drawer-stack.service.mjs +152 -0
- package/esm2022/lib/services/drawer/drawer.service.mjs +38 -0
- package/esm2022/lib/services/index.mjs +12 -0
- package/esm2022/lib/services/label.service.mjs +161 -0
- package/esm2022/lib/services/navigation.service.mjs +59 -0
- package/esm2022/lib/services/saved-searches.service.mjs +75 -0
- package/esm2022/lib/services/search.service.mjs +89 -0
- package/esm2022/lib/services/selection-history.service.mjs +92 -0
- package/esm2022/lib/services/selection.service.mjs +87 -0
- package/esm2022/lib/stores/aggregations.store.mjs +62 -0
- package/esm2022/lib/stores/app.store.mjs +265 -0
- package/esm2022/lib/stores/application.store.mjs +93 -0
- package/esm2022/lib/stores/index.mjs +9 -0
- package/esm2022/lib/stores/principal.store.mjs +47 -0
- package/esm2022/lib/stores/query-params.store.mjs +208 -0
- package/esm2022/lib/stores/selection.store.mjs +46 -0
- package/esm2022/lib/stores/theme.store.mjs +116 -0
- package/esm2022/lib/stores/user-settings.store.mjs +272 -0
- package/esm2022/lib/tokens/highlights.mjs +32 -0
- package/esm2022/lib/tokens/index.mjs +2 -0
- package/esm2022/lib/utils/debounced-signal.mjs +38 -0
- package/esm2022/lib/utils/index.mjs +8 -0
- package/esm2022/lib/utils/inline-worker.mjs +40 -0
- package/esm2022/lib/utils/query.mjs +58 -0
- package/esm2022/lib/utils/routes.mjs +28 -0
- package/esm2022/lib/utils/tailwind-utils.mjs +6 -0
- package/esm2022/lib/utils/theme-body-hook.mjs +18 -0
- package/esm2022/lib/utils/theme-registry.mjs +6 -0
- package/esm2022/lib/web-services/aggregations.service.mjs +104 -0
- package/esm2022/lib/web-services/app.service.mjs +48 -0
- package/esm2022/lib/web-services/audit.service.mjs +122 -0
- package/esm2022/lib/web-services/index.mjs +10 -0
- package/esm2022/lib/web-services/json-method-plugin.service.mjs +54 -0
- package/esm2022/lib/web-services/preview.service.mjs +327 -0
- package/esm2022/lib/web-services/principal.service.mjs +46 -0
- package/esm2022/lib/web-services/query.service.mjs +123 -0
- package/esm2022/lib/web-services/text-chunck.service.mjs +46 -0
- package/esm2022/public-api.mjs +5 -0
- package/esm2022/sinequa-atomic-angular.mjs +5 -0
- package/fesm2022/sinequa-atomic-angular.mjs +4204 -0
- package/fesm2022/sinequa-atomic-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/assistant/index.d.ts +1 -0
- package/lib/assistant/signalR.web.service.d.ts +46 -0
- package/lib/components/dropdown.d.ts +50 -0
- package/lib/components/index.d.ts +4 -0
- package/lib/components/menu/index.d.ts +2 -0
- package/lib/components/menu/menu-item.d.ts +8 -0
- package/lib/components/menu/menu.d.ts +24 -0
- package/lib/components/metadata/index.d.ts +1 -0
- package/lib/components/metadata/metadata.component.d.ts +24 -0
- package/lib/components/theme/index.d.ts +2 -0
- package/lib/components/theme/theme-selector.component.d.ts +70 -0
- package/lib/components/theme/theme-toggle.component.d.ts +10 -0
- package/lib/directives/index.d.ts +4 -0
- package/lib/directives/infinite-scroll.directive.d.ts +30 -0
- package/lib/directives/select-article-on-click.directive.d.ts +14 -0
- package/lib/directives/show-bookmark.directive.d.ts +52 -0
- package/lib/directives/theme-provider.directive.d.ts +20 -0
- package/lib/guards/auth.guard.d.ts +7 -0
- package/lib/guards/index.d.ts +2 -0
- package/lib/guards/initialization.guard.d.ts +20 -0
- package/lib/interceptors/audit.interceptor.d.ts +13 -0
- package/lib/interceptors/auth.interceptor.d.ts +14 -0
- package/lib/interceptors/body.interceptor.d.ts +11 -0
- package/lib/interceptors/error.interceptor.d.ts +9 -0
- package/lib/interceptors/index.d.ts +5 -0
- package/lib/interceptors/toast.interceptor.d.ts +13 -0
- package/lib/models/aggregation.d.ts +12 -0
- package/lib/models/article-metadata.d.ts +5 -0
- package/lib/models/autocomplete.d.ts +5 -0
- package/lib/models/custom-json.d.ts +58 -0
- package/lib/models/filter-dropdown.d.ts +10 -0
- package/lib/models/index.d.ts +6 -0
- package/lib/models/user-settings.d.ts +32 -0
- package/lib/pipes/highlight-word.pipe.d.ts +22 -0
- package/lib/pipes/index.d.ts +2 -0
- package/lib/pipes/source-icon.pipe.d.ts +54 -0
- package/lib/providers/eager-provider.d.ts +11 -0
- package/lib/providers/index.d.ts +1 -0
- package/lib/public-api.d.ts +15 -0
- package/lib/resolvers/index.d.ts +1 -0
- package/lib/resolvers/query-name-resolver.d.ts +9 -0
- package/lib/resources/index.d.ts +1 -0
- package/lib/resources/themes.d.ts +51 -0
- package/lib/services/application.service.d.ts +178 -0
- package/lib/services/autocomplete.service.d.ts +91 -0
- package/lib/services/drawer/backdrop.service.d.ts +9 -0
- package/lib/services/drawer/drawer-stack.service.d.ts +70 -0
- package/lib/services/drawer/drawer.service.d.ts +15 -0
- package/lib/services/index.d.ts +11 -0
- package/lib/services/label.service.d.ts +117 -0
- package/lib/services/navigation.service.d.ts +33 -0
- package/lib/services/saved-searches.service.d.ts +145 -0
- package/lib/services/search.service.d.ts +155 -0
- package/lib/services/selection-history.service.d.ts +50 -0
- package/lib/services/selection.service.d.ts +127 -0
- package/lib/stores/aggregations.store.d.ts +50 -0
- package/lib/stores/app.store.d.ts +208 -0
- package/lib/stores/application.store.d.ts +106 -0
- package/lib/stores/index.d.ts +8 -0
- package/lib/stores/principal.store.d.ts +53 -0
- package/lib/stores/query-params.store.d.ts +187 -0
- package/lib/stores/selection.store.d.ts +62 -0
- package/lib/stores/theme.store.d.ts +55 -0
- package/lib/stores/user-settings.store.d.ts +161 -0
- package/lib/tokens/highlights.d.ts +8 -0
- package/lib/tokens/index.d.ts +1 -0
- package/lib/utils/debounced-signal.d.ts +25 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/inline-worker.d.ts +11 -0
- package/lib/utils/query.d.ts +26 -0
- package/lib/utils/routes.d.ts +16 -0
- package/lib/utils/tailwind-utils.d.ts +2 -0
- package/lib/utils/theme-body-hook.d.ts +6 -0
- package/lib/utils/theme-registry.d.ts +3 -0
- package/lib/web-services/aggregations.service.d.ts +60 -0
- package/lib/web-services/app.service.d.ts +30 -0
- package/lib/web-services/audit.service.d.ts +75 -0
- package/lib/web-services/index.d.ts +9 -0
- package/lib/web-services/json-method-plugin.service.d.ts +41 -0
- package/lib/web-services/preview.service.d.ts +295 -0
- package/lib/web-services/principal.service.d.ts +28 -0
- package/lib/web-services/query.service.d.ts +29 -0
- package/lib/web-services/text-chunck.service.d.ts +22 -0
- package/package.json +28 -0
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Article, CustomHighlights } from "@sinequa/atomic";
|
|
2
|
+
export type PreviewHighlights = {
|
|
3
|
+
highlights: CustomHighlights[];
|
|
4
|
+
snippetId?: number;
|
|
5
|
+
};
|
|
6
|
+
type SelectionState = {
|
|
7
|
+
article: Article;
|
|
8
|
+
id: string;
|
|
9
|
+
queryText: string;
|
|
10
|
+
previewHighlights: PreviewHighlights;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @constant
|
|
14
|
+
* @name SelectionStore
|
|
15
|
+
* @description
|
|
16
|
+
* A store that manages the selection state of articles. It is provided in the root of the application and includes
|
|
17
|
+
* development tools for easier debugging. The store maintains the state with the following properties:
|
|
18
|
+
* - `article`: The selected article.
|
|
19
|
+
* - `id`: The ID of the selected article.
|
|
20
|
+
* - `queryText`: The query text associated with the selection.
|
|
21
|
+
*
|
|
22
|
+
* @methods
|
|
23
|
+
* - `update(article: Article, queryText?: string)`: Updates the store with a new article and optional query text.
|
|
24
|
+
* - `updateQueryText(queryText: string)`: Updates the query text in the store.
|
|
25
|
+
* - `clear()`: Clears the selection state, setting `article`, `id`, and `queryText` to `undefined`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SelectionStore: import("@angular/core").Type<{
|
|
28
|
+
article: import("@ngrx/signals/src/deep-signal").DeepSignal<Article>;
|
|
29
|
+
id: import("@angular/core").Signal<string>;
|
|
30
|
+
queryText: import("@angular/core").Signal<string>;
|
|
31
|
+
previewHighlights: import("@ngrx/signals/src/deep-signal").DeepSignal<PreviewHighlights>;
|
|
32
|
+
update: (newState: Partial<SelectionState>) => void;
|
|
33
|
+
clear: () => void;
|
|
34
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
35
|
+
article: Article;
|
|
36
|
+
id: string;
|
|
37
|
+
queryText: string;
|
|
38
|
+
previewHighlights: PreviewHighlights;
|
|
39
|
+
}>>;
|
|
40
|
+
export declare function withSelectionFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
|
|
41
|
+
state: Omit<SelectionState, "update" | "clear">;
|
|
42
|
+
signals: Omit<{}, "update" | "clear">;
|
|
43
|
+
methods: Omit<{}, "update" | "clear">;
|
|
44
|
+
} & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
|
|
45
|
+
methods: {
|
|
46
|
+
/**
|
|
47
|
+
* Updates the state with the provided article and optional query text.
|
|
48
|
+
*
|
|
49
|
+
* @param article - The article object to update the state with.
|
|
50
|
+
* @param queryText - Optional query text to update the state with.
|
|
51
|
+
*/
|
|
52
|
+
update(newState: Partial<SelectionState>): void;
|
|
53
|
+
/**
|
|
54
|
+
* Clears the current selection state by setting the `article`, `id`, and `queryText` properties to `undefined`.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* This method uses the `patchState` function to update the state of the store.
|
|
58
|
+
*/
|
|
59
|
+
clear(): void;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type CssVars = {
|
|
2
|
+
light?: Record<string, string>;
|
|
3
|
+
dark?: Record<string, string>;
|
|
4
|
+
};
|
|
5
|
+
export type ThemeScope = {
|
|
6
|
+
[key: string]: {
|
|
7
|
+
cssVars: CssVars;
|
|
8
|
+
darkMode?: boolean;
|
|
9
|
+
themeName: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type ThemeStoreState = {
|
|
13
|
+
scopes: ThemeScope;
|
|
14
|
+
};
|
|
15
|
+
export declare const ThemeStore: import("@angular/core").Type<{
|
|
16
|
+
scopes: import("@angular/core").Signal<ThemeScope>;
|
|
17
|
+
loadDefaultTheme: (scope: string, darkMode?: boolean) => void;
|
|
18
|
+
setCurrentTheme: (scope: string, themeName: string, darkMode?: boolean) => void;
|
|
19
|
+
setDarkMode: (scope: string, darkMode: boolean) => void;
|
|
20
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
21
|
+
scopes: ThemeScope;
|
|
22
|
+
}>>;
|
|
23
|
+
/**
|
|
24
|
+
* Processes the CSS variables for a given theme name.
|
|
25
|
+
*
|
|
26
|
+
* @param themeName - The name of the theme to process.
|
|
27
|
+
* @returns An object containing the CSS variables for both light and dark themes.
|
|
28
|
+
* @throws Will throw an error if the theme with the specified name is not found.
|
|
29
|
+
*/
|
|
30
|
+
export declare function processCssVars(themeName: string): CssVars;
|
|
31
|
+
/**
|
|
32
|
+
* Converts an object of theme colors to CSS variables.
|
|
33
|
+
*
|
|
34
|
+
* @param colors - An object where keys are theme color names and values are the corresponding color values.
|
|
35
|
+
* @returns An object where keys are CSS variable names and values are the corresponding color values.
|
|
36
|
+
*/
|
|
37
|
+
export declare function themeColorsToCssVariables(colors: any): any;
|
|
38
|
+
/**
|
|
39
|
+
* Converts a camelCase theme color name to a CSS variable format.
|
|
40
|
+
*
|
|
41
|
+
* This function takes a camelCase string and transforms it into a CSS variable
|
|
42
|
+
* name by inserting hyphens between lowercase and uppercase letters and converting
|
|
43
|
+
* the entire string to lowercase.
|
|
44
|
+
*
|
|
45
|
+
* @param name - The camelCase theme color name to be converted.
|
|
46
|
+
* @returns The corresponding CSS variable name in kebab-case.
|
|
47
|
+
*/
|
|
48
|
+
export declare function themeColorNameToCssVariable(name: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* Applies a set of CSS variables to a given HTML element.
|
|
51
|
+
*
|
|
52
|
+
* @param element - The HTML element to which the CSS variables will be applied.
|
|
53
|
+
* @param cssVars - An optional record of CSS variable names and their corresponding values.
|
|
54
|
+
*/
|
|
55
|
+
export declare function applyThemeToNativeElement(element: HTMLElement, cssVars?: Record<string, string>): void;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { Article, AuditEvents, QueryParams } from '@sinequa/atomic';
|
|
2
|
+
import { RecentSearch, UserSettings } from '../models/user-settings';
|
|
3
|
+
export declare const UserSettingsStore: import("@angular/core").Type<{
|
|
4
|
+
bookmarks: import("@angular/core").Signal<import("../models/user-settings").Bookmark[]>;
|
|
5
|
+
recentSearches: import("@angular/core").Signal<RecentSearch[]>;
|
|
6
|
+
savedSearches: import("@angular/core").Signal<import("../models/user-settings").SavedSearch[]>;
|
|
7
|
+
assistants: import("@angular/core").Signal<Record<string, unknown>>;
|
|
8
|
+
language?: import("@angular/core").Signal<string | undefined> | undefined;
|
|
9
|
+
initialize: () => Promise<void>;
|
|
10
|
+
reset: () => Promise<void>;
|
|
11
|
+
updateBookmarks: (bookmarks: UserSettings["bookmarks"], auditEvents?: AuditEvents) => Promise<void>;
|
|
12
|
+
bookmark: (article: Article, queryName?: string) => Promise<void>;
|
|
13
|
+
unbookmark: (id: string) => Promise<void>;
|
|
14
|
+
isBookmarked: (article: Partial<Article>) => boolean;
|
|
15
|
+
toggleBookmark: (article: Article) => Promise<void>;
|
|
16
|
+
deleteRecentSearch: (index: number) => Promise<void>;
|
|
17
|
+
updateRecentSearches: (recentSearches: UserSettings["recentSearches"], auditEvents?: AuditEvents) => Promise<void>;
|
|
18
|
+
addCurrentSearch: (queryParams: QueryParams) => Promise<void>;
|
|
19
|
+
deleteSavedSearch: (index: number) => Promise<void>;
|
|
20
|
+
updateSavedSearches: (savedSearches: UserSettings["savedSearches"]) => Promise<void>;
|
|
21
|
+
updateAssistantSettings: (assistantSettings: UserSettings["assistants"]) => Promise<void>;
|
|
22
|
+
updateLanguage: (language: UserSettings["language"], auditEvents?: AuditEvents) => Promise<void>;
|
|
23
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
24
|
+
bookmarks: import("../models/user-settings").Bookmark[];
|
|
25
|
+
recentSearches: RecentSearch[];
|
|
26
|
+
savedSearches: import("../models/user-settings").SavedSearch[];
|
|
27
|
+
assistants: Record<string, unknown>;
|
|
28
|
+
language?: string | undefined;
|
|
29
|
+
}>>;
|
|
30
|
+
export declare function withUserSettingsFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
|
|
31
|
+
state: Omit<UserSettings, "initialize" | "reset">;
|
|
32
|
+
signals: Omit<{}, "initialize" | "reset">;
|
|
33
|
+
methods: Omit<{}, "initialize" | "reset">;
|
|
34
|
+
} & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
|
|
35
|
+
methods: {
|
|
36
|
+
/**
|
|
37
|
+
* Initializes the user settings store by fetching the user settings from the backend API
|
|
38
|
+
* and patching the store with the retrieved settings.
|
|
39
|
+
*
|
|
40
|
+
* @returns {Promise<void>} A promise that resolves when the initialization is complete.
|
|
41
|
+
*/
|
|
42
|
+
initialize(): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Resets the user settings to the initial state.
|
|
45
|
+
*
|
|
46
|
+
* This method performs the following actions:
|
|
47
|
+
* 1. Deletes the current user settings.
|
|
48
|
+
* 2. Patches the state with the initial state.
|
|
49
|
+
*
|
|
50
|
+
* @returns {Promise<void>} A promise that resolves when the reset operation is complete.
|
|
51
|
+
*/
|
|
52
|
+
reset(): Promise<void>;
|
|
53
|
+
};
|
|
54
|
+
}>;
|
|
55
|
+
export declare function withBookmarkFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
|
|
56
|
+
state: Omit<UserSettings, "updateBookmarks" | "bookmark" | "unbookmark" | "isBookmarked" | "toggleBookmark">;
|
|
57
|
+
signals: Omit<{}, "updateBookmarks" | "bookmark" | "unbookmark" | "isBookmarked" | "toggleBookmark">;
|
|
58
|
+
methods: Omit<{}, "updateBookmarks" | "bookmark" | "unbookmark" | "isBookmarked" | "toggleBookmark">;
|
|
59
|
+
} & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
|
|
60
|
+
methods: {
|
|
61
|
+
/**
|
|
62
|
+
* Updates the user's bookmarks in the store and optionally logs audit events.
|
|
63
|
+
*
|
|
64
|
+
* @param bookmarks - An array of bookmarks to update in the user settings.
|
|
65
|
+
* @param auditEvents - Optional audit events to log during the update.
|
|
66
|
+
* @returns A promise that resolves when the update is complete.
|
|
67
|
+
*/
|
|
68
|
+
updateBookmarks(bookmarks: UserSettings["bookmarks"], auditEvents?: AuditEvents): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Adds an article to the bookmarks if it is not already bookmarked.
|
|
71
|
+
*
|
|
72
|
+
* @param article - The article to be bookmarked.
|
|
73
|
+
* @param queryName - Optional name of the query associated with the bookmark.
|
|
74
|
+
* @returns A promise that resolves when the bookmark has been added.
|
|
75
|
+
*/
|
|
76
|
+
bookmark(article: Article, queryName?: string): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Removes a bookmark by its ID.
|
|
79
|
+
*
|
|
80
|
+
* @param id - The ID of the bookmark to remove.
|
|
81
|
+
* @returns A promise that resolves when the bookmark has been removed and the bookmarks have been updated.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* - If the provided ID is falsy, the function will return immediately.
|
|
85
|
+
* - If the bookmark with the given ID is not found, the function will return immediately.
|
|
86
|
+
* - The function updates the bookmarks and logs the removal action with a type of "Basket_RemoveDoc".
|
|
87
|
+
*/
|
|
88
|
+
unbookmark(id: string): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Checks if the given article is bookmarked.
|
|
91
|
+
*
|
|
92
|
+
* @param article - An optional partial article object to check.
|
|
93
|
+
* @returns `true` if the article is bookmarked, `false` otherwise.
|
|
94
|
+
*/
|
|
95
|
+
isBookmarked(article: Partial<Article>): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Toggles the bookmark status of a given article.
|
|
98
|
+
*
|
|
99
|
+
* This method checks if the article is currently bookmarked. If it is,
|
|
100
|
+
* it removes the bookmark. If it is not, it adds a bookmark.
|
|
101
|
+
*
|
|
102
|
+
* @param article - The article to toggle the bookmark status for.
|
|
103
|
+
* @returns A promise that resolves when the bookmark status has been toggled.
|
|
104
|
+
*/
|
|
105
|
+
toggleBookmark(article: Article): Promise<void>;
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
108
|
+
export declare function withRecentSearchFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
|
|
109
|
+
state: Omit<UserSettings, "deleteRecentSearch" | "updateRecentSearches" | "addCurrentSearch">;
|
|
110
|
+
signals: Omit<{}, "deleteRecentSearch" | "updateRecentSearches" | "addCurrentSearch">;
|
|
111
|
+
methods: Omit<{}, "deleteRecentSearch" | "updateRecentSearches" | "addCurrentSearch">;
|
|
112
|
+
} & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
|
|
113
|
+
methods: {
|
|
114
|
+
/**
|
|
115
|
+
* Deletes a recent search entry from the user's recent searches list.
|
|
116
|
+
*
|
|
117
|
+
* @param {number} index - The index of the recent search to delete.
|
|
118
|
+
* @returns {Promise<void>} A promise that resolves when the recent search has been deleted and the state has been updated.
|
|
119
|
+
*/
|
|
120
|
+
deleteRecentSearch(index: number): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Updates the recent searches in the user settings.
|
|
123
|
+
*
|
|
124
|
+
* @param recentSearches - An array of recent searches to be updated in the user settings.
|
|
125
|
+
* @param auditEvents - Optional audit events to be logged during the update.
|
|
126
|
+
* @returns A promise that resolves when the recent searches have been updated.
|
|
127
|
+
*/
|
|
128
|
+
updateRecentSearches(recentSearches: UserSettings["recentSearches"], auditEvents?: AuditEvents): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* Adds the current search to the recent searches list.
|
|
131
|
+
*
|
|
132
|
+
* This method checks if a search with the same label already exists in the recent searches.
|
|
133
|
+
* If it does, it updates the existing search with the new query parameters and date.
|
|
134
|
+
* If it does not, it adds a new search to the recent searches list.
|
|
135
|
+
*
|
|
136
|
+
* @param queryParams - The parameters of the current search.
|
|
137
|
+
* @returns A promise that resolves when the recent searches have been updated.
|
|
138
|
+
*/
|
|
139
|
+
addCurrentSearch(queryParams: QueryParams): Promise<void>;
|
|
140
|
+
};
|
|
141
|
+
}>;
|
|
142
|
+
export declare function withSavedSearchFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
|
|
143
|
+
state: Omit<UserSettings, "deleteSavedSearch" | "updateSavedSearches">;
|
|
144
|
+
signals: Omit<{}, "deleteSavedSearch" | "updateSavedSearches">;
|
|
145
|
+
methods: Omit<{}, "deleteSavedSearch" | "updateSavedSearches">;
|
|
146
|
+
} & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
|
|
147
|
+
methods: {
|
|
148
|
+
deleteSavedSearch(index: number): Promise<void>;
|
|
149
|
+
updateSavedSearches(savedSearches: UserSettings["savedSearches"]): Promise<void>;
|
|
150
|
+
};
|
|
151
|
+
}>;
|
|
152
|
+
export declare function withAssistantFeatures(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult, {
|
|
153
|
+
state: Omit<UserSettings, "updateAssistantSettings" | "updateLanguage">;
|
|
154
|
+
signals: Omit<{}, "updateAssistantSettings" | "updateLanguage">;
|
|
155
|
+
methods: Omit<{}, "updateAssistantSettings" | "updateLanguage">;
|
|
156
|
+
} & import("@ngrx/signals/src/signal-store-models").EmptyFeatureResult & {
|
|
157
|
+
methods: {
|
|
158
|
+
updateAssistantSettings(assistantSettings: UserSettings["assistants"]): Promise<void>;
|
|
159
|
+
updateLanguage(language: UserSettings["language"], auditEvents?: AuditEvents): Promise<void>;
|
|
160
|
+
};
|
|
161
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InjectionToken } from "@angular/core";
|
|
2
|
+
export type PreviewHighlightName = 'company' | 'geo' | 'person' | 'extractslocations' | 'matchlocations';
|
|
3
|
+
export type PreviewHighlight = {
|
|
4
|
+
name: PreviewHighlightName;
|
|
5
|
+
color: string;
|
|
6
|
+
bgColor: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const HIGHLIGHTS: InjectionToken<PreviewHighlight[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./highlights";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Signal } from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a debounced signal that updates its value after a specified timeout.
|
|
4
|
+
*
|
|
5
|
+
* @template T - The type of the signal value.
|
|
6
|
+
* @param Signal<T> input - The input signal whose value will be debounced.
|
|
7
|
+
* @param number [timeOutMs=0] - The debounce timeout in milliseconds. Defaults to 0.
|
|
8
|
+
* @returns Signal<T> - A new signal that updates its value after the specified debounce timeout.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const input = signal('');
|
|
13
|
+
* const debounced = debouncedSignal(input, 1000);
|
|
14
|
+
*
|
|
15
|
+
* contructor() {
|
|
16
|
+
* effect(() => {
|
|
17
|
+
* console.log(debounced());
|
|
18
|
+
* // will log the input value after 1 second of inactivity.
|
|
19
|
+
* });
|
|
20
|
+
* }
|
|
21
|
+
* ...
|
|
22
|
+
* <input [ngModel]="input()" (ngModelChange)="input.set($event)">
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function debouncedSignal<T>(input: Signal<T>, timeOutMs?: number): Signal<T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare class InlineWorker {
|
|
3
|
+
private readonly worker;
|
|
4
|
+
private onMessage;
|
|
5
|
+
private onError;
|
|
6
|
+
constructor(func: () => void);
|
|
7
|
+
postMessage(data: unknown): void;
|
|
8
|
+
onmessage(): Observable<MessageEvent>;
|
|
9
|
+
onerror(): Observable<ErrorEvent>;
|
|
10
|
+
terminate(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Query } from '@sinequa/atomic';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the query name from the current route.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This function must be used within an injection context.
|
|
7
|
+
*
|
|
8
|
+
* This function traverses the route tree recursively to find the query name.
|
|
9
|
+
* It first checks for a query parameter `t` in the route's snapshot. If the query name is not found
|
|
10
|
+
* in the route data, it attempts to find it in the child routes of the "search" route.
|
|
11
|
+
* If the query name is still not found, it falls back to the `queryName` defined in the route's data.
|
|
12
|
+
*
|
|
13
|
+
* @returns {string | undefined} The query name if found, otherwise `undefined`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getQueryNameFromRoute(): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Builds a query object based on the provided partial query.
|
|
18
|
+
* If any properties are missing in the partial query, default values are used.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* This function must be used within an injection context.
|
|
22
|
+
*
|
|
23
|
+
* @param query - The partial query object.
|
|
24
|
+
* @returns The complete query object.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildQuery(query?: Partial<Query>): Query;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieves the current path from the Angular `ActivatedRoute` service.
|
|
3
|
+
*
|
|
4
|
+
* @returns {string | undefined} The current path as a string, or `undefined` if the path cannot be determined.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getCurrentPath(): string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the current query name based on the current path and router configuration.
|
|
9
|
+
*
|
|
10
|
+
* This function asserts that it is being called within an injection context and then
|
|
11
|
+
* uses Angular's dependency injection to get the router configuration. It matches the
|
|
12
|
+
* current path against the router's configuration to find the corresponding query name.
|
|
13
|
+
*
|
|
14
|
+
* @returns {string | undefined} The name of the current query if found, otherwise undefined.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getCurrentQueryName(): string | undefined;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Aggregation, AuditEvents, Query, TreeAggregation, TreeAggregationNode } from '@sinequa/atomic';
|
|
4
|
+
import { QueryService } from './query.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AggregationsService {
|
|
7
|
+
protected readonly http: HttpClient;
|
|
8
|
+
protected readonly queryService: QueryService;
|
|
9
|
+
appStore: {
|
|
10
|
+
webServices: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCWebService>>;
|
|
11
|
+
data: import("@ngrx/signals/src/deep-signal").DeepSignal<import("@sinequa/atomic-angular").CJson>;
|
|
12
|
+
queries: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCQuery>>;
|
|
13
|
+
customJSONs: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJ[]>;
|
|
14
|
+
filters: import("@angular/core").Signal<import("@sinequa/atomic-angular").CFilter[]>;
|
|
15
|
+
sources: import("@angular/core").Signal<import("@sinequa/atomic-angular").CSources | {
|
|
16
|
+
routes?: [];
|
|
17
|
+
filters?: import("@sinequa/atomic-angular").CFilter[];
|
|
18
|
+
}>;
|
|
19
|
+
customizationJson: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJson>;
|
|
20
|
+
update: (app: import("@sinequa/atomic").CCApp) => void;
|
|
21
|
+
initialize: () => Promise<void>;
|
|
22
|
+
initializeWithAppName: (appName: string) => Promise<void>;
|
|
23
|
+
getWebServiceByType: (type: import("@sinequa/atomic").CCWebService["webServiceType"]) => import("@sinequa/atomic").CCWebService | undefined;
|
|
24
|
+
getLabels: () => {
|
|
25
|
+
private: string;
|
|
26
|
+
public: string;
|
|
27
|
+
};
|
|
28
|
+
getQueryByName: (name: string) => import("@sinequa/atomic").CCQuery | undefined;
|
|
29
|
+
getQueryByIndex: (index: number) => import("@sinequa/atomic").CCQuery | undefined;
|
|
30
|
+
getDefaultQuery: () => import("@sinequa/atomic").CCQuery | undefined;
|
|
31
|
+
allowEmptySearch: (queryName: string) => boolean;
|
|
32
|
+
getNamedCustomizationJson: (name: string) => any | undefined;
|
|
33
|
+
getColumnAlias: (column: string) => string;
|
|
34
|
+
getAggregationIcon: (column: string) => string | undefined;
|
|
35
|
+
getAggregationItemsCustomization: (column: string) => import("@sinequa/atomic-angular").CFilterItem[] | undefined;
|
|
36
|
+
getAggregationCustomization: (column: string) => import("@sinequa/atomic-angular").CFilter | undefined;
|
|
37
|
+
getAuthorizedFilters: (route: import("@angular/router").ActivatedRoute) => Aggregation[];
|
|
38
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
39
|
+
webServices: Record<string, import("@sinequa/atomic").CCWebService>;
|
|
40
|
+
data: import("@sinequa/atomic-angular").CJson;
|
|
41
|
+
queries: Record<string, import("@sinequa/atomic").CCQuery>;
|
|
42
|
+
customJSONs: import("@sinequa/atomic-angular").CJ[];
|
|
43
|
+
}>;
|
|
44
|
+
aggregationsStore: {
|
|
45
|
+
aggregations: import("@angular/core").Signal<Aggregation[]>;
|
|
46
|
+
update: (aggregations: Aggregation[]) => void;
|
|
47
|
+
updateAggregation: (aggregation: Aggregation) => void;
|
|
48
|
+
clear: () => void;
|
|
49
|
+
getAggregation: (name: string, kind?: "column" | "name") => Aggregation | undefined;
|
|
50
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
51
|
+
aggregations: Aggregation[];
|
|
52
|
+
}>;
|
|
53
|
+
protected API_URL: string;
|
|
54
|
+
loadMore(query: Partial<Query>, aggregation: Aggregation, audit?: AuditEvents): Observable<Aggregation>;
|
|
55
|
+
open(query: Partial<Query>, aggregation: TreeAggregation, item: TreeAggregationNode): Observable<TreeAggregation>;
|
|
56
|
+
private findNode;
|
|
57
|
+
private replaceInTree;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AggregationsService, never>;
|
|
59
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AggregationsService>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CCApp } from '@sinequa/atomic';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AppService {
|
|
6
|
+
protected readonly http: HttpClient;
|
|
7
|
+
protected readonly API_URL: string;
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves the application configuration from the server.
|
|
10
|
+
*
|
|
11
|
+
* @param appName - The name of the application to fetch the configuration for.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Observable<CCApp>} An observable that emits the application configuration.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* This method constructs an HTTP GET request to fetch the application configuration
|
|
17
|
+
* using the `app` parameter from the global configuration. If the request fails,
|
|
18
|
+
* it logs the error to the console and returns an empty observable.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* appService.getApp().subscribe(appConfig => {
|
|
23
|
+
* console.log(appConfig);
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
getApp(appName?: string): Observable<CCApp>;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppService, never>;
|
|
29
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AppService>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { Router } from "@angular/router";
|
|
3
|
+
import { Article, AuditEvents, AuditEventType, AuditEventTypeValues, CCApp, Result } from "@sinequa/atomic";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AuditService {
|
|
6
|
+
appStore: {
|
|
7
|
+
webServices: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCWebService>>;
|
|
8
|
+
data: import("@ngrx/signals/src/deep-signal").DeepSignal<import("@sinequa/atomic-angular").CJson>;
|
|
9
|
+
queries: import("@angular/core").Signal<Record<string, import("@sinequa/atomic").CCQuery>>;
|
|
10
|
+
customJSONs: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJ[]>;
|
|
11
|
+
filters: import("@angular/core").Signal<import("@sinequa/atomic-angular").CFilter[]>;
|
|
12
|
+
sources: import("@angular/core").Signal<import("@sinequa/atomic-angular").CSources | {
|
|
13
|
+
routes?: [];
|
|
14
|
+
filters?: import("@sinequa/atomic-angular").CFilter[];
|
|
15
|
+
}>;
|
|
16
|
+
customizationJson: import("@angular/core").Signal<import("@sinequa/atomic-angular").CJson>;
|
|
17
|
+
update: (app: CCApp) => void;
|
|
18
|
+
initialize: () => Promise<void>;
|
|
19
|
+
initializeWithAppName: (appName: string) => Promise<void>;
|
|
20
|
+
getWebServiceByType: (type: import("@sinequa/atomic").CCWebService["webServiceType"]) => import("@sinequa/atomic").CCWebService | undefined;
|
|
21
|
+
getLabels: () => {
|
|
22
|
+
private: string;
|
|
23
|
+
public: string;
|
|
24
|
+
};
|
|
25
|
+
getQueryByName: (name: string) => import("@sinequa/atomic").CCQuery | undefined;
|
|
26
|
+
getQueryByIndex: (index: number) => import("@sinequa/atomic").CCQuery | undefined;
|
|
27
|
+
getDefaultQuery: () => import("@sinequa/atomic").CCQuery | undefined;
|
|
28
|
+
allowEmptySearch: (queryName: string) => boolean;
|
|
29
|
+
getNamedCustomizationJson: (name: string) => any | undefined;
|
|
30
|
+
getColumnAlias: (column: string) => string;
|
|
31
|
+
getAggregationIcon: (column: string) => string | undefined;
|
|
32
|
+
getAggregationItemsCustomization: (column: string) => import("@sinequa/atomic-angular").CFilterItem[] | undefined;
|
|
33
|
+
getAggregationCustomization: (column: string) => import("@sinequa/atomic-angular").CFilter | undefined;
|
|
34
|
+
getAuthorizedFilters: (route: import("@angular/router").ActivatedRoute) => import("@sinequa/atomic").Aggregation[];
|
|
35
|
+
} & import("@ngrx/signals").StateSignal<{
|
|
36
|
+
webServices: Record<string, import("@sinequa/atomic").CCWebService>;
|
|
37
|
+
data: import("@sinequa/atomic-angular").CJson;
|
|
38
|
+
queries: Record<string, import("@sinequa/atomic").CCQuery>;
|
|
39
|
+
customJSONs: import("@sinequa/atomic-angular").CJ[];
|
|
40
|
+
}>;
|
|
41
|
+
app: import("@angular/core").Signal<CCApp>;
|
|
42
|
+
protected readonly http: HttpClient;
|
|
43
|
+
protected readonly router: Router;
|
|
44
|
+
protected readonly API_URL: string;
|
|
45
|
+
protected lastClickTime: number;
|
|
46
|
+
/**
|
|
47
|
+
* Notify the Sinequa server of a set of audit events
|
|
48
|
+
*
|
|
49
|
+
* @param auditEvents The audit events
|
|
50
|
+
*/
|
|
51
|
+
notify(auditEvents: AuditEvents): void;
|
|
52
|
+
/**
|
|
53
|
+
* It sends an audit event to the Audit Service.
|
|
54
|
+
*/
|
|
55
|
+
notifyLogin(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Notify logout
|
|
58
|
+
*/
|
|
59
|
+
notifyLogout(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Notify the Sinequa server of a document event
|
|
62
|
+
*
|
|
63
|
+
* @param evt The audit event type
|
|
64
|
+
* @param doc The document (article) in question
|
|
65
|
+
* @param resultId The resultid that contain the document
|
|
66
|
+
* @param parameters Additional parameters
|
|
67
|
+
*/
|
|
68
|
+
notifyDocument(auditEventType: AuditEventType | AuditEventTypeValues | {} & Record<never, never>, doc: Article, resultsOrId: Result | string, parameters?: Record<string, string | number | boolean | undefined>, rfmParameters?: Record<string, string | number | boolean | undefined>): void;
|
|
69
|
+
/**
|
|
70
|
+
* Notify route change
|
|
71
|
+
*/
|
|
72
|
+
notifyRouteChange(url: string): void;
|
|
73
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuditService, never>;
|
|
74
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuditService>;
|
|
75
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./aggregations.service";
|
|
2
|
+
export * from "./app.service";
|
|
3
|
+
export * from "./json-method-plugin.service";
|
|
4
|
+
export * from "./preview.service";
|
|
5
|
+
export * from "./principal.service";
|
|
6
|
+
export * from "./query.service";
|
|
7
|
+
export * from "./text-chunck.service";
|
|
8
|
+
export * from "./audit.service";
|
|
9
|
+
export * from "./audit.service";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { HttpClient, HttpContext, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
type Options = {
|
|
5
|
+
headers?: HttpHeaders | {
|
|
6
|
+
[header: string]: string | string[];
|
|
7
|
+
};
|
|
8
|
+
context?: HttpContext;
|
|
9
|
+
observe?: 'body' | 'events' | 'response';
|
|
10
|
+
params?: HttpParams | {
|
|
11
|
+
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
12
|
+
};
|
|
13
|
+
reportProgress?: boolean;
|
|
14
|
+
responseType: 'arraybuffer' | 'blob' | 'text' | 'json';
|
|
15
|
+
withCredentials?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare class JsonMethodPluginService {
|
|
18
|
+
protected readonly http: HttpClient;
|
|
19
|
+
protected readonly API_URL: string;
|
|
20
|
+
/**
|
|
21
|
+
* Call a JsonMethod plugin using an HTTP POST
|
|
22
|
+
*
|
|
23
|
+
* @param method The name of the JsonMethod plugin
|
|
24
|
+
* @param query Parameters to pass to the plugin
|
|
25
|
+
* @param options HTTP options for the request
|
|
26
|
+
* @returns An observable of the plugin's return value
|
|
27
|
+
*/
|
|
28
|
+
post<U>(method: string, query: U, options?: Options): Observable<any>;
|
|
29
|
+
/**
|
|
30
|
+
* Call a JsonMethod plugin using an HTTP GET
|
|
31
|
+
*
|
|
32
|
+
* @param method The name of the JsonMethod plugin
|
|
33
|
+
* @param query Parameters to pass to the plugin
|
|
34
|
+
* @param options HTTP options for the request
|
|
35
|
+
* @returns An observable of the plugin's return value
|
|
36
|
+
*/
|
|
37
|
+
get<U extends Record<string, string | boolean | number | Date | object | undefined>>(method: string, query: U, options?: Options): Observable<any>;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JsonMethodPluginService, never>;
|
|
39
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<JsonMethodPluginService>;
|
|
40
|
+
}
|
|
41
|
+
export {};
|