@nano-lib/util 1.1.10 → 1.1.11

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.
@@ -0,0 +1,15 @@
1
+ import { default as Request } from './index';
2
+ import { PromiseResponse, PromiseResponseList } from '../../types/request';
3
+ import { AnyObj } from '../../types';
4
+ export default class CommonRequest {
5
+ private controllerUrl;
6
+ private controllerType;
7
+ private requestInstance;
8
+ constructor(controllerUrl: string, requestInstance: Request);
9
+ detail: <T extends AnyObj>(id: string | number) => PromiseResponse<T>;
10
+ list: <T extends AnyObj>(params?: AnyObj) => PromiseResponseList<T>;
11
+ submitData: (action: "add" | "edit", data: AnyObj) => PromiseResponse;
12
+ add: (data: AnyObj) => PromiseResponse;
13
+ edit: (data: AnyObj) => PromiseResponse;
14
+ del: (ids: string) => PromiseResponse;
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nano-lib/util",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Custom utility functions for the nano library",
5
5
  "author": "xylo",
6
6
  "license": "MIT",