aeria-sdk 0.0.118 → 0.0.120

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/auth.d.ts CHANGED
@@ -10,10 +10,9 @@ export type AuthenticationPayload = {
10
10
  email: string;
11
11
  password: string;
12
12
  };
13
- export declare const authMemo: AuthenticationResult;
14
13
  export declare const authenticate: (config: InstanceConfig) => (payload: AuthenticationPayload) => Promise<{
15
14
  readonly _tag: "Error";
16
- readonly error: any;
15
+ readonly error: unknown;
17
16
  readonly result: undefined;
18
17
  }>;
19
18
  export declare const signout: (config: InstanceConfig) => () => Promise<void>;
package/dist/auth.js CHANGED
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.signout = exports.authenticate = exports.authMemo = void 0;
3
+ exports.signout = exports.authenticate = void 0;
4
4
  const types_1 = require("@aeriajs/types");
5
5
  const http_js_1 = require("./http.js");
6
6
  const utils_js_1 = require("./utils.js");
7
7
  const storage_js_1 = require("./storage.js");
8
- exports.authMemo = {};
9
8
  const authenticate = (config) => async (payload) => {
10
9
  const response = await (0, http_js_1.request)(config, `${(0, utils_js_1.publicUrl)(config)}/user/authenticate`, payload);
11
- const { error, value: result } = response.data;
10
+ const { error, result } = response.data;
12
11
  if (result) {
13
12
  (0, storage_js_1.getStorage)(config).set('auth', result);
14
13
  }
package/dist/auth.mjs CHANGED
@@ -3,10 +3,9 @@ import { Result } from "@aeriajs/types";
3
3
  import { request } from "./http.mjs";
4
4
  import { publicUrl } from "./utils.mjs";
5
5
  import { getStorage } from "./storage.mjs";
6
- export const authMemo = {};
7
6
  export const authenticate = (config) => async (payload) => {
8
7
  const response = await request(config, `${publicUrl(config)}/user/authenticate`, payload);
9
- const { error, value: result } = response.data;
8
+ const { error, result } = response.data;
10
9
  if (result) {
11
10
  getStorage(config).set("auth", result);
12
11
  }
package/dist/http.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import type { InstanceConfig } from './types.js';
2
2
  import { type RequestConfig } from '@aeriajs/common';
3
- export declare const request: <ResponseType = any>(config: InstanceConfig, url: string, payload?: any, _requestConfig?: RequestConfig) => Promise<Omit<any, "data"> & {
4
- data: ResponseType;
3
+ export declare const request: <TResponseType = unknown>(config: InstanceConfig, url: string, payload?: any, _requestConfig?: RequestConfig) => Promise<Response & {
4
+ data: unknown;
5
+ } & {
6
+ data: TResponseType;
5
7
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aeria-sdk",
3
- "version": "0.0.118",
3
+ "version": "0.0.120",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -60,8 +60,8 @@
60
60
  "@aeriajs/types": "link:../types"
61
61
  },
62
62
  "peerDependencies": {
63
- "@aeriajs/common": "^0.0.89",
64
- "@aeriajs/types": "^0.0.77"
63
+ "@aeriajs/common": "^0.0.91",
64
+ "@aeriajs/types": "^0.0.79"
65
65
  },
66
66
  "scripts": {
67
67
  "test": "echo skipping",