ggez-banking-sdk 0.5.36 → 0.5.37
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.
|
@@ -64,13 +64,20 @@ class BaseService {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
buildFlagHeaders(flags) {
|
|
67
|
+
if (!flags)
|
|
68
|
+
return {};
|
|
67
69
|
const headers = {};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
const headerMap = {
|
|
71
|
+
showSensitiveData: HeaderKeys.ShowSensitiveData,
|
|
72
|
+
showCustomField: HeaderKeys.ShowCustomField,
|
|
73
|
+
showTicket: HeaderKeys.ShowTicket,
|
|
74
|
+
checkPhoneVerification: HeaderKeys.CheckPhoneVerification,
|
|
75
|
+
};
|
|
76
|
+
for (const [flag, header] of Object.entries(headerMap)) {
|
|
77
|
+
if (flags[flag]) {
|
|
78
|
+
headers[header] = "1";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
74
81
|
return headers;
|
|
75
82
|
}
|
|
76
83
|
}
|
|
@@ -104,7 +104,9 @@ class UserService extends BaseService {
|
|
|
104
104
|
}
|
|
105
105
|
async createPhone(payload) {
|
|
106
106
|
const url = this.resolveURL(`${UserEndpoints.Phone}/${await this.userId()}`);
|
|
107
|
-
return this.POST(url, payload
|
|
107
|
+
return this.POST(url, payload, {
|
|
108
|
+
flags: { checkPhoneVerification: true },
|
|
109
|
+
});
|
|
108
110
|
}
|
|
109
111
|
async createDevice(payload) {
|
|
110
112
|
const url = this.resolveURL(`${UserEndpoints.Device}/${await this.userId()}`);
|
|
@@ -111,6 +111,7 @@ declare const HeaderKeys: {
|
|
|
111
111
|
readonly ShowTicket: "show_ticket";
|
|
112
112
|
readonly GenerateJwt: "generate_jwt";
|
|
113
113
|
readonly AllowControlAllowCredentials: "Allow-Control-Allow-Credentials";
|
|
114
|
+
readonly CheckPhoneVerification: "check_phone_verification";
|
|
114
115
|
};
|
|
115
116
|
declare const HTTPMethod: {
|
|
116
117
|
readonly GET: "GET";
|
|
@@ -114,6 +114,7 @@ const HeaderKeys = {
|
|
|
114
114
|
ShowTicket: "show_ticket",
|
|
115
115
|
GenerateJwt: "generate_jwt",
|
|
116
116
|
AllowControlAllowCredentials: "Allow-Control-Allow-Credentials",
|
|
117
|
+
CheckPhoneVerification: "check_phone_verification",
|
|
117
118
|
};
|
|
118
119
|
const HTTPMethod = {
|
|
119
120
|
GET: "GET",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ggez-banking-sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.37",
|
|
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",
|