@spritz-finance/service-client 0.2.13 → 0.2.15
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.
|
@@ -5,11 +5,14 @@ interface User {
|
|
|
5
5
|
firstName?: string;
|
|
6
6
|
lastName?: string;
|
|
7
7
|
timezone?: string;
|
|
8
|
+
attributionSource?: string;
|
|
9
|
+
appDomain?: string;
|
|
8
10
|
}
|
|
9
11
|
export declare class UsersServiceClient {
|
|
10
12
|
client: AxiosInstance;
|
|
11
13
|
constructor();
|
|
12
14
|
getUserById(id: string): Promise<User>;
|
|
13
15
|
findOrInitialize(email: string): Promise<User>;
|
|
16
|
+
findByEmail(email: string): Promise<User>;
|
|
14
17
|
}
|
|
15
18
|
export {};
|
|
@@ -10,7 +10,7 @@ class UsersServiceClient {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
async getUserById(id) {
|
|
13
|
-
return this.client.get(
|
|
13
|
+
return this.client.get(`/id/${id}`).then((res) => res.data);
|
|
14
14
|
}
|
|
15
15
|
async findOrInitialize(email) {
|
|
16
16
|
return this.client
|
|
@@ -19,5 +19,10 @@ class UsersServiceClient {
|
|
|
19
19
|
})
|
|
20
20
|
.then((res) => res.data);
|
|
21
21
|
}
|
|
22
|
+
async findByEmail(email) {
|
|
23
|
+
return this.client
|
|
24
|
+
.get(`/users/email/${email}`)
|
|
25
|
+
.then((res) => res.data);
|
|
26
|
+
}
|
|
22
27
|
}
|
|
23
28
|
exports.UsersServiceClient = UsersServiceClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spritz-finance/service-client",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"description": "Service client",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"coverageDirectory": "../coverage",
|
|
48
48
|
"testEnvironment": "node"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "a26b05d80e06c28208e90831b07567905ab360d8"
|
|
51
51
|
}
|