@axium/client 0.4.7 → 0.4.8

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,7 @@
1
+ import type { $API, APIParameters, Endpoint, RequestBody } from '@axium/core/api';
1
2
  import type { RequestMethod } from '@axium/core/requests';
2
- import type { Endpoint, RequestBody, Result, APIParameters } from '@axium/core/api';
3
3
  export declare let token: string | null;
4
4
  export declare function setToken(value: string | null): void;
5
5
  export declare let prefix: string;
6
6
  export declare function setPrefix(value: string): void;
7
- export declare function fetchAPI<const M extends RequestMethod, const E extends Endpoint>(method: M, endpoint: E, data?: RequestBody<M, E>, ...params: APIParameters<E>): Promise<Result<M, E>>;
7
+ export declare function fetchAPI<const M extends RequestMethod, const E extends Endpoint>(method: M, endpoint: E, data?: RequestBody<M, E>, ...params: APIParameters<E>): Promise<M extends keyof $API[E] ? ($API[E][M] extends [unknown, infer R] ? R : $API[E][M]) : unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/client",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "author": "James Prevett <jp@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",