@konversi/konversi-client 1.0.2 → 1.0.5

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.
Files changed (2) hide show
  1. package/index.ts +5 -5
  2. package/package.json +1 -2
package/index.ts CHANGED
@@ -1,29 +1,29 @@
1
1
  import axiosAPI, { setAuthToken, setCompanyId } from "./axiosAPI";
2
2
 
3
- async function getAllObjects(entity, queryParams = {}) {
3
+ async function getAllObjects(entity: any, queryParams: any = {}) {
4
4
  const response = await axiosAPI.get(`${entity}`, {
5
5
  params: queryParams
6
6
  })
7
7
  return response.data;
8
8
  }
9
9
 
10
- async function getObjectById(entity, id) {
10
+ async function getObjectById(entity: any, id: string) {
11
11
  const response = await axiosAPI.get(`${entity}/${id}`)
12
12
  return response.data;
13
13
  }
14
14
 
15
- async function updateObject(entity, id, newData) {
15
+ async function updateObject(entity: any, id: string, newData: any) {
16
16
  const response = await axiosAPI.put(`${entity}/${id}`, newData)
17
17
  return response.data;
18
18
  }
19
19
 
20
- async function createObject(entity, data) {
20
+ async function createObject(entity: any, data: any) {
21
21
  const response = await axiosAPI.post(`${entity}`, data)
22
22
 
23
23
  return response.data;
24
24
  }
25
25
 
26
- async function deleteObject(entity, id) {
26
+ async function deleteObject(entity: any, id: string) {
27
27
  const response = await axiosAPI.delete(`${entity}/${id}`)
28
28
 
29
29
  return response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konversi/konversi-client",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -11,6 +11,5 @@
11
11
  "dependencies": {
12
12
  "axios": "^1.6.8"
13
13
  },
14
- "devDependencies": {},
15
14
  "description": ""
16
15
  }