@tagsamurai/fats-api-services 1.0.0-alpha.12 → 1.0.0-alpha.14

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.
@@ -29,9 +29,9 @@ const f = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
29
29
  prefix: "/settings-attribute/v2",
30
30
  env: "APP_TAGSAMURAI_API"
31
31
  }), y = {
32
- getGroupCategory: (t) => {
33
- const e = t === "category" ? t : "groups";
34
- return o.get(`/${e}/tree`);
32
+ getGroupCategory: (t, e) => {
33
+ const r = t === "category" ? t : "groups";
34
+ return o.get(`/${r}/tree`, { params: e });
35
35
  },
36
36
  getGroupCategoryList: (t, e) => {
37
37
  const r = t === "category" ? t : "groups";
@@ -1 +1 @@
1
- System.register(["axios"],function(n,y){"use strict";var p;return{setters:[u=>{p=u.default}],execute:function(){const u={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_ADMIN_API:"https://dev-admin-api.tagsamurai.com",VITE_APP_API:"https://dev-api.tagsamurai.com",VITE_APP_COUNTRY_STATE_API:"https://api.countrystatecity.in",VITE_APP_COUNTRY_STATE_API_KEY:"ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==",VITE_APP_LOGS_NOTIFICATION_API:"https://dev-api-logs-notification.tagsamurai.com",VITE_APP_TAGSAMURAI_API:"https://dev-api.tagsamurai.com"},l=n("getBaseURL",(t="APP_API")=>u["VITE_"+t]),o=(t={},e=!1)=>{const{env:r="APP_API",prefix:a="",headers:I={},...$}=t,m=`${l(r)}${a}`,S=JSON.parse(localStorage.getItem("user")??"{}"),L=S.jwt??S.token??"";return p.create({...$,baseURL:m,headers:e?I:{"Content-Type":"application/json",Authorization:`Bearer ${L}`,...I}})},O=n("queryParamsStringfy",t=>{if(!t||typeof t=="string")return;const e={};return Object.keys(t).forEach(r=>{Array.isArray(t[r])?t[r].length>0&&Object.assign(e,{[r]:JSON.stringify(t[r])}):t[r]!==void 0&&Object.assign(e,{[r]:t[r]})}),e}),U=n("getImageURL",t=>{if(!t)return;const e=l("APP_TAGSAMURAI_API");return t.startsWith("http")?t:`${e}/file-manager/v2/files/${t}`}),i=o({prefix:"/settings-attribute/v2",env:"APP_TAGSAMURAI_API"}),h=n("GroupCategoryServices",{getGroupCategory:t=>{const e=t==="category"?t:"groups";return i.get(`/${e}/tree`)},getGroupCategoryList:(t,e)=>{const r=t==="category"?t:"groups";return i.get(`/${r}/${e}`)},getNames:t=>{const e=t==="category"?t:"groups";return i.get(`/${e}/names`)},postCreateGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return i.post(`/${r}`,e)},putEditGroupCategory:(t,e,r)=>{const a=t==="category"?t:"groups";return i.put(`/${a}/${r}`,e)},putMoveGroup:(t,e)=>i.put(`/groups/${e}/move-group`,t),putEditBulkGroups:async t=>i.put("/bulk",t),deleteGroupCategory:(t,e,r)=>{const a=t==="category"?t:"groups";return i.delete(`/${a}/${r}`,{data:e})}}),v=o({prefix:"/v2",env:"APP_LOGS_NOTIFICATION_API"}),N=n("NotificationApprovalServices",{getTotalApprovals:()=>v.get("/approval/count")}),g=o({prefix:"/v2",env:"APP_LOGS_NOTIFICATION_API"}),C=n("ChangelogServices",{getActionLog:t=>g.get("/change-log",{params:t}),getActionLogOption:t=>g.get("/change-log/options",{params:t}),getSessionLogList:t=>g.get("/session-log",{params:t}),getUserDetailSystemLogList:t=>g.get("/change-log",{params:t}),getUserDetailSystemLogOption:t=>g.get("/change-log/options",{params:t})}),_=o({prefix:"/assets/v2/assets"}),D=n("AssetServices",{getScanTag:t=>_.get("/scan",{params:{tag:t}})}),f=o({prefix:"/tracking/v2/missing"}),R=n("MissingServices",{putFoundAsset:(t,e)=>{const r={ids:[t],serialNumber:e};return f.put("/found",r)}}),A=o({prefix:"/v2/notification",env:"APP_LOGS_NOTIFICATION_API"}),E=n("NotificationServices",{getNotifications:t=>A.get("/",{params:t}),readNotification:t=>A.put(`/${t}`)}),d=o({prefix:"/v2/session-log",env:"APP_LOGS_NOTIFICATION_API"}),G=n("SessionLogServices",{postLogout:()=>d.post("/logout")}),P=o({prefix:"/tag/v2"}),w=n("TAGServices",{getScanQR:t=>P.get("/qr",{params:{tag:t}}),getScanRFID:t=>P.get("/rfid",{params:{tag:t}})}),T=o({prefix:"/tracking/v2/tracking"}),M=n("TrackingServices",{putFoundAsset:(t,e,r)=>{const a={tag:t,group:e,serialNumber:r,type:"Global"};return T.put("/found",{params:a})}}),s=o({prefix:"/settings-user-role/v2"}),b=n("UserServices",{reLogin:t=>s.post("/auth/login",t),changePassword:t=>s.put("/users/change-password",t),getUserDetail:t=>s.get(`/users/${t}`),putEditUser:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return s.put(`/users/${t}`,e,{headers:r})},putDeleteProfilePicture:t=>s.put(`/users/${t}/delete-profile-picture`),putCancelEmailChange:(t,e)=>s.put("/auth/confirm-email-change/cancel",{user:t,companyCode:e}),getUserDetailSystemRoles:(t,e,r)=>s.get(`/user-detail/${t}/system-roles`,{params:{...r,type:e}}),getUserDetailSystemRoleList:(t,e)=>s.get(`/user-detail/${t}/system-role-list`,{params:e}),getUserDetailSystemRoleOptions:(t,e)=>s.get(`/user-detail/${t}/system-role/option`,{params:e}),getUserDetailTransactionRoleList:(t,e)=>s.get(`/user-detail/${t}/transaction-role-list`,{params:e}),getUserDetailUserLogBorrowingList:(t,e)=>s.get(`/users-log/${t}/borrowing`,{params:e}),getUserDetailUserLogAssignmentList:(t,e)=>s.get(`/users-log/${t}/assignment`,{params:e}),getUserDetailUserLogBorrowingOption:(t,e)=>s.get(`/users-log/${t}/borrowing/option`,{params:e}),getUserDetailUserLogAssignmentOption:(t,e)=>s.get(`/users-log/${t}/assignment/option`,{params:e}),getUserDetailTransactionAdminLogList:(t,e)=>s.get(`/users-log/${t}/transaction-log`,{params:e}),getUserDetailTransactionAdminLogOption:(t,e)=>s.get(`/users-log/${t}/transaction-log/option`,{params:e})}),c=o({env:"APP_ADMIN_API",prefix:"/settings-attribute/languages"}),F=n("I18nService",{getMessages:t=>c.get(`/${t}/translations`),getLanguageOptions:async()=>{const{data:t}=await c.get("/dropdown");return t.data},getLanguageOptionMeta:async t=>{const{data:e}=await c.get("/dropdown/"+t);return e.data},translateText:async(t,e)=>{const{data:r}=await c.post("/translate",{q:t,target:e});return r.data.translations[t]}})}}});
1
+ System.register(["axios"],function(n,y){"use strict";var p;return{setters:[u=>{p=u.default}],execute:function(){const u={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_ADMIN_API:"https://dev-admin-api.tagsamurai.com",VITE_APP_API:"https://dev-api.tagsamurai.com",VITE_APP_COUNTRY_STATE_API:"https://api.countrystatecity.in",VITE_APP_COUNTRY_STATE_API_KEY:"ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==",VITE_APP_LOGS_NOTIFICATION_API:"https://dev-api-logs-notification.tagsamurai.com",VITE_APP_TAGSAMURAI_API:"https://dev-api.tagsamurai.com"},l=n("getBaseURL",(t="APP_API")=>u["VITE_"+t]),o=(t={},e=!1)=>{const{env:r="APP_API",prefix:a="",headers:I={},...$}=t,m=`${l(r)}${a}`,S=JSON.parse(localStorage.getItem("user")??"{}"),L=S.jwt??S.token??"";return p.create({...$,baseURL:m,headers:e?I:{"Content-Type":"application/json",Authorization:`Bearer ${L}`,...I}})},O=n("queryParamsStringfy",t=>{if(!t||typeof t=="string")return;const e={};return Object.keys(t).forEach(r=>{Array.isArray(t[r])?t[r].length>0&&Object.assign(e,{[r]:JSON.stringify(t[r])}):t[r]!==void 0&&Object.assign(e,{[r]:t[r]})}),e}),U=n("getImageURL",t=>{if(!t)return;const e=l("APP_TAGSAMURAI_API");return t.startsWith("http")?t:`${e}/file-manager/v2/files/${t}`}),i=o({prefix:"/settings-attribute/v2",env:"APP_TAGSAMURAI_API"}),h=n("GroupCategoryServices",{getGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return i.get(`/${r}/tree`,{params:e})},getGroupCategoryList:(t,e)=>{const r=t==="category"?t:"groups";return i.get(`/${r}/${e}`)},getNames:t=>{const e=t==="category"?t:"groups";return i.get(`/${e}/names`)},postCreateGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return i.post(`/${r}`,e)},putEditGroupCategory:(t,e,r)=>{const a=t==="category"?t:"groups";return i.put(`/${a}/${r}`,e)},putMoveGroup:(t,e)=>i.put(`/groups/${e}/move-group`,t),putEditBulkGroups:async t=>i.put("/bulk",t),deleteGroupCategory:(t,e,r)=>{const a=t==="category"?t:"groups";return i.delete(`/${a}/${r}`,{data:e})}}),v=o({prefix:"/v2",env:"APP_LOGS_NOTIFICATION_API"}),N=n("NotificationApprovalServices",{getTotalApprovals:()=>v.get("/approval/count")}),g=o({prefix:"/v2",env:"APP_LOGS_NOTIFICATION_API"}),C=n("ChangelogServices",{getActionLog:t=>g.get("/change-log",{params:t}),getActionLogOption:t=>g.get("/change-log/options",{params:t}),getSessionLogList:t=>g.get("/session-log",{params:t}),getUserDetailSystemLogList:t=>g.get("/change-log",{params:t}),getUserDetailSystemLogOption:t=>g.get("/change-log/options",{params:t})}),_=o({prefix:"/assets/v2/assets"}),D=n("AssetServices",{getScanTag:t=>_.get("/scan",{params:{tag:t}})}),f=o({prefix:"/tracking/v2/missing"}),R=n("MissingServices",{putFoundAsset:(t,e)=>{const r={ids:[t],serialNumber:e};return f.put("/found",r)}}),A=o({prefix:"/v2/notification",env:"APP_LOGS_NOTIFICATION_API"}),E=n("NotificationServices",{getNotifications:t=>A.get("/",{params:t}),readNotification:t=>A.put(`/${t}`)}),d=o({prefix:"/v2/session-log",env:"APP_LOGS_NOTIFICATION_API"}),G=n("SessionLogServices",{postLogout:()=>d.post("/logout")}),P=o({prefix:"/tag/v2"}),w=n("TAGServices",{getScanQR:t=>P.get("/qr",{params:{tag:t}}),getScanRFID:t=>P.get("/rfid",{params:{tag:t}})}),T=o({prefix:"/tracking/v2/tracking"}),M=n("TrackingServices",{putFoundAsset:(t,e,r)=>{const a={tag:t,group:e,serialNumber:r,type:"Global"};return T.put("/found",{params:a})}}),s=o({prefix:"/settings-user-role/v2"}),b=n("UserServices",{reLogin:t=>s.post("/auth/login",t),changePassword:t=>s.put("/users/change-password",t),getUserDetail:t=>s.get(`/users/${t}`),putEditUser:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return s.put(`/users/${t}`,e,{headers:r})},putDeleteProfilePicture:t=>s.put(`/users/${t}/delete-profile-picture`),putCancelEmailChange:(t,e)=>s.put("/auth/confirm-email-change/cancel",{user:t,companyCode:e}),getUserDetailSystemRoles:(t,e,r)=>s.get(`/user-detail/${t}/system-roles`,{params:{...r,type:e}}),getUserDetailSystemRoleList:(t,e)=>s.get(`/user-detail/${t}/system-role-list`,{params:e}),getUserDetailSystemRoleOptions:(t,e)=>s.get(`/user-detail/${t}/system-role/option`,{params:e}),getUserDetailTransactionRoleList:(t,e)=>s.get(`/user-detail/${t}/transaction-role-list`,{params:e}),getUserDetailUserLogBorrowingList:(t,e)=>s.get(`/users-log/${t}/borrowing`,{params:e}),getUserDetailUserLogAssignmentList:(t,e)=>s.get(`/users-log/${t}/assignment`,{params:e}),getUserDetailUserLogBorrowingOption:(t,e)=>s.get(`/users-log/${t}/borrowing/option`,{params:e}),getUserDetailUserLogAssignmentOption:(t,e)=>s.get(`/users-log/${t}/assignment/option`,{params:e}),getUserDetailTransactionAdminLogList:(t,e)=>s.get(`/users-log/${t}/transaction-log`,{params:e}),getUserDetailTransactionAdminLogOption:(t,e)=>s.get(`/users-log/${t}/transaction-log/option`,{params:e})}),c=o({env:"APP_ADMIN_API",prefix:"/settings-attribute/languages"}),F=n("I18nService",{getMessages:t=>c.get(`/${t}/translations`),getLanguageOptions:async()=>{const{data:t}=await c.get("/dropdown");return t.data},getLanguageOptionMeta:async t=>{const{data:e}=await c.get("/dropdown/"+t);return e.data},translateText:async(t,e)=>{const{data:r}=await c.post("/translate",{q:t,target:e});return r.data.translations[t]}})}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/fats-api-services",
3
- "version": "1.0.0-alpha.12",
3
+ "version": "1.0.0-alpha.14",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Fixed Asset Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -0,0 +1,15 @@
1
+ export interface LatestTaskParams {
2
+ search?: string;
3
+ page?: number;
4
+ limit?: number;
5
+ sortBy?: string;
6
+ sortOrder?: number;
7
+ type: 'Depreciation Data' | 'Purchase Data' | 'Borrowing/Assignment' | 'Transfer' | 'Audit' | 'Tracking' | 'Maintenance Routine' | 'Repair Ticketing' | 'Disposal';
8
+ }
9
+ export interface SummaryParams {
10
+ search?: string;
11
+ group?: string;
12
+ interval?: string;
13
+ dateFilter?: string;
14
+ type: 'Asset' | 'Depreciation Group' | 'Depreciation Method' | 'User' | 'Role' | 'Group' | 'License' | 'Asset Transactional Policy' | 'TAG' | 'TAG Type' | 'Hardware' | 'Open API' | 'Purchase Information' | 'Purchase Document' | 'Document Deletion' | 'Asset Register' | 'Import' | 'Borrowing' | 'Assignment' | 'Transfer' | 'Audit' | 'Tracking' | 'Missing' | 'Maintenance Routine' | 'Repair Ticketing' | 'Damage' | 'Disposal';
15
+ }
@@ -0,0 +1,7 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { LatestTaskParams, SummaryParams } from '../dto/dashboard.dto';
3
+ declare const DashboardServices: {
4
+ getLatestTask: (params: LatestTaskParams) => Promise<AxiosResponse>;
5
+ getSummary: (params: SummaryParams) => Promise<AxiosResponse>;
6
+ };
7
+ export default DashboardServices;
@@ -1,8 +1,8 @@
1
1
  import { AxiosResponse } from 'axios';
2
- import { CreateGroupCategoryBody, DeleteGroupCategoryBody, EditGroupCategoryBody, MoveGroupBody, GroupCategoryResponse, GroupCategoryTableResponse, EditBulkDisposableGroupBody } from '../dto/groupCategoryService.dto';
2
+ import { CreateGroupCategoryBody, DeleteGroupCategoryBody, EditGroupCategoryBody, MoveGroupBody, GroupCategoryResponse, GroupCategoryTableResponse, EditBulkDisposableGroupBody, GetGroupTreeParams } from '../dto/groupCategoryService.dto';
3
3
  import { FetchDetailResponse } from '../types/fetchResponse.type';
4
4
  declare const GroupCategoryServices: {
5
- getGroupCategory: (type: "group" | "category") => Promise<AxiosResponse<GroupCategoryResponse>>;
5
+ getGroupCategory: (type: "group" | "category", params?: GetGroupTreeParams) => Promise<AxiosResponse<GroupCategoryResponse>>;
6
6
  getGroupCategoryList: (type: "group" | "category", groupId: string) => Promise<AxiosResponse<GroupCategoryTableResponse>>;
7
7
  getNames: (type: "group" | "category") => Promise<AxiosResponse<FetchDetailResponse<string[]>>>;
8
8
  postCreateGroupCategory: (type: "group" | "category", body: CreateGroupCategoryBody) => Promise<AxiosResponse<GroupCategoryResponse>>;