@tagsamurai/fats-api-services 1.0.3-alpha.14 → 1.0.3-alpha.16

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.
@@ -95,10 +95,10 @@ const API$K = createAxiosInstance({
95
95
  prefix: "/utility/v2"
96
96
  });
97
97
  const ChangelogServices$1 = {
98
- getActionLog: (params) => {
98
+ getChangelogList: (params) => {
99
99
  return API$K.get("/change-log", { params });
100
100
  },
101
- getActionLogOption: () => {
101
+ getChangelogListOptions: () => {
102
102
  return API$K.get("/change-log/options");
103
103
  },
104
104
  getSessionLogList: (params) => {
@@ -1927,6 +1927,9 @@ const ReaderServices = {
1927
1927
  getIOTCheckManager: () => {
1928
1928
  return API$b.get("/check-manager");
1929
1929
  },
1930
+ updateReader: (id, body) => {
1931
+ return API$b.put(`/${id}`, body);
1932
+ },
1930
1933
  setIOTPortGroup: (id, body) => {
1931
1934
  return API$b.put(`/${id}/set-port-group`, body);
1932
1935
  },
@@ -102,10 +102,10 @@ System.register(["axios"], function(exports, module) {
102
102
  prefix: "/utility/v2"
103
103
  });
104
104
  const ChangelogServices$1 = {
105
- getActionLog: (params) => {
105
+ getChangelogList: (params) => {
106
106
  return API$K.get("/change-log", { params });
107
107
  },
108
- getActionLogOption: () => {
108
+ getChangelogListOptions: () => {
109
109
  return API$K.get("/change-log/options");
110
110
  },
111
111
  getSessionLogList: (params) => {
@@ -1935,6 +1935,9 @@ System.register(["axios"], function(exports, module) {
1935
1935
  getIOTCheckManager: () => {
1936
1936
  return API$b.get("/check-manager");
1937
1937
  },
1938
+ updateReader: (id, body) => {
1939
+ return API$b.put(`/${id}`, body);
1940
+ },
1938
1941
  setIOTPortGroup: (id, body) => {
1939
1942
  return API$b.put(`/${id}/set-port-group`, body);
1940
1943
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/fats-api-services",
3
- "version": "1.0.3-alpha.14",
3
+ "version": "1.0.3-alpha.16",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Fixed Asset Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -3,7 +3,7 @@ import { FetchListResponse, FetchResponse } from '../types/fetchResponse.type';
3
3
  import { SessionLog, SystemLog } from '../types/log.type';
4
4
  import { Option } from '../types/options.type';
5
5
  import { BaseFilterQueryParams } from './settingsAssetName.dto';
6
- export type ActionLogParams = BaseFilterQueryParams & {
6
+ export type GetChangeLogListQueryParams = BaseFilterQueryParams & {
7
7
  object?: string[];
8
8
  createdAt?: string[];
9
9
  action?: string[];
@@ -14,7 +14,7 @@ export type ActionLogParams = BaseFilterQueryParams & {
14
14
  objectId?: string[];
15
15
  userId?: string[];
16
16
  };
17
- export type ActionLogFilterParams = Partial<Record<keyof ActionLogParams, string>>;
17
+ export type ActionLogFilterParams = Partial<Record<keyof GetChangeLogListQueryParams, string>>;
18
18
  export type ActionLogOptionFilter = {
19
19
  actionOptions?: Option[];
20
20
  fieldOptions?: Option[];
@@ -37,3 +37,6 @@ export interface SetGroupIOTBody {
37
37
  reader: string[];
38
38
  group: string;
39
39
  }
40
+ export interface UpdateReaderBody {
41
+ status: 'Damaged' | 'Repaired' | 'Missing' | 'Found' | 'Available';
42
+ }
@@ -1,7 +1,7 @@
1
1
  import { AxiosResponse } from 'axios';
2
2
  import { FetchDetailResponse, FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
3
- import { ActionLogParams, GetSessionLogListResponse, GetUserSystemLogListResponse, GetUserSystemLogOptionsResponse, SessionLogFetchParams, SessionOptionsQueryParams, SystemLogFetchParams, SystemLogLoadingFilters } from '../dto/log.dto';
4
- import { ActionLogType, ChangelogListOptions } from '../types/log.type';
3
+ import { GetChangeLogListQueryParams, GetSessionLogListResponse, GetUserSystemLogListResponse, GetUserSystemLogOptionsResponse, SessionLogFetchParams, SessionOptionsQueryParams, SystemLogFetchParams, SystemLogLoadingFilters } from '../dto/log.dto';
4
+ import { ChangelogList, ChangelogListOptions } from '../types/log.type';
5
5
  import { GetUserLogAssignmentOptionsResponse, GetUserLogBorrowingOptionsResponse, UserLogAssignmentFetchParams, UserLogAssignmentLoadingFilters, UserLogBorrowingFetchParams, UserLogBorrowingLoadingFilters } from '../dto/user.dto';
6
6
  import { UserLogAssignment, UserLogBorrowing } from '../types/userLog.type';
7
7
  import { TransactionLogFilterParams } from '../dto/transactionLog.dto';
@@ -9,8 +9,8 @@ import { BasicAssetTransactionLogOptionBoolean, BasicAssetTransactionLogOptionFi
9
9
  import { TransactionDataType } from '../types/assetDetail.type';
10
10
  import { FetchOptionFn } from '@fewangsit/wangsvue-fats/components/filtercontainer/FilterContainer.vue';
11
11
  declare const ChangelogServices: {
12
- getActionLog: (params?: ActionLogParams) => Promise<AxiosResponse<FetchListResponse<ActionLogType>>>;
13
- getActionLogOption: () => Promise<AxiosResponse<FetchDetailResponse<ChangelogListOptions>>>;
12
+ getChangelogList: (params?: GetChangeLogListQueryParams) => Promise<AxiosResponse<FetchListResponse<ChangelogList>>>;
13
+ getChangelogListOptions: () => Promise<AxiosResponse<FetchDetailResponse<ChangelogListOptions>>>;
14
14
  getSessionLogList: (params: SessionLogFetchParams) => Promise<AxiosResponse<GetSessionLogListResponse>>;
15
15
  getSessionLogListOptions: <T = SessionOptionsQueryParams>(params: T) => FetchOptionFn<T>;
16
16
  getTransactionLog: (params?: TransactionLogFilterParams) => Promise<AxiosResponse<FetchListResponse<TransactionDataType>>>;
@@ -1,7 +1,7 @@
1
1
  import { AxiosResponse } from 'axios';
2
- import { ChangeLogOptionParams, ChangeLogParams, IOTCheckManager, IOTDetail, IOTPortList, IOTReaderList, IOTReaderListOptions } from '../types/reader.type';
2
+ import { ChangeLogOptionParams, ChangeLogParams, IOTCheckManager, IOTDetail, IOTPortList, IOTReaderList, IOTReaderListOptions, UpdateReader } from '../types/reader.type';
3
3
  import { FetchDetailResponse, FetchListResponse, FetchResponse } from '../types/fetchResponse.type';
4
- import { GetIOTPortListQueryParams, GetIOTReaderListOptionsQueryParams, GetIOTReaderListQueryParams, SetGroupIOTBody, SetIOTAliasNameBody, SetIOTPortGroupBody } from '../dto/reader.dto';
4
+ import { GetIOTPortListQueryParams, GetIOTReaderListOptionsQueryParams, GetIOTReaderListQueryParams, SetGroupIOTBody, SetIOTAliasNameBody, SetIOTPortGroupBody, UpdateReaderBody } from '../dto/reader.dto';
5
5
  declare const ReaderServices: {
6
6
  getIOTReaderList: (params: GetIOTReaderListQueryParams) => Promise<AxiosResponse<FetchListResponse<IOTReaderList>>>;
7
7
  getIOTReaderListOptions: (params: GetIOTReaderListOptionsQueryParams) => Promise<AxiosResponse<FetchDetailResponse<IOTReaderListOptions>>>;
@@ -15,6 +15,7 @@ declare const ReaderServices: {
15
15
  getIOTPortList: (id: string, params?: GetIOTPortListQueryParams) => Promise<AxiosResponse<FetchListResponse<IOTPortList>>>;
16
16
  getIOTDetail: (id: string) => Promise<AxiosResponse<FetchDetailResponse<IOTDetail>>>;
17
17
  getIOTCheckManager: () => Promise<AxiosResponse<FetchDetailResponse<IOTCheckManager>>>;
18
+ updateReader: (id: string, body: UpdateReaderBody) => Promise<AxiosResponse<FetchDetailResponse<UpdateReader>>>;
18
19
  setIOTPortGroup: (id: string, body: SetIOTPortGroupBody) => Promise<AxiosResponse<FetchResponse>>;
19
20
  setGroupIOT: (body: SetGroupIOTBody) => Promise<AxiosResponse<FetchResponse>>;
20
21
  getDataById: (id: string) => Promise<AxiosResponse>;
@@ -1,6 +1,6 @@
1
1
  import { Ref } from 'vue';
2
2
  import { Option } from './options.type';
3
- export type ActionLogType = {
3
+ export type ChangelogList = {
4
4
  _id: string;
5
5
  action: string;
6
6
  field: string;
@@ -116,4 +116,13 @@ export interface IOTDetail {
116
116
  networkStatus: "Online" | "Offline";
117
117
  assetControl: AssetControl;
118
118
  }
119
+ export interface UpdateReader {
120
+ name: BaseEntity & {
121
+ nameWithSequence: string;
122
+ };
123
+ group: BaseEntity;
124
+ _id: string;
125
+ serialNumber: string;
126
+ status: string;
127
+ }
119
128
  export {};