@tagsamurai/gsts-api-services 1.1.0-alpha.22 → 1.1.0-alpha.24

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.
@@ -148,7 +148,10 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
148
148
  const e = { id: JSON.stringify(t) };
149
149
  return d.delete("", { params: e });
150
150
  },
151
- checkDivisionAvailability: (t) => d.get("/available", { params: t })
151
+ getAvailableDivision: (t) => {
152
+ const e = { name: t };
153
+ return d.get("/available", { params: e });
154
+ }
152
155
  }, g = a({
153
156
  prefix: "/global-settings"
154
157
  }), q = {
@@ -242,7 +245,10 @@ const C = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
242
245
  const e = { id: JSON.stringify(t) };
243
246
  return f.delete("", { params: e });
244
247
  },
245
- checkPositionAvailability: (t) => f.get("/available", { params: t })
248
+ getAvailablePosition: (t) => {
249
+ const e = { name: t };
250
+ return f.get("/available", { params: e });
251
+ }
246
252
  }, N = a({
247
253
  prefix: "/fam/tag/v2"
248
254
  }), K = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/gsts-api-services",
3
- "version": "1.1.0-alpha.22",
3
+ "version": "1.1.0-alpha.24",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Global Settings Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -8,7 +8,10 @@ interface PasswordLoginCredentials extends Credentials {
8
8
  interface OTPLoginCredentials extends Credentials {
9
9
  otp: string;
10
10
  }
11
- export type LoginCredentials = PasswordLoginCredentials | OTPLoginCredentials;
11
+ export interface TokenCredential {
12
+ jwt: string;
13
+ }
14
+ export type LoginCredentials = PasswordLoginCredentials | OTPLoginCredentials | TokenCredential;
12
15
  export interface SetPasswordBody {
13
16
  password: string;
14
17
  token: string;
@@ -1,5 +1,5 @@
1
1
  import { AxiosResponse } from 'axios';
2
- import { LoginCredentials, SetPasswordBody } from '../dto/auth.dto';
2
+ import { LoginCredentials, SetPasswordBody, TokenCredential } from '../dto/auth.dto';
3
3
  interface LoginResponse {
4
4
  data: {
5
5
  token: string;
@@ -9,9 +9,7 @@ interface LoginResponse {
9
9
  }
10
10
  declare const AuthServices: {
11
11
  login: (form: LoginCredentials) => Promise<AxiosResponse<LoginResponse>>;
12
- reLogin: (body: {
13
- jwt: string;
14
- }) => Promise<AxiosResponse<LoginResponse>>;
12
+ reLogin: (body: TokenCredential) => Promise<AxiosResponse<LoginResponse>>;
15
13
  requestOTP: (email: string) => Promise<AxiosResponse<any, any>>;
16
14
  requestResetPassLink: (email: string) => Promise<AxiosResponse<any, any>>;
17
15
  setPassword: (body: SetPasswordBody) => Promise<AxiosResponse<any, any>>;
@@ -9,8 +9,6 @@ declare const DivisionServices: {
9
9
  postCreateDivision: (body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
10
10
  putEditDivision: (id: string, body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
11
11
  deleteDivisions: (ids: string[]) => Promise<AxiosResponse>;
12
- checkDivisionAvailability: (params: {
13
- name: string;
14
- }) => Promise<AxiosResponse>;
12
+ getAvailableDivision: (name: string) => Promise<AxiosResponse>;
15
13
  };
16
14
  export default DivisionServices;
@@ -9,8 +9,6 @@ declare const PositionServices: {
9
9
  postCreatePosition: (body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
10
10
  putEditPosition: (id: string, body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
11
11
  deletePositions: (ids: string[]) => Promise<AxiosResponse>;
12
- checkPositionAvailability: (params: {
13
- name: string;
14
- }) => Promise<AxiosResponse>;
12
+ getAvailablePosition: (name: string) => Promise<AxiosResponse>;
15
13
  };
16
14
  export default PositionServices;