@plyaz/types 1.1.2 → 2.0.0
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/index.js.map +1 -1
- package/package.json +1 -13
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":";;;AAIO,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,
|
|
1
|
+
{"version":3,"sources":["../src/auth/enums.ts","../src/errors/enums.ts","../src/events/enums.ts","../src/web3/enums.ts"],"names":[],"mappings":";;;AAIO,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,EAEP,UAAA,EAAY;AACd;AAMO,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;AAMO,IAAM,aAAA,GAAgB;AAAA;AAAA,EAE3B,KAAA,EAAO,OAAA;AAAA;AAAA,EAGP,MAAA,EAAQ;AACV;;;ACrDO,IAA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AA,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 */\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 // 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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plyaz/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
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.",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"keywords": [],
|
|
31
31
|
"packageManager": "pnpm@10.11.0",
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@changesets/cli": "^2.29.5",
|
|
34
33
|
"@darraghor/eslint-plugin-nestjs-typed": "^6.6.2",
|
|
35
34
|
"@eslint/eslintrc": "^3.2.0",
|
|
36
35
|
"@eslint/js": "^9.15.0",
|
|
@@ -85,17 +84,6 @@
|
|
|
85
84
|
"vitest": "3.2.4",
|
|
86
85
|
"zod": "^3.25.64"
|
|
87
86
|
},
|
|
88
|
-
"peerDependenciesMeta": {
|
|
89
|
-
"react": {
|
|
90
|
-
"optional": true
|
|
91
|
-
},
|
|
92
|
-
"react-dom": {
|
|
93
|
-
"optional": true
|
|
94
|
-
},
|
|
95
|
-
"next": {
|
|
96
|
-
"optional": true
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
87
|
"scripts": {
|
|
100
88
|
"build": "pnpm clean && pnpm build:js && pnpm build:types",
|
|
101
89
|
"build:js": "tsup",
|