@nizza/core 0.3.1-beta.1 → 0.3.2-beta.0

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.
@@ -16,6 +16,7 @@ export type Primitive = string | boolean | number;
16
16
  export interface CustomFetchConfig extends RequestInit {
17
17
  url: RequestInfo;
18
18
  raw?: boolean;
19
+ contentTypeJson?: boolean;
19
20
  }
20
21
  export type Environment<T> = typeof environment & T;
21
22
  export type RequiredKeys<T> = {
@@ -1,2 +1,10 @@
1
1
  import { CustomFetchConfig } from '../types';
2
- export declare function customFetch<T = Response>({ url, method, raw, ...rest }: CustomFetchConfig): Promise<T>;
2
+ export declare function customFetch<T = any>(config: CustomFetchConfig): Promise<T>;
3
+ declare interface ApiCall {
4
+ url: string;
5
+ method?: string;
6
+ headers?: any;
7
+ body?: any;
8
+ }
9
+ export declare const apiCall: <T = any>(config: ApiCall) => Promise<T>;
10
+ export {};
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.3.1-beta.1",
3
+ "version": "0.3.2-beta.0",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.3.1-beta.1",
3
+ "version": "0.3.2-beta.0",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",