squarecommonblhelper 1.6.0 → 1.7.0

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/README.md CHANGED
@@ -15,6 +15,11 @@ helper for common bl for my projects.
15
15
 
16
16
  ## changelog
17
17
 
18
+ ### v1.7.0
19
+
20
+ - AuthenticationCommonBL:
21
+ - add types for logoutV0
22
+
18
23
  ### v1.6.0
19
24
 
20
25
  - AuthenticationCommonBL:
@@ -3,7 +3,7 @@ declare class AuthenticationCommonBL {
3
3
  constructor(commonBLBaseURL?: string);
4
4
  logoutV0(refreshToken: string): Promise<{
5
5
  message: string | null;
6
- data?: any;
6
+ data: null;
7
7
  log?: any;
8
8
  }>;
9
9
  generateAccessTokenV0(refreshToken: string): Promise<{
@@ -1,5 +1,5 @@
1
1
  import { fetchJSONData } from "squarecommons";
2
- import { GenerateAccessTokenV0ResponseZ, GetUserDetailsV0ResponseZ, UpdatePasswordV0ResponseZ, UpdateUsernameV0ResponseZ, } from "./types/AuthenticationResponses.js";
2
+ import { GenerateAccessTokenV0ResponseZ, GetUserDetailsV0ResponseZ, LogoutV0Z, UpdatePasswordV0ResponseZ, UpdateUsernameV0ResponseZ, } from "./types/AuthenticationResponses.js";
3
3
  class AuthenticationCommonBL {
4
4
  commonBLBaseURL;
5
5
  constructor(commonBLBaseURL = "http://localhost:10110") {
@@ -20,7 +20,7 @@ class AuthenticationCommonBL {
20
20
  undefined,
21
21
  // query params
22
22
  undefined);
23
- return data;
23
+ return LogoutV0Z.parse(data);
24
24
  }
25
25
  catch (error) {
26
26
  throw error;
@@ -208,4 +208,20 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
208
208
  log?: any;
209
209
  }>;
210
210
  type GetUserDetailsV0Response = z.infer<typeof GetUserDetailsV0ResponseZ>;
211
- export { GenerateAccessTokenV0ResponseZ, GenerateAccessTokenV0Response, UpdateUsernameV0ResponseZ, UpdateUsernameV0Response, UpdatePasswordV0ResponseZ, UpdatePasswordV0Response, GetUserDetailsV0ResponseZ, GetUserDetailsV0Response, };
211
+ declare const LogoutV0Z: z.ZodObject<z.objectUtil.extendShape<{
212
+ data: z.ZodAny;
213
+ message: z.ZodNullable<z.ZodString>;
214
+ log: z.ZodAny;
215
+ }, {
216
+ data: z.ZodNull;
217
+ }>, "strip", z.ZodTypeAny, {
218
+ message: string | null;
219
+ data: null;
220
+ log?: any;
221
+ }, {
222
+ message: string | null;
223
+ data: null;
224
+ log?: any;
225
+ }>;
226
+ type LogoutV0 = z.infer<typeof LogoutV0Z>;
227
+ export { GenerateAccessTokenV0ResponseZ, GenerateAccessTokenV0Response, UpdateUsernameV0ResponseZ, UpdateUsernameV0Response, UpdatePasswordV0ResponseZ, UpdatePasswordV0Response, GetUserDetailsV0ResponseZ, GetUserDetailsV0Response, LogoutV0, LogoutV0Z, };
@@ -33,4 +33,7 @@ const GetUserDetailsV0ResponseZ = APIOutputZ.extend({
33
33
  }),
34
34
  }),
35
35
  });
36
- export { GenerateAccessTokenV0ResponseZ, UpdateUsernameV0ResponseZ, UpdatePasswordV0ResponseZ, GetUserDetailsV0ResponseZ, };
36
+ const LogoutV0Z = APIOutputZ.extend({
37
+ data: z.null(),
38
+ });
39
+ export { GenerateAccessTokenV0ResponseZ, UpdateUsernameV0ResponseZ, UpdatePasswordV0ResponseZ, GetUserDetailsV0ResponseZ, LogoutV0Z, };
package/example.js CHANGED
@@ -30,3 +30,4 @@ console.log(
30
30
  console.log(
31
31
  await authenticationCommonBL.getUserDetailsV0("dummy_access_token")
32
32
  );
33
+ console.log(await authenticationCommonBL.logoutV0("dumm_refresh_token"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarecommonblhelper",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "helper for common bl for my projects.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",