@plyaz/types 1.11.2 → 1.11.3

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,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { WithStatusCode, WithErrorCode, WithMessage, WithCorrelationId, WithTimestamp, WithValidationError } from '../common/types';
3
3
  import type { ERRORS_CODES } from '@plyaz/config';
4
+ import type { ERROR_CATEGORY } from './enums';
4
5
  /**
5
6
  * Represents the structure of an error response returned by the application.
6
7
  * @template ErrorDetails - The type of the `errors` array, defaults to `ErrorDetailsList`.
@@ -69,7 +70,7 @@ export interface ValidationErrorResponse {
69
70
  }
70
71
  export interface BaseErrorResponse {
71
72
  /** Category of the error. */
72
- type: 'form' | 'auth' | 'server' | 'network' | 'runtime';
73
+ type: (typeof ERROR_CATEGORY)[keyof typeof ERROR_CATEGORY];
73
74
  /** Human-readable error message. */
74
75
  message: string;
75
76
  /** ISO timestamp when the error occurred. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.11.2",
3
+ "version": "1.11.3",
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.",