squarecommonblhelper 5.0.0 → 5.1.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
package/dist/authentication.d.ts
CHANGED
package/dist/authentication.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fetchJSONData } from "squarecommons";
|
|
1
|
+
import { fetchFileData, fetchJSONData } from "squarecommons";
|
|
2
2
|
import { DeleteUserV0Z, GetUserDetailsV0ResponseZ, LogoutAllV0Z, LogoutAppsV0Z, UpdatePasswordV0ResponseZ, UpdateUsernameV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
3
3
|
class AuthenticationCommonBL {
|
|
4
4
|
commonBLBaseURL;
|
|
@@ -131,5 +131,26 @@ class AuthenticationCommonBL {
|
|
|
131
131
|
throw error;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
+
async getUserProfilePhoto(accessToken) {
|
|
135
|
+
try {
|
|
136
|
+
const data = await fetchFileData(
|
|
137
|
+
// base url
|
|
138
|
+
this.commonBLBaseURL,
|
|
139
|
+
// endpoint
|
|
140
|
+
"get_user_profile_photo/v0",
|
|
141
|
+
// method
|
|
142
|
+
"GET",
|
|
143
|
+
// headers
|
|
144
|
+
{ access_token: accessToken },
|
|
145
|
+
// body
|
|
146
|
+
undefined,
|
|
147
|
+
// query params
|
|
148
|
+
undefined);
|
|
149
|
+
return data;
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
throw error;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
134
155
|
}
|
|
135
156
|
export { AuthenticationCommonBL };
|
|
@@ -26,7 +26,7 @@ declare const UpdateUsernameV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
26
26
|
username: string;
|
|
27
27
|
};
|
|
28
28
|
}>;
|
|
29
|
-
}>, "
|
|
29
|
+
}>, "strict", z.ZodTypeAny, {
|
|
30
30
|
message: string | null;
|
|
31
31
|
data: {
|
|
32
32
|
main: {
|
|
@@ -52,7 +52,7 @@ declare const UpdatePasswordV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
52
52
|
log: z.ZodAny;
|
|
53
53
|
}, {
|
|
54
54
|
data: z.ZodNull;
|
|
55
|
-
}>, "
|
|
55
|
+
}>, "strict", z.ZodTypeAny, {
|
|
56
56
|
message: string | null;
|
|
57
57
|
data: null;
|
|
58
58
|
log?: any;
|
|
@@ -176,7 +176,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
176
176
|
}[];
|
|
177
177
|
};
|
|
178
178
|
}>;
|
|
179
|
-
}>, "
|
|
179
|
+
}>, "strict", z.ZodTypeAny, {
|
|
180
180
|
message: string | null;
|
|
181
181
|
data: {
|
|
182
182
|
main: {
|
|
@@ -228,7 +228,7 @@ declare const DeleteUserV0Z: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
228
228
|
log: z.ZodAny;
|
|
229
229
|
}, {
|
|
230
230
|
data: z.ZodNull;
|
|
231
|
-
}>, "
|
|
231
|
+
}>, "strict", z.ZodTypeAny, {
|
|
232
232
|
message: string | null;
|
|
233
233
|
data: null;
|
|
234
234
|
log?: any;
|
|
@@ -244,7 +244,7 @@ declare const LogoutAllV0Z: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
244
244
|
log: z.ZodAny;
|
|
245
245
|
}, {
|
|
246
246
|
data: z.ZodNull;
|
|
247
|
-
}>, "
|
|
247
|
+
}>, "strict", z.ZodTypeAny, {
|
|
248
248
|
message: string | null;
|
|
249
249
|
data: null;
|
|
250
250
|
log?: any;
|
|
@@ -260,7 +260,7 @@ declare const LogoutAppsV0Z: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
260
260
|
log: z.ZodAny;
|
|
261
261
|
}, {
|
|
262
262
|
data: z.ZodNull;
|
|
263
|
-
}>, "
|
|
263
|
+
}>, "strict", z.ZodTypeAny, {
|
|
264
264
|
message: string | null;
|
|
265
265
|
data: null;
|
|
266
266
|
log?: any;
|
package/example.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "squarecommonblhelper",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "helper for common bl for my projects.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"node": ">=18.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"squarecommons": "^2.
|
|
37
|
+
"squarecommons": "^2.2.0",
|
|
38
38
|
"zod": "^3.24.1"
|
|
39
39
|
}
|
|
40
40
|
}
|