@fiado/api-invoker 1.3.56 → 1.3.58
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.
- package/bin/estafeta/api/EstafetaApi.d.ts +11 -0
- package/bin/estafeta/api/EstafetaApi.js +32 -0
- package/bin/estafeta/api/interfaces/IEstafetaApi.d.ts +3 -2
- package/bin/estafeta/index.d.ts +2 -0
- package/bin/estafeta/index.js +18 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +1 -0
- package/package.json +1 -1
- package/src/estafeta/{EstafetaApi.ts → api/EstafetaApi.ts} +1 -1
- package/src/estafeta/api/interfaces/IEstafetaApi.ts +3 -2
- package/src/estafeta/index.ts +2 -0
- package/src/index.ts +2 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { IEstafetaApi } from "./interfaces/IEstafetaApi";
|
|
3
|
+
import { CreateBankAccountCardShippingRequest } from "@fiado/type-kit/bin/card";
|
|
4
|
+
import { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card";
|
|
5
|
+
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
6
|
+
export default class EstafetaApi implements IEstafetaApi {
|
|
7
|
+
private httpRequest;
|
|
8
|
+
private readonly baseUrl;
|
|
9
|
+
constructor(httpRequest: IHttpRequest);
|
|
10
|
+
createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const inversify_1 = require("inversify");
|
|
16
|
+
const esm_1 = require("inversify/lib/esm");
|
|
17
|
+
let EstafetaApi = class EstafetaApi {
|
|
18
|
+
constructor(httpRequest) {
|
|
19
|
+
this.httpRequest = httpRequest;
|
|
20
|
+
this.baseUrl = process.env.ESTAFETA_LAMBDA_URL || "";
|
|
21
|
+
}
|
|
22
|
+
async createShipment(object) {
|
|
23
|
+
const url = `${this.baseUrl}estafeta/shipping/card`;
|
|
24
|
+
return await this.httpRequest.post(url, object);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
EstafetaApi = __decorate([
|
|
28
|
+
(0, inversify_1.injectable)(),
|
|
29
|
+
__param(0, (0, esm_1.inject)("IHttpRequest")),
|
|
30
|
+
__metadata("design:paramtypes", [Object])
|
|
31
|
+
], EstafetaApi);
|
|
32
|
+
exports.default = EstafetaApi;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CreateBankAccountCardShippingRequest } from "@fiado/type-kit/bin/card";
|
|
1
|
+
import { CreateBankAccountCardShippingRequest, CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card";
|
|
2
|
+
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
2
3
|
export interface IEstafetaApi {
|
|
3
|
-
createShipment(object: CreateBankAccountCardShippingRequest): Promise<
|
|
4
|
+
createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>;
|
|
4
5
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./api/interfaces/IEstafetaApi"), exports);
|
|
18
|
+
__exportStar(require("./api/EstafetaApi"), exports);
|
package/bin/index.d.ts
CHANGED
package/bin/index.js
CHANGED
|
@@ -60,3 +60,4 @@ __exportStar(require("./pricelist-business"), exports);
|
|
|
60
60
|
__exportStar(require("./card"), exports);
|
|
61
61
|
__exportStar(require("./document-image-processor"), exports);
|
|
62
62
|
__exportStar(require("./order-collector-business"), exports);
|
|
63
|
+
__exportStar(require("./estafeta"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.58",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -3,7 +3,7 @@ import {injectable} from "inversify";
|
|
|
3
3
|
import {inject} from "inversify/lib/esm";
|
|
4
4
|
import {IHttpRequest} from "@fiado/http-client";
|
|
5
5
|
|
|
6
|
-
import {IEstafetaApi} from "./
|
|
6
|
+
import {IEstafetaApi} from "./interfaces/IEstafetaApi";
|
|
7
7
|
import {CreateBankAccountCardShippingRequest} from "@fiado/type-kit/bin/card";
|
|
8
8
|
import {CreateBankAccountCardShippingResponse} from "@fiado/type-kit/bin/card";
|
|
9
9
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {CreateBankAccountCardShippingRequest} from "@fiado/type-kit/bin/card";
|
|
1
|
+
import {CreateBankAccountCardShippingRequest, CreateBankAccountCardShippingResponse} from "@fiado/type-kit/bin/card";
|
|
2
|
+
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
2
3
|
|
|
3
4
|
export interface IEstafetaApi {
|
|
4
|
-
createShipment(object: CreateBankAccountCardShippingRequest): Promise<
|
|
5
|
+
createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>
|
|
5
6
|
}
|
package/src/index.ts
CHANGED
|
@@ -43,5 +43,6 @@ export * from "./service-business";
|
|
|
43
43
|
export * from "./pricelist-business";
|
|
44
44
|
export * from "./card";
|
|
45
45
|
export * from "./document-image-processor";
|
|
46
|
-
export * from "./order-collector-business"
|
|
46
|
+
export * from "./order-collector-business";
|
|
47
|
+
export * from "./estafeta";
|
|
47
48
|
|