@fabriktor/fx 0.0.6 → 0.0.7

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/fx.d.ts CHANGED
@@ -7,6 +7,10 @@ export type FXOptions = {
7
7
  auth: AuthOperator;
8
8
  users: UsersOperator;
9
9
  };
10
+ export type DefaultFXOptions = {
11
+ base_url: string;
12
+ auth: AuthOperator;
13
+ };
10
14
  export interface FXOperator {
11
15
  users: UsersFXOperator;
12
16
  session: SessionFXOperator;
@@ -17,3 +21,4 @@ export declare class FX implements FXOperator {
17
21
  constructor(opts: FXOptions);
18
22
  }
19
23
  export declare function newFX(opts: FXOptions): FX;
24
+ export declare function newDefaultFX(opts: DefaultFXOptions): FX;
package/dist/src/fx.js CHANGED
@@ -3,6 +3,7 @@
3
3
  // Licensed under the Apache License, Version 2.0 (the "License"); you may
4
4
  // not use this file except in compliance with the License. You may obtain
5
5
  // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ import { newHTTPClient, newUsersClient } from "@fabriktor/client";
6
7
  import { newSessionFX } from "./session/session";
7
8
  import { newUsersFX } from "./users/users";
8
9
  export class FX {
@@ -23,3 +24,12 @@ export class FX {
23
24
  export function newFX(opts) {
24
25
  return new FX(opts);
25
26
  }
27
+ export function newDefaultFX(opts) {
28
+ return newFX({
29
+ base_url: opts.base_url,
30
+ auth: opts.auth,
31
+ users: newUsersClient({
32
+ http: newHTTPClient(),
33
+ }),
34
+ });
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabriktor/fx",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "![Fabriktor Logo](./img/fabriktor-character.gif)",
5
5
  "type": "module",
6
6
  "exports": {