marlim-sdk-3ds 1.0.1 → 1.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/README.md CHANGED
@@ -44,7 +44,7 @@ import * as MarlimSDK_3DS from 'marlim-sdk-3ds';
44
44
 
45
45
  try {
46
46
  // Etapa 2: Autenticação 3DS
47
- const result = await MarlimSDK_3DS.authenticate3DS({
47
+ const result = await MarlimSDK_3DS.authenticate({
48
48
  amount: 1000, // Valor em centavos
49
49
  card: {
50
50
  number: '1111111111111111',
@@ -103,26 +103,22 @@ MarlimSDK_3DS.init({
103
103
  });
104
104
  ```
105
105
 
106
- ### `authenticate3DS(params: ThreedsAuthenticateParams): Promise<AuthenticationResult>`
106
+ ### `authenticate(params: ThreedsAuthenticateParams): Promise<AuthenticationResult>`
107
107
 
108
108
  Executa o fluxo completo de autenticação 3DS.
109
109
 
110
110
  **Estrutura de dados:**
111
111
 
112
112
  ```typescript
113
+ type CardHash = string;
114
+
113
115
  type CardData = {
114
116
  number: string;
115
117
  expirationDate: string;
116
118
  cvv: string;
117
119
  holderName: string;
118
120
  }
119
- ```
120
-
121
- ```typescript
122
- type CardHash = string;
123
- ```
124
121
 
125
- ```typescript
126
122
  type CustomerData = {
127
123
  name: string;
128
124
  documentNumber: string;
@@ -161,7 +157,7 @@ type CustomerData = {
161
157
  **Exemplo:**
162
158
 
163
159
  ```typescript
164
- await MarlimSDK_3DS.authenticate3DS({
160
+ await MarlimSDK_3DS.authenticate({
165
161
  amount: 1000,
166
162
  card: {
167
163
  number: '1111111111111111',
package/dist/main.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { SetupParams } from './validations/setup-params-validation';
2
+ import { ThreedsAuthenticateParams, ThreedsAuthenticateResult } from './validations/threeds-authenticate-validation';
2
3
 
3
4
  export declare function init(params: SetupParams): void;
4
- export declare function authenticate(params: unknown): Promise<unknown>;
5
+ export declare function authenticate(params: ThreedsAuthenticateParams): Promise<ThreedsAuthenticateResult>;
@@ -93,4 +93,8 @@ type ThreedsAuthenticateParams = {
93
93
  };
94
94
  };
95
95
  };
96
- export { getThreedsAuthenticateSchema, type ThreedsAuthenticateParams };
96
+ type ThreedsAuthenticateResult = {
97
+ card_id: string;
98
+ threeds_authentication_id: string;
99
+ };
100
+ export { getThreedsAuthenticateSchema, type ThreedsAuthenticateParams, type ThreedsAuthenticateResult, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marlim-sdk-3ds",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "SDK 3DS para integração com a API Marlim",
5
5
  "license": "MIT",
6
6
  "main": "dist/marlim-3ds-sdk.min.js",