diff --git a/.eslintignore b/.eslintignore
index b021906..9f9eafe 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -2,5 +2,4 @@
.DS_Store
node_modules
dist
-coverage
-test
\ No newline at end of file
+coverage
\ No newline at end of file
diff --git a/README.md b/README.md
index ecb6d7e..1c210ca 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,7 @@ npm install
## Initialize the API Client
-**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/client.md)
+**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/client.md)
The following parameters are configurable for the API Client:
@@ -81,7 +81,7 @@ The following parameters are configurable for the API Client:
| `timeout` | `number` | Timeout for API calls.
*Default*: `0` |
| `httpClientOptions` | `Partial` | Stable configurable http client options. |
| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. |
-| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/$a/https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/basic-authentication.md) | The credential object for basicAuth |
+| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/auth/basic-authentication.md) | The credential object for basicAuth |
### HttpClientOptions
@@ -121,7 +121,7 @@ const client = new Client({
This API uses the following authentication schemes.
-* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/$a/https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/basic-authentication.md)
+* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/auth/basic-authentication.md)
## API Errors
@@ -129,30 +129,30 @@ Here is the list of errors that the API might throw.
| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
-| 400 | Invalid request | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/models/custom-error.md) |
-| 401 | Invalid API key | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/models/custom-error.md) |
-| 404 | An informed resource was not found | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/models/custom-error.md) |
-| 412 | Business validation error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/models/custom-error.md) |
-| 422 | Contract validation error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/models/custom-error.md) |
-| 500 | Internal server error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/models/custom-error.md) |
+| 400 | Invalid request | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/models/custom-error.md) |
+| 401 | Invalid API key | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/models/custom-error.md) |
+| 404 | An informed resource was not found | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/models/custom-error.md) |
+| 412 | Business validation error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/models/custom-error.md) |
+| 422 | Contract validation error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/models/custom-error.md) |
+| 500 | Internal server error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/models/custom-error.md) |
## List of APIs
-* [Subscriptions](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/subscriptions.md)
-* [Orders](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/orders.md)
-* [Plans](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/plans.md)
-* [Invoices](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/invoices.md)
-* [Customers](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/customers.md)
-* [Charges](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/charges.md)
-* [Recipients](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/recipients.md)
-* [Tokens](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/tokens.md)
-* [Transactions](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/transactions.md)
-* [Transfers](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/transfers.md)
-* [Payables](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/payables.md)
-* [Balance Operations](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/controllers/balance-operations.md)
+* [Subscriptions](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/subscriptions.md)
+* [Orders](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/orders.md)
+* [Plans](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/plans.md)
+* [Invoices](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/invoices.md)
+* [Customers](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/customers.md)
+* [Charges](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/charges.md)
+* [Recipients](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/recipients.md)
+* [Tokens](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/tokens.md)
+* [Transactions](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/transactions.md)
+* [Transfers](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/transfers.md)
+* [Payables](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/payables.md)
+* [Balance Operations](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/controllers/balance-operations.md)
## Classes Documentation
-* [ApiResponse](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/api-response.md)
-* [ApiError](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.10/doc/api-error.md)
+* [ApiResponse](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/api-response.md)
+* [ApiError](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.11/doc/api-error.md)
diff --git a/doc/client.md b/doc/client.md
index 166ec79..649840c 100644
--- a/doc/client.md
+++ b/doc/client.md
@@ -9,7 +9,7 @@ The following parameters are configurable for the API Client:
| `timeout` | `number` | Timeout for API calls.
*Default*: `0` |
| `httpClientOptions` | `Partial` | Stable configurable http client options. |
| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. |
-| `basicAuthCredentials` | [`BasicAuthCredentials`]($a/basic-authentication.md) | The credential object for basicAuth |
+| `basicAuthCredentials` | [`BasicAuthCredentials`](auth/basic-authentication.md) | The credential object for basicAuth |
## HttpClientOptions
diff --git a/doc/models/create-credit-card-payment-request.md b/doc/models/create-credit-card-payment-request.md
index 0e8332c..5efca74 100644
--- a/doc/models/create-credit-card-payment-request.md
+++ b/doc/models/create-credit-card-payment-request.md
@@ -27,6 +27,8 @@ The settings for creating a credit card payment
| `operationType` | `string \| undefined` | Optional | AuthOnly, AuthAndCapture, PreAuth |
| `recurrencyCycle` | `string \| undefined` | Optional | Defines whether the card has been used one or more times. |
| `payload` | [`CreateCardPayloadRequest \| undefined`](../../doc/models/create-card-payload-request.md) | Optional | - |
+| `initiatedType` | `string \| undefined` | Optional | - |
+| `recurrenceModel` | `string \| undefined` | Optional | - |
## Example (as JSON)
diff --git a/doc/models/create-debit-card-payment-request.md b/doc/models/create-debit-card-payment-request.md
index 71e3457..573c585 100644
--- a/doc/models/create-debit-card-payment-request.md
+++ b/doc/models/create-debit-card-payment-request.md
@@ -18,6 +18,8 @@ The settings for creating a debit card payment
| `recurrence` | `boolean \| undefined` | Optional | Indicates a recurrence |
| `authentication` | [`CreatePaymentAuthenticationRequest \| undefined`](../../doc/models/create-payment-authentication-request.md) | Optional | The payment authentication request |
| `token` | [`CreateCardPaymentContactlessRequest \| undefined`](../../doc/models/create-card-payment-contactless-request.md) | Optional | The Debit card payment token request |
+| `initiatedType` | `string \| undefined` | Optional | - |
+| `recurrenceModel` | `string \| undefined` | Optional | - |
## Example (as JSON)
diff --git a/doc/models/update-charge-card-request.md b/doc/models/update-charge-card-request.md
index 358dbd9..629d4bc 100644
--- a/doc/models/update-charge-card-request.md
+++ b/doc/models/update-charge-card-request.md
@@ -15,6 +15,8 @@ Request for updating card data
| `cardId` | `string` | Required | Card id |
| `card` | [`CreateCardRequest`](../../doc/models/create-card-request.md) | Required | Card data |
| `recurrence` | `boolean` | Required | Indicates a recurrence |
+| `initiatedType` | `string \| undefined` | Optional | - |
+| `recurrenceModel` | `string \| undefined` | Optional | - |
## Example (as JSON)
@@ -30,7 +32,9 @@ Request for updating card data
"exp_year": 68,
"cvv": "cvv4"
},
- "recurrence": false
+ "recurrence": false,
+ "initiated_type": "initiated_type8",
+ "recurrence_model": "recurrence_model6"
}
```
diff --git a/jest.config.js b/jest.config.js
index 45a2c18..091b875 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -1,9 +1,7 @@
module.exports = {
testEnvironment: 'node',
preset: 'ts-jest',
- globals: {
- 'ts-jest': {
- tsConfig: 'tsconfig.base.json',
- },
+ transform: {
+ '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.base.json' }],
},
};
diff --git a/package.json b/package.json
index 752ec34..570ba9c 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "version": "6.8.10",
+ "version": "6.8.11",
"license": "MIT",
"sideEffects": false,
"main": "dist/cjs/index.js",
@@ -14,9 +14,9 @@
},
"scripts": {
"build": "rm -rf dist & tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json",
- "test": "jest --coverage --passWithNoTests",
- "lint": "eslint --ignore-path .eslintignore --ext .js,.ts .",
- "prepare": "rm -rf dist & tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json"
+ "prepare": "rm -rf dist & tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json",
+ "lint": "eslint **/*.ts --ignore-path .eslintignore",
+ "lint:fix": "eslint **/*.ts --ignore-path .eslintignore --fix"
},
"peerDependencies": {},
"prettier": {
@@ -26,12 +26,12 @@
"trailingComma": "es5",
"quoteProps": "preserve"
},
- "name": "@pagarme/pagarme-nodejs-sdk",
+ "name": "pagarmeapisdklib",
"description": "Pagarme API",
"author": {
"name": "Pagar.me Pagamentos S/A",
"email": "suporte@pagar.me",
- "url": "https://github.com/pagarme/pagarme-nodejs-sdk/issues"
+ "url": "https://github.com/pagarme/"
},
"devDependencies": {
"@types/jest": "^29.4.0",
@@ -44,17 +44,13 @@
"typescript": "^4.9.5"
},
"dependencies": {
- "@apimatic/authentication-adapters": "^0.5.0",
- "@apimatic/axios-client-adapter": "^0.3.0",
- "@apimatic/core": "^0.10.0",
- "@apimatic/schema": "^0.7.0"
+ "@apimatic/authentication-adapters": "^0.5.4",
+ "@apimatic/axios-client-adapter": "^0.3.4",
+ "@apimatic/core": "^0.10.12",
+ "@apimatic/schema": "^0.7.12"
},
"bugs": {
- "url": "https://github.com/pagarme/pagarme-nodejs-sdk/issues",
+ "url": "https://github.com/pagarme/",
"email": "suporte@pagar.me"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/pagarme/pagarme-nodejs-sdk.git"
}
}
\ No newline at end of file
diff --git a/src/client.ts b/src/client.ts
index 030e82f..d54877a 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -58,7 +58,7 @@ export class Client implements ClientInterface {
},
};
- this._userAgent = updateUserAgent('PagarmeApiSDK - TypeScript 6.8.10');
+ this._userAgent = updateUserAgent('PagarmeApiSDK - TypeScript 6.8.11');
this._requestBuilderFactory = createRequestHandlerFactory(
(server) => getBaseUri(server, this._config),
createAuthProviderFromConfig(clonedConfig),
diff --git a/src/models/createCreditCardPaymentRequest.ts b/src/models/createCreditCardPaymentRequest.ts
index ecd89dc..9868aba 100644
--- a/src/models/createCreditCardPaymentRequest.ts
+++ b/src/models/createCreditCardPaymentRequest.ts
@@ -63,6 +63,8 @@ export interface CreateCreditCardPaymentRequest {
/** Defines whether the card has been used one or more times. */
recurrencyCycle?: string;
payload?: CreateCardPayloadRequest;
+ initiatedType?: string;
+ recurrenceModel?: string;
}
export const createCreditCardPaymentRequestSchema: Schema = object(
@@ -89,5 +91,7 @@ export const createCreditCardPaymentRequestSchema: Schema createCardPayloadRequestSchema))],
+ initiatedType: ['initiated_type', optional(string())],
+ recurrenceModel: ['recurrence_model', optional(string())],
}
);
diff --git a/src/models/createDebitCardPaymentRequest.ts b/src/models/createDebitCardPaymentRequest.ts
index 23093e1..488bc20 100644
--- a/src/models/createDebitCardPaymentRequest.ts
+++ b/src/models/createDebitCardPaymentRequest.ts
@@ -34,6 +34,8 @@ export interface CreateDebitCardPaymentRequest {
authentication?: CreatePaymentAuthenticationRequest;
/** The Debit card payment token request */
token?: CreateCardPaymentContactlessRequest;
+ initiatedType?: string;
+ recurrenceModel?: string;
}
export const createDebitCardPaymentRequestSchema: Schema = object(
@@ -51,5 +53,7 @@ export const createDebitCardPaymentRequestSchema: Schema createCardPaymentContactlessRequestSchema)),
],
+ initiatedType: ['initiated_type', optional(string())],
+ recurrenceModel: ['recurrence_model', optional(string())],
}
);
diff --git a/src/models/updateChargeCardRequest.ts b/src/models/updateChargeCardRequest.ts
index caf7a8e..142b9ef 100644
--- a/src/models/updateChargeCardRequest.ts
+++ b/src/models/updateChargeCardRequest.ts
@@ -4,7 +4,7 @@
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
-import { boolean, lazy, object, Schema, string } from '../schema';
+import { boolean, lazy, object, optional, Schema, string } from '../schema';
import {
CreateCardRequest,
createCardRequestSchema,
@@ -20,6 +20,8 @@ export interface UpdateChargeCardRequest {
card: CreateCardRequest;
/** Indicates a recurrence */
recurrence: boolean;
+ initiatedType?: string;
+ recurrenceModel?: string;
}
export const updateChargeCardRequestSchema: Schema = object(
@@ -28,5 +30,7 @@ export const updateChargeCardRequestSchema: Schema = ob
cardId: ['card_id', string()],
card: ['card', lazy(() => createCardRequestSchema)],
recurrence: ['recurrence', boolean()],
+ initiatedType: ['initiated_type', optional(string())],
+ recurrenceModel: ['recurrence_model', optional(string())],
}
);