@fabriktor/fx 0.0.14 → 0.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.
@@ -1,7 +1,6 @@
1
1
  export * from "./auth/auth.js";
2
2
  export * from "./fx.js";
3
3
  export * from "./session/session.js";
4
- export * from "./session/signup.js";
5
4
  export * from "./users/phone.js";
6
5
  export * from "./users/username.js";
7
6
  export * from "./users/users.js";
package/dist/src/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from "./auth/auth.js";
2
2
  export * from "./fx.js";
3
3
  export * from "./session/session.js";
4
- export * from "./session/signup.js";
5
4
  export * from "./users/phone.js";
6
5
  export * from "./users/username.js";
7
6
  export * from "./users/users.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabriktor/fx",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
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.12",
21
- "@fabriktor/schema": "^0.0.11"
20
+ "@fabriktor/client": "^0.0.13",
21
+ "@fabriktor/schema": "^0.0.12"
22
22
  }
23
23
  }
@@ -1,34 +0,0 @@
1
- import { UserTypeClient, UserTypeEmployee, UserTypeEmployer } from "@fabriktor/schema";
2
- import type { InUser, Owner, Privacy } from "@fabriktor/schema";
3
- export type SignUpUserType = typeof UserTypeClient | typeof UserTypeEmployee | typeof UserTypeEmployer;
4
- export type SignUpAddressInput = {
5
- address_timezone?: string;
6
- lat?: number;
7
- lon?: number;
8
- street?: string;
9
- city?: string;
10
- state?: string;
11
- postal_code?: string;
12
- country?: string;
13
- formatted_address?: string;
14
- place_name?: string;
15
- place_id?: string;
16
- };
17
- export type SignUpInput = {
18
- email: string;
19
- password: string;
20
- username: string;
21
- first_name: string;
22
- last_name: string;
23
- company_name?: string;
24
- user_type: SignUpUserType;
25
- preferred_language: string;
26
- phone?: string;
27
- address?: SignUpAddressInput;
28
- privacy?: Privacy;
29
- picture_id?: string;
30
- qr_id?: string;
31
- };
32
- export declare function newInUserFromSignUp(opts: SignUpInput): InUser;
33
- export declare function newDefaultPrivacy(): Privacy;
34
- export declare function newZeroOwner(): Owner;
@@ -1,42 +0,0 @@
1
- // Copyright (C) Fabriktor, Inc. 2025-present.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License"); you may
4
- // not use this file except in compliance with the License. You may obtain
5
- // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- export function newInUserFromSignUp(opts) {
7
- return {
8
- address_timezone: opts.address?.address_timezone ?? "",
9
- lat: opts.address?.lat ?? 0,
10
- lon: opts.address?.lon ?? 0,
11
- street: opts.address?.street ?? "",
12
- city: opts.address?.city ?? "",
13
- state: opts.address?.state ?? "",
14
- postal_code: opts.address?.postal_code ?? "",
15
- country: opts.address?.country ?? "",
16
- formatted_address: opts.address?.formatted_address ?? "",
17
- place_name: opts.address?.place_name ?? "",
18
- place_id: opts.address?.place_id ?? "",
19
- username: opts.username,
20
- first_name: opts.first_name,
21
- last_name: opts.last_name,
22
- phone: opts.phone ?? "",
23
- company_name: opts.company_name ?? "",
24
- user_type: opts.user_type,
25
- user_type_switch: opts.user_type,
26
- privacy: opts.privacy ?? newDefaultPrivacy(),
27
- picture_id: opts.picture_id ?? "",
28
- qr_id: opts.qr_id ?? "",
29
- ExternalOwner: newZeroOwner(),
30
- };
31
- }
32
- export function newDefaultPrivacy() {
33
- return {
34
- is_searchable: true,
35
- is_messageable: true,
36
- };
37
- }
38
- export function newZeroOwner() {
39
- return {
40
- owner_id: "",
41
- };
42
- }