@anzusystems/common-admin 0.0.4 → 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.
Files changed (68) hide show
  1. package/dist/common-admin.es.js +14210 -4784
  2. package/dist/common-admin.es.js.map +1 -0
  3. package/dist/common-admin.umd.js +22 -27
  4. package/dist/common-admin.umd.js.map +1 -0
  5. package/dist/components/ABooleanValue.vue.d.ts +3 -7
  6. package/dist/components/ACard.vue.d.ts +49 -0
  7. package/dist/components/ADatatable.vue.d.ts +110 -0
  8. package/dist/components/ADatatableColumn.vue.d.ts +66 -0
  9. package/dist/components/ADatatablePagination.vue.d.ts +60 -0
  10. package/dist/components/ADatetime.vue.d.ts +27 -0
  11. package/dist/components/ADatetimePicker.vue.d.ts +2520 -0
  12. package/dist/components/buttons/filter/AFilterAdvancedButton.vue.d.ts +34 -0
  13. package/dist/components/buttons/filter/AFilterResetButton.vue.d.ts +43 -0
  14. package/dist/components/buttons/filter/AFilterSubmitButton.vue.d.ts +44 -0
  15. package/dist/components/filter/AFilterBooleanGroup.vue.d.ts +24 -0
  16. package/dist/components/filter/AFilterRemoteAutocomplete.vue.d.ts +87 -0
  17. package/dist/components/filter/AFilterString.vue.d.ts +34 -0
  18. package/dist/components/filter/AFilterValueObjectOptionsSelect.vue.d.ts +34 -0
  19. package/dist/components/filter/AFilterWrapper.vue.d.ts +163 -0
  20. package/dist/components/form/ABooleanToggle.vue.d.ts +71 -0
  21. package/dist/components/form/ARemoteAutocomplete.vue.d.ts +233 -0
  22. package/dist/components/form/ASystemEntityScope.vue.d.ts +22 -0
  23. package/dist/components/form/ATextField.vue.d.ts +142 -0
  24. package/dist/components/form/ATextarea.vue.d.ts +131 -0
  25. package/dist/components/form/AValueObjectOptionsSelect.vue.d.ts +137 -0
  26. package/dist/components/injectionKeys.d.ts +3 -0
  27. package/dist/components/permission/{PermissionGrantEditor.vue.d.ts → APermissionGrantEditor.vue.d.ts} +1 -11
  28. package/dist/components/permission/{PermissionValueChip.vue.d.ts → APermissionValueChip.vue.d.ts} +4 -24
  29. package/dist/composables/filter/filterHelpers.d.ts +20 -0
  30. package/dist/composables/statusCodes.d.ts +7 -0
  31. package/dist/composables/system/alerts.d.ts +17 -0
  32. package/dist/composables/system/error.d.ts +25 -0
  33. package/dist/composables/system/pagination.d.ts +14 -0
  34. package/dist/composables/system/tableColumns.d.ts +14 -0
  35. package/dist/create.d.ts +11 -0
  36. package/dist/lib.d.ts +108 -14
  37. package/dist/model/error/AnzuApiResponseCodeError.d.ts +4 -0
  38. package/dist/model/error/AnzuApiValidationError.d.ts +4 -0
  39. package/dist/model/error/AnzuFatalError.d.ts +4 -0
  40. package/dist/model/factory/PermissionConfigFactory.d.ts +4 -0
  41. package/dist/model/factory/PermissionGroupFactory.d.ts +4 -0
  42. package/dist/model/valueObject/Grant.d.ts +2 -6
  43. package/dist/model/valueObject/GrantOrigin.d.ts +2 -6
  44. package/dist/services/api/apiAnyRequest.d.ts +7 -0
  45. package/dist/services/api/apiCreateOne.d.ts +7 -0
  46. package/dist/services/api/apiDeleteOne.d.ts +7 -0
  47. package/dist/services/api/apiFetchByIds.d.ts +3 -0
  48. package/dist/services/api/apiFetchList.d.ts +9 -0
  49. package/dist/services/api/apiFetchOne.d.ts +6 -0
  50. package/dist/services/api/apiHelper.d.ts +4 -0
  51. package/dist/services/api/apiUpdateOne.d.ts +7 -0
  52. package/dist/services/api/queryBuilder.d.ts +13 -0
  53. package/dist/style.css +1 -1
  54. package/dist/types/AnzuUser.d.ts +2 -10
  55. package/dist/types/AnzuUserAndTimeTrackingAware.d.ts +7 -0
  56. package/dist/types/CreatedByAware.d.ts +5 -0
  57. package/dist/types/Filter.d.ts +5 -5
  58. package/dist/types/Permission.d.ts +3 -2
  59. package/dist/types/PermissionConfig.d.ts +30 -0
  60. package/dist/types/PermissionGroup.d.ts +13 -0
  61. package/dist/types/Vuetify.d.ts +1 -0
  62. package/dist/types/common.d.ts +6 -6
  63. package/dist/utils/event.d.ts +1 -0
  64. package/dist/utils/file.d.ts +1 -0
  65. package/dist/utils/response.d.ts +1 -0
  66. package/dist/utils/string.d.ts +12 -0
  67. package/dist/validators/vuelidate/useRequiredIf.d.ts +1 -0
  68. package/package.json +68 -12
@@ -11,30 +11,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
11
11
  };
12
12
  }, {
13
13
  props: any;
14
- getGrantOption: (value: Grant) => {
15
- value: Grant;
16
- title: string;
17
- color?: string | undefined;
18
- active?: false | undefined;
19
- } | undefined;
20
- grantOption: import("vue").ComputedRef<{
21
- value: Grant;
22
- title: string;
23
- color?: string | undefined;
24
- active?: false | undefined;
25
- } | undefined>;
26
- getGrantOriginOption: (value: GrantOrigin) => {
27
- value: GrantOrigin;
28
- title: string;
29
- color?: string | undefined;
30
- active?: false | undefined;
31
- } | undefined;
32
- grantOriginOption: import("vue").ComputedRef<{
33
- value: GrantOrigin;
34
- title: string;
35
- color?: string | undefined;
36
- active?: false | undefined;
37
- } | undefined>;
14
+ getGrantOption: (value: Grant) => import("../../lib").ValueObjectOption<Grant>;
15
+ grantOption: import("vue").ComputedRef<import("../../lib").ValueObjectOption<Grant>>;
16
+ getGrantOriginOption: (value: GrantOrigin) => import("../../lib").ValueObjectOption<GrantOrigin>;
17
+ grantOriginOption: import("vue").ComputedRef<import("../../lib").ValueObjectOption<GrantOrigin>>;
38
18
  readonly GrantOrigin: typeof GrantOrigin;
39
19
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
40
20
  grant: {
@@ -0,0 +1,20 @@
1
+ import type { Filter, FilterBag, FilterVariant } from '../../types/Filter';
2
+ import type { Pagination } from '../../types/Pagination';
3
+ export interface MakeFilterOptions<T = any> {
4
+ name: string;
5
+ variant: FilterVariant;
6
+ titleT?: string;
7
+ default: T | null;
8
+ field: string;
9
+ multiple: boolean;
10
+ mandatory: boolean;
11
+ exclude: boolean;
12
+ }
13
+ export declare function makeFilterHelper<T = any>(system?: string, subject?: string): (options?: Partial<MakeFilterOptions<T>>) => Filter<T>;
14
+ export declare function useFilterHelpers(): {
15
+ clearAllErrors: (filterBag: FilterBag) => void;
16
+ clearAll: (filterBag: FilterBag) => void;
17
+ clearOne: (filter: Filter) => void;
18
+ resetFilter: (filterBag: FilterBag, pagination: Pagination, callback?: any) => void;
19
+ submitFilter: (filterBag: FilterBag, pagination: Pagination, callback: () => any) => void;
20
+ };
@@ -0,0 +1,7 @@
1
+ export declare const HTTP_STATUS_OK = 200;
2
+ export declare const HTTP_STATUS_CREATED = 201;
3
+ export declare const HTTP_STATUS_NO_CONTENT = 204;
4
+ export declare const HTTP_STATUS_BAD_REQUEST = 400;
5
+ export declare const HTTP_STATUS_UNAUTHORIZED = 401;
6
+ export declare const HTTP_STATUS_UNPROCESSABLE_ENTITY = 422;
7
+ export declare const HTTP_STATUS_VALID_ALL: number[];
@@ -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;
@@ -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,28 +1,92 @@
1
1
  import ABooleanValue from './components/ABooleanValue.vue';
2
2
  import ARow from './components/ARow.vue';
3
- import PermissionGrantEditor from './components/permission/PermissionGrantEditor.vue';
4
- import PermissionValueChip from './components/permission/PermissionValueChip.vue';
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 { setValueByPath, deletePropertyByPath, deepFreeze, simpleCloneObject, getValueByPath } from './utils/object';
7
- import { isEmpty, isEmptyObject, isObject, isEmptyArray, isArray, isBoolean, isDocId, isNull, isNotUndefined, isUndefined, isInt, isString, isNumber } from './utils/common';
8
- import { toInt, slugify, toFloat, splitOnFirstOccurrence, trimLength } from './utils/string';
9
- import { currentTimestamp, DATETIME_MAX, DATETIME_MIN, dateTimeEndOfDay, dateTimeStartOfDay, dateTimeNow, friendlyDateTime, newDateNow, prettyDateTime, dateToUtc, modifyMinutesOfDate, yearNow } from './utils/datetime';
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
- import type { IntegerId, DatetimeUTC, DatetimeUTCNullable, DocId, DocIdNullable, IntegerIdNullable } from './types/common';
29
+ import { usePermissionConfigFactory } from './model/factory/PermissionConfigFactory';
30
+ import { usePermissionGroupFactory } from './model/factory/PermissionGroupFactory';
31
+ import type { DatetimeUTC, DatetimeUTCNullable, DocId, DocIdNullable, IntegerId, IntegerIdNullable } from './types/common';
14
32
  import type { Filter, FilterBag, FilterVariant } from './types/Filter';
15
33
  import type { Pagination } from './types/Pagination';
16
34
  import type { OwnerAware } from './types/OwnerAware';
17
35
  import { isOwnerAware } from './types/OwnerAware';
18
- import type { AnzuUserAndTimeTrackingAware, AnzuUserCreatedByAware, AnzuUser } from './types/AnzuUser';
19
- import { isAnzuUserCreatedByAware } from './types/AnzuUser';
36
+ import type { AnzuUser } from './types/AnzuUser';
20
37
  import type { ValueObjectOption } from './types/ValueObject';
38
+ import type { PermissionConfig, PermissionTranslationGroup } from './types/PermissionConfig';
39
+ import { type AnzuUserAndTimeTrackingAware } from './types/AnzuUserAndTimeTrackingAware';
40
+ import type { PermissionGroup, PermissionGroupMinimal } from './types/PermissionGroup';
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';
21
64
  export { // | | | | |
65
+ ACard, // | | | | |
22
66
  ARow, // | | | | |
23
67
  ABooleanValue, // | | | | |
24
- PermissionGrantEditor, // | | | | |
25
- PermissionValueChip, // | | | | |
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, // | | | | |
26
90
  Grant, useGrant, // | | | | |
27
91
  GrantOrigin, useGrantOrigin, // | | | | |
28
92
  IntegerId, // | | | | |
@@ -32,17 +96,25 @@ DocIdNullable, // | | | | |
32
96
  DatetimeUTCNullable, // | | | | |
33
97
  DatetimeUTC, // | | | | |
34
98
  AnzuUser, // | | | | |
35
- AnzuUserCreatedByAware, // | | | | |
36
99
  AnzuUserAndTimeTrackingAware, // | | | | |
37
- isAnzuUserCreatedByAware, // | | | | |
38
100
  ValueObjectOption, // | | | | |
39
101
  Pagination, // | | | | |
40
102
  OwnerAware, // | | | | |
41
103
  isOwnerAware, // | | | | |
104
+ CreatedByAware, // | | | | |
105
+ isCreatedByAware, // | | | | |
42
106
  Filter, // | | | | |
43
107
  FilterBag, // | | | | |
44
108
  FilterVariant, // | | | | |
109
+ PermissionConfig, // | | | | |
110
+ PermissionTranslationGroup, // | | | | |
111
+ PermissionGroup, // | | | | |
112
+ PermissionGroupMinimal, // | | | | |
113
+ VuetifyIconValue, // | | | | |
114
+ MakeFilterOptions, // | | | | |
45
115
  useAnzuUserFactory, // | | | | |
116
+ usePermissionConfigFactory, // | | | | |
117
+ usePermissionGroupFactory, // | | | | |
46
118
  isEmpty, // | | | | |
47
119
  isEmptyObject, // | | | | |
48
120
  isObject, // | | | | |
@@ -66,6 +138,7 @@ slugify, // | | | | |
66
138
  toFloat, // | | | | |
67
139
  splitOnFirstOccurrence, // | | | | |
68
140
  trimLength, // | | | | |
141
+ normalizeForSlotName, // | | | | |
69
142
  currentTimestamp, // | | | | |
70
143
  DATETIME_MAX, // | | | | |
71
144
  DATETIME_MIN, // | | | | |
@@ -78,4 +151,25 @@ prettyDateTime, // | | | | |
78
151
  dateToUtc, // | | | | |
79
152
  modifyMinutesOfDate, // | | | | |
80
153
  yearNow, // | | | | |
81
- commonMessages };
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,4 @@
1
+ export declare class AnzuApiResponseCodeError extends Error {
2
+ private date;
3
+ constructor();
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare class AnzuApiValidationError extends Error {
2
+ private date;
3
+ constructor();
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare class AnzuFatalError extends Error {
2
+ private date;
3
+ constructor(message?: string);
4
+ }
@@ -0,0 +1,4 @@
1
+ import { PermissionConfig } from '../../types/PermissionConfig';
2
+ export declare function usePermissionConfigFactory(): {
3
+ createPermissionConfig: () => PermissionConfig;
4
+ };
@@ -0,0 +1,4 @@
1
+ import { PermissionGroup } from '../../types/PermissionGroup';
2
+ export declare function usePermissionGroupFactory(): {
3
+ createPermissionGroup: () => PermissionGroup;
4
+ };
@@ -1,3 +1,4 @@
1
+ import type { ValueObjectOption } from '../../types/ValueObject';
1
2
  export declare enum Grant {
2
3
  Deny = 0,
3
4
  AllowOwner = 1,
@@ -11,10 +12,5 @@ export declare function useGrant(): {
11
12
  color?: string | undefined;
12
13
  active?: false | undefined;
13
14
  }[]>;
14
- getGrantOption: (value: Grant) => {
15
- value: Grant;
16
- title: string;
17
- color?: string | undefined;
18
- active?: false | undefined;
19
- } | undefined;
15
+ getGrantOption: (value: Grant) => ValueObjectOption<Grant>;
20
16
  };
@@ -1,3 +1,4 @@
1
+ import type { ValueObjectOption } from '../../types/ValueObject';
1
2
  export declare enum GrantOrigin {
2
3
  Role = "role",
3
4
  Group = "group",
@@ -12,10 +13,5 @@ export declare function useGrantOrigin(): {
12
13
  color?: string | undefined;
13
14
  active?: false | undefined;
14
15
  }[]>;
15
- getGrantOriginOption: (value: GrantOrigin) => {
16
- value: GrantOrigin;
17
- title: string;
18
- color?: string | undefined;
19
- active?: false | undefined;
20
- } | undefined;
16
+ getGrantOriginOption: (value: GrantOrigin) => ValueObjectOption<GrantOrigin>;
21
17
  };
@@ -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,4 @@
1
+ export type UrlParams = {
2
+ [key: string]: number | string;
3
+ };
4
+ export declare const replaceUrlParameters: (urlTemplate: string, urlParams: UrlParams, overrideUrlTemplate?: string) => string;
@@ -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
+ };