@philipe1993/list-color 1.0.73 → 1.0.75

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"ColorService.d.ts","sourceRoot":"","sources":["../../src/services/ColorService.ts"],"names":[],"mappings":"AAIA,cAAM,YAAY;IACR,OAAO,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;CA4C3C;;AAED,wBAAkC"}
1
+ {"version":3,"file":"ColorService.d.ts","sourceRoot":"","sources":["../../src/services/ColorService.ts"],"names":[],"mappings":"AAKA,cAAM,YAAY;IACR,OAAO,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;CA4C3C;;AAED,wBAAkC"}
@@ -38,6 +38,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  var shared_1 = require("@philipe1993/shared");
40
40
  var api = (0, shared_1.getAPIInstance)();
41
+ var MANAGER = "manager";
41
42
  var ColorService = /** @class */ (function () {
42
43
  function ColorService() {
43
44
  }
@@ -48,7 +49,7 @@ var ColorService = /** @class */ (function () {
48
49
  switch (_a.label) {
49
50
  case 0:
50
51
  _a.trys.push([0, 2, , 3]);
51
- return [4 /*yield*/, api.get("".concat(shared_1.URLS.COLORS, "/search"), { params: params })];
52
+ return [4 /*yield*/, api.get("".concat(MANAGER, "/colors/search"), { params: params })];
52
53
  case 1:
53
54
  response = _a.sent();
54
55
  return [2 /*return*/, response]; // Retorna a resposta da API
@@ -1 +1 @@
1
- {"version":3,"file":"ColorService.js","sourceRoot":"","sources":["../../src/services/ColorService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,8CAA2D;AAC3D,IAAM,GAAG,GAAG,IAAA,uBAAc,GAAE,CAAC;AAE7B;IAAA;IA6CA,CAAC;IA5CS,8BAAO,GAAb,UAAc,MAAW;;;;;;;wBAEA,qBAAM,GAAG,CAAC,GAAG,CAAC,UAAG,aAAI,CAAC,MAAM,YAAS,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,EAAA;;wBAA7D,QAAQ,GAAG,SAAkD;wBACnE,sBAAO,QAAQ,EAAC,CAAC,4BAA4B;;;wBAE7C,sBAAO,EAAE,KAAK,EAAE,yBAAyB,EAAE,EAAC,CAAC,4BAA4B;;;;;KAEhF;IAqCL,mBAAC;AAAD,CAAC,AA7CD,IA6CC;AAED,kBAAe,IAAI,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"ColorService.js","sourceRoot":"","sources":["../../src/services/ColorService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,8CAAqD;AACrD,IAAM,GAAG,GAAG,IAAA,uBAAc,GAAE,CAAC;AAC7B,IAAM,OAAO,GAAG,SAAS,CAAC;AAE1B;IAAA;IA6CA,CAAC;IA5CS,8BAAO,GAAb,UAAc,MAAW;;;;;;;wBAEA,qBAAM,GAAG,CAAC,GAAG,CAAC,UAAG,OAAO,mBAAgB,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,EAAA;;wBAAhE,QAAQ,GAAG,SAAqD;wBACtE,sBAAO,QAAQ,EAAC,CAAC,4BAA4B;;;wBAE7C,sBAAO,EAAE,KAAK,EAAE,yBAAyB,EAAE,EAAC,CAAC,4BAA4B;;;;;KAEhF;IAqCL,mBAAC;AAAD,CAAC,AA7CD,IA6CC;AAED,kBAAe,IAAI,YAAY,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@philipe1993/list-color",
3
- "version": "1.0.73",
3
+ "version": "1.0.75",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
7
7
  "build": "tsc"
8
8
  },
9
9
  "dependencies": {
10
- "@philipe1993/shared": "^1.0.31",
10
+ "@philipe1993/shared": "^1.0.33",
11
11
  "mobx-react-lite": "^4.0.7",
12
12
  "react": "^18.3.1"
13
13
  },
@@ -1,11 +1,12 @@
1
1
 
2
- import { getAPIInstance, URLS } from "@philipe1993/shared";
2
+ import { getAPIInstance } from "@philipe1993/shared";
3
3
  const api = getAPIInstance();
4
+ const MANAGER = "manager";
4
5
 
5
6
  class ColorService {
6
7
  async getList(params: any): Promise<any> {
7
8
  try {
8
- const response = await api.get(`${URLS.COLORS}/search`, { params });
9
+ const response = await api.get(`${MANAGER}/colors/search`, { params });
9
10
  return response; // Retorna a resposta da API
10
11
  } catch (e) {
11
12
  return { error: "Erro ao trazer listagem" }; // Retorna um objeto de erro
@@ -14,7 +15,7 @@ class ColorService {
14
15
 
15
16
  // async createColor(color: any): Promise<any> {
16
17
  // try {
17
- // const response = await api.post(`${URLS.COLORS}`, color);
18
+ // const response = await api.post(`${${MANAGER}/colors}`, color);
18
19
  // return response; // Retorna a resposta da API
19
20
  // } catch (error) {
20
21
  // return { error: "Erro ao cadastrar", details: error }; // Retorna um objeto de erro
@@ -23,7 +24,7 @@ class ColorService {
23
24
 
24
25
  // async editColor(color: any, uuid: string | undefined): Promise<any> {
25
26
  // try {
26
- // const response = await api.put(`${URLS.COLORS}/${uuid}`, color);
27
+ // const response = await api.put(`${${MANAGER}/colors}/${uuid}`, color);
27
28
  // return response; // Retorna a resposta da API
28
29
  // } catch (error) {
29
30
  // return { error: "Erro ao cadastrar", details: error }; // Retorna um objeto de erro
@@ -32,7 +33,7 @@ class ColorService {
32
33
 
33
34
  // async getColorByUuid(uuid: any): Promise<any> {
34
35
  // try {
35
- // const response = await api.get(`${URLS.COLORS}/${uuid}`);
36
+ // const response = await api.get(`${${MANAGER}/colors}/${uuid}`);
36
37
  // return response; // Retorna a resposta da API
37
38
  // } catch (e) {
38
39
  // return { error: "Erro ao buscar dados" }; // Retorna um objeto de erro
@@ -41,7 +42,7 @@ class ColorService {
41
42
 
42
43
  // async deleteColor(uuid: any): Promise<any> {
43
44
  // try {
44
- // const response = await api.delete(`${URLS.COLORS}/${uuid}`);
45
+ // const response = await api.delete(`${${MANAGER}/colors}/${uuid}`);
45
46
  // return response; // Retorna a resposta da API
46
47
  // } catch (e) {
47
48
  // return { error: "Erro ao deletar" }; // Retorna um objeto de erro