@fabriktor/fx 0.0.21 → 0.0.23

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.
@@ -1,5 +1,5 @@
1
1
  import type { InUser, OperationResult, PLUsersContactList, PLUsersForgotPassword, PLUsersResolveUsername, PLUsersSendCode, PLUsersSignInLink, PLUsersUsername, PLUsersVerifyCode, UpsertResult, User } from "@fabriktor/schema";
2
- import type { Op, TmpPhonesOperator, TmpUsernamesOperator, UsernameVerification, UsersOperator } from "@fabriktor/client";
2
+ import type { Op, TmpPhonesOperator, TmpUsernamesOperator, UsernameVerification, UsersOperator, GetByUIDOptions, SearchOptions } from "@fabriktor/client";
3
3
  export type UsersFXOptions = {
4
4
  users: UsersOperator;
5
5
  tmp_usernames: TmpUsernamesOperator;
@@ -8,13 +8,6 @@ export type UsersFXOptions = {
8
8
  export type BootstrapOptions = {
9
9
  in: InUser;
10
10
  };
11
- export type SearchOptions = {
12
- q: string;
13
- limit?: number;
14
- };
15
- export type GetByUIDOptions = {
16
- uid: string;
17
- };
18
11
  export interface UsersFXOperator {
19
12
  bootstrap(opts: BootstrapOptions): Promise<Op<UpsertResult>>;
20
13
  sync(): Promise<OperationResult>;
@@ -28,7 +21,7 @@ export interface UsersFXOperator {
28
21
  verifyPhoneCode(opts: PLUsersVerifyCode): Promise<void>;
29
22
  match(opts: PLUsersContactList): Promise<Op<User[]>>;
30
23
  search(opts: SearchOptions): Promise<Op<User[]>>;
31
- getByUID(opts: GetByUIDOptions): Promise<Op<User>>;
24
+ getByUID(opts: GetByUIDOptions): Promise<Op<User[]>>;
32
25
  }
33
26
  export declare class UsersFX implements UsersFXOperator {
34
27
  private users;
@@ -47,6 +40,6 @@ export declare class UsersFX implements UsersFXOperator {
47
40
  verifyPhoneCode(opts: PLUsersVerifyCode): Promise<void>;
48
41
  match(opts: PLUsersContactList): Promise<Op<User[]>>;
49
42
  search(opts: SearchOptions): Promise<Op<User[]>>;
50
- getByUID(opts: GetByUIDOptions): Promise<Op<User>>;
43
+ getByUID(opts: GetByUIDOptions): Promise<Op<User[]>>;
51
44
  }
52
45
  export declare function newUsersFX(opts: UsersFXOptions): UsersFX;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabriktor/fx",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "![Fabriktor Logo](./img/fabriktor-character.gif)",
5
5
  "type": "module",
6
6
  "exports": {
@@ -17,7 +17,7 @@
17
17
  "typescript": "^6.0.3"
18
18
  },
19
19
  "dependencies": {
20
- "@fabriktor/client": "^0.0.18",
21
- "@fabriktor/schema": "^0.0.12"
20
+ "@fabriktor/client": "^0.0.20",
21
+ "@fabriktor/schema": "^0.0.14"
22
22
  }
23
23
  }