@fiap-tech-challenge/shared-ftc 1.0.15 → 1.0.16

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.
@@ -1,5 +1,4 @@
1
1
  import { CommonItem } from "../../entities/item";
2
2
  export declare abstract class ItemService {
3
3
  abstract findById(itemId: string): Promise<CommonItem | null>;
4
- abstract create(item: CommonItem): Promise<void>;
5
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"item-service.js","sourceRoot":"","sources":["../../../../../src/application/services/item-service/item-service.ts"],"names":[],"mappings":";;;AAEA,MAAsB,WAAW;CAGhC;AAHD,kCAGC"}
1
+ {"version":3,"file":"item-service.js","sourceRoot":"","sources":["../../../../../src/application/services/item-service/item-service.ts"],"names":[],"mappings":";;;AAEA,MAAsB,WAAW;CAEhC;AAFD,kCAEC"}
@@ -1,5 +1,4 @@
1
1
  export * from "./infra/services/item-service/item-service.module";
2
- export * from "./infra/services/item-service/http-client/http-client.service";
3
2
  export * from "./infra/services/item-service/mock/mock-item-service";
4
3
  export * from "./application/entities/item";
5
4
  export * from "./application/services/item-service/item-service";
package/dist/src/index.js CHANGED
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./infra/services/item-service/item-service.module"), exports);
18
- __exportStar(require("./infra/services/item-service/http-client/http-client.service"), exports);
19
18
  __exportStar(require("./infra/services/item-service/mock/mock-item-service"), exports);
20
19
  __exportStar(require("./application/entities/item"), exports);
21
20
  __exportStar(require("./application/services/item-service/item-service"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oFAAkE;AAClE,gGAA8E;AAC9E,uFAAqE;AACrE,8DAA4C;AAC5C,mFAAiE;AAEjE,oFAAkE;AAClE,qGAAmF;AACnF,uFAAqE;AACrE,qEAAmD;AACnD,0EAAwD;AACxD,mFAAiE;AACjE,mFAAiE;AACjE,oEAAkD;AAClD,6EAA2D;AAC3D,0EAAwD;AACxD,sEAAoD;AACpD,uDAAqC;AAErC,kEAAgD;AAChD,0EAAwD;AACxD,0EAAwD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oFAAkE;AAClE,uFAAqE;AACrE,8DAA4C;AAC5C,mFAAiE;AAEjE,oFAAkE;AAClE,qGAAmF;AACnF,uFAAqE;AACrE,qEAAmD;AACnD,0EAAwD;AACxD,mFAAiE;AACjE,mFAAiE;AACjE,oEAAkD;AAClD,6EAA2D;AAC3D,0EAAwD;AACxD,sEAAoD;AACpD,uDAAqC;AAErC,kEAAgD;AAChD,0EAAwD;AACxD,0EAAwD"}
@@ -1,5 +1,6 @@
1
1
  import { CommonItem } from "../../../../application/entities/item";
2
- export declare class HttpClientItemService {
2
+ import { ItemService } from "../../../../application/services/item-service/item-service";
3
+ export declare class HttpClientItemService extends ItemService {
3
4
  constructor();
4
5
  findById(itemId: string): Promise<CommonItem | null>;
5
6
  }
@@ -12,14 +12,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.HttpClientItemService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const http_service_mapper_1 = require("./http-service-mapper");
15
- let HttpClientItemService = class HttpClientItemService {
16
- constructor() { }
15
+ const item_service_1 = require("../../../../application/services/item-service/item-service");
16
+ let HttpClientItemService = class HttpClientItemService extends item_service_1.ItemService {
17
+ constructor() {
18
+ super();
19
+ }
17
20
  async findById(itemId) {
18
21
  if (!process.env.BASE_URL) {
19
22
  throw new Error("BASE_URL is not defined");
20
23
  }
21
24
  console.log("AAAAAAAAAAAA");
22
- const url = `http://localhost:3000/items/${itemId}`;
25
+ const url = `${process.env.BASE_URL}/items/${itemId}`;
23
26
  const response = await fetch(url, {
24
27
  method: "GET",
25
28
  headers: {
@@ -1 +1 @@
1
- {"version":3,"file":"http-client.service.js","sourceRoot":"","sources":["../../../../../../src/infra/services/item-service/http-client/http-client.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,+DAA0D;AAInD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,gBAAe,CAAC;IAEhB,KAAK,CAAC,QAAQ,CAAC,MAAc;QAC3B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAE5B,MAAM,GAAG,GAAG,+BAA+B,MAAM,EAAE,CAAC;QAEpD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAChC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,UAAU,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE;aAC/C;SACF,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAiB,CAAC;QAErD,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAEvB,OAAO,uCAAiB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;CACF,CAAA;AA1BY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;;GACA,qBAAqB,CA0BjC"}
1
+ {"version":3,"file":"http-client.service.js","sourceRoot":"","sources":["../../../../../../src/infra/services/item-service/http-client/http-client.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,+DAA0D;AAE1D,kFAA8E;AAGvE,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,0BAAW;IACpD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAc;QAC3B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAE5B,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,UAAU,MAAM,EAAE,CAAC;QAEtD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAChC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,UAAU,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE;aAC/C;SACF,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAiB,CAAC;QAErD,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAEvB,OAAO,uCAAiB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;CACF,CAAA;AA5BY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;;GACA,qBAAqB,CA4BjC"}