@fabriktor/client 0.0.11 → 0.0.13

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,13 +1,11 @@
1
+ import type { PLUsersSendCode, PLUsersVerifyCode } from "@fabriktor/schema";
1
2
  import type { HTTPDoer } from "../core/http.js";
2
3
  export type SendPhoneVerificationOptions = {
3
4
  base_url: string;
4
- phone: string;
5
- };
5
+ } & PLUsersSendCode;
6
6
  export type VerifyPhoneOptions = {
7
7
  base_url: string;
8
- phone: string;
9
- code: string;
10
- };
8
+ } & PLUsersVerifyCode;
11
9
  export interface TmpPhonesOperator {
12
10
  send(opts: SendPhoneVerificationOptions): Promise<void>;
13
11
  verify(opts: VerifyPhoneOptions): Promise<void>;
@@ -1,9 +1,8 @@
1
+ import type { PLUsersUsername } from "@fabriktor/schema";
1
2
  import type { HTTPDoer, Op } from "../core/http.js";
2
3
  export type VerifyUsernameOptions = {
3
4
  base_url: string;
4
- to_validate?: string;
5
- words: string[];
6
- };
5
+ } & PLUsersUsername;
7
6
  export type UsernameVerification = {
8
7
  username: string;
9
8
  suggestions: string[];
@@ -16,8 +16,8 @@ export class TmpUsernamesClient {
16
16
  path: tmpUsernamePath(PathUsersVerify),
17
17
  method: HTTPMethodPost,
18
18
  body: {
19
- to_validate: opts.to_validate,
20
19
  words: opts.words,
20
+ to_validate: opts.to_validate,
21
21
  },
22
22
  });
23
23
  }
@@ -1,4 +1,4 @@
1
- import type { InUser, OperationResult, UpsertResult, User } from "@fabriktor/schema";
1
+ import type { InUser, OperationResult, PLUsersContactList, PLUsersForgotPassword, PLUsersResolveUsername, PLUsersSignInLink, UpsertResult, User } from "@fabriktor/schema";
2
2
  import type { HTTPDoer, Op } from "../core/http.js";
3
3
  export type AuthOptions = {
4
4
  base_url: string;
@@ -9,26 +9,14 @@ export type BootstrapOptions = AuthOptions & {
9
9
  };
10
10
  export type ResolveUsernameOptions = {
11
11
  base_url: string;
12
- username: string;
13
- };
12
+ } & PLUsersResolveUsername;
14
13
  export type ForgotPasswordOptions = {
15
14
  base_url: string;
16
- email: string;
17
- };
15
+ } & PLUsersForgotPassword;
18
16
  export type SendSignInLinkOptions = {
19
17
  base_url: string;
20
- email: string;
21
- };
22
- export type ContactMatchEntry = {
23
- first_name?: string;
24
- last_name?: string;
25
- full_name?: string;
26
- phones?: string[];
27
- emails?: string[];
28
- };
29
- export type MatchOptions = AuthOptions & {
30
- contacts: ContactMatchEntry[];
31
- };
18
+ } & PLUsersSignInLink;
19
+ export type MatchOptions = AuthOptions & PLUsersContactList;
32
20
  export type MatchResult = {
33
21
  users: User[];
34
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabriktor/client",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "![Fabriktor Logo](./img/fabriktor-character.gif)",
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.11"
20
+ "@fabriktor/schema": "^0.0.12"
21
21
  }
22
22
  }