@fabriktor/client 0.0.49 → 0.0.51
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/src/users/users.d.ts +3 -2
- package/dist/src/users/users.js +12 -2
- package/package.json +2 -2
|
@@ -14,12 +14,13 @@ export type MatchOptions = CompletePayload<PLUsersContactList>;
|
|
|
14
14
|
export type GetByUIDOptions = {
|
|
15
15
|
uid: string;
|
|
16
16
|
};
|
|
17
|
+
export type SearchManyUsersOptions = SearchManyOptionsCRUD & GetByUIDOptions;
|
|
17
18
|
export interface UsersOperator {
|
|
18
19
|
queryUsers(opts?: QueryOptionsCRUD): Promise<OperationResultOf<User[]>>;
|
|
19
20
|
findOneUser(opts: FindOneOptionsCRUD): Promise<OperationResultOf<User>>;
|
|
20
21
|
replaceOneUser(opts: ReplaceOneOptionsCRUD<InUser>): Promise<OperationResult>;
|
|
21
22
|
deleteOneUser(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
22
|
-
searchManyUsers(opts
|
|
23
|
+
searchManyUsers(opts: SearchManyUsersOptions): Promise<OperationResultOf<SearchResultOf<User>>>;
|
|
23
24
|
bootstrap(opts: BootstrapOptions): Promise<OperationResultOf<UpsertResult>>;
|
|
24
25
|
sync(): Promise<OperationResult>;
|
|
25
26
|
sendEmailVerification(opts: SendEmailVerificationOptions): Promise<void>;
|
|
@@ -44,7 +45,7 @@ export declare class UsersClient implements UsersOperator {
|
|
|
44
45
|
findOneUser(opts: FindOneOptionsCRUD): Promise<OperationResultOf<User>>;
|
|
45
46
|
replaceOneUser(opts: ReplaceOneOptionsCRUD<InUser>): Promise<OperationResult>;
|
|
46
47
|
deleteOneUser(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
47
|
-
searchManyUsers(opts
|
|
48
|
+
searchManyUsers(opts: SearchManyUsersOptions): Promise<OperationResultOf<SearchResultOf<User>>>;
|
|
48
49
|
bootstrap(opts: BootstrapOptions): Promise<OperationResultOf<UpsertResult>>;
|
|
49
50
|
sync(): Promise<OperationResult>;
|
|
50
51
|
sendEmailVerification(opts: SendEmailVerificationOptions): Promise<void>;
|
package/dist/src/users/users.js
CHANGED
|
@@ -38,7 +38,14 @@ export class UsersClient {
|
|
|
38
38
|
return await this.users.deleteOne(opts);
|
|
39
39
|
}
|
|
40
40
|
async searchManyUsers(opts) {
|
|
41
|
-
|
|
41
|
+
const { uid, query, ...searchOpts } = opts;
|
|
42
|
+
return await this.users.searchMany({
|
|
43
|
+
...searchOpts,
|
|
44
|
+
query: {
|
|
45
|
+
...(query ?? {}),
|
|
46
|
+
...userUIDQuery(uid),
|
|
47
|
+
},
|
|
48
|
+
});
|
|
42
49
|
}
|
|
43
50
|
async bootstrap(opts) {
|
|
44
51
|
const token = await requiredToken(this.get_token);
|
|
@@ -105,7 +112,7 @@ export class UsersClient {
|
|
|
105
112
|
}
|
|
106
113
|
async getByUID(opts) {
|
|
107
114
|
return await this.queryUsers({
|
|
108
|
-
query:
|
|
115
|
+
query: userUIDQuery(opts.uid),
|
|
109
116
|
});
|
|
110
117
|
}
|
|
111
118
|
}
|
|
@@ -119,3 +126,6 @@ function userPath(action) {
|
|
|
119
126
|
action,
|
|
120
127
|
});
|
|
121
128
|
}
|
|
129
|
+
function userUIDQuery(uid) {
|
|
130
|
+
return queryParam("uid", uid);
|
|
131
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabriktor/client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"typescript": "^6.0.3"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@fabriktor/schema": "0.0.
|
|
20
|
+
"@fabriktor/schema": "0.0.34"
|
|
21
21
|
}
|
|
22
22
|
}
|