redsys-easy 4.0.3 → 5.1.0
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/assets/card-brands.d.ts +28 -28
- package/lib/assets/countries.d.ts +31 -31
- package/lib/assets/currencies.d.ts +36 -36
- package/lib/assets/error-codes.d.ts +17 -17
- package/lib/assets/lang-codes.d.ts +31 -31
- package/lib/assets/response-codes.d.ts +2 -2
- package/lib/assets/transaction-types.d.ts +56 -56
- package/lib/client.d.ts +102 -50
- package/lib/crypto.d.ts +25 -25
- package/lib/errors.d.ts +75 -75
- package/lib/formatter-utils.d.ts +24 -24
- package/lib/formatters/input-params.d.ts +21 -21
- package/lib/formatters/output-params.d.ts +29 -29
- package/lib/formatters/types.d.ts +316 -316
- package/lib/index.d.ts +30 -30
- package/lib/index.esm.js +3429 -1985
- package/lib/index.js +3429 -1996
- package/lib/rest/3ds.d.ts +31 -31
- package/lib/rest/json-serialization.d.ts +2 -2
- package/lib/rest/json-sha256-signature.d.ts +3 -3
- package/lib/rest/json.d.ts +3 -3
- package/lib/rest/requests.d.ts +8 -2
- package/lib/soap/notification-serialization.d.ts +3 -3
- package/lib/soap/notification-signature.d.ts +3 -3
- package/lib/soap/notification.d.ts +4 -4
- package/lib/soap/utils.d.ts +43 -43
- package/lib/types/3ds-params.d.ts +345 -345
- package/lib/types/api.d.ts +80 -80
- package/lib/types/input-params.d.ts +176 -176
- package/lib/types/output-params.d.ts +158 -158
- package/lib/utils/codes.d.ts +13 -13
- package/lib/utils/misc.d.ts +30 -24
- package/package.json +40 -41
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
import type { TransactionType } from '../assets/transaction-types';
|
|
2
|
-
import type { CountryNum } from '../assets/countries';
|
|
3
|
-
import type { CardBrandNum } from '../assets/card-brands';
|
|
4
|
-
import type { CurrencyNum } from '../assets/currencies';
|
|
5
|
-
import type { LanguageNum } from '../assets/lang-codes';
|
|
6
|
-
import type { ThreeDSv1PreAuthOutputParams, ThreeDSv2PreAuthOutputParams, ThreeDSv1ChallengeOutputParams, ThreeDSv2ChallengeOutputParams } from './3ds-params';
|
|
7
|
-
/**
|
|
8
|
-
* Common output parameters
|
|
9
|
-
*/
|
|
10
|
-
export interface BaseOutputParams {
|
|
11
|
-
/** Order identifier */
|
|
12
|
-
Ds_Order: string;
|
|
13
|
-
/** Merchant code number */
|
|
14
|
-
Ds_MerchantCode: string;
|
|
15
|
-
/** Terminal number */
|
|
16
|
-
Ds_Terminal: string;
|
|
17
|
-
/** Transaction type */
|
|
18
|
-
Ds_TransactionType: TransactionType;
|
|
19
|
-
/** Secure payment indicator */
|
|
20
|
-
Ds_SecurePayment?: '0' | '1' | '2';
|
|
21
|
-
/** Card country */
|
|
22
|
-
Ds_Card_Country?: CountryNum;
|
|
23
|
-
/** Authorization transaction code, refunds */
|
|
24
|
-
Ds_AuthorisationCode?: string;
|
|
25
|
-
/** Card type */
|
|
26
|
-
Ds_Card_Type?: 'C' | 'D';
|
|
27
|
-
/** Merchant data */
|
|
28
|
-
Ds_MerchantData?: string;
|
|
29
|
-
/** Card brand */
|
|
30
|
-
Ds_Card_Brand?: CardBrandNum;
|
|
31
|
-
/** Card is under PSD2 */
|
|
32
|
-
Ds_Card_PSD2?: 'Y' | 'N';
|
|
33
|
-
/**
|
|
34
|
-
* PDS2 exemptions
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* `'LWV;TRA[30.0];COR;MIT;ATD;WHL'`
|
|
38
|
-
*/
|
|
39
|
-
Ds_Excep_SCA?: string;
|
|
40
|
-
/** Payment method number */
|
|
41
|
-
Ds_ProcessedPayMethod?: string;
|
|
42
|
-
/** Credential On File transaction identifier */
|
|
43
|
-
Ds_Merchant_Cof_Txnid?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Card number with some digits replaced with asterisks
|
|
46
|
-
* @deprecated
|
|
47
|
-
*/
|
|
48
|
-
Ds_CardNumber?: string;
|
|
49
|
-
/** Card number with some digits replaced with asterisks */
|
|
50
|
-
Ds_Card_Number?: string;
|
|
51
|
-
/** Card expiry date, YYmm */
|
|
52
|
-
Ds_ExpiryDate?: string;
|
|
53
|
-
/** Stored payment method reference number */
|
|
54
|
-
Ds_Merchant_Identifier?: string;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Common output parameters of resolved requests or notifications
|
|
58
|
-
*/
|
|
59
|
-
export interface ResolvedTransactionTrait {
|
|
60
|
-
/**
|
|
61
|
-
* Amount designated as an integer in the smallest currency division
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* `'199'` (1.99 EUR)
|
|
65
|
-
*/
|
|
66
|
-
Ds_Amount: string;
|
|
67
|
-
/** Currency number, ISO-4217 */
|
|
68
|
-
Ds_Currency: CurrencyNum;
|
|
69
|
-
/** Response code */
|
|
70
|
-
Ds_Response: string;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Common output parameters of a all requests
|
|
74
|
-
*/
|
|
75
|
-
export interface RequestOutputParams extends BaseOutputParams {
|
|
76
|
-
/** Payment link, paygold */
|
|
77
|
-
Ds_UrlPago2Fases?: string;
|
|
78
|
-
/** Language */
|
|
79
|
-
Ds_Language?: LanguageNum;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Output parameters of a IniciaPeticion HTTP request
|
|
83
|
-
*
|
|
84
|
-
* @public
|
|
85
|
-
*/
|
|
86
|
-
export interface RestIniciaPeticionOutputParams extends RequestOutputParams {
|
|
87
|
-
/** EMV3DS data in json format */
|
|
88
|
-
Ds_EMV3DS?: ThreeDSv1PreAuthOutputParams | ThreeDSv2PreAuthOutputParams;
|
|
89
|
-
/** Dynamic Currency Conversion data, json */
|
|
90
|
-
Ds_DCC?: {
|
|
91
|
-
InfoMonedaTarjeta: {
|
|
92
|
-
/** Card currency number, ISO-4217 */
|
|
93
|
-
monedaDCC: string;
|
|
94
|
-
/** Card currency name */
|
|
95
|
-
litMonedaDCC: string;
|
|
96
|
-
/** Card currency 3-letter code */
|
|
97
|
-
litMonedaRDCC: string;
|
|
98
|
-
/** Amount in card currency, decimal number */
|
|
99
|
-
importeDCC: string;
|
|
100
|
-
/** Exchange rate, decimal number */
|
|
101
|
-
cambioDCC: string;
|
|
102
|
-
/** Exchange date, YYYY-MM-DD */
|
|
103
|
-
fechaCambioDCC: string;
|
|
104
|
-
/** Markup, decimal number */
|
|
105
|
-
markUp: number;
|
|
106
|
-
};
|
|
107
|
-
InfoMonedaComercio: {
|
|
108
|
-
/** Currency number, ISO-4217 */
|
|
109
|
-
monedaCome: string;
|
|
110
|
-
/** Currency 3-letter code */
|
|
111
|
-
litMonedaCome: string;
|
|
112
|
-
/** Amount, decimal number */
|
|
113
|
-
importeCome: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Output parameters of a TrataPeticion HTTP request
|
|
119
|
-
*
|
|
120
|
-
* @public
|
|
121
|
-
*/
|
|
122
|
-
export interface RestTrataPeticionOutputParams extends RequestOutputParams, Omit<ResolvedTransactionTrait, 'Ds_Response'> {
|
|
123
|
-
/** Response code */
|
|
124
|
-
Ds_Response?: ResolvedTransactionTrait['Ds_Response'];
|
|
125
|
-
/** EMV3DS data in json format */
|
|
126
|
-
Ds_EMV3DS?: ThreeDSv1ChallengeOutputParams | ThreeDSv2ChallengeOutputParams;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Common parameters for notifications
|
|
130
|
-
*/
|
|
131
|
-
export interface NotificationOutputParams extends BaseOutputParams, ResolvedTransactionTrait {
|
|
132
|
-
/** Language */
|
|
133
|
-
Ds_ConsumerLanguage?: LanguageNum;
|
|
134
|
-
/** Error code */
|
|
135
|
-
Ds_ErrorCode?: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Parameters of a redsys REST notification
|
|
139
|
-
*
|
|
140
|
-
* @public
|
|
141
|
-
*/
|
|
142
|
-
export interface RestNotificationOutputParams extends NotificationOutputParams {
|
|
143
|
-
/** Transaction date, DD/MM/YYYY */
|
|
144
|
-
Ds_Date: string;
|
|
145
|
-
/** Transaction time, hh:mm */
|
|
146
|
-
Ds_Hour: string;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Parameters of a redsys SOAP notification
|
|
150
|
-
*
|
|
151
|
-
* @public
|
|
152
|
-
*/
|
|
153
|
-
export interface SoapNotificationOutputParams extends NotificationOutputParams {
|
|
154
|
-
/** Transaction date, DD/MM/YYYY */
|
|
155
|
-
Fecha: string;
|
|
156
|
-
/** Transaction time, hh:mm */
|
|
157
|
-
Hora: string;
|
|
158
|
-
}
|
|
1
|
+
import type { TransactionType } from '../assets/transaction-types';
|
|
2
|
+
import type { CountryNum } from '../assets/countries';
|
|
3
|
+
import type { CardBrandNum } from '../assets/card-brands';
|
|
4
|
+
import type { CurrencyNum } from '../assets/currencies';
|
|
5
|
+
import type { LanguageNum } from '../assets/lang-codes';
|
|
6
|
+
import type { ThreeDSv1PreAuthOutputParams, ThreeDSv2PreAuthOutputParams, ThreeDSv1ChallengeOutputParams, ThreeDSv2ChallengeOutputParams } from './3ds-params';
|
|
7
|
+
/**
|
|
8
|
+
* Common output parameters
|
|
9
|
+
*/
|
|
10
|
+
export interface BaseOutputParams {
|
|
11
|
+
/** Order identifier */
|
|
12
|
+
Ds_Order: string;
|
|
13
|
+
/** Merchant code number */
|
|
14
|
+
Ds_MerchantCode: string;
|
|
15
|
+
/** Terminal number */
|
|
16
|
+
Ds_Terminal: string;
|
|
17
|
+
/** Transaction type */
|
|
18
|
+
Ds_TransactionType: TransactionType;
|
|
19
|
+
/** Secure payment indicator */
|
|
20
|
+
Ds_SecurePayment?: '0' | '1' | '2' | undefined;
|
|
21
|
+
/** Card country */
|
|
22
|
+
Ds_Card_Country?: CountryNum | undefined;
|
|
23
|
+
/** Authorization transaction code, refunds */
|
|
24
|
+
Ds_AuthorisationCode?: string | undefined;
|
|
25
|
+
/** Card type */
|
|
26
|
+
Ds_Card_Type?: 'C' | 'D' | undefined;
|
|
27
|
+
/** Merchant data */
|
|
28
|
+
Ds_MerchantData?: string | undefined;
|
|
29
|
+
/** Card brand */
|
|
30
|
+
Ds_Card_Brand?: CardBrandNum | undefined;
|
|
31
|
+
/** Card is under PSD2 */
|
|
32
|
+
Ds_Card_PSD2?: 'Y' | 'N' | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* PDS2 exemptions
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* `'LWV;TRA[30.0];COR;MIT;ATD;WHL'`
|
|
38
|
+
*/
|
|
39
|
+
Ds_Excep_SCA?: string | undefined;
|
|
40
|
+
/** Payment method number */
|
|
41
|
+
Ds_ProcessedPayMethod?: string | undefined;
|
|
42
|
+
/** Credential On File transaction identifier */
|
|
43
|
+
Ds_Merchant_Cof_Txnid?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Card number with some digits replaced with asterisks
|
|
46
|
+
* @deprecated
|
|
47
|
+
*/
|
|
48
|
+
Ds_CardNumber?: string | undefined;
|
|
49
|
+
/** Card number with some digits replaced with asterisks */
|
|
50
|
+
Ds_Card_Number?: string | undefined;
|
|
51
|
+
/** Card expiry date, YYmm */
|
|
52
|
+
Ds_ExpiryDate?: string | undefined;
|
|
53
|
+
/** Stored payment method reference number */
|
|
54
|
+
Ds_Merchant_Identifier?: string | undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Common output parameters of resolved requests or notifications
|
|
58
|
+
*/
|
|
59
|
+
export interface ResolvedTransactionTrait {
|
|
60
|
+
/**
|
|
61
|
+
* Amount designated as an integer in the smallest currency division
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* `'199'` (1.99 EUR)
|
|
65
|
+
*/
|
|
66
|
+
Ds_Amount: string;
|
|
67
|
+
/** Currency number, ISO-4217 */
|
|
68
|
+
Ds_Currency: CurrencyNum;
|
|
69
|
+
/** Response code */
|
|
70
|
+
Ds_Response: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Common output parameters of a all requests
|
|
74
|
+
*/
|
|
75
|
+
export interface RequestOutputParams extends BaseOutputParams {
|
|
76
|
+
/** Payment link, paygold */
|
|
77
|
+
Ds_UrlPago2Fases?: string | undefined;
|
|
78
|
+
/** Language */
|
|
79
|
+
Ds_Language?: LanguageNum | undefined;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Output parameters of a IniciaPeticion HTTP request
|
|
83
|
+
*
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
export interface RestIniciaPeticionOutputParams extends RequestOutputParams {
|
|
87
|
+
/** EMV3DS data in json format */
|
|
88
|
+
Ds_EMV3DS?: ThreeDSv1PreAuthOutputParams | ThreeDSv2PreAuthOutputParams | undefined;
|
|
89
|
+
/** Dynamic Currency Conversion data, json */
|
|
90
|
+
Ds_DCC?: {
|
|
91
|
+
InfoMonedaTarjeta: {
|
|
92
|
+
/** Card currency number, ISO-4217 */
|
|
93
|
+
monedaDCC: string;
|
|
94
|
+
/** Card currency name */
|
|
95
|
+
litMonedaDCC: string;
|
|
96
|
+
/** Card currency 3-letter code */
|
|
97
|
+
litMonedaRDCC: string;
|
|
98
|
+
/** Amount in card currency, decimal number */
|
|
99
|
+
importeDCC: string;
|
|
100
|
+
/** Exchange rate, decimal number */
|
|
101
|
+
cambioDCC: string;
|
|
102
|
+
/** Exchange date, YYYY-MM-DD */
|
|
103
|
+
fechaCambioDCC: string;
|
|
104
|
+
/** Markup, decimal number */
|
|
105
|
+
markUp: number;
|
|
106
|
+
};
|
|
107
|
+
InfoMonedaComercio: {
|
|
108
|
+
/** Currency number, ISO-4217 */
|
|
109
|
+
monedaCome: string;
|
|
110
|
+
/** Currency 3-letter code */
|
|
111
|
+
litMonedaCome: string;
|
|
112
|
+
/** Amount, decimal number */
|
|
113
|
+
importeCome: string;
|
|
114
|
+
};
|
|
115
|
+
} | undefined;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Output parameters of a TrataPeticion HTTP request
|
|
119
|
+
*
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
export interface RestTrataPeticionOutputParams extends RequestOutputParams, Omit<ResolvedTransactionTrait, 'Ds_Response'> {
|
|
123
|
+
/** Response code */
|
|
124
|
+
Ds_Response?: ResolvedTransactionTrait['Ds_Response'] | undefined;
|
|
125
|
+
/** EMV3DS data in json format */
|
|
126
|
+
Ds_EMV3DS?: ThreeDSv1ChallengeOutputParams | ThreeDSv2ChallengeOutputParams | undefined;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Common parameters for notifications
|
|
130
|
+
*/
|
|
131
|
+
export interface NotificationOutputParams extends BaseOutputParams, ResolvedTransactionTrait {
|
|
132
|
+
/** Language */
|
|
133
|
+
Ds_ConsumerLanguage?: LanguageNum | undefined;
|
|
134
|
+
/** Error code */
|
|
135
|
+
Ds_ErrorCode?: string | undefined;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Parameters of a redsys REST notification
|
|
139
|
+
*
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
export interface RestNotificationOutputParams extends NotificationOutputParams {
|
|
143
|
+
/** Transaction date, DD/MM/YYYY */
|
|
144
|
+
Ds_Date: string;
|
|
145
|
+
/** Transaction time, hh:mm */
|
|
146
|
+
Ds_Hour: string;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Parameters of a redsys SOAP notification
|
|
150
|
+
*
|
|
151
|
+
* @public
|
|
152
|
+
*/
|
|
153
|
+
export interface SoapNotificationOutputParams extends NotificationOutputParams {
|
|
154
|
+
/** Transaction date, DD/MM/YYYY */
|
|
155
|
+
Fecha: string;
|
|
156
|
+
/** Transaction time, hh:mm */
|
|
157
|
+
Hora: string;
|
|
158
|
+
}
|
package/lib/utils/codes.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the message corresponding to a response code, in spanish
|
|
3
|
-
*
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export declare const getResponseCodeMessage: (code: string | number) => string | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* Returns the message corresponding to a gateway error code
|
|
9
|
-
*
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export declare const getSISErrorCodeMessage: (code: string) => string | undefined;
|
|
13
|
-
export declare const getHTTPErrorCodeMessage: (code: number) => string | undefined;
|
|
1
|
+
/**
|
|
2
|
+
* Returns the message corresponding to a response code, in spanish
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const getResponseCodeMessage: (code: string | number) => string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the message corresponding to a gateway error code
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const getSISErrorCodeMessage: (code: string) => string | undefined;
|
|
13
|
+
export declare const getHTTPErrorCodeMessage: (code: number) => string | undefined;
|
package/lib/utils/misc.d.ts
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import type { CommonRawRequestParams, CommonRawResponseParams } from '../types/api';
|
|
2
|
-
/**
|
|
3
|
-
* Generates a random order ID following redsys requirements
|
|
4
|
-
*
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export declare const randomTransactionId: () => string;
|
|
8
|
-
export declare const extractAndAssertOrderFromRequestParams: (requestParams: CommonRawRequestParams) => string;
|
|
9
|
-
export declare const extractAndAssertOrderFromResponseParams: (responseParams: CommonRawResponseParams) => string;
|
|
10
|
-
/**
|
|
11
|
-
* Indicates if a response code signals success
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export declare const isResponseCodeOk: (responseCode: string) => boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Asserts that response
|
|
18
|
-
*
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export declare const assertSuccessfulResponseCode: (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import type { CommonRawRequestParams, CommonRawResponseParams } from '../types/api';
|
|
2
|
+
/**
|
|
3
|
+
* Generates a random order ID following redsys requirements
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const randomTransactionId: () => string;
|
|
8
|
+
export declare const extractAndAssertOrderFromRequestParams: (requestParams: CommonRawRequestParams) => string;
|
|
9
|
+
export declare const extractAndAssertOrderFromResponseParams: (responseParams: CommonRawResponseParams) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Indicates if a response code signals success
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export declare const isResponseCodeOk: (responseCode: string | number) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Asserts that a response code indicates success
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare const assertSuccessfulResponseCode: (responseCode: string | number | undefined) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Asserts that response has a code indicating success
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export declare const assertSuccessfulResponse: (responseParams: {
|
|
28
|
+
Ds_Response?: string | undefined;
|
|
29
|
+
}) => void;
|
|
30
|
+
export declare const isStringNotEmpty: <T extends string>(str: T | undefined) => str is T;
|
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": "
|
|
4
|
+
"version": "5.1.0",
|
|
5
5
|
"author": "Javier Garcia <javiertury@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -40,50 +40,49 @@
|
|
|
40
40
|
"commit-msg": "pnpm exec commitlint -e"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@types/node-fetch": "^2.5.11",
|
|
44
43
|
"base64url": "^3.0.1",
|
|
45
|
-
"dayjs": "^1.
|
|
46
|
-
"decimal.js": "^10.3
|
|
47
|
-
"fast-xml-parser": "^4.
|
|
48
|
-
"
|
|
49
|
-
"
|
|
44
|
+
"dayjs": "^1.11.9",
|
|
45
|
+
"decimal.js": "^10.4.3",
|
|
46
|
+
"fast-xml-parser": "^4.2.7",
|
|
47
|
+
"tslib": "^2.6.1",
|
|
48
|
+
"undici": "^5.23.0"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
|
-
"@commitlint/cli": "^
|
|
53
|
-
"@commitlint/config-conventional": "^
|
|
54
|
-
"@koa/router": "^
|
|
55
|
-
"@microsoft/api-documenter": "^7.
|
|
56
|
-
"@microsoft/api-extractor": "^7.
|
|
57
|
-
"@rollup/plugin-node-resolve": "^
|
|
58
|
-
"@types/
|
|
59
|
-
"@types/
|
|
60
|
-
"@types/
|
|
61
|
-
"@types/koa": "^
|
|
62
|
-
"@types/
|
|
63
|
-
"@
|
|
64
|
-
"@typescript-eslint/
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"eslint": "^
|
|
68
|
-
"eslint-config-standard-with-typescript": "^
|
|
69
|
-
"eslint-plugin-html": "^
|
|
70
|
-
"eslint-plugin-import": "^2.
|
|
71
|
-
"eslint-plugin-jest": "^
|
|
51
|
+
"@commitlint/cli": "^17.6.7",
|
|
52
|
+
"@commitlint/config-conventional": "^17.6.7",
|
|
53
|
+
"@koa/router": "^12.0.0",
|
|
54
|
+
"@microsoft/api-documenter": "^7.22.32",
|
|
55
|
+
"@microsoft/api-extractor": "^7.36.3",
|
|
56
|
+
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
57
|
+
"@types/cheerio": "^0.22.31",
|
|
58
|
+
"@types/jest": "^29.5.3",
|
|
59
|
+
"@types/koa": "^2.13.8",
|
|
60
|
+
"@types/koa-bodyparser": "^4.3.10",
|
|
61
|
+
"@types/koa__router": "^12.0.0",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
63
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
64
|
+
"cheerio": "1.0.0-rc.12",
|
|
65
|
+
"eslint": "^8.46.0",
|
|
66
|
+
"eslint-config-prettier": "^8.10.0",
|
|
67
|
+
"eslint-config-standard-with-typescript": "^37.0.0",
|
|
68
|
+
"eslint-plugin-html": "^7.1.0",
|
|
69
|
+
"eslint-plugin-import": "^2.28.0",
|
|
70
|
+
"eslint-plugin-jest": "^27.2.3",
|
|
72
71
|
"eslint-plugin-node": "^11.1.0",
|
|
73
|
-
"eslint-plugin-promise": "^
|
|
74
|
-
"jest": "^
|
|
75
|
-
"koa": "^2.
|
|
76
|
-
"koa-bodyparser": "^4.
|
|
77
|
-
"lint-staged": "^
|
|
78
|
-
"markdown-magic": "^2.
|
|
79
|
-
"rimraf": "^
|
|
80
|
-
"rollup": "^
|
|
72
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
73
|
+
"jest": "^29.6.2",
|
|
74
|
+
"koa": "^2.14.2",
|
|
75
|
+
"koa-bodyparser": "^4.4.1",
|
|
76
|
+
"lint-staged": "^13.2.3",
|
|
77
|
+
"markdown-magic": "^2.6.1",
|
|
78
|
+
"rimraf": "^5.0.1",
|
|
79
|
+
"rollup": "^3.27.1",
|
|
81
80
|
"rollup-plugin-typescript2": "^0.35.0",
|
|
82
|
-
"simple-git-hooks": "^2.
|
|
83
|
-
"standard-version": "^9.
|
|
81
|
+
"simple-git-hooks": "^2.9.0",
|
|
82
|
+
"standard-version": "^9.5.0",
|
|
84
83
|
"ts-expect": "^1.3.0",
|
|
85
|
-
"ts-jest": "^
|
|
86
|
-
"typescript": "^
|
|
84
|
+
"ts-jest": "^29.1.1",
|
|
85
|
+
"typescript": "^5.1.6"
|
|
87
86
|
},
|
|
88
87
|
"jest": {
|
|
89
88
|
"preset": "ts-jest/presets/js-with-ts",
|
|
@@ -108,7 +107,7 @@
|
|
|
108
107
|
"scripts": {
|
|
109
108
|
"lint": "eslint --ext js,ts .",
|
|
110
109
|
"build:clean": "rimraf lib",
|
|
111
|
-
"build:code": "rollup -c rollup.config.
|
|
110
|
+
"build:code": "rollup -c rollup.config.mjs",
|
|
112
111
|
"build:api": "api-extractor run --local",
|
|
113
112
|
"build": "pnpm run build:clean && pnpm run lint && pnpm run build:code && pnpm run build:api",
|
|
114
113
|
"test:unit": "jest ./src/*.test.ts ./src/**/*.test.ts",
|
|
@@ -119,6 +118,6 @@
|
|
|
119
118
|
"docs:api": "api-documenter markdown --input-folder ./api/temp --output-folder ./docs",
|
|
120
119
|
"docs:readme": "md-magic --path ./README.md",
|
|
121
120
|
"docs": "pnpm run docs:api && pnpm run docs:readme",
|
|
122
|
-
"release": "pnpm run test && standard-version --dry-run && pnpm run docs && standard-version --commit-all"
|
|
121
|
+
"release": "pnpm run test && standard-version --dry-run && pnpm run docs && git add docs CHANGELOG.md && standard-version --commit-all"
|
|
123
122
|
}
|
|
124
123
|
}
|