@ttt-productions/q-core 0.1.48 → 0.1.50

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 (190) hide show
  1. package/dist/constants/sports.d.ts +0 -13
  2. package/dist/constants/sports.d.ts.map +1 -1
  3. package/dist/constants/sports.js +0 -13
  4. package/dist/constants/sports.js.map +1 -1
  5. package/dist/constants/text-fields.d.ts +0 -6
  6. package/dist/constants/text-fields.d.ts.map +1 -1
  7. package/dist/constants/text-fields.js +0 -6
  8. package/dist/constants/text-fields.js.map +1 -1
  9. package/dist/doc-schemas/admin-notifications.d.ts +1 -1
  10. package/dist/doc-schemas/atoms.d.ts.map +1 -1
  11. package/dist/doc-schemas/atoms.js +1 -1
  12. package/dist/doc-schemas/atoms.js.map +1 -1
  13. package/dist/doc-schemas/audit-event.d.ts +124 -122
  14. package/dist/doc-schemas/audit-event.d.ts.map +1 -1
  15. package/dist/doc-schemas/game-stat-history.d.ts +0 -1
  16. package/dist/doc-schemas/game-stat-history.d.ts.map +1 -1
  17. package/dist/doc-schemas/game-stats.d.ts +0 -2
  18. package/dist/doc-schemas/game-stats.d.ts.map +1 -1
  19. package/dist/doc-schemas/game-stats.js +1 -2
  20. package/dist/doc-schemas/game-stats.js.map +1 -1
  21. package/dist/doc-schemas/index.d.ts +2 -1
  22. package/dist/doc-schemas/index.d.ts.map +1 -1
  23. package/dist/doc-schemas/index.js +2 -1
  24. package/dist/doc-schemas/index.js.map +1 -1
  25. package/dist/doc-schemas/migration-console.d.ts +6 -20
  26. package/dist/doc-schemas/migration-console.d.ts.map +1 -1
  27. package/dist/doc-schemas/migration-console.js +2 -7
  28. package/dist/doc-schemas/migration-console.js.map +1 -1
  29. package/dist/doc-schemas/pending-media.d.ts +725 -165
  30. package/dist/doc-schemas/pending-media.d.ts.map +1 -1
  31. package/dist/doc-schemas/registry.d.ts +385 -292
  32. package/dist/doc-schemas/registry.d.ts.map +1 -1
  33. package/dist/doc-schemas/registry.js +3 -2
  34. package/dist/doc-schemas/registry.js.map +1 -1
  35. package/dist/doc-schemas/stats-changes.d.ts +21 -0
  36. package/dist/doc-schemas/stats-changes.d.ts.map +1 -0
  37. package/dist/doc-schemas/stats-changes.js +19 -0
  38. package/dist/doc-schemas/stats-changes.js.map +1 -0
  39. package/dist/doc-schemas/stats-job.d.ts +36 -0
  40. package/dist/doc-schemas/stats-job.d.ts.map +1 -0
  41. package/dist/doc-schemas/stats-job.js +26 -0
  42. package/dist/doc-schemas/stats-job.js.map +1 -0
  43. package/dist/doc-schemas/system.d.ts +1 -1
  44. package/dist/doc-schemas/system.d.ts.map +1 -1
  45. package/dist/doc-schemas/system.js +2 -2
  46. package/dist/doc-schemas/system.js.map +1 -1
  47. package/dist/domain-events/domain-events.d.ts +337 -91
  48. package/dist/domain-events/domain-events.d.ts.map +1 -1
  49. package/dist/domain-events/domain-events.js +189 -83
  50. package/dist/domain-events/domain-events.js.map +1 -1
  51. package/dist/ids/index.d.ts +2 -0
  52. package/dist/ids/index.d.ts.map +1 -1
  53. package/dist/ids/index.js +2 -0
  54. package/dist/ids/index.js.map +1 -1
  55. package/dist/ids/notification-ids.d.ts +2 -4
  56. package/dist/ids/notification-ids.d.ts.map +1 -1
  57. package/dist/ids/notification-ids.js +3 -12
  58. package/dist/ids/notification-ids.js.map +1 -1
  59. package/dist/ids/request-job-ids.d.ts +7 -0
  60. package/dist/ids/request-job-ids.d.ts.map +1 -0
  61. package/dist/ids/request-job-ids.js +18 -0
  62. package/dist/ids/request-job-ids.js.map +1 -0
  63. package/dist/ids/stats-ids.d.ts +7 -0
  64. package/dist/ids/stats-ids.d.ts.map +1 -0
  65. package/dist/ids/stats-ids.js +17 -0
  66. package/dist/ids/stats-ids.js.map +1 -0
  67. package/dist/migration-console/action-ids.d.ts +1 -3
  68. package/dist/migration-console/action-ids.d.ts.map +1 -1
  69. package/dist/migration-console/action-ids.js +1 -3
  70. package/dist/migration-console/action-ids.js.map +1 -1
  71. package/dist/migration-console/manifest.d.ts +5 -5
  72. package/dist/migration-console/manifest.d.ts.map +1 -1
  73. package/dist/migration-console/manifest.js +19 -49
  74. package/dist/migration-console/manifest.js.map +1 -1
  75. package/dist/paths/collection-refs.d.ts +1 -1
  76. package/dist/paths/collection-refs.d.ts.map +1 -1
  77. package/dist/paths/collection-refs.js +1 -1
  78. package/dist/paths/collection-refs.js.map +1 -1
  79. package/dist/paths/collections.d.ts +15 -1
  80. package/dist/paths/collections.d.ts.map +1 -1
  81. package/dist/paths/collections.js +29 -1
  82. package/dist/paths/collections.js.map +1 -1
  83. package/dist/paths/path-builders.d.ts +1 -1
  84. package/dist/paths/path-builders.d.ts.map +1 -1
  85. package/dist/paths/path-builders.js +1 -4
  86. package/dist/paths/path-builders.js.map +1 -1
  87. package/dist/schemas/account-settings.d.ts +4 -4
  88. package/dist/schemas/account-settings.d.ts.map +1 -1
  89. package/dist/schemas/account-settings.js +2 -2
  90. package/dist/schemas/account-settings.js.map +1 -1
  91. package/dist/schemas/admin-notifications.d.ts +13 -13
  92. package/dist/schemas/admin-notifications.d.ts.map +1 -1
  93. package/dist/schemas/admin-notifications.js +8 -6
  94. package/dist/schemas/admin-notifications.js.map +1 -1
  95. package/dist/schemas/admin-stats.d.ts +6 -6
  96. package/dist/schemas/admin-stats.d.ts.map +1 -1
  97. package/dist/schemas/admin-stats.js +3 -3
  98. package/dist/schemas/admin-stats.js.map +1 -1
  99. package/dist/schemas/app-config.d.ts +4 -4
  100. package/dist/schemas/app-config.d.ts.map +1 -1
  101. package/dist/schemas/app-config.js +2 -2
  102. package/dist/schemas/app-config.js.map +1 -1
  103. package/dist/schemas/awards.d.ts +8 -8
  104. package/dist/schemas/awards.d.ts.map +1 -1
  105. package/dist/schemas/awards.js +4 -4
  106. package/dist/schemas/awards.js.map +1 -1
  107. package/dist/schemas/dead-letters.d.ts +15 -9
  108. package/dist/schemas/dead-letters.d.ts.map +1 -1
  109. package/dist/schemas/dead-letters.js +6 -5
  110. package/dist/schemas/dead-letters.js.map +1 -1
  111. package/dist/schemas/hardware-loan-contracts.d.ts +8 -8
  112. package/dist/schemas/hardware-loan-contracts.d.ts.map +1 -1
  113. package/dist/schemas/hardware-loan-contracts.js +4 -4
  114. package/dist/schemas/hardware-loan-contracts.js.map +1 -1
  115. package/dist/schemas/leagues.d.ts +4 -4
  116. package/dist/schemas/leagues.d.ts.map +1 -1
  117. package/dist/schemas/leagues.js +2 -2
  118. package/dist/schemas/leagues.js.map +1 -1
  119. package/dist/schemas/migration-console.d.ts +21 -62
  120. package/dist/schemas/migration-console.d.ts.map +1 -1
  121. package/dist/schemas/migration-console.js +5 -10
  122. package/dist/schemas/migration-console.js.map +1 -1
  123. package/dist/schemas/pictures.d.ts +447 -111
  124. package/dist/schemas/pictures.d.ts.map +1 -1
  125. package/dist/schemas/pictures.js +6 -6
  126. package/dist/schemas/pictures.js.map +1 -1
  127. package/dist/schemas/scoring.d.ts +22 -28
  128. package/dist/schemas/scoring.d.ts.map +1 -1
  129. package/dist/schemas/scoring.js +17 -13
  130. package/dist/schemas/scoring.js.map +1 -1
  131. package/dist/schemas/stats.d.ts +92 -127
  132. package/dist/schemas/stats.d.ts.map +1 -1
  133. package/dist/schemas/stats.js +50 -83
  134. package/dist/schemas/stats.js.map +1 -1
  135. package/dist/schemas/team-joining.d.ts +4 -4
  136. package/dist/schemas/team-joining.d.ts.map +1 -1
  137. package/dist/schemas/team-joining.js +2 -2
  138. package/dist/schemas/team-joining.js.map +1 -1
  139. package/dist/schemas/teams.d.ts +16 -16
  140. package/dist/schemas/teams.d.ts.map +1 -1
  141. package/dist/schemas/teams.js +8 -8
  142. package/dist/schemas/teams.js.map +1 -1
  143. package/dist/schemas/uploads.d.ts +12 -12
  144. package/dist/schemas/uploads.d.ts.map +1 -1
  145. package/dist/schemas/uploads.js +8 -6
  146. package/dist/schemas/uploads.js.map +1 -1
  147. package/dist/schemas/users.d.ts +28 -28
  148. package/dist/schemas/users.d.ts.map +1 -1
  149. package/dist/schemas/users.js +14 -14
  150. package/dist/schemas/users.js.map +1 -1
  151. package/dist/sports/basketball-scoring.d.ts.map +1 -1
  152. package/dist/sports/basketball-scoring.js +16 -7
  153. package/dist/sports/basketball-scoring.js.map +1 -1
  154. package/dist/sports/bulk-entry.d.ts +7 -2
  155. package/dist/sports/bulk-entry.d.ts.map +1 -1
  156. package/dist/sports/bulk-entry.js.map +1 -1
  157. package/dist/sports/football-scoring.d.ts.map +1 -1
  158. package/dist/sports/football-scoring.js +13 -10
  159. package/dist/sports/football-scoring.js.map +1 -1
  160. package/dist/sports/replay.d.ts.map +1 -1
  161. package/dist/sports/replay.js +16 -1
  162. package/dist/sports/replay.js.map +1 -1
  163. package/dist/sports/scoring.d.ts +18 -2
  164. package/dist/sports/scoring.d.ts.map +1 -1
  165. package/dist/sports/scoring.js.map +1 -1
  166. package/dist/sports/store-driver.d.ts +2 -1
  167. package/dist/sports/store-driver.d.ts.map +1 -1
  168. package/dist/sports/store-driver.js +30 -15
  169. package/dist/sports/store-driver.js.map +1 -1
  170. package/dist/types/audit.d.ts +1 -1
  171. package/dist/types/audit.d.ts.map +1 -1
  172. package/dist/types/audit.js +37 -36
  173. package/dist/types/audit.js.map +1 -1
  174. package/dist/types/stats.d.ts +13 -13
  175. package/dist/types/stats.d.ts.map +1 -1
  176. package/dist/types/stats.js +13 -33
  177. package/dist/types/stats.js.map +1 -1
  178. package/dist/utils/index.d.ts +0 -1
  179. package/dist/utils/index.d.ts.map +1 -1
  180. package/dist/utils/index.js +0 -1
  181. package/dist/utils/index.js.map +1 -1
  182. package/package.json +1 -1
  183. package/dist/doc-schemas/stats-operation.d.ts +0 -348
  184. package/dist/doc-schemas/stats-operation.d.ts.map +0 -1
  185. package/dist/doc-schemas/stats-operation.js +0 -92
  186. package/dist/doc-schemas/stats-operation.js.map +0 -1
  187. package/dist/utils/stats-operation-request.d.ts +0 -20
  188. package/dist/utils/stats-operation-request.d.ts.map +0 -1
  189. package/dist/utils/stats-operation-request.js +0 -10
  190. package/dist/utils/stats-operation-request.js.map +0 -1
@@ -1,6 +1,5 @@
1
- import { z } from 'zod';
2
1
  import { COMPOUND_ID_SEPARATOR } from './compound-ids.js';
3
- const requestIdSchema = z.uuid();
2
+ import { buildRequestJobId, parseRequestJobId } from './request-job-ids.js';
4
3
  export function buildNotificationDeliveryId(notificationType, eventId) {
5
4
  return [notificationType, eventId].join(COMPOUND_ID_SEPARATOR);
6
5
  }
@@ -13,18 +12,10 @@ export function buildAdminNotificationHistoryId(requestId, notificationId) {
13
12
  export function buildAdminNotificationArchiveKey(notificationId, observedActivityGeneration) {
14
13
  return [notificationId, observedActivityGeneration].join(COMPOUND_ID_SEPARATOR);
15
14
  }
16
- const REQUEST_ID_LENGTH = 36;
17
15
  export function buildNotificationArchiveAllJobId(userId, requestId) {
18
- return [userId, requestId].join(COMPOUND_ID_SEPARATOR);
16
+ return buildRequestJobId(userId, requestId);
19
17
  }
20
18
  export function parseNotificationArchiveAllJobId(id) {
21
- const separatorAt = id.length - REQUEST_ID_LENGTH - COMPOUND_ID_SEPARATOR.length;
22
- if (separatorAt < 1 || !id.startsWith(COMPOUND_ID_SEPARATOR, separatorAt))
23
- return null;
24
- const userId = id.slice(0, separatorAt);
25
- const requestId = id.slice(separatorAt + COMPOUND_ID_SEPARATOR.length);
26
- if (userId.includes('/') || !requestIdSchema.safeParse(requestId).success)
27
- return null;
28
- return { userId, requestId };
19
+ return parseRequestJobId(id);
29
20
  }
30
21
  //# sourceMappingURL=notification-ids.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification-ids.js","sourceRoot":"","sources":["../../src/ids/notification-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAEjC,MAAM,UAAU,2BAA2B,CACzC,gBAAuC,EACvC,OAAe;IAEf,O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Ae,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["import { z } from 'zod';\nimport type { AdminNotificationType } from '../types/notifications.js';\nimport { COMPOUND_ID_SEPARATOR } from './compound-ids.js';\n\nconst requestIdSchema = z.uuid();\n\nexport function buildNotificationDeliveryId(\n notificationType: AdminNotificationType,\n eventId: string,\n): string {\n return [notificationType, eventId].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport function buildLeagueFreeAgentSignedUpEventId(\n leagueId: string,\n userId: string,\n signedUpAt: number,\n): string {\n return [leagueId, String(signedUpAt), userId].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport function buildAdminNotificationHistoryId(requestId: string, notificationId: string): string {\n return [requestId, notificationId].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport function buildAdminNotificationArchiveKey(\n notificationId: string,\n observedActivityGeneration: string,\n): string {\n return [notificationId, observedActivityGeneration].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport interface NotificationArchiveAllJobIdParts {\n userId: string;\n requestId: string;\n}\n\nconst REQUEST_ID_LENGTH = 36;\n\nexport function buildNotificationArchiveAllJobId(userId: string, requestId: string): string {\n return [userId, requestId].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport function parseNotificationArchiveAllJobId(\n id: string,\n): NotificationArchiveAllJobIdParts | null {\n const separatorAt = id.length - REQUEST_ID_LENGTH - COMPOUND_ID_SEPARATOR.length;\n if (separatorAt < 1 || !id.startsWith(COMPOUND_ID_SEPARATOR, separatorAt)) return null;\n const userId = id.slice(0, separatorAt);\n const requestId = id.slice(separatorAt + COMPOUND_ID_SEPARATOR.length);\n if (userId.includes('/') || !requestIdSchema.safeParse(requestId).success) return null;\n return { userId, requestId };\n}\n"]}
1
+ {"version":3,"file":"notification-ids.js","sourceRoot":"","sources":["../../src/ids/notification-ids.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG5E,MAAM,UAAU,2BAA2B,CACzC,gBAAuC,EACvC,OAAe;IAEf,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,QAAgB,EAChB,MAAc,EACd,UAAkB;IAElB,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,SAAiB,EAAE,cAAsB;IACvF,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,cAAsB,EACtB,0BAAkC;IAElC,OAAO,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAClF,CAAC;AAID,MAAM,UAAU,gCAAgC,CAAC,MAAc,EAAE,SAAiB;IAChF,OAAO,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,EAAU;IAEV,OAAO,iBAAiB,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["import type { AdminNotificationType } from '../types/notifications.js';\nimport { COMPOUND_ID_SEPARATOR } from './compound-ids.js';\nimport { buildRequestJobId, parseRequestJobId } from './request-job-ids.js';\nimport type { RequestJobIdParts } from './request-job-ids.js';\n\nexport function buildNotificationDeliveryId(\n notificationType: AdminNotificationType,\n eventId: string,\n): string {\n return [notificationType, eventId].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport function buildLeagueFreeAgentSignedUpEventId(\n leagueId: string,\n userId: string,\n signedUpAt: number,\n): string {\n return [leagueId, String(signedUpAt), userId].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport function buildAdminNotificationHistoryId(requestId: string, notificationId: string): string {\n return [requestId, notificationId].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport function buildAdminNotificationArchiveKey(\n notificationId: string,\n observedActivityGeneration: string,\n): string {\n return [notificationId, observedActivityGeneration].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport type NotificationArchiveAllJobIdParts = RequestJobIdParts;\n\nexport function buildNotificationArchiveAllJobId(userId: string, requestId: string): string {\n return buildRequestJobId(userId, requestId);\n}\n\nexport function parseNotificationArchiveAllJobId(\n id: string,\n): NotificationArchiveAllJobIdParts | null {\n return parseRequestJobId(id);\n}\n"]}
@@ -0,0 +1,7 @@
1
+ export interface RequestJobIdParts {
2
+ userId: string;
3
+ requestId: string;
4
+ }
5
+ export declare function buildRequestJobId(userId: string, requestId: string): string;
6
+ export declare function parseRequestJobId(id: string): RequestJobIdParts | null;
7
+ //# sourceMappingURL=request-job-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-job-ids.d.ts","sourceRoot":"","sources":["../../src/ids/request-job-ids.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAOtE"}
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { COMPOUND_ID_SEPARATOR } from './compound-ids.js';
3
+ const requestIdSchema = z.uuid();
4
+ const REQUEST_ID_LENGTH = 36;
5
+ export function buildRequestJobId(userId, requestId) {
6
+ return [userId, requestId].join(COMPOUND_ID_SEPARATOR);
7
+ }
8
+ export function parseRequestJobId(id) {
9
+ const separatorAt = id.length - REQUEST_ID_LENGTH - COMPOUND_ID_SEPARATOR.length;
10
+ if (separatorAt < 1 || !id.startsWith(COMPOUND_ID_SEPARATOR, separatorAt))
11
+ return null;
12
+ const userId = id.slice(0, separatorAt);
13
+ const requestId = id.slice(separatorAt + COMPOUND_ID_SEPARATOR.length);
14
+ if (userId.includes('/') || !requestIdSchema.safeParse(requestId).success)
15
+ return null;
16
+ return { userId, requestId };
17
+ }
18
+ //# sourceMappingURL=request-job-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-job-ids.js","sourceRoot":"","sources":["../../src/ids/request-job-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACjC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAO7B,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,SAAiB;IACjE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,MAAM,WAAW,GAAG,EAAE,CAAC,MAAM,GAAG,iBAAiB,GAAG,qBAAqB,CAAC,MAAM,CAAC;IACjF,IAAI,WAAW,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,qBAAqB,EAAE,WAAW,CAAC;QAAE,OAAO,IAAI,CAAC;IACvF,MAAM,MAAM,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACvE,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["import { z } from 'zod';\nimport { COMPOUND_ID_SEPARATOR } from './compound-ids.js';\n\nconst requestIdSchema = z.uuid();\nconst REQUEST_ID_LENGTH = 36;\n\nexport interface RequestJobIdParts {\n userId: string;\n requestId: string;\n}\n\nexport function buildRequestJobId(userId: string, requestId: string): string {\n return [userId, requestId].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport function parseRequestJobId(id: string): RequestJobIdParts | null {\n const separatorAt = id.length - REQUEST_ID_LENGTH - COMPOUND_ID_SEPARATOR.length;\n if (separatorAt < 1 || !id.startsWith(COMPOUND_ID_SEPARATOR, separatorAt)) return null;\n const userId = id.slice(0, separatorAt);\n const requestId = id.slice(separatorAt + COMPOUND_ID_SEPARATOR.length);\n if (userId.includes('/') || !requestIdSchema.safeParse(requestId).success) return null;\n return { userId, requestId };\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import type { StatsValidationScope } from '../doc-schemas/system.js';
2
+ import type { RequestJobIdParts } from './request-job-ids.js';
3
+ export declare function buildStatsJobId(userId: string, requestId: string): string;
4
+ export declare function parseStatsJobId(id: string): RequestJobIdParts | null;
5
+ export declare const EVERYTHING_STATS_VALIDATION_REPORT_ID = "everything";
6
+ export declare function buildStatsValidationReportId(scope: StatsValidationScope): string;
7
+ //# sourceMappingURL=stats-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats-ids.d.ts","sourceRoot":"","sources":["../../src/ids/stats-ids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAEpE;AAED,eAAO,MAAM,qCAAqC,eAAe,CAAC;AAElE,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAIhF"}
@@ -0,0 +1,17 @@
1
+ import { COMPOUND_ID_SEPARATOR } from './compound-ids.js';
2
+ import { buildRequestJobId, parseRequestJobId } from './request-job-ids.js';
3
+ export function buildStatsJobId(userId, requestId) {
4
+ return buildRequestJobId(userId, requestId);
5
+ }
6
+ export function parseStatsJobId(id) {
7
+ return parseRequestJobId(id);
8
+ }
9
+ export const EVERYTHING_STATS_VALIDATION_REPORT_ID = 'everything';
10
+ export function buildStatsValidationReportId(scope) {
11
+ if (scope.gameId !== undefined)
12
+ return ['game', scope.gameId].join(COMPOUND_ID_SEPARATOR);
13
+ if (scope.leagueId !== undefined)
14
+ return ['league', scope.leagueId].join(COMPOUND_ID_SEPARATOR);
15
+ return EVERYTHING_STATS_VALIDATION_REPORT_ID;
16
+ }
17
+ //# sourceMappingURL=stats-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats-ids.js","sourceRoot":"","sources":["../../src/ids/stats-ids.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG5E,MAAM,UAAU,eAAe,CAAC,MAAc,EAAE,SAAiB;IAC/D,OAAO,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,OAAO,iBAAiB,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,CAAC,MAAM,qCAAqC,GAAG,YAAY,CAAC;AAElE,MAAM,UAAU,4BAA4B,CAAC,KAA2B;IACtE,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC1F,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS;QAAE,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAChG,OAAO,qCAAqC,CAAC;AAC/C,CAAC","sourcesContent":["import type { StatsValidationScope } from '../doc-schemas/system.js';\nimport { COMPOUND_ID_SEPARATOR } from './compound-ids.js';\nimport { buildRequestJobId, parseRequestJobId } from './request-job-ids.js';\nimport type { RequestJobIdParts } from './request-job-ids.js';\n\nexport function buildStatsJobId(userId: string, requestId: string): string {\n return buildRequestJobId(userId, requestId);\n}\n\nexport function parseStatsJobId(id: string): RequestJobIdParts | null {\n return parseRequestJobId(id);\n}\n\nexport const EVERYTHING_STATS_VALIDATION_REPORT_ID = 'everything';\n\nexport function buildStatsValidationReportId(scope: StatsValidationScope): string {\n if (scope.gameId !== undefined) return ['game', scope.gameId].join(COMPOUND_ID_SEPARATOR);\n if (scope.leagueId !== undefined) return ['league', scope.leagueId].join(COMPOUND_ID_SEPARATOR);\n return EVERYTHING_STATS_VALIDATION_REPORT_ID;\n}\n"]}
@@ -72,9 +72,7 @@ export declare const MIGRATION_ACTION_IDS: {
72
72
  readonly verifyV1LeagueCapacity: "verify.v1LeagueCapacity";
73
73
  readonly verifyV1HardwareContractIdsUnique: "verify.v1HardwareContractIdsUnique";
74
74
  readonly deleteV1Commerce: "delete.v1Commerce";
75
- readonly rebuildLeagueStats: "rebuild.leagueStats";
76
- readonly rebuildLifetimeStats: "rebuild.lifetimeStats";
77
- readonly rebuildSportHallOfFame: "rebuild.sportHallOfFame";
75
+ readonly rebuildStats: "rebuild.stats";
78
76
  readonly validateStats: "validate.stats";
79
77
  readonly verifySportHallOfFame: "verify.sportHallOfFame";
80
78
  readonly deleteV1HallOfFame: "delete.v1HallOfFame";
@@ -1 +1 @@
1
- {"version":3,"file":"action-ids.d.ts","sourceRoot":"","sources":["../../src/migration-console/action-ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEjG,eAAO,MAAM,wBAAwB,EAA0C,CAC7E,iBAAiB,EACjB,GAAG,iBAAiB,EAAE,CACvB,CAAC"}
1
+ {"version":3,"file":"action-ids.d.ts","sourceRoot":"","sources":["../../src/migration-console/action-ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEjG,eAAO,MAAM,wBAAwB,EAA0C,CAC7E,iBAAiB,EACjB,GAAG,iBAAiB,EAAE,CACvB,CAAC"}
@@ -78,9 +78,7 @@ export const MIGRATION_ACTION_IDS = {
78
78
  verifyV1LeagueCapacity: 'verify.v1LeagueCapacity',
79
79
  verifyV1HardwareContractIdsUnique: 'verify.v1HardwareContractIdsUnique',
80
80
  deleteV1Commerce: 'delete.v1Commerce',
81
- rebuildLeagueStats: 'rebuild.leagueStats',
82
- rebuildLifetimeStats: 'rebuild.lifetimeStats',
83
- rebuildSportHallOfFame: 'rebuild.sportHallOfFame',
81
+ rebuildStats: 'rebuild.stats',
84
82
  validateStats: 'validate.stats',
85
83
  verifySportHallOfFame: 'verify.sportHallOfFame',
86
84
  deleteV1HallOfFame: 'delete.v1HallOfFame',
@@ -1 +1 @@
1
- {"version":3,"file":"action-ids.js","sourceRoot":"","sources":["../../src/migration-console/action-ids.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,gBAAgB,EAAE,mBAAmB;IACrC,mBAAmB,EAAE,sBAAsB;IAC3C,0BAA0B,EAAE,6BAA6B;IACzD,kBAAkB,EAAE,qBAAqB;IACzC,aAAa,EAAE,gBAAgB;IAC/B,kBAAkB,EAAE,qBAAqB;IACzC,qBAAqB,EAAE,wBAAwB;IAC/C,0BAA0B,EAAE,6BAA6B;IACzD,iBAAiB,EAAE,oBAAoB;IACvC,eAAe,EAAE,kBAAkB;IACnC,6BAA6B,EAAE,gCAAgC;IAC/D,aAAa,EAAE,gBAAgB;IAE/B,8FAA8F;IAC9F,+EAA+E;IAC/E,qBAAqB,EAAE,wBAAwB;IAC/C,uBAAuB,EAAE,0BAA0B;IAEnD,eAAe,EAAE,kBAAkB;IACnC,iBAAiB,EAAE,oBAAoB;IACvC,aAAa,EAAE,gBAAgB;IAC/B,mBAAmB,EAAE,sBAAsB;IAC3C,mBAAmB,EAAE,sBAAsB;IAC3C,mBAAmB,EAAE,sBAAsB;IAC3C,qBAAqB,EAAE,wBAAwB;IAC/C,mBAAmB,EAAE,sBAAsB;IAC3C,oBAAoB,EAAE,uBAAuB;IAC7C,sBAAsB,EAAE,yBAAyB;IACjD,oBAAoB,EAAE,uBAAuB;IAC7C,oBAAoB,EAAE,uBAAuB;IAC7C,sBAAsB,EAAE,yBAAyB;IACjD,wBAAwB,EAAE,2BAA2B;IACrD,qBAAqB,EAAE,wBAAwB;IAC/C,mBAAmB,EAAE,sBAAsB;IAC3C,8FAA8F;IAC9F,uFAAuF;IACvF,wBAAwB,EAAE,2BAA2B;IACrD,eAAe,EAAE,kBAAkB;IACn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AE,qBAAqB;IACzC,oBAAoB,EAAE,uBAAuB;IAC7C,sBAAsB,EAAE,yBAAyB;IACjD,aAAa,EAAE,gBAAgB;IAC/B,qBAAqB,EAAE,wBAAwB;IAC/C,kBAAkB,EAAE,qBAAqB;IACzC,yBAAyB,EAAE,4BAA4B;IAEvD,iBAAiB,EAAE,oBAAoB;IAEvC,2BAA2B,EAAE,8BAA8B;IAC3D,mCAAmC,EAAE,sCAAsC;IAC3E,kCAAkC,EAAE,qCAAqC;IACzE,sCAAsC,EAAE,yCAAyC;IACjF,2CAA2C,EAAE,8CAA8C;CACnF,CAAC;AAIX,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAGzE,CAAC","sourcesContent":["export const MIGRATION_ACTION_IDS = {\n copyUserProfiles: 'copy.userProfiles',\n copyHistoricalStats: 'copy.historicalStats',\n deriveReservedDisplayNames: 'derive.reservedDisplayNames',\n migratePublicUsers: 'migrate.publicUsers',\n copyAdminList: 'copy.adminList',\n verifyUserProfiles: 'verify.userProfiles',\n verifyHistoricalStats: 'verify.historicalStats',\n verifyReservedDisplayNames: 'verify.reservedDisplayNames',\n verifyPublicUsers: 'verify.publicUsers',\n verifyAdminList: 'verify.adminList',\n cleanupOrphanGhostPublicUsers: 'cleanup.orphanGhostPublicUsers',\n deleteV1Users: 'delete.v1Users',\n\n // Required by the ghost cleanup, whose probes read `teamMemberships` and `gameRosterPlayers`:\n // until those copies are verified complete, every ghost reads as unreferenced.\n verifyTeamMemberships: 'verify.teamMemberships',\n verifyGameRosterPlayers: 'verify.gameRosterPlayers',\n\n copyLeagueTeams: 'copy.leagueTeams',\n verifyLeagueTeams: 'verify.leagueTeams',\n deleteV1Teams: 'delete.v1Teams',\n copyTeamMemberships: 'copy.teamMemberships',\n deleteV1TeamMembers: 'delete.v1TeamMembers',\n copyTeamInvitations: 'copy.teamInvitations',\n verifyTeamInvitations: 'verify.teamInvitations',\n deleteV1TeamInvites: 'delete.v1TeamInvites',\n copyTeamJoinRequests: 'copy.teamJoinRequests',\n verifyTeamJoinRequests: 'verify.teamJoinRequests',\n deleteV1JoinRequests: 'delete.v1JoinRequests',\n copyLeagueFreeAgents: 'copy.leagueFreeAgents',\n verifyLeagueFreeAgents: 'verify.leagueFreeAgents',\n deleteV1FreeAgentSignups: 'delete.v1FreeAgentSignups',\n copyGameRosterPlayers: 'copy.gameRosterPlayers',\n deleteV1GameRosters: 'delete.v1GameRosters',\n // It removes the stale entries a copied roster holds, so it waits for the memberships and the\n // game stats — which pin an entry holding a recorded stat — to be copied and verified.\n reconcileOpenGameRosters: 'reconcile.openGameRosters',\n verifyGameStats: 'verify.gameStats',\n verifyLeaguePlayerStats: 'verify.leaguePlayerStats',\n\n copySportGames: 'copy.sportGames',\n resolveUnrosteredStatLine: 'resolve.unrosteredStatLine',\n verifySportGames: 'verify.sportGames',\n deleteV1LeagueGames: 'delete.v1LeagueGames',\n\n copySignedWaivers: 'copy.signedWaivers',\n verifySignedWaivers: 'verify.signedWaivers',\n verifySignatureFilesResolvable: 'verify.signatureFilesResolvable',\n revokeV1SignatureDownloadTokens: 'revoke.v1SignatureDownloadTokens',\n deleteV1WaiverSignatures: 'delete.v1WaiverSignatures',\n\n copyHardwareLoanContracts: 'copy.hardwareLoanContracts',\n verifyHardwareLoanContracts: 'verify.hardwareLoanContracts',\n deleteV1HardwareContracts: 'delete.v1HardwareContracts',\n\n copySportLeagues: 'copy.sportLeagues',\n verifySportLeagues: 'verify.sportLeagues',\n deleteV1Leagues: 'delete.v1Leagues',\n deleteV1LeagueChats: 'delete.v1LeagueChats',\n\n carryV1Pictures: 'carry.v1Pictures',\n verifyV1Pictures: 'verify.v1Pictures',\n\n copyAppConfig: 'copy.appConfig',\n copyLandingPageConfig: 'copy.landingPageConfig',\n copyStatsBeacon: 'copy.statsBeacon',\n verifyAppConfig: 'verify.appConfig',\n verifyLandingPageConfig: 'verify.landingPageConfig',\n verifyStatsBeacon: 'verify.statsBeacon',\n deleteV1LandingBase: 'delete.v1LandingBase',\n deleteV1LandingAdmin: 'delete.v1LandingAdmin',\n\n copyWaiverTemplates: 'copy.waiverTemplates',\n verifyWaiverTemplates: 'verify.waiverTemplates',\n deleteV1Waivers: 'delete.v1Waivers',\n\n copyAwardDefinitions: 'copy.awardDefinitions',\n verifyAwardDefinitions: 'verify.awardDefinitions',\n\n copyGameLocations: 'copy.gameLocations',\n verifyGameLocations: 'verify.gameLocations',\n\n deleteV1AdminStats: 'delete.v1AdminStats',\n\n verifyV1CommerceDiscardable: 'verify.v1CommerceDiscardable',\n\n // Read-only checks of V1 data that should never have been stored; the copies they cover wait on\n // them, and what they report is fixed in V1.\n verifyV1DisplayNamesUnique: 'verify.v1DisplayNamesUnique',\n verifyV1TextFitsLimits: 'verify.v1TextFitsLimits',\n verifyV1LeagueCapacity: 'verify.v1LeagueCapacity',\n verifyV1HardwareContractIdsUnique: 'verify.v1HardwareContractIdsUnique',\n deleteV1Commerce: 'delete.v1Commerce',\n\n rebuildLeagueStats: 'rebuild.leagueStats',\n rebuildLifetimeStats: 'rebuild.lifetimeStats',\n rebuildSportHallOfFame: 'rebuild.sportHallOfFame',\n validateStats: 'validate.stats',\n verifySportHallOfFame: 'verify.sportHallOfFame',\n deleteV1HallOfFame: 'delete.v1HallOfFame',\n deleteV1ValidationReports: 'delete.v1ValidationReports',\n\n recordCutoverLive: 'record.cutoverLive',\n\n checkpointV1FirestoreExport: 'checkpoint.v1FirestoreExport',\n checkpointPaymentCredentialsRetired: 'checkpoint.paymentCredentialsRetired',\n checkpointServiceAccountKeyRevoked: 'checkpoint.serviceAccountKeyRevoked',\n checkpointUnattachedPicturesReuploaded: 'checkpoint.unattachedPicturesReuploaded',\n checkpointAbandonedRegistrationSweepEnabled: 'checkpoint.abandonedRegistrationSweepEnabled',\n} as const;\n\nexport type MigrationActionId = (typeof MIGRATION_ACTION_IDS)[keyof typeof MIGRATION_ACTION_IDS];\n\nexport const MIGRATION_ACTION_ID_KEYS = Object.values(MIGRATION_ACTION_IDS) as [\n MigrationActionId,\n ...MigrationActionId[],\n];\n"]}
1
+ {"version":3,"file":"action-ids.js","sourceRoot":"","sources":["../../src/migration-console/action-ids.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,gBAAgB,EAAE,mBAAmB;IACrC,mBAAmB,EAAE,sBAAsB;IAC3C,0BAA0B,EAAE,6BAA6B;IACzD,kBAAkB,EAAE,qBAAqB;IACzC,aAAa,EAAE,gBAAgB;IAC/B,kBAAkB,EAAE,qBAAqB;IACzC,qBAAqB,EAAE,wBAAwB;IAC/C,0BAA0B,EAAE,6BAA6B;IACzD,iBAAiB,EAAE,oBAAoB;IACvC,eAAe,EAAE,kBAAkB;IACnC,6BAA6B,EAAE,gCAAgC;IAC/D,aAAa,EAAE,gBAAgB;IAE/B,8FAA8F;IAC9F,+EAA+E;IAC/E,qBAAqB,EAAE,wBAAwB;IAC/C,uBAAuB,EAAE,0BAA0B;IAEnD,eAAe,EAAE,kBAAkB;IACnC,iBAAiB,EAAE,oBAAoB;IACvC,aAAa,EAAE,gBAAgB;IAC/B,mBAAmB,EAAE,sBAAsB;IAC3C,mBAAmB,EAAE,sBAAsB;IAC3C,mBAAmB,EAAE,sBAAsB;IAC3C,qBAAqB,EAAE,wBAAwB;IAC/C,mBAAmB,EAAE,sBAAsB;IAC3C,oBAAoB,EAAE,uBAAuB;IAC7C,sBAAsB,EAAE,yBAAyB;IACjD,oBAAoB,EAAE,uBAAuB;IAC7C,oBAAoB,EAAE,uBAAuB;IAC7C,sBAAsB,EAAE,yBAAyB;IACjD,wBAAwB,EAAE,2BAA2B;IACrD,qBAAqB,EAAE,wBAAwB;IAC/C,mBAAmB,EAAE,sBAAsB;IAC3C,8FAA8F;IAC9F,uFAAuF;IACvF,wBAAwB,EAAE,2BAA2B;IACrD,eAAe,EAAE,kBAAkB;IACnC,uBAAuB,EAAE,0BAA0B;IAEnD,cAAc,EAAE,iBAAiB;IACjC,y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AwB;IAC/C,kBAAkB,EAAE,qBAAqB;IACzC,yBAAyB,EAAE,4BAA4B;IAEvD,iBAAiB,EAAE,oBAAoB;IAEvC,2BAA2B,EAAE,8BAA8B;IAC3D,mCAAmC,EAAE,sCAAsC;IAC3E,kCAAkC,EAAE,qCAAqC;IACzE,sCAAsC,EAAE,yCAAyC;IACjF,2CAA2C,EAAE,8CAA8C;CACnF,CAAC;AAIX,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAGzE,CAAC","sourcesContent":["export const MIGRATION_ACTION_IDS = {\n copyUserProfiles: 'copy.userProfiles',\n copyHistoricalStats: 'copy.historicalStats',\n deriveReservedDisplayNames: 'derive.reservedDisplayNames',\n migratePublicUsers: 'migrate.publicUsers',\n copyAdminList: 'copy.adminList',\n verifyUserProfiles: 'verify.userProfiles',\n verifyHistoricalStats: 'verify.historicalStats',\n verifyReservedDisplayNames: 'verify.reservedDisplayNames',\n verifyPublicUsers: 'verify.publicUsers',\n verifyAdminList: 'verify.adminList',\n cleanupOrphanGhostPublicUsers: 'cleanup.orphanGhostPublicUsers',\n deleteV1Users: 'delete.v1Users',\n\n // Required by the ghost cleanup, whose probes read `teamMemberships` and `gameRosterPlayers`:\n // until those copies are verified complete, every ghost reads as unreferenced.\n verifyTeamMemberships: 'verify.teamMemberships',\n verifyGameRosterPlayers: 'verify.gameRosterPlayers',\n\n copyLeagueTeams: 'copy.leagueTeams',\n verifyLeagueTeams: 'verify.leagueTeams',\n deleteV1Teams: 'delete.v1Teams',\n copyTeamMemberships: 'copy.teamMemberships',\n deleteV1TeamMembers: 'delete.v1TeamMembers',\n copyTeamInvitations: 'copy.teamInvitations',\n verifyTeamInvitations: 'verify.teamInvitations',\n deleteV1TeamInvites: 'delete.v1TeamInvites',\n copyTeamJoinRequests: 'copy.teamJoinRequests',\n verifyTeamJoinRequests: 'verify.teamJoinRequests',\n deleteV1JoinRequests: 'delete.v1JoinRequests',\n copyLeagueFreeAgents: 'copy.leagueFreeAgents',\n verifyLeagueFreeAgents: 'verify.leagueFreeAgents',\n deleteV1FreeAgentSignups: 'delete.v1FreeAgentSignups',\n copyGameRosterPlayers: 'copy.gameRosterPlayers',\n deleteV1GameRosters: 'delete.v1GameRosters',\n // It removes the stale entries a copied roster holds, so it waits for the memberships and the\n // game stats — which pin an entry holding a recorded stat — to be copied and verified.\n reconcileOpenGameRosters: 'reconcile.openGameRosters',\n verifyGameStats: 'verify.gameStats',\n verifyLeaguePlayerStats: 'verify.leaguePlayerStats',\n\n copySportGames: 'copy.sportGames',\n resolveUnrosteredStatLine: 'resolve.unrosteredStatLine',\n verifySportGames: 'verify.sportGames',\n deleteV1LeagueGames: 'delete.v1LeagueGames',\n\n copySignedWaivers: 'copy.signedWaivers',\n verifySignedWaivers: 'verify.signedWaivers',\n verifySignatureFilesResolvable: 'verify.signatureFilesResolvable',\n revokeV1SignatureDownloadTokens: 'revoke.v1SignatureDownloadTokens',\n deleteV1WaiverSignatures: 'delete.v1WaiverSignatures',\n\n copyHardwareLoanContracts: 'copy.hardwareLoanContracts',\n verifyHardwareLoanContracts: 'verify.hardwareLoanContracts',\n deleteV1HardwareContracts: 'delete.v1HardwareContracts',\n\n copySportLeagues: 'copy.sportLeagues',\n verifySportLeagues: 'verify.sportLeagues',\n deleteV1Leagues: 'delete.v1Leagues',\n deleteV1LeagueChats: 'delete.v1LeagueChats',\n\n carryV1Pictures: 'carry.v1Pictures',\n verifyV1Pictures: 'verify.v1Pictures',\n\n copyAppConfig: 'copy.appConfig',\n copyLandingPageConfig: 'copy.landingPageConfig',\n copyStatsBeacon: 'copy.statsBeacon',\n verifyAppConfig: 'verify.appConfig',\n verifyLandingPageConfig: 'verify.landingPageConfig',\n verifyStatsBeacon: 'verify.statsBeacon',\n deleteV1LandingBase: 'delete.v1LandingBase',\n deleteV1LandingAdmin: 'delete.v1LandingAdmin',\n\n copyWaiverTemplates: 'copy.waiverTemplates',\n verifyWaiverTemplates: 'verify.waiverTemplates',\n deleteV1Waivers: 'delete.v1Waivers',\n\n copyAwardDefinitions: 'copy.awardDefinitions',\n verifyAwardDefinitions: 'verify.awardDefinitions',\n\n copyGameLocations: 'copy.gameLocations',\n verifyGameLocations: 'verify.gameLocations',\n\n deleteV1AdminStats: 'delete.v1AdminStats',\n\n verifyV1CommerceDiscardable: 'verify.v1CommerceDiscardable',\n\n // Read-only checks of V1 data that should never have been stored; the copies they cover wait on\n // them, and what they report is fixed in V1.\n verifyV1DisplayNamesUnique: 'verify.v1DisplayNamesUnique',\n verifyV1TextFitsLimits: 'verify.v1TextFitsLimits',\n verifyV1LeagueCapacity: 'verify.v1LeagueCapacity',\n verifyV1HardwareContractIdsUnique: 'verify.v1HardwareContractIdsUnique',\n deleteV1Commerce: 'delete.v1Commerce',\n\n rebuildStats: 'rebuild.stats',\n validateStats: 'validate.stats',\n verifySportHallOfFame: 'verify.sportHallOfFame',\n deleteV1HallOfFame: 'delete.v1HallOfFame',\n deleteV1ValidationReports: 'delete.v1ValidationReports',\n\n recordCutoverLive: 'record.cutoverLive',\n\n checkpointV1FirestoreExport: 'checkpoint.v1FirestoreExport',\n checkpointPaymentCredentialsRetired: 'checkpoint.paymentCredentialsRetired',\n checkpointServiceAccountKeyRevoked: 'checkpoint.serviceAccountKeyRevoked',\n checkpointUnattachedPicturesReuploaded: 'checkpoint.unattachedPicturesReuploaded',\n checkpointAbandonedRegistrationSweepEnabled: 'checkpoint.abandonedRegistrationSweepEnabled',\n} as const;\n\nexport type MigrationActionId = (typeof MIGRATION_ACTION_IDS)[keyof typeof MIGRATION_ACTION_IDS];\n\nexport const MIGRATION_ACTION_ID_KEYS = Object.values(MIGRATION_ACTION_IDS) as [\n MigrationActionId,\n ...MigrationActionId[],\n];\n"]}
@@ -4,7 +4,7 @@ export declare const MIGRATION_STEP_KIND_KEYS: readonly ["executable", "productC
4
4
  export type MigrationStepKind = (typeof MIGRATION_STEP_KIND_KEYS)[number];
5
5
  export declare const MIGRATION_RESULT_KIND_KEYS: readonly ["write", "verification"];
6
6
  export type MigrationResultKind = (typeof MIGRATION_RESULT_KIND_KEYS)[number];
7
- export declare const MIGRATION_CONTROL_EVIDENCE_KEYS: readonly ["statsOperation", "statsValidationReport"];
7
+ export declare const MIGRATION_CONTROL_EVIDENCE_KEYS: readonly ["statsJob", "statsValidationReport"];
8
8
  export type MigrationControlEvidence = (typeof MIGRATION_CONTROL_EVIDENCE_KEYS)[number];
9
9
  export declare const MIGRATION_OWNING_STEP_KEYS: readonly ["auth", "q-core", "stat-data-model", "high-risk-callables", "uploads-and-media", "query-and-invalidation", "secret-management", "migration-console"];
10
10
  export type MigrationOwningStep = (typeof MIGRATION_OWNING_STEP_KEYS)[number];
@@ -40,7 +40,6 @@ export interface ProductControlMigrationStep extends MigrationStepBase {
40
40
  export interface OperatorCheckpointMigrationStep extends MigrationStepBase {
41
41
  readonly kind: 'operatorCheckpoint';
42
42
  readonly instructions: string;
43
- readonly evidence: string;
44
43
  readonly noReturnBoundary: string | null;
45
44
  }
46
45
  export interface CutoverMarkerMigrationStep extends MigrationStepBase {
@@ -49,10 +48,11 @@ export interface CutoverMarkerMigrationStep extends MigrationStepBase {
49
48
  readonly noReturnBoundary: string;
50
49
  }
51
50
  export type MigrationStep = ExecutableMigrationStep | ProductControlMigrationStep | OperatorCheckpointMigrationStep | CutoverMarkerMigrationStep;
52
- export declare const RECORD_MIGRATION_CONTROL_RUN_CALLABLE = "adminRecordMigrationControlRun";
53
- export declare const RECORD_MIGRATION_CHECKPOINT_CALLABLE = "adminRecordMigrationCheckpoint";
54
- export declare const RECORD_MIGRATION_CUTOVER_CALLABLE = "adminRecordMigrationCutover";
51
+ export declare const RECORD_MIGRATION_CONTROL_RUN_CALLABLE = "adminUpdateMigrationActionRunControl";
52
+ export declare const RECORD_MIGRATION_CHECKPOINT_CALLABLE = "adminUpdateMigrationActionRunCheckpoint";
53
+ export declare const RECORD_MIGRATION_CUTOVER_CALLABLE = "adminUpdateMigrationConsoleCutover";
55
54
  export declare const GET_MIGRATION_CONSOLE_CALLABLE = "adminGetMigrationConsole";
55
+ export declare const RESOLVE_UNROSTERED_STAT_LINE_CALLABLE = "adminCreateGameRosterPlayer";
56
56
  export declare function migrationActionCallableName(id: MigrationActionId): string;
57
57
  export declare const MIGRATION_CUTOVER_MANIFEST: readonly MigrationStep[];
58
58
  export declare const MIGRATION_STEP_BY_ID: ReadonlyMap<MigrationActionId, MigrationStep>;
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/migration-console/manifest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAI3E,eAAO,MAAM,wBAAwB,kFAK3B,CAAC;AACX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,eAAO,MAAM,0BAA0B,oCAAqC,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,eAAO,MAAM,+BAA+B,sDAAuD,CAAC;AACpG,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC;AAExF,eAAO,MAAM,0BAA0B,gKAS7B,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,EAAE,iBAAiB,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,SAAS,iBAAiB,EAAE,C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,CAAC,EAAE,CAIvC"}
@@ -8,7 +8,7 @@ export const MIGRATION_STEP_KIND_KEYS = [
8
8
  'cutoverMarker',
9
9
  ];
10
10
  export const MIGRATION_RESULT_KIND_KEYS = ['write', 'verification'];
11
- export const MIGRATION_CONTROL_EVIDENCE_KEYS = ['statsOperation', 'statsValidationReport'];
11
+ export const MIGRATION_CONTROL_EVIDENCE_KEYS = ['statsJob', 'statsValidationReport'];
12
12
  export const MIGRATION_OWNING_STEP_KEYS = [
13
13
  'auth',
14
14
  'q-core',
@@ -19,14 +19,15 @@ export const MIGRATION_OWNING_STEP_KEYS = [
19
19
  'secret-management',
20
20
  'migration-console',
21
21
  ];
22
- export const RECORD_MIGRATION_CONTROL_RUN_CALLABLE = 'adminRecordMigrationControlRun';
23
- export const RECORD_MIGRATION_CHECKPOINT_CALLABLE = 'adminRecordMigrationCheckpoint';
24
- export const RECORD_MIGRATION_CUTOVER_CALLABLE = 'adminRecordMigrationCutover';
22
+ export const RECORD_MIGRATION_CONTROL_RUN_CALLABLE = 'adminUpdateMigrationActionRunControl';
23
+ export const RECORD_MIGRATION_CHECKPOINT_CALLABLE = 'adminUpdateMigrationActionRunCheckpoint';
24
+ export const RECORD_MIGRATION_CUTOVER_CALLABLE = 'adminUpdateMigrationConsoleCutover';
25
25
  export const GET_MIGRATION_CONSOLE_CALLABLE = 'adminGetMigrationConsole';
26
+ export const RESOLVE_UNROSTERED_STAT_LINE_CALLABLE = 'adminCreateGameRosterPlayer';
26
27
  export function migrationActionCallableName(id) {
27
28
  const [verb = '', object = ''] = id.split('.');
28
29
  const capitalize = (word) => word.charAt(0).toUpperCase() + word.slice(1);
29
- return `admin${capitalize(verb)}${capitalize(object)}`;
30
+ return `adminUpdateMigrationActionRun${capitalize(verb)}${capitalize(object)}`;
30
31
  }
31
32
  const COPY_IDEMPOTENCY = 'Deterministic destination ids written whole, so a re-run rewrites the same documents with the same content.';
32
33
  const VERIFY_IDEMPOTENCY = 'Reads only; a re-run compares again.';
@@ -153,7 +154,6 @@ export const MIGRATION_CUTOVER_MANIFEST = [
153
154
  dependsOn: [],
154
155
  orderedAfter: [],
155
156
  instructions: 'In production, with V1 stopped, take a managed Firestore export of the whole database to a Cloud Storage bucket and keep it. In a rehearsal, name the production export the dev copy was imported from.',
156
- evidence: 'The export operation name and the bucket path it wrote to.',
157
157
  noReturnBoundary: null,
158
158
  },
159
159
  v1CheckStep(A.verifyV1DisplayNamesUnique, {
@@ -280,7 +280,6 @@ export const MIGRATION_CUTOVER_MANIFEST = [
280
280
  dependsOn: [A.verifyUserProfiles],
281
281
  orderedAfter: [],
282
282
  instructions: 'Once the profile verification has passed, confirm every account that should keep its sign-in holds a copied profile, then record this step to let the scheduled sweep delete the sign-in accounts that hold none past their grace window.',
283
- evidence: 'The passing profile verification this step follows, and the count of profiles it checked.',
284
283
  noReturnBoundary: 'The sweep’s first deletion of a sign-in account that holds no profile.',
285
284
  },
286
285
  copyStep(A.copyHistoricalStats, {
@@ -459,7 +458,7 @@ export const MIGRATION_CUTOVER_MANIFEST = [
459
458
  {
460
459
  kind: 'executable',
461
460
  id: A.resolveUnrosteredStatLine,
462
- callable: migrationActionCallableName(A.resolveUnrosteredStatLine),
461
+ callable: RESOLVE_UNROSTERED_STAT_LINE_CALLABLE,
463
462
  resultKind: 'write',
464
463
  destructive: false,
465
464
  paged: false,
@@ -573,42 +572,16 @@ export const MIGRATION_CUTOVER_MANIFEST = [
573
572
  },
574
573
  {
575
574
  kind: 'productControl',
576
- id: A.rebuildLeagueStats,
577
- title: 'Rebuild every league’s stats',
578
- summary: 'Every team’s season line and per-membership rows, closed leagues included, rebuilt from the copied games.',
575
+ id: A.rebuildStats,
576
+ title: 'Rebuild every stat',
577
+ summary: 'Every team’s season line and per-membership rows, closed leagues included, every account’s lifetime lines and the hall of fame of every sport that keeps one, rebuilt from the copied games and historical baselines.',
579
578
  owningStep: 'stat-data-model',
580
- dependsOn: SOURCE_VERIFICATIONS_FOR_REBUILD,
579
+ dependsOn: [...SOURCE_VERIFICATIONS_FOR_REBUILD, A.verifyUserProfiles, A.verifyHistoricalStats],
581
580
  orderedAfter: [],
582
- callable: 'recalculateAllLeagueStats',
583
- destinations: ['leagueTeams/{teamId}'],
584
- instructions: 'Run “Rebuild every league” from Stats › Fix stats as a real run, not a dry run, and let it reach the end.',
585
- evidence: 'statsOperation',
586
- },
587
- {
588
- kind: 'productControl',
589
- id: A.rebuildLifetimeStats,
590
- title: 'Rebuild every user’s lifetime stats',
591
- summary: 'Every account’s lifetime lines rebuilt from the copied games and historical baselines.',
592
- owningStep: 'stat-data-model',
593
- dependsOn: [A.rebuildLeagueStats, A.verifyUserProfiles, A.verifyHistoricalStats],
594
- orderedAfter: [],
595
- callable: 'recalculateAllUserStats',
596
- destinations: ['userProfiles/{userId}'],
597
- instructions: 'Run “Rebuild every user” from Stats › Fix stats as a real run, and let it reach the end.',
598
- evidence: 'statsOperation',
599
- },
600
- {
601
- kind: 'productControl',
602
- id: A.rebuildSportHallOfFame,
603
- title: 'Rebuild the hall of fame',
604
- summary: 'The hall of fame of every sport that keeps one, rebuilt from the copied games and baselines.',
605
- owningStep: 'stat-data-model',
606
- dependsOn: [A.rebuildLifetimeStats],
607
- orderedAfter: [],
608
- callable: 'recalculateHallOfFame',
609
- destinations: ['sportHallOfFame/{sportKey}'],
610
- instructions: 'Run the hall-of-fame rebuild from Stats › Fix stats once for each sport that keeps a hall of fame, as real runs, and record every run.',
611
- evidence: 'statsOperation',
581
+ callable: 'adminCreateStatsJob',
582
+ destinations: ['leagueTeams/{teamId}', 'userProfiles/{userId}', 'sportHallOfFame/{sportKey}'],
583
+ instructions: 'Run “Rebuild › Everything” from Stats › Fix stats and let it finish.',
584
+ evidence: 'statsJob',
612
585
  },
613
586
  {
614
587
  kind: 'productControl',
@@ -616,9 +589,9 @@ export const MIGRATION_CUTOVER_MANIFEST = [
616
589
  title: 'Validate the stats',
617
590
  summary: 'Check stats over everything; it must report no finding.',
618
591
  owningStep: 'stat-data-model',
619
- dependsOn: [A.rebuildSportHallOfFame],
592
+ dependsOn: [A.rebuildStats],
620
593
  orderedAfter: [],
621
- callable: 'runStatsValidation',
594
+ callable: 'adminCreateStatsValidationReport',
622
595
  destinations: ['statsValidationReports/{reportId}'],
623
596
  instructions: 'Run “Check stats” over everything from Stats › Fix stats and let it finish.',
624
597
  evidence: 'statsValidationReport',
@@ -627,14 +600,14 @@ export const MIGRATION_CUTOVER_MANIFEST = [
627
600
  title: 'Compare the league player totals with V1',
628
601
  summary: 'Lists each player whose V1 league total differs from the sum of their rebuilt rows in that league. It informs the rehearsal and gates nothing.',
629
602
  owningStep: 'stat-data-model',
630
- dependsOn: [A.rebuildLeagueStats],
603
+ dependsOn: [A.rebuildStats],
631
604
  informational: true,
632
605
  }),
633
606
  verifyStep(A.verifySportHallOfFame, {
634
607
  title: 'Verify the rebuilt hall of fame',
635
608
  summary: 'Every V1 hall of fame of a sport that keeps one has its rebuilt document, which satisfies its schema and holds an entry for every V1 player with a non-zero total.',
636
609
  owningStep: 'stat-data-model',
637
- dependsOn: [A.rebuildSportHallOfFame],
610
+ dependsOn: [A.rebuildStats],
638
611
  }),
639
612
  {
640
613
  kind: 'cutoverMarker',
@@ -925,7 +898,6 @@ export const MIGRATION_CUTOVER_MANIFEST = [
925
898
  dependsOn: [A.verifyV1Pictures, A.recordCutoverLive],
926
899
  orderedAfter: [],
927
900
  instructions: 'For each source the picture verification reported, re-upload the image through its control — Reupload badge for an award, the picture managers for a league, the landing page, or a venue. In a rehearsal, record that this is production-only.',
928
- evidence: 'Each re-uploaded owner, or that the verification reported none.',
929
901
  noReturnBoundary: null,
930
902
  },
931
903
  {
@@ -937,7 +909,6 @@ export const MIGRATION_CUTOVER_MANIFEST = [
937
909
  dependsOn: [A.recordCutoverLive],
938
910
  orderedAfter: [],
939
911
  instructions: 'Production only, once V2 is live there: revoke the payment service’s secret key and disable its webhook endpoint in its dashboard, then destroy the three secrets V1 binds for it — its secret key, its webhook secret, and APP_URL — in Secret Manager in both Firebase projects. In a rehearsal, record that this is production-only.',
940
- evidence: 'The payment dashboard showing the key revoked and the endpoint disabled, and `gcloud secrets list` in each project showing none of the three.',
941
912
  noReturnBoundary: 'The secret key revocation.',
942
913
  },
943
914
  {
@@ -949,7 +920,6 @@ export const MIGRATION_CUTOVER_MANIFEST = [
949
920
  dependsOn: [A.checkpointV1FirestoreExport],
950
921
  orderedAfter: [A.recordCutoverLive],
951
922
  instructions: 'Run the export script on Application Default Credentials against the production project named explicitly, then revoke the q-sports-prod service-account key in the Google Cloud console and delete serviceAccount.json from the machine. No replacement key is minted. In a rehearsal, record that this is production-only.',
952
- evidence: 'The export run on ADC, and the console showing the key revoked.',
953
923
  noReturnBoundary: 'The key revocation.',
954
924
  },
955
925
  ];