@jogolabs/billing-sdk-v2 0.0.1
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/.eslintignore +1 -0
- package/.eslintrc.js +18 -0
- package/dist/billing/src/__generated__/Billing.d.ts +20 -0
- package/dist/billing/src/__generated__/Billing.js +39 -0
- package/dist/billing/src/__generated__/core/ApiError.d.ts +10 -0
- package/dist/billing/src/__generated__/core/ApiError.js +20 -0
- package/dist/billing/src/__generated__/core/ApiRequestOptions.d.ts +13 -0
- package/dist/billing/src/__generated__/core/ApiRequestOptions.js +2 -0
- package/dist/billing/src/__generated__/core/ApiResult.d.ts +7 -0
- package/dist/billing/src/__generated__/core/ApiResult.js +2 -0
- package/dist/billing/src/__generated__/core/AxiosHttpRequest.d.ts +14 -0
- package/dist/billing/src/__generated__/core/AxiosHttpRequest.js +20 -0
- package/dist/billing/src/__generated__/core/BaseHttpRequest.d.ts +8 -0
- package/dist/billing/src/__generated__/core/BaseHttpRequest.js +10 -0
- package/dist/billing/src/__generated__/core/CancelablePromise.d.ts +20 -0
- package/dist/billing/src/__generated__/core/CancelablePromise.js +104 -0
- package/dist/billing/src/__generated__/core/OpenAPI.d.ts +16 -0
- package/dist/billing/src/__generated__/core/OpenAPI.js +14 -0
- package/dist/billing/src/__generated__/core/request.d.ts +34 -0
- package/dist/billing/src/__generated__/core/request.js +292 -0
- package/dist/billing/src/__generated__/index.d.ts +42 -0
- package/dist/billing/src/__generated__/index.js +74 -0
- package/dist/billing/src/__generated__/models/ConsumeClassResponse.d.ts +5 -0
- package/dist/billing/src/__generated__/models/ConsumeClassResponse.js +2 -0
- package/dist/billing/src/__generated__/models/CreateMerchantRequest.d.ts +23 -0
- package/dist/billing/src/__generated__/models/CreateMerchantRequest.js +15 -0
- package/dist/billing/src/__generated__/models/CreatePackageRequest.d.ts +8 -0
- package/dist/billing/src/__generated__/models/CreatePackageRequest.js +2 -0
- package/dist/billing/src/__generated__/models/CreateSubscriptionRequest.d.ts +25 -0
- package/dist/billing/src/__generated__/models/CreateSubscriptionRequest.js +2 -0
- package/dist/billing/src/__generated__/models/CreateSubscriptionResponse.d.ts +8 -0
- package/dist/billing/src/__generated__/models/CreateSubscriptionResponse.js +2 -0
- package/dist/billing/src/__generated__/models/Error.d.ts +3 -0
- package/dist/billing/src/__generated__/models/Error.js +2 -0
- package/dist/billing/src/__generated__/models/Merchant.d.ts +20 -0
- package/dist/billing/src/__generated__/models/Merchant.js +10 -0
- package/dist/billing/src/__generated__/models/MerchantProviderConfig.d.ts +15 -0
- package/dist/billing/src/__generated__/models/MerchantProviderConfig.js +11 -0
- package/dist/billing/src/__generated__/models/Package.d.ts +14 -0
- package/dist/billing/src/__generated__/models/Package.js +2 -0
- package/dist/billing/src/__generated__/models/Payment.d.ts +32 -0
- package/dist/billing/src/__generated__/models/Payment.js +22 -0
- package/dist/billing/src/__generated__/models/SavedCard.d.ts +18 -0
- package/dist/billing/src/__generated__/models/SavedCard.js +10 -0
- package/dist/billing/src/__generated__/models/Subscription.d.ts +33 -0
- package/dist/billing/src/__generated__/models/Subscription.js +14 -0
- package/dist/billing/src/__generated__/models/TokenizeCardRequest.d.ts +8 -0
- package/dist/billing/src/__generated__/models/TokenizeCardRequest.js +2 -0
- package/dist/billing/src/__generated__/models/UpdateMerchantRequest.d.ts +16 -0
- package/dist/billing/src/__generated__/models/UpdateMerchantRequest.js +11 -0
- package/dist/billing/src/__generated__/models/UpdatePackageRequest.d.ts +9 -0
- package/dist/billing/src/__generated__/models/UpdatePackageRequest.js +2 -0
- package/dist/billing/src/__generated__/schemas/$ConsumeClassResponse.d.ts +10 -0
- package/dist/billing/src/__generated__/schemas/$ConsumeClassResponse.js +17 -0
- package/dist/billing/src/__generated__/schemas/$CreateMerchantRequest.d.ts +39 -0
- package/dist/billing/src/__generated__/schemas/$CreateMerchantRequest.js +46 -0
- package/dist/billing/src/__generated__/schemas/$CreatePackageRequest.d.ts +28 -0
- package/dist/billing/src/__generated__/schemas/$CreatePackageRequest.js +35 -0
- package/dist/billing/src/__generated__/schemas/$CreateSubscriptionRequest.d.ts +57 -0
- package/dist/billing/src/__generated__/schemas/$CreateSubscriptionRequest.js +64 -0
- package/dist/billing/src/__generated__/schemas/$CreateSubscriptionResponse.d.ts +13 -0
- package/dist/billing/src/__generated__/schemas/$CreateSubscriptionResponse.js +20 -0
- package/dist/billing/src/__generated__/schemas/$Error.d.ts +7 -0
- package/dist/billing/src/__generated__/schemas/$Error.js +14 -0
- package/dist/billing/src/__generated__/schemas/$Merchant.d.ts +35 -0
- package/dist/billing/src/__generated__/schemas/$Merchant.js +42 -0
- package/dist/billing/src/__generated__/schemas/$MerchantProviderConfig.d.ts +19 -0
- package/dist/billing/src/__generated__/schemas/$MerchantProviderConfig.js +26 -0
- package/dist/billing/src/__generated__/schemas/$Package.d.ts +43 -0
- package/dist/billing/src/__generated__/schemas/$Package.js +50 -0
- package/dist/billing/src/__generated__/schemas/$Payment.d.ts +43 -0
- package/dist/billing/src/__generated__/schemas/$Payment.js +50 -0
- package/dist/billing/src/__generated__/schemas/$SavedCard.d.ts +39 -0
- package/dist/billing/src/__generated__/schemas/$SavedCard.js +46 -0
- package/dist/billing/src/__generated__/schemas/$Subscription.d.ts +63 -0
- package/dist/billing/src/__generated__/schemas/$Subscription.js +70 -0
- package/dist/billing/src/__generated__/schemas/$TokenizeCardRequest.d.ts +29 -0
- package/dist/billing/src/__generated__/schemas/$TokenizeCardRequest.js +36 -0
- package/dist/billing/src/__generated__/schemas/$UpdateMerchantRequest.d.ts +31 -0
- package/dist/billing/src/__generated__/schemas/$UpdateMerchantRequest.js +38 -0
- package/dist/billing/src/__generated__/schemas/$UpdatePackageRequest.d.ts +27 -0
- package/dist/billing/src/__generated__/schemas/$UpdatePackageRequest.js +34 -0
- package/dist/billing/src/__generated__/services/CardsService.d.ts +54 -0
- package/dist/billing/src/__generated__/services/CardsService.js +89 -0
- package/dist/billing/src/__generated__/services/HealthService.d.ts +16 -0
- package/dist/billing/src/__generated__/services/HealthService.js +22 -0
- package/dist/billing/src/__generated__/services/MerchantsService.d.ts +43 -0
- package/dist/billing/src/__generated__/services/MerchantsService.js +71 -0
- package/dist/billing/src/__generated__/services/PackagesService.d.ts +66 -0
- package/dist/billing/src/__generated__/services/PackagesService.js +110 -0
- package/dist/billing/src/__generated__/services/PaymentsService.d.ts +53 -0
- package/dist/billing/src/__generated__/services/PaymentsService.js +66 -0
- package/dist/billing/src/__generated__/services/SubscriptionsService.d.ts +86 -0
- package/dist/billing/src/__generated__/services/SubscriptionsService.js +148 -0
- package/dist/billing/src/index.d.ts +1 -0
- package/dist/billing/src/index.js +17 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +54 -0
- package/package.json +36 -0
- package/scripts/generate-api-sdk.js +86 -0
- package/scripts/publish.js +72 -0
- package/src/billing/src/__generated__/Billing.ts +43 -0
- package/src/billing/src/__generated__/core/ApiError.ts +25 -0
- package/src/billing/src/__generated__/core/ApiRequestOptions.ts +17 -0
- package/src/billing/src/__generated__/core/ApiResult.ts +11 -0
- package/src/billing/src/__generated__/core/AxiosHttpRequest.ts +26 -0
- package/src/billing/src/__generated__/core/BaseHttpRequest.ts +14 -0
- package/src/billing/src/__generated__/core/CancelablePromise.ts +131 -0
- package/src/billing/src/__generated__/core/OpenAPI.ts +32 -0
- package/src/billing/src/__generated__/core/request.ts +323 -0
- package/src/billing/src/__generated__/index.ts +50 -0
- package/src/billing/src/__generated__/models/ConsumeClassResponse.ts +10 -0
- package/src/billing/src/__generated__/models/CreateMerchantRequest.ts +28 -0
- package/src/billing/src/__generated__/models/CreatePackageRequest.ts +13 -0
- package/src/billing/src/__generated__/models/CreateSubscriptionRequest.ts +30 -0
- package/src/billing/src/__generated__/models/CreateSubscriptionResponse.ts +13 -0
- package/src/billing/src/__generated__/models/Error.ts +8 -0
- package/src/billing/src/__generated__/models/Merchant.ts +25 -0
- package/src/billing/src/__generated__/models/MerchantProviderConfig.ts +20 -0
- package/src/billing/src/__generated__/models/Package.ts +19 -0
- package/src/billing/src/__generated__/models/Payment.ts +37 -0
- package/src/billing/src/__generated__/models/SavedCard.ts +23 -0
- package/src/billing/src/__generated__/models/Subscription.ts +38 -0
- package/src/billing/src/__generated__/models/TokenizeCardRequest.ts +13 -0
- package/src/billing/src/__generated__/models/UpdateMerchantRequest.ts +21 -0
- package/src/billing/src/__generated__/models/UpdatePackageRequest.ts +14 -0
- package/src/billing/src/__generated__/schemas/$ConsumeClassResponse.ts +14 -0
- package/src/billing/src/__generated__/schemas/$CreateMerchantRequest.ts +43 -0
- package/src/billing/src/__generated__/schemas/$CreatePackageRequest.ts +32 -0
- package/src/billing/src/__generated__/schemas/$CreateSubscriptionRequest.ts +61 -0
- package/src/billing/src/__generated__/schemas/$CreateSubscriptionResponse.ts +17 -0
- package/src/billing/src/__generated__/schemas/$Error.ts +11 -0
- package/src/billing/src/__generated__/schemas/$Merchant.ts +39 -0
- package/src/billing/src/__generated__/schemas/$MerchantProviderConfig.ts +23 -0
- package/src/billing/src/__generated__/schemas/$Package.ts +47 -0
- package/src/billing/src/__generated__/schemas/$Payment.ts +47 -0
- package/src/billing/src/__generated__/schemas/$SavedCard.ts +43 -0
- package/src/billing/src/__generated__/schemas/$Subscription.ts +67 -0
- package/src/billing/src/__generated__/schemas/$TokenizeCardRequest.ts +33 -0
- package/src/billing/src/__generated__/schemas/$UpdateMerchantRequest.ts +35 -0
- package/src/billing/src/__generated__/schemas/$UpdatePackageRequest.ts +31 -0
- package/src/billing/src/__generated__/services/CardsService.ts +115 -0
- package/src/billing/src/__generated__/services/HealthService.ts +24 -0
- package/src/billing/src/__generated__/services/MerchantsService.ts +90 -0
- package/src/billing/src/__generated__/services/PackagesService.ts +150 -0
- package/src/billing/src/__generated__/services/PaymentsService.ts +96 -0
- package/src/billing/src/__generated__/services/SubscriptionsService.ts +185 -0
- package/src/billing/src/index.ts +1 -0
- package/src/index.ts +49 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type Package = {
|
|
6
|
+
_id?: string;
|
|
7
|
+
merchantId?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
numberOfClasses?: number;
|
|
11
|
+
durationDays?: number;
|
|
12
|
+
price?: number;
|
|
13
|
+
currency?: string;
|
|
14
|
+
autoRenewDefault?: boolean;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
createdAt?: string;
|
|
17
|
+
updatedAt?: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type Payment = {
|
|
6
|
+
_id?: string;
|
|
7
|
+
merchantId?: string;
|
|
8
|
+
customerId?: string;
|
|
9
|
+
type?: Payment.type;
|
|
10
|
+
/**
|
|
11
|
+
* ID de la suscripción (o producto en el futuro)
|
|
12
|
+
*/
|
|
13
|
+
referenceId?: string;
|
|
14
|
+
provider?: Payment.provider;
|
|
15
|
+
providerTransactionId?: string;
|
|
16
|
+
amount?: number;
|
|
17
|
+
currency?: string;
|
|
18
|
+
status?: Payment.status;
|
|
19
|
+
createdAt?: string;
|
|
20
|
+
updatedAt?: string;
|
|
21
|
+
};
|
|
22
|
+
export namespace Payment {
|
|
23
|
+
export enum type {
|
|
24
|
+
SUBSCRIPTION = 'subscription',
|
|
25
|
+
PRODUCT = 'product',
|
|
26
|
+
}
|
|
27
|
+
export enum provider {
|
|
28
|
+
WOMPI = 'wompi',
|
|
29
|
+
}
|
|
30
|
+
export enum status {
|
|
31
|
+
PENDING = 'pending',
|
|
32
|
+
COMPLETED = 'completed',
|
|
33
|
+
FAILED = 'failed',
|
|
34
|
+
REFUNDED = 'refunded',
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type SavedCard = {
|
|
6
|
+
_id?: string;
|
|
7
|
+
customerId?: string;
|
|
8
|
+
merchantId?: string;
|
|
9
|
+
provider?: SavedCard.provider;
|
|
10
|
+
lastFour?: string;
|
|
11
|
+
cardBrand?: string | null;
|
|
12
|
+
expirationMonth?: number;
|
|
13
|
+
expirationYear?: number;
|
|
14
|
+
isDefault?: boolean;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
createdAt?: string;
|
|
17
|
+
};
|
|
18
|
+
export namespace SavedCard {
|
|
19
|
+
export enum provider {
|
|
20
|
+
WOMPI = 'wompi',
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { Package } from './Package';
|
|
6
|
+
export type Subscription = {
|
|
7
|
+
_id?: string;
|
|
8
|
+
merchantId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* ID del cliente en jogo-backend
|
|
11
|
+
*/
|
|
12
|
+
customerId?: string;
|
|
13
|
+
packageId?: (string | Package);
|
|
14
|
+
status?: Subscription.status;
|
|
15
|
+
autoRenew?: boolean;
|
|
16
|
+
classesTotal?: number;
|
|
17
|
+
classesUsed?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Campo virtual calculado: classesTotal - classesUsed
|
|
20
|
+
*/
|
|
21
|
+
readonly classesRemaining?: number;
|
|
22
|
+
startDate?: string;
|
|
23
|
+
endDate?: string;
|
|
24
|
+
savedCardId?: string | null;
|
|
25
|
+
lastPaymentId?: string | null;
|
|
26
|
+
createdAt?: string;
|
|
27
|
+
updatedAt?: string;
|
|
28
|
+
};
|
|
29
|
+
export namespace Subscription {
|
|
30
|
+
export enum status {
|
|
31
|
+
PENDING_PAYMENT = 'pending_payment',
|
|
32
|
+
ACTIVE = 'active',
|
|
33
|
+
EXPIRED = 'expired',
|
|
34
|
+
CANCELLED = 'cancelled',
|
|
35
|
+
SUSPENDED = 'suspended',
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type TokenizeCardRequest = {
|
|
6
|
+
merchantId: string;
|
|
7
|
+
cardNumber: string;
|
|
8
|
+
cvv: string;
|
|
9
|
+
expirationMonth: number;
|
|
10
|
+
expirationYear: number;
|
|
11
|
+
setAsDefault?: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type UpdateMerchantRequest = {
|
|
6
|
+
name?: string;
|
|
7
|
+
email?: string;
|
|
8
|
+
apiKey?: string;
|
|
9
|
+
environment?: UpdateMerchantRequest.environment;
|
|
10
|
+
webhookUrl?: string;
|
|
11
|
+
redirectUrl?: string;
|
|
12
|
+
cardGroupId?: string;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export namespace UpdateMerchantRequest {
|
|
16
|
+
export enum environment {
|
|
17
|
+
SANDBOX = 'sandbox',
|
|
18
|
+
PRODUCTION = 'production',
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type UpdatePackageRequest = {
|
|
6
|
+
name?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
numberOfClasses?: number;
|
|
9
|
+
durationDays?: number;
|
|
10
|
+
price?: number;
|
|
11
|
+
autoRenewDefault?: boolean;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $ConsumeClassResponse = {
|
|
6
|
+
properties: {
|
|
7
|
+
subscription: {
|
|
8
|
+
type: 'Subscription',
|
|
9
|
+
},
|
|
10
|
+
classesRemaining: {
|
|
11
|
+
type: 'number',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
} as const;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $CreateMerchantRequest = {
|
|
6
|
+
properties: {
|
|
7
|
+
businessId: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
isRequired: true,
|
|
10
|
+
},
|
|
11
|
+
name: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
isRequired: true,
|
|
14
|
+
},
|
|
15
|
+
email: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
isRequired: true,
|
|
18
|
+
format: 'email',
|
|
19
|
+
},
|
|
20
|
+
paymentProvider: {
|
|
21
|
+
type: 'Enum',
|
|
22
|
+
},
|
|
23
|
+
apiKey: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: `API Key de Wompi (se encripta antes de guardar)`,
|
|
26
|
+
isRequired: true,
|
|
27
|
+
},
|
|
28
|
+
environment: {
|
|
29
|
+
type: 'Enum',
|
|
30
|
+
},
|
|
31
|
+
webhookUrl: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
format: 'uri',
|
|
34
|
+
},
|
|
35
|
+
redirectUrl: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
format: 'uri',
|
|
38
|
+
},
|
|
39
|
+
cardGroupId: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
} as const;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $CreatePackageRequest = {
|
|
6
|
+
properties: {
|
|
7
|
+
name: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
isRequired: true,
|
|
10
|
+
},
|
|
11
|
+
description: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
},
|
|
14
|
+
numberOfClasses: {
|
|
15
|
+
type: 'number',
|
|
16
|
+
isRequired: true,
|
|
17
|
+
minimum: 1,
|
|
18
|
+
},
|
|
19
|
+
durationDays: {
|
|
20
|
+
type: 'number',
|
|
21
|
+
isRequired: true,
|
|
22
|
+
minimum: 1,
|
|
23
|
+
},
|
|
24
|
+
price: {
|
|
25
|
+
type: 'number',
|
|
26
|
+
isRequired: true,
|
|
27
|
+
},
|
|
28
|
+
autoRenewDefault: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
} as const;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $CreateSubscriptionRequest = {
|
|
6
|
+
properties: {
|
|
7
|
+
merchantId: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
isRequired: true,
|
|
10
|
+
},
|
|
11
|
+
packageId: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
isRequired: true,
|
|
14
|
+
},
|
|
15
|
+
autoRenew: {
|
|
16
|
+
type: 'boolean',
|
|
17
|
+
},
|
|
18
|
+
customerEmail: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
isRequired: true,
|
|
21
|
+
format: 'email',
|
|
22
|
+
},
|
|
23
|
+
customerName: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
isRequired: true,
|
|
26
|
+
},
|
|
27
|
+
customerLastName: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
isRequired: true,
|
|
30
|
+
},
|
|
31
|
+
customerPhone: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
},
|
|
34
|
+
city: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
},
|
|
37
|
+
address: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
},
|
|
40
|
+
savedCardId: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: `ID de tarjeta guardada. Requerido si no se envía cardNumber.`,
|
|
43
|
+
},
|
|
44
|
+
cvv: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: `CVV requerido siempre (con tarjeta guardada o nueva)`,
|
|
47
|
+
},
|
|
48
|
+
cardNumber: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: `Número de tarjeta. Requerido si no se envía savedCardId.`,
|
|
51
|
+
},
|
|
52
|
+
expirationMonth: {
|
|
53
|
+
type: 'number',
|
|
54
|
+
maximum: 12,
|
|
55
|
+
minimum: 1,
|
|
56
|
+
},
|
|
57
|
+
expirationYear: {
|
|
58
|
+
type: 'number',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
} as const;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $CreateSubscriptionResponse = {
|
|
6
|
+
properties: {
|
|
7
|
+
subscription: {
|
|
8
|
+
type: 'Subscription',
|
|
9
|
+
},
|
|
10
|
+
redirectUrl: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: `URL de Wompi para completar autenticación 3DS. Si está presente, redirigir al usuario a esta URL. La suscripción se activará cuando Wompi notifique vía webhook.`,
|
|
13
|
+
isNullable: true,
|
|
14
|
+
format: 'uri',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
} as const;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $Merchant = {
|
|
6
|
+
properties: {
|
|
7
|
+
_id: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
},
|
|
10
|
+
businessId: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: `ID del negocio en jogo-backend`,
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
},
|
|
17
|
+
email: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
format: 'email',
|
|
20
|
+
},
|
|
21
|
+
paymentProvider: {
|
|
22
|
+
type: 'Enum',
|
|
23
|
+
},
|
|
24
|
+
providerConfig: {
|
|
25
|
+
type: 'MerchantProviderConfig',
|
|
26
|
+
},
|
|
27
|
+
active: {
|
|
28
|
+
type: 'boolean',
|
|
29
|
+
},
|
|
30
|
+
createdAt: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
format: 'date-time',
|
|
33
|
+
},
|
|
34
|
+
updatedAt: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
format: 'date-time',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
} as const;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $MerchantProviderConfig = {
|
|
6
|
+
properties: {
|
|
7
|
+
environment: {
|
|
8
|
+
type: 'Enum',
|
|
9
|
+
},
|
|
10
|
+
webhookUrl: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
format: 'uri',
|
|
13
|
+
},
|
|
14
|
+
redirectUrl: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
format: 'uri',
|
|
17
|
+
},
|
|
18
|
+
cardGroupId: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: `ID del grupo de tarjetas en Wompi para validación adicional`,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
} as const;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $Package = {
|
|
6
|
+
properties: {
|
|
7
|
+
_id: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
},
|
|
10
|
+
merchantId: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
},
|
|
13
|
+
name: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
},
|
|
16
|
+
description: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
},
|
|
19
|
+
numberOfClasses: {
|
|
20
|
+
type: 'number',
|
|
21
|
+
},
|
|
22
|
+
durationDays: {
|
|
23
|
+
type: 'number',
|
|
24
|
+
},
|
|
25
|
+
price: {
|
|
26
|
+
type: 'number',
|
|
27
|
+
format: 'float',
|
|
28
|
+
},
|
|
29
|
+
currency: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
},
|
|
32
|
+
autoRenewDefault: {
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
},
|
|
35
|
+
active: {
|
|
36
|
+
type: 'boolean',
|
|
37
|
+
},
|
|
38
|
+
createdAt: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
format: 'date-time',
|
|
41
|
+
},
|
|
42
|
+
updatedAt: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
format: 'date-time',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
} as const;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $Payment = {
|
|
6
|
+
properties: {
|
|
7
|
+
_id: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
},
|
|
10
|
+
merchantId: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
},
|
|
13
|
+
customerId: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
},
|
|
16
|
+
type: {
|
|
17
|
+
type: 'Enum',
|
|
18
|
+
},
|
|
19
|
+
referenceId: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: `ID de la suscripción (o producto en el futuro)`,
|
|
22
|
+
},
|
|
23
|
+
provider: {
|
|
24
|
+
type: 'Enum',
|
|
25
|
+
},
|
|
26
|
+
providerTransactionId: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
},
|
|
29
|
+
amount: {
|
|
30
|
+
type: 'number',
|
|
31
|
+
},
|
|
32
|
+
currency: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
},
|
|
35
|
+
status: {
|
|
36
|
+
type: 'Enum',
|
|
37
|
+
},
|
|
38
|
+
createdAt: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
format: 'date-time',
|
|
41
|
+
},
|
|
42
|
+
updatedAt: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
format: 'date-time',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
} as const;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $SavedCard = {
|
|
6
|
+
properties: {
|
|
7
|
+
_id: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
},
|
|
10
|
+
customerId: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
},
|
|
13
|
+
merchantId: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
},
|
|
16
|
+
provider: {
|
|
17
|
+
type: 'Enum',
|
|
18
|
+
},
|
|
19
|
+
lastFour: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
},
|
|
22
|
+
cardBrand: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
isNullable: true,
|
|
25
|
+
},
|
|
26
|
+
expirationMonth: {
|
|
27
|
+
type: 'number',
|
|
28
|
+
},
|
|
29
|
+
expirationYear: {
|
|
30
|
+
type: 'number',
|
|
31
|
+
},
|
|
32
|
+
isDefault: {
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
},
|
|
35
|
+
active: {
|
|
36
|
+
type: 'boolean',
|
|
37
|
+
},
|
|
38
|
+
createdAt: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
format: 'date-time',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
} as const;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $Subscription = {
|
|
6
|
+
properties: {
|
|
7
|
+
_id: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
},
|
|
10
|
+
merchantId: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
},
|
|
13
|
+
customerId: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: `ID del cliente en jogo-backend`,
|
|
16
|
+
},
|
|
17
|
+
packageId: {
|
|
18
|
+
type: 'one-of',
|
|
19
|
+
contains: [{
|
|
20
|
+
type: 'string',
|
|
21
|
+
}, {
|
|
22
|
+
type: 'Package',
|
|
23
|
+
}],
|
|
24
|
+
},
|
|
25
|
+
status: {
|
|
26
|
+
type: 'Enum',
|
|
27
|
+
},
|
|
28
|
+
autoRenew: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
},
|
|
31
|
+
classesTotal: {
|
|
32
|
+
type: 'number',
|
|
33
|
+
},
|
|
34
|
+
classesUsed: {
|
|
35
|
+
type: 'number',
|
|
36
|
+
},
|
|
37
|
+
classesRemaining: {
|
|
38
|
+
type: 'number',
|
|
39
|
+
description: `Campo virtual calculado: classesTotal - classesUsed`,
|
|
40
|
+
isReadOnly: true,
|
|
41
|
+
},
|
|
42
|
+
startDate: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
format: 'date-time',
|
|
45
|
+
},
|
|
46
|
+
endDate: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
format: 'date-time',
|
|
49
|
+
},
|
|
50
|
+
savedCardId: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
isNullable: true,
|
|
53
|
+
},
|
|
54
|
+
lastPaymentId: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
isNullable: true,
|
|
57
|
+
},
|
|
58
|
+
createdAt: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
format: 'date-time',
|
|
61
|
+
},
|
|
62
|
+
updatedAt: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
format: 'date-time',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
} as const;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export const $TokenizeCardRequest = {
|
|
6
|
+
properties: {
|
|
7
|
+
merchantId: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
isRequired: true,
|
|
10
|
+
},
|
|
11
|
+
cardNumber: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
isRequired: true,
|
|
14
|
+
},
|
|
15
|
+
cvv: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
isRequired: true,
|
|
18
|
+
},
|
|
19
|
+
expirationMonth: {
|
|
20
|
+
type: 'number',
|
|
21
|
+
isRequired: true,
|
|
22
|
+
maximum: 12,
|
|
23
|
+
minimum: 1,
|
|
24
|
+
},
|
|
25
|
+
expirationYear: {
|
|
26
|
+
type: 'number',
|
|
27
|
+
isRequired: true,
|
|
28
|
+
},
|
|
29
|
+
setAsDefault: {
|
|
30
|
+
type: 'boolean',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
} as const;
|