@plyaz/types 1.15.4 → 1.15.5
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/dist/api/index.cjs +177 -88
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.js +177 -88
- package/dist/api/index.js.map +1 -1
- package/dist/errors/codes.d.ts +13 -0
- package/dist/errors/enums.d.ts +2 -0
- package/dist/errors/index.cjs +184 -89
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.js +184 -89
- package/dist/errors/index.js.map +1 -1
- package/dist/index.cjs +174 -88
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +174 -88
- package/dist/index.js.map +1 -1
- package/dist/payments/base-error/types.d.ts +24 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PAYMENT_METHOD, PAYMENT_PROVIDER_TYPE, ProviderCapabilities, ProviderConfiguration } from '../provider';
|
|
2
2
|
import type { Money } from '../transaction';
|
|
3
|
-
import type { BaseErrorContext } from '../../api';
|
|
3
|
+
import type { BaseErrorContext, ErrorOperation } from '../../api';
|
|
4
4
|
import type { EventProcessingMetadata, PaymentEventPayload, PAYMENT_EVENT_TYPE } from '../events';
|
|
5
5
|
import type { ERROR_SEVERITY, ErrorCategoryValue } from '../../errors';
|
|
6
6
|
import type { CurrencyCode } from '../../locale/types';
|
|
@@ -179,4 +179,27 @@ export interface GenericPaymentMetadata {
|
|
|
179
179
|
};
|
|
180
180
|
custom?: Record<string, string | number | boolean>;
|
|
181
181
|
}
|
|
182
|
+
export interface PaymentValidationErrorOptions extends PaymentErrorOptions {
|
|
183
|
+
violatedRule?: string;
|
|
184
|
+
invalidField?: string;
|
|
185
|
+
invalidValue?: string | number | boolean | Money;
|
|
186
|
+
details?: Record<string, string | number | boolean | null>;
|
|
187
|
+
}
|
|
188
|
+
export interface PaymentProviderErrorOptions {
|
|
189
|
+
provider: PAYMENT_PROVIDER_TYPE;
|
|
190
|
+
httpStatus?: number;
|
|
191
|
+
operation?: ErrorOperation;
|
|
192
|
+
endpoint?: string;
|
|
193
|
+
providerError?: {
|
|
194
|
+
code?: number;
|
|
195
|
+
message?: string;
|
|
196
|
+
response?: Record<string, string | number | boolean | null>;
|
|
197
|
+
};
|
|
198
|
+
transactionId?: string;
|
|
199
|
+
userId?: string;
|
|
200
|
+
retryable?: boolean;
|
|
201
|
+
userFacing?: boolean;
|
|
202
|
+
severity?: SeverityError;
|
|
203
|
+
context?: Partial<PaymentErrorContext>;
|
|
204
|
+
}
|
|
182
205
|
export type SeverityError = (typeof ERROR_SEVERITY)[keyof typeof ERROR_SEVERITY];
|
package/package.json
CHANGED