@plyaz/types 1.7.22 → 1.7.24
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/api/client/types.d.ts +78 -2
- package/dist/api/errors/types.d.ts +13 -1
- package/dist/api/events/index.d.ts +1 -0
- package/dist/api/events/queue/types.d.ts +34 -0
- package/dist/api/index.cjs +1029 -0
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.ts +33 -21
- package/dist/api/index.js +971 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/network/index.d.ts +1 -1
- package/dist/api/network/types.d.ts +1 -1
- package/dist/api/utils/types.d.ts +89 -0
- package/dist/auth/index.cjs +4239 -0
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +46 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/events/index.cjs +33 -0
- package/dist/events/index.cjs.map +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.js +30 -0
- package/dist/events/index.js.map +1 -1
- package/dist/index.cjs +5353 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1092 -0
- package/dist/index.js.map +1 -1
- package/dist/web3/index.cjs +27 -0
- package/dist/web3/index.cjs.map +1 -1
- package/dist/web3/index.d.ts +1 -1
- package/dist/web3/index.js +26 -0
- package/dist/web3/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/api/queue/index.d.ts +0 -6
- package/dist/api/regional/index.d.ts +0 -6
- package/dist/api/request/index.d.ts +0 -1
- package/dist/api/utils/index.d.ts +0 -5
- /package/dist/api/{hooks → events/queue}/index.d.ts +0 -0
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from './enums';
|
|
2
|
+
export * from './schemas';
|
|
3
3
|
export type * from './types';
|
package/dist/auth/index.js
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
|
|
3
|
+
// @plyaz package - Built with tsup
|
|
4
|
+
|
|
5
|
+
// src/auth/enums.ts
|
|
6
|
+
var USER_ROLE = {
|
|
7
|
+
/** A user who is an athlete and participates in sports activities. */
|
|
8
|
+
Athlete: "athlete",
|
|
9
|
+
/** A user who scouts and discovers talent. */
|
|
10
|
+
Scout: "scout",
|
|
11
|
+
/** A user who acts as an agent representing athletes or clubs. */
|
|
12
|
+
Agent: "agent",
|
|
13
|
+
/** A user representing a sports club or organization. */
|
|
14
|
+
Club: "club",
|
|
15
|
+
/** A fan or supporter of athletes or clubs. */
|
|
16
|
+
Fan: "fan",
|
|
17
|
+
/** A system administrator with access to management tools. */
|
|
18
|
+
Admin: "admin",
|
|
19
|
+
/** A super admin with the highest level of access and control. */
|
|
20
|
+
SuperAdmin: "super.admin"
|
|
21
|
+
};
|
|
22
|
+
var USER_STATUS = {
|
|
23
|
+
/** Active user with full access. */
|
|
24
|
+
Active: "active",
|
|
25
|
+
/** Inactive user, typically not currently using the platform. */
|
|
26
|
+
Inactive: "inactive",
|
|
27
|
+
/** User account is awaiting approval or completion of setup. */
|
|
28
|
+
Pending: "pending",
|
|
29
|
+
/** User has been temporarily suspended due to policy violations or manual review. */
|
|
30
|
+
Suspended: "suspended",
|
|
31
|
+
/** User has been permanently banned from the platform. */
|
|
32
|
+
Banned: "banned"
|
|
33
|
+
};
|
|
34
|
+
var AUTH_PROVIDER = {
|
|
35
|
+
/** Authentication via email and password. */
|
|
36
|
+
Email: "email",
|
|
37
|
+
/** Authentication via connected blockchain wallet. */
|
|
38
|
+
Wallet: "wallet"
|
|
39
|
+
};
|
|
40
|
+
var loginCredentialsSchema = z.object({
|
|
41
|
+
// The user's email address. Must be a valid email format.
|
|
42
|
+
email: z.string().email("Invalid email format"),
|
|
43
|
+
// The user's password. No format constraints applied here.
|
|
44
|
+
password: z.string()
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export { AUTH_PROVIDER, USER_ROLE, USER_STATUS, loginCredentialsSchema };
|
|
2
48
|
//# sourceMappingURL=index.js.map
|
|
3
49
|
//# sourceMappingURL=index.js.map
|
package/dist/auth/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/auth/enums.ts","../../src/auth/schemas.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;ACrEO,IAAM,sBAAA,GAAyB,EAAE,MAAA,CAAO;AAAA;AAAA,EAE7C,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,MAAM,sBAAsB,CAAA;AAAA;AAAA,EAG9C,QAAA,EAAU,EAAE,MAAA;AACd,CAAC","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","import { z } from 'zod';\n\n/**\n * Zod schema for validating user login credentials.\n * @description Ensures the input object contains a valid email address and a password string.\n * @example\n * ```ts\n * LoginCredentialsSchema.parse({\n * email: \"user@example.com\",\n * password: \"\"\n * });\n * ```\n */\nexport const loginCredentialsSchema = z.object({\n // The user's email address. Must be a valid email format.\n email: z.string().email('Invalid email format'),\n\n // The user's password. No format constraints applied here.\n password: z.string(),\n});\n\n/**\n * Type inferred from {@link loginCredentialsSchema}.\n * @description Represents the shape of validated login credentials input.\n */\nexport type LoginCredentialsInput = z.infer<typeof loginCredentialsSchema>;\n"]}
|
package/dist/events/index.cjs
CHANGED
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
// @plyaz package - Built with tsup
|
|
4
|
+
|
|
5
|
+
// src/events/enums.ts
|
|
6
|
+
var EVENT_TYPE = {
|
|
7
|
+
/** Application initialization event. */
|
|
8
|
+
AppInit: "app.init"
|
|
9
|
+
};
|
|
10
|
+
var EVENT_PRIORITY = {
|
|
11
|
+
/** Low priority event. */
|
|
12
|
+
Low: "low",
|
|
13
|
+
/** Normal priority event. */
|
|
14
|
+
Normal: "normal",
|
|
15
|
+
/** High priority event. */
|
|
16
|
+
High: "high",
|
|
17
|
+
/** Critical priority event. */
|
|
18
|
+
Critical: "critical"
|
|
19
|
+
};
|
|
20
|
+
var EVENT_STATUS = {
|
|
21
|
+
/** Event is pending and has not started processing. */
|
|
22
|
+
Pending: "pending",
|
|
23
|
+
/** Event is currently being processed. */
|
|
24
|
+
Processing: "processing",
|
|
25
|
+
/** Event has been completed successfully. */
|
|
26
|
+
Completed: "completed",
|
|
27
|
+
/** Event processing failed. */
|
|
28
|
+
Failed: "failed",
|
|
29
|
+
/** Event is being retried after a failure. */
|
|
30
|
+
Retrying: "retrying"
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.EVENT_PRIORITY = EVENT_PRIORITY;
|
|
34
|
+
exports.EVENT_STATUS = EVENT_STATUS;
|
|
35
|
+
exports.EVENT_TYPE = EVENT_TYPE;
|
|
3
36
|
//# sourceMappingURL=index.cjs.map
|
|
4
37
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
1
|
+
{"version":3,"sources":["../../src/events/enums.ts"],"names":[],"mappings":";;;;;AAWO,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","file":"index.cjs","sourcesContent":["/**\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"]}
|
package/dist/events/index.d.ts
CHANGED
package/dist/events/index.js
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
// @plyaz package - Built with tsup
|
|
1
2
|
|
|
3
|
+
// src/events/enums.ts
|
|
4
|
+
var EVENT_TYPE = {
|
|
5
|
+
/** Application initialization event. */
|
|
6
|
+
AppInit: "app.init"
|
|
7
|
+
};
|
|
8
|
+
var EVENT_PRIORITY = {
|
|
9
|
+
/** Low priority event. */
|
|
10
|
+
Low: "low",
|
|
11
|
+
/** Normal priority event. */
|
|
12
|
+
Normal: "normal",
|
|
13
|
+
/** High priority event. */
|
|
14
|
+
High: "high",
|
|
15
|
+
/** Critical priority event. */
|
|
16
|
+
Critical: "critical"
|
|
17
|
+
};
|
|
18
|
+
var EVENT_STATUS = {
|
|
19
|
+
/** Event is pending and has not started processing. */
|
|
20
|
+
Pending: "pending",
|
|
21
|
+
/** Event is currently being processed. */
|
|
22
|
+
Processing: "processing",
|
|
23
|
+
/** Event has been completed successfully. */
|
|
24
|
+
Completed: "completed",
|
|
25
|
+
/** Event processing failed. */
|
|
26
|
+
Failed: "failed",
|
|
27
|
+
/** Event is being retried after a failure. */
|
|
28
|
+
Retrying: "retrying"
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { EVENT_PRIORITY, EVENT_STATUS, EVENT_TYPE };
|
|
2
32
|
//# sourceMappingURL=index.js.map
|
|
3
33
|
//# sourceMappingURL=index.js.map
|
package/dist/events/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/events/enums.ts"],"names":[],"mappings":";;;AAWO,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","file":"index.js","sourcesContent":["/**\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"]}
|