@ttt-productions/q-core 0.1.65 → 0.1.66
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/constants/account-policy.d.ts +3 -0
- package/dist/constants/account-policy.d.ts.map +1 -0
- package/dist/constants/account-policy.js +4 -0
- package/dist/constants/account-policy.js.map +1 -0
- package/dist/constants/business.d.ts +0 -1
- package/dist/constants/business.d.ts.map +1 -1
- package/dist/constants/business.js +0 -2
- package/dist/constants/business.js.map +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/scheduled-jobs.d.ts +1 -4
- package/dist/constants/scheduled-jobs.d.ts.map +1 -1
- package/dist/constants/scheduled-jobs.js +0 -4
- package/dist/constants/scheduled-jobs.js.map +1 -1
- package/dist/doc-schemas/audit-event.d.ts +0 -2
- package/dist/doc-schemas/audit-event.d.ts.map +1 -1
- package/dist/doc-schemas/index.d.ts +0 -1
- package/dist/doc-schemas/index.d.ts.map +1 -1
- package/dist/doc-schemas/index.js +0 -1
- package/dist/doc-schemas/index.js.map +1 -1
- package/dist/doc-schemas/migration-console.d.ts +4 -4
- package/dist/doc-schemas/registry.d.ts +2 -11
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +0 -3
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/doc-schemas/user-profile.d.ts +0 -2
- package/dist/doc-schemas/user-profile.d.ts.map +1 -1
- package/dist/doc-schemas/user-profile.js +0 -2
- package/dist/doc-schemas/user-profile.js.map +1 -1
- package/dist/media/file-origins.d.ts.map +1 -1
- package/dist/media/file-origins.js +3 -6
- package/dist/media/file-origins.js.map +1 -1
- package/dist/migration-console/action-ids.d.ts +1 -1
- package/dist/migration-console/action-ids.js +1 -1
- package/dist/migration-console/action-ids.js.map +1 -1
- package/dist/migration-console/manifest.d.ts.map +1 -1
- package/dist/migration-console/manifest.js +6 -9
- package/dist/migration-console/manifest.js.map +1 -1
- package/dist/paths/collection-refs.d.ts +0 -1
- package/dist/paths/collection-refs.d.ts.map +1 -1
- package/dist/paths/collection-refs.js +0 -1
- package/dist/paths/collection-refs.js.map +1 -1
- package/dist/paths/collections.d.ts +0 -1
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +0 -1
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts +0 -1
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +0 -4
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/paths/storage-paths.d.ts +0 -1
- package/dist/paths/storage-paths.d.ts.map +1 -1
- package/dist/paths/storage-paths.js +0 -3
- package/dist/paths/storage-paths.js.map +1 -1
- package/dist/schemas/atoms.d.ts +2 -0
- package/dist/schemas/atoms.d.ts.map +1 -1
- package/dist/schemas/atoms.js +14 -0
- package/dist/schemas/atoms.js.map +1 -1
- package/dist/schemas/ghost-player-invite.d.ts +2 -8
- package/dist/schemas/ghost-player-invite.d.ts.map +1 -1
- package/dist/schemas/ghost-player-invite.js +8 -13
- package/dist/schemas/ghost-player-invite.js.map +1 -1
- package/dist/schemas/migration-console.d.ts +12 -12
- package/dist/schemas/users.d.ts +4 -18
- package/dist/schemas/users.d.ts.map +1 -1
- package/dist/schemas/users.js +4 -16
- package/dist/schemas/users.js.map +1 -1
- package/dist/types/audit.d.ts +1 -1
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js +0 -1
- package/dist/types/audit.js.map +1 -1
- package/package.json +2 -1
- package/dist/doc-schemas/registration-start.d.ts +0 -8
- package/dist/doc-schemas/registration-start.d.ts.map +0 -1
- package/dist/doc-schemas/registration-start.js +0 -11
- package/dist/doc-schemas/registration-start.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/schemas/users.ts"],"names":[],"mappings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ERY_LENGTH,\n} from '../constants/business.js';\nimport {\n countSchema,\n repairReasonSchema,\n userIdSchema,\n userStatusSchema,\n} from '../doc-schemas/atoms.js';\nimport { displayNameSchema } from './atoms.js';\n\nexport const CreateUserProfileInputSchema = z\n .object({\n displayName: displayNameSchema,\n acceptedTerms: z.literal(true),\n })\n .strict();\nexport type CreateUserProfileInput = z.infer<typeof CreateUserProfileInputSchema>;\nexport const CreateUserProfileResultSchema = z.discriminatedUnion('status', [\n z\n .object({ status: z.literal('registered'), userId: userIdSchema, displayName: z.string() })\n .strict(),\n z.object({ status: z.literal('registrationExpired') }).strict(),\n]);\nexport type CreateUserProfileResult = z.infer<typeof CreateUserProfileResultSchema>;\n\nexport const GetDisplayNameAvailabilityInputSchema = z\n .object({ displayName: displayNameSchema })\n .strict();\nexport type GetDisplayNameAvailabilityInput = z.infer<typeof GetDisplayNameAvailabilityInputSchema>;\nexport const DISPLAY_NAME_UNAVAILABLE_REASONS = ['taken'] as const;\nexport type DisplayNameUnavailableReason = (typeof DISPLAY_NAME_UNAVAILABLE_REASONS)[number];\nexport const GetDisplayNameAvailabilityResultSchema = z\n .object({ available: z.boolean(), reason: z.enum(DISPLAY_NAME_UNAVAILABLE_REASONS).optional() })\n .strict();\nexport type GetDisplayNameAvailabilityResult = z.infer<\n typeof GetDisplayNameAvailabilityResultSchema\n>;\n\nexport const MAX_USER_SEARCH_QUERY_LENGTH = MAX_SEARCH_QUERY_LENGTH;\n\nexport const USER_LOOKUP_EMAIL_PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nexport const USER_LOOKUP_UID_PATTERN = /^[A-Za-z0-9]{28}$/;\nexport type UserSearchKind = 'email' | 'uid' | 'name';\nexport function detectUserSearchKind(query: string): UserSearchKind {\n const trimmed = query.trim();\n if (USER_LOOKUP_EMAIL_PATTERN.test(trimmed)) return 'email';\n if (USER_LOOKUP_UID_PATTERN.test(trimmed)) return 'uid';\n return 'name';\n}\n\nexport const AdminGetUserProfileByEmailOrUidInputSchema = z\n .object({ query: z.string().trim().min(1).max(MAX_USER_SEARCH_QUERY_LENGTH) })\n .strict();\nexport type AdminGetUserProfileByEmailOrUidInput = z.infer<\n typeof AdminGetUserProfileByEmailOrUidInputSchema\n>;\nexport const LookedUpUserSchema = z\n .object({\n uid: userIdSchema,\n displayName: z.string(),\n email: z.string().max(EMAIL_MAX_LENGTH),\n userStatus: userStatusSchema,\n isAdmin: z.literal(true).optional(),\n })\n .strict();\nexport type LookedUpUser = z.infer<typeof LookedUpUserSchema>;\nexport const AdminGetUserProfileByEmailOrUidResultSchema = z\n .object({ user: LookedUpUserSchema.nullable() })\n .strict();\nexport type AdminGetUserProfileByEmailOrUidResult = z.infer<\n typeof AdminGetUserProfileByEmailOrUidResultSchema\n>;\n\nexport const AdminGetPublicUserSearchInputSchema = z\n .object({ query: z.string().trim().min(1).max(MAX_USER_SEARCH_QUERY_LENGTH) })\n .strict();\nexport type AdminGetPublicUserSearchInput = z.infer<typeof AdminGetPublicUserSearchInputSchema>;\nexport const PublicUserSearchResultSchema = z\n .object({ uid: userIdSchema, displayName: z.string(), userStatus: userStatusSchema })\n .strict();\nexport type PublicUserSearchResult = z.infer<typeof PublicUserSearchResultSchema>;\nexport const AdminGetPublicUserSearchResultSchema = z\n .object({ users: z.array(PublicUserSearchResultSchema) })\n .strict();\nexport type AdminGetPublicUserSearchResult = z.infer<typeof AdminGetPublicUserSearchResultSchema>;\n\nexport const AdminUpdateUserProfileDisplayNameInputSchema = z\n .object({ userId: userIdSchema, newDisplayName: displayNameSchema })\n .strict();\nexport type AdminUpdateUserProfileDisplayNameInput = z.infer<\n typeof AdminUpdateUserProfileDisplayNameInputSchema\n>;\nexport const AdminUpdateUserProfileDisplayNameResultSchema = z\n .object({ userId: userIdSchema, displayName: z.string() })\n .strict();\nexport type AdminUpdateUserProfileDisplayNameResult = z.infer<\n typeof AdminUpdateUserProfileDisplayNameResultSchema\n>;\n\nconst adminListChangeSchema = z.array(userIdSchema).max(MAX_ADMIN_LIST_CHANGES).optional();\nexport const AdminUpdateAdminListInputSchema = z\n .object({\n addAdmins: adminListChangeSchema,\n removeAdmins: adminListChangeSchema,\n addReferees: adminListChangeSchema,\n removeReferees: adminListChangeSchema,\n })\n .strict();\nexport type AdminUpdateAdminListInput = z.infer<typeof AdminUpdateAdminListInputSchema>;\nexport const AdminUpdateAdminListResultSchema = z\n .object({\n adminsGranted: countSchema,\n adminsRevoked: countSchema,\n refereesGranted: countSchema,\n refereesRevoked: countSchema,\n })\n .strict();\nexport type AdminUpdateAdminListResult = z.infer<typeof AdminUpdateAdminListResultSchema>;\n\nexport const ADMIN_SELF_REVOKE_REFUSAL =\n \"You can't revoke your own admin standing. Ask another admin to do it.\";\n\nexport const ROLE_GRANT_INACTIVE_REFUSAL = 'Only an active account can be granted a role.';\n\nexport const DISPLAY_NAME_TAKEN_MESSAGE =\n 'That name is already taken. Please choose a different one.';\n\nexport const REGISTRATION_CLOSED_MESSAGE = 'Registration is currently closed.';\n\nexport const AdminUpdateUserProfileStatusInputSchema = z\n .object({ userId: userIdSchema, userStatus: userStatusSchema, reason: repairReasonSchema })\n .strict();\nexport type AdminUpdateUserProfileStatusInput = z.infer<\n typeof AdminUpdateUserProfileStatusInputSchema\n>;\n\nexport const AdminUpdateUserProfileStatusResultSchema = z\n .object({\n userId: userIdSchema,\n userStatus: userStatusSchema,\n previousStatus: userStatusSchema,\n changed: z.boolean(),\n })\n .strict();\nexport type AdminUpdateUserProfileStatusResult = z.infer<\n typeof AdminUpdateUserProfileStatusResultSchema\n>;\n\nexport const ADMIN_STANDING_BAN_REFUSAL_REASON = 'adminStandingTarget';\n\nexport const CreateRegistrationStartInputSchema = z.object({}).strict();\nexport type CreateRegistrationStartInput = z.infer<typeof CreateRegistrationStartInputSchema>;\nexport const REGISTRATION_START_OUTCOMES = [\n 'started',\n 'alreadyStarted',\n 'registrationExpired',\n] as const;\nexport type RegistrationStartOutcome = (typeof REGISTRATION_START_OUTCOMES)[number];\nexport const CreateRegistrationStartResultSchema = z\n .object({ outcome: z.enum(REGISTRATION_START_OUTCOMES) })\n .strict();\nexport type CreateRegistrationStartResult = z.infer<typeof CreateRegistrationStartResultSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/schemas/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE1F,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC;KAC1C,MAAM,CAAC;IACN,WAAW,EAAE,iBAAiB;IAC9B,KAAK,EAAE,kBAAkB;IACzB,QAAQ,EAAE,qBAAqB;IAC/B,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CAC/B,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAGzF,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC;KACnD,MAAM,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;KAC1C,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,OAAO,CAAU,CAAC;AAEnE,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC;KACpD,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE,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,CAAC;IACN,aAAa,EAAE,WAAW;IAC1B,aAAa,EAAE,WAAW;IAC1B,eAAe,EAAE,WAAW;IAC5B,eAAe,EAAE,WAAW;CAC7B,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,yBAAyB,GACpC,uEAAuE,CAAC;AAE1E,MAAM,CAAC,MAAM,2BAA2B,GAAG,+CAA+C,CAAC;AAE3F,MAAM,CAAC,MAAM,0BAA0B,GACrC,4DAA4D,CAAC;AAE/D,MAAM,CAAC,MAAM,2BAA2B,GAAG,mCAAmC,CAAC;AAE/E,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC;KACrD,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;KAC1F,MAAM,EAAE,CAAC;AAKZ,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC;KACtD,MAAM,CAAC;IACN,MAAM,EAAE,YAAY;IACpB,UAAU,EAAE,gBAAgB;IAC5B,cAAc,EAAE,gBAAgB;IAChC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC;KACD,MAAM,EAAE,CAAC;AAKZ,MAAM,CAAC,MAAM,iCAAiC,GAAG,qBAAqB,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n EMAIL_MAX_LENGTH,\n MAX_ADMIN_LIST_CHANGES,\n MAX_SEARCH_QUERY_LENGTH,\n} from '../constants/business.js';\nimport {\n countSchema,\n repairReasonSchema,\n userIdSchema,\n userStatusSchema,\n} from '../doc-schemas/atoms.js';\nimport { accountEmailSchema, accountPasswordSchema, displayNameSchema } from './atoms.js';\n\nexport const CreateUserProfileInputSchema = z\n .object({\n displayName: displayNameSchema,\n email: accountEmailSchema,\n password: accountPasswordSchema,\n acceptedTerms: z.literal(true),\n })\n .strict();\nexport type CreateUserProfileInput = z.infer<typeof CreateUserProfileInputSchema>;\nexport const CreateUserProfileResultSchema = z.object({ userId: userIdSchema }).strict();\nexport type CreateUserProfileResult = z.infer<typeof CreateUserProfileResultSchema>;\n\nexport const GetDisplayNameAvailabilityInputSchema = z\n .object({ displayName: displayNameSchema })\n .strict();\nexport type GetDisplayNameAvailabilityInput = z.infer<typeof GetDisplayNameAvailabilityInputSchema>;\nexport const DISPLAY_NAME_UNAVAILABLE_REASONS = ['taken'] as const;\nexport type DisplayNameUnavailableReason = (typeof DISPLAY_NAME_UNAVAILABLE_REASONS)[number];\nexport const GetDisplayNameAvailabilityResultSchema = z\n .object({ available: z.boolean(), reason: z.enum(DISPLAY_NAME_UNAVAILABLE_REASONS).optional() })\n .strict();\nexport type GetDisplayNameAvailabilityResult = z.infer<\n typeof GetDisplayNameAvailabilityResultSchema\n>;\n\nexport const MAX_USER_SEARCH_QUERY_LENGTH = MAX_SEARCH_QUERY_LENGTH;\n\nexport const USER_LOOKUP_EMAIL_PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nexport const USER_LOOKUP_UID_PATTERN = /^[A-Za-z0-9]{28}$/;\nexport type UserSearchKind = 'email' | 'uid' | 'name';\nexport function detectUserSearchKind(query: string): UserSearchKind {\n const trimmed = query.trim();\n if (USER_LOOKUP_EMAIL_PATTERN.test(trimmed)) return 'email';\n if (USER_LOOKUP_UID_PATTERN.test(trimmed)) return 'uid';\n return 'name';\n}\n\nexport const AdminGetUserProfileByEmailOrUidInputSchema = z\n .object({ query: z.string().trim().min(1).max(MAX_USER_SEARCH_QUERY_LENGTH) })\n .strict();\nexport type AdminGetUserProfileByEmailOrUidInput = z.infer<\n typeof AdminGetUserProfileByEmailOrUidInputSchema\n>;\nexport const LookedUpUserSchema = z\n .object({\n uid: userIdSchema,\n displayName: z.string(),\n email: z.string().max(EMAIL_MAX_LENGTH),\n userStatus: userStatusSchema,\n isAdmin: z.literal(true).optional(),\n })\n .strict();\nexport type LookedUpUser = z.infer<typeof LookedUpUserSchema>;\nexport const AdminGetUserProfileByEmailOrUidResultSchema = z\n .object({ user: LookedUpUserSchema.nullable() })\n .strict();\nexport type AdminGetUserProfileByEmailOrUidResult = z.infer<\n typeof AdminGetUserProfileByEmailOrUidResultSchema\n>;\n\nexport const AdminGetPublicUserSearchInputSchema = z\n .object({ query: z.string().trim().min(1).max(MAX_USER_SEARCH_QUERY_LENGTH) })\n .strict();\nexport type AdminGetPublicUserSearchInput = z.infer<typeof AdminGetPublicUserSearchInputSchema>;\nexport const PublicUserSearchResultSchema = z\n .object({ uid: userIdSchema, displayName: z.string(), userStatus: userStatusSchema })\n .strict();\nexport type PublicUserSearchResult = z.infer<typeof PublicUserSearchResultSchema>;\nexport const AdminGetPublicUserSearchResultSchema = z\n .object({ users: z.array(PublicUserSearchResultSchema) })\n .strict();\nexport type AdminGetPublicUserSearchResult = z.infer<typeof AdminGetPublicUserSearchResultSchema>;\n\nexport const AdminUpdateUserProfileDisplayNameInputSchema = z\n .object({ userId: userIdSchema, newDisplayName: displayNameSchema })\n .strict();\nexport type AdminUpdateUserProfileDisplayNameInput = z.infer<\n typeof AdminUpdateUserProfileDisplayNameInputSchema\n>;\nexport const AdminUpdateUserProfileDisplayNameResultSchema = z\n .object({ userId: userIdSchema, displayName: z.string() })\n .strict();\nexport type AdminUpdateUserProfileDisplayNameResult = z.infer<\n typeof AdminUpdateUserProfileDisplayNameResultSchema\n>;\n\nconst adminListChangeSchema = z.array(userIdSchema).max(MAX_ADMIN_LIST_CHANGES).optional();\nexport const AdminUpdateAdminListInputSchema = z\n .object({\n addAdmins: adminListChangeSchema,\n removeAdmins: adminListChangeSchema,\n addReferees: adminListChangeSchema,\n removeReferees: adminListChangeSchema,\n })\n .strict();\nexport type AdminUpdateAdminListInput = z.infer<typeof AdminUpdateAdminListInputSchema>;\nexport const AdminUpdateAdminListResultSchema = z\n .object({\n adminsGranted: countSchema,\n adminsRevoked: countSchema,\n refereesGranted: countSchema,\n refereesRevoked: countSchema,\n })\n .strict();\nexport type AdminUpdateAdminListResult = z.infer<typeof AdminUpdateAdminListResultSchema>;\n\nexport const ADMIN_SELF_REVOKE_REFUSAL =\n \"You can't revoke your own admin standing. Ask another admin to do it.\";\n\nexport const ROLE_GRANT_INACTIVE_REFUSAL = 'Only an active account can be granted a role.';\n\nexport const DISPLAY_NAME_TAKEN_MESSAGE =\n 'That name is already taken. Please choose a different one.';\n\nexport const REGISTRATION_CLOSED_MESSAGE = 'Registration is currently closed.';\n\nexport const AdminUpdateUserProfileStatusInputSchema = z\n .object({ userId: userIdSchema, userStatus: userStatusSchema, reason: repairReasonSchema })\n .strict();\nexport type AdminUpdateUserProfileStatusInput = z.infer<\n typeof AdminUpdateUserProfileStatusInputSchema\n>;\n\nexport const AdminUpdateUserProfileStatusResultSchema = z\n .object({\n userId: userIdSchema,\n userStatus: userStatusSchema,\n previousStatus: userStatusSchema,\n changed: z.boolean(),\n })\n .strict();\nexport type AdminUpdateUserProfileStatusResult = z.infer<\n typeof AdminUpdateUserProfileStatusResultSchema\n>;\n\nexport const ADMIN_STANDING_BAN_REFUSAL_REASON = 'adminStandingTarget';\n"]}
|
package/dist/types/audit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SystemRole } from './unions.js';
|
|
2
2
|
import { CAPTAIN_TEAM_ROLES } from './unions.js';
|
|
3
|
-
export declare const AUDIT_EVENT_TYPE_KEYS: readonly ["userProfile.registered", "userProfile.displayNameChanged", "
|
|
3
|
+
export declare const AUDIT_EVENT_TYPE_KEYS: readonly ["userProfile.registered", "userProfile.displayNameChanged", "userProfile.signedIn", "userProfile.passwordReset", "userProfile.banned", "userProfile.unbanned", "adminList.roleGranted", "adminList.roleRevoked", "adminList.claimSynced", "appConfig.updated", "landingPage.updated", "sportLeague.created", "sportLeague.updated", "sportLeague.statusChanged", "sportLeague.modeSwitched", "waiverTemplate.created", "waiverTemplate.versionPublished", "waiverTemplate.retired", "waiverTemplate.deleted", "gameLocation.created", "gameLocation.updated", "gameLocation.deleted", "galleryPicture.added", "galleryPicture.replaced", "galleryPicture.moved", "galleryPicture.featuredChanged", "galleryPicture.removed", "awardDefinition.created", "awardDefinition.badgeReplaced", "awardDefinition.deleted", "awardDefinition.granted", "awardDefinition.revoked", "hardwareLoanContract.created", "hardwareLoanContract.signed", "hardwareLoanContract.returned", "hardwareLoanContract.deleted", "leagueTeam.created", "ghostPlayer.created", "teamMembership.roleChanged", "leagueTeam.captainChanged", "leagueTeam.updated", "leagueTeamContact.updated", "teamMembership.removed", "ghostPlayer.removed", "ghostPlayer.linked", "ghostPlayer.closedLeagueLinked", "leagueTeam.deleted", "teamInvitation.created", "teamInvitation.cancelled", "teamInvitation.accepted", "teamInvitation.rejected", "teamJoinRequest.created", "teamJoinRequest.cancelled", "teamJoinRequest.accepted", "teamJoinRequest.rejected", "leagueFreeAgent.created", "leagueFreeAgent.deleted", "leagueFreeAgent.assigned", "signedWaiver.created", "scheduleWeek.created", "scheduleWeek.updated", "sportGame.created", "sportGame.updated", "sportGame.deleted", "sportGame.statEventsRejected", "sportGame.absenceChanged", "sportGame.memoUpdated", "sportGame.jumpBallChanged", "sportGame.finalized", "sportGame.reopened", "sportGame.statsRecalculated", "sportLeague.statsRecalculated", "userProfile.statsRecalculated", "historicalStat.updated", "statsJob.created", "statsValidationReport.created", "statsValidationReport.deleted", "gameRosterPlayer.statLineResolved", "adminNotification.archived", "notificationArchiveAllJob.created", "deadLetter.replayed", "migrationActionRun.pageRun", "migrationActionRun.writesCommitted", "migrationActionRun.controlRecorded", "migrationActionRun.checkpointRecorded", "migrationConsole.cutoverRecorded"];
|
|
4
4
|
export type AuditEventType = (typeof AUDIT_EVENT_TYPE_KEYS)[number];
|
|
5
5
|
export declare const GHOST_LINK_AUDIT_EVENT_TYPE_KEYS: readonly ["ghostPlayer.linked", "ghostPlayer.closedLeagueLinked"];
|
|
6
6
|
export type GhostLinkAuditEventType = (typeof GHOST_LINK_AUDIT_EVENT_TYPE_KEYS)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,qBAAqB,00EAuFxB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,gCAAgC,mEAGC,CAAC;AAC/C,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC;AAExF,eAAO,MAAM,qBAAqB,6EAMxB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,2BAA2B,2CAGM,CAAC;AAC/C,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,eAAO,MAAM,+BAA+B,6CAIE,CAAC;AAC/C,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtF,eAAO,MAAM,wBAAwB,mDAAoD,CAAC;AAC1F,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,UAAU,GAClB;IAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,sBAAsB,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAC/F;IACE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEN,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,iCAAkC,CAAC;AACjE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/types/audit.js
CHANGED
package/dist/types/audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,wBAAwB;IACxB,gCAAgC;IAChC,
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,wBAAwB;IACxB,gCAAgC;IAChC,sBAAsB;IACtB,2BAA2B;IAC3B,oBAAoB;IACpB,sBAAsB;IACtB,uBAAuB;IACvB,uBAAuB;IACvB,uBAAuB;IACvB,mBAAmB;IACnB,qBAAqB;IACrB,qBAAqB;IACrB,qBAAqB;IACrB,2BAA2B;IAC3B,0BAA0B;IAC1B,wBAAwB;IACxB,iCAAiC;IACjC,wBAAwB;IACxB,wBAAwB;IACxB,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,yBAAyB;IACzB,sBAAsB;I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M;IACN,cAAc;IACd,QAAQ;CACoC,CAAC;AAG/C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,WAAW,CAAU,CAAC;AAmB1F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,SAAS,CAAU,CAAC","sourcesContent":["import type { SystemRole } from './unions.js';\nimport { CAPTAIN_TEAM_ROLES } from './unions.js';\n\nexport const AUDIT_EVENT_TYPE_KEYS = [\n 'userProfile.registered',\n 'userProfile.displayNameChanged',\n 'userProfile.signedIn',\n 'userProfile.passwordReset',\n 'userProfile.banned',\n 'userProfile.unbanned',\n 'adminList.roleGranted',\n 'adminList.roleRevoked',\n 'adminList.claimSynced',\n 'appConfig.updated',\n 'landingPage.updated',\n 'sportLeague.created',\n 'sportLeague.updated',\n 'sportLeague.statusChanged',\n 'sportLeague.modeSwitched',\n 'waiverTemplate.created',\n 'waiverTemplate.versionPublished',\n 'waiverTemplate.retired',\n 'waiverTemplate.deleted',\n 'gameLocation.created',\n 'gameLocation.updated',\n 'gameLocation.deleted',\n 'galleryPicture.added',\n 'galleryPicture.replaced',\n 'galleryPicture.moved',\n 'galleryPicture.featuredChanged',\n 'galleryPicture.removed',\n 'awardDefinition.created',\n 'awardDefinition.badgeReplaced',\n 'awardDefinition.deleted',\n 'awardDefinition.granted',\n 'awardDefinition.revoked',\n 'hardwareLoanContract.created',\n 'hardwareLoanContract.signed',\n 'hardwareLoanContract.returned',\n 'hardwareLoanContract.deleted',\n 'leagueTeam.created',\n 'ghostPlayer.created',\n 'teamMembership.roleChanged',\n 'leagueTeam.captainChanged',\n 'leagueTeam.updated',\n 'leagueTeamContact.updated',\n 'teamMembership.removed',\n 'ghostPlayer.removed',\n 'ghostPlayer.linked',\n 'ghostPlayer.closedLeagueLinked',\n 'leagueTeam.deleted',\n 'teamInvitation.created',\n 'teamInvitation.cancelled',\n 'teamInvitation.accepted',\n 'teamInvitation.rejected',\n 'teamJoinRequest.created',\n 'teamJoinRequest.cancelled',\n 'teamJoinRequest.accepted',\n 'teamJoinRequest.rejected',\n 'leagueFreeAgent.created',\n 'leagueFreeAgent.deleted',\n 'leagueFreeAgent.assigned',\n 'signedWaiver.created',\n 'scheduleWeek.created',\n 'scheduleWeek.updated',\n 'sportGame.created',\n 'sportGame.updated',\n 'sportGame.deleted',\n 'sportGame.statEventsRejected',\n 'sportGame.absenceChanged',\n 'sportGame.memoUpdated',\n 'sportGame.jumpBallChanged',\n 'sportGame.finalized',\n 'sportGame.reopened',\n 'sportGame.statsRecalculated',\n 'sportLeague.statsRecalculated',\n 'userProfile.statsRecalculated',\n 'historicalStat.updated',\n 'statsJob.created',\n 'statsValidationReport.created',\n 'statsValidationReport.deleted',\n 'gameRosterPlayer.statLineResolved',\n 'adminNotification.archived',\n 'notificationArchiveAllJob.created',\n 'deadLetter.replayed',\n 'migrationActionRun.pageRun',\n 'migrationActionRun.writesCommitted',\n 'migrationActionRun.controlRecorded',\n 'migrationActionRun.checkpointRecorded',\n 'migrationConsole.cutoverRecorded',\n] as const;\nexport type AuditEventType = (typeof AUDIT_EVENT_TYPE_KEYS)[number];\n\nexport const GHOST_LINK_AUDIT_EVENT_TYPE_KEYS = [\n 'ghostPlayer.linked',\n 'ghostPlayer.closedLeagueLinked',\n] as const satisfies readonly AuditEventType[];\nexport type GhostLinkAuditEventType = (typeof GHOST_LINK_AUDIT_EVENT_TYPE_KEYS)[number];\n\nexport const AUDIT_ACTOR_MODE_KEYS = [\n 'user',\n 'teammateUser',\n 'adminReview',\n 'adminOverride',\n 'system',\n] as const;\nexport type AuditActorMode = (typeof AUDIT_ACTOR_MODE_KEYS)[number];\n\nexport const AUDIT_ADMIN_ACTOR_MODE_KEYS = [\n 'adminReview',\n 'adminOverride',\n] as const satisfies readonly AuditActorMode[];\nexport type AuditAdminActorMode = (typeof AUDIT_ADMIN_ACTOR_MODE_KEYS)[number];\n\nexport const AUDIT_NON_ADMIN_ACTOR_MODE_KEYS = [\n 'user',\n 'teammateUser',\n 'system',\n] as const satisfies readonly AuditActorMode[];\nexport type AuditNonAdminActorMode = (typeof AUDIT_NON_ADMIN_ACTOR_MODE_KEYS)[number];\n\nexport const AUDIT_SYSTEM_REASON_KEYS = ['trigger', 'scheduledJob', 'migration'] as const;\nexport type AuditSystemReason = (typeof AUDIT_SYSTEM_REASON_KEYS)[number];\n\nexport type CaptainTeamRole = (typeof CAPTAIN_TEAM_ROLES)[number];\n\nexport type AuditActor =\n | { uid: string | null; isAdmin: boolean; actorMode: AuditNonAdminActorMode; systemRole?: never }\n | {\n uid: string | null;\n isAdmin: boolean;\n actorMode: AuditAdminActorMode;\n systemRole: SystemRole;\n };\n\nexport interface AuditTarget {\n uid: string | null;\n ref: string | null;\n}\n\nexport const AUDIT_RESULT_KEYS = ['success', 'failure'] as const;\nexport type AuditResult = (typeof AUDIT_RESULT_KEYS)[number];\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttt-productions/q-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.66",
|
|
4
4
|
"description": "Core types, Firestore path constants, zod schemas, and shared constants for Q-Sports",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
"test": "vitest run"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
+
"@ttt-productions/auth-core": "^1.6.20",
|
|
80
81
|
"@ttt-productions/edge-protocol-core": "^0.1.15",
|
|
81
82
|
"@ttt-productions/input-format-core": "^0.1.5",
|
|
82
83
|
"@ttt-productions/media-schemas": "^0.14.17",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const RegistrationStartSchema: z.ZodObject<{
|
|
3
|
-
userId: z.ZodString;
|
|
4
|
-
startedAt: z.ZodNumber;
|
|
5
|
-
expireAt: z.ZodCustom<import("./firestore-primitives.js").FirestoreTimestampLike, import("./firestore-primitives.js").FirestoreTimestampLike>;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
export type RegistrationStart = z.infer<typeof RegistrationStartSchema>;
|
|
8
|
-
//# sourceMappingURL=registration-start.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registration-start.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/registration-start.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// `expireAt` is a Timestamp, not epoch ms: Firestore's native TTL removes the document by it
|
|
2
|
-
// (RULE-STD-ARCH-105's exception).
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { epochMsSchema, userIdSchema } from './atoms.js';
|
|
5
|
-
import { FirestoreTimestampSchema } from './firestore-primitives.js';
|
|
6
|
-
export const RegistrationStartSchema = z.object({
|
|
7
|
-
userId: userIdSchema,
|
|
8
|
-
startedAt: epochMsSchema,
|
|
9
|
-
expireAt: FirestoreTimestampSchema,
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=registration-start.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registration-start.js","sourceRoot":"","sources":["../../src/doc-schemas/registration-start.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,mCAAmC;AAEnC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,YAAY;IACpB,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,wBAAwB;CACnC,CAAC,CAAC","sourcesContent":["// `expireAt` is a Timestamp, not epoch ms: Firestore's native TTL removes the document by it\n// (RULE-STD-ARCH-105's exception).\n\nimport { z } from 'zod';\nimport { epochMsSchema, userIdSchema } from './atoms.js';\nimport { FirestoreTimestampSchema } from './firestore-primitives.js';\n\nexport const RegistrationStartSchema = z.object({\n userId: userIdSchema,\n startedAt: epochMsSchema,\n expireAt: FirestoreTimestampSchema,\n});\nexport type RegistrationStart = z.infer<typeof RegistrationStartSchema>;\n"]}
|