redsys-easy 5.2.5 → 5.2.6

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/lib/crypto.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  /**
3
2
  * Adds padding to a buffer.
4
3
  *
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * @public
11
11
  */
12
- export declare const useSingleInputFormatter: <AF extends (input: any) => B, B, C extends readonly unknown[], D>(fn: (args_0: B, ...args_1: C) => D, inputFormatter: AF) => (input: Parameters<AF>[0], ...otherArgs_0: C) => D;
12
+ export declare const useSingleInputFormatter: <AF extends (input: any) => B, B, C extends readonly unknown[], D>(fn: (...args: [B, ...C]) => D, inputFormatter: AF) => ((input: Parameters<AF>[0], ...otherArgs: [...C]) => D);
13
13
  /**
14
14
  * Applies an output formatter to a function
15
15
  *
@@ -1,7 +1,7 @@
1
1
  import type { BaseOutputParams, RestNotificationOutputParams, SoapNotificationOutputParams, RequestOutputParams, RestIniciaPeticionOutputParams, RestTrataPeticionOutputParams, ResolvedTransactionTrait } from '../types/output-params';
2
2
  import type { BaseFormatterOutput, NotificationFormatterOutput, RequestFormatterOutput, RestIniciaPeticionFormatterOutput, RestTrataPeticionFormatterOutput, ResolvedTransactionTraitFormatterOutput } from './types';
3
3
  export declare const baseOutputFormatter: <RawOutputParams extends BaseOutputParams>(raw: RawOutputParams) => BaseFormatterOutput<RawOutputParams>;
4
- export declare const formatPrice: (params: Omit<ResolvedTransactionTrait, 'Ds_Response'>) => Omit<ResolvedTransactionTraitFormatterOutput, 'response'>;
4
+ export declare const formatPrice: (params: Omit<ResolvedTransactionTrait, "Ds_Response">) => Omit<ResolvedTransactionTraitFormatterOutput, "response">;
5
5
  /**
6
6
  * REST notification formatter
7
7
  *
package/lib/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export { RedsysError, ValidationError, ParseError, HTTPError, GatewayError, Resp
11
11
  export type { RedirectInputParams, RestIniciaPeticionInputParams, RestTrataPeticionInputParams } from './types/input-params';
12
12
  export type { RestIniciaPeticionOutputParams, RestTrataPeticionOutputParams, RestNotificationOutputParams, SoapNotificationOutputParams } from './types/output-params';
13
13
  export type { ResponseJSONSuccess, RedirectForm, ThreeDSv2MethodNotificationBody, ThreeDSv1ChallengeNotificationBody, ThreeDSv2ChallengeNotificationBody } from './types/api';
14
+ export { serializeAndSignJSONRequest, deserializeAndVerifyJSONResponse, } from './rest/json';
14
15
  export { create3DSMethodForm, create3DSv1ChallengeForm, create3DSv2ChallengeForm, deserializeThreeDSMethodData, deserializeCres } from './rest/3ds';
15
16
  export type { ThreeDSBrowserClientInfo, ThreeDSMethodForm, ThreeDSv1ChallengeForm, ThreeDSv2ChallengeForm, ThreeDSMethodData, ThreeDSCres } from './types/3ds-params';
16
17
  export { detectSoapVersion, mimicSoapNotificationReceiver, mimicSoap11NotificationResponse, mimicSoap12NotificationResponse } from './soap/utils';
package/lib/index.esm.js CHANGED
@@ -2782,7 +2782,7 @@ for (const [key, value] of Object.entries(CURRENCIES)) {
2782
2782
  const LANGUAGES = {
2783
2783
  es: '1',
2784
2784
  en: '2',
2785
- ca: '3',
2785
+ ca: '3', // Codigo ISO "ca" compartido por catalan(3) y valenciano(10)
2786
2786
  fr: '4',
2787
2787
  de: '5',
2788
2788
  nl: '6',
@@ -3543,4 +3543,4 @@ const restTrataPeticionOutputFormatter = (raw) => {
3543
3543
  };
3544
3544
  };
3545
3545
 
3546
- export { CARDBRANDS, COUNTRIES, CURRENCIES, GatewayError, HTTPError, LANGUAGES, PRODUCTION_URLS, ParseError, REV_CARDBRANDS, REV_COUNTRIES, REV_CURRENCIES, REV_LANGUAGES, RedsysError, ResponseError, SANDBOX_URLS, TRANSACTION_TYPES, ValidationError, assertSuccessfulResponse, assertSuccessfulResponseCode, create3DSMethodForm, create3DSv1ChallengeForm, create3DSv2ChallengeForm, createRedsysAPI, deserializeCres, deserializeThreeDSMethodData, detectSoapVersion, getResponseCodeMessage, getSISErrorCodeMessage, isResponseCodeOk, mimicSoap11NotificationResponse, mimicSoap12NotificationResponse, mimicSoapNotificationReceiver, randomTransactionId, redirectInputFormatter, restIniciaPeticionInputFormatter, restIniciaPeticionOutputFormatter, restNotificationOutputFormatter, restTrataPeticionInputFormatter, restTrataPeticionOutputFormatter, soapNotificationOutputFormatter, useOutputFormatter, usePromiseOutputFormatter, useSingleInputFormatter };
3546
+ export { CARDBRANDS, COUNTRIES, CURRENCIES, GatewayError, HTTPError, LANGUAGES, PRODUCTION_URLS, ParseError, REV_CARDBRANDS, REV_COUNTRIES, REV_CURRENCIES, REV_LANGUAGES, RedsysError, ResponseError, SANDBOX_URLS, TRANSACTION_TYPES, ValidationError, assertSuccessfulResponse, assertSuccessfulResponseCode, create3DSMethodForm, create3DSv1ChallengeForm, create3DSv2ChallengeForm, createRedsysAPI, deserializeAndVerifyJSONResponse, deserializeCres, deserializeThreeDSMethodData, detectSoapVersion, getResponseCodeMessage, getSISErrorCodeMessage, isResponseCodeOk, mimicSoap11NotificationResponse, mimicSoap12NotificationResponse, mimicSoapNotificationReceiver, randomTransactionId, redirectInputFormatter, restIniciaPeticionInputFormatter, restIniciaPeticionOutputFormatter, restNotificationOutputFormatter, restTrataPeticionInputFormatter, restTrataPeticionOutputFormatter, serializeAndSignJSONRequest, soapNotificationOutputFormatter, useOutputFormatter, usePromiseOutputFormatter, useSingleInputFormatter };
package/lib/index.js CHANGED
@@ -2784,7 +2784,7 @@ for (const [key, value] of Object.entries(CURRENCIES)) {
2784
2784
  const LANGUAGES = {
2785
2785
  es: '1',
2786
2786
  en: '2',
2787
- ca: '3',
2787
+ ca: '3', // Codigo ISO "ca" compartido por catalan(3) y valenciano(10)
2788
2788
  fr: '4',
2789
2789
  de: '5',
2790
2790
  nl: '6',
@@ -3568,6 +3568,7 @@ exports.create3DSMethodForm = create3DSMethodForm;
3568
3568
  exports.create3DSv1ChallengeForm = create3DSv1ChallengeForm;
3569
3569
  exports.create3DSv2ChallengeForm = create3DSv2ChallengeForm;
3570
3570
  exports.createRedsysAPI = createRedsysAPI;
3571
+ exports.deserializeAndVerifyJSONResponse = deserializeAndVerifyJSONResponse;
3571
3572
  exports.deserializeCres = deserializeCres;
3572
3573
  exports.deserializeThreeDSMethodData = deserializeThreeDSMethodData;
3573
3574
  exports.detectSoapVersion = detectSoapVersion;
@@ -3584,6 +3585,7 @@ exports.restIniciaPeticionOutputFormatter = restIniciaPeticionOutputFormatter;
3584
3585
  exports.restNotificationOutputFormatter = restNotificationOutputFormatter;
3585
3586
  exports.restTrataPeticionInputFormatter = restTrataPeticionInputFormatter;
3586
3587
  exports.restTrataPeticionOutputFormatter = restTrataPeticionOutputFormatter;
3588
+ exports.serializeAndSignJSONRequest = serializeAndSignJSONRequest;
3587
3589
  exports.soapNotificationOutputFormatter = soapNotificationOutputFormatter;
3588
3590
  exports.useOutputFormatter = useOutputFormatter;
3589
3591
  exports.usePromiseOutputFormatter = usePromiseOutputFormatter;
package/lib/rest/3ds.d.ts CHANGED
@@ -4,7 +4,7 @@ import type { ThreeDSv1ChallengeOutputParams, ThreeDSv2ChallengeOutputParams, Th
4
4
  *
5
5
  * @public
6
6
  */
7
- export declare const create3DSMethodForm: (emv3dsParams: Pick<ThreeDSv2PreAuthWithMethodOutputParams, 'threeDSServerTransID' | 'threeDSMethodURL'>, notificationURL: string) => ThreeDSMethodForm;
7
+ export declare const create3DSMethodForm: (emv3dsParams: Pick<ThreeDSv2PreAuthWithMethodOutputParams, "threeDSServerTransID" | "threeDSMethodURL">, notificationURL: string) => ThreeDSMethodForm;
8
8
  /**
9
9
  * Creates parameters for a 3DS v1 challenge form
10
10
  *
@@ -1,3 +1,3 @@
1
1
  import type { ParsedSoapNotifiation, SoapNotificationResponse } from '../types/api';
2
2
  export declare const serializeSoapNotificationResponse: ({ allow: allowOperation }: SoapNotificationResponse) => string;
3
- export declare const deserializeSoapNotification: (xml: string) => ParsedSoapNotifiation['Message'];
3
+ export declare const deserializeSoapNotification: (xml: string) => ParsedSoapNotifiation["Message"];
@@ -1,3 +1,3 @@
1
1
  import type { ParsedSoapNotifiation, SoapNotificationResponse } from '../types/api';
2
- export declare const verifySoapNotification: (merchantKey: string, xml: string, msg: ParsedSoapNotifiation['Message']) => void;
2
+ export declare const verifySoapNotification: (merchantKey: string, xml: string, msg: ParsedSoapNotifiation["Message"]) => void;
3
3
  export declare const signSoapNotificationResponse: (merchantKey: string, serializedResponse: string, response: SoapNotificationResponse) => string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "redsys-easy",
3
3
  "description": "Node JS interface for Redsys payment gateway",
4
- "version": "5.2.5",
4
+ "version": "5.2.6",
5
5
  "author": "Javier Garcia <javiertury@gmail.com>",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -62,6 +62,7 @@
62
62
  "@typescript-eslint/eslint-plugin": "^5.62.0",
63
63
  "@typescript-eslint/parser": "^5.62.0",
64
64
  "cheerio": "1.0.0-rc.12",
65
+ "commit-and-tag-version": "^12.5.0",
65
66
  "eslint": "^8.46.0",
66
67
  "eslint-config-prettier": "^8.10.0",
67
68
  "eslint-config-standard-with-typescript": "^37.0.0",
@@ -76,10 +77,9 @@
76
77
  "lint-staged": "^13.2.3",
77
78
  "markdown-magic": "^2.6.1",
78
79
  "rimraf": "^5.0.1",
79
- "rollup": "^3.27.1",
80
+ "rollup": "^3.29.5",
80
81
  "rollup-plugin-typescript2": "^0.35.0",
81
82
  "simple-git-hooks": "^2.9.0",
82
- "standard-version": "^9.5.0",
83
83
  "ts-expect": "^1.3.0",
84
84
  "ts-jest": "^29.1.1",
85
85
  "typescript": "^5.1.6"
@@ -118,6 +118,6 @@
118
118
  "docs:api": "api-documenter markdown --input-folder ./api/temp --output-folder ./docs",
119
119
  "docs:readme": "md-magic --path ./README.md",
120
120
  "docs": "pnpm run docs:api && pnpm run docs:readme",
121
- "release": "pnpm run test && standard-version --dry-run && pnpm run docs && git add docs CHANGELOG.md && standard-version --commit-all"
121
+ "release": "pnpm run test && commit-and-tag-version --dry-run && pnpm run docs && git add docs CHANGELOG.md && commit-and-tag-version --commit-all"
122
122
  }
123
123
  }