@plyaz/types 1.7.16 → 1.7.18

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.
Files changed (65) hide show
  1. package/dist/api/cache/index.d.ts +5 -0
  2. package/dist/api/cache/types.d.ts +22 -0
  3. package/dist/api/client/index.d.ts +5 -0
  4. package/dist/api/client/types.d.ts +31 -0
  5. package/dist/api/config/index.d.ts +5 -0
  6. package/dist/api/config/types.d.ts +634 -0
  7. package/dist/api/errors/index.d.ts +5 -0
  8. package/dist/api/errors/types.d.ts +129 -0
  9. package/dist/api/events/index.d.ts +5 -0
  10. package/dist/api/events/types.d.ts +795 -0
  11. package/dist/api/headers/index.d.ts +5 -0
  12. package/dist/api/headers/types.d.ts +59 -0
  13. package/dist/api/index.d.ts +19 -1
  14. package/dist/api/network/enums.d.ts +14 -0
  15. package/dist/api/network/index.d.ts +6 -0
  16. package/dist/api/network/types.d.ts +121 -0
  17. package/dist/api/performance/index.d.ts +5 -0
  18. package/dist/api/performance/types.d.ts +137 -0
  19. package/dist/api/polling/index.d.ts +5 -0
  20. package/dist/api/polling/types.d.ts +74 -0
  21. package/dist/api/queue/enums.d.ts +31 -0
  22. package/dist/api/queue/index.d.ts +6 -0
  23. package/dist/api/queue/types.d.ts +65 -0
  24. package/dist/api/regional/index.d.ts +5 -0
  25. package/dist/api/regional/types.d.ts +50 -0
  26. package/dist/api/retry/index.d.ts +5 -0
  27. package/dist/api/retry/types.d.ts +26 -0
  28. package/dist/api/revalidation/index.d.ts +5 -0
  29. package/dist/api/revalidation/types.d.ts +33 -0
  30. package/dist/api/strategies/index.d.ts +5 -0
  31. package/dist/api/strategies/types.d.ts +27 -0
  32. package/dist/api/utils/enums.d.ts +23 -0
  33. package/dist/api/utils/index.d.ts +5 -0
  34. package/dist/auth/index.cjs +0 -41
  35. package/dist/auth/index.cjs.map +1 -1
  36. package/dist/auth/index.d.ts +1 -1
  37. package/dist/auth/index.js +0 -38
  38. package/dist/auth/index.js.map +1 -1
  39. package/dist/common/types.d.ts +1 -4
  40. package/dist/errors/enums.d.ts +27 -0
  41. package/dist/errors/index.cjs +0 -43
  42. package/dist/errors/index.cjs.map +1 -1
  43. package/dist/errors/index.d.ts +1 -1
  44. package/dist/errors/index.js +0 -40
  45. package/dist/errors/index.js.map +1 -1
  46. package/dist/events/index.cjs +0 -33
  47. package/dist/events/index.cjs.map +1 -1
  48. package/dist/events/index.d.ts +1 -1
  49. package/dist/events/index.js +0 -30
  50. package/dist/events/index.js.map +1 -1
  51. package/dist/events/types.d.ts +2 -2
  52. package/dist/index.cjs +0 -138
  53. package/dist/index.cjs.map +1 -1
  54. package/dist/index.d.ts +5 -5
  55. package/dist/index.js +0 -128
  56. package/dist/index.js.map +1 -1
  57. package/dist/testing/common/utils/types.d.ts +2 -1
  58. package/dist/testing/features/api/types.d.ts +173 -21
  59. package/dist/web3/index.cjs +0 -27
  60. package/dist/web3/index.cjs.map +1 -1
  61. package/dist/web3/index.d.ts +1 -1
  62. package/dist/web3/index.js +0 -26
  63. package/dist/web3/index.js.map +1 -1
  64. package/package.json +3 -2
  65. package/dist/api/types.d.ts +0 -51
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Cache Types
3
+ * Re-exports all cache-related types for the API package
4
+ */
5
+ export type * from './types';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Cache Management Strategy Types
3
+ * Type definitions for cache strategies (implementations remain in @plyaz/api)
4
+ */
5
+ /**
6
+ * Cache strategy configuration
7
+ * Maps to fetchff's cache options
8
+ */
9
+ export interface CacheStrategyConfig {
10
+ /** Time-to-live in seconds */
11
+ ttl?: number;
12
+ /** Stale-while-revalidate time in seconds */
13
+ stale?: number;
14
+ /** Skip caching entirely */
15
+ skip?: boolean;
16
+ /** Cache error responses */
17
+ cacheErrors?: boolean;
18
+ }
19
+ /**
20
+ * Cache strategy names for type-safe access
21
+ */
22
+ export type CacheStrategyName = 'none' | 'shortLived' | 'standard' | 'longLived' | 'aggressive' | 'permanent' | 'swr';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Client Types
3
+ * Re-exports all client-related types for the API package
4
+ */
5
+ export type * from './types';
@@ -0,0 +1,31 @@
1
+ /**
2
+ * API Client Types
3
+ * Defines the client interface and options
4
+ */
5
+ /**
6
+ * Options for creating an API client
7
+ * Endpoints are automatically included from src/api/endpoints
8
+ *
9
+ * Supports three levels of configuration:
10
+ * 1. Unified strategy (simple) - Preconfigured strategy for common patterns
11
+ * 2. Individual strategies (flexible) - Mix and match specific domain strategies
12
+ * 3. Direct configuration (advanced) - Full control via ApiConfig
13
+ *
14
+ * Configuration precedence: Direct config > Individual strategies > Unified strategy
15
+ *
16
+ * Supports all fetchff interceptors:
17
+ * - onRequest: (config) => config - Modify requests before sending
18
+ * - onResponse: (response) => response - Handle successful responses
19
+ * - onError: (error, config) => error - Handle errors
20
+ * - onRetry: (response, attempt) => response - Handle retry attempts
21
+ *
22
+ * Note: ApiConfig is imported from config/types, not defined here to avoid circular dependencies
23
+ */
24
+ export type ApiClientOptions = Record<string, unknown>;
25
+ /**
26
+ * API client instance with full TypeScript support
27
+ * The client IS the fetchff instance with all endpoint methods
28
+ *
29
+ * Note: Full type definition requires EndpointTypes and endpoints from api package
30
+ */
31
+ export type ApiClientInstance = Record<string, unknown>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Config Types
3
+ * Re-exports all config-related types for the API package
4
+ */
5
+ export type * from './types';