@tagsamurai/fats-api-services 2.0.0-alpha.3 → 2.0.0-alpha.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/fats-api-services",
3
- "version": "2.0.0-alpha.3",
3
+ "version": "2.0.0-alpha.4",
4
4
  "type": "module",
5
5
  "author": "Tagsamurai",
6
6
  "description": "Fixed Asset Tagsamurai API Services",
@@ -1,3 +1,5 @@
1
+ import { ChangelogType } from '../types/changelog.type';
2
+ import { FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
1
3
  import { TableParams } from './dataTable.dto';
2
4
  export interface ChangelogFilterQuery extends TableParams {
3
5
  objects?: string[];
@@ -20,3 +22,27 @@ export interface SessionFilterQuery extends TableParams {
20
22
  position?: string[];
21
23
  user?: string[];
22
24
  }
25
+ export type ChangelogOptionFilter = {
26
+ actionOptions?: boolean;
27
+ modifiedByOptions?: boolean;
28
+ fieldOptions?: boolean;
29
+ objectNameOptions?: boolean;
30
+ objectOptions?: boolean;
31
+ };
32
+ export interface ChangelogOptionQuery extends ChangelogOptionFilter {
33
+ module?: string;
34
+ objects?: string[];
35
+ objectId?: string;
36
+ userId?: string;
37
+ activityLog?: boolean;
38
+ }
39
+ export type ChangelogOptionResponse = FetchOptionResponse<ChangelogOptionFilter>;
40
+ export type ChangelogResponse = FetchListResponse<ChangelogType>;
41
+ export type SessionOptionFilter = {
42
+ userOptions?: boolean;
43
+ positionOptions?: boolean;
44
+ statusOptions?: boolean;
45
+ };
46
+ export interface SessionOptionQuery extends SessionOptionFilter {
47
+ userId?: string;
48
+ }
@@ -0,0 +1,11 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { SessionType } from '../types/changelog.type';
3
+ import { FetchListResponse, FetchOptionResponse, FilterQuery } from '../types/fetchResponse.type';
4
+ import { ChangelogFilterQuery, ChangelogOptionQuery, ChangelogOptionResponse, ChangelogResponse, SessionFilterQuery, SessionOptionFilter, SessionOptionQuery } from '../dto/changelog.dto';
5
+ declare const ChangelogServices: {
6
+ getChangelogs: (params?: FilterQuery<ChangelogFilterQuery>) => Promise<AxiosResponse<ChangelogResponse>>;
7
+ getChangelogOptions: (body?: ChangelogOptionQuery) => Promise<AxiosResponse<ChangelogOptionResponse>>;
8
+ getSessionList: (params?: FilterQuery<SessionFilterQuery>) => Promise<AxiosResponse<FetchListResponse<SessionType>>>;
9
+ getSessionOptions: (body?: SessionOptionQuery) => Promise<AxiosResponse<FetchOptionResponse<SessionOptionFilter>>>;
10
+ };
11
+ export default ChangelogServices;
@@ -1,3 +1,4 @@
1
+ import { Option } from './options.type';
1
2
  export interface FetchListResponse<T> {
2
3
  status: number;
3
4
  message: string;
@@ -11,4 +12,9 @@ export interface FetchDetailResponse<T> {
11
12
  message: string;
12
13
  data: T;
13
14
  }
15
+ export type FilterOptions<Opt = Record<string, boolean>> = Record<keyof Opt, Option[]>;
16
+ export type FetchOptionResponse<Opt = Record<string, boolean>> = {
17
+ message: string;
18
+ data: FilterOptions<Opt>;
19
+ };
14
20
  export type FilterQuery<T = Record<string, any>> = Partial<Record<keyof T, string>>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Builds body parameters by processing and parsing JSON values if valid.
3
+ *
4
+ * @param params - Optional filter parameters for asset data
5
+ * @returns An object containing processed parameters where JSON strings are parsed into objects
6
+ */
7
+ export declare const buildBodyParams: (params?: Record<string, unknown>) => Record<string, unknown>;