@anzusystems/common-admin 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common-admin.es.js +14520 -5156
- package/dist/common-admin.es.js.map +1 -0
- package/dist/common-admin.umd.js +22 -27
- package/dist/common-admin.umd.js.map +1 -0
- package/dist/components/ABooleanValue.vue.d.ts +3 -7
- package/dist/components/ACard.vue.d.ts +49 -0
- package/dist/components/ADatatable.vue.d.ts +110 -0
- package/dist/components/ADatatableColumn.vue.d.ts +66 -0
- package/dist/components/ADatatablePagination.vue.d.ts +60 -0
- package/dist/components/ADatetime.vue.d.ts +27 -0
- package/dist/components/ADatetimePicker.vue.d.ts +2520 -0
- package/dist/components/buttons/filter/AFilterAdvancedButton.vue.d.ts +34 -0
- package/dist/components/buttons/filter/AFilterResetButton.vue.d.ts +43 -0
- package/dist/components/buttons/filter/AFilterSubmitButton.vue.d.ts +44 -0
- package/dist/components/filter/AFilterBooleanGroup.vue.d.ts +24 -0
- package/dist/components/filter/AFilterRemoteAutocomplete.vue.d.ts +87 -0
- package/dist/components/filter/AFilterString.vue.d.ts +34 -0
- package/dist/components/filter/AFilterValueObjectOptionsSelect.vue.d.ts +34 -0
- package/dist/components/filter/AFilterWrapper.vue.d.ts +163 -0
- package/dist/components/form/ABooleanToggle.vue.d.ts +71 -0
- package/dist/components/form/ARemoteAutocomplete.vue.d.ts +233 -0
- package/dist/components/form/ASystemEntityScope.vue.d.ts +22 -0
- package/dist/components/form/ATextField.vue.d.ts +142 -0
- package/dist/components/form/ATextarea.vue.d.ts +131 -0
- package/dist/components/form/AValueObjectOptionsSelect.vue.d.ts +137 -0
- package/dist/components/injectionKeys.d.ts +3 -0
- package/dist/components/permission/{PermissionGrantEditor.vue.d.ts → APermissionGrantEditor.vue.d.ts} +0 -0
- package/dist/components/permission/{PermissionValueChip.vue.d.ts → APermissionValueChip.vue.d.ts} +0 -0
- package/dist/composables/filter/filterHelpers.d.ts +20 -0
- package/dist/composables/statusCodes.d.ts +7 -0
- package/dist/composables/system/alerts.d.ts +17 -0
- package/dist/composables/system/error.d.ts +25 -0
- package/dist/composables/system/pagination.d.ts +14 -0
- package/dist/composables/system/tableColumns.d.ts +14 -0
- package/dist/create.d.ts +11 -0
- package/dist/lib.d.ts +93 -10
- package/dist/model/error/AnzuApiResponseCodeError.d.ts +4 -0
- package/dist/model/error/AnzuApiValidationError.d.ts +4 -0
- package/dist/model/error/AnzuFatalError.d.ts +4 -0
- package/dist/services/api/apiAnyRequest.d.ts +7 -0
- package/dist/services/api/apiCreateOne.d.ts +7 -0
- package/dist/services/api/apiDeleteOne.d.ts +7 -0
- package/dist/services/api/apiFetchByIds.d.ts +3 -0
- package/dist/services/api/apiFetchList.d.ts +9 -0
- package/dist/services/api/apiFetchOne.d.ts +6 -0
- package/dist/services/api/apiHelper.d.ts +4 -0
- package/dist/services/api/apiUpdateOne.d.ts +7 -0
- package/dist/services/api/queryBuilder.d.ts +13 -0
- package/dist/style.css +1 -1
- package/dist/types/Filter.d.ts +4 -4
- package/dist/types/Vuetify.d.ts +1 -0
- package/dist/utils/event.d.ts +1 -0
- package/dist/utils/file.d.ts +1 -0
- package/dist/utils/response.d.ts +1 -0
- package/dist/utils/string.d.ts +12 -0
- package/dist/validators/vuelidate/useRequiredIf.d.ts +1 -0
- package/package.json +60 -15
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ApiErrors } from '../../composables/system/error';
|
|
2
|
+
export declare const NEW_LINE_MARK = "\n";
|
|
3
|
+
export type RecordWasType = 'created' | 'deleted' | 'updated' | 'published' | 'unpublished' | 'enabled' | 'disabled';
|
|
4
|
+
export declare function useAlerts(): {
|
|
5
|
+
showSuccess: (message: string, duration?: number) => void;
|
|
6
|
+
showSuccessT: (translation: string, duration?: number) => void;
|
|
7
|
+
showError: (message: string, duration?: number) => void;
|
|
8
|
+
showErrorT: (translation: string, duration?: number) => void;
|
|
9
|
+
showInfo: (message: string, duration?: number) => void;
|
|
10
|
+
showInfoT: (translation: string, duration?: number) => void;
|
|
11
|
+
showWarning: (message: string, duration?: number) => void;
|
|
12
|
+
showWarningT: (translation: string, duration?: number) => void;
|
|
13
|
+
showValidationError: (duration?: number) => void;
|
|
14
|
+
showRecordWas: (variant: RecordWasType, duration?: number) => void;
|
|
15
|
+
showApiError: (errors: ApiErrors[], duration?: number, fieldIsTranslated?: boolean) => void;
|
|
16
|
+
showUnknownError: (duration?: number) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface ValidationResponseDataFields {
|
|
2
|
+
[key: string]: string[];
|
|
3
|
+
}
|
|
4
|
+
export interface ValidationResponseData {
|
|
5
|
+
contextId: string;
|
|
6
|
+
error: string;
|
|
7
|
+
fields: ValidationResponseDataFields;
|
|
8
|
+
}
|
|
9
|
+
export interface ApiErrors {
|
|
10
|
+
field: string;
|
|
11
|
+
errors: string[];
|
|
12
|
+
}
|
|
13
|
+
interface Error {
|
|
14
|
+
response?: {
|
|
15
|
+
data?: {
|
|
16
|
+
error?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare function useErrorHandler(): {
|
|
21
|
+
handleError: (error: unknown) => void;
|
|
22
|
+
handleValidationError: (error: Error, system?: string, entity?: string) => void;
|
|
23
|
+
isValidationError: (error: Error | any) => boolean;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Pagination } from '../../types/Pagination';
|
|
2
|
+
export declare function usePagination(): {
|
|
3
|
+
sortBy: string | null;
|
|
4
|
+
descending: boolean;
|
|
5
|
+
page: number;
|
|
6
|
+
rowsPerPage: number;
|
|
7
|
+
rowsNumber: number;
|
|
8
|
+
hasNextPage: boolean | null;
|
|
9
|
+
currentViewCount: number;
|
|
10
|
+
totalCount: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function usePaginationAutoHide(pagination: Pagination): {
|
|
13
|
+
showPagination: import("vue").ComputedRef<boolean>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export declare const DATETIME_AUTO_FORMAT_COLUMN_NAMES: string[];
|
|
3
|
+
export declare const DATETIME_AUTO_LABEL_TRACKING: string[];
|
|
4
|
+
export type ColumnConfig = {
|
|
5
|
+
name: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
type?: 'default' | 'datetime';
|
|
8
|
+
getLabel?: (system: string | undefined, subject: string | undefined) => string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export interface UseTableColumns {
|
|
11
|
+
availableColumns: Ref<ColumnConfig[]>;
|
|
12
|
+
get: (name: string) => ColumnConfig | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare function useTableColumns(config: ColumnConfig[]): UseTableColumns;
|
package/dist/create.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { type I18n } from 'vue-i18n';
|
|
3
|
+
interface Config {
|
|
4
|
+
i18nInstance: null | I18n;
|
|
5
|
+
}
|
|
6
|
+
export declare const commonAdminI18n: Ref<I18n<{}, {}, {}, string, boolean> | null>;
|
|
7
|
+
export declare const useI18n: () => {
|
|
8
|
+
t: (key: string) => string;
|
|
9
|
+
};
|
|
10
|
+
export declare const createCommonAdmin: (config?: Config) => void;
|
|
11
|
+
export {};
|
package/dist/lib.d.ts
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
import ABooleanValue from './components/ABooleanValue.vue';
|
|
2
2
|
import ARow from './components/ARow.vue';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import ACard from './components/ACard.vue';
|
|
4
|
+
import ATextField from './components/form/ATextField.vue';
|
|
5
|
+
import ATextarea from './components/form/ATextarea.vue';
|
|
6
|
+
import ABooleanToggle from './components/form/ABooleanToggle.vue';
|
|
7
|
+
import ASystemEntityScope from './components/form/ASystemEntityScope.vue';
|
|
8
|
+
import ADatatable from './components/ADatatable.vue';
|
|
9
|
+
import ADatatablePagination from './components/ADatatablePagination.vue';
|
|
10
|
+
import AFilterString from './components/filter/AFilterString.vue';
|
|
11
|
+
import AFilterWrapper from './components/filter/AFilterWrapper.vue';
|
|
12
|
+
import APermissionGrantEditor from './components/permission/APermissionGrantEditor.vue';
|
|
13
|
+
import APermissionValueChip from './components/permission/APermissionValueChip.vue';
|
|
14
|
+
import ADatetime from './components/ADatetime.vue';
|
|
15
|
+
import ADatetimePicker from './components/ADatetimePicker.vue';
|
|
16
|
+
import ARemoteAutocomplete from './components/form/ARemoteAutocomplete.vue';
|
|
17
|
+
import AValueObjectOptionsSelect from './components/form/AValueObjectOptionsSelect.vue';
|
|
18
|
+
import AFilterValueObjectOptionsSelect from './components/filter/AFilterValueObjectOptionsSelect.vue';
|
|
19
|
+
import AFilterRemoteAutocomplete from './components/filter/AFilterRemoteAutocomplete.vue';
|
|
20
|
+
import AFilterBooleanGroup from './components/filter/AFilterBooleanGroup.vue';
|
|
5
21
|
import { commonMessages } from './locales';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { currentTimestamp, DATETIME_MAX, DATETIME_MIN, dateTimeEndOfDay, dateTimeStartOfDay,
|
|
22
|
+
import { deepFreeze, deletePropertyByPath, getValueByPath, setValueByPath, simpleCloneObject } from './utils/object';
|
|
23
|
+
import { isArray, isBoolean, isDocId, isEmpty, isEmptyArray, isEmptyObject, isInt, isNotUndefined, isNull, isNumber, isObject, isString, isUndefined } from './utils/common';
|
|
24
|
+
import { normalizeForSlotName, slugify, splitOnFirstOccurrence, toFloat, toInt, trimLength } from './utils/string';
|
|
25
|
+
import { currentTimestamp, DATETIME_MAX, DATETIME_MIN, dateTimeEndOfDay, dateTimeNow, dateTimeStartOfDay, dateToUtc, friendlyDateTime, modifyMinutesOfDate, newDateNow, prettyDateTime, yearNow } from './utils/datetime';
|
|
10
26
|
import { Grant, useGrant } from './model/valueObject/Grant';
|
|
11
27
|
import { GrantOrigin, useGrantOrigin } from './model/valueObject/GrantOrigin';
|
|
12
28
|
import { useAnzuUserFactory } from './model/factory/AnzuUserFactory';
|
|
13
29
|
import { usePermissionConfigFactory } from './model/factory/PermissionConfigFactory';
|
|
14
30
|
import { usePermissionGroupFactory } from './model/factory/PermissionGroupFactory';
|
|
15
|
-
import type {
|
|
31
|
+
import type { DatetimeUTC, DatetimeUTCNullable, DocId, DocIdNullable, IntegerId, IntegerIdNullable } from './types/common';
|
|
16
32
|
import type { Filter, FilterBag, FilterVariant } from './types/Filter';
|
|
17
33
|
import type { Pagination } from './types/Pagination';
|
|
18
34
|
import type { OwnerAware } from './types/OwnerAware';
|
|
@@ -23,11 +39,54 @@ import type { PermissionConfig, PermissionTranslationGroup } from './types/Permi
|
|
|
23
39
|
import { type AnzuUserAndTimeTrackingAware } from './types/AnzuUserAndTimeTrackingAware';
|
|
24
40
|
import type { PermissionGroup, PermissionGroupMinimal } from './types/PermissionGroup';
|
|
25
41
|
import { type CreatedByAware, isCreatedByAware } from './types/CreatedByAware';
|
|
42
|
+
import type { VuetifyIconValue } from './types/Vuetify';
|
|
43
|
+
import { usePagination, usePaginationAutoHide } from './composables/system/pagination';
|
|
44
|
+
import { makeFilterHelper, type MakeFilterOptions, useFilterHelpers } from './composables/filter/filterHelpers';
|
|
45
|
+
import { SubjectScopeSymbol, SystemScopeSymbol } from './components/injectionKeys';
|
|
46
|
+
import { prettyBytes } from './utils/file';
|
|
47
|
+
import { isValidHTTPStatus } from './utils/response';
|
|
48
|
+
import { HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_CREATED, HTTP_STATUS_NO_CONTENT, HTTP_STATUS_OK, HTTP_STATUS_UNAUTHORIZED, HTTP_STATUS_UNPROCESSABLE_ENTITY } from './composables/statusCodes';
|
|
49
|
+
import { AnzuApiResponseCodeError } from './model/error/AnzuApiResponseCodeError';
|
|
50
|
+
import { AnzuApiValidationError } from './model/error/AnzuApiValidationError';
|
|
51
|
+
import { AnzuFatalError } from './model/error/AnzuFatalError';
|
|
52
|
+
import { apiAnyRequest } from './services/api/apiAnyRequest';
|
|
53
|
+
import { apiCreateOne } from './services/api/apiCreateOne';
|
|
54
|
+
import { apiDeleteOne } from './services/api/apiDeleteOne';
|
|
55
|
+
import { apiFetchByIds } from './services/api/apiFetchByIds';
|
|
56
|
+
import { apiFetchList } from './services/api/apiFetchList';
|
|
57
|
+
import { apiFetchOne } from './services/api/apiFetchOne';
|
|
58
|
+
import { apiUpdateOne } from './services/api/apiUpdateOne';
|
|
59
|
+
import { useQueryBuilder } from './services/api/queryBuilder';
|
|
60
|
+
import { useAlerts } from './composables/system/alerts';
|
|
61
|
+
import { useErrorHandler } from './composables/system/error';
|
|
62
|
+
import { useTableColumns } from './composables/system/tableColumns';
|
|
63
|
+
import { createCommonAdmin } from './create';
|
|
26
64
|
export { // | | | | |
|
|
65
|
+
ACard, // | | | | |
|
|
27
66
|
ARow, // | | | | |
|
|
28
67
|
ABooleanValue, // | | | | |
|
|
29
|
-
|
|
30
|
-
|
|
68
|
+
APermissionGrantEditor, // | | | | |
|
|
69
|
+
APermissionValueChip, // | | | | |
|
|
70
|
+
ASystemEntityScope, // | | | | |
|
|
71
|
+
ATextField, // | | | | |
|
|
72
|
+
ATextarea, // | | | | |
|
|
73
|
+
ADatetimePicker, // | | | | |
|
|
74
|
+
ARemoteAutocomplete, // | | | | |
|
|
75
|
+
AValueObjectOptionsSelect, // | | | | |
|
|
76
|
+
ABooleanToggle, // | | | | |
|
|
77
|
+
AFilterWrapper, // | | | | |
|
|
78
|
+
AFilterString, // | | | | |
|
|
79
|
+
AFilterRemoteAutocomplete, // | | | | |
|
|
80
|
+
AFilterValueObjectOptionsSelect, // | | | | |
|
|
81
|
+
AFilterBooleanGroup, // | | | | |
|
|
82
|
+
ADatetime, // | | | | |
|
|
83
|
+
ADatatable, // | | | | |
|
|
84
|
+
ADatatablePagination, // | | | | |
|
|
85
|
+
usePagination, usePaginationAutoHide, // | | | | |
|
|
86
|
+
makeFilterHelper, useFilterHelpers, // | | | | |
|
|
87
|
+
useAlerts, // | | | | |
|
|
88
|
+
useErrorHandler, // | | | | |
|
|
89
|
+
useTableColumns, // | | | | |
|
|
31
90
|
Grant, useGrant, // | | | | |
|
|
32
91
|
GrantOrigin, useGrantOrigin, // | | | | |
|
|
33
92
|
IntegerId, // | | | | |
|
|
@@ -51,6 +110,8 @@ PermissionConfig, // | | | | |
|
|
|
51
110
|
PermissionTranslationGroup, // | | | | |
|
|
52
111
|
PermissionGroup, // | | | | |
|
|
53
112
|
PermissionGroupMinimal, // | | | | |
|
|
113
|
+
VuetifyIconValue, // | | | | |
|
|
114
|
+
MakeFilterOptions, // | | | | |
|
|
54
115
|
useAnzuUserFactory, // | | | | |
|
|
55
116
|
usePermissionConfigFactory, // | | | | |
|
|
56
117
|
usePermissionGroupFactory, // | | | | |
|
|
@@ -77,6 +138,7 @@ slugify, // | | | | |
|
|
|
77
138
|
toFloat, // | | | | |
|
|
78
139
|
splitOnFirstOccurrence, // | | | | |
|
|
79
140
|
trimLength, // | | | | |
|
|
141
|
+
normalizeForSlotName, // | | | | |
|
|
80
142
|
currentTimestamp, // | | | | |
|
|
81
143
|
DATETIME_MAX, // | | | | |
|
|
82
144
|
DATETIME_MIN, // | | | | |
|
|
@@ -89,4 +151,25 @@ prettyDateTime, // | | | | |
|
|
|
89
151
|
dateToUtc, // | | | | |
|
|
90
152
|
modifyMinutesOfDate, // | | | | |
|
|
91
153
|
yearNow, // | | | | |
|
|
92
|
-
|
|
154
|
+
prettyBytes, // | | | | |
|
|
155
|
+
isValidHTTPStatus, // | | | | |
|
|
156
|
+
apiAnyRequest, // | | | | |
|
|
157
|
+
apiCreateOne, // | | | | |
|
|
158
|
+
apiDeleteOne, // | | | | |
|
|
159
|
+
apiFetchByIds, // | | | | |
|
|
160
|
+
apiFetchList, // | | | | |
|
|
161
|
+
apiFetchOne, // | | | | |
|
|
162
|
+
apiUpdateOne, // | | | | |
|
|
163
|
+
useQueryBuilder, // | | | | |
|
|
164
|
+
commonMessages, // | | | | |
|
|
165
|
+
SystemScopeSymbol, SubjectScopeSymbol, // | | | | |
|
|
166
|
+
HTTP_STATUS_OK, // | | | | |
|
|
167
|
+
HTTP_STATUS_CREATED, // | | | | |
|
|
168
|
+
HTTP_STATUS_NO_CONTENT, // | | | | |
|
|
169
|
+
HTTP_STATUS_BAD_REQUEST, // | | | | |
|
|
170
|
+
HTTP_STATUS_UNAUTHORIZED, // | | | | |
|
|
171
|
+
HTTP_STATUS_UNPROCESSABLE_ENTITY, // | | | | |
|
|
172
|
+
AnzuApiResponseCodeError, // | | | | |
|
|
173
|
+
AnzuApiValidationError, // | | | | |
|
|
174
|
+
AnzuFatalError, // | | | | |
|
|
175
|
+
createCommonAdmin, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type UrlParams } from '../../services/api/apiHelper';
|
|
2
|
+
import type { AxiosInstance, AxiosRequestConfig, Method } from 'axios';
|
|
3
|
+
/**
|
|
4
|
+
* @template T Type used for request payload, by default same as Response type
|
|
5
|
+
* @template R Response type override, optional
|
|
6
|
+
*/
|
|
7
|
+
export declare const apiAnyRequest: <T, R = T>(client: () => AxiosInstance, method: Method, urlTemplate: string | undefined, urlParams: UrlParams | undefined, object: T | null | undefined, system: string, entity: string, options?: AxiosRequestConfig) => Promise<R>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type UrlParams } from '../../services/api/apiHelper';
|
|
2
|
+
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
3
|
+
/**
|
|
4
|
+
* @template T Type used for request payload, by default same as Response type
|
|
5
|
+
* @template R Response type override, optional
|
|
6
|
+
*/
|
|
7
|
+
export declare const apiCreateOne: <T, R = T>(client: () => AxiosInstance, object: T | Record<string, never> | undefined, urlTemplate: string, urlParams: UrlParams | undefined, system: string, entity: string, options?: AxiosRequestConfig) => Promise<R>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type UrlParams } from '../../services/api/apiHelper';
|
|
2
|
+
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
3
|
+
/**
|
|
4
|
+
* @template T Type used for request payload, by default same as Response type
|
|
5
|
+
* @template R Response type override, optional
|
|
6
|
+
*/
|
|
7
|
+
export declare const apiDeleteOne: <T, R = T>(client: () => AxiosInstance, urlTemplate: string, urlParams: UrlParams | undefined, system: string, entity: string, options?: AxiosRequestConfig) => Promise<R>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type UrlParams } from '../../services/api/apiHelper';
|
|
2
|
+
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
3
|
+
export declare const apiFetchByIds: <T, R = T>(client: () => AxiosInstance, ids: string[] | number[], urlTemplate: string, urlParams: UrlParams | undefined, system: string, entity: string, options?: AxiosRequestConfig, isSearchApi?: boolean) => Promise<R>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type UrlParams } from '../../services/api/apiHelper';
|
|
2
|
+
import type { FilterBag } from '../../types/Filter';
|
|
3
|
+
import type { Pagination } from '../../types/Pagination';
|
|
4
|
+
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
5
|
+
/**
|
|
6
|
+
* @template T Type used for request payload, by default same as Response type
|
|
7
|
+
* @template R Response type override, optional
|
|
8
|
+
*/
|
|
9
|
+
export declare const apiFetchList: <T, R = T>(client: () => AxiosInstance, urlTemplate: string, urlParams: UrlParams | undefined, pagination: Pagination, filterBag: FilterBag, system: string, entity: string, options?: AxiosRequestConfig) => Promise<R>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type UrlParams } from '../../services/api/apiHelper';
|
|
2
|
+
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
3
|
+
/**
|
|
4
|
+
* @template R Response type
|
|
5
|
+
*/
|
|
6
|
+
export declare const apiFetchOne: <R>(client: () => AxiosInstance, urlTemplate: string, urlParams: UrlParams | undefined, system: string, entity: string, options?: AxiosRequestConfig) => Promise<R>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type UrlParams } from '../../services/api/apiHelper';
|
|
2
|
+
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
3
|
+
/**
|
|
4
|
+
* @template T Type used for request payload, by default same as Response type
|
|
5
|
+
* @template R Response type override, optional
|
|
6
|
+
*/
|
|
7
|
+
export declare const apiUpdateOne: <T, R = T>(client: () => AxiosInstance, object: Record<string, never> | T | undefined, urlTemplate: string, urlParams: UrlParams | undefined, system: string, entity: string, options?: AxiosRequestConfig) => Promise<R>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FilterBag, FilterVariant } from '../../types/Filter';
|
|
2
|
+
/**
|
|
3
|
+
* Docs: /doc/Admin-Cms-Doc/Filters.md
|
|
4
|
+
*/
|
|
5
|
+
export declare function useQueryBuilder(): {
|
|
6
|
+
querySetLimit: (value: number) => void;
|
|
7
|
+
querySetOffset: (page: number, limit: number) => void;
|
|
8
|
+
querySetOrder: (field: string | null, desc: boolean) => void;
|
|
9
|
+
queryAddFilter: (filterVariant: FilterVariant, field: string, value: string | number | boolean) => void;
|
|
10
|
+
querySetFilters: (filterBag: FilterBag) => void;
|
|
11
|
+
queryAdd: (key: string, value: any) => void;
|
|
12
|
+
queryBuild: () => string;
|
|
13
|
+
};
|