squarecommonblhelper 10.0.0 → 11.0.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,16 @@ helper for common bl for my projects.
|
|
|
15
15
|
|
|
16
16
|
## changelog
|
|
17
17
|
|
|
18
|
+
### v11.0.0
|
|
19
|
+
|
|
20
|
+
- AuthenticationCommonBL:
|
|
21
|
+
- UpdateUserProfilePhotoV0Response now compatible with square_common_bl>=7.0.0
|
|
22
|
+
|
|
23
|
+
### v10.1.0
|
|
24
|
+
|
|
25
|
+
- AuthenticationCommonBL:
|
|
26
|
+
- add UpdateUserProfilePhotoV0ResponseZ.
|
|
27
|
+
|
|
18
28
|
### v10.0.0
|
|
19
29
|
|
|
20
30
|
- AuthenticationCommonBL:
|
package/dist/authentication.d.ts
CHANGED
|
@@ -65,7 +65,9 @@ declare class AuthenticationCommonBL {
|
|
|
65
65
|
getUserProfilePhotoV0(accessToken: string): Promise<Blob>;
|
|
66
66
|
updateUserProfilePhotoV0(accessToken: string, profilePhoto?: File): Promise<{
|
|
67
67
|
message: string | null;
|
|
68
|
-
data
|
|
68
|
+
data: {
|
|
69
|
+
main: string | null;
|
|
70
|
+
};
|
|
69
71
|
log?: any;
|
|
70
72
|
}>;
|
|
71
73
|
generateAccountBackupCodesV0(accessToken: string): Promise<{
|
|
@@ -91,8 +93,7 @@ declare class AuthenticationCommonBL {
|
|
|
91
93
|
user_profile_first_name: string | null;
|
|
92
94
|
user_profile_last_name: string | null;
|
|
93
95
|
user_profile_email_verified: string | null;
|
|
94
|
-
}
|
|
95
|
-
affected_count: number;
|
|
96
|
+
};
|
|
96
97
|
};
|
|
97
98
|
log?: any;
|
|
98
99
|
}>;
|
package/dist/authentication.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fetchFileData, fetchJSONData } from "squarecommons";
|
|
2
|
-
import { DeleteUserV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, GetUserDetailsV0ResponseZ, GetUserRecoveryMethodsV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, SendResetPasswordEmailV0ResponseZ, SendVerificationEmailV0ResponseZ, UpdateProfileDetailsV0ResponseZ, UpdateUsernameV0ResponseZ, UpdateUserRecoveryMethodsV0ResponseZ, ValidateEmailVerificationCodeV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
2
|
+
import { DeleteUserV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, GetUserDetailsV0ResponseZ, GetUserRecoveryMethodsV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, SendResetPasswordEmailV0ResponseZ, SendVerificationEmailV0ResponseZ, UpdateProfileDetailsV0ResponseZ, UpdateUsernameV0ResponseZ, UpdateUserProfilePhotoV0ResponseZ, UpdateUserRecoveryMethodsV0ResponseZ, ValidateEmailVerificationCodeV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
3
3
|
class AuthenticationCommonBL {
|
|
4
4
|
commonBLBaseURL;
|
|
5
5
|
constructor(commonBLBaseURL = "http://localhost:10110") {
|
|
@@ -160,7 +160,7 @@ class AuthenticationCommonBL {
|
|
|
160
160
|
formData,
|
|
161
161
|
// query params
|
|
162
162
|
undefined);
|
|
163
|
-
return data;
|
|
163
|
+
return UpdateUserProfilePhotoV0ResponseZ.parse(data);
|
|
164
164
|
}
|
|
165
165
|
catch (error) {
|
|
166
166
|
throw error;
|
|
@@ -409,7 +409,7 @@ declare const UpdateProfileDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendSh
|
|
|
409
409
|
log: z.ZodAny;
|
|
410
410
|
}, {
|
|
411
411
|
data: z.ZodObject<{
|
|
412
|
-
main: z.
|
|
412
|
+
main: z.ZodObject<{
|
|
413
413
|
user_profile_photo_storage_token: z.ZodNullable<z.ZodString>;
|
|
414
414
|
user_profile_email: z.ZodNullable<z.ZodString>;
|
|
415
415
|
user_profile_phone_number_country_code: z.ZodNullable<z.ZodString>;
|
|
@@ -439,8 +439,7 @@ declare const UpdateProfileDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendSh
|
|
|
439
439
|
user_profile_first_name: string | null;
|
|
440
440
|
user_profile_last_name: string | null;
|
|
441
441
|
user_profile_email_verified: string | null;
|
|
442
|
-
}
|
|
443
|
-
affected_count: z.ZodNumber;
|
|
442
|
+
}>;
|
|
444
443
|
}, "strict", z.ZodTypeAny, {
|
|
445
444
|
main: {
|
|
446
445
|
user_id: string;
|
|
@@ -452,8 +451,7 @@ declare const UpdateProfileDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendSh
|
|
|
452
451
|
user_profile_first_name: string | null;
|
|
453
452
|
user_profile_last_name: string | null;
|
|
454
453
|
user_profile_email_verified: string | null;
|
|
455
|
-
}
|
|
456
|
-
affected_count: number;
|
|
454
|
+
};
|
|
457
455
|
}, {
|
|
458
456
|
main: {
|
|
459
457
|
user_id: string;
|
|
@@ -465,8 +463,7 @@ declare const UpdateProfileDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendSh
|
|
|
465
463
|
user_profile_first_name: string | null;
|
|
466
464
|
user_profile_last_name: string | null;
|
|
467
465
|
user_profile_email_verified: string | null;
|
|
468
|
-
}
|
|
469
|
-
affected_count: number;
|
|
466
|
+
};
|
|
470
467
|
}>;
|
|
471
468
|
}>, "strict", z.ZodTypeAny, {
|
|
472
469
|
message: string | null;
|
|
@@ -481,8 +478,7 @@ declare const UpdateProfileDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendSh
|
|
|
481
478
|
user_profile_first_name: string | null;
|
|
482
479
|
user_profile_last_name: string | null;
|
|
483
480
|
user_profile_email_verified: string | null;
|
|
484
|
-
}
|
|
485
|
-
affected_count: number;
|
|
481
|
+
};
|
|
486
482
|
};
|
|
487
483
|
log?: any;
|
|
488
484
|
}, {
|
|
@@ -498,8 +494,7 @@ declare const UpdateProfileDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendSh
|
|
|
498
494
|
user_profile_first_name: string | null;
|
|
499
495
|
user_profile_last_name: string | null;
|
|
500
496
|
user_profile_email_verified: string | null;
|
|
501
|
-
}
|
|
502
|
-
affected_count: number;
|
|
497
|
+
};
|
|
503
498
|
};
|
|
504
499
|
log?: any;
|
|
505
500
|
}>;
|
|
@@ -644,4 +639,30 @@ declare const GetUserRecoveryMethodsV0ResponseZ: z.ZodObject<z.objectUtil.extend
|
|
|
644
639
|
log?: any;
|
|
645
640
|
}>;
|
|
646
641
|
type GetUserRecoveryMethodsV0Response = z.infer<typeof GetUserRecoveryMethodsV0ResponseZ>;
|
|
647
|
-
|
|
642
|
+
declare const UpdateUserProfilePhotoV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
643
|
+
data: z.ZodAny;
|
|
644
|
+
message: z.ZodNullable<z.ZodString>;
|
|
645
|
+
log: z.ZodAny;
|
|
646
|
+
}, {
|
|
647
|
+
data: z.ZodObject<{
|
|
648
|
+
main: z.ZodNullable<z.ZodString>;
|
|
649
|
+
}, "strict", z.ZodTypeAny, {
|
|
650
|
+
main: string | null;
|
|
651
|
+
}, {
|
|
652
|
+
main: string | null;
|
|
653
|
+
}>;
|
|
654
|
+
}>, "strict", z.ZodTypeAny, {
|
|
655
|
+
message: string | null;
|
|
656
|
+
data: {
|
|
657
|
+
main: string | null;
|
|
658
|
+
};
|
|
659
|
+
log?: any;
|
|
660
|
+
}, {
|
|
661
|
+
message: string | null;
|
|
662
|
+
data: {
|
|
663
|
+
main: string | null;
|
|
664
|
+
};
|
|
665
|
+
log?: any;
|
|
666
|
+
}>;
|
|
667
|
+
type UpdateUserProfilePhotoV0Response = z.infer<typeof UpdateUserProfilePhotoV0ResponseZ>;
|
|
668
|
+
export { UpdateUsernameV0ResponseZ, UpdateUsernameV0Response, GetUserDetailsV0ResponseZ, GetUserDetailsV0Response, DeleteUserV0Response, DeleteUserV0ResponseZ, LogoutAllV0Response, LogoutAllV0ResponseZ, LogoutAppsV0Response, LogoutAppsV0ResponseZ, GenerateAccountBackupCodeV0Response, GenerateAccountBackupCodeV0ResponseZ, UpdateProfileDetailsV0ResponseZ, UpdateProfileDetailsV0Response, SendResetPasswordEmailV0ResponseZ, SendResetPasswordEmailV0Response, RecoveryMethodEnumZ, RecoveryMethodEnum, UpdateUserRecoveryMethodsV0ResponseZ, UpdateUserRecoveryMethodsV0Response, SendVerificationEmailV0ResponseZ, SendVerificationEmailV0Response, ValidateEmailVerificationCodeV0ResponseZ, ValidateEmailVerificationCodeV0Response, GetUserRecoveryMethodsV0ResponseZ, GetUserRecoveryMethodsV0Response, UpdateUserProfilePhotoV0ResponseZ, UpdateUserProfilePhotoV0Response, };
|
|
@@ -62,8 +62,7 @@ const GenerateAccountBackupCodeV0ResponseZ = APIOutputZ.extend({
|
|
|
62
62
|
});
|
|
63
63
|
const UpdateProfileDetailsV0ResponseZ = APIOutputZ.extend({
|
|
64
64
|
data: z.strictObject({
|
|
65
|
-
main: z
|
|
66
|
-
.array(z.strictObject({
|
|
65
|
+
main: z.strictObject({
|
|
67
66
|
user_profile_photo_storage_token: z.string().nullable(),
|
|
68
67
|
user_profile_email: z.string().nullable(),
|
|
69
68
|
user_profile_phone_number_country_code: z.string().nullable(),
|
|
@@ -73,9 +72,7 @@ const UpdateProfileDetailsV0ResponseZ = APIOutputZ.extend({
|
|
|
73
72
|
user_profile_id: z.number(),
|
|
74
73
|
user_profile_email_verified: z.string().nullable(),
|
|
75
74
|
user_profile_phone_number: z.string().nullable(),
|
|
76
|
-
})
|
|
77
|
-
.length(1),
|
|
78
|
-
affected_count: z.number(),
|
|
75
|
+
}),
|
|
79
76
|
}),
|
|
80
77
|
});
|
|
81
78
|
const SendResetPasswordEmailV0ResponseZ = APIOutputZ.extend({
|
|
@@ -105,4 +102,9 @@ const GetUserRecoveryMethodsV0ResponseZ = APIOutputZ.extend({
|
|
|
105
102
|
main: z.record(RecoveryMethodEnumZ, z.boolean()),
|
|
106
103
|
}),
|
|
107
104
|
});
|
|
108
|
-
|
|
105
|
+
const UpdateUserProfilePhotoV0ResponseZ = APIOutputZ.extend({
|
|
106
|
+
data: z.strictObject({
|
|
107
|
+
main: z.string().nullable(),
|
|
108
|
+
}),
|
|
109
|
+
});
|
|
110
|
+
export { UpdateUsernameV0ResponseZ, GetUserDetailsV0ResponseZ, DeleteUserV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, UpdateProfileDetailsV0ResponseZ, SendResetPasswordEmailV0ResponseZ, RecoveryMethodEnumZ, UpdateUserRecoveryMethodsV0ResponseZ, SendVerificationEmailV0ResponseZ, ValidateEmailVerificationCodeV0ResponseZ, GetUserRecoveryMethodsV0ResponseZ, UpdateUserProfilePhotoV0ResponseZ, };
|