@kiminix/tp-client 1.40.0 → 2.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 CHANGED
@@ -10,5 +10,7 @@
10
10
  - run `npm run build`
11
11
  - then in the project you want to use this package run
12
12
  `npm i /Users/kamoun/workspace/tayara.promo/webapps/tp-client`
13
+ - to remove the dep
14
+ `npm remove @kiminix/tp-client `
13
15
 
14
16
 
@@ -6,6 +6,4 @@ export interface Response {
6
6
  businessId: string;
7
7
  businessName: string;
8
8
  email: string;
9
- verifiedEmail: boolean;
10
- verifiedPhone: boolean;
11
9
  }
@@ -4,8 +4,6 @@ export interface MeResponse {
4
4
  lastName: string;
5
5
  email: string;
6
6
  phone?: string;
7
- verifiedEmail: boolean;
8
- verifiedPhone: boolean;
9
7
  gender?: string;
10
8
  birthday?: string;
11
9
  createdAt: Date;
@@ -18,8 +18,6 @@ export interface UpdateProfileResponse {
18
18
  lastName: string;
19
19
  email: string;
20
20
  phone?: string;
21
- verifiedEmail: boolean;
22
- verifiedPhone: boolean;
23
21
  gender?: string;
24
22
  birthday?: string;
25
23
  lastSignIn: Date;
@@ -5,8 +5,6 @@ export interface SignInResponse {
5
5
  lastName: string;
6
6
  email: string;
7
7
  phone?: string;
8
- verifiedEmail: boolean;
9
- verifiedPhone: boolean;
10
8
  gender?: string;
11
9
  birthday?: string;
12
10
  }
@@ -13,8 +13,6 @@ export interface SignUpResponse {
13
13
  lastName: string;
14
14
  email: string;
15
15
  phone?: string;
16
- verifiedEmail: boolean;
17
- verifiedPhone: boolean;
18
16
  gender?: string;
19
17
  birthday?: string;
20
18
  }
@@ -0,0 +1,4 @@
1
+ export interface VerifiedInfoResponse {
2
+ identifier: string;
3
+ isVerified: boolean;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -5,6 +5,7 @@ import { UpdateProfileRequest, UpdateProfileResponse } from "./types/update-prof
5
5
  import { SignInResponse } from "./types/user-signin";
6
6
  import { SignUpRequest, SignUpResponse } from "./types/user-signup";
7
7
  import { SignUpValidateRequest } from "./types/user-signup-validate";
8
+ import { VerifiedInfoResponse } from "./types/verified-info";
8
9
  export declare class IamUserAPIs {
9
10
  static signIn(identifier: string, password: string): Promise<SignInResponse>;
10
11
  static signUp({ code, firstName, lastName, phone, email, password }: SignUpRequest): Promise<Either<Error, SignUpResponse>>;
@@ -25,4 +26,11 @@ export declare class IamUserAPIs {
25
26
  */
26
27
  static updateProfile({ token, firstName, lastName, phone, email, birthday, gender, password }: UpdateProfileRequest): Promise<UpdateProfileResponse>;
27
28
  static validatePhone(token: string | undefined, phone: string, code: string): Promise<Either<Error, void>>;
29
+ /**
30
+ *
31
+ * @errors
32
+ * empty_identifiers
33
+ * @returns
34
+ */
35
+ static getVerifiedInfo(token: string | undefined, identifiers: string[]): Promise<VerifiedInfoResponse[]>;
28
36
  }
@@ -265,6 +265,31 @@ var IamUserAPIs = /** @class */ (function () {
265
265
  });
266
266
  });
267
267
  };
268
+ /**
269
+ *
270
+ * @errors
271
+ * empty_identifiers
272
+ * @returns
273
+ */
274
+ IamUserAPIs.getVerifiedInfo = function (token, identifiers) {
275
+ return __awaiter(this, void 0, void 0, function () {
276
+ return __generator(this, function (_a) {
277
+ return [2 /*return*/, RequestUtils.send(function () {
278
+ var queryParams = identifiers.map(function (identifier) { return "identifiers=".concat(identifier); }).join('&');
279
+ // Send the data to the server in JSON format.
280
+ return axios.get(base + "/iam/users/verified-info?".concat(queryParams), {
281
+ headers: {
282
+ 'Authorization': "".concat(token),
283
+ 'Content-Type': 'application/json'
284
+ }
285
+ })
286
+ .then(function (response) {
287
+ return response.data;
288
+ });
289
+ })];
290
+ });
291
+ });
292
+ };
268
293
  return IamUserAPIs;
269
294
  }());
270
295
  export { IamUserAPIs };
@@ -15,7 +15,6 @@ export interface User {
15
15
  lastname: string | undefined;
16
16
  phone: string | undefined;
17
17
  email: string | undefined;
18
- verifiedPhone: boolean;
19
18
  }
20
19
  export interface ReservationEvent {
21
20
  kind: ReservationEventKind;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "1.40.0",
3
+ "version": "2.0.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [