@jogolabs/billing-sdk-v2 0.0.7 → 0.0.8
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/dist/billing/src/__generated__/Billing.d.ts +2 -0
- package/dist/billing/src/__generated__/Billing.js +3 -0
- package/dist/billing/src/__generated__/index.d.ts +1 -0
- package/dist/billing/src/__generated__/index.js +3 -1
- package/dist/billing/src/__generated__/services/WompiService.d.ts +31 -0
- package/dist/billing/src/__generated__/services/WompiService.js +30 -0
- package/package.json +1 -1
- package/src/billing/src/__generated__/Billing.ts +3 -0
- package/src/billing/src/__generated__/index.ts +1 -0
- package/src/billing/src/__generated__/services/WompiService.ts +48 -0
|
@@ -4,12 +4,14 @@ import { CardsService } from './services/CardsService';
|
|
|
4
4
|
import { HealthService } from './services/HealthService';
|
|
5
5
|
import { PaymentsService } from './services/PaymentsService';
|
|
6
6
|
import { WebhooksService } from './services/WebhooksService';
|
|
7
|
+
import { WompiService } from './services/WompiService';
|
|
7
8
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
8
9
|
export declare class Billing {
|
|
9
10
|
readonly cards: CardsService;
|
|
10
11
|
readonly health: HealthService;
|
|
11
12
|
readonly payments: PaymentsService;
|
|
12
13
|
readonly webhooks: WebhooksService;
|
|
14
|
+
readonly wompi: WompiService;
|
|
13
15
|
readonly request: BaseHttpRequest;
|
|
14
16
|
constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
|
|
15
17
|
}
|
|
@@ -6,11 +6,13 @@ const CardsService_1 = require("./services/CardsService");
|
|
|
6
6
|
const HealthService_1 = require("./services/HealthService");
|
|
7
7
|
const PaymentsService_1 = require("./services/PaymentsService");
|
|
8
8
|
const WebhooksService_1 = require("./services/WebhooksService");
|
|
9
|
+
const WompiService_1 = require("./services/WompiService");
|
|
9
10
|
class Billing {
|
|
10
11
|
cards;
|
|
11
12
|
health;
|
|
12
13
|
payments;
|
|
13
14
|
webhooks;
|
|
15
|
+
wompi;
|
|
14
16
|
request;
|
|
15
17
|
constructor(config, HttpRequest = AxiosHttpRequest_1.AxiosHttpRequest) {
|
|
16
18
|
this.request = new HttpRequest({
|
|
@@ -28,6 +30,7 @@ class Billing {
|
|
|
28
30
|
this.health = new HealthService_1.HealthService(this.request);
|
|
29
31
|
this.payments = new PaymentsService_1.PaymentsService(this.request);
|
|
30
32
|
this.webhooks = new WebhooksService_1.WebhooksService(this.request);
|
|
33
|
+
this.wompi = new WompiService_1.WompiService(this.request);
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
exports.Billing = Billing;
|
|
@@ -22,3 +22,4 @@ export { CardsService } from './services/CardsService';
|
|
|
22
22
|
export { HealthService } from './services/HealthService';
|
|
23
23
|
export { PaymentsService } from './services/PaymentsService';
|
|
24
24
|
export { WebhooksService } from './services/WebhooksService';
|
|
25
|
+
export { WompiService } from './services/WompiService';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebhooksService = exports.PaymentsService = exports.HealthService = exports.CardsService = exports.$TokenizeCardRequest = exports.$Subscription = exports.$SavedCard = exports.$Error = exports.$CreateSubscriptionResponse = exports.$CreateSubscriptionRequest = exports.$ConsumeClassResponse = exports.Subscription = exports.SavedCard = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.BaseHttpRequest = exports.ApiError = exports.Billing = void 0;
|
|
3
|
+
exports.WompiService = exports.WebhooksService = exports.PaymentsService = exports.HealthService = exports.CardsService = exports.$TokenizeCardRequest = exports.$Subscription = exports.$SavedCard = exports.$Error = exports.$CreateSubscriptionResponse = exports.$CreateSubscriptionRequest = exports.$ConsumeClassResponse = exports.Subscription = exports.SavedCard = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.BaseHttpRequest = exports.ApiError = exports.Billing = void 0;
|
|
4
4
|
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
5
|
/* istanbul ignore file */
|
|
6
6
|
/* tslint:disable */
|
|
@@ -42,3 +42,5 @@ var PaymentsService_1 = require("./services/PaymentsService");
|
|
|
42
42
|
Object.defineProperty(exports, "PaymentsService", { enumerable: true, get: function () { return PaymentsService_1.PaymentsService; } });
|
|
43
43
|
var WebhooksService_1 = require("./services/WebhooksService");
|
|
44
44
|
Object.defineProperty(exports, "WebhooksService", { enumerable: true, get: function () { return WebhooksService_1.WebhooksService; } });
|
|
45
|
+
var WompiService_1 = require("./services/WompiService");
|
|
46
|
+
Object.defineProperty(exports, "WompiService", { enumerable: true, get: function () { return WompiService_1.WompiService; } });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
2
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
3
|
+
export declare class WompiService {
|
|
4
|
+
readonly httpRequest: BaseHttpRequest;
|
|
5
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
6
|
+
/**
|
|
7
|
+
* Verificar credenciales de Wompi
|
|
8
|
+
* Verifica que el `app_id` y `api_secret` proporcionados sean válidos consultando el endpoint `/Aplicativo` de Wompi. Útil antes de guardar o actualizar un PaymentsProvider para confirmar que las credenciales son correctas.
|
|
9
|
+
*
|
|
10
|
+
* @returns any Credenciales válidas
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
postApiV1WompiVerifyAccess({ requestBody, }: {
|
|
14
|
+
requestBody: {
|
|
15
|
+
/**
|
|
16
|
+
* Application ID de Wompi
|
|
17
|
+
*/
|
|
18
|
+
app_id: string;
|
|
19
|
+
/**
|
|
20
|
+
* API secret de Wompi
|
|
21
|
+
*/
|
|
22
|
+
api_secret: string;
|
|
23
|
+
};
|
|
24
|
+
}): CancelablePromise<{
|
|
25
|
+
valid?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Respuesta de Wompi /Aplicativo
|
|
28
|
+
*/
|
|
29
|
+
data?: Record<string, any>;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WompiService = void 0;
|
|
4
|
+
class WompiService {
|
|
5
|
+
httpRequest;
|
|
6
|
+
constructor(httpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Verificar credenciales de Wompi
|
|
11
|
+
* Verifica que el `app_id` y `api_secret` proporcionados sean válidos consultando el endpoint `/Aplicativo` de Wompi. Útil antes de guardar o actualizar un PaymentsProvider para confirmar que las credenciales son correctas.
|
|
12
|
+
*
|
|
13
|
+
* @returns any Credenciales válidas
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
postApiV1WompiVerifyAccess({ requestBody, }) {
|
|
17
|
+
return this.httpRequest.request({
|
|
18
|
+
method: 'POST',
|
|
19
|
+
url: '/api/v1/wompi/verify-access',
|
|
20
|
+
body: requestBody,
|
|
21
|
+
mediaType: 'application/json',
|
|
22
|
+
errors: {
|
|
23
|
+
400: `Faltan app_id o api_secret`,
|
|
24
|
+
401: `Token JWT ausente o inválido`,
|
|
25
|
+
422: `Credenciales inválidas según Wompi`,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.WompiService = WompiService;
|
package/package.json
CHANGED
|
@@ -9,12 +9,14 @@ import { CardsService } from './services/CardsService';
|
|
|
9
9
|
import { HealthService } from './services/HealthService';
|
|
10
10
|
import { PaymentsService } from './services/PaymentsService';
|
|
11
11
|
import { WebhooksService } from './services/WebhooksService';
|
|
12
|
+
import { WompiService } from './services/WompiService';
|
|
12
13
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
13
14
|
export class Billing {
|
|
14
15
|
public readonly cards: CardsService;
|
|
15
16
|
public readonly health: HealthService;
|
|
16
17
|
public readonly payments: PaymentsService;
|
|
17
18
|
public readonly webhooks: WebhooksService;
|
|
19
|
+
public readonly wompi: WompiService;
|
|
18
20
|
public readonly request: BaseHttpRequest;
|
|
19
21
|
constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = AxiosHttpRequest) {
|
|
20
22
|
this.request = new HttpRequest({
|
|
@@ -32,6 +34,7 @@ export class Billing {
|
|
|
32
34
|
this.health = new HealthService(this.request);
|
|
33
35
|
this.payments = new PaymentsService(this.request);
|
|
34
36
|
this.webhooks = new WebhooksService(this.request);
|
|
37
|
+
this.wompi = new WompiService(this.request);
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
|
|
@@ -30,3 +30,4 @@ export { CardsService } from './services/CardsService';
|
|
|
30
30
|
export { HealthService } from './services/HealthService';
|
|
31
31
|
export { PaymentsService } from './services/PaymentsService';
|
|
32
32
|
export { WebhooksService } from './services/WebhooksService';
|
|
33
|
+
export { WompiService } from './services/WompiService';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
7
|
+
export class WompiService {
|
|
8
|
+
constructor(public readonly httpRequest: BaseHttpRequest) {}
|
|
9
|
+
/**
|
|
10
|
+
* Verificar credenciales de Wompi
|
|
11
|
+
* Verifica que el `app_id` y `api_secret` proporcionados sean válidos consultando el endpoint `/Aplicativo` de Wompi. Útil antes de guardar o actualizar un PaymentsProvider para confirmar que las credenciales son correctas.
|
|
12
|
+
*
|
|
13
|
+
* @returns any Credenciales válidas
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
public postApiV1WompiVerifyAccess({
|
|
17
|
+
requestBody,
|
|
18
|
+
}: {
|
|
19
|
+
requestBody: {
|
|
20
|
+
/**
|
|
21
|
+
* Application ID de Wompi
|
|
22
|
+
*/
|
|
23
|
+
app_id: string;
|
|
24
|
+
/**
|
|
25
|
+
* API secret de Wompi
|
|
26
|
+
*/
|
|
27
|
+
api_secret: string;
|
|
28
|
+
},
|
|
29
|
+
}): CancelablePromise<{
|
|
30
|
+
valid?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Respuesta de Wompi /Aplicativo
|
|
33
|
+
*/
|
|
34
|
+
data?: Record<string, any>;
|
|
35
|
+
}> {
|
|
36
|
+
return this.httpRequest.request({
|
|
37
|
+
method: 'POST',
|
|
38
|
+
url: '/api/v1/wompi/verify-access',
|
|
39
|
+
body: requestBody,
|
|
40
|
+
mediaType: 'application/json',
|
|
41
|
+
errors: {
|
|
42
|
+
400: `Faltan app_id o api_secret`,
|
|
43
|
+
401: `Token JWT ausente o inválido`,
|
|
44
|
+
422: `Credenciales inválidas según Wompi`,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|