@philipe1993/list-color 1.0.73 → 1.0.74

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":"AAMA,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;AAE7B,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,6 +1,6 @@
1
1
  {
2
2
  "name": "@philipe1993/list-color",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1,11 +1,13 @@
1
1
 
2
- import { getAPIInstance, URLS } from "@philipe1993/shared";
2
+ import { getAPIInstance } from "@philipe1993/shared";
3
3
  const api = getAPIInstance();
4
4
 
5
+ const MANAGER = "manager";
6
+
5
7
  class ColorService {
6
8
  async getList(params: any): Promise<any> {
7
9
  try {
8
- const response = await api.get(`${URLS.COLORS}/search`, { params });
10
+ const response = await api.get(`${MANAGER}/colors/search`, { params });
9
11
  return response; // Retorna a resposta da API
10
12
  } catch (e) {
11
13
  return { error: "Erro ao trazer listagem" }; // Retorna um objeto de erro
@@ -14,7 +16,7 @@ class ColorService {
14
16
 
15
17
  // async createColor(color: any): Promise<any> {
16
18
  // try {
17
- // const response = await api.post(`${URLS.COLORS}`, color);
19
+ // const response = await api.post(`${${MANAGER}/colors}`, color);
18
20
  // return response; // Retorna a resposta da API
19
21
  // } catch (error) {
20
22
  // return { error: "Erro ao cadastrar", details: error }; // Retorna um objeto de erro
@@ -23,7 +25,7 @@ class ColorService {
23
25
 
24
26
  // async editColor(color: any, uuid: string | undefined): Promise<any> {
25
27
  // try {
26
- // const response = await api.put(`${URLS.COLORS}/${uuid}`, color);
28
+ // const response = await api.put(`${${MANAGER}/colors}/${uuid}`, color);
27
29
  // return response; // Retorna a resposta da API
28
30
  // } catch (error) {
29
31
  // return { error: "Erro ao cadastrar", details: error }; // Retorna um objeto de erro
@@ -32,7 +34,7 @@ class ColorService {
32
34
 
33
35
  // async getColorByUuid(uuid: any): Promise<any> {
34
36
  // try {
35
- // const response = await api.get(`${URLS.COLORS}/${uuid}`);
37
+ // const response = await api.get(`${${MANAGER}/colors}/${uuid}`);
36
38
  // return response; // Retorna a resposta da API
37
39
  // } catch (e) {
38
40
  // return { error: "Erro ao buscar dados" }; // Retorna um objeto de erro
@@ -41,7 +43,7 @@ class ColorService {
41
43
 
42
44
  // async deleteColor(uuid: any): Promise<any> {
43
45
  // try {
44
- // const response = await api.delete(`${URLS.COLORS}/${uuid}`);
46
+ // const response = await api.delete(`${${MANAGER}/colors}/${uuid}`);
45
47
  // return response; // Retorna a resposta da API
46
48
  // } catch (e) {
47
49
  // return { error: "Erro ao deletar" }; // Retorna um objeto de erro