ggez-banking-sdk 0.1.138 → 0.1.140

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.
@@ -91,17 +91,7 @@ const FillCreateUserData = (data) => {
91
91
  : EntityVerificationStatus.Not_Verified,
92
92
  },
93
93
  ],
94
- authentication: [
95
- data.emailAuthenticationCode && {
96
- type: SecurityAuthenticationTypes.Email_Code,
97
- code: data.emailAuthenticationCode,
98
- },
99
- data.isMobileConfirmed &&
100
- !!data.mobileAuthenticationCode && {
101
- type: SecurityAuthenticationTypes.SMS_Code,
102
- code: data.mobileAuthenticationCode,
103
- },
104
- ],
94
+ authentication: [],
105
95
  security: {
106
96
  password: data.password,
107
97
  security_code: data.securityCode,
@@ -143,6 +133,18 @@ const FillCreateUserData = (data) => {
143
133
  ],
144
134
  custom_field: data.customField,
145
135
  };
136
+ if (data.isMobileConfirmed && data.mobileAuthenticationCode) {
137
+ userData.authentication.push({
138
+ type: SecurityAuthenticationTypes.SMS_Code,
139
+ code: data.mobileAuthenticationCode,
140
+ });
141
+ }
142
+ if (data.emailAuthenticationCode) {
143
+ userData.authentication.push({
144
+ type: SecurityAuthenticationTypes.Email_Code,
145
+ code: data.emailAuthenticationCode,
146
+ });
147
+ }
146
148
  return userData;
147
149
  };
148
150
  const FillCreateUserWithGoogleData = async (data) => {
@@ -170,6 +172,8 @@ const FillCreateUserWithGoogleData = async (data) => {
170
172
  ],
171
173
  };
172
174
  userData.external_auth = [externalAuth];
173
- userData.documents = [documentData];
175
+ if (base64) {
176
+ userData.documents = [documentData];
177
+ }
174
178
  return userData;
175
179
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.138",
3
+ "version": "0.1.140",
4
4
  "description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",