@kiminix/tp-client 2.2.0 → 2.3.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.
|
@@ -10,10 +10,17 @@ export declare class BusinessAdminAPIs {
|
|
|
10
10
|
static subscription(props: {
|
|
11
11
|
name: string;
|
|
12
12
|
address: string;
|
|
13
|
-
addition: string;
|
|
14
13
|
firstName: string;
|
|
15
14
|
lastName: string;
|
|
16
15
|
phone: string;
|
|
17
|
-
|
|
16
|
+
email: string;
|
|
17
|
+
discounts?: {
|
|
18
|
+
day: string;
|
|
19
|
+
discount: string;
|
|
20
|
+
}[] | undefined;
|
|
21
|
+
openingHours?: {
|
|
22
|
+
from: string;
|
|
23
|
+
to: string;
|
|
24
|
+
}[] | undefined;
|
|
18
25
|
}): Promise<any>;
|
|
19
26
|
}
|
|
@@ -74,11 +74,12 @@ var BusinessAdminAPIs = /** @class */ (function () {
|
|
|
74
74
|
return axios.post(base + "/business/subscriptions", {
|
|
75
75
|
name: props.name,
|
|
76
76
|
address: props.address,
|
|
77
|
-
addition: props.addition,
|
|
78
77
|
firstName: props.firstName,
|
|
79
78
|
lastName: props.lastName,
|
|
80
79
|
phone: props.phone,
|
|
81
|
-
|
|
80
|
+
email: props.email,
|
|
81
|
+
discounts: props.discounts,
|
|
82
|
+
openingHours: props.openingHours
|
|
82
83
|
}, {})
|
|
83
84
|
.then(function (response) { return response.data; });
|
|
84
85
|
})];
|
package/dist/iam/user-apis.d.ts
CHANGED
|
@@ -25,7 +25,8 @@ export declare class IamUserAPIs {
|
|
|
25
25
|
* @returns
|
|
26
26
|
*/
|
|
27
27
|
static updateProfile({ token, firstName, lastName, phone, email, birthday, gender, password }: UpdateProfileRequest): Promise<UpdateProfileResponse>;
|
|
28
|
-
static validatePhone(token: string | undefined, phone: string, code: string): Promise<
|
|
28
|
+
static validatePhone(token: string | undefined, phone: string, code: string): Promise<void>;
|
|
29
|
+
static validateEmail(email: string, code: string): Promise<void>;
|
|
29
30
|
/**
|
|
30
31
|
*
|
|
31
32
|
* @errors
|
package/dist/iam/user-apis.js
CHANGED
|
@@ -234,9 +234,9 @@ var IamUserAPIs = /** @class */ (function () {
|
|
|
234
234
|
IamUserAPIs.validatePhone = function (token, phone, code) {
|
|
235
235
|
return __awaiter(this, void 0, void 0, function () {
|
|
236
236
|
return __generator(this, function (_a) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
238
|
+
// Send the data to the server in JSON format.
|
|
239
|
+
return axios.post(base + "/iam/validation/phone", {
|
|
240
240
|
phone: phone,
|
|
241
241
|
code: code
|
|
242
242
|
}, {
|
|
@@ -246,22 +246,29 @@ var IamUserAPIs = /** @class */ (function () {
|
|
|
246
246
|
}
|
|
247
247
|
})
|
|
248
248
|
.then(function (response) {
|
|
249
|
-
return
|
|
250
|
-
})
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
249
|
+
return undefined;
|
|
250
|
+
});
|
|
251
|
+
})];
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
IamUserAPIs.validateEmail = function (email, code) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
257
|
+
return __generator(this, function (_a) {
|
|
258
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
259
|
+
// Send the data to the server in JSON format.
|
|
260
|
+
return axios.post(base + "/iam/validation/email", {
|
|
261
|
+
email: email,
|
|
262
|
+
code: code
|
|
263
|
+
}, {
|
|
264
|
+
headers: {
|
|
265
|
+
'Content-Type': 'application/json'
|
|
256
266
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
throw new Error("unauthorized");
|
|
263
|
-
}
|
|
264
|
-
return [2 /*return*/];
|
|
267
|
+
})
|
|
268
|
+
.then(function (response) {
|
|
269
|
+
return undefined;
|
|
270
|
+
});
|
|
271
|
+
})];
|
|
265
272
|
});
|
|
266
273
|
});
|
|
267
274
|
};
|