@faable/auth-sdk 1.0.13 → 1.0.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.
- package/dist/FaableAuthApi.d.ts +57 -1
- package/dist/FaableAuthApi.js +6 -0
- package/dist/types/api.d.ts +1911 -0
- package/dist/types/api.js +6 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.js +2 -0
- package/package.json +4 -2
- package/tsconfig.json +2 -1
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import { TeamCreate } from "./types";
|
|
2
|
+
import { TeamCreate, UserCreate, UserUpdate } from "./types";
|
|
3
3
|
import { FaablePaginator } from "./paginator";
|
|
4
4
|
export declare class FaableAuthApi {
|
|
5
5
|
client: AxiosInstance;
|
|
@@ -71,6 +71,62 @@ export declare class FaableAuthApi {
|
|
|
71
71
|
createdAt: string;
|
|
72
72
|
updatedAt?: string;
|
|
73
73
|
}>;
|
|
74
|
+
createUser(data: UserCreate): Promise<{
|
|
75
|
+
id: string;
|
|
76
|
+
name?: string;
|
|
77
|
+
username?: string;
|
|
78
|
+
given_name?: string;
|
|
79
|
+
family_name?: string;
|
|
80
|
+
email?: string;
|
|
81
|
+
email_verified: boolean;
|
|
82
|
+
phone?: string;
|
|
83
|
+
phone_verified: boolean;
|
|
84
|
+
country_iso?: string;
|
|
85
|
+
birth_date?: string;
|
|
86
|
+
locale: string;
|
|
87
|
+
region?: string;
|
|
88
|
+
picture?: string;
|
|
89
|
+
logins_count: number;
|
|
90
|
+
last_ip?: string;
|
|
91
|
+
last_login?: string;
|
|
92
|
+
user_metadata: {
|
|
93
|
+
[key: string]: unknown;
|
|
94
|
+
};
|
|
95
|
+
app_metadata: {
|
|
96
|
+
[key: string]: unknown;
|
|
97
|
+
};
|
|
98
|
+
account: string;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
updatedAt?: string;
|
|
101
|
+
}>;
|
|
102
|
+
updateUser(user_id: string, data: UserUpdate): Promise<{
|
|
103
|
+
id: string;
|
|
104
|
+
name?: string;
|
|
105
|
+
username?: string;
|
|
106
|
+
given_name?: string;
|
|
107
|
+
family_name?: string;
|
|
108
|
+
email?: string;
|
|
109
|
+
email_verified: boolean;
|
|
110
|
+
phone?: string;
|
|
111
|
+
phone_verified: boolean;
|
|
112
|
+
country_iso?: string;
|
|
113
|
+
birth_date?: string;
|
|
114
|
+
locale: string;
|
|
115
|
+
region?: string;
|
|
116
|
+
picture?: string;
|
|
117
|
+
logins_count: number;
|
|
118
|
+
last_ip?: string;
|
|
119
|
+
last_login?: string;
|
|
120
|
+
user_metadata: {
|
|
121
|
+
[key: string]: unknown;
|
|
122
|
+
};
|
|
123
|
+
app_metadata: {
|
|
124
|
+
[key: string]: unknown;
|
|
125
|
+
};
|
|
126
|
+
account: string;
|
|
127
|
+
createdAt: string;
|
|
128
|
+
updatedAt?: string;
|
|
129
|
+
}>;
|
|
74
130
|
getTeam(team_id: any): Promise<{
|
|
75
131
|
id: string;
|
|
76
132
|
name: string;
|
package/dist/FaableAuthApi.js
CHANGED
|
@@ -41,6 +41,12 @@ class FaableAuthApi {
|
|
|
41
41
|
async getUser(user_id) {
|
|
42
42
|
return await handleError(this.client.get(`/user/${user_id}`));
|
|
43
43
|
}
|
|
44
|
+
async createUser(data) {
|
|
45
|
+
return await handleError(this.client.post(`/user`, data));
|
|
46
|
+
}
|
|
47
|
+
async updateUser(user_id, data) {
|
|
48
|
+
return await handleError(this.client.post(`/user/${user_id}`, data));
|
|
49
|
+
}
|
|
44
50
|
async getTeam(team_id) {
|
|
45
51
|
return await handleError(this.client.get(`/team/${team_id}`));
|
|
46
52
|
}
|