@jogolabs/billing-sdk-v2 0.0.1 → 0.0.2
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__/models/CreateMerchantRequest.d.ts +4 -1
- package/dist/billing/src/__generated__/models/CreateSubscriptionRequest.d.ts +4 -1
- package/dist/billing/src/__generated__/models/Merchant.d.ts +2 -2
- package/dist/billing/src/__generated__/models/Package.d.ts +4 -1
- package/dist/billing/src/__generated__/models/Payment.d.ts +4 -1
- package/dist/billing/src/__generated__/models/SavedCard.d.ts +4 -1
- package/dist/billing/src/__generated__/models/Subscription.d.ts +4 -1
- package/dist/billing/src/__generated__/models/TokenizeCardRequest.d.ts +4 -1
- package/dist/billing/src/__generated__/schemas/$CreateMerchantRequest.d.ts +2 -1
- package/dist/billing/src/__generated__/schemas/$CreateMerchantRequest.js +2 -1
- package/dist/billing/src/__generated__/schemas/$CreateSubscriptionRequest.d.ts +2 -1
- package/dist/billing/src/__generated__/schemas/$CreateSubscriptionRequest.js +2 -1
- package/dist/billing/src/__generated__/schemas/$Merchant.d.ts +2 -2
- package/dist/billing/src/__generated__/schemas/$Merchant.js +2 -2
- package/dist/billing/src/__generated__/schemas/$Package.d.ts +2 -1
- package/dist/billing/src/__generated__/schemas/$Package.js +2 -1
- package/dist/billing/src/__generated__/schemas/$Payment.d.ts +2 -1
- package/dist/billing/src/__generated__/schemas/$Payment.js +2 -1
- package/dist/billing/src/__generated__/schemas/$SavedCard.d.ts +2 -1
- package/dist/billing/src/__generated__/schemas/$SavedCard.js +2 -1
- package/dist/billing/src/__generated__/schemas/$Subscription.d.ts +2 -1
- package/dist/billing/src/__generated__/schemas/$Subscription.js +2 -1
- package/dist/billing/src/__generated__/schemas/$TokenizeCardRequest.d.ts +2 -1
- package/dist/billing/src/__generated__/schemas/$TokenizeCardRequest.js +2 -1
- package/dist/billing/src/__generated__/services/CardsService.d.ts +3 -3
- package/dist/billing/src/__generated__/services/CardsService.js +3 -3
- package/dist/billing/src/__generated__/services/MerchantsService.d.ts +5 -5
- package/dist/billing/src/__generated__/services/MerchantsService.js +7 -7
- package/dist/billing/src/__generated__/services/PackagesService.d.ts +11 -11
- package/dist/billing/src/__generated__/services/PackagesService.js +15 -15
- package/dist/billing/src/__generated__/services/PaymentsService.d.ts +4 -4
- package/dist/billing/src/__generated__/services/PaymentsService.js +4 -4
- package/package.json +1 -1
- package/src/billing/src/__generated__/models/CreateMerchantRequest.ts +4 -1
- package/src/billing/src/__generated__/models/CreateSubscriptionRequest.ts +4 -1
- package/src/billing/src/__generated__/models/Merchant.ts +2 -2
- package/src/billing/src/__generated__/models/Package.ts +4 -1
- package/src/billing/src/__generated__/models/Payment.ts +4 -1
- package/src/billing/src/__generated__/models/SavedCard.ts +4 -1
- package/src/billing/src/__generated__/models/Subscription.ts +4 -1
- package/src/billing/src/__generated__/models/TokenizeCardRequest.ts +4 -1
- package/src/billing/src/__generated__/schemas/$CreateMerchantRequest.ts +2 -1
- package/src/billing/src/__generated__/schemas/$CreateSubscriptionRequest.ts +2 -1
- package/src/billing/src/__generated__/schemas/$Merchant.ts +2 -2
- package/src/billing/src/__generated__/schemas/$Package.ts +2 -1
- package/src/billing/src/__generated__/schemas/$Payment.ts +2 -1
- package/src/billing/src/__generated__/schemas/$SavedCard.ts +2 -1
- package/src/billing/src/__generated__/schemas/$Subscription.ts +2 -1
- package/src/billing/src/__generated__/schemas/$TokenizeCardRequest.ts +2 -1
- package/src/billing/src/__generated__/services/CardsService.ts +5 -5
- package/src/billing/src/__generated__/services/MerchantsService.ts +9 -9
- package/src/billing/src/__generated__/services/PackagesService.ts +26 -26
- package/src/billing/src/__generated__/services/PaymentsService.ts +6 -6
|
@@ -2,9 +2,9 @@ import type { MerchantProviderConfig } from './MerchantProviderConfig';
|
|
|
2
2
|
export type Merchant = {
|
|
3
3
|
_id?: string;
|
|
4
4
|
/**
|
|
5
|
-
* ID
|
|
5
|
+
* Space ID from jogo-backend
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
spaceId?: string;
|
|
8
8
|
name?: string;
|
|
9
9
|
email?: string;
|
|
10
10
|
paymentProvider?: Merchant.paymentProvider;
|
|
@@ -7,8 +7,9 @@ exports.$CreateSubscriptionRequest = void 0;
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
exports.$CreateSubscriptionRequest = {
|
|
9
9
|
properties: {
|
|
10
|
-
|
|
10
|
+
spaceId: {
|
|
11
11
|
type: 'string',
|
|
12
|
+
description: `Space ID from jogo-backend`,
|
|
12
13
|
isRequired: true,
|
|
13
14
|
},
|
|
14
15
|
packageId: {
|
|
@@ -3,9 +3,9 @@ export declare const $Merchant: {
|
|
|
3
3
|
readonly _id: {
|
|
4
4
|
readonly type: "string";
|
|
5
5
|
};
|
|
6
|
-
readonly
|
|
6
|
+
readonly spaceId: {
|
|
7
7
|
readonly type: "string";
|
|
8
|
-
readonly description: "ID
|
|
8
|
+
readonly description: "Space ID from jogo-backend";
|
|
9
9
|
};
|
|
10
10
|
readonly name: {
|
|
11
11
|
readonly type: "string";
|
|
@@ -3,8 +3,9 @@ export declare const $Package: {
|
|
|
3
3
|
readonly _id: {
|
|
4
4
|
readonly type: "string";
|
|
5
5
|
};
|
|
6
|
-
readonly
|
|
6
|
+
readonly spaceId: {
|
|
7
7
|
readonly type: "string";
|
|
8
|
+
readonly description: "Space ID from jogo-backend";
|
|
8
9
|
};
|
|
9
10
|
readonly name: {
|
|
10
11
|
readonly type: "string";
|
|
@@ -3,8 +3,9 @@ export declare const $Payment: {
|
|
|
3
3
|
readonly _id: {
|
|
4
4
|
readonly type: "string";
|
|
5
5
|
};
|
|
6
|
-
readonly
|
|
6
|
+
readonly spaceId: {
|
|
7
7
|
readonly type: "string";
|
|
8
|
+
readonly description: "Space ID from jogo-backend";
|
|
8
9
|
};
|
|
9
10
|
readonly customerId: {
|
|
10
11
|
readonly type: "string";
|
|
@@ -6,8 +6,9 @@ export declare const $SavedCard: {
|
|
|
6
6
|
readonly customerId: {
|
|
7
7
|
readonly type: "string";
|
|
8
8
|
};
|
|
9
|
-
readonly
|
|
9
|
+
readonly spaceId: {
|
|
10
10
|
readonly type: "string";
|
|
11
|
+
readonly description: "Space ID from jogo-backend";
|
|
11
12
|
};
|
|
12
13
|
readonly provider: {
|
|
13
14
|
readonly type: "Enum";
|
|
@@ -3,8 +3,9 @@ export declare const $Subscription: {
|
|
|
3
3
|
readonly _id: {
|
|
4
4
|
readonly type: "string";
|
|
5
5
|
};
|
|
6
|
-
readonly
|
|
6
|
+
readonly spaceId: {
|
|
7
7
|
readonly type: "string";
|
|
8
|
+
readonly description: "Space ID from jogo-backend";
|
|
8
9
|
};
|
|
9
10
|
readonly customerId: {
|
|
10
11
|
readonly type: "string";
|
|
@@ -21,11 +21,11 @@ export declare class CardsService {
|
|
|
21
21
|
* @returns SavedCard Lista de tarjetas guardadas
|
|
22
22
|
* @throws ApiError
|
|
23
23
|
*/
|
|
24
|
-
getApiV1Cards({
|
|
24
|
+
getApiV1Cards({ spaceId, }: {
|
|
25
25
|
/**
|
|
26
26
|
* ID del merchant para filtrar las tarjetas
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
spaceId: string;
|
|
29
29
|
}): CancelablePromise<Array<SavedCard>>;
|
|
30
30
|
/**
|
|
31
31
|
* Establecer tarjeta predeterminada
|
|
@@ -37,7 +37,7 @@ export declare class CardsService {
|
|
|
37
37
|
patchApiV1CardsDefault({ id, requestBody, }: {
|
|
38
38
|
id: string;
|
|
39
39
|
requestBody: {
|
|
40
|
-
|
|
40
|
+
spaceId: string;
|
|
41
41
|
};
|
|
42
42
|
}): CancelablePromise<{
|
|
43
43
|
message?: string;
|
|
@@ -31,15 +31,15 @@ class CardsService {
|
|
|
31
31
|
* @returns SavedCard Lista de tarjetas guardadas
|
|
32
32
|
* @throws ApiError
|
|
33
33
|
*/
|
|
34
|
-
getApiV1Cards({
|
|
34
|
+
getApiV1Cards({ spaceId, }) {
|
|
35
35
|
return this.httpRequest.request({
|
|
36
36
|
method: 'GET',
|
|
37
37
|
url: '/api/v1/cards',
|
|
38
38
|
query: {
|
|
39
|
-
'
|
|
39
|
+
'spaceId': spaceId,
|
|
40
40
|
},
|
|
41
41
|
errors: {
|
|
42
|
-
400: `
|
|
42
|
+
400: `spaceId requerido`,
|
|
43
43
|
401: `Token JWT ausente o inválido`,
|
|
44
44
|
},
|
|
45
45
|
});
|
|
@@ -17,17 +17,17 @@ export declare class MerchantsService {
|
|
|
17
17
|
requestBody: CreateMerchantRequest;
|
|
18
18
|
}): CancelablePromise<Merchant>;
|
|
19
19
|
/**
|
|
20
|
-
* Obtener negocio por
|
|
20
|
+
* Obtener negocio por spaceId
|
|
21
21
|
* Retorna la configuración del negocio sin incluir la API Key del proveedor de pago.
|
|
22
22
|
*
|
|
23
23
|
* @returns Merchant Configuración del negocio (sin API Key)
|
|
24
24
|
* @throws ApiError
|
|
25
25
|
*/
|
|
26
|
-
getApiV1MerchantsBusiness({
|
|
26
|
+
getApiV1MerchantsBusiness({ spaceId, }: {
|
|
27
27
|
/**
|
|
28
28
|
* ID del negocio en jogo-backend
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
spaceId: string;
|
|
31
31
|
}): CancelablePromise<Merchant>;
|
|
32
32
|
/**
|
|
33
33
|
* Actualizar configuración del negocio
|
|
@@ -36,8 +36,8 @@ export declare class MerchantsService {
|
|
|
36
36
|
* @returns Merchant Negocio actualizado
|
|
37
37
|
* @throws ApiError
|
|
38
38
|
*/
|
|
39
|
-
putApiV1MerchantsBusiness({
|
|
40
|
-
|
|
39
|
+
putApiV1MerchantsBusiness({ spaceId, requestBody, }: {
|
|
40
|
+
spaceId: string;
|
|
41
41
|
requestBody: UpdateMerchantRequest;
|
|
42
42
|
}): CancelablePromise<Merchant>;
|
|
43
43
|
}
|
|
@@ -26,18 +26,18 @@ class MerchantsService {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Obtener negocio por
|
|
29
|
+
* Obtener negocio por spaceId
|
|
30
30
|
* Retorna la configuración del negocio sin incluir la API Key del proveedor de pago.
|
|
31
31
|
*
|
|
32
32
|
* @returns Merchant Configuración del negocio (sin API Key)
|
|
33
33
|
* @throws ApiError
|
|
34
34
|
*/
|
|
35
|
-
getApiV1MerchantsBusiness({
|
|
35
|
+
getApiV1MerchantsBusiness({ spaceId, }) {
|
|
36
36
|
return this.httpRequest.request({
|
|
37
37
|
method: 'GET',
|
|
38
|
-
url: '/api/v1/merchants/business/{
|
|
38
|
+
url: '/api/v1/merchants/business/{spaceId}',
|
|
39
39
|
path: {
|
|
40
|
-
'
|
|
40
|
+
'spaceId': spaceId,
|
|
41
41
|
},
|
|
42
42
|
errors: {
|
|
43
43
|
401: `Token JWT ausente o inválido`,
|
|
@@ -52,12 +52,12 @@ class MerchantsService {
|
|
|
52
52
|
* @returns Merchant Negocio actualizado
|
|
53
53
|
* @throws ApiError
|
|
54
54
|
*/
|
|
55
|
-
putApiV1MerchantsBusiness({
|
|
55
|
+
putApiV1MerchantsBusiness({ spaceId, requestBody, }) {
|
|
56
56
|
return this.httpRequest.request({
|
|
57
57
|
method: 'PUT',
|
|
58
|
-
url: '/api/v1/merchants/business/{
|
|
58
|
+
url: '/api/v1/merchants/business/{spaceId}',
|
|
59
59
|
path: {
|
|
60
|
-
'
|
|
60
|
+
'spaceId': spaceId,
|
|
61
61
|
},
|
|
62
62
|
body: requestBody,
|
|
63
63
|
mediaType: 'application/json',
|
|
@@ -12,11 +12,11 @@ export declare class PackagesService {
|
|
|
12
12
|
* @returns Package Paquete creado
|
|
13
13
|
* @throws ApiError
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
postApiV1SpacesPackages({ spaceId, requestBody, }: {
|
|
16
16
|
/**
|
|
17
|
-
* ID
|
|
17
|
+
* Space ID from jogo-backend
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
spaceId: string;
|
|
20
20
|
requestBody: CreatePackageRequest;
|
|
21
21
|
}): CancelablePromise<Package>;
|
|
22
22
|
/**
|
|
@@ -26,8 +26,8 @@ export declare class PackagesService {
|
|
|
26
26
|
* @returns Package Lista de paquetes
|
|
27
27
|
* @throws ApiError
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
getApiV1SpacesPackages({ spaceId, all, }: {
|
|
30
|
+
spaceId: string;
|
|
31
31
|
/**
|
|
32
32
|
* Si es `true`, incluye paquetes inactivos
|
|
33
33
|
*/
|
|
@@ -38,8 +38,8 @@ export declare class PackagesService {
|
|
|
38
38
|
* @returns Package Detalle del paquete
|
|
39
39
|
* @throws ApiError
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
getApiV1SpacesPackages1({ spaceId, id, }: {
|
|
42
|
+
spaceId: string;
|
|
43
43
|
id: string;
|
|
44
44
|
}): CancelablePromise<Package>;
|
|
45
45
|
/**
|
|
@@ -47,8 +47,8 @@ export declare class PackagesService {
|
|
|
47
47
|
* @returns Package Paquete actualizado
|
|
48
48
|
* @throws ApiError
|
|
49
49
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
putApiV1SpacesPackages({ spaceId, id, requestBody, }: {
|
|
51
|
+
spaceId: string;
|
|
52
52
|
id: string;
|
|
53
53
|
requestBody: UpdatePackageRequest;
|
|
54
54
|
}): CancelablePromise<Package>;
|
|
@@ -59,8 +59,8 @@ export declare class PackagesService {
|
|
|
59
59
|
* @returns Package Paquete desactivado
|
|
60
60
|
* @throws ApiError
|
|
61
61
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
deleteApiV1SpacesPackages({ spaceId, id, }: {
|
|
63
|
+
spaceId: string;
|
|
64
64
|
id: string;
|
|
65
65
|
}): CancelablePromise<Package>;
|
|
66
66
|
}
|
|
@@ -12,12 +12,12 @@ class PackagesService {
|
|
|
12
12
|
* @returns Package Paquete creado
|
|
13
13
|
* @throws ApiError
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
postApiV1SpacesPackages({ spaceId, requestBody, }) {
|
|
16
16
|
return this.httpRequest.request({
|
|
17
17
|
method: 'POST',
|
|
18
|
-
url: '/api/v1/
|
|
18
|
+
url: '/api/v1/spaces/{spaceId}/packages',
|
|
19
19
|
path: {
|
|
20
|
-
'
|
|
20
|
+
'spaceId': spaceId,
|
|
21
21
|
},
|
|
22
22
|
body: requestBody,
|
|
23
23
|
mediaType: 'application/json',
|
|
@@ -33,12 +33,12 @@ class PackagesService {
|
|
|
33
33
|
* @returns Package Lista de paquetes
|
|
34
34
|
* @throws ApiError
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
getApiV1SpacesPackages({ spaceId, all, }) {
|
|
37
37
|
return this.httpRequest.request({
|
|
38
38
|
method: 'GET',
|
|
39
|
-
url: '/api/v1/
|
|
39
|
+
url: '/api/v1/spaces/{spaceId}/packages',
|
|
40
40
|
path: {
|
|
41
|
-
'
|
|
41
|
+
'spaceId': spaceId,
|
|
42
42
|
},
|
|
43
43
|
query: {
|
|
44
44
|
'all': all,
|
|
@@ -50,12 +50,12 @@ class PackagesService {
|
|
|
50
50
|
* @returns Package Detalle del paquete
|
|
51
51
|
* @throws ApiError
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
getApiV1SpacesPackages1({ spaceId, id, }) {
|
|
54
54
|
return this.httpRequest.request({
|
|
55
55
|
method: 'GET',
|
|
56
|
-
url: '/api/v1/
|
|
56
|
+
url: '/api/v1/spaces/{spaceId}/packages/{id}',
|
|
57
57
|
path: {
|
|
58
|
-
'
|
|
58
|
+
'spaceId': spaceId,
|
|
59
59
|
'id': id,
|
|
60
60
|
},
|
|
61
61
|
errors: {
|
|
@@ -68,12 +68,12 @@ class PackagesService {
|
|
|
68
68
|
* @returns Package Paquete actualizado
|
|
69
69
|
* @throws ApiError
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
putApiV1SpacesPackages({ spaceId, id, requestBody, }) {
|
|
72
72
|
return this.httpRequest.request({
|
|
73
73
|
method: 'PUT',
|
|
74
|
-
url: '/api/v1/
|
|
74
|
+
url: '/api/v1/spaces/{spaceId}/packages/{id}',
|
|
75
75
|
path: {
|
|
76
|
-
'
|
|
76
|
+
'spaceId': spaceId,
|
|
77
77
|
'id': id,
|
|
78
78
|
},
|
|
79
79
|
body: requestBody,
|
|
@@ -92,12 +92,12 @@ class PackagesService {
|
|
|
92
92
|
* @returns Package Paquete desactivado
|
|
93
93
|
* @throws ApiError
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
deleteApiV1SpacesPackages({ spaceId, id, }) {
|
|
96
96
|
return this.httpRequest.request({
|
|
97
97
|
method: 'DELETE',
|
|
98
|
-
url: '/api/v1/
|
|
98
|
+
url: '/api/v1/spaces/{spaceId}/packages/{id}',
|
|
99
99
|
path: {
|
|
100
|
-
'
|
|
100
|
+
'spaceId': spaceId,
|
|
101
101
|
'id': id,
|
|
102
102
|
},
|
|
103
103
|
errors: {
|
|
@@ -8,16 +8,16 @@ export declare class PaymentsService {
|
|
|
8
8
|
* Webhook de notificación de Wompi
|
|
9
9
|
* Endpoint que Wompi llama para notificar el resultado de una transacción. **No requiere autenticación** — es invocado directamente por Wompi.
|
|
10
10
|
* Al recibir un pago completado (`APROBADA`), activa automáticamente la suscripción asociada.
|
|
11
|
-
* Configurar esta URL en el `webhookUrl` del merchant: `POST https://tu-servidor.com/api/v1/webhooks/{
|
|
11
|
+
* Configurar esta URL en el `webhookUrl` del merchant: `POST https://tu-servidor.com/api/v1/webhooks/{spaceId}`
|
|
12
12
|
*
|
|
13
13
|
* @returns any Webhook recibido y procesado
|
|
14
14
|
* @throws ApiError
|
|
15
15
|
*/
|
|
16
|
-
postApiV1Webhooks({
|
|
16
|
+
postApiV1Webhooks({ spaceId, requestBody, }: {
|
|
17
17
|
/**
|
|
18
|
-
* ID
|
|
18
|
+
* Space ID from jogo-backend
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
spaceId: string;
|
|
21
21
|
requestBody: {
|
|
22
22
|
/**
|
|
23
23
|
* ID de la transacción en Wompi
|
|
@@ -10,17 +10,17 @@ class PaymentsService {
|
|
|
10
10
|
* Webhook de notificación de Wompi
|
|
11
11
|
* Endpoint que Wompi llama para notificar el resultado de una transacción. **No requiere autenticación** — es invocado directamente por Wompi.
|
|
12
12
|
* Al recibir un pago completado (`APROBADA`), activa automáticamente la suscripción asociada.
|
|
13
|
-
* Configurar esta URL en el `webhookUrl` del merchant: `POST https://tu-servidor.com/api/v1/webhooks/{
|
|
13
|
+
* Configurar esta URL en el `webhookUrl` del merchant: `POST https://tu-servidor.com/api/v1/webhooks/{spaceId}`
|
|
14
14
|
*
|
|
15
15
|
* @returns any Webhook recibido y procesado
|
|
16
16
|
* @throws ApiError
|
|
17
17
|
*/
|
|
18
|
-
postApiV1Webhooks({
|
|
18
|
+
postApiV1Webhooks({ spaceId, requestBody, }) {
|
|
19
19
|
return this.httpRequest.request({
|
|
20
20
|
method: 'POST',
|
|
21
|
-
url: '/api/v1/webhooks/{
|
|
21
|
+
url: '/api/v1/webhooks/{spaceId}',
|
|
22
22
|
path: {
|
|
23
|
-
'
|
|
23
|
+
'spaceId': spaceId,
|
|
24
24
|
},
|
|
25
25
|
body: requestBody,
|
|
26
26
|
mediaType: 'application/json',
|
package/package.json
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
export type CreateMerchantRequest = {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Space ID from jogo-backend
|
|
8
|
+
*/
|
|
9
|
+
spaceId: string;
|
|
7
10
|
name: string;
|
|
8
11
|
email: string;
|
|
9
12
|
paymentProvider?: CreateMerchantRequest.paymentProvider;
|
|
@@ -6,9 +6,9 @@ import type { MerchantProviderConfig } from './MerchantProviderConfig';
|
|
|
6
6
|
export type Merchant = {
|
|
7
7
|
_id?: string;
|
|
8
8
|
/**
|
|
9
|
-
* ID
|
|
9
|
+
* Space ID from jogo-backend
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
spaceId?: string;
|
|
12
12
|
name?: string;
|
|
13
13
|
email?: string;
|
|
14
14
|
paymentProvider?: Merchant.paymentProvider;
|
|
@@ -38,21 +38,21 @@ export class CardsService {
|
|
|
38
38
|
* @throws ApiError
|
|
39
39
|
*/
|
|
40
40
|
public getApiV1Cards({
|
|
41
|
-
|
|
41
|
+
spaceId,
|
|
42
42
|
}: {
|
|
43
43
|
/**
|
|
44
44
|
* ID del merchant para filtrar las tarjetas
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
spaceId: string,
|
|
47
47
|
}): CancelablePromise<Array<SavedCard>> {
|
|
48
48
|
return this.httpRequest.request({
|
|
49
49
|
method: 'GET',
|
|
50
50
|
url: '/api/v1/cards',
|
|
51
51
|
query: {
|
|
52
|
-
'
|
|
52
|
+
'spaceId': spaceId,
|
|
53
53
|
},
|
|
54
54
|
errors: {
|
|
55
|
-
400: `
|
|
55
|
+
400: `spaceId requerido`,
|
|
56
56
|
401: `Token JWT ausente o inválido`,
|
|
57
57
|
},
|
|
58
58
|
});
|
|
@@ -70,7 +70,7 @@ export class CardsService {
|
|
|
70
70
|
}: {
|
|
71
71
|
id: string,
|
|
72
72
|
requestBody: {
|
|
73
|
-
|
|
73
|
+
spaceId: string;
|
|
74
74
|
},
|
|
75
75
|
}): CancelablePromise<{
|
|
76
76
|
message?: string;
|
|
@@ -33,25 +33,25 @@ export class MerchantsService {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* Obtener negocio por
|
|
36
|
+
* Obtener negocio por spaceId
|
|
37
37
|
* Retorna la configuración del negocio sin incluir la API Key del proveedor de pago.
|
|
38
38
|
*
|
|
39
39
|
* @returns Merchant Configuración del negocio (sin API Key)
|
|
40
40
|
* @throws ApiError
|
|
41
41
|
*/
|
|
42
42
|
public getApiV1MerchantsBusiness({
|
|
43
|
-
|
|
43
|
+
spaceId,
|
|
44
44
|
}: {
|
|
45
45
|
/**
|
|
46
46
|
* ID del negocio en jogo-backend
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
spaceId: string,
|
|
49
49
|
}): CancelablePromise<Merchant> {
|
|
50
50
|
return this.httpRequest.request({
|
|
51
51
|
method: 'GET',
|
|
52
|
-
url: '/api/v1/merchants/business/{
|
|
52
|
+
url: '/api/v1/merchants/business/{spaceId}',
|
|
53
53
|
path: {
|
|
54
|
-
'
|
|
54
|
+
'spaceId': spaceId,
|
|
55
55
|
},
|
|
56
56
|
errors: {
|
|
57
57
|
401: `Token JWT ausente o inválido`,
|
|
@@ -67,17 +67,17 @@ export class MerchantsService {
|
|
|
67
67
|
* @throws ApiError
|
|
68
68
|
*/
|
|
69
69
|
public putApiV1MerchantsBusiness({
|
|
70
|
-
|
|
70
|
+
spaceId,
|
|
71
71
|
requestBody,
|
|
72
72
|
}: {
|
|
73
|
-
|
|
73
|
+
spaceId: string,
|
|
74
74
|
requestBody: UpdateMerchantRequest,
|
|
75
75
|
}): CancelablePromise<Merchant> {
|
|
76
76
|
return this.httpRequest.request({
|
|
77
77
|
method: 'PUT',
|
|
78
|
-
url: '/api/v1/merchants/business/{
|
|
78
|
+
url: '/api/v1/merchants/business/{spaceId}',
|
|
79
79
|
path: {
|
|
80
|
-
'
|
|
80
|
+
'spaceId': spaceId,
|
|
81
81
|
},
|
|
82
82
|
body: requestBody,
|
|
83
83
|
mediaType: 'application/json',
|
|
@@ -15,21 +15,21 @@ export class PackagesService {
|
|
|
15
15
|
* @returns Package Paquete creado
|
|
16
16
|
* @throws ApiError
|
|
17
17
|
*/
|
|
18
|
-
public
|
|
19
|
-
|
|
18
|
+
public postApiV1SpacesPackages({
|
|
19
|
+
spaceId,
|
|
20
20
|
requestBody,
|
|
21
21
|
}: {
|
|
22
22
|
/**
|
|
23
|
-
* ID
|
|
23
|
+
* Space ID from jogo-backend
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
spaceId: string,
|
|
26
26
|
requestBody: CreatePackageRequest,
|
|
27
27
|
}): CancelablePromise<Package> {
|
|
28
28
|
return this.httpRequest.request({
|
|
29
29
|
method: 'POST',
|
|
30
|
-
url: '/api/v1/
|
|
30
|
+
url: '/api/v1/spaces/{spaceId}/packages',
|
|
31
31
|
path: {
|
|
32
|
-
'
|
|
32
|
+
'spaceId': spaceId,
|
|
33
33
|
},
|
|
34
34
|
body: requestBody,
|
|
35
35
|
mediaType: 'application/json',
|
|
@@ -45,11 +45,11 @@ export class PackagesService {
|
|
|
45
45
|
* @returns Package Lista de paquetes
|
|
46
46
|
* @throws ApiError
|
|
47
47
|
*/
|
|
48
|
-
public
|
|
49
|
-
|
|
48
|
+
public getApiV1SpacesPackages({
|
|
49
|
+
spaceId,
|
|
50
50
|
all,
|
|
51
51
|
}: {
|
|
52
|
-
|
|
52
|
+
spaceId: string,
|
|
53
53
|
/**
|
|
54
54
|
* Si es `true`, incluye paquetes inactivos
|
|
55
55
|
*/
|
|
@@ -57,9 +57,9 @@ export class PackagesService {
|
|
|
57
57
|
}): CancelablePromise<Array<Package>> {
|
|
58
58
|
return this.httpRequest.request({
|
|
59
59
|
method: 'GET',
|
|
60
|
-
url: '/api/v1/
|
|
60
|
+
url: '/api/v1/spaces/{spaceId}/packages',
|
|
61
61
|
path: {
|
|
62
|
-
'
|
|
62
|
+
'spaceId': spaceId,
|
|
63
63
|
},
|
|
64
64
|
query: {
|
|
65
65
|
'all': all,
|
|
@@ -71,18 +71,18 @@ export class PackagesService {
|
|
|
71
71
|
* @returns Package Detalle del paquete
|
|
72
72
|
* @throws ApiError
|
|
73
73
|
*/
|
|
74
|
-
public
|
|
75
|
-
|
|
74
|
+
public getApiV1SpacesPackages1({
|
|
75
|
+
spaceId,
|
|
76
76
|
id,
|
|
77
77
|
}: {
|
|
78
|
-
|
|
78
|
+
spaceId: string,
|
|
79
79
|
id: string,
|
|
80
80
|
}): CancelablePromise<Package> {
|
|
81
81
|
return this.httpRequest.request({
|
|
82
82
|
method: 'GET',
|
|
83
|
-
url: '/api/v1/
|
|
83
|
+
url: '/api/v1/spaces/{spaceId}/packages/{id}',
|
|
84
84
|
path: {
|
|
85
|
-
'
|
|
85
|
+
'spaceId': spaceId,
|
|
86
86
|
'id': id,
|
|
87
87
|
},
|
|
88
88
|
errors: {
|
|
@@ -95,20 +95,20 @@ export class PackagesService {
|
|
|
95
95
|
* @returns Package Paquete actualizado
|
|
96
96
|
* @throws ApiError
|
|
97
97
|
*/
|
|
98
|
-
public
|
|
99
|
-
|
|
98
|
+
public putApiV1SpacesPackages({
|
|
99
|
+
spaceId,
|
|
100
100
|
id,
|
|
101
101
|
requestBody,
|
|
102
102
|
}: {
|
|
103
|
-
|
|
103
|
+
spaceId: string,
|
|
104
104
|
id: string,
|
|
105
105
|
requestBody: UpdatePackageRequest,
|
|
106
106
|
}): CancelablePromise<Package> {
|
|
107
107
|
return this.httpRequest.request({
|
|
108
108
|
method: 'PUT',
|
|
109
|
-
url: '/api/v1/
|
|
109
|
+
url: '/api/v1/spaces/{spaceId}/packages/{id}',
|
|
110
110
|
path: {
|
|
111
|
-
'
|
|
111
|
+
'spaceId': spaceId,
|
|
112
112
|
'id': id,
|
|
113
113
|
},
|
|
114
114
|
body: requestBody,
|
|
@@ -127,18 +127,18 @@ export class PackagesService {
|
|
|
127
127
|
* @returns Package Paquete desactivado
|
|
128
128
|
* @throws ApiError
|
|
129
129
|
*/
|
|
130
|
-
public
|
|
131
|
-
|
|
130
|
+
public deleteApiV1SpacesPackages({
|
|
131
|
+
spaceId,
|
|
132
132
|
id,
|
|
133
133
|
}: {
|
|
134
|
-
|
|
134
|
+
spaceId: string,
|
|
135
135
|
id: string,
|
|
136
136
|
}): CancelablePromise<Package> {
|
|
137
137
|
return this.httpRequest.request({
|
|
138
138
|
method: 'DELETE',
|
|
139
|
-
url: '/api/v1/
|
|
139
|
+
url: '/api/v1/spaces/{spaceId}/packages/{id}',
|
|
140
140
|
path: {
|
|
141
|
-
'
|
|
141
|
+
'spaceId': spaceId,
|
|
142
142
|
'id': id,
|
|
143
143
|
},
|
|
144
144
|
errors: {
|
|
@@ -11,19 +11,19 @@ export class PaymentsService {
|
|
|
11
11
|
* Webhook de notificación de Wompi
|
|
12
12
|
* Endpoint que Wompi llama para notificar el resultado de una transacción. **No requiere autenticación** — es invocado directamente por Wompi.
|
|
13
13
|
* Al recibir un pago completado (`APROBADA`), activa automáticamente la suscripción asociada.
|
|
14
|
-
* Configurar esta URL en el `webhookUrl` del merchant: `POST https://tu-servidor.com/api/v1/webhooks/{
|
|
14
|
+
* Configurar esta URL en el `webhookUrl` del merchant: `POST https://tu-servidor.com/api/v1/webhooks/{spaceId}`
|
|
15
15
|
*
|
|
16
16
|
* @returns any Webhook recibido y procesado
|
|
17
17
|
* @throws ApiError
|
|
18
18
|
*/
|
|
19
19
|
public postApiV1Webhooks({
|
|
20
|
-
|
|
20
|
+
spaceId,
|
|
21
21
|
requestBody,
|
|
22
22
|
}: {
|
|
23
23
|
/**
|
|
24
|
-
* ID
|
|
24
|
+
* Space ID from jogo-backend
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
spaceId: string,
|
|
27
27
|
requestBody: {
|
|
28
28
|
/**
|
|
29
29
|
* ID de la transacción en Wompi
|
|
@@ -41,9 +41,9 @@ export class PaymentsService {
|
|
|
41
41
|
}> {
|
|
42
42
|
return this.httpRequest.request({
|
|
43
43
|
method: 'POST',
|
|
44
|
-
url: '/api/v1/webhooks/{
|
|
44
|
+
url: '/api/v1/webhooks/{spaceId}',
|
|
45
45
|
path: {
|
|
46
|
-
'
|
|
46
|
+
'spaceId': spaceId,
|
|
47
47
|
},
|
|
48
48
|
body: requestBody,
|
|
49
49
|
mediaType: 'application/json',
|