@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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.15.4",
3
+ "version": "1.15.5",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",