@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
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/auth/enums.ts","../src/errors/enums.ts","../src/events/enums.ts","../src/web3/enums.ts"],"names":[],"mappings":";;;;;AAYO,IAAM,SAAA,GAAY;AAAA;AAAA,EAEvB,OAAA,EAAS,SAAA;AAAA;AAAA,EAGT,KAAA,EAAO,OAAA;AAAA;AAAA,EAGP,KAAA,EAAO,OAAA;AAAA;AAAA,EAGP,IAAA,EAAM,MAAA;AAAA;AAAA,EAGN,GAAA,EAAK,KAAA;AAAA;AAAA,EAGL,KAAA,EAAO,OAAA;AAAA;AAAA,EAGP,UAAA,EAAY;AACd;AAcO,IAAM,WAAA,GAAc;AAAA;AAAA,EAEzB,MAAA,EAAQ,QAAA;AAAA;AAAA,EAGR,QAAA,EAAU,UAAA;AAAA;AAAA,EAGV,OAAA,EAAS,SAAA;AAAA;AAAA,EAGT,SAAA,EAAW,WAAA;AAAA;AAAA,EAGX,MAAA,EAAQ;AACV;AAcO,IAAM,aAAA,GAAgB;AAAA;AAAA,EAE3B,KAAA,EAAO,OAAA;AAAA;AAAA,EAGP,MAAA,EAAQ;AACV;;;AClEO,IAAM,UAAA,GAAa;AAAA;AAAA,EAExB,eAAA,EAAiB,kBAAA;AAAA;AAAA,EAGjB,qBAAA,EAAuB,yBAAA;AAAA;AAAA,EAGvB,aAAA,EAAe,uBAAA;AAAA;AAAA,EAGf,kBAAA,EAAoB,4BAAA;AAAA;AAAA,EAGpB,YAAA,EAAc,gBAAA;AAAA;AAAA,EAGd,iBAAA,EAAmB;AACrB;AAcO,IAAM,cAAA,GAAiB;AAAA;AAAA,EAE5B,GAAA,EAAK,KAAA;AAAA;AAAA,EAGL,MAAA,EAAQ,QAAA;AAAA;AAAA,EAGR,IAAA,EAAM,MAAA;AAAA;AAAA,EAGN,QAAA,EAAU;AACZ;AAcO,IAAM,cAAA,GAAiB;AAAA;AAAA,EAE5B,MAAA,EAAQ,QAAA;AAAA;AAAA,EAGR,MAAA,EAAQ,QAAA;AAAA;AAAA,EAGR,OAAA,EAAS,SAAA;AAAA;AAAA,EAGT,UAAA,EAAY,YAAA;AAAA;AAAA,EAGZ,UAAA,EAAY;AACd;;;AC9EO,IAAM,UAAA,GAAa;AAAA;AAAA,EAExB,OAAA,EAAS;AACX;AAaO,IAAM,cAAA,GAAiB;AAAA;AAAA,EAE5B,GAAA,EAAK,KAAA;AAAA;AAAA,EAEL,MAAA,EAAQ,QAAA;AAAA;AAAA,EAER,IAAA,EAAM,MAAA;AAAA;AAAA,EAEN,QAAA,EAAU;AACZ;AAkBO,IAAM,YAAA,GAAe;AAAA;AAAA,EAE1B,OAAA,EAAS,SAAA;AAAA;AAAA,EAET,UAAA,EAAY,YAAA;AAAA;AAAA,EAEZ,SAAA,EAAW,WAAA;AAAA;AAAA,EAEX,MAAA,EAAQ,QAAA;AAAA;AAAA,EAER,QAAA,EAAU;AACZ;;;ACpDO,IAAM,QAAA,GAAW;AAAA;AAAA,EAEtB,eAAA,EAAiB,CAAA;AAAA;AAAA,EAGjB,eAAA,EAAiB,QAAA;AAAA;AAAA,EAGjB,QAAA,EAAU,EAAA;AAAA;AAAA,EAGV,eAAA,EAAiB,QAAA;AAAA;AAAA,EAGjB,QAAA,EAAU,KAAA;AAAA;AAAA,EAGV,eAAA,EAAiB,MAAA;AAAA;AAAA,EAGjB,OAAA,EAAS,GAAA;AAAA;AAAA,EAGT,WAAA,EAAa,KAAA;AAAA;AAAA,EAGb,IAAA,EAAM,IAAA;AAAA;AAAA,EAGN,WAAA,EAAa;AACf","file":"index.cjs","sourcesContent":["/**\n * Enum representing the different roles a user can have within the system.\n * @description Roles are used to determine access levels, permissions, and user-specific experiences.\n *\n * @example\n * ```typescript\n * import { USER_ROLE } from '@plyaz/types';\n *\n * const userRole = USER_ROLE.Athlete; // 'athlete'\n * const isAdmin = userRole === USER_ROLE.Admin || userRole === USER_ROLE.SuperAdmin;\n * ```\n */\nexport const USER_ROLE = {\n /** A user who is an athlete and participates in sports activities. */\n Athlete: 'athlete',\n\n /** A user who scouts and discovers talent. */\n Scout: 'scout',\n\n /** A user who acts as an agent representing athletes or clubs. */\n Agent: 'agent',\n\n /** A user representing a sports club or organization. */\n Club: 'club',\n\n /** A fan or supporter of athletes or clubs. */\n Fan: 'fan',\n\n /** A system administrator with access to management tools. */\n Admin: 'admin',\n\n /** A super admin with the highest level of access and control. */\n SuperAdmin: 'super.admin',\n} as const;\n\n/**\n * Enum representing the current status of a user account.\n * @description Statuses are used to determine login availability, visibility, and user flow.\n *\n * @example\n * ```typescript\n * import { USER_STATUS } from '@plyaz/types';\n *\n * const isAccessible = status === USER_STATUS.Active;\n * const needsReview = status === USER_STATUS.Pending;\n * ```\n */\nexport const USER_STATUS = {\n /** Active user with full access. */\n Active: 'active',\n\n /** Inactive user, typically not currently using the platform. */\n Inactive: 'inactive',\n\n /** User account is awaiting approval or completion of setup. */\n Pending: 'pending',\n\n /** User has been temporarily suspended due to policy violations or manual review. */\n Suspended: 'suspended',\n\n /** User has been permanently banned from the platform. */\n Banned: 'banned',\n} as const;\n\n/**\n * Enum representing the supported authentication providers for user login.\n * @description Auth Providers allowed such as Email, Wallet, etc.\n *\n * @example\n * ```typescript\n * import { AUTH_PROVIDER } from '@plyaz/types';\n *\n * const provider = AUTH_PROVIDER.Wallet; // 'wallet'\n * const isWeb3Auth = provider === AUTH_PROVIDER.Wallet;\n * ```\n */\nexport const AUTH_PROVIDER = {\n /** Authentication via email and password. */\n Email: 'email',\n\n /** Authentication via connected blockchain wallet. */\n Wallet: 'wallet',\n} as const;\n","/**\n * Enum representing standardized error types used across the application.\n * @description These error types help classify different categories of errors such as validation issues and system-level failures.\n *\n * @example\n * ```typescript\n * import { ERROR_TYPE } from '@plyaz/types';\n *\n * const errorType = ERROR_TYPE.ValidationError; // 'validation.error'\n *\n * // Error handling example\n * if (error.type === ERROR_TYPE.RateLimitExceeded) {\n * // Handle rate limiting\n * }\n * ```\n */\nexport const ERROR_TYPE = {\n /** A general validation error (e.g., form or input errors). */\n ValidationError: 'validation.error',\n\n /** Error related to schema validation, such as JSON schema or API payload checks. */\n SchemaValidationError: 'validation.schema.error',\n\n /** Unhandled or unexpected system error. */\n InternalError: 'system.internal.error',\n\n /** System dependency is currently unavailable (e.g., database or external API). */\n ServiceUnavailable: 'system.service.unavailable',\n\n /** The request took too long and timed out. */\n TimeoutError: 'system.timeout',\n\n /** Too many requests made in a short period of time. */\n RateLimitExceeded: 'system.rate.limit.exceeded',\n} as const;\n\n/**\n * Enum representing the severity level of an error.\n * @description This allows categorization of errors by their potential impact on the system or user.\n *\n * @example\n * ```typescript\n * import { ERROR_SEVERITY } from '@plyaz/types';\n *\n * const severity = ERROR_SEVERITY.Critical; // 'critical'\n * const shouldAlert = severity === ERROR_SEVERITY.High || severity === ERROR_SEVERITY.Critical;\n * ```\n */\nexport const ERROR_SEVERITY = {\n /** Low severity - does not impact functionality significantly. */\n Low: 'low',\n\n /** Medium severity - minor disruption or warning. */\n Medium: 'medium',\n\n /** High severity - major issue requiring attention. */\n High: 'high',\n\n /** Critical severity - blocking or crashing issue. */\n Critical: 'critical',\n} as const;\n\n/**\n * Enum representing the category or origin of an error.\n * @description Useful for filtering or logging errors based on their source or nature.\n *\n * @example\n * ```typescript\n * import { ERROR_CATEGORY } from '@plyaz/types';\n *\n * const category = ERROR_CATEGORY.Blockchain; // 'blockchain'\n * const isClientError = category === ERROR_CATEGORY.Client;\n * ```\n */\nexport const ERROR_CATEGORY = {\n /** Client-side error (e.g., invalid request). */\n Client: 'client',\n\n /** Server-side error (e.g., logic failure or exception). */\n Server: 'server',\n\n /** Network-related error (e.g., unreachable endpoint). */\n Network: 'network',\n\n /** Blockchain-related error (e.g., transaction failure, gas limit). */\n Blockchain: 'blockchain',\n\n // Validation-specific error (e.g., failed constraints or field errors).\n Validation: 'validation',\n} as const;\n","/**\n * Enum representing the types of events in the application.\n * Uses dot notation for event naming convention.\n *\n * @example\n * ```typescript\n * import { EVENT_TYPE } from '@plyaz/types';\n *\n * const eventType = EVENT_TYPE.AppInit; // 'app.init'\n * ```\n */\nexport const EVENT_TYPE = {\n /** Application initialization event. */\n AppInit: 'app.init',\n} as const;\n\n/**\n * Const representing the priority levels for events.\n * Used to determine processing order and resource allocation.\n *\n * @example\n * ```typescript\n * import { EVENT_PRIORITY } from '@plyaz/types';\n *\n * const priority = EVENT_PRIORITY.High; // 'high'\n * ```\n */\nexport const EVENT_PRIORITY = {\n /** Low priority event. */\n Low: 'low',\n /** Normal priority event. */\n Normal: 'normal',\n /** High priority event. */\n High: 'high',\n /** Critical priority event. */\n Critical: 'critical',\n} as const;\n\n/**\n * Const representing the status of an event.\n * Tracks the lifecycle of event processing from creation to completion.\n *\n * @example\n * ```typescript\n * import { EVENT_STATUS } from '@plyaz/types';\n *\n * const status = EVENT_STATUS.Processing; // 'processing'\n *\n * // Typical event lifecycle:\n * // Pending -> Processing -> Completed\n * // or\n * // Pending -> Processing -> Failed -> Retrying -> Processing -> Completed\n * ```\n */\nexport const EVENT_STATUS = {\n /** Event is pending and has not started processing. */\n Pending: 'pending',\n /** Event is currently being processed. */\n Processing: 'processing',\n /** Event has been completed successfully. */\n Completed: 'completed',\n /** Event processing failed. */\n Failed: 'failed',\n /** Event is being retried after a failure. */\n Retrying: 'retrying',\n} as const;\n","/**\n * Enum representing supported EVM-compatible blockchain networks by their numeric chain IDs.\n * @description These IDs are used to identify the specific network when interacting with wallets or smart contracts.\n * @see https://chainlist.org for reference chain IDs\n *\n * @example\n * ```typescript\n * import { CHAIN_ID } from '@plyaz/types';\n *\n * const chainId = CHAIN_ID.EthereumMainnet; // 1\n * const isTestnet = chainId === CHAIN_ID.EthereumSepolia || chainId === CHAIN_ID.PolygonAmoy;\n * ```\n */\nexport const CHAIN_ID = {\n /** Ethereum Mainnet (Chain ID: 1). */\n EthereumMainnet: 1,\n\n /** Ethereum Sepolia Testnet (Chain ID: 11155111). */\n EthereumSepolia: 11_155_111,\n\n /** Optimism Mainnet (Chain ID: 10). */\n Optimism: 10,\n\n /** Optimism Sepolia Testnet (Chain ID: 11155420). */\n OptimismSepolia: 11_155_420,\n\n /** Arbitrum One Mainnet (Chain ID: 42161). */\n Arbitrum: 42_161,\n\n /** Arbitrum Sepolia Testnet (Chain ID: 421614). */\n ArbitrumSepolia: 421_614,\n\n /** Polygon Mainnet (Chain ID: 137). */\n Polygon: 137,\n\n /** Polygon Amoy Testnet (Chain ID: 80002). */\n PolygonAmoy: 80_002,\n\n /** Base Mainnet (Chain ID: 8453). */\n Base: 8_453,\n\n /** Base Sepolia Testnet (Chain ID: 84532). */\n BaseSepolia: 84_532,\n} as const;\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- export type * from './api';
2
- export * from './auth';
1
+ export type * from './auth';
3
2
  export type * from './common';
4
3
  export type * from './entities';
5
- export * from './errors';
6
- export * from './events';
4
+ export type * from './errors';
5
+ export type * from './events';
7
6
  export type * from './store';
8
7
  export type * from './ui';
9
- export * from './web3';
8
+ export type * from './web3';
10
9
  export type * from './translations';
11
10
  export type * from './features';
12
11
  export type * from './testing';
13
12
  export type * from './lib';
14
13
  export type * from './logger';
14
+ export type * from './api';
package/dist/index.js CHANGED
@@ -1,131 +1,3 @@
1
- // @plyaz package - Built with tsup
2
1
 
3
- // src/auth/enums.ts
4
- var USER_ROLE = {
5
- /** A user who is an athlete and participates in sports activities. */
6
- Athlete: "athlete",
7
- /** A user who scouts and discovers talent. */
8
- Scout: "scout",
9
- /** A user who acts as an agent representing athletes or clubs. */
10
- Agent: "agent",
11
- /** A user representing a sports club or organization. */
12
- Club: "club",
13
- /** A fan or supporter of athletes or clubs. */
14
- Fan: "fan",
15
- /** A system administrator with access to management tools. */
16
- Admin: "admin",
17
- /** A super admin with the highest level of access and control. */
18
- SuperAdmin: "super.admin"
19
- };
20
- var USER_STATUS = {
21
- /** Active user with full access. */
22
- Active: "active",
23
- /** Inactive user, typically not currently using the platform. */
24
- Inactive: "inactive",
25
- /** User account is awaiting approval or completion of setup. */
26
- Pending: "pending",
27
- /** User has been temporarily suspended due to policy violations or manual review. */
28
- Suspended: "suspended",
29
- /** User has been permanently banned from the platform. */
30
- Banned: "banned"
31
- };
32
- var AUTH_PROVIDER = {
33
- /** Authentication via email and password. */
34
- Email: "email",
35
- /** Authentication via connected blockchain wallet. */
36
- Wallet: "wallet"
37
- };
38
-
39
- // src/errors/enums.ts
40
- var ERROR_TYPE = {
41
- /** A general validation error (e.g., form or input errors). */
42
- ValidationError: "validation.error",
43
- /** Error related to schema validation, such as JSON schema or API payload checks. */
44
- SchemaValidationError: "validation.schema.error",
45
- /** Unhandled or unexpected system error. */
46
- InternalError: "system.internal.error",
47
- /** System dependency is currently unavailable (e.g., database or external API). */
48
- ServiceUnavailable: "system.service.unavailable",
49
- /** The request took too long and timed out. */
50
- TimeoutError: "system.timeout",
51
- /** Too many requests made in a short period of time. */
52
- RateLimitExceeded: "system.rate.limit.exceeded"
53
- };
54
- var ERROR_SEVERITY = {
55
- /** Low severity - does not impact functionality significantly. */
56
- Low: "low",
57
- /** Medium severity - minor disruption or warning. */
58
- Medium: "medium",
59
- /** High severity - major issue requiring attention. */
60
- High: "high",
61
- /** Critical severity - blocking or crashing issue. */
62
- Critical: "critical"
63
- };
64
- var ERROR_CATEGORY = {
65
- /** Client-side error (e.g., invalid request). */
66
- Client: "client",
67
- /** Server-side error (e.g., logic failure or exception). */
68
- Server: "server",
69
- /** Network-related error (e.g., unreachable endpoint). */
70
- Network: "network",
71
- /** Blockchain-related error (e.g., transaction failure, gas limit). */
72
- Blockchain: "blockchain",
73
- // Validation-specific error (e.g., failed constraints or field errors).
74
- Validation: "validation"
75
- };
76
-
77
- // src/events/enums.ts
78
- var EVENT_TYPE = {
79
- /** Application initialization event. */
80
- AppInit: "app.init"
81
- };
82
- var EVENT_PRIORITY = {
83
- /** Low priority event. */
84
- Low: "low",
85
- /** Normal priority event. */
86
- Normal: "normal",
87
- /** High priority event. */
88
- High: "high",
89
- /** Critical priority event. */
90
- Critical: "critical"
91
- };
92
- var EVENT_STATUS = {
93
- /** Event is pending and has not started processing. */
94
- Pending: "pending",
95
- /** Event is currently being processed. */
96
- Processing: "processing",
97
- /** Event has been completed successfully. */
98
- Completed: "completed",
99
- /** Event processing failed. */
100
- Failed: "failed",
101
- /** Event is being retried after a failure. */
102
- Retrying: "retrying"
103
- };
104
-
105
- // src/web3/enums.ts
106
- var CHAIN_ID = {
107
- /** Ethereum Mainnet (Chain ID: 1). */
108
- EthereumMainnet: 1,
109
- /** Ethereum Sepolia Testnet (Chain ID: 11155111). */
110
- EthereumSepolia: 11155111,
111
- /** Optimism Mainnet (Chain ID: 10). */
112
- Optimism: 10,
113
- /** Optimism Sepolia Testnet (Chain ID: 11155420). */
114
- OptimismSepolia: 11155420,
115
- /** Arbitrum One Mainnet (Chain ID: 42161). */
116
- Arbitrum: 42161,
117
- /** Arbitrum Sepolia Testnet (Chain ID: 421614). */
118
- ArbitrumSepolia: 421614,
119
- /** Polygon Mainnet (Chain ID: 137). */
120
- Polygon: 137,
121
- /** Polygon Amoy Testnet (Chain ID: 80002). */
122
- PolygonAmoy: 80002,
123
- /** Base Mainnet (Chain ID: 8453). */
124
- Base: 8453,
125
- /** Base Sepolia Testnet (Chain ID: 84532). */
126
- BaseSepolia: 84532
127
- };
128
-
129
- export { AUTH_PROVIDER, CHAIN_ID, ERROR_CATEGORY, ERROR_SEVERITY, ERROR_TYPE, EVENT_PRIORITY, EVENT_STATUS, EVENT_TYPE, USER_ROLE, USER_STATUS };
130
2
  //# sourceMappingURL=index.js.map
131
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/auth/enums.ts","../src/errors/enums.ts","../src/events/enums.ts","../src/web3/enums.ts"],"names":[],"mappings":";;;AAYO,IAAM,SAAA,GAAY;AAAA;AAAA,EAEvB,OAAA,EAAS,SAAA;AAAA;AAAA,EAGT,KAAA,EAAO,OAAA;AAAA;AAAA,EAGP,KAAA,EAAO,OAAA;AAAA;AAAA,EAGP,IAAA,EAAM,MAAA;AAAA;AAAA,EAGN,GAAA,EAAK,KAAA;AAAA;AAAA,EAGL,KAAA,EAAO,OAAA;AAAA;AAAA,EAGP,UAAA,EAAY;AACd;AAcO,IAAM,WAAA,GAAc;AAAA;AAAA,EAEzB,MAAA,EAAQ,QAAA;AAAA;AAAA,EAGR,QAAA,EAAU,UAAA;AAAA;AAAA,EAGV,OAAA,EAAS,SAAA;AAAA;AAAA,EAGT,SAAA,EAAW,WAAA;AAAA;AAAA,EAGX,MAAA,EAAQ;AACV;AAcO,IAAM,aAAA,GAAgB;AAAA;AAAA,EAE3B,KAAA,EAAO,OAAA;AAAA;AAAA,EAGP,MAAA,EAAQ;AACV;;;AClEO,IAAM,UAAA,GAAa;AAAA;AAAA,EAExB,eAAA,EAAiB,kBAAA;AAAA;AAAA,EAGjB,qBAAA,EAAuB,yBAAA;AAAA;AAAA,EAGvB,aAAA,EAAe,uBAAA;AAAA;AAAA,EAGf,kBAAA,EAAoB,4BAAA;AAAA;AAAA,EAGpB,YAAA,EAAc,gBAAA;AAAA;AAAA,EAGd,iBAAA,EAAmB;AACrB;AAcO,IAAM,cAAA,GAAiB;AAAA;AAAA,EAE5B,GAAA,EAAK,KAAA;AAAA;AAAA,EAGL,MAAA,EAAQ,QAAA;AAAA;AAAA,EAGR,IAAA,EAAM,MAAA;AAAA;AAAA,EAGN,QAAA,EAAU;AACZ;AAcO,IAAM,cAAA,GAAiB;AAAA;AAAA,EAE5B,MAAA,EAAQ,QAAA;AAAA;AAAA,EAGR,MAAA,EAAQ,QAAA;AAAA;AAAA,EAGR,OAAA,EAAS,SAAA;AAAA;AAAA,EAGT,UAAA,EAAY,YAAA;AAAA;AAAA,EAGZ,UAAA,EAAY;AACd;;;AC9EO,IAAM,UAAA,GAAa;AAAA;AAAA,EAExB,OAAA,EAAS;AACX;AAaO,IAAM,cAAA,GAAiB;AAAA;AAAA,EAE5B,GAAA,EAAK,KAAA;AAAA;AAAA,EAEL,MAAA,EAAQ,QAAA;AAAA;AAAA,EAER,IAAA,EAAM,MAAA;AAAA;AAAA,EAEN,QAAA,EAAU;AACZ;AAkBO,IAAM,YAAA,GAAe;AAAA;AAAA,EAE1B,OAAA,EAAS,SAAA;AAAA;AAAA,EAET,UAAA,EAAY,YAAA;AAAA;AAAA,EAEZ,SAAA,EAAW,WAAA;AAAA;AAAA,EAEX,MAAA,EAAQ,QAAA;AAAA;AAAA,EAER,QAAA,EAAU;AACZ;;;ACpDO,IAAM,QAAA,GAAW;AAAA;AAAA,EAEtB,eAAA,EAAiB,CAAA;AAAA;AAAA,EAGjB,eAAA,EAAiB,QAAA;AAAA;AAAA,EAGjB,QAAA,EAAU,EAAA;AAAA;AAAA,EAGV,eAAA,EAAiB,QAAA;AAAA;AAAA,EAGjB,QAAA,EAAU,KAAA;AAAA;AAAA,EAGV,eAAA,EAAiB,MAAA;AAAA;AAAA,EAGjB,OAAA,EAAS,GAAA;AAAA;AAAA,EAGT,WAAA,EAAa,KAAA;AAAA;AAAA,EAGb,IAAA,EAAM,IAAA;AAAA;AAAA,EAGN,WAAA,EAAa;AACf","file":"index.js","sourcesContent":["/**\n * Enum representing the different roles a user can have within the system.\n * @description Roles are used to determine access levels, permissions, and user-specific experiences.\n *\n * @example\n * ```typescript\n * import { USER_ROLE } from '@plyaz/types';\n *\n * const userRole = USER_ROLE.Athlete; // 'athlete'\n * const isAdmin = userRole === USER_ROLE.Admin || userRole === USER_ROLE.SuperAdmin;\n * ```\n */\nexport const USER_ROLE = {\n /** A user who is an athlete and participates in sports activities. */\n Athlete: 'athlete',\n\n /** A user who scouts and discovers talent. */\n Scout: 'scout',\n\n /** A user who acts as an agent representing athletes or clubs. */\n Agent: 'agent',\n\n /** A user representing a sports club or organization. */\n Club: 'club',\n\n /** A fan or supporter of athletes or clubs. */\n Fan: 'fan',\n\n /** A system administrator with access to management tools. */\n Admin: 'admin',\n\n /** A super admin with the highest level of access and control. */\n SuperAdmin: 'super.admin',\n} as const;\n\n/**\n * Enum representing the current status of a user account.\n * @description Statuses are used to determine login availability, visibility, and user flow.\n *\n * @example\n * ```typescript\n * import { USER_STATUS } from '@plyaz/types';\n *\n * const isAccessible = status === USER_STATUS.Active;\n * const needsReview = status === USER_STATUS.Pending;\n * ```\n */\nexport const USER_STATUS = {\n /** Active user with full access. */\n Active: 'active',\n\n /** Inactive user, typically not currently using the platform. */\n Inactive: 'inactive',\n\n /** User account is awaiting approval or completion of setup. */\n Pending: 'pending',\n\n /** User has been temporarily suspended due to policy violations or manual review. */\n Suspended: 'suspended',\n\n /** User has been permanently banned from the platform. */\n Banned: 'banned',\n} as const;\n\n/**\n * Enum representing the supported authentication providers for user login.\n * @description Auth Providers allowed such as Email, Wallet, etc.\n *\n * @example\n * ```typescript\n * import { AUTH_PROVIDER } from '@plyaz/types';\n *\n * const provider = AUTH_PROVIDER.Wallet; // 'wallet'\n * const isWeb3Auth = provider === AUTH_PROVIDER.Wallet;\n * ```\n */\nexport const AUTH_PROVIDER = {\n /** Authentication via email and password. */\n Email: 'email',\n\n /** Authentication via connected blockchain wallet. */\n Wallet: 'wallet',\n} as const;\n","/**\n * Enum representing standardized error types used across the application.\n * @description These error types help classify different categories of errors such as validation issues and system-level failures.\n *\n * @example\n * ```typescript\n * import { ERROR_TYPE } from '@plyaz/types';\n *\n * const errorType = ERROR_TYPE.ValidationError; // 'validation.error'\n *\n * // Error handling example\n * if (error.type === ERROR_TYPE.RateLimitExceeded) {\n * // Handle rate limiting\n * }\n * ```\n */\nexport const ERROR_TYPE = {\n /** A general validation error (e.g., form or input errors). */\n ValidationError: 'validation.error',\n\n /** Error related to schema validation, such as JSON schema or API payload checks. */\n SchemaValidationError: 'validation.schema.error',\n\n /** Unhandled or unexpected system error. */\n InternalError: 'system.internal.error',\n\n /** System dependency is currently unavailable (e.g., database or external API). */\n ServiceUnavailable: 'system.service.unavailable',\n\n /** The request took too long and timed out. */\n TimeoutError: 'system.timeout',\n\n /** Too many requests made in a short period of time. */\n RateLimitExceeded: 'system.rate.limit.exceeded',\n} as const;\n\n/**\n * Enum representing the severity level of an error.\n * @description This allows categorization of errors by their potential impact on the system or user.\n *\n * @example\n * ```typescript\n * import { ERROR_SEVERITY } from '@plyaz/types';\n *\n * const severity = ERROR_SEVERITY.Critical; // 'critical'\n * const shouldAlert = severity === ERROR_SEVERITY.High || severity === ERROR_SEVERITY.Critical;\n * ```\n */\nexport const ERROR_SEVERITY = {\n /** Low severity - does not impact functionality significantly. */\n Low: 'low',\n\n /** Medium severity - minor disruption or warning. */\n Medium: 'medium',\n\n /** High severity - major issue requiring attention. */\n High: 'high',\n\n /** Critical severity - blocking or crashing issue. */\n Critical: 'critical',\n} as const;\n\n/**\n * Enum representing the category or origin of an error.\n * @description Useful for filtering or logging errors based on their source or nature.\n *\n * @example\n * ```typescript\n * import { ERROR_CATEGORY } from '@plyaz/types';\n *\n * const category = ERROR_CATEGORY.Blockchain; // 'blockchain'\n * const isClientError = category === ERROR_CATEGORY.Client;\n * ```\n */\nexport const ERROR_CATEGORY = {\n /** Client-side error (e.g., invalid request). */\n Client: 'client',\n\n /** Server-side error (e.g., logic failure or exception). */\n Server: 'server',\n\n /** Network-related error (e.g., unreachable endpoint). */\n Network: 'network',\n\n /** Blockchain-related error (e.g., transaction failure, gas limit). */\n Blockchain: 'blockchain',\n\n // Validation-specific error (e.g., failed constraints or field errors).\n Validation: 'validation',\n} as const;\n","/**\n * Enum representing the types of events in the application.\n * Uses dot notation for event naming convention.\n *\n * @example\n * ```typescript\n * import { EVENT_TYPE } from '@plyaz/types';\n *\n * const eventType = EVENT_TYPE.AppInit; // 'app.init'\n * ```\n */\nexport const EVENT_TYPE = {\n /** Application initialization event. */\n AppInit: 'app.init',\n} as const;\n\n/**\n * Const representing the priority levels for events.\n * Used to determine processing order and resource allocation.\n *\n * @example\n * ```typescript\n * import { EVENT_PRIORITY } from '@plyaz/types';\n *\n * const priority = EVENT_PRIORITY.High; // 'high'\n * ```\n */\nexport const EVENT_PRIORITY = {\n /** Low priority event. */\n Low: 'low',\n /** Normal priority event. */\n Normal: 'normal',\n /** High priority event. */\n High: 'high',\n /** Critical priority event. */\n Critical: 'critical',\n} as const;\n\n/**\n * Const representing the status of an event.\n * Tracks the lifecycle of event processing from creation to completion.\n *\n * @example\n * ```typescript\n * import { EVENT_STATUS } from '@plyaz/types';\n *\n * const status = EVENT_STATUS.Processing; // 'processing'\n *\n * // Typical event lifecycle:\n * // Pending -> Processing -> Completed\n * // or\n * // Pending -> Processing -> Failed -> Retrying -> Processing -> Completed\n * ```\n */\nexport const EVENT_STATUS = {\n /** Event is pending and has not started processing. */\n Pending: 'pending',\n /** Event is currently being processed. */\n Processing: 'processing',\n /** Event has been completed successfully. */\n Completed: 'completed',\n /** Event processing failed. */\n Failed: 'failed',\n /** Event is being retried after a failure. */\n Retrying: 'retrying',\n} as const;\n","/**\n * Enum representing supported EVM-compatible blockchain networks by their numeric chain IDs.\n * @description These IDs are used to identify the specific network when interacting with wallets or smart contracts.\n * @see https://chainlist.org for reference chain IDs\n *\n * @example\n * ```typescript\n * import { CHAIN_ID } from '@plyaz/types';\n *\n * const chainId = CHAIN_ID.EthereumMainnet; // 1\n * const isTestnet = chainId === CHAIN_ID.EthereumSepolia || chainId === CHAIN_ID.PolygonAmoy;\n * ```\n */\nexport const CHAIN_ID = {\n /** Ethereum Mainnet (Chain ID: 1). */\n EthereumMainnet: 1,\n\n /** Ethereum Sepolia Testnet (Chain ID: 11155111). */\n EthereumSepolia: 11_155_111,\n\n /** Optimism Mainnet (Chain ID: 10). */\n Optimism: 10,\n\n /** Optimism Sepolia Testnet (Chain ID: 11155420). */\n OptimismSepolia: 11_155_420,\n\n /** Arbitrum One Mainnet (Chain ID: 42161). */\n Arbitrum: 42_161,\n\n /** Arbitrum Sepolia Testnet (Chain ID: 421614). */\n ArbitrumSepolia: 421_614,\n\n /** Polygon Mainnet (Chain ID: 137). */\n Polygon: 137,\n\n /** Polygon Amoy Testnet (Chain ID: 80002). */\n PolygonAmoy: 80_002,\n\n /** Base Mainnet (Chain ID: 8453). */\n Base: 8_453,\n\n /** Base Sepolia Testnet (Chain ID: 84532). */\n BaseSepolia: 84_532,\n} as const;\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -53,7 +53,8 @@ import type { RenderOptions as RTLRenderOptions, RenderHookOptions as RTLRenderH
53
53
  import type { UserEvent as UserEventLib } from '@testing-library/user-event';
54
54
  import type { MockEventEmitter, MockNextRouter, MockGetServerSidePropsContext, MockGetStaticPropsContext, MockNextApiResponse, MockNextApiRequest, TestScenario, CreateMockUseRouterReturn, CreateMockWebSocketReturn, CreateMockNextRequestFunction } from '..';
55
55
  import type { UnknownArray, Promisable, Arrayable, SetOptional } from 'type-fest';
56
- import type { KeyValueStore, Identifiable, WithUrl, WithHttpMethod, HttpMethod, WithHeaders, WithIpAddress, WithQueryParams, WithBody, Named, Clearable, Resettable, Describable, WithImpact, WithElement, WithDuration, IntervalControl, WithTimestamp, WithParams, WithTimeout, WithStatus, WithLocale, WithUserId, WithMessage } from '../../../common';
56
+ import type { KeyValueStore, Identifiable, WithUrl, WithHttpMethod, WithHeaders, WithIpAddress, WithQueryParams, WithBody, Named, Clearable, Resettable, Describable, WithImpact, WithElement, WithDuration, IntervalControl, WithTimestamp, WithParams, WithTimeout, WithStatus, WithLocale, WithUserId, WithMessage } from '../../../common';
57
+ import type { HttpMethod } from '../../../api';
57
58
  /**
58
59
  * Subscription information for tracking subscriptions in tests
59
60
  *
@@ -1,4 +1,5 @@
1
1
  import type * as Vitest from 'vitest';
2
+ import type { ConnectionType, EffectiveConnectionType, NetworkInfo } from '../../../api';
2
3
  /**
3
4
  * Options for setupApiTest helper
4
5
  */
@@ -94,27 +95,6 @@ export interface ConfigAdapterSpies {
94
95
  parseRetryConfig: Vitest.Mock;
95
96
  parseCacheConfig: Vitest.Mock;
96
97
  }
97
- /**
98
- * Connection types based on Network Information API
99
- */
100
- export type ConnectionType = 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | 'unknown';
101
- /**
102
- * Effective connection types (quality assessment)
103
- */
104
- export type EffectiveConnectionType = 'slow-2g' | '2g' | '3g' | '4g' | 'unknown';
105
- /**
106
- * Network connection information
107
- */
108
- export interface NetworkInfo {
109
- type: ConnectionType;
110
- effectiveType: EffectiveConnectionType;
111
- downlink: number | null;
112
- downlinkMax: number | null;
113
- rtt: number | null;
114
- saveData: boolean;
115
- online: boolean;
116
- deviceMemory?: number | null;
117
- }
118
98
  /**
119
99
  * Network connection information interface
120
100
  * Represents the connection property of navigator for testing
@@ -138,3 +118,175 @@ export interface NetworkInfoNavigatorMock {
138
118
  language: string;
139
119
  languages: string[];
140
120
  }
121
+ export interface CreateMockEventFactoryReturn {
122
+ on: ReturnType<Vitest.Mock>;
123
+ off: ReturnType<Vitest.Mock>;
124
+ emit: ReturnType<Vitest.Mock>;
125
+ emitGeneric: ReturnType<Vitest.Mock>;
126
+ onAny: ReturnType<Vitest.Mock>;
127
+ offAny: ReturnType<Vitest.Mock>;
128
+ }
129
+ export interface CreateMockNetworkFactory {
130
+ emitQualityChanged: ReturnType<Vitest.Mock>;
131
+ emitQualityChange: ReturnType<Vitest.Mock>;
132
+ emitConfigOverride: ReturnType<Vitest.Mock>;
133
+ emitConfigRestored: ReturnType<Vitest.Mock>;
134
+ emitInfoUpdate: ReturnType<Vitest.Mock>;
135
+ emitPresetApplied: ReturnType<Vitest.Mock>;
136
+ emitPresetChanged: ReturnType<Vitest.Mock>;
137
+ emitHintsUpdated: ReturnType<Vitest.Mock>;
138
+ emitAutoDetection: ReturnType<Vitest.Mock>;
139
+ emitManualUpdate: ReturnType<Vitest.Mock>;
140
+ }
141
+ export interface CreateMockErrorFactory {
142
+ emitError: ReturnType<Vitest.Mock>;
143
+ emitNetworkError: ReturnType<Vitest.Mock>;
144
+ emitTimeoutError: ReturnType<Vitest.Mock>;
145
+ emitClientError: ReturnType<Vitest.Mock>;
146
+ emitServerError: ReturnType<Vitest.Mock>;
147
+ emitValidationError: ReturnType<Vitest.Mock>;
148
+ emitHeadersError: ReturnType<Vitest.Mock>;
149
+ emitCritical: ReturnType<Vitest.Mock>;
150
+ }
151
+ export interface CreateMockHeaderFactory {
152
+ emitChanged: ReturnType<Vitest.Mock>;
153
+ emitEnriched: ReturnType<Vitest.Mock>;
154
+ emitConflict: ReturnType<Vitest.Mock>;
155
+ emitOverride: ReturnType<Vitest.Mock>;
156
+ emitMerged: ReturnType<Vitest.Mock>;
157
+ emitFiltered: ReturnType<Vitest.Mock>;
158
+ emitValidated: ReturnType<Vitest.Mock>;
159
+ emitCached: ReturnType<Vitest.Mock>;
160
+ emitCacheHit: ReturnType<Vitest.Mock>;
161
+ emitCacheMiss: ReturnType<Vitest.Mock>;
162
+ }
163
+ export interface CreateMockDebugFactory {
164
+ emitConfigConflict: ReturnType<Vitest.Mock>;
165
+ emitConflict: ReturnType<Vitest.Mock>;
166
+ emitConfigChange: ReturnType<Vitest.Mock>;
167
+ emitHeadersTracked: ReturnType<Vitest.Mock>;
168
+ emitNetworkOverride: ReturnType<Vitest.Mock>;
169
+ emitNetworkStateChanged: ReturnType<Vitest.Mock>;
170
+ emitNetworkDataCleared: ReturnType<Vitest.Mock>;
171
+ emitDebugInfo: ReturnType<Vitest.Mock>;
172
+ emitTracking: ReturnType<Vitest.Mock>;
173
+ emitPerformance: ReturnType<Vitest.Mock>;
174
+ emitMonitoringAlert: ReturnType<Vitest.Mock>;
175
+ }
176
+ export interface CreateMockConfigFactory {
177
+ emitGlobalUpdated: ReturnType<Vitest.Mock>;
178
+ emitConfigChanged: ReturnType<Vitest.Mock>;
179
+ emitConfigOverride: ReturnType<Vitest.Mock>;
180
+ emitConfigRestored: ReturnType<Vitest.Mock>;
181
+ emitConfigValidated: ReturnType<Vitest.Mock>;
182
+ emitPresetApplied: ReturnType<Vitest.Mock>;
183
+ }
184
+ export interface CreateMockPerformanceFactory {
185
+ emitMetric: ReturnType<Vitest.Mock>;
186
+ emitTiming: ReturnType<Vitest.Mock>;
187
+ emitThreshold: ReturnType<Vitest.Mock>;
188
+ emitCacheHit: ReturnType<Vitest.Mock>;
189
+ emitCacheMiss: ReturnType<Vitest.Mock>;
190
+ emitRequestStart: ReturnType<Vitest.Mock>;
191
+ emitRequestComplete: ReturnType<Vitest.Mock>;
192
+ emitRetry: ReturnType<Vitest.Mock>;
193
+ emitThresholdExceeded: ReturnType<Vitest.Mock>;
194
+ emitOptimizationApplied: ReturnType<Vitest.Mock>;
195
+ emitMetricRecorded: ReturnType<Vitest.Mock>;
196
+ }
197
+ export interface CreateMockCacheFactory {
198
+ emitHit: ReturnType<Vitest.Mock>;
199
+ emitMiss: ReturnType<Vitest.Mock>;
200
+ emitSet: ReturnType<Vitest.Mock>;
201
+ emitDelete: ReturnType<Vitest.Mock>;
202
+ emitClear: ReturnType<Vitest.Mock>;
203
+ emitExpire: ReturnType<Vitest.Mock>;
204
+ emitCacheHit: ReturnType<Vitest.Mock>;
205
+ emitCacheMiss: ReturnType<Vitest.Mock>;
206
+ emitCacheSet: ReturnType<Vitest.Mock>;
207
+ emitCacheDelete: ReturnType<Vitest.Mock>;
208
+ emitCacheClear: ReturnType<Vitest.Mock>;
209
+ emitCacheExpire: ReturnType<Vitest.Mock>;
210
+ }
211
+ export interface CreateMockBaseFactory {
212
+ emitInitialized: ReturnType<Vitest.Mock>;
213
+ emitDestroyed: ReturnType<Vitest.Mock>;
214
+ emitReady: ReturnType<Vitest.Mock>;
215
+ }
216
+ export interface CreateMockClientFactory {
217
+ emitRequest: ReturnType<Vitest.Mock>;
218
+ emitResponse: ReturnType<Vitest.Mock>;
219
+ emitError: ReturnType<Vitest.Mock>;
220
+ emitRetry: ReturnType<Vitest.Mock>;
221
+ emitTimeout: ReturnType<Vitest.Mock>;
222
+ emitConflict: ReturnType<Vitest.Mock>;
223
+ emitDebug: ReturnType<Vitest.Mock>;
224
+ emitCreated: ReturnType<Vitest.Mock>;
225
+ emitDestroyed: ReturnType<Vitest.Mock>;
226
+ }
227
+ /**
228
+ * Base event factory class for testing
229
+ * Provides minimal event functionality
230
+ */
231
+ export interface BaseEventFactoryClass {
232
+ new (): {
233
+ emit(): void;
234
+ on(): ReturnType<Vitest.Mock>;
235
+ off(): void;
236
+ createAndEmit(): void;
237
+ createBaseEvent(): {
238
+ type: string;
239
+ timestamp: number;
240
+ };
241
+ };
242
+ }
243
+ /**
244
+ * Return type for createAllMockFactories
245
+ * Provides access to all mock event factories and reset functionality
246
+ */
247
+ export interface CreateAllMockFactoriesReturn {
248
+ BaseEventFactory: BaseEventFactoryClass;
249
+ getNetworkEventFactory: ReturnType<Vitest.Mock>;
250
+ getHeaderEventFactory: ReturnType<Vitest.Mock>;
251
+ getErrorEventFactory: ReturnType<Vitest.Mock>;
252
+ getDebugEventFactory: ReturnType<Vitest.Mock>;
253
+ getConfigEventFactory: ReturnType<Vitest.Mock>;
254
+ getPerformanceEventFactory: ReturnType<Vitest.Mock>;
255
+ getCacheEventFactory: ReturnType<Vitest.Mock>;
256
+ getBaseEventFactory: ReturnType<Vitest.Mock>;
257
+ getClientEventFactory: ReturnType<Vitest.Mock>;
258
+ resetFactories: ReturnType<Vitest.Mock>;
259
+ }
260
+ /**
261
+ * Return type for createTrackableApiClient
262
+ * Provides mock client with event tracking utilities
263
+ *
264
+ * @template TClient - Type of the mock client being tracked
265
+ */
266
+ export interface CreateTrackableApiClientReturn<TClient = unknown> {
267
+ client: TClient;
268
+ getEventHandlers: (event: string) => Array<(...args: unknown[]) => void>;
269
+ triggerEvent: (event: string, ...args: unknown[]) => void;
270
+ clearHandlers: () => void;
271
+ }
272
+ /**
273
+ * Options for createMockNavigator function
274
+ * Additional navigator properties to configure
275
+ */
276
+ export interface CreateMockNavigatorOptions {
277
+ onLine?: boolean;
278
+ language?: string;
279
+ languages?: string[];
280
+ }
281
+ /**
282
+ * Return type for setupNetworkMockHelper
283
+ * Provides utilities to switch between network conditions in tests
284
+ */
285
+ export interface SetupNetworkMockHelperReturn {
286
+ setExcellent: () => NetworkInfoNavigatorMock;
287
+ setGood: () => NetworkInfoNavigatorMock;
288
+ setSlow: () => NetworkInfoNavigatorMock;
289
+ setOffline: () => NetworkInfoNavigatorMock;
290
+ setCustom: (networkInfo: Partial<NetworkInfo>) => NetworkInfoNavigatorMock;
291
+ getNavigator: () => NetworkInfoNavigatorMock;
292
+ }
@@ -1,31 +1,4 @@
1
1
  'use strict';
2
2
 
3
- // @plyaz package - Built with tsup
4
-
5
- // src/web3/enums.ts
6
- var CHAIN_ID = {
7
- /** Ethereum Mainnet (Chain ID: 1). */
8
- EthereumMainnet: 1,
9
- /** Ethereum Sepolia Testnet (Chain ID: 11155111). */
10
- EthereumSepolia: 11155111,
11
- /** Optimism Mainnet (Chain ID: 10). */
12
- Optimism: 10,
13
- /** Optimism Sepolia Testnet (Chain ID: 11155420). */
14
- OptimismSepolia: 11155420,
15
- /** Arbitrum One Mainnet (Chain ID: 42161). */
16
- Arbitrum: 42161,
17
- /** Arbitrum Sepolia Testnet (Chain ID: 421614). */
18
- ArbitrumSepolia: 421614,
19
- /** Polygon Mainnet (Chain ID: 137). */
20
- Polygon: 137,
21
- /** Polygon Amoy Testnet (Chain ID: 80002). */
22
- PolygonAmoy: 80002,
23
- /** Base Mainnet (Chain ID: 8453). */
24
- Base: 8453,
25
- /** Base Sepolia Testnet (Chain ID: 84532). */
26
- BaseSepolia: 84532
27
- };
28
-
29
- exports.CHAIN_ID = CHAIN_ID;
30
3
  //# sourceMappingURL=index.cjs.map
31
4
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/web3/enums.ts"],"names":[],"mappings":";;;;;AAaO,IAAM,QAAA,GAAW;AAAA;AAAA,EAEtB,eAAA,EAAiB,CAAA;AAAA;AAAA,EAGjB,eAAA,EAAiB,QAAA;AAAA;AAAA,EAGjB,QAAA,EAAU,EAAA;AAAA;AAAA,EAGV,eAAA,EAAiB,QAAA;AAAA;AAAA,EAGjB,QAAA,EAAU,KAAA;AAAA;AAAA,EAGV,eAAA,EAAiB,MAAA;AAAA;AAAA,EAGjB,OAAA,EAAS,GAAA;AAAA;AAAA,EAGT,WAAA,EAAa,KAAA;AAAA;AAAA,EAGb,IAAA,EAAM,IAAA;AAAA;AAAA,EAGN,WAAA,EAAa;AACf","file":"index.cjs","sourcesContent":["/**\n * Enum representing supported EVM-compatible blockchain networks by their numeric chain IDs.\n * @description These IDs are used to identify the specific network when interacting with wallets or smart contracts.\n * @see https://chainlist.org for reference chain IDs\n *\n * @example\n * ```typescript\n * import { CHAIN_ID } from '@plyaz/types';\n *\n * const chainId = CHAIN_ID.EthereumMainnet; // 1\n * const isTestnet = chainId === CHAIN_ID.EthereumSepolia || chainId === CHAIN_ID.PolygonAmoy;\n * ```\n */\nexport const CHAIN_ID = {\n /** Ethereum Mainnet (Chain ID: 1). */\n EthereumMainnet: 1,\n\n /** Ethereum Sepolia Testnet (Chain ID: 11155111). */\n EthereumSepolia: 11_155_111,\n\n /** Optimism Mainnet (Chain ID: 10). */\n Optimism: 10,\n\n /** Optimism Sepolia Testnet (Chain ID: 11155420). */\n OptimismSepolia: 11_155_420,\n\n /** Arbitrum One Mainnet (Chain ID: 42161). */\n Arbitrum: 42_161,\n\n /** Arbitrum Sepolia Testnet (Chain ID: 421614). */\n ArbitrumSepolia: 421_614,\n\n /** Polygon Mainnet (Chain ID: 137). */\n Polygon: 137,\n\n /** Polygon Amoy Testnet (Chain ID: 80002). */\n PolygonAmoy: 80_002,\n\n /** Base Mainnet (Chain ID: 8453). */\n Base: 8_453,\n\n /** Base Sepolia Testnet (Chain ID: 84532). */\n BaseSepolia: 84_532,\n} as const;\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -1,2 +1,2 @@
1
- export * from './enums';
1
+ export type * from './enums';
2
2
  export type * from './types';
@@ -1,29 +1,3 @@
1
- // @plyaz package - Built with tsup
2
1
 
3
- // src/web3/enums.ts
4
- var CHAIN_ID = {
5
- /** Ethereum Mainnet (Chain ID: 1). */
6
- EthereumMainnet: 1,
7
- /** Ethereum Sepolia Testnet (Chain ID: 11155111). */
8
- EthereumSepolia: 11155111,
9
- /** Optimism Mainnet (Chain ID: 10). */
10
- Optimism: 10,
11
- /** Optimism Sepolia Testnet (Chain ID: 11155420). */
12
- OptimismSepolia: 11155420,
13
- /** Arbitrum One Mainnet (Chain ID: 42161). */
14
- Arbitrum: 42161,
15
- /** Arbitrum Sepolia Testnet (Chain ID: 421614). */
16
- ArbitrumSepolia: 421614,
17
- /** Polygon Mainnet (Chain ID: 137). */
18
- Polygon: 137,
19
- /** Polygon Amoy Testnet (Chain ID: 80002). */
20
- PolygonAmoy: 80002,
21
- /** Base Mainnet (Chain ID: 8453). */
22
- Base: 8453,
23
- /** Base Sepolia Testnet (Chain ID: 84532). */
24
- BaseSepolia: 84532
25
- };
26
-
27
- export { CHAIN_ID };
28
2
  //# sourceMappingURL=index.js.map
29
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/web3/enums.ts"],"names":[],"mappings":";;;AAaO,IAAM,QAAA,GAAW;AAAA;AAAA,EAEtB,eAAA,EAAiB,CAAA;AAAA;AAAA,EAGjB,eAAA,EAAiB,QAAA;AAAA;AAAA,EAGjB,QAAA,EAAU,EAAA;AAAA;AAAA,EAGV,eAAA,EAAiB,QAAA;AAAA;AAAA,EAGjB,QAAA,EAAU,KAAA;AAAA;AAAA,EAGV,eAAA,EAAiB,MAAA;AAAA;AAAA,EAGjB,OAAA,EAAS,GAAA;AAAA;AAAA,EAGT,WAAA,EAAa,KAAA;AAAA;AAAA,EAGb,IAAA,EAAM,IAAA;AAAA;AAAA,EAGN,WAAA,EAAa;AACf","file":"index.js","sourcesContent":["/**\n * Enum representing supported EVM-compatible blockchain networks by their numeric chain IDs.\n * @description These IDs are used to identify the specific network when interacting with wallets or smart contracts.\n * @see https://chainlist.org for reference chain IDs\n *\n * @example\n * ```typescript\n * import { CHAIN_ID } from '@plyaz/types';\n *\n * const chainId = CHAIN_ID.EthereumMainnet; // 1\n * const isTestnet = chainId === CHAIN_ID.EthereumSepolia || chainId === CHAIN_ID.PolygonAmoy;\n * ```\n */\nexport const CHAIN_ID = {\n /** Ethereum Mainnet (Chain ID: 1). */\n EthereumMainnet: 1,\n\n /** Ethereum Sepolia Testnet (Chain ID: 11155111). */\n EthereumSepolia: 11_155_111,\n\n /** Optimism Mainnet (Chain ID: 10). */\n Optimism: 10,\n\n /** Optimism Sepolia Testnet (Chain ID: 11155420). */\n OptimismSepolia: 11_155_420,\n\n /** Arbitrum One Mainnet (Chain ID: 42161). */\n Arbitrum: 42_161,\n\n /** Arbitrum Sepolia Testnet (Chain ID: 421614). */\n ArbitrumSepolia: 421_614,\n\n /** Polygon Mainnet (Chain ID: 137). */\n Polygon: 137,\n\n /** Polygon Amoy Testnet (Chain ID: 80002). */\n PolygonAmoy: 80_002,\n\n /** Base Mainnet (Chain ID: 8453). */\n Base: 8_453,\n\n /** Base Sepolia Testnet (Chain ID: 84532). */\n BaseSepolia: 84_532,\n} as const;\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.7.16",
3
+ "version": "1.7.18",
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.",
@@ -182,7 +182,8 @@
182
182
  "@eslint/markdown": "^6.5.0",
183
183
  "@nestjs/common": "^11.1.3",
184
184
  "@next/eslint-plugin-next": "^15.0.3",
185
- "@plyaz/config": "^1.4.1",
185
+ "@plyaz/config": "^1.5.2",
186
+ "fetchff": "^4.1.0",
186
187
  "@plyaz/devtools": "^1.9.4",
187
188
  "@testing-library/react": "^16.3.0",
188
189
  "@testing-library/user-event": "^14.6.1",
@@ -1,51 +0,0 @@
1
- import type { Simplify } from 'type-fest';
2
- import type { WithTimestamp, WithCorrelationId, Pageable, Versioned, NavigablePaginationMetadata, WithRequestId, WithItems } from '../common/types';
3
- /**
4
- * Standard structure for API responses.
5
- * @template Data - The main payload/data returned by the API.
6
- * @template Meta - Optional metadata object extending the default {@link ApiResponseMeta}.
7
- */
8
- export interface ApiResponse<Data, Meta = Record<string, string>> {
9
- /**
10
- * The core data returned by the API.
11
- */
12
- readonly data: Data;
13
- /**
14
- * Optional metadata object containing request-related information.
15
- */
16
- readonly meta?: ApiResponseMeta & Meta;
17
- }
18
- /**
19
- * Metadata included in API responses.
20
- * @description Provides useful context such as timestamps, request tracking, and API versioning.
21
- */
22
- export type ApiResponseMeta = WithTimestamp & Versioned & WithCorrelationId & WithRequestId;
23
- /**
24
- * Generic structure for paginated API responses.
25
- * @template Item - The type of items in the paginated result.
26
- */
27
- /**
28
- * Common pagination information shared by paginated API results.
29
- * Type alias for NavigablePaginationMetadata to maintain consistency.
30
- */
31
- export type PaginationInfo = NavigablePaginationMetadata;
32
- /**
33
- * Items wrapper used in paginated results.
34
- * Extends WithItems with readonly array for API immutability.
35
- */
36
- export type Paginated<Item> = WithItems<Item>;
37
- /**
38
- * Generic structure for paginated API responses.
39
- * Combines items with pagination metadata.
40
- * @template Item - The type of items in the paginated result.
41
- */
42
- export type PaginatedResponse<Item> = Simplify<Paginated<Item> & PaginationInfo>;
43
- /**
44
- * Parameters used to control pagination in API requests.
45
- */
46
- export interface PaginationParameters extends Partial<Pageable> {
47
- /**
48
- * Optional cursor string for cursor-based pagination.
49
- */
50
- readonly cursor?: string;
51
- }