@anzusystems/common-admin 0.0.5 → 0.0.7

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 (62) hide show
  1. package/dist/common-admin.es.js +14713 -5098
  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/job/JobStatusChip.vue.d.ts +17 -0
  28. package/dist/components/permission/{PermissionGrantEditor.vue.d.ts → APermissionGrantEditor.vue.d.ts} +0 -0
  29. package/dist/components/permission/{PermissionValueChip.vue.d.ts → APermissionValueChip.vue.d.ts} +0 -0
  30. package/dist/composables/filter/filterHelpers.d.ts +20 -0
  31. package/dist/composables/statusCodes.d.ts +7 -0
  32. package/dist/composables/system/alerts.d.ts +17 -0
  33. package/dist/composables/system/error.d.ts +25 -0
  34. package/dist/composables/system/pagination.d.ts +14 -0
  35. package/dist/composables/system/tableColumns.d.ts +14 -0
  36. package/dist/create.d.ts +11 -0
  37. package/dist/lib.d.ts +106 -10
  38. package/dist/model/error/AnzuApiResponseCodeError.d.ts +4 -0
  39. package/dist/model/error/AnzuApiValidationError.d.ts +4 -0
  40. package/dist/model/error/AnzuFatalError.d.ts +4 -0
  41. package/dist/model/valueObject/JobResource.d.ts +11 -0
  42. package/dist/model/valueObject/JobStatus.d.ts +18 -0
  43. package/dist/services/api/apiAnyRequest.d.ts +7 -0
  44. package/dist/services/api/apiCreateOne.d.ts +7 -0
  45. package/dist/services/api/apiDeleteOne.d.ts +7 -0
  46. package/dist/services/api/apiFetchByIds.d.ts +3 -0
  47. package/dist/services/api/apiFetchList.d.ts +9 -0
  48. package/dist/services/api/apiFetchOne.d.ts +6 -0
  49. package/dist/services/api/apiHelper.d.ts +4 -0
  50. package/dist/services/api/apiUpdateOne.d.ts +7 -0
  51. package/dist/services/api/job/jobApi.d.ts +11 -0
  52. package/dist/services/api/queryBuilder.d.ts +13 -0
  53. package/dist/style.css +1 -1
  54. package/dist/types/Filter.d.ts +4 -4
  55. package/dist/types/Job.d.ts +16 -0
  56. package/dist/types/Vuetify.d.ts +1 -0
  57. package/dist/utils/event.d.ts +1 -0
  58. package/dist/utils/file.d.ts +1 -0
  59. package/dist/utils/response.d.ts +1 -0
  60. package/dist/utils/string.d.ts +15 -0
  61. package/dist/validators/vuelidate/useRequiredIf.d.ts +1 -0
  62. package/package.json +60 -15
@@ -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,18 +1,35 @@
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';
21
+ import JobStatusChip from './components/job/JobStatusChip.vue';
5
22
  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';
23
+ import { deepFreeze, deletePropertyByPath, getValueByPath, setValueByPath, simpleCloneObject } from './utils/object';
24
+ import { isArray, isBoolean, isDocId, isEmpty, isEmptyArray, isEmptyObject, isInt, isNotUndefined, isNull, isNumber, isObject, isString, isUndefined } from './utils/common';
25
+ import { normalizeForSlotName, slugify, splitOnFirstOccurrence, toFloat, toInt, toKebabCase, trimLength } from './utils/string';
26
+ import { currentTimestamp, DATETIME_MAX, DATETIME_MIN, dateTimeEndOfDay, dateTimeNow, dateTimeStartOfDay, dateToUtc, friendlyDateTime, modifyMinutesOfDate, newDateNow, prettyDateTime, yearNow } from './utils/datetime';
10
27
  import { Grant, useGrant } from './model/valueObject/Grant';
11
28
  import { GrantOrigin, useGrantOrigin } from './model/valueObject/GrantOrigin';
12
29
  import { useAnzuUserFactory } from './model/factory/AnzuUserFactory';
13
30
  import { usePermissionConfigFactory } from './model/factory/PermissionConfigFactory';
14
31
  import { usePermissionGroupFactory } from './model/factory/PermissionGroupFactory';
15
- import type { IntegerId, DatetimeUTC, DatetimeUTCNullable, DocId, DocIdNullable, IntegerIdNullable } from './types/common';
32
+ import type { DatetimeUTC, DatetimeUTCNullable, DocId, DocIdNullable, IntegerId, IntegerIdNullable } from './types/common';
16
33
  import type { Filter, FilterBag, FilterVariant } from './types/Filter';
17
34
  import type { Pagination } from './types/Pagination';
18
35
  import type { OwnerAware } from './types/OwnerAware';
@@ -23,11 +40,59 @@ import type { PermissionConfig, PermissionTranslationGroup } from './types/Permi
23
40
  import { type AnzuUserAndTimeTrackingAware } from './types/AnzuUserAndTimeTrackingAware';
24
41
  import type { PermissionGroup, PermissionGroupMinimal } from './types/PermissionGroup';
25
42
  import { type CreatedByAware, isCreatedByAware } from './types/CreatedByAware';
43
+ import type { VuetifyIconValue } from './types/Vuetify';
44
+ import { usePagination, usePaginationAutoHide } from './composables/system/pagination';
45
+ import { makeFilterHelper, type MakeFilterOptions, useFilterHelpers } from './composables/filter/filterHelpers';
46
+ import { SubjectScopeSymbol, SystemScopeSymbol } from './components/injectionKeys';
47
+ import { prettyBytes } from './utils/file';
48
+ import { isValidHTTPStatus } from './utils/response';
49
+ 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';
50
+ import { AnzuApiResponseCodeError } from './model/error/AnzuApiResponseCodeError';
51
+ import { AnzuApiValidationError } from './model/error/AnzuApiValidationError';
52
+ import { AnzuFatalError } from './model/error/AnzuFatalError';
53
+ import { apiAnyRequest } from './services/api/apiAnyRequest';
54
+ import { apiCreateOne } from './services/api/apiCreateOne';
55
+ import { apiDeleteOne } from './services/api/apiDeleteOne';
56
+ import { apiFetchByIds } from './services/api/apiFetchByIds';
57
+ import { apiFetchList } from './services/api/apiFetchList';
58
+ import { apiFetchOne } from './services/api/apiFetchOne';
59
+ import { apiUpdateOne } from './services/api/apiUpdateOne';
60
+ import { useQueryBuilder } from './services/api/queryBuilder';
61
+ import { useAlerts } from './composables/system/alerts';
62
+ import { useErrorHandler } from './composables/system/error';
63
+ import { useTableColumns } from './composables/system/tableColumns';
64
+ import { createCommonAdmin } from './create';
65
+ import { JobStatus, useJobStatus } from './model/valueObject/JobStatus';
66
+ import type { Job } from './types/Job';
67
+ import { useJobApi } from './services/api/job/jobApi';
68
+ import { type JobResource, useJobResource } from './model/valueObject/JobResource';
26
69
  export { // | | | | |
70
+ ACard, // | | | | |
27
71
  ARow, // | | | | |
28
72
  ABooleanValue, // | | | | |
29
- PermissionGrantEditor, // | | | | |
30
- PermissionValueChip, // | | | | |
73
+ APermissionGrantEditor, // | | | | |
74
+ APermissionValueChip, // | | | | |
75
+ ASystemEntityScope, // | | | | |
76
+ ATextField, // | | | | |
77
+ ATextarea, // | | | | |
78
+ ADatetimePicker, // | | | | |
79
+ ARemoteAutocomplete, // | | | | |
80
+ AValueObjectOptionsSelect, // | | | | |
81
+ ABooleanToggle, // | | | | |
82
+ AFilterWrapper, // | | | | |
83
+ AFilterString, // | | | | |
84
+ AFilterRemoteAutocomplete, // | | | | |
85
+ AFilterValueObjectOptionsSelect, // | | | | |
86
+ AFilterBooleanGroup, // | | | | |
87
+ ADatetime, // | | | | |
88
+ ADatatable, // | | | | |
89
+ ADatatablePagination, // | | | | |
90
+ JobStatusChip, // | | | | |
91
+ usePagination, usePaginationAutoHide, // | | | | |
92
+ makeFilterHelper, useFilterHelpers, // | | | | |
93
+ useAlerts, // | | | | |
94
+ useErrorHandler, // | | | | |
95
+ useTableColumns, // | | | | |
31
96
  Grant, useGrant, // | | | | |
32
97
  GrantOrigin, useGrantOrigin, // | | | | |
33
98
  IntegerId, // | | | | |
@@ -51,6 +116,11 @@ PermissionConfig, // | | | | |
51
116
  PermissionTranslationGroup, // | | | | |
52
117
  PermissionGroup, // | | | | |
53
118
  PermissionGroupMinimal, // | | | | |
119
+ VuetifyIconValue, // | | | | |
120
+ MakeFilterOptions, // | | | | |
121
+ Job, // | | | | |
122
+ JobStatus, // | | | | |
123
+ JobResource, // | | | | |
54
124
  useAnzuUserFactory, // | | | | |
55
125
  usePermissionConfigFactory, // | | | | |
56
126
  usePermissionGroupFactory, // | | | | |
@@ -77,6 +147,8 @@ slugify, // | | | | |
77
147
  toFloat, // | | | | |
78
148
  splitOnFirstOccurrence, // | | | | |
79
149
  trimLength, // | | | | |
150
+ normalizeForSlotName, // | | | | |
151
+ toKebabCase, // | | | | |
80
152
  currentTimestamp, // | | | | |
81
153
  DATETIME_MAX, // | | | | |
82
154
  DATETIME_MIN, // | | | | |
@@ -89,4 +161,28 @@ prettyDateTime, // | | | | |
89
161
  dateToUtc, // | | | | |
90
162
  modifyMinutesOfDate, // | | | | |
91
163
  yearNow, // | | | | |
92
- commonMessages };
164
+ prettyBytes, // | | | | |
165
+ isValidHTTPStatus, // | | | | |
166
+ apiAnyRequest, // | | | | |
167
+ apiCreateOne, // | | | | |
168
+ apiDeleteOne, // | | | | |
169
+ apiFetchByIds, // | | | | |
170
+ apiFetchList, // | | | | |
171
+ apiFetchOne, // | | | | |
172
+ apiUpdateOne, // | | | | |
173
+ useQueryBuilder, // | | | | |
174
+ useJobApi, // | | | | |
175
+ useJobResource, // | | | | |
176
+ useJobStatus, // | | | | |
177
+ commonMessages, // | | | | |
178
+ SystemScopeSymbol, SubjectScopeSymbol, // | | | | |
179
+ HTTP_STATUS_OK, // | | | | |
180
+ HTTP_STATUS_CREATED, // | | | | |
181
+ HTTP_STATUS_NO_CONTENT, // | | | | |
182
+ HTTP_STATUS_BAD_REQUEST, // | | | | |
183
+ HTTP_STATUS_UNAUTHORIZED, // | | | | |
184
+ HTTP_STATUS_UNPROCESSABLE_ENTITY, // | | | | |
185
+ AnzuApiResponseCodeError, // | | | | |
186
+ AnzuApiValidationError, // | | | | |
187
+ AnzuFatalError, // | | | | |
188
+ 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,11 @@
1
+ import type { ValueObjectOption } from '../../types/ValueObject';
2
+ export type JobResource = 'jobUserDataDelete' | `job${string}`;
3
+ export declare function useJobResource<T extends JobResource = JobResource>(customJobs?: ValueObjectOption<T>[]): {
4
+ jobResourceOptions: import("vue").Ref<{
5
+ value: import("vue").UnwrapRef<T>;
6
+ title: string;
7
+ color?: string | undefined;
8
+ active?: false | undefined;
9
+ }[]>;
10
+ getJobResourceOption: (value: T) => ValueObjectOption<T>;
11
+ };
@@ -0,0 +1,18 @@
1
+ import type { ValueObjectOption } from '../../types/ValueObject';
2
+ export declare enum JobStatus {
3
+ Waiting = "waiting",
4
+ Processing = "processing",
5
+ AwaitingBatchProcess = "awaiting_batch_process",
6
+ Done = "done",
7
+ Error = "error",
8
+ Default = "waiting"
9
+ }
10
+ export declare function useJobStatus(): {
11
+ jobStatusOptions: import("vue").Ref<{
12
+ value: JobStatus;
13
+ title: string;
14
+ color?: string | undefined;
15
+ active?: false | undefined;
16
+ }[]>;
17
+ getJobStatusOption: (value: JobStatus) => ValueObjectOption<JobStatus>;
18
+ };
@@ -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,11 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { Pagination } from '../../../types/Pagination';
3
+ import { FilterBag } from '../../../types/Filter';
4
+ import { Job } from '../../../types/Job';
5
+ export declare const ENTITY = "job";
6
+ export declare function useJobApi<JobType extends Job = Job>(client: () => AxiosInstance, system: string): {
7
+ fetchJobList: (pagination: Pagination, filterBag: FilterBag) => Promise<JobType[]>;
8
+ fetchJob: (id: number) => Promise<JobType>;
9
+ createJob: (data: JobType) => Promise<JobType>;
10
+ deleteJob: (id: number) => Promise<JobType>;
11
+ };
@@ -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
+ };